Sub topic 6
Circuits with Independent Current Sources
This chapter assumes you can write Ohm's law in conductance form, apply Kirchhoff's current law (KCL) at a node, and solve a 2×2 or 3×3 linear system. You should also have a reference node chosen and the node voltages labeled. Independent current sources are the easiest source type for nodal analysis. Each source adds a known number to one side of a KCL equation and never adds an unknown.
Why current sources fit nodal analysis
Nodal analysis writes KCL at each non-reference node. Each equation has the form:
(sum of conductance × voltage differences, for currents leaving the node) = (sum of source currents entering the node)
An independent current source is a branch whose current is fixed. It does not depend on the voltage across it. So its current is a known constant in the equation and its terminal voltage is whatever the rest of the circuit demands. That terminal voltage is never an extra unknown, because it is already the difference of two node voltages you are solving for.
Sign convention
Use one convention for every equation:
- Put currents leaving the node through resistors on the left side, as G × (Vnode − Vneighbor).
- Put source currents entering the node on the right side.
- A source that pushes current into the node adds a positive term. A source that pulls current out of the node adds a negative term.
A source arrow does not mean the current "starts" there. It states the direction of the current through the source branch. The source pushes current into the node at the arrowhead and takes it from the node at the tail.
Worked example: one source, three resistors
A 2 A source pushes current into node 1. R1 = 4 Ω runs from node 1 to ground. R2 = 2 Ω runs from node 1 to node 2. R3 = 6 Ω runs from node 2 to ground. The conductances are g1 = 1/4 S, g2 = 1/2 S, and g3 = 1/6 S.
KCL at node 1, currents leaving on the left and the source current entering on the right:
g1·V1 + g2·(V1 − V2) = 2
KCL at node 2, with no source attached:
g2·(V2 − V1) + g3·V2 = 0
Collect terms by unknown:
- (g1 + g2)·V1 − g2·V2 = 2
- −g2·V1 + (g2 + g3)·V2 = 0
Substitute the numbers: 0.75·V1 − 0.5·V2 = 2 and −0.5·V1 + 0.6667·V2 = 0. The second equation gives V2 = 0.75·V1. Substituting into the first gives 0.375·V1 = 2, so V1 = 16/3 V ≈ 5.333 V and V2 = 4 V.
import numpy as np
# A 2 A source feeds node 1.
# R1 = 4 ohm (node 1 to ground), R2 = 2 ohm (node 1 to node 2), R3 = 6 ohm (node 2 to ground).
g1, g2, g3 = 1/4, 1/2, 1/6
G = np.array([[g1 + g2, -g2],
[-g2, g2 + g3]])
i = np.array([2.0, 0.0])
v = np.linalg.solve(G, i)
print(v) # [5.33333333 4. ]Notice the structure of G. The diagonal entry for a node is the sum of all conductances touching it. The off-diagonal entry is the negative of the conductance between the two nodes. The vector i lists the net source current entering each node. The next chapter generalizes this pattern as G v = i.
Where the source sits matters less than you think
Three placements come up often.
| Placement | Effect on the equations |
|---|---|
| Between a node and ground | Adds +I (entering) or −I (leaving) to that node's right-hand side. |
| Between two non-reference nodes | Adds +I to the node it feeds and −I to the node it draws from. |
| In series with a resistor | The resistor drops out of the node equations. |
The third row surprises many learners. A current source forces its branch current regardless of what else is in that branch. A resistor in series with it carries the same fixed current, so it cannot change any node voltage. It only changes the voltage across the branch, which matters only if you later ask for the power of the source. A resistor in parallel with a current source does matter, because it is a separate path between the same two nodes.
Worked example: a source between two nodes
Now put a current source between two non-reference nodes. A 1 A source pushes current from ground into node 1. A 3 A source pushes current from node 1 into node 2. R1 = 2 Ω runs from node 1 to ground, R2 = 4 Ω runs from node 2 to ground, and R3 = 4 Ω runs from node 1 to node 2.
The 3 A source leaves node 1, so it contributes −3 A on the right-hand side of node 1. It enters node 2, so it contributes +3 A there. The 1 A source contributes +1 A at node 1.
- Node 1: (1/2 + 1/4)·V1 − (1/4)·V2 = 1 − 3 = −2
- Node 2: −(1/4)·V1 + (1/4 + 1/4)·V2 = 3
import numpy as np
G = np.array([[0.75, -0.25],
[-0.25, 0.50]])
i = np.array([1.0 - 3.0, 3.0])
v = np.linalg.solve(G, i)
print(np.round(v, 6)) # [-0.8 5.6]So V1 = −0.8 V and V2 = 5.6 V. A negative node voltage is fine. It means node 1 sits below the reference node. The 3 A source pulls current out of node 1 faster than the 1 A source supplies it, so the resistors must supply the difference by letting node 1 sink below ground.
A source between two nodes appears twice in i, once with each sign, and never in G. Those two source terms always sum to zero across the whole vector, because every ampere leaving one node enters another.
The procedure as a flow
Verifying the first example
Use the solution V1 = 16/3 V and V2 = 4 V.
Branch currents:
- Through R1 (node 1 to ground): 5.333 / 4 = 1.333 A
- Through R2 (node 1 to node 2): (5.333 − 4) / 2 = 0.667 A
- Through R3 (node 2 to ground): 4 / 6 = 0.667 A
KCL at node 1: the resistors carry 1.333 + 0.667 = 2 A away, which matches the 2 A source. KCL at node 2: 0.667 A enters through R2 and 0.667 A leaves through R3.
Power balance: the source delivers P = V1 × I = 5.333 × 2 = 10.667 W, because the voltage across the source is V1 relative to ground. The resistors absorb:
- R1: 1.333² × 4 = 7.111 W
- R2: 0.667² × 2 = 0.889 W
- R3: 0.667² × 6 = 2.667 W
The sum is 10.667 W, which equals the delivered power.
Common errors
- Wrong sign on the source term. The most frequent error. Decide "entering or leaving this node" from the arrow for each node separately. A source between two nodes has opposite signs at its two ends.
- Mixing sign conventions between equations. If one equation has currents leaving on the left, every equation must. Mixed conventions produce a G that is not symmetric even though the circuit has only resistors.
- Counting a resistor in series with a source. See the warning above.
- Adding an equation for the reference node. The reference node has voltage 0 by definition. n non-reference nodes give n equations.
- Forgetting that a source between ground and a node still enters only one equation. The ground end has no equation, so the source appears once.
A quick self-check: with only resistors and independent current sources, G must be symmetric, and every diagonal entry must be positive and at least as large as the sum of the absolute values of its row's off-diagonal entries. If your matrix breaks either rule, look for an arithmetic or sign slip.
Exercises
Exercise
A 5 A source pushes current from ground into node 1. A 2 Ω resistor connects node 1 to ground, and a 3 Ω resistor connects node 1 to node 2. A 6 Ω resistor connects node 2 to ground. Write the two nodal equations and find V1 and V2.
Show answer
With g = 1/2, 1/3, 1/6 S: node 1: (1/2 + 1/3)·V1 − (1/3)·V2 = 5, and node 2: −(1/3)·V1 + (1/3 + 1/6)·V2 = 0. The second equation gives V2 = (2/3)·V1. Substituting: (5/6)·V1 − (2/9)·V1 = 5, so (11/18)·V1 = 5 and V1 = 90/11 ≈ 8.18 V. Then V2 = 60/11 ≈ 5.45 V.
Exercise
A 4 A source with arrow pointing from node 2 to node 1 sits between those two nodes. What goes in the right-hand-side vector i for the two nodes from this source alone, and why does it never appear in G?
Show answer
The arrow points toward node 1, so the source pushes 4 A into node 1 and pulls 4 A out of node 2. The contributions are i1 = +4 and i2 = −4. The source current is fixed and does not depend on any node voltage, so it adds no conductance term and only changes the right-hand side.
Exercise
A 2 A source feeds node 1. Between node 1 and ground there is a 5 Ω resistor in parallel with a 1 Ω resistor in series with an extra 10 Ω resistor that is wired in series with the source itself, between the source and node 1. Which resistors affect V1?
Show answer
Only the 5 Ω and 1 Ω resistors affect V1. The 10 Ω resistor in series with the ideal current source carries the fixed 2 A and has no effect on node voltages. Their parallel combination is 5/6 Ω, so V1 = 2 × 5/6 = 1.667 V.