Sub topic 11
Solving multi-loop circuits with mesh currents
This chapter assumes you can write a KVL equation around one loop, apply the passive sign convention, and solve a small system of linear equations. It builds on KCL and Ohm's law.
The idea
A circuit with several loops has more unknowns than one loop equation can handle. Mesh analysis handles this by assigning one unknown current to each mesh. A mesh is a loop with no other loop inside it. You then write one KVL equation per mesh.
Because each mesh current circulates around a closed path, KCL is satisfied automatically at every node. The unknowns are mesh currents, not branch currents. A branch that belongs to two meshes carries the difference of the two mesh currents.
The procedure
- Pick the meshes and draw a clockwise current in each one. Using the same direction everywhere keeps the signs regular.
- Write KVL around each mesh in the direction of its own current.
- For a resistor used by only one mesh, the drop is the resistance times that mesh current.
- For a shared resistor, the drop is the resistance times the difference between your mesh current and the neighbor's current.
- Treat a source as a rise if the loop direction enters at its negative terminal. Otherwise it is a drop.
- Solve the equations, then compute branch currents.
Worked example
Mesh 1 contains a 10 V source, R1 = 2 Ω and a shared R2 = 4 Ω. Mesh 2 contains the shared R2, R3 = 6 Ω and a 4 V source. In the clockwise direction, the 4 V source is a voltage drop.
Mesh 1 gives:
-10 + 2·I1 + 4·(I1 − I2) = 0, so 6·I1 − 4·I2 = 10
Mesh 2 gives:
4·(I2 − I1) + 6·I2 + 4 = 0, so −4·I1 + 10·I2 = −4
Note that R2 appears with opposite signs in the two equations. In mesh 1 its drop is 4(I1 − I2). In mesh 2 the clockwise direction runs through R2 the other way, so its drop is 4(I2 − I1).
import numpy as np
# Two meshes, both with clockwise mesh currents I1 and I2.
# Mesh 1: 10 V source, R1 = 2 ohm, shared R2 = 4 ohm.
# Mesh 2: shared R2 = 4 ohm, R3 = 6 ohm, and a 4 V source that is a
# voltage drop in the clockwise direction.
#
# KVL mesh 1: -10 + 2*I1 + 4*(I1 - I2) = 0 -> 6*I1 - 4*I2 = 10
# KVL mesh 2: 4*(I2 - I1) + 6*I2 + 4 = 0 -> -4*I1 + 10*I2 = -4
A = np.array([[6.0, -4.0],
[-4.0, 10.0]])
b = np.array([10.0, -4.0])
I1, I2 = np.linalg.solve(A, b)
print(f"I1 = {I1:.4f} A, I2 = {I2:.4f} A") # about 1.9091 A and 0.3636 A
print(f"Current in shared R2 = {I1 - I2:.4f} A") # about 1.5455 A
# Residual of each mesh equation should be zero.
print(A @ np.array([I1, I2]) - b)The matrix has a pattern. Each diagonal entry is the total resistance in that mesh (6 = 2 + 4 and 10 = 4 + 6). Each off-diagonal entry is the negative of the shared resistance. This holds when all mesh currents run clockwise. It gives you a quick check on your own setup.
Checking the result
- Substitute the currents back into each mesh equation. The residuals should be near zero.
- Compare branch currents at a node. Here I1 enters the shared branch and I2 opposes it, so the shared branch carries I1 − I2 ≈ 1.5455 A.
- Do a power balance. The power delivered by the sources should equal the power absorbed by the resistors.
Exercise
Mesh 1 has a 9 V source (clockwise rise), R1 = 1 Ω, and a shared resistor Rs = 2 Ω. Mesh 2 has Rs and R3 = 3 Ω, with no source. Both mesh currents are clockwise. Write the two mesh equations and find I1, I2, and the current in Rs.
Show answer
Mesh 1: -9 + 1·I1 + 2(I1 − I2) = 0, so 3·I1 − 2·I2 = 9. Mesh 2: 2(I2 − I1) + 3·I2 = 0, so −2·I1 + 5·I2 = 0. From mesh 2, I2 = 0.4·I1. Substituting gives 2.2·I1 = 9, so I1 ≈ 4.0909 A and I2 ≈ 1.6364 A. The current in Rs is I1 − I2 ≈ 2.4545 A.