Sub topic 9
Supernodes for voltage sources between nodes
This chapter assumes you can write KCL at a single node, express branch currents with Ohm's law, and solve small linear systems. It builds on the nodal equations from the previous chapter.
The problem
Nodal analysis writes KCL at each node, with every branch current expressed as a voltage difference divided by a resistance. An ideal voltage source breaks this. Its current can take any value the rest of the circuit demands, so no formula such as I = ΔV/R gives it.
You have two ways to handle this:
- Add the source current as an extra unknown, write KCL at both nodes, and add the source constraint as a further equation.
- Merge the two nodes into one supernode and skip the source current entirely.
The second method is shorter. It works because KCL holds for any closed boundary, not only for a single node.
What a supernode is
A supernode is a boundary drawn around a voltage source and the two nodes it connects. Neither of those nodes is the reference node. Charge cannot accumulate inside the boundary, so the currents entering it sum to the currents leaving it. The current through the source is internal to the boundary and does not appear in the equation.
A supernode removes one unknown and also removes one equation. The source adds a constraint in its place: the voltage difference between the two nodes equals the source voltage.
Procedure
Worked example
A 10 mA current source pushes current into node 1. A 1 kΩ resistor connects node 1 to ground. A 2 kΩ resistor connects node 2 to ground. A 4 V voltage source connects node 1 to node 2, with its positive terminal at node 1.
Draw the boundary around nodes 1 and 2. The only currents crossing it are the 10 mA entering and the two resistor currents leaving to ground:
0.010 = v1/1000 + v2/2000
The source gives the constraint:
v1 − v2 = 4
Substitute v1 = v2 + 4:
0.010 = (v2 + 4)/1000 + v2/2000
Multiply by 2000:
20 = 2(v2 + 4) + v2 = 3·v2 + 8
So v2 = 4 V and v1 = 8 V.
You can recover the source current afterward. At node 1 alone, the 10 mA source current enters. The resistor takes 8 mA, so 2 mA must leave through the voltage source toward node 2. At node 2, that 2 mA enters, and the 2 kΩ resistor draws 4/2000 = 2 mA. Both nodes balance.
Checking it in code
import numpy as np
R1, R3 = 1000.0, 2000.0
Vs = 4.0 # v1 - v2, positive terminal at node 1
# Row 1: KCL on the supernode. Row 2: the source constraint.
A = np.array([
[1/R1, 1/R3],
[1.0, -1.0],
])
b = np.array([0.010, Vs])
v1, v2 = np.linalg.solve(A, b)
print(v1, v2) # 8.0 4.0 (volts)
# Current through the source, found from KCL at node 1 alone
i_source = 0.010 - v1 / R1
print(i_source) # 0.002 (amperes), flowing from node 1 to node 2The result matches the hand solution. It also matches the 8 V and 4 V from the earlier nodal example, because that circuit has the same node voltages.
Common errors
- Reversing the constraint. If the positive terminal faces node 2, the constraint is v2 − v1 = Vs. Check the polarity before writing it.
- Forgetting the constraint. The boundary KCL equation alone has two unknowns. You need the source equation as well.
- Counting a source that touches ground. A voltage source between a node and ground needs no supernode. It fixes that node's voltage directly.
- Including internal currents. Any current between two nodes inside the boundary is internal and does not appear in the boundary equation.
Exercise
A 5 mA current source enters node 1. A 2 kΩ resistor connects node 1 to ground. A 1 kΩ resistor connects node 2 to ground. A 3 V source connects node 1 to node 2, with its positive terminal at node 2. Find v1 and v2.
Show answer
The constraint is v2 − v1 = 3, so v2 = v1 + 3. KCL on the supernode gives 0.005 = v1/2000 + v2/1000. Substituting gives 0.005 = v1/2000 + (v1 + 3)/1000. Multiply by 2000: 10 = v1 + 2·v1 + 6, so 3·v1 = 4 and v1 = 4/3 V ≈ 1.33 V. Then v2 = 13/3 V ≈ 4.33 V. Check: 0.667 mA + 4.33 mA = 5 mA.