TExcelTAD
Home › Circuit Theory & Network Analysis › Supermeshes, and Choosing Nodal or Mesh

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: ip=±Isi_p = \pm I_s. 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, iq−ip=Isi_q - i_p = I_s, 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.

+ - V1 10 V R1 1 kOhm IS 2 mA R2 2 kOhm R3 2 kOhm m b i1 i2 supermesh: KVL around the outer loop, plus i2 - i1 = IS

Worked example: a supermesh

Given: V1=10 VV_1 = 10\ \text{V} (+ at the top), R1=1 kΩR_1 = 1\ \text{k}\Omega, a current source IS=2 mAI_S = 2\ \text{mA} pointing up in the shared branch, R2=2 kΩR_2 = 2\ \text{k}\Omega, R3=2 kΩR_3 = 2\ \text{k}\Omega. Mesh currents clockwise.

Find: i1i_1, i2i_2, the voltage vmv_m across the current source and its power.

Solve: in the middle branch i1i_1 flows down and i2i_2 flows up, so the source fixes i2−i1=2 mAi_2 - i_1 = 2\ \text{mA}. Around the supermesh (outer loop, kΩ\text{k}\Omega, mA, V):

−10+1⋅i1+2i2+2i2=0KVL, supermeshi2−i1=2current sourcei1+4(i1+2)=10  ⇒  i1=0.4 mA,i2=2.4 mA\begin{aligned} -10 + 1 \cdot i_1 + 2 i_2 + 2 i_2 &= 0 && \text{KVL, supermesh} \\ i_2 - i_1 &= 2 && \text{current source} \\ i_1 + 4 (i_1 + 2) &= 10 \;\Rightarrow\; i_1 = 0.4\ \text{mA}, \quad i_2 = 2.4\ \text{mA} \end{aligned}

The voltage across the source is the top node voltage: vm=10−1⋅0.4=9.6 Vv_m = 10 - 1 \cdot 0.4 = 9.6\ \text{V}. Its current leaves its top terminal (the higher potential), so it delivers 9.6 V⋅2 mA=19.2 mW9.6\ \text{V} \cdot 2\ \text{mA} = 19.2\ \text{mW}.

Check: from the right side, vm=(2+2) kΩ⋅2.4 mA=9.6 Vv_m = (2 + 2)\ \text{k}\Omega \cdot 2.4\ \text{mA} = 9.6\ \text{V}. Power: V1V_1 delivers 10⋅0.4=4 mW10 \cdot 0.4 = 4\ \text{mW}; the resistors take 1⋅0.42+4⋅2.42=0.16+23.04=23.2 mW=4+19.21 \cdot 0.4^2 + 4 \cdot 2.4^2 = 0.16 + 23.04 = 23.2\ \text{mW} = 4 + 19.2.

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 rmixr_m i_x is the natural fit: if ixi_x is a branch current, it is a mesh current or a difference of two, and the term rmixr_m i_x 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 N−1N - 1 minus the number of voltage sources B−N+1B - N + 1 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:

  1. Count both. Pick the smaller system, especially by hand.
  2. If you need voltages to ground, nodal gives them directly.
  3. 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.
  4. 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 (vmv_m and the node bb between R2R_2 and R3R_3); the supermesh needs only one once its constraint is substituted.

In Python: both methods on the same circuit

python · try it yourself
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 (i2=i1+2i_2 = i_1 + 2), which is what we did by hand. Here a "branch" is any two-terminal element, and BB includes the sources.

Interactive: the supermesh circuit

node voltages (to ground 0)a10.00 Vm9.600 Vb4.800 VnetlistV1 a 0 DC 10R1 a m 1kIS 0 m DC 2mR2 m b 2kR3 b 0 2kelement currents (node 1 to node 2 through it)V1a>0-400 uAR1a>m400 uAIS0>m2.00 mAR2m>b2.40 mAR3b>02.40 mA

At the defaults: vm=9.6 Vv_m = 9.6\ \text{V}, vb=4.8 Vv_b = 4.8\ \text{V}, I(R1)=0.4 mAI(R_1) = 0.4\ \text{mA} (=i1= i_1) and I(R2)=2.4 mAI(R_2) = 2.4\ \text{mA} (=i2= i_2). Raise ISI_S to 2.5 mA2.5\ \text{mA} and i1i_1 reaches zero: then V1V_1 supplies nothing and vm=10 Vv_m = 10\ \text{V} exactly. Beyond that, i1i_1 turns negative and the current source pushes current into V1V_1.

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 IS=2.00 mAI_S = 2.00\ \text{mA} the hand results are i1=0.40 mAi_1 = 0.40\ \text{mA}, vm=9.60 Vv_m = 9.60\ \text{V}.

Simulation. The lab above; also try IS=2.5 mAI_S = 2.5\ \text{mA} to see the zero crossing of i1i_1.

What you would measure. Set supply 2 to its constant-current mode at 2.00 mA2.00\ \text{mA} with the voltage limit at 15 V15\ \text{V} (it must exceed 9.6 V9.6\ \text{V}), and supply 1 to 10.00 V10.00\ \text{V} with a 20 mA20\ \text{mA} limit. Measure vmv_m (9.60±0.05 V9.60 \pm 0.05\ \text{V}) and the voltage across R1R_1 (0.40±0.03 V0.40 \pm 0.03\ \text{V}, so i1=0.40 mAi_1 = 0.40\ \text{mA}). 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 ISI_S with a DMM in series, or use a 1 kΩ1\ \text{k}\Omega shunt and read 2.00 V2.00\ \text{V} 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 ISI_S above 2.5 mA2.5\ \text{mA} 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 iq−ip=Isi_q - i_p = I_s.
  • Counting only resistors as branches. Sources are branches too.
  • Mesh analysis on a non-planar circuit. The "windows" are no longer independent loops.

Practice

  1. In the worked example, turn ISI_S around (pointing down). Find i1i_1 and i2i_2.
  2. A current source of 3 mA3\ \text{mA} sits on the outer right branch of mesh 2 (clockwise direction). What is i2i_2, and how many equations remain for a three-mesh circuit?
  3. 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
  1. Now i1−i2=2i_1 - i_2 = 2: i1+4(i1−2)=10⇒i1=3.6 mAi_1 + 4(i_1 - 2) = 10 \Rightarrow i_1 = 3.6\ \text{mA}, i2=1.6 mAi_2 = 1.6\ \text{mA}; vm=10−3.6=6.4 V=4⋅1.6v_m = 10 - 3.6 = 6.4\ \text{V} = 4 \cdot 1.6.
  2. i2=3 mAi_2 = 3\ \text{mA} directly; two KVL equations remain (meshes 1 and 3).
  3. Nodal: 6−1−2=36 - 1 - 2 = 3 unknowns (the floating source makes a supernode, which still removes one unknown). Mesh: 10−6+1−1=410 - 6 + 1 - 1 = 4. Nodal is smaller.

Test yourself

A current source sits in a branch shared by meshes 1 and 2. What do you do?

  1. write KVL for mesh 1 using the source's voltage
  2. form a supermesh around both meshes and add the constraint i2−i1=±Isi_2 - i_1 = \pm I_s
  3. remove the source
  4. convert every resistor to a conductance

A current source in an outer branch of mesh 3 only…

  1. fixes i3i_3 directly
  2. requires a supernode
  3. makes mesh analysis impossible
  4. doubles the number of equations

Which circuits cannot be analysed with mesh currents?

  1. circuits with dependent sources
  2. circuits with current sources
  3. non-planar circuits
  4. 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?

  1. nodal: 3 unknowns
  2. mesh: 3 unknowns
  3. they need the same number
  4. nodal: 7 unknowns