Electrical Circuits - Analytical Methods
Setting Up Circuit Equations (Node Equations)
Writing Node Equations
Setting Up Simultaneous Equations
Circuits Containing Current Sources


        You have learned how to use conductance matrix analysis in simple circuits.  However, the discussion in the first lesson did not give a formal algorithm for solution of these circuits.  Here are our goals for this lesson.

A General Method Of Setting Up Circuit Equations. - Writing The Node Equations

        In this section we will consider how circuit equations are generated and how different elements affect those circuit equations.  We will examine how node equations are written.

        We start by looking at a typical node - extracted from some larger circuit.  That node is shown below.

Note the following about this circuit:         The methodology that we use is as follows.
        We will look at these two steps separately, and we will work first on the problem of writing KCL at a node.
Writing Node Equations

        Here is that node extracted from a larger circuit.

        Examining the sample node - node "n" - it is relatively easy to write the KCL equations for the node.  Using KCL for the sample node, we would have:

Ix + Iy + Iz = 0

And, each of the currents can be expressed in terms of the voltage at the node and the voltage at one of the neighboring nodes.  For example:

Ix = (Vn -Vx)/Rx

Express every current in that manner, and put those expressions into the KCL equation:

(Vn -Vx)/Rx + (Vn -Vy)/Ry + (Vn -Vz)/Rz = 0

        Notice how this equation plays out.  By defining currents as positive when they are flowing away from the node (i.e., the current arrows defining current polarity point away from the node.), every term that involves Vn turns out to have a plus sign in the resultant equation.  That gives you a way to know when you have written the equation correctly.  There is a payoff to being systematic and consistent when you write the KCL equations.  You will find almost every textbook that discusses this topic writes the equations this way!  You should adopt that practice as well, and you should never go wrong.

        The case of nodes with only resistors connected is simple enough, but there are special situations that you will need to take care of.  Here are those special cases.

        Let's consider the first case.  Here is a picture of the situation with an adjacent node connected to a grounded voltage source.

In this situation, KCL is written exactly as it was before.  However, the voltage source serves to fix a node voltage and that node voltage is no longer a variable with an unknown value.  Instead, the voltage at node 'x' in the figure is known to be Vs.  After you have written KCL at the node, when you go to solve the KCL equations simultaneously, that known value will appear in a term on the right hand side (the knowns) of the equation.  Thus:

        There is another case in which there is a voltage source connected between two nodes - neither of which is ground.  In this case the voltage source establishes a voltage difference between two nodes, and the way this situation is handled is slightly different.

Considering Current Sources

       Now consider what happens when a current source is connected to a node.  You might suspect that this situation is the most complex of all, but, in fact, it is one of the simpler ones.  In the example below the current source is deliberately set so that the current is actually flowing into the node if Is is positive.  Now, consider writing the current equations for this circuit.

Ix +Iy + Iz = 0


(Vn -Vx)/Rx + (Vn -Vy)/Ry - Is = 0

        Given all of the above, there is one last question.  That is, "How many independent equations result when KCL is written at all of the nodes?",  Consider the following:

        After writing the node equations, the next problem is to put them in a form that is easier to solve, and that is the next thing you have to consider.
Getting A Set Of Simultaneous Equations

        Once the KCL equations are written for a network, the next step is to cast the equations into a form amenable to solution.  The form you should be looking for is a set of simultaneous linear equations.  In other words, you are looking for something like the following:

a*x + b*y + c*z = j

d*x + e*y + f*z = k

g*x + h* y + i*z = l

This is a standard form for simultaneous linear equations, and for circuit equations the variables (x, y and z) would probably be node voltages (e.g. Vx, Vy and Vz).

        Considere a typical node voltage equation (taken from earlier in this lesson):

(Vn -Vx)/Rx + (Vn -Vy)/Ry + (Vn -Vz)/Rz = 0

Separate all of the terms that involve Vx, etc. and combine, and the result is:

(1/Rx + 1/Ry + 1/Rz)Vn - Vx/Rx - Vy/Ry  - Vz/Rz = 0

And this is the form we want.  This particular equation has four unknown node voltages, but that would be the case for the node shown just above.

        Similar equations occur for the other possibilities.

If there is a grounded voltage source, no KCL equation is written at that node because the node voltage is known:

Vn = Vs

If there is an ungrounded voltage source, there is one less KCL equation.

Here there are two possibilities.

We could write:

Vn = Vs + Vz

Then we would write a KCL equation at node "z" that included Ix and Iy flowing away from node "z'.  Here is an example to illustrate the point.


E1   In this circuit, note the following:

        Write the KCL equations for the entire super node:

Ix + Iy + Iz = 0

Then, note that:
Ix = (Vy -Vx)/Rx

Iy = Vy / Ry

Iz = Vz / Rz= (Vy - V2)/ Rz

And the KCL equation for the supernode becomes:

(Vy -Vx)/Rx + Vy / Ry + (Vy - V2)/ Rz = 0

And, for this circuit that is the one independent KCL equation that can be written (unless you choose to keep Vz as your unknown, but there is still only one equation.)  That means writing this in the standard form, we would have:

(1/Rx + 1 / Ry + 1/ Rz)Vy  - Vx/Rx = V2/ Rz

The coefficient of Vy is the sum of the conductances connected to the supernode, the source appears on the right hand side, and the negative reciprocal of the shared resistor shows up just where we might expect it.