# Inconsistency when doing nodal analysis with supernode

I'm trying to analyse the following simple circuit by using nodal analysis but seem to arrive at an inconsistency if switch the direction of the assumed current $$\ i_2 \$$.

Consider the following circuit:

simulate this circuit – Schematic created using CircuitLab

By applying Kirchhoff current law at the supernode created by $$\ v_1 \$$ and $$\ v_2 \$$ I obtain: $$i_1 + i_2 = 0 \\ \frac{v_1}{R_1} + \frac{v_2}{R_2} =0$$ By applying Kirchhoff voltage law I obtain: $$v_1-v_s-v_2=0$$

Now let's arbitrarily decide to switch the assumed current direction $$\ i_2 \$$:

simulate this circuit

By applying Kirchhoff current law at the supernode created by $$\ v_1 \$$ and $$\ v_2 \$$ I now obtain: $$i_1 = i_2 \\ \frac{v_1-0}{R_1} = \frac{0 - v_2}{R_2}$$ (I put $$\0 - v_2\$$ because I'm assuming that $$\v_2\$$ is at a lower potential than ground) $$\frac{v_1}{R_1} + \frac{v_2}{R_2} = 0$$ Notice that we get the same equation as before. By applying Kirchhoff voltage law I obtain: $$v_1-v_s \color{red}{+}v_2=0$$ This time I get a different equation, thus leading to a completely different result when solving the system of two unknowns $$\ v_1 \$$ and $$\ v_2 \$$!

I think that the problem lies in the fact that while applying Kirchhoff current law in the second solution I first assume that the supernode has higher voltage that ground and then that is has lower voltage than ground.

Is my hypothesis correct? Is there something else that I'm missing? Thanks a lot!

• The mistake is in KVL. We are not applying the KVL to the entire loop. In the supernode, we are only describing the voltage relation between V1 and V2 nodes. In this case it will be V1 - V2 = Vs or V2 = V1 - Vs or V1 = V2 + Vs. That's all, nothing more. Because the KVL for an entire loop does not contain this type of information (relationship between V1 and V2). Thus, we do not apply KVL for the entire loop.
– G36
Oct 29, 2023 at 7:22
• Looking it this way makes a lot of sense and solves the mystery! Then I don't get why the textbook I'm using (Fundamentals of Electric Circuits by Charles K. Alexander and Matthew N.O. Sadiku) and some online resources (example) seem to suggest that you should use KVL on the entire loop. Oct 29, 2023 at 9:08
• Hard to say why, maybe my "hypothesis" is simply wrong. And we have to always assume that V1 and V2 are positive when we are dealing with supernode. I don't know.
– G36
Oct 29, 2023 at 12:50

## 1 Answer

There are two nodal approaches that spring forward for such a simple circuit:

simulate this circuit – Schematic created using CircuitLab

If you don't use a supernode, then you need to introduce an unknown current, $$\i_\text{S}\$$ and this means there will be three unknowns, not two. You will do a KCL for $$\v_1\$$, a KCL for $$\v_2\$$, and an equation relating $$\v_1\$$ to $$\v_2\$$. Then solve.

eq1 = Eq( v_1/r_1, i_s )
eq2 = Eq( v_2/r_2 + i_s, 0 )
eq3 = Eq( v_1 - v_s, v_2 )
solve( [ eq1, eq2, eq3 ], [ i_s, v_1, v_2 ] )
{i_s: v_s/(r_1 + r_2), v_1: r_1*v_s/(r_1 + r_2), v_2: -r_2*v_s/(r_1 + r_2)}


In the above then find: $$\i_\text{S}=v_\text{S}\frac1{R_1+R_2}=\frac13\:\text{A}\$$, $$\v_1=v_\text{S}\frac{R_1}{R_1+R_2}=\frac13\:\text{V}\$$, and $$\v_2=-v_\text{S}\frac{R_2}{R_1+R_2}=-\frac23\:\text{V}\$$.

If you use a supernode, then you treat $$\v_1\$$ and $$\v_2\$$ as a single node for KCL purposes but keep in mind the potential difference while working out the equation. In this case, there's only one equation and one unknown, but you have to decide which of $$\v_1\$$ or $$\v_2\$$ is your unknown. Picking $$\v_1\$$, solve:

solve( Eq( v_1/r_1 + (v_1-v_s)/r_2, 0 ), v_1 )[0]
r_1*v_s/(r_1 + r_2)


Which is the same $$\v_1=v_\text{S}\frac{R_1}{R_1+R_2}=\frac13\:\text{V}\$$, as before. And of course you can work out the rest from there.

• Thanks for the reply! Basically in the solution with the supernode you plugged in V2=V1-Vs, consistently with what @G36 pointed out in his comment. If I understood correctly we do that since nodal analysis looks at node voltages instead of voltage drops across components, so we are not doing KVL on the whole loop, but just looking at the relation between V1, V2 and Vs. I didn't know about the method without supernodes, thanks for pointing that out! Oct 29, 2023 at 11:00