Sub topic 10
Recovering Branch Currents and Voltages
Why this step matters
Solving the mesh equations gives you one number per mesh. A mesh current is an auxiliary quantity: it circulates around a loop, and often no single wire carries exactly that current. The quantities you usually want are branch currents (how much current flows through each element) and branch voltages (how much voltage appears across each element).
This chapter assumes you can already write and solve mesh equations in matrix form. It shows how to turn the solution vector into physical quantities and how to catch sign errors before they spread into later calculations.
The core rule
A branch is a path between two nodes that contains one element, or several elements in series with no node between them. Every branch belongs to either one mesh or two meshes.
- A branch on the outer boundary belongs to one mesh. Its branch current equals that mesh current, with a sign.
- A branch shared by two meshes carries the superposition of both mesh currents. If mesh currents
i_aandi_bpass through it, the branch current isi_a - i_bwhen the reference direction is that ofi_a, andi_b - i_awhen it is that ofi_b.
The sign comes from direction. If a mesh current runs in the direction you call positive for the branch, add it. If it runs against that direction, subtract it.
| Branch location | Meshes involved | Branch current (reference = mesh k direction) |
|---|---|---|
| Outer edge of mesh k | k only | `i_k` |
| Shared by meshes j and k | j and k | `i_k - i_j` |
| Shared, both clockwise | j and k | The two currents always oppose in the shared branch, so the difference is correct |
When every mesh current is clockwise, any shared branch sees the two currents in opposite directions. That is why the off-diagonal terms of the resistance matrix are negative, and why shared-branch currents are always differences.
Worked example: a two-mesh circuit
Use the circuit from the matrix chapter. Both mesh currents are clockwise. Mesh 1 contains V1 = 10 V, R1 = 2 Ω and the shared resistor R2 = 4 Ω. Mesh 2 contains R2, R3 = 6 Ω and V2 = 5 V, which opposes clockwise current. The mesh equations are:
6 i1 - 4 i2 = 10
-4 i1 + 10 i2 = -5The solution is i1 = 80/44 ≈ 1.8182 A and i2 = 10/44 ≈ 0.2273 A.
Step 1: branch currents
Place R2 vertically between the two meshes. Clockwise i1 runs downward through it, because mesh 1 is on the left. Clockwise i2 runs upward through it. Choose "downward" as the reference direction for R2:
I_R1 = i1 = 1.8182 AI_R2 = i1 - i2 = 1.5909 A(downward)I_R3 = i2 = 0.2273 A
All three values are positive, so each current flows in the direction of the reference arrow. A negative result is not an error. It means the actual current flows opposite to your reference arrow.
Step 2: branch voltages with the passive sign convention
For a resistor, the passive sign convention says the current enters the terminal you label +. With that convention, Ohm's law gives v = R·I with no extra sign. Always pair a voltage with the current reference that enters its positive terminal.
v_R1 = 2 × 1.8182 = 3.6364 Vv_R2 = 4 × 1.5909 = 6.3636 V(top positive, since the reference current flows downward)v_R3 = 6 × 0.2273 = 1.3636 V
If you reverse the current reference for a resistor, you must also reverse the voltage polarity. Changing only one of the two flips the sign of the result.
Step 3: voltage sources
A voltage source has a known voltage but an unknown current. The current in the source branch is the mesh current through it (or a difference, if the source is on a shared branch).
V1carriesi1 = 1.8182 A. The current leaves the positive terminal in the direction of the mesh current, soV1delivers10 × 1.8182 = 18.182 W.V2carriesi2 = 0.2273 A. The clockwise current enters its positive terminal, becauseV2opposes the mesh current.V2therefore absorbs5 × 0.2273 = 1.136 W, like a battery being charged.
Whether a source delivers or absorbs power depends on the direction of the current relative to its polarity. It does not depend on how you label the source.
Step 4: verify with KVL on a mesh you did not solve directly
Check mesh 2 using the recovered branch voltages. Going clockwise, the mesh 2 current through R2 is i2 - i1 = -1.5909 A, so the drop across R2 in that direction is 4 × (-1.5909) = -6.3636 V. The sum of rises minus drops is:
-5 - (-6.3636) - 1.3636 = 0The result is zero, so the recovered values satisfy KVL in mesh 2.
Computing branch quantities in code
The script below solves the system and then recovers every branch current, every resistor voltage, and a KVL residual for each mesh. Residuals near zero confirm the recovered values are consistent.
import numpy as np
R1, R2, R3 = 2.0, 4.0, 6.0
V1, V2 = 10.0, 5.0
R = np.array([[R1 + R2, -R2],
[-R2, R2 + R3]])
v = np.array([V1, -V2])
i1, i2 = np.linalg.solve(R, v)
# Branch currents. R2 reference direction is the direction of i1.
I = {"R1": i1, "R2": i1 - i2, "R3": i2, "V1": i1, "V2": i2}
# Resistor voltages, passive sign convention (current enters the + terminal).
volt = {"R1": R1 * I["R1"], "R2": R2 * I["R2"], "R3": R3 * I["R3"]}
for name, val in I.items():
print(f"I_{name} = {val:.4f} A")
for name, val in volt.items():
print(f"v_{name} = {val:.4f} V")
# KVL residuals: rises minus drops around each clockwise mesh.
res1 = V1 - volt["R1"] - volt["R2"]
res2 = -V2 + volt["R2"] - volt["R3"]
print(f"KVL residual mesh 1 = {res1:.2e}")
print(f"KVL residual mesh 2 = {res2:.2e}")In mesh 2 the clockwise direction passes R2 upward, against the reference direction of I_R2. The code adds +volt["R2"] for that reason. This is the point where sign mistakes most often occur.
Branches that contain current sources
A current source fixes its branch current, so the branch current is known immediately. The unknown is the voltage across it, and mesh currents do not give that directly. Find it by writing KVL around any mesh that contains the source, with the source voltage as an unknown.
Take the supermesh example. A 12 V source and R1 = 2 Ω are in mesh 1, R3 = 4 Ω is in mesh 2, and a 3 A current source is in the shared branch. The solution is i1 = 4 A and i2 = 1 A. The shared branch carries i1 - i2 = 3 A, which matches the source and confirms the constraint equation.
To find the voltage v_cs across the source, take its drop in the direction of i1, which is downward through the shared branch. Apply KVL to mesh 1:
12 - 2(4) - v_cs = 0 → v_cs = 4 VCheck with mesh 2. Its clockwise path goes upward through the shared branch, so the drop is -4 V. Then -4 + 4(1) = 0, so KVL holds. The current source has 3 A flowing in the direction of its voltage drop, so it absorbs 4 × 3 = 12 W.
From branch voltages to node voltages
Mesh analysis never produces node voltages directly. To get one, pick a reference node (ground), then add branch voltages along any path from ground to the node. Each term takes a plus sign if you move from the negative to the positive terminal, and a minus sign otherwise. Every path gives the same answer if the solution is correct, so a second path is a free check.
Common errors
- Adding when you should subtract. In a shared branch with both meshes clockwise, the currents oppose each other. Adding them gives the wrong magnitude and sometimes the wrong direction.
- Mixing references. Computing
v = R·Iwith a current whose arrow points away from the+terminal. Fix this by drawing the polarity next to the arrow every time. - Reading mesh current as source current. This is correct only when the source is on the outer edge of one mesh. On a shared branch, use the difference.
- Forgetting that negative values are valid. A negative branch current means only that the physical direction is opposite to your arrow. Do not flip the arrow after the fact without flipping the voltage polarity as well.
- Rounding too early. Carry at least four significant digits until the final check, or KVL residuals will not look like zero.
Exercises
Exercise
A two-mesh circuit has both mesh currents clockwise, with i1 = 3 A and i2 = 5 A. The shared resistor is 2 Ω. Taking the reference direction of i1 through the shared resistor, what are the branch current and the voltage across the resistor (with the + terminal where the reference current enters)?
Show answer
The branch current is i1 - i2 = 3 - 5 = -2 A. The voltage is v = R·I = 2 × (-2) = -4 V. The negative signs mean the actual current flows opposite to the i1 direction, at 2 A, and the terminal marked + is actually 4 V lower than the other terminal.
Exercise
In the worked example, show that the total power absorbed by the three resistors equals the net power from the two sources, using exact fractions of 1/44.
Show answer
i1 = 80/44 A, i2 = 10/44 A, and i1 - i2 = 70/44 A. Resistor power: 2(80/44)² + 4(70/44)² + 6(10/44)² = (12800 + 19600 + 600)/1936 = 33000/1936 ≈ 17.045 W. Source power: V1·i1 - V2·i2 = 10(80/44) - 5(10/44) = (800 - 50)/44 = 750/44 ≈ 17.045 W. The two totals agree.