Sub topic 9
Floating Voltage Sources and Supernodes
This chapter assumes you can write KCL equations in terms of conductance. It also assumes you can assemble G v = i, and that you know a voltage source tied to ground fixes that node's voltage. Here you handle a voltage source that connects two non-reference nodes.
Why a floating source breaks the usual method
A floating voltage source is an ideal voltage source with neither terminal on the reference node. It fixes the difference between two node voltages, but not either voltage alone.
Ordinary nodal analysis needs the current through every element at a node, written as a function of node voltages. Resistors give that: i = G (Va − Vb). An ideal voltage source does not. Its current is set by the rest of the circuit, so it has no formula in terms of node voltages.
There are two ways around this:
- Merge the two nodes into one supernode and write one KCL equation for the pair.
- Add the source current as an extra unknown, which is the basis of modified nodal analysis.
Both give the same answers.
The supernode method
A supernode is a closed boundary drawn around a floating voltage source and the two nodes it connects. KCL holds for any closed boundary, not only for a single node. The total current leaving the supernode is zero.
The method has three steps:
- Write the constraint equation from the source. If the source has its + terminal at node
aand its − terminal at nodeb, thenVa − Vb = Vs. - Write one KCL equation for the whole supernode. Sum the currents in every element that crosses the boundary. Ignore the source itself, because its current stays inside.
- Write ordinary KCL equations for any other non-reference nodes.
Each floating source adds one unknown pair but also one constraint. The equation count stays equal to the unknown count:
| Item | Count |
|---|---|
| Non-reference nodes | N |
| Grounded voltage sources (each fixes one voltage) | g |
| Floating voltage sources (each gives one constraint) | f |
| KCL equations needed | N − g − f |
| Constraint equations | g + f |
| Total equations | N, equal to the number of unknowns |
Worked example
A 5 A current source pushes current into node 1. Resistor R1 = 2 Ω connects node 1 to ground. A 6 V source connects node 1 (+) to node 2 (−). Resistor R2 = 4 Ω connects node 2 to ground.
The source is floating, so nodes 1 and 2 form a supernode.
Constraint:
V1 − V2 = 6
KCL at the supernode. The 5 A enters. Current leaves through R1 and R2:
5 = V1/2 + V2/4
Solve. Substitute V1 = V2 + 6:
5 = (V2 + 6)/2 + V2/4 = 0.5 V2 + 3 + 0.25 V2
2 = 0.75 V2, so V2 = 8/3 ≈ 2.667 V and V1 = 26/3 ≈ 8.667 V.
Recover the source current. The source current appears in neither the constraint nor the supernode equation. Get it from KCL at node 2 alone. The only things attached to node 2 are the source and R2:
I(source, from node 1 to node 2) = V2/4 = 0.667 A
You can confirm this at node 1: the 5 A in splits into V1/2 = 4.333 A through R1 and 0.667 A through the source.
Putting it in matrix form
The supernode equation and the constraint are each a row in a matrix equation. They do not have the symmetric pattern of a pure conductance matrix, but numpy solves them the same way.
import numpy as np
# Row 1: supernode KCL (1/2) V1 + (1/4) V2 = 5
# Row 2: constraint V1 - V2 = 6
A = np.array([[1/2, 1/4],
[1.0, -1.0]])
b = np.array([5.0, 6.0])
v = np.linalg.solve(A, b)
print(v) # [8.66666667 2.66666667]Row 1 is the sum of the two node KCL rows. Row 2 replaces the second node's KCL row, because that row contained the unknown source current.
Adding the source current as an unknown
The second approach keeps one KCL equation per node, and includes the source current Is in each equation it touches. Is is defined as the current flowing through the source from node 1 to node 2. It leaves node 1 and enters node 2.
- Node 1:
V1/2 + Is = 5 - Node 2:
V2/4 − Is = 0 - Constraint:
V1 − V2 = 6
import numpy as np
# Unknowns: [V1, V2, Is]
A = np.array([[0.5, 0.0, 1.0],
[0.0, 0.25, -1.0],
[1.0, -1.0, 0.0]])
b = np.array([5.0, 0.0, 6.0])
V1, V2, Is = np.linalg.solve(A, b)
print(V1, V2, Is) # 8.666666666666666 2.666666666666667 0.6666666666666666This version returns the source current directly, and software that builds matrices automatically usually works this way. The cost is a larger matrix. For hand work the supernode is usually faster. For code, the extra unknown is easier to automate.
Edge cases and common errors
A resistor in parallel with the floating source
Suppose a resistor sits directly across the 6 V source, between nodes 1 and 2. Its current leaves node 1 and enters node 2, so it is inside the supernode boundary and cancels out of the supernode KCL equation. It does not change V1 or V2. It only changes how the current splits between the resistor and the source, so it changes the source current.
A resistor in series with the source
A resistor in series with a voltage source creates an extra node between them. That node is a separate unknown, and the source is then between that node and one other node. Draw the supernode around the source's actual terminals, not around the resistor.
Source in series with a current source
If a voltage source is in series with an ideal current source, the current through the source is fixed by the current source. The voltage source still gives a constraint, but now its current is known. Check that the rest of the circuit allows both.
Supernodes containing the reference node
If one terminal of the source is the reference node, there is no supernode. The other node voltage is simply +Vs or −Vs. Check the polarity carefully. A source with its + terminal on ground gives a node voltage of −Vs.
Chains of floating sources
Two floating sources that share a node merge into one supernode of three nodes. You then write two constraint equations and one KCL equation for the whole boundary. The equation count still balances: three unknowns, two constraints, one KCL.
Dependent sources
A dependent voltage source is handled the same way, with one change. Its constraint is Va − Vb = k × (controlling variable). Rewrite the controlling variable in terms of node voltages first. For example, if the control is the current through a resistor, replace it with G (Vx − Vy).
Contradictory sources
Two ideal voltage sources in parallel with different values give constraints that cannot both be true. The matrix is singular. A loop made only of voltage sources has the same problem. Check for this before solving. The last-but-one chapter returns to singular systems.
Common errors
- Writing KCL for the supernode but also including the source current as if it were known.
- Forgetting the constraint equation and ending up with too few equations.
- Reversing the polarity of the constraint. Check which terminal is +.
- Writing separate KCL equations for the two nodes and also the supernode equation. That counts the same current twice and over-constrains the system.
Checking the result
Use the power balance from the checking chapter. In the worked example:
| Element | Power |
|---|---|
| Current source (delivers) | `5 × 8.667 = 43.33 W` |
| R1 (absorbs) | `8.667² / 2 = 37.56 W` |
| R2 (absorbs) | `2.667² / 4 = 1.78 W` |
| 6 V source (absorbs, current enters the + terminal) | `6 × 0.667 = 4.00 W` |
The absorbed total is 37.56 + 1.78 + 4.00 = 43.33 W, which equals the power delivered. The source absorbing power is not an error. A voltage source absorbs power when current flows into its + terminal.
Exercises
Exercise
Use the same circuit as the worked example (5 A current source into node 1, R1 = 2 Ω from node 1 to ground, R2 = 4 Ω from node 2 to ground), but reverse the 6 V source so its + terminal is at node 2 and its − terminal is at node 1. Find V1 and V2.
Show answer
The constraint is V2 − V1 = 6, so V2 = V1 + 6. Supernode KCL: 5 = V1/2 + V2/4 = V1/2 + (V1 + 6)/4 = 0.75 V1 + 1.5. So V1 = 3.5 / 0.75 = 14/3 ≈ 4.667 V and V2 = 32/3 ≈ 10.667 V. Check: 4.667/2 + 10.667/4 = 2.333 + 2.667 = 5 A.
Exercise
A circuit has four non-reference nodes. One voltage source is connected from node 2 to ground, and another is floating between nodes 3 and 4. How many KCL equations and how many constraint equations do you need?
Show answer
The grounded source gives one constraint (it fixes the node 2 voltage). The floating source gives one constraint. That is 2 constraints. The remaining 4 − 2 = 2 equations are KCL equations: one for node 1 and one for the supernode formed by nodes 3 and 4. Node 2 needs no KCL equation, because its voltage is already known.