Sub topic 11
Current sources and the supermesh
This chapter assumes you can write KVL mesh equations with a consistent sign convention, build the resistance matrix, and solve a small linear system. Those skills are covered in the earlier chapters. Here you will handle a case that breaks the standard procedure: a current source in a mesh.
Why a current source causes trouble
A mesh equation is KVL: the sum of voltage rises and drops around a loop equals zero. For a resistor, the drop is R times the mesh current, so it is easy to write. For a voltage source, the voltage is given.
An ideal current source fixes the current in its branch, but its voltage is unknown. That voltage depends on the rest of the circuit. If you try to write KVL through a current source, you have to add an unknown voltage v_cs to the equation. This adds an unknown without adding an equation.
There are two cases, and they have different fixes.
| Where the current source sits | What it does | Fix |
|---|---|---|
| In only one mesh (an outer branch) | Sets that mesh current directly | Set the mesh current equal to ±the source value, and skip KVL for that mesh |
| In a branch shared by two meshes | Sets the difference of the two mesh currents | Form a supermesh |
Case 1: current source in an outer branch
Suppose a 2 A source is in a branch that belongs to mesh 1 only, and its arrow points in the same direction as the clockwise mesh current. Then the current through that branch is i1, so:
i1 = 2 AIf the arrow points against the mesh current direction, then i1 = -2 A. This equation replaces the KVL equation for mesh 1. You never need v_cs. The remaining meshes get ordinary KVL equations, with i1 treated as a known value.
You can still find the voltage across the source afterward. Write KVL for mesh 1 and solve for v_cs.
Case 2: current source in a shared branch
When the source is between two meshes, the mesh currents are linked but not individually fixed. The branch carries i1 - i2 in the direction of mesh 1 (when both meshes are clockwise). If the source is I_s and its arrow points in the mesh 1 direction in that branch, then:
i1 - i2 = I_sThis is the constraint equation. It gives one equation for two unknowns. You still need a second equation, and it comes from the supermesh.
What a supermesh is
A supermesh is the larger loop you get by merging the two meshes and deleting the shared branch that holds the current source. You write one KVL equation around the outer boundary of the merged loop. The current source branch is not on that boundary, so v_cs never appears.
The procedure gives two equations from two meshes:
- One KVL equation around the supermesh boundary.
- One constraint equation from the current source.
Together they replace the two ordinary mesh equations.
Worked example
Take a circuit with two meshes side by side, both mesh currents clockwise.
- Mesh 1 is on the left. Its left branch holds a 12 V source that raises voltage in the clockwise direction. Its top branch holds R1 = 2 Ω.
- Mesh 2 is on the right. Its right branch holds R3 = 4 Ω.
- The middle branch is shared and holds a 3 A current source. Its arrow points downward, which is the direction of
i1in that branch.
Step 1: constraint equation
In the middle branch, i1 flows down and i2 flows up (because mesh 2 is clockwise). The net downward current is i1 - i2, and it must equal the source value:
i1 - i2 = 3Step 2: supermesh KVL
Go clockwise around the outer boundary, which skips the middle branch. The voltage source gives a rise of 12 V. The resistors give drops of 2*i1 and 4*i2:
12 - 2*i1 - 4*i2 = 0
2*i1 + 4*i2 = 12Step 3: solve
Substitute i1 = 3 + i2:
2*(3 + i2) + 4*i2 = 12
6 + 6*i2 = 12
i2 = 1 A
i1 = 4 AStep 4: find the source voltage
The source voltage was never needed, but you can recover it now. Let v be the voltage drop across the source in the direction of its current (downward). KVL for mesh 1, clockwise:
12 - 2*i1 - v = 0
v = 12 - 2*4 = 4 VCheck with mesh 2. Going clockwise, the middle branch is traversed upward, so the drop in that direction is -v:
-4*i2 + v = 0 (after moving the rise to the other side)With i2 = 1, -4 + 4 = 0, so both meshes agree on v = 4 V.
Step 5: power check
The 12 V source delivers 12 * 4 = 48 W. The resistors absorb 2*4² + 4*1² = 32 + 4 = 36 W. The current source has 4 V across it with 3 A entering its positive terminal, so it absorbs 4 * 3 = 12 W. Absorbed power is 36 + 12 = 48 W, which equals the delivered power.
Here is the same calculation in code:
import numpy as np
# Supermesh example, both mesh currents clockwise.
# Mesh 1: 12 V source and R1 = 2 ohm. Mesh 2: R3 = 4 ohm.
# A 3 A current source sits in the branch shared by the two meshes.
# Equation 1 (supermesh KVL around the outer loop): 2*i1 + 4*i2 = 12
# Equation 2 (current-source constraint): i1 - i2 = 3
A = np.array([[2.0, 4.0],
[1.0, -1.0]])
b = np.array([12.0, 3.0])
i1, i2 = np.linalg.solve(A, b)
print(f"i1 = {i1:.1f} A, i2 = {i2:.1f} A")
# Recover the unknown voltage across the current source from mesh 1 KVL.
v_cs = 12.0 - 2.0 * i1
print(f"v_cs = {v_cs:.1f} V")
# Power balance.
p_delivered = 12.0 * i1
p_resistors = 2.0 * i1**2 + 4.0 * i2**2
p_cs = v_cs * 3.0
print(f"Delivered {p_delivered:.1f} W, absorbed {p_resistors + p_cs:.1f} W")Edge cases and common errors
A resistor in series with the current source
Suppose the shared branch holds a current source in series with a 5 Ω resistor. The supermesh boundary still skips the whole branch, so the 5 Ω resistor does not appear in the supermesh equation. The constraint equation is unchanged, because the same current flows through both elements. The resistor affects only the voltage across the branch, not the mesh currents.
This surprises many learners. A series resistor with a current source never changes the mesh currents, so you can ignore it while solving and use it only when you compute individual voltages.
A resistor in parallel with the current source
A resistor in parallel with an ideal current source is a separate branch. If it is in the shared position, it becomes part of the boundary, and you keep it in the KVL equation. The cleaner approach is to treat the current source and the parallel resistor as two parallel branches. This gives three meshes if the resistor forms its own loop with the source branch.
Direction of the constraint
The sign of the constraint depends on the arrow direction. Check it every time.
- If the arrow points in the direction of
i1in the shared branch, theni1 - i2 = I_s. - If it points the other way, then
i1 - i2 = -I_s, which is the same asi2 - i1 = I_s.
A wrong sign here gives currents that look reasonable but fail the power check.
Current source on the outer boundary of a supermesh
Sometimes a mesh has a current source in an outer branch and also shares a different branch with a neighbor. Apply the outer-branch rule first. That mesh current is then known, and the neighbor gets an ordinary KVL equation.
Counting equations
Each current source removes one unknown from the voltage side. The count stays balanced:
- A mesh with an outer current source loses its KVL equation and gains a direct equation.
- A pair of meshes with a shared current source loses two KVL equations and gains one supermesh KVL and one constraint.
If your system has more unknowns than equations, you probably wrote KVL through a source without a known voltage.
Summary of the procedure
- Mark the mesh currents, all clockwise.
- For each current source, decide if it is in one mesh or two.
- For an outer source, set the mesh current to ±
I_s. - For a shared source, write the constraint equation and one supermesh KVL equation around the merged boundary.
- Write ordinary KVL for any remaining meshes.
- Solve, then recover source voltages and check power.
Exercise
A circuit has two clockwise meshes. Mesh 1 contains a 20 V source (rising in the clockwise direction) and R1 = 5 Ω. Mesh 2 contains R3 = 3 Ω. A 2 A current source sits in the shared branch, with its arrow pointing in the direction of i1 in that branch. Find i1 and i2, and the voltage across the current source in the direction of its arrow.
Show answer
The constraint is i1 - i2 = 2. The supermesh KVL is 20 = 5i1 + 3i2. Substitute i1 = 2 + i2: 20 = 10 + 5i2 + 3i2, so 8i2 = 10 and i2 = 1.25 A. Then i1 = 3.25 A. For the source voltage, use mesh 1: 20 - 53.25 - v = 0, so v = 3.75 V. Check with mesh 2: v = 3i2 = 3.75 V. Power: the source delivers 203.25 = 65 W. The resistors absorb 53.25² + 31.25² = 52.8125 + 4.6875 = 57.5 W, and the current source absorbs 3.75*2 = 7.5 W, giving 65 W.
Exercise
In the same circuit as the previous exercise, a 4 Ω resistor is added in series with the current source in the shared branch. How do i1 and i2 change, and what is the new voltage across the whole shared branch?
Show answer
The mesh currents do not change: i1 = 3.25 A and i2 = 1.25 A, because the supermesh boundary skips the shared branch and the constraint is unchanged. The branch voltage changes. The 4 Ω resistor drops 42 = 8 V in the direction of the current, so the voltage across the whole branch (source plus resistor) is 3.75 + 8 = 11.75 V, and the current source's own voltage stays at 3.75 V if the 20 V source circuit is adjusted accordingly. Strictly, the loop KVL for mesh 1 now gives 20 - 5i1 - 11.75 = 0 only if i1 is 1.65 A, which contradicts the constraint. So the original circuit values no longer fit, and the current-source voltage must adjust: from mesh 1, 20 - 16.25 - (v + 8) = 0, so v = -4.25 V. The resistor never changes the mesh currents, but it does change the voltage the current source must supply.