Nodal Analysis

This entry is part 18 of 24 in the series Electronics DC Revision

Nodal Analysis

The motivation for Nodal Analysis (a.k.a.the Branch Current Method) is that sometimes you have a circuit which is too complicated to solve using a simplification method, such as superposition. Nodal analysis on the other hand will work for any circuit that has just resistors and voltage and or current sources in any configuration. The price you pay for that power and flexibility is that it can be quite an involved process, and will require the solving of multi-variable simultaneous equations at the end. However, that’s what calculators are for (you can also use one of the excellent online equation calculators such as Woolfram Alpha).

Having said that the technique is involved, it’s also relatively straight forward to understand. You start by identifying nodes in the circuit and then use Kirchhoff’s Current Law along with Ohms Law to create equations describing each current entering and leaving the node. Then solve those equations for the current and voltages in all the components of the circuit.

A node is just a common point between three or more wires or component leads, whose voltage can be measured with respect to some common reference point (which will be one of the nodes just identified). Watch out for staggered junctions which are electrically a single junction. To demonstrate what to look out for, in the schematic below all the nodes have been circled in blue and given arbitrary labels so that they can be easily identified in equations.:

Note that all of the points within each identified node are electrically just a common point. The gotcha type scenario is often similar to the node with the label Ref which has connections on the other side of a corner.

The Process

  1. [optional] Convert voltage sources to current sources.
  2. Identify all the nodes in the circuit and label each such that their voltage can be easily identified inside equations.
  3. Assign one of the identified nodes as the reference to which the voltage of all the other nodes will be measured to. If their is a ground or 0V point identified in the circuit, then it is convention to assign this node as being the reference node.
  4. [optional] Simplify the circuit to merge together any series or parallel resistances. This makes later calculations simpler. If necessary (and it often isn’t) the current and voltages of those branches can be later reconstituted after the analysis is completed.
  5. For each identified node: assign (and label) an arbitrary current direction for each path into and out of that node. Note that by convention we work in the direction of conventional current flow. Again, by convention, it is normal to assign a direction of current flowing out of the node unless directly connected to a current/voltage source (in which case current flow stays as the source indicates it should). Remember, at this point we don’t really know which way the current is actually flowing. If our chosen direction was wrong it will come out in the calculations as a negative value instead of a positive one.
  6. Create a KCL equation for each one of the identified nodes (except the one designated as the reference).
  7. Re-write the KCL equations in terms of the node voltages and resistances (remember Ohms law I=V/R).
  8. Solve the equations. there are lots of ways to do this. However, I suggest using either your calculator (if it supports it), or one of the online equation calculators such as the excellent one by Wolfram Alpha.
  9. [optional] There are lots of places to make mistakes here, so self check your answers by plugging the results back in to the original KCL equation and the KCL that was re-written in terms of node voltages and currents. It only takes a couple of minutes, and it is just too easy to (for example) accidentally drop a negative in the middle of a series of calculations.

OK. Enough waffle. Let’s put some of this theory in to practice with a couple of examples.

Example 1 – Batteries

In practice a lot of the circuits that you may want to analyse will be powered by batteries and not specialised voltage or current sources. Consequently it is important to know how to treat them for the purposes of analysis.

Technically batteries are voltage sources with an internal series resistance. Unfortunately that resistance is not fixed and can vary with output current, temperature, how drained the battery is, and even external mechanical stress on the case of the battery! (try putting a load across a PP3 9V battery and measuring the voltage while you squeeze the case with your fingers!)

The manufacturers data sheets should provide graphs showing how voltage and internal resistance changes with time, temperature and level of discharge etc. So you could work out your best and worse cases and run the analysis on those.

The good news is that most circuits are designed to be relatively tolerant of supply voltage. So you can often get away with treating the batteries as ideal voltage sources (as long as current demands are to be kept well clear of the extremes). Which is what we will assume here.

Step 1 – Convert voltage sources to current sources

We could choose to treat E1 and R1, along with E2 and R3 as a voltage sources and convert each in to a current source. However, with such a simple circuit there is little to be gained by doing so in this particular case.

Step 2 – identify and label each node

A node is where three or more branches are electrically common. In our example that will be where R1, R2, and R3 come together, which we have labeled as ‘A‘; and where R2 comes together with the negative sides of E1 and E2, which we have labeled as ‘Ref‘.

Step 3 – Designate a reference node

It is convention to designate the ground or 0V point as the reference. However, since this particular circuit has not had that designation made, we have chosen the common negative side of the two batteries. Hence, our refference node is the one labeled as ‘Ref‘.

Step 4 – Simplify series/parallel instances

There is no simplification to be made here.

Step 5 – Assign current directions at each node

Three things to note here:

  1. Current is conventional current flow who’s direction is chosen to be always leaving the junction (as is the convention). Remember that strictly speaking, at this point we don’t know the real direction yet. Where we are wrong with our designation, the calculations will yield a negative answer to inform us of that fact.
  2. The reference node does not need to have current directions defined as it will be determined by the nodes that feed it.
  3. I have labeled the currents to reflect the component numbers of the resistors that they are feeding to minimise confusion within the later calculations.
Step 6 – Create a KCL equation for each node
\(I_1 + I_2 + I_3 = 0 \\\)
Step 7 – Re-write the KCL equations in terms of node V and I values

As we re-write these equations, remember that we have designated the current direction as away from the junction. This is important as it affects the order in which voltages are subtracted to calculate potential differences across the resistors.

\(I_1 = \frac{V_{R1}}{R_1} = \frac{V_A – V_{E1}}{R_1} = \frac{V_A – 1}{10}{amps} \\\) \(I_2 = \frac{V_A}{R_2} = \frac{V_A}{20}{amps} \\\) \(I_3 = \frac{V_{R3}}{R_3} = \frac{V_A – V_{E2}}{R_3} = \frac{V_A – 10}{30}{amps} \)
Step 8 – Solve the equations

By inserting the equations from step 7 into our original KCL equation from step 6 we get:

\(I_1 + I_2 + I_3 = 0 \\\) \(\frac{V_A – 1}{10} + \frac{V_A}{20} + \frac{V_A – 10}{30} = 0 \\\)

At this point you could just plug the above in to a calculator and get VA directly. Try typing the following line in to Wolfram Alpha.

((A – 1) / 10) + (A / 20) + ((A – 10) /30) = 0

For this first example only. I will take you all the way through the manual working out. Just remember that although this looks complicated. In practice all of the next block of calculations wouldn’t need to be done because you would have used an equation calculator instead to get the answer directly.

\(\frac{V_A}{10} – \frac{1}{10} + \frac{V_A}{20} + \frac{V_A}{30} – \frac{10}{30} = 0 \\\) \(0.1V_A – 0.1 + 0.05V_A + 0.0333V_A – 0.3333 = 0 \\\) \(0.1V_A + 0.05V_A + 0.0333V_A = 0.1 + 0.3333 \\\) \(0.1833V_A = 0.4333 {volts} \\\) \(V_A = \frac{0.4333}{0.1833} {volts} \\\) \(V_A = 2.3639 {volts} \\\)

Then by re-substituting our calculated value for VA into Ohms law we get:

\(I_1 = \frac{V_A – 1}{10} = \frac{2.3639 – 1}{10} = 0.13639{amps} \approx 136{mA} \\\) \(I_2 = \frac{V_A}{20} = \frac{2.3639}{20} = 0.1182{amps} \approx 118{mA} \\\) \(I_3 = \frac{V_A – 10}{30} = \frac{2.3639 – 10}{30} = -0.2545 \approx -255{mA} \)
Step 9 – Check your results

We can check our results by plugging our answers back in to the original KCL equation and seeing if it adds up to zero! Spoiler alert. It won’t be exactly zero due to all the rounding errors, but it should be very close.

\(I_1 + I_2 + I_3 = 0 \\\) \(0.13639 + 0.1182 – 0.2545 = 0.00009 \approx zero! \)

Example 2 – Mixed Sources

Step 1 – Convert voltage sources to current sources

We could choose to convert E1 + R1 in to a current source, but like example 1 this circuit is simple enough not to be worth the effort.

Step 2 – identify and label each node

Here we have assigned the arbitrary labels of ‘A‘ and ‘B‘ to the two nodes of interest and ‘Ref‘ to the last node.

Step 3 – Designate a reference node

This circuit already has an assigned ground (GND) node. So as per convention we will choose to use that node as our reference node to which we have already assigned the label ‘Ref‘.

Step 4 – Simplify series/parallel instances

There is no simplification required for this circuit.

Step 5 – Assign current directions at each node

We start by assuming that all ‘unknown’ current is leaving the node. To this end I1, I2, I3, and I4 are all shown leaving their respective node even though this means that I2 and I4 are opposing each other. Which guess was correct will come out in the calculations through their polarities.

The current through IS1 is of a known amplitude and direction, so it retains it’s vector values.

Step 6 – Create a KCL equation for each node

For node ‘A‘ all current is designated as leaving the node so all are positive:

\(I_1 + I_2 + IS_1 = 0 \\\) \(I_1 + I_2 + 2 = 0 \)

For node ‘B‘ IS1 is designated as entering the node so it must have negative sign, where as I3 & I4 are leaving so must be positive:

\(I_3 + I_4 – IS_1 = 0 \\\) \(I_3 + I_4 – 2 = 0 \)
Step 7 – Re-write the KCL equations in terms of node V and I values
\(I_1 = \frac{V_{R1}}{R_1} = \frac{V_A – V_{E1}}{R_1} = \frac{V_A – 72}{9}{amps} \\\) \(I_2 = \frac{V_A – V_B}{R_2} = \frac{V_A – V_B}{4}{amps} \\\) \(IS_1 = 2{amps} \\\) \(I_3 = \frac{V_B}{R_3} = \frac{V_B}{12}{amps} \\\) \(I_4 = \frac{V_B – V_A}{R2} = \frac{V_B – V_A}{4}{amps} \\\)
Step 8 – Solve the equations
\(I_1 + I_2 + IS_1 = \frac{V_A – 72}{9} + \frac{V_A – V_B}{4} + 2 = 0 \\\) \(I_3 + I_4 – IS_1 = \frac{V_B}{12} + \frac{V_B – V_A}{4} – 2 = 0 \\\)

Which we could solve using simultaneous equations, but instead we will use the modern way and just plug the equation in to an online calculator. I will type the following representation in to wolframalpha.com (variable ‘A‘ represents VA and variable ‘B‘ represents VB.):

((A – 72) / 9) + ((A – B) / 4) = -2, (B / 12) + ((B – A) / 4) = 2

and out pops our answer of:

\(A = \frac{216}{5}, B = \frac{192}{5} \\\)

which translates to:

\(V_A = 43.2, V_B = 38.4 \)

So now we just insert those numbers in to our original I1, I2, I3, I4 equations to get:

\(I_1 = \frac{V_A – 72}{9} = \frac{43.2 – 72}{9} = -3.2{amps} \\\) \(I_2 = \frac{V_A – V_B}{4} = \frac{43.2 – 38.4}{4} = 1.2{amps} \\\) \(I_3 = \frac{V_B}{12} = \frac{38.4}{12} = 3.2{amps} \\\) \(I_4 = \frac{V_B – V_A}{4} = \frac{38.4 – 43.2}{4} = -1.2{amps} \\\)

which looks promising since I4 is the negative of I2. However, we will perform a proper verification of our results in step 9 next.

Step 9 – Check your results

To prove our answers we will just plug them in to our original KCL equations:

\(I_1 + I_2 + IS_1 = (-3.2) + 1.2 + 2 = 0 \\\) \(I_3 + I_4 – IS_1 = 3.2 + (-1.2) – 2 = 0 \\\)

Example 3 – With Simplification of R

While still not being overly complicated a circuit to analyse, it is included as it allows the processes of converting voltage sources to current sources, and also provides a suitable demonstration of how simplification can sometimes follow.

Here is the original circuit to be analysed:

Step 1 – Convert voltage sources to current sources

Conversion of VS1 to a current source may be advantageous here as it will lend the circuit to a more simplified layout.

Conversion is simply a case of moving the resistor R5 from being a series to a parallel configuration. The value remains the same. Current for the replacement source is simply calculated using Ohms law I=V/R, which gives us 12/6 = 2 amps.

Step 2 – identify and label each node
Step 3 – Designate a reference node

By convention we will choose the common negative node at the bottom of the schematic to be the reference node.

Step 4 – Simplify series/parallel instances

This circuit definitely lends itself to being simplified through the combining of parallel resistors. Thus reducing the number of current branches that we need to analyse. Note that the nodes remain the same and that if necessary at the end we can re-constitute the removed branches through simple current branching theory and a good dose of Ohms law.

Step 5 – Assign current directions at each node

Note that all unknown currents have been designated as pointing out of the node, while the known current vectors of the two current sources retain their defined characteristics.

Step 6 – Create a KCL equation for each node
\(I_5 + I_6 – IS_1 = 0 \\\) \(I_7 + I_8 – IS_2 = 0 \\\)
Step 7 – Re-write the KCL equations in terms of node V and I values
\(I_5 = \frac{V_A – V_B}{R3} = \frac{V_A – V_B}{5} {amps} \\\) \(I_6 = \frac{V_A}{R6} = \frac{V_A}{10} {amps} \\\) \(IS_1 = 1 {amps} \\\) \(I_7 = \frac{V_B}{R7} = \frac{V_B}{2} {amps} \\\) \(I_8 = \frac{V_B – V_A}{R3} = \frac{V_B – V_A}{5} {amps} \\\) \(IS_2 = 2 {amps} \)
Step 8 – Solve the equations
\(I_5 + I_6 – IS_1 = \frac{V_A – V_B}{5} + \frac{V_A}{10} – 1 = 0 \\\) \(I_7 + I_8 – IS_2 = \frac{V_B}{2} + \frac{V_B – V_A}{5} – 2 = 0 \\\)

Text of calculation to type into wolframalpha.com

\(((A – B) / 5) + (A / 10) – 1 = 0, (B / 2) + ((B – A) / 5) – 2 = 0 \\\)

results:

\(A = \frac{110}{17} = 6.460588 \approx 6.461{volts} \\\) \(B = \frac{80}{17} = 4.70588 \approx 4.706{volts} \\\)

Now substituting our results in to the I5, I6, I7, I8 equations we get:

\(I_5 = \frac{V_A – V_B}{5} = \frac{6.461 – 4.706}{5} = 0.351{amps} = 351{mA} \\\)

\(I_6 = \frac{V_A}{10} = \frac{6.461}{10} = 0.6461{amps} \approx 646{mA} \\\) \(I_7 = \frac{V_B}{2} = \frac{4.706}{2} = 2.353{amps} \\\) \(I_8 = \frac{V_B – V_A}{5} = \frac{4.706 – 6.461}{5} = -0.351{amps} = -351{mA} \\\)

At this point we would probably have all that we need. However, to show how we can reconstitute the current through the replaced R1, R2, and R4, R5 parallel resistor arrangements:

\(I_{R1} = I_6 . \frac{R_2}{R_1 + R_2} = 0.6461 * \frac{30}{15 + 30} = 0.4307{amps} \approx 431{mA} \\\) \(I_{R2} = I_6 . \frac{R_1}{R_1 + R_2} = 0.6461 * \frac{15}{15 + 30} = 0.2154{amps} \approx 215{mA} \\\) \(I_{R4} = I_7 . \frac{R_5}{R_4 + R_5} = 2.353 * \frac{6}{3 + 6} = 1.5686{amps} \\\) \(I_{R5} = I_7 . \frac{r_4}{R_4 + R_5} = 2.353 * \frac{3}{3 + 6} = 0.7843{amps} \approx 784{mA} \)
Step 9 – Check your results

We will check our results by substituting our calculated current values back into the original KCL equations:

\(I_5 + I_6 – IS_1 = 0.351 + 0.646 – 1 = -0.003 \approx 0 \\\) \(I_7 + I_8 – IS_2 = 2.353 + (-0.351) – 2 = 0.002 \approx 0 \)

Summary

I hope that what you take away from this article is that although it is a laborious process. Providing you make use of the modern day tools to solve equations for you, it isn’t as overwhelming as it once was.

If you follow the steps laid out here, then each step is itself fairly innocuous.

All of this said. In truly modern times it is rare to have to do any of this analysis manually. Usually it is much simpler to just put the circuit in to a SPICE simulator and let the computer take the aspirin… but that is for another day.

Electronics DC Revision

Mesh Current Analysis Capacitance

Leave a Reply