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.
- Node Voltage Method (you may skip this section -- for review only)
- Loop Current Method (you may skip this section -- for review only)
- Modified Nodal Analysis for Resistive Circuits (Description of MNA method)
- An Algorithmic Approach to Modified Nodal Analysis (A Method for Developing MNA equations without much thought)
- Some Examples (Some examples of the MNA method applied to circuits -- both by inspection and algorithmically)
- Modified Nodal Analysis for Reactive Circuits and Op Amps (Extensions to the MNA method)
- SCAM - A MATLAB tool for deriving and solving circuit equations symbolically
(Symbolic Circuit Analsysis in MatLab).
- A Quick Review of the rules for the MNA algorithm
All documents condensed into one (for easy printing).
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.
To apply the node voltage method to a circuit with n nodes (with m voltage sources), perform the following steps (after Rizzoni).
- Selective a reference node (usually ground).
- Name the remaining n-1 nodes and label a current through each passive element and each current source.
- Apply Kirchoff's current law to each node not connected to a voltage source.
- Solve the system of n-1-m unknown voltages.
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.
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.
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.
- 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.
- Apply Kirchoff's voltage law to each loop not containing a current source.
- Solve the system of n-m unknown voltages.
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
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.
The choice between the node voltage method and the loop current method is often made on the basis of the circuit at hand. For the example chosen, there was only one independent node but two independent loops. Therefore the node voltage method would be expected to be easier. The situation shown below is the opposite, with two nodes, but only one loop; hence the loop current method is preferable.
For this circuit you would draw three loops, but two of them go through known current sources - so you would only need one equation. Nodal analysis would require two equations, one each for the voltage on each side of R3.
The next document describes a modified nodal analysis (MNA) method that is amenable to computer solution.