Supernodes and Dependent Sources in Nodal Analysis
The routine of Node-Voltage Analysis writes "current leaving through resistors" at every node. Two kinds of element break that routine. A voltage source between two non-reference nodes carries a current that Ohm's law cannot give you, and a dependent source (the small-signal model of every transistor and op-amp) injects a current or voltage set by some other quantity in the circuit. This lesson adds the two tricks that handle them: the supernode, and writing each control variable in terms of node voltages.
The supernode
A floating voltage source fixes the difference of its two node voltages but says nothing about its own current. Instead of introducing that current as a new unknown, draw a closed surface around the source and both of its nodes. KCL holds for any closed surface, so the sum of currents leaving the surface through the other elements is zero, and the source current, which stays inside the surface, never appears. The source itself supplies the missing equation.
For a supernode joining nodes and through a source (+ at ):
One KCL equation plus one constraint replaces two KCL equations, so the count of equations still equals the count of unknowns.
Worked example: a supernode
Given: the circuit above: into node 1, (1 to ground), (+ at node 2, - at node 1), (2 to ground), (2 to 3), fixing node 3.
Find: , and the current through .
Solve: node 3 is known, . KCL on the supernode (, mA, V), then the constraint:
So and . The current through comes from KCL at node 1 alone: brings in , takes , so flows through from node 1 to node 2 (in at its - terminal, out at its +).
Check: at node 2, arrives from and from ; takes . . delivers .
Dependent sources
A dependent (controlled) source has a value set by a voltage or current elsewhere:
| Source | Symbol value | SPICE letter | Typical origin |
|---|---|---|---|
| voltage-controlled voltage source (VCVS) | E |
op-amp gain stage | |
| voltage-controlled current source (VCCS) | G |
MOSFET small-signal model | |
| current-controlled current source (CCCS) | F |
BJT small-signal model | |
| current-controlled voltage source (CCVS) | H |
transimpedance amplifier |
They are drawn as diamonds. In nodal analysis treat a dependent source like an independent one while writing KCL, then add one line that writes its control variable in terms of node voltages, and substitute. The resulting matrix is no longer symmetric, and a dependent source can deliver net power: it models an amplifier with a hidden power supply.
Worked example: a current-controlled current source
Given: at node a; (a to b), whose current controls a CCCS of into node c; (b to ground), (b to c), (c to ground).
Find: , , and the power of the dependent source.
Solve: control variable first: . KCL at b and c:
, so , , and the source pushes into node c.
Check: at c, takes back to b and takes : total . Node c sits above the only independent source (), which is impossible in a passive circuit: the dependent source delivers . Note the off-diagonal entries and : the substitution made asymmetric.
In Python
The code writes both systems row by row, exactly as derived, and checks each with a residual.
import numpy as np
# Supernode: unknowns v1, v2 (kOhm, mA, V)
A = np.array([[1/2, 1/2 + 1/1], # KCL on the supernode
[-1.0, 1.0]]) # v2 - v1 = 4
b = np.array([6 + 10/1, 4.0])
v1, v2 = np.linalg.solve(A, b)
print(f"supernode: v1 = {v1:.3f} V, v2 = {v2:.3f} V, I(VS) = {6 - v1/2:.3f} mA")
# CCCS: unknowns vb, vc; ix = (10 - vb)/1, source 2*ix into node c
beta = 2.0
G = np.array([[1 + 1/2 + 1, -1.0],
[-1 + beta, 1 + 1/5]])
i = np.array([10.0, 10 * beta])
vb, vc = np.linalg.solve(G, i)
ix = (10 - vb) / 1
print(f"CCCS: vb = {vb:.3f} V, vc = {vc:.3f} V, ix = {ix:.3f} mA")
print("G symmetric?", bool(np.allclose(G, G.T)))
print(f"dependent source power: {vc * beta * ix:.1f} mW delivered")
print("residual:", float(np.abs(G @ np.array([vb, vc]) - i).max()))supernode: v1 = 5.000 V, v2 = 9.000 V, I(VS) = 3.500 mA
CCCS: vb = 8.000 V, vc = 10.000 V, ix = 2.000 mA
G symmetric? False
dependent source power: 40.0 mW delivered
residual: 0.0
Cross-check with SPICE
ngspice's CCCS is the F element. It needs the control current to flow through a voltage source, so the deck inserts a 0 V "ammeter" Vx in series with . F1 0 c Vx 2 pushes twice the current of Vx from node 0 through the source into node c.
cat > cccs.cir <<'EOF'
* CCCS example: F1 = 2 * i(Vx), Vx senses the current in R1
V1 a 0 DC 10
Vx a ax DC 0
R1 ax b 1k
R2 b 0 2k
R3 b c 1k
R4 c 0 5k
F1 0 c Vx 2
.control
op
print v(b) v(c) i(Vx)
.endc
.end
EOF
ngspice -b cccs.cir 2>&1 | grep -E '^(v\(|i\()'v(b) = 8.000000e+00
v(c) = 1.000000e+01
i(vx) = 2.000000e-03
Interactive: the supernode circuit
Slide and watch and keep exactly that difference while both move. The lab draws the current of each element from its first node to its second.
At the default it reads , and a current of in (SPICE direction, from its + node through the source to its - node: the other way).
Guided lab: a floating source on the bench
Hand calculation. Build the supernode circuit, but replace by a supply in series with : its Norton equivalent is in parallel with , which now sits in parallel with , so redo the KCL with to ground at node 1: , giving and .
Simulation. Edit the netlist of the lab mentally or in a deck: V0 s 0 DC 12, Rs s n1 2k instead of I1; ngspice prints the same and .
What you would measure. must be a supply whose output is isolated from earth (most bench supplies with floating outputs are; check the earth terminal is not linked to -). Set it to with a limit, to and the third supply to . Expect and (1 % resistors, 0.1 % meter), and equal to the reading within the meter's last digit.
Hazards and safe setup. All supplies at or below 12 V with current limits of 20 mA. A supply whose - is earthed cannot float: tying it in as would short node 1 to ground through the earth. Every supply here delivers current (the 12 V supply 4 mA, and 2 mA each), so none has to sink current, which many bench supplies cannot do.
Pitfalls
- Writing KCL at both nodes of a floating source without its current: each equation is then wrong. Use the supernode, or keep the source current as an extra unknown (that is what MNA does).
- Forgetting the constraint equation. The supernode KCL alone has two unknowns.
- Leaving the control variable unexpressed. Every or must be rewritten in node voltages before solving.
- Assuming a symmetric matrix. Dependent sources make asymmetric; methods that rely on symmetry (Cholesky) do not apply.
- Expecting passive behaviour. Node voltages above every independent source are possible with dependent sources.
Practice
- In the supernode example, change to . Find and .
- In the CCCS example, set . What are and , and why does equal a divider result?
- A VCCS of with replaces the CCCS. Which entry of changes, and to what?
Answer
- : , .
- , , : , . With no injection, and divide : .
- The source puts into node c, which moves to the left side as : becomes mS; the other entries of stay, and the CCCS's term leaves the right-hand side of row c (it becomes 0).
Test yourself
Why can't you write ordinary KCL at a node connected to a floating voltage source?
- the node voltage is unknown
- the current through the voltage source is not given by Ohm's law
- KCL does not hold there
- the source has zero resistance so the current is infinite
A supernode replaces two KCL equations with…
- one KCL equation on the surface plus the source's voltage constraint
- two mesh equations
- one equation only
- a current-divider formula
Which SPICE element is a current-controlled current source, and what does it need?
E, a control node pairG, a control node pairF, a voltage source carrying the control currentH, a resistor
After substituting a dependent source's control variable, the nodal matrix is in general…
- symmetric
- diagonal
- not symmetric
- singular