Note: I have a newer version of these pages (including solutions with dependent sources) at

http://lpsa.swarthmore.edu/Systems/Electrical/mna/MNA1.html.

# Analysis of  Resistive Circuits

The following text is broken into several sections.  Most are simply explanatory.  You may skip directly to SCAM, a MATLAB® tool for deriving and solving circuit equations symbolically if you are not interested in the theory.

All documents condensed into one (for easy printing).

## Introduction

Solving a set of equations that represents a circuit is straightforward, if not always easy.  However, developing that set of equations is not so easy.  The two commonly taught methods for forming a set of equations are the node voltage (or nodal) method and the loop-current (or mesh) method.  I will briefly describe each of these, and mention their benefits and disadvantages.  I will end with a discussion of a third method, Modified Nodal Analysis, that has some unique benefits.  Among its benefits is the fact that it lends itself to algorithmic solution -- the ultimate goal of these pages is to describe how to use a MATLAB program for generating a set of equations representing the circuit that can be solved symbolically.  If you are only interested in using that program you may go directly to the page describing SyCiSi.

Circuits discussed herein are simple resistive circuits with independent voltage and current sources.  Dependent sources can be added in a straightforward way, but are not considered here.

## Node Voltage Method

To apply the node voltage method to a circuit with n nodes (with m voltage sources), perform the following steps (after Rizzoni).

1. Selective a reference node (usually ground).
2. Name the remaining n-1 nodes and label a current through each passive element and each current source.
3. Apply Kirchoff's current law to each node not connected to a voltage source.
4. Solve the system of n-1-m unknown voltages.

### Example 1

Consider the circuit shown below

Steps 1 and 2 have already been applied.  To apply step 3:

In this case there is only one unknown, vb.  Plugging in numbers and solving the circuit we get

The node-voltage method is generally straightforward to apply, but becomes a bit more difficult if one or more of the voltage sources is not grounded.

### Example 2

Consider the circuit shown below.

Clearly this circuit is the same as the one shown above, with V1 and R1 interchanged.  Now we write the equations:

The difficulty arises because the voltage source V1 is no longer identical to one of the node voltages.  Instead we have

Note that the last line is the same as that from the previous circuit, but to solve the circuit we had to first solve for va.  This procedure wasn't difficult, but required a little cleverness, and will be a bit different for each circuit layout.  Another way to handle this problem is to use the concept of a supernode, which complicates the rules for setting up the equations (DeCarlo/Lin).  However, the supernode concept handles the case of a non-grounded voltage source without any need for solving intermediate equations, as we did here.

The examples chosen here were simple but illustrated the basic techniques of nodal analysis.  It also illustrated one of the difficulties with the technique, setting up equations with a floating voltage source.  The technique of modified nodal analysis, introduced later, also has no difficulties when presented with floating voltage sources.

## Loop Current Method

The loop current (or mesh current) method is, not surprisingly, similar to the node voltage method.  The rules below follow those in Rizzoni.

To apply the loop current method to a circuit with n loops (and with m current sources), perform the following steps.

1. Define each loop current.  This is easiest with a consistent method, e.g. all unknown currents are clockwise, all know currents follow direction on current source.
2. Apply Kirchoff's voltage law to each loop not containing a current source.
3. Solve the system of n-m unknown voltages.

### Example 3

Consider the circuit from Example 1, with mesh currents defined.

We can apply KVL to both loops

Since there are two equations and two unknowns we can solve by substitution or by matrix methods.  To solve by matrix methods we rewrite the equations

or

Solving for the two unknown currents we get

While floating current sources tended to complicate the formulation of circuit equations when using the node voltage method, neither the presence of current sources or voltage sources complicates the loop current method.