Sub topic 14
Nodal Versus Mesh Analysis
This chapter assumes you can write nodal equations in the form G v = i, including supernodes. It also assumes you know the mesh-current method (KVL around each loop) well enough to write one equation per mesh. Both methods give the same answers, so the choice is about effort and about which method suits the circuit and the tool you are using.
Count the Unknowns
Pick the method that leaves fewer simultaneous equations to solve. Count the unknowns before writing anything.
- Nodal: one unknown per node, minus the reference node, minus one for each voltage source tied to ground. A floating voltage source merges two nodes into a supernode. This removes one unknown but adds one constraint equation.
- Mesh: one unknown per mesh. For a planar circuit with b branches and n nodes, there are b - n + 1 meshes. A current source that lies in only one mesh fixes that mesh current. A current source shared by two meshes needs a supermesh.
| Circuit feature | Nodal analysis | Mesh analysis |
|---|---|---|
| Current source | Direct entry in the i vector | Fixes a mesh current, or forces a supermesh |
| Voltage source to ground | Fixes a node voltage | Direct entry in the KVL equation |
| Floating voltage source | Supernode | Direct entry in the KVL equation |
| Non-planar wiring | Works | Not defined |
| Programmatic setup | Simple stamping rule | Needs loop detection |
Worked Comparison
Use the ladder circuit from earlier in this tutorial. A 2 A source feeds node 1. R1 = 4 Ω runs from node 1 to ground, R2 = 2 Ω from node 1 to node 2, and R3 = 6 Ω from node 2 to ground.
The circuit has 3 nodes and 4 branches (the source and three resistors).
- Nodal: 3 - 1 = 2 unknowns, V1 and V2.
- Mesh: 4 - 3 + 1 = 2 meshes. Mesh 1 contains the source and R1. Mesh 2 contains R1, R2, and R3.
The source lies only in mesh 1, so I1 = 2 A is already known. One unknown remains, the mesh 2 current I2. KVL around mesh 2 gives:
2·I2 + 6·I2 + 4·(I2 - I1) = 0
so 12·I2 = 8 and I2 = 2/3 A. Then V2 = 6 · (2/3) = 4 V, which matches the nodal result. Mesh analysis needed one equation here and nodal needed two.
Reverse the situation by replacing the current source with a 10 V source from node 1 to ground. Nodal analysis then needs only one equation, at node 2. Mesh analysis still has two meshes and two unknowns, because a voltage source does not fix any mesh current.
A Quick Counting Script
This script applies the counting rules above. The function arguments are simple counts you read off the schematic.
def nodal_unknowns(nodes, grounded_vsources, floating_vsources):
# Supernodes remove one unknown each but add a constraint,
# so the system size is still nodes - 1 - sources of either kind.
return nodes - 1 - grounded_vsources - floating_vsources
def mesh_unknowns(branches, nodes, single_mesh_isources):
return branches - nodes + 1 - single_mesh_isources
# Ladder circuit with a 2 A source in one mesh only.
print(nodal_unknowns(3, 0, 0)) # 2
print(mesh_unknowns(4, 3, 1)) # 1Decision Rules
Common errors when choosing or switching methods:
- Counting every node as an unknown. The reference node is always known.
- Forgetting that a shared current source in mesh analysis costs a supermesh, which is as much work as a supernode.
- Applying mesh analysis to a circuit whose wires cross without connecting. Mesh currents are not defined there.
- Mixing the two methods in one set of equations. Finish one method, then use the other only as a check.
Exercise
A planar circuit has 5 nodes, 8 branches, and one voltage source connected from a node to ground. It has no current sources. Which method gives fewer unknowns, and how many does each have?
Show answer
Nodal: 5 - 1 - 1 = 3 unknowns. Mesh: 8 - 5 + 1 = 4 unknowns, because the voltage source fixes no mesh current. Nodal analysis is the better choice.
Exercise
A circuit has 4 nodes and 6 branches, two of which are current sources. Each current source lies in only one mesh, and they lie in different meshes. How many mesh unknowns remain?
Show answer
There are 6 - 4 + 1 = 3 meshes. Each current source fixes one mesh current, so 3 - 2 = 1 unknown remains.