Algorithm Search⌘K

Definitionintro

Kirchhoff's circuit laws

Also called KCL and KVL, Kirchhoff's current law, Kirchhoff's voltage law.

The currents into a node sum to zero and the voltages around a loop sum to zero, the constraints that every circuit simulator writes as equations.

Kirchhoff's circuit laws are the two linear constraints that the wiring of a lumped circuit puts on its branch currents and branch voltages: the current law (KCL) says that the currents leaving any node sum to zero, and the voltage law (KVL) says that the branch voltages around any closed loop sum to zero. They depend only on the graph of the circuit, not on the elements, so a circuit simulator writes them once from the netlist and adds the element laws. This page belongs to the circuit simulation half of the logic and circuit simulation sub-area, which works with nodal equations rather than with gate values. The same laws on a resistor network give the electrical flow of graph algorithms, where Ohm's law, the Laplacian matrix and Thomson's principle are worked out.

Definition

Circuit graph. A lumped circuit has n+1n + 1 nodes, numbered 0,1,…,n0, 1, \ldots, n, with node 0 as the ground (reference) node, and bb two-terminal branches. Each branch jj has a chosen direction from its first node to its second node, so the circuit is a connected directed graph, possibly with parallel edges. Branch jj carries a current iji_j, counted positive from the first node through the element to the second node, and a voltage vjv_j, the potential of the first node minus the potential of the second. This pairing of directions is the associated reference direction: with it, vjijv_j i_j is the power that branch jj absorbs.

Reduced incidence matrix. A∈{−1,0,1}n×bA \in \{-1, 0, 1\}^{n \times b} has Akj=+1A_{kj} = +1 if branch jj leaves node kk, Akj=−1A_{kj} = -1 if it enters node kk, and Akj=0A_{kj} = 0 otherwise. It is the signed incidence matrix with the row of ground deleted.

Kirchhoff's current law. A current vector i∈Rbi \in \mathbb{R}^b satisfies KCL when the net current leaving every node is zero:

A i=0,that is∑jAkj ij=0for k=1,…,n.A\, i = 0, \qquad \text{that is} \qquad \sum_{j} A_{kj}\, i_j = 0 \quad \text{for } k = 1, \ldots, n.

The row of ground is the negative sum of the other rows, so it holds too. Summing the rows of a set SS of nodes gives the cut set form: the net current through the branches with one end in SS and one end outside SS is zero.

Kirchhoff's voltage law. A voltage vector v∈Rbv \in \mathbb{R}^b satisfies KVL when the signed sum of the branch voltages around every closed loop is zero, a branch counting +vj+v_j when the loop runs along its direction and −vj-v_j against it. Equivalently, there are node voltages e∈Rne \in \mathbb{R}^n (with e0=0e_0 = 0) such that

v=ATe,that isvj=efirst(j)−esecond(j).v = A^{\mathsf T} e, \qquad \text{that is} \qquad v_j = e_{\text{first}(j)} - e_{\text{second}(j)}.

Why the two forms agree. If v=ATev = A^{\mathsf T} e, each loop sum telescopes to eu−eu=0e_u - e_u = 0. Conversely, if every loop sum is zero, define eke_k as the signed sum of vv along any path from node kk to ground. Two such paths together form a closed walk, whose signed sum is zero, so eke_k does not depend on the path, and vj=efirst(j)−esecond(j)v_j = e_{\text{first}(j)} - e_{\text{second}(j)} for every branch.

Counting. On a connected circuit graph AA has rank nn: it has nn rows, and the nn columns of a spanning tree are independent. To see this, take a leaf k≠0k \ne 0 of the tree. Among the tree columns, row kk has one nonzero, in the column of its leaf branch, so a zero combination of tree columns gives that column the coefficient 0; delete the leaf and repeat. So KCL is nn independent equations. KVL is b−nb - n independent equations, one for each fundamental cycle of a spanning tree. Together with one law for each element, this gives 2b2b equations in the 2b2b branch unknowns, the count that sparse tableau analysis writes out in full.

Examples and non-examples

A four-branch circuit. Take nodes 1, 2 and ground, and the branches b1=(0→1)b_1 = (0 \to 1), b2=(1→2)b_2 = (1 \to 2), b3=(2→0)b_3 = (2 \to 0), b4=(1→0)b_4 = (1 \to 0). Then

A=(−11010−110).A = \begin{pmatrix} -1 & 1 & 0 & 1 \\ 0 & -1 & 1 & 0 \end{pmatrix}.

KCL reads −i1+i2+i4=0-i_1 + i_2 + i_4 = 0 and −i2+i3=0-i_2 + i_3 = 0. KVL reads v1=−e1v_1 = -e_1, v2=e1−e2v_2 = e_1 - e_2, v3=e2v_3 = e_2, v4=e1v_4 = e_1, so the two independent loops give v1+v4=0v_1 + v_4 = 0 and v2+v3−v4=0v_2 + v_3 - v_4 = 0. With e=(6,24/5)e = (6, 24/5) the branch voltages are v=(−6,6/5,24/5,6)v = (-6, 6/5, 24/5, 6), and i=(23/5,8/5,8/5,3)i = (23/5, 8/5, 8/5, 3) satisfies KCL. Branch b1b_1 has v1i1=−138/5<0v_1 i_1 = -138/5 < 0, so it delivers power, as a source does.

Non-example: a current vector that breaks KCL. In the same graph, i=(1,1,1,1)i = (1, 1, 1, 1) has −i1+i2+i4=1≠0-i_1 + i_2 + i_4 = 1 \ne 0 at node 1, so one ampere would have to collect at node 1.

Non-example: laws that cannot hold together with the elements. Two ideal voltage sources of 1 V and 2 V in parallel between node 1 and ground force v=1v = 1 and v=2v = 2 on the two branches of a two-branch loop. No voltage vector satisfies KVL and both element laws, so the circuit has no solution. Simulators reject such a loop of voltage sources, and the dual case, a cut set made only of current sources whose currents do not sum to zero.

Non-example: outside the lumped model. The laws assume that no charge collects at a node and that no changing magnetic flux links a loop. On a wire whose length is a fair fraction of the signal wavelength, or around a loop that a changing magnetic field passes through, the voltage between two points depends on the path, and KVL in the form above does not hold. Such parts are modeled with distributed models or with extra lumped elements.

  • Flow conservation in network flows is KCL with demands: the same equation A i=bA\, i = b with a right-hand side.
  • Tellegen's theorem follows from KCL and KVL alone: vTi=0v^{\mathsf T} i = 0 for any vv that satisfies KVL and any ii that satisfies KCL on the same graph.
  • Modified nodal analysis uses the node voltages to satisfy KVL by construction and writes KCL at each node; sparse tableau analysis keeps both laws as separate rows.
  • The KVL space {ATe}\{A^{\mathsf T} e\} and the KCL space {i:Ai=0}\{i : A i = 0\} are orthogonal complements in Rb\mathbb{R}^b, the cut space and the cycle space of the graph. The cycle basis page builds bases of the cycle space.
  • For a diagonal GG of branch conductances, A GATA\, G A^{\mathsf T} is the weighted Laplacian matrix with the row and the column of ground deleted. KCL becomes A GATe=0A\, G A^{\mathsf T} e = 0 plus source terms after Ohm's law i=Gvi = G v is substituted.

References

  1. G. Kirchhoff, Ueber den Durchgang eines elektrischen Stromes durch eine Ebene, insbesondere durch eine kreisförmige, Annalen der Physik und Chemie 64, 497 to 514, 1845, the passage that states the two laws for a network of linear conductors, their first statement
  2. G. Kirchhoff, Ueber die Auflösung der Gleichungen, auf welche man bei der Untersuchung der linearen Vertheilung galvanischer Ströme geführt wird, Annalen der Physik und Chemie 72, 497 to 508, 1847, the whole paper (the independent equations of a network, counted with spanning trees)
  3. Farid N. Najm, Circuit Simulation, Wiley-IEEE Press, 2010, Chapter 2, Section 2.2 (topological constraints) and Section 2.3 (cycle space and bond space)
  4. Leon O. Chua and Pen-Min Lin, Computer-Aided Analysis of Electronic Circuits, Prentice-Hall, 1975, the chapter on the topological formulation of network equations (incidence, loop and cut set matrices)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/YT4QF0/text.yaml