Mesh and nodal analysis

Systematic nodal and mesh analysis, supernodes and supermeshes, dependent sources and the matrix-by-inspection method.

Drafted with Aria, reviewed by the AiCanCode.org team. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Real instrumentation circuits such as bridge networks, ladder attenuators, filter sections and transistor small-signal models are too tangled for series–parallel reduction. Mesh and nodal analysis turn any linear circuit into a set of simultaneous equations that you can write mechanically and solve by hand or by matrix. Circuit simulators like SPICE are built on (modified) nodal analysis.

Key ideas

Nodal analysis (KCL-based).

  1. Pick a reference node (ground), usually the node with the most connections.
  2. Assign voltages V1, V2, … to the remaining n − 1 nodes. Each is measured with respect to ground.
  3. At each non-reference node, write KCL with every branch current expressed through the node voltages. For example, the current leaving node 1 through R to node 2 is (V1 − V2)/R.
  4. Solve the n − 1 equations.

Nodal analysis works for planar and non-planar circuits. It is the natural choice when the circuit has current sources and few nodes.

Supernode. When an ideal voltage source sits between two non-reference nodes, you cannot write its current through Ohm's law. Enclose the source and its two nodes in a closed surface (the supernode). Write one KCL for the whole surface, plus the constraint Va − Vb = Vs. If the source connects a node to ground, that node voltage is simply known.

Mesh analysis (KVL-based).

  1. The circuit must be planar, that is, drawable with no crossing wires.
  2. Assign a clockwise mesh current to each of the b − n + 1 meshes.
  3. Around each mesh, write KVL. A resistor shared by meshes j and k carries Ij − Ik (as seen from mesh j).
  4. Solve.

Mesh analysis is the natural choice when the circuit has voltage sources and few meshes.

Supermesh. A current source shared by two meshes has an unknown voltage across it. Remove it mentally, write KVL around the larger loop formed by the two meshes, and add the constraint Ij − Ik = Is with the correct sign. A current source on the outer boundary of one mesh fixes that mesh current directly.

Dependent sources. Write the equations treating the dependent source like an independent one. Then express its controlling variable in terms of the node voltages or mesh currents. With dependent sources the coefficient matrix is no longer symmetric.

Inspection (matrix) form. For circuits with only resistors and independent sources:

  • Nodal form is [G][V] = [I]. The diagonal entry G_kk is the sum of conductances at node k. The off-diagonal entry G_jk is minus the conductance between nodes j and k. I_k is the source current injected into node k.
  • Mesh form is [R][I] = [V]. R_kk is the total resistance around mesh k. R_jk is minus the shared resistance (with all meshes clockwise). V_k is the net source rise in mesh k along the mesh direction.

Choosing the method. Count the equations. Nodal needs n − 1 minus the number of voltage sources. Mesh needs b − n + 1 minus the number of current sources. Choose the smaller set.

Formulas

  • Branch current from node voltages: I_jk = (Vj − Vk)/R, in A, with V in V and R in Ω.
  • Nodal equations: [G][V] = [I], with G in S (siemens).
  • Mesh equations: [R][I] = [V], with R in Ω.
  • Number of nodal equations: n − 1. Number of mesh equations: b − n + 1 (planar circuits only).
  • Supernode constraint: Va − Vb = Vs. Supermesh constraint: Ij − Ik = Is.
  • Cramer's rule for two unknowns: x1 = (b1·a22 − b2·a12)/(a11·a22 − a12·a21)

Worked examples

Example 1 (standard): two-mesh circuit. Given: mesh 1 has a 12 V source (driving the clockwise mesh current I1) and 2 Ω. Mesh 2 has 6 Ω and a 6 V source whose polarity opposes the clockwise current I2. A 4 Ω resistor is shared by both meshes. Find the current in the 4 Ω resistor.

  1. Mesh 1, KVL: 12 = 2·I1 + 4·(I1 − I2), so 6·I1 − 4·I2 = 12.
  2. Mesh 2, KVL: −6 = 6·I2 + 4·(I2 − I1), so −4·I1 + 10·I2 = −6.
  3. The determinant is Δ = 6·10 − (−4)(−4) = 44.
  4. I1 = (12·10 − (−6)(−4))/44 = 96/44 = 2.182 A.
  5. I2 = (6·(−6) − (−4)·12)/44 = 12/44 = 0.273 A.
  6. The current in the 4 Ω resistor is I1 − I2 = 84/44 = 1.909 A, flowing in the direction of I1.

Answer: 1.91 A through the 4 Ω resistor.

Example 2 (GATE level): nodal analysis with a dependent source. Given:

  • Node 1 connects to a 10 V source through 2 Ω, to ground through 4 Ω, and to node 2 through 2 Ω.
  • Node 2 connects to ground through 4 Ω.
  • A current-controlled current source injects 2·ix into node 2, where ix is the downward current in the 4 Ω resistor at node 1.

Find V1 and V2.

  1. Controlling variable: ix = V1/4.
  2. KCL at node 1 (currents leaving): (V1 − 10)/2 + V1/4 + (V1 − V2)/2 = 0, so 1.25·V1 − 0.5·V2 = 5.
  3. KCL at node 2: (V2 − V1)/2 + V2/4 = 2·(V1/4), so −1.0·V1 + 0.75·V2 = 0.
  4. From step 3, V2 = V1/0.75 = 1.333·V1.
  5. Substitute into step 2: 1.25·V1 − 0.667·V1 = 5, so V1 = 5/0.5833 = 8.571 V.
  6. Then V2 = 11.43 V.
  7. Check at node 2: the left side is (11.43 − 8.571)/2 + 11.43/4 = 1.429 + 2.857 = 4.286 A. The right side is 2·(8.571/4) = 4.286 A. ✓

Answer: V1 = 8.57 V, V2 = 11.43 V. Node 2 is above the source voltage because the dependent source pumps energy in.

Common mistakes

  • Writing the shared-resistor current as I1 + I2 when both mesh currents are clockwise. It is I1 − I2 from mesh 1's view.
  • Writing KCL at a node that has an ideal voltage source attached instead of using a supernode, which forces an extra unknown current.
  • Forgetting the constraint equation for a supernode or supermesh, which leaves one equation short.
  • Using mesh analysis on a non-planar circuit.
  • Assuming the inspection (symmetric matrix) method works with dependent sources. It does not; write the equations out in full.
  • Answering with a mesh current when the question asks for a branch current.

For GATE IN

Expect NAT questions asking for one node voltage, branch current or power in a 3–5 node network, often with a dependent source or a floating voltage source. Practise deciding quickly between mesh and nodal, writing supernode/supermesh constraints, and using Cramer's rule for 2×2 and 3×3 systems. A quick power balance or KCL check at the end catches most sign errors.

Quick check

  1. A circuit has 7 branches and 5 nodes. How many mesh equations are needed?
  2. A 5 V source connects node 2 (+) to node 3. What constraint goes with the supernode?
  3. Can mesh analysis be used for a non-planar circuit?
  4. With dependent sources, is the nodal G matrix necessarily symmetric?

Answers: 1. 7 − 5 + 1 = 3. 2. V2 − V3 = 5 V. 3. No; use nodal analysis. 4. No.

Try answering each one aloud before you open it.

  1. 1.What is mesh analysis in electrical circuits?Concept

    Mesh analysis is a method used to solve planar circuits for the currents flowing in the circuit. It involves writing Kirchhoff's Voltage Law (KVL) around each mesh (a loop that does not enclose other loops) and solving the resulting system of equations to find the unknown currents.

  2. 2.What is nodal analysis in electrical circuits?Concept

    Nodal analysis is a technique used to determine the voltage at various nodes in an electrical circuit. It involves applying Kirchhoff's Current Law (KCL) at each node, except the reference node, and solving the resulting equations to find the node voltages.

  3. 3.Explain the difference between mesh analysis and nodal analysis.Concept

    Mesh analysis focuses on calculating the currents in the loops of a circuit using KVL, while nodal analysis focuses on finding the voltages at the nodes using KCL. Mesh analysis is typically used for circuits with fewer loops, whereas nodal analysis is preferred for circuits with fewer nodes.

  4. 4.Why is mesh analysis preferred over nodal analysis in certain circuits?Application

    Pick the method that gives fewer equations. Mesh analysis needs b − n + 1 equations, less one for each current source on a mesh boundary. Nodal analysis needs n − 1 equations, less one for each voltage source. Mesh analysis wins when the circuit is planar, has few meshes and is driven mainly by voltage sources, such as series-type ladders. It cannot be used at all for non-planar circuits, where nodal analysis is the only systematic choice.

  5. 5.What happens if a circuit has dependent sources when using mesh or nodal analysis?Application

    When a circuit has dependent sources, additional equations are needed to express the dependent variables in terms of the circuit variables. These equations are included in the system of equations solved during mesh or nodal analysis.

  6. 6.How does the presence of a supernode affect nodal analysis?Application

    A supernode occurs when a voltage source is connected between two non-reference nodes. In nodal analysis, the supernode is treated as a single node, and KCL is applied to the entire supernode. An additional equation is written to account for the voltage source.

  7. 7.How does the presence of a supermesh affect mesh analysis?Application

    A supermesh occurs when a current source is present between two meshes. In mesh analysis, the supermesh is treated as a single mesh, and KVL is applied around the supermesh. An additional equation is written to account for the current source.

  8. 8.Calculate the current flowing through a 10 Ω resistor in a simple series circuit with a 20 V battery and a 5 Ω resistor.Numerical
    1. Total resistance, R_total = 10 Ω + 5 Ω = 15 Ω.
    2. Using Ohm's Law, I = V / R_total = 20 V / 15 Ω = 1.33 A.
    3. The current flowing through the 10 Ω resistor is 1.33 A.
  9. 9.Mesh 1 has a 10 V source (aiding clockwise I1), its own 5 Ω resistor, and a 5 Ω resistor shared with mesh 2. Mesh 2 has the shared 5 Ω, its own 10 Ω and a 5 V source aiding clockwise I2. Find the mesh currents.Numerical

    Mesh 1: 10 = 5I1 + 5(I1 − I2), so 10I1 − 5I2 = 10. Mesh 2: 5 = 10I2 + 5(I2 − I1), so −5I1 + 15I2 = 5. The determinant is 150 − 25 = 125. This gives I1 = (150 + 25)/125 = 1.4 A and I2 = (50 + 50)/125 = 0.8 A. The shared resistor carries 0.6 A in the direction of I1.

  10. 10.What are the limitations of mesh and nodal analysis?Application

    Mesh analysis works only for planar circuits, and current sources need supermeshes. Nodal analysis works for any circuit, but floating voltage sources need supernodes. KCL and KVL themselves hold for nonlinear elements too. However, the neat linear matrix form, and solving it by Cramer's rule or matrix inversion, assumes linear elements. Nonlinear circuits give nonlinear equations that need iteration, as SPICE does with Newton–Raphson.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?