Supermeshes, and Choosing Nodal or Mesh
Mesh analysis writes KVL around each mesh, which needs the voltage across every element. A current source has no fixed voltage: like a voltage source's current in nodal analysis, it is whatever the rest of the circuit makes it. This lesson handles current sources in mesh analysis (the supermesh), adds dependent sources, and then answers the practical question every exam and every design review raises: which method should you use for a given circuit?
Current sources in mesh analysis
There are two cases.
A current source in an outer branch belongs to one mesh only, so it simply fixes that mesh current: . One unknown disappears and you skip that mesh's KVL equation.
A current source in a shared branch fixes the difference of two mesh currents, , but its voltage is unknown, so neither mesh's KVL can be written alone. Remove the shared branch in your mind and write KVL around the loop formed by the two meshes together: the supermesh. The current source's voltage never appears, and the constraint supplies the second equation. This is the exact dual of the supernode.
Worked example: a supermesh
Given: (+ at the top), , a current source pointing up in the shared branch, , . Mesh currents clockwise.
Find: , , the voltage across the current source and its power.
Solve: in the middle branch flows down and flows up, so the source fixes . Around the supermesh (outer loop, , mA, V):
The voltage across the source is the top node voltage: . Its current leaves its top terminal (the higher potential), so it delivers .
Check: from the right side, . Power: delivers ; the resistors take .
Dependent sources in mesh analysis
The recipe is the same as in nodal analysis: treat the dependent source as independent while writing KVL, then express its control variable in mesh currents. A current-controlled voltage source is the natural fit: if is a branch current, it is a mesh current or a difference of two, and the term lands in the mesh matrix, usually breaking its symmetry. A dependent current source is handled as a supermesh or a fixed mesh current, with the constraint written in mesh currents.
Choosing a method
Both methods give the same answers. The choice is about how many equations you write and how easily you can write them.
| Count or feature | Nodal analysis | Mesh analysis |
|---|---|---|
| number of equations | minus the number of voltage sources | minus the number of current sources |
| awkward element | floating voltage source (supernode) | current source in a shared branch (supermesh) |
| easy element | current source, grounded voltage source | voltage source, current source in an outer branch |
| works for non-planar circuits | yes | no |
| natural outputs | node voltages (what a scope or DMM measures to ground) | loop currents |
| used by circuit simulators | yes, as MNA | no |
Rules of thumb:
- Count both. Pick the smaller system, especially by hand.
- If you need voltages to ground, nodal gives them directly.
- If the circuit is non-planar (a 3-D cube of resistors, a bridge drawn with crossing wires that cannot be untangled), mesh analysis does not apply.
- For anything large or anything a computer solves, use nodal in its modified form, MNA, which accepts every element type with one rule.
For the supermesh circuit above, nodal analysis needs two unknowns ( and the node between and ); the supermesh needs only one once its constraint is substituted.
In Python: both methods on the same circuit
import numpy as np
# Mesh with a supermesh: unknowns i1, i2 (mA)
A = np.array([[1.0, 2.0 + 2.0], # -10 + i1 + 4 i2 = 0
[-1.0, 1.0]]) # i2 - i1 = 2
i1, i2 = np.linalg.solve(A, [10.0, 2.0])
# Nodal: unknowns v_m, v_b (V); node a fixed at 10 V
G = np.array([[1/1 + 1/2, -1/2],
[-1/2, 1/2 + 1/2]])
vm, vb = np.linalg.solve(G, [10/1 + 2.0, 0.0])
print(f"mesh : i1 = {i1:.3f} mA, i2 = {i2:.3f} mA, v_m = {10 - i1:.3f} V")
print(f"nodal: v_m = {vm:.3f} V, v_b = {vb:.3f} V, i2 = {vb/2:.3f} mA")
# Equation counts for a few circuits: (name, branches, nodes, V sources, I sources)
for name, B, N, nv, ni in [("supermesh example", 5, 4, 1, 1),
("ladder, 1 V source, 6 resistors", 7, 5, 1, 0),
("bridge with 2 current sources", 8, 5, 0, 2)]:
print(f"{name:33s} nodal {N - 1 - nv}, mesh {B - N + 1 - ni}")mesh : i1 = 0.400 mA, i2 = 2.400 mA, v_m = 9.600 V
nodal: v_m = 9.600 V, v_b = 4.800 V, i2 = 2.400 mA
supermesh example nodal 2, mesh 1
ladder, 1 V source, 6 resistors nodal 3, mesh 3
bridge with 2 current sources nodal 4, mesh 2
The counts say the supermesh example needs only one mesh unknown once the constraint is substituted (), which is what we did by hand. Here a "branch" is any two-terminal element, and includes the sources.
Interactive: the supermesh circuit
At the defaults: , , () and (). Raise to and reaches zero: then supplies nothing and exactly. Beyond that, turns negative and the current source pushes current into .
Guided lab: a current source you can build
Hand calculation. A bench supply in constant-current mode is a current source as long as its voltage stays inside its limit. With the hand results are , .
Simulation. The lab above; also try to see the zero crossing of .
What you would measure. Set supply 2 to its constant-current mode at with the voltage limit at (it must exceed ), and supply 1 to with a limit. Measure () and the voltage across (, so ). The uncertainty of the low-current setting dominates: many general-purpose supplies set and display current only to the nearest milliampere or so, so check with a DMM in series, or use a shunt and read across it.
Hazards and safe setup. Low voltage (at most 15 V compliance), current-limited. Never open-circuit a supply in constant-current mode with a high voltage limit: its output jumps to that limit. Do not push above on the bench, where supply 1 would have to sink current.
Pitfalls
- Writing KVL through a current source. Its voltage is unknown; go around it with a supermesh.
- Forgetting the constraint. A supermesh equation alone has two unknowns.
- Sign of the constraint. Write which way each mesh current passes through the source before writing .
- Counting only resistors as branches. Sources are branches too.
- Mesh analysis on a non-planar circuit. The "windows" are no longer independent loops.
Practice
- In the worked example, turn around (pointing down). Find and .
- A current source of sits on the outer right branch of mesh 2 (clockwise direction). What is , and how many equations remain for a three-mesh circuit?
- A circuit has 6 nodes, 10 branches, 2 voltage sources (one grounded, one floating) and 1 current source in a shared branch. Count the equations for each method.
Answer
- Now : , ; .
- directly; two KVL equations remain (meshes 1 and 3).
- Nodal: unknowns (the floating source makes a supernode, which still removes one unknown). Mesh: . Nodal is smaller.
Test yourself
A current source sits in a branch shared by meshes 1 and 2. What do you do?
- write KVL for mesh 1 using the source's voltage
- form a supermesh around both meshes and add the constraint
- remove the source
- convert every resistor to a conductance
A current source in an outer branch of mesh 3 only…
- fixes directly
- requires a supernode
- makes mesh analysis impossible
- doubles the number of equations
Which circuits cannot be analysed with mesh currents?
- circuits with dependent sources
- circuits with current sources
- non-planar circuits
- circuits with more than four meshes
A circuit has 8 nodes, 12 branches and 4 voltage sources, all with one terminal on the reference node, and no current sources. Which method needs fewer equations?
- nodal: 3 unknowns
- mesh: 3 unknowns
- they need the same number
- nodal: 7 unknowns