Modified Nodal Analysis#

The nodal analysis technique can only be applied for networks with elements of which the \(v-i\) relation can be described in voltage-controlled notation: \(i=f(v)\). We have seen that network transformation methods, such as, Blakesley’s voltage shift and Th’{e}venin-Norton conversion, can be applied to convert current-controlled elements like voltage sources into voltage-controlled equivalents. In this section, we will introduce the Modified Nodal Analysis method. This technique allows both voltage-controlled and current-controlled notations for network elements.

The procedure#

Like Nodal Analysis, Modified Nodal Analysis is based upon the application of Kirchhoff’s current law (KCL). Current-controlled elements are included by adding the unknown currents through these elements to the vector with nodal voltages. Additional equations are found from the relations between the nodal voltages to which these elements are connected. In this way the voltages of independent voltage sources are added to the vector with nodal currents. The procedure is as follows:

  1. Set up the circuit diagram, select a reference node and number all remaining nodes as in Nodal Analysis.

  2. Define the \(m\) unknown currents through the \(m\) branches with current-controlled notation.

  3. Set-up the \(n-1\) nodal equations for a network having \(n\) nodes

  4. Relate the \(m\) branch voltages of the elements with current-controlled notation to the nodal voltages, in this way we obtain a square matrix with \(n-1+m\) rows and columns, and a matrix equation of the form

    \[\begin{split}\left( \begin{array} [c]{c} \mathbf{I}\\ \mathbf{V} \end{array} \right) =\mathbf{M\cdot}\left( \begin{array} [c]{c} \mathbf{V}_{n}\\ \mathbf{I}_{v} \end{array} \right) ,\end{split}\]

    in which:

    \[\begin{split}\left( \begin{array} [c]{c} \mathbf{I}\\ \mathbf{V} \end{array} \right) & =\text{vector with independent current and voltage sources;}\\ \left( \begin{array} [c]{c} \mathbf{V}_{n}\\ \mathbf{I}_{v} \end{array} \right) & =\text{vector with }n-1\text{ unknown nodal voltages and }m\text{ unknown}\\ & \text{currents through the }m\text{ current-controlled branches;}\\ \mathbf{M} & =\left( \begin{array} [c]{cc} \mathbf{Y} & \mathbf{C}\\ \mathbf{B} & \mathbf{D} \end{array} \right) =\text{matrix that consists of }4\text{ sub matrices:}\\ \mathbf{Y} & =\left( n-1\right) \times\left( n-1\right) \text{ admittance matrix as with NA;}\\ \mathbf{B} & =m\times\left( n-1\right) \text{ incidence matrix with topology information}\\ & \text{of the current-controlled branches;}\\ \mathbf{C} & =\left( n-1\right) \times m\text{ incidence matrix with topology information,}\\ & =\mathbf{B}^{T}\text{ for networks that have only \emph{independent} voltage sources;}\\ \mathbf{D} & =m\times m\text{ matrix containing zeros only for \emph{independent} sources.}\end{split}\]
    ../_images/NA-5.svg

    Fig. 553 Contributions of an independent voltage source to the MNA matrix and the vectors for a network having n nodes, including the reference node. All not shown positions outside the admittance matrix have zeros.#

  5. The \(\mathbf{B}\) matrix is an \(m\times\left( n-1\right) \) incidence matrix with only \(0\), \(1\) and \(-1\) elements. Each location in the matrix corresponds to a branch (row) or node (column). If the positive terminal of the \(i-th\) voltage source is connected to node \(\ell\), then \(\mathbf{B} _{i.\ell}\) \(=1\). If the negative terminal of the \(i-th\) voltage source is connected to node \(m\), then \(\mathbf{B}_{i,m}=-1\). If the network has only independent voltage sources, all other elements of the \(\mathbf{B}\) matrix are zero and the \(\mathbf{C}\) matrix is the transposed version of the \(\mathbf{B}\) matrix. This is illustrated in Fig. 553. The network equation added by the voltage source is:

    \[V=V_{\ell}-V_{m}\]

    Since \(+I_{v}\) flows from node \(\ell\), it is added to the \(\ell-th\) nodal equation. Similarly, \(-1\) is added to the \(m-th\) equation.

  6. Find the network solution (all nodal voltage and all branch currents). All the nodal voltages and unknown branch currents are obtained from

    \[\begin{split}\left( \begin{array} [c]{c} \mathbf{V}_{n}\\ \mathbf{I}_{v} \end{array} \right) =\left( \begin{array} [c]{cc} \mathbf{Y} & \mathbf{C}\\ \mathbf{B} & \mathbf{D} \end{array} \right) ^{-1}\left( \begin{array} [c]{c} \mathbf{I}\\ \mathbf{V} \end{array} \right) .\end{split}\]

    The branch currents through voltage-controlled elements \(I_{j,k}\) (\(j\neq k\), \(j<n\) and \(k<n\)) are found from

    \[I_{j,k}=\left( \mathbf{V}_{j}-\mathbf{V}_{k}\right) \mathbf{Y}_{j,k}.\]

Before we will discuss the coefficients of the \(\mathbf{B}\) and \(\mathbf{C}\) matrix for all kinds of network elements, we will apply the above in an example of MNA for a network with some voltage sources.

Example

Fig. 554 shows a resistive network with two voltage sources. We will derive an expression for the voltage across \(R_{3}\) with the aid of modified nodal analysis. We will start with the selection of the reference node and numbering of the remaining nodes. Fig. 555 shows the network for netlist generation. The device identifiers (also called REFDES: reference designators) have been typeset with a fixed width font and the device values with a math font: (R1: \(R_{1}\)). The common terminal of the two voltage sources has been selected as the reference node. The unknown currents through the voltage sources V1 and V2 are \(I_{A}\) and \(I_{B}\), respectively. This is shown in Fig. 555. We are now able to set up the MNA matrix equation:

\[\left( \begin{array} [c]{ccccc} 0 & 0 & 0 & V_{A} & V_{B} \end{array} \right) ^{T}=\mathbf{M\cdot}\left( \begin{array} [c]{ccccc} V_{1} & V_{2} & V_{3} & I_{A} & I_{B} \end{array} \right) ^{T},\]

in which

(224)#\[\begin{split}\mathbf{M}=\left( \begin{array} [c]{ccccc} \frac{1}{R_{1}} & -\frac{1}{R_{1}} & 0 & 1 & 0\\ -\frac{1}{R_{1}} & \frac{1}{R_{1}}+\frac{1}{R_{2}}+\frac{1}{R_{3}} & -\frac{1}{R_{2}} & 0 & 0\\ 0 & -\frac{1}{R_{2}} & \frac{1}{R_{2}} & 0 & 1\\ 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 1 & 0 & 0 \end{array} \right) . \label{eq-NA_7-matrix}\end{split}\]

The nodal voltage \(V_{2}\) can be found as

\[V_{2}=V_{A}\mathcal{C}_{4,2}+V_{B}\mathcal{C}_{5,2}=\frac{R_{2}R_{3} V_{A}+R_{1}R_{3}V_{B}}{R_{1}R_{2}+R_{1}R_{3}+R_{2}R_{3}}.\]
../_images/colorCode.svg

It will be clear that the results of the above example could just as well have been obtained in other ways. With the aid of Norton equivalent circuits, we can eliminate two nodes and obtain quick results.

In the above example, we found \(V_{2}\) by linear superposition of the voltages caused by the two independent voltage sources \(V_{A}\) and \(V_{B}\), and by using the transfers from both independent voltage sources to the output voltage. Alternatively, \(V_{2}\) could be found with the aid of Cramer’s rule.

Let us consider a linear system described by the following matrix equation:

(225)#\[\mathbf{I}=\mathbf{M\cdot V,} \label{eq-MmatrixDefinition}\]

where \(\mathbf{I}\) is the vector of nodal currents and branch voltages and \(\mathbf{V}\) is the vector with nodal voltages and branch currents, Cramer’s rule states that the solution of \(V_{i}\) can be found from

\[V_{i}=\frac{\det\mathbf{M}^{\prime}}{\det\mathbf{M}},\]

in which \(\mathbf{M}^{\prime}\) is the matrix \(\mathbf{M}\) in which the \(i-th\) column has been replaced with the vector \(\mathbf{I}\).

Example

We will now find \(V_{2}\) from the previous example with the aid of Cramer’s rule. To do so we obtain the matrix \(\mathbf{M}^{\prime}\) by substituting the \(2^{nd}\) column of \(\mathbf{M}\) with the vector \(\left( \begin{array} [c]{ccccc} 0 & 0 & 0 & V_{A} & V_{B} \end{array} \right) ^{T}\). This yields

\[\begin{split}\mathbf{M}^{\prime}=\left( \begin{array} [c]{ccccc} \frac{1}{R_{1}} & 0 & 0 & 1 & 0\\ -\frac{1}{R_{1}} & 0 & -\frac{1}{R_{2}} & 0 & 0\\ 0 & 0 & \frac{1}{R_{2}} & 0 & 1\\ 1 & V_{A} & 0 & 0 & 0\\ 0 & V_{B} & 1 & 0 & 0 \end{array} \right) .\end{split}\]

Application of Cramer’s rule yields

(226)#\[V_{2}=\frac{\det\mathbf{M}^{\prime}}{\det\mathbf{M}}=\frac{R_{2}R_{3} V_{A}+R_{1}R_{3}V_{B}}{R_{1}R_{2}+R_{1}R_{3}+R_{2}R_{3}}. \label{eq-NA_7_V2}\]
../_images/colorCode.svg

In the next example, we will determine the MNA matrix equation, as well as the voltage \(V_{2}\) at node (2) with the aid of SLICAP.

Example

Below is the listing of the SLICAP netlist file for the circuit from Fig. 555:

1NA_7
2* file: NA_7.cir
3* SLiCAP netlist for nodal analysis
4V1 1 0 {V_A}
5R1 1 2 {R_1}
6R2 2 3 {R_2}
7R3 2 0 {R_3}
8V2 3 0 {V_B}
9.end

The html output page with the SLICAP matrix equations and the voltage \(V_{2}\) is shown in Fig. 556.

../_images/SLiCAP_NA_7.svg

Fig. 556 SLiCAP simulation results.#

The SLICAP script that displays the matrix equation on this html page is:

 1#!/usr/bin/env python3
 2# -*- coding: utf-8 -*-
 3# File: NA-2.py
 4
 5from SLiCAP import *
 6prj = initProject('NA-7')
 7instr = instruction()
 8instr.setCircuit('NA-7.cir')
 9instr.setSimType('symbolic')
10instr.setGainType('vi')
11instr.setDataType('matrix')
12result = instr.execute()
13htmlPage("Example Modified Nodal Analysis")
14head2html('MNA equation')
15matrices2html(result)

Evaluation of the voltage \(V_{2}\) at node (2) requires the definition of the source and the detector. The data type needs to be set to LAPLACE. The script below shows the way in which this has been done:

1instr.setDetector('V_2')
2instr.setDataType('laplace')
3result = instr.execute()
4head2html('Output voltage')
5text2html("The voltage $V_2$ at node (2) is obtained as:")
6eqn2html('V_2', sp.simplify(result.laplace))

The matrix equations in Fig. 556 match those of ((224)) and the expression for the voltage \(V_{2}\) equals ((226)).

../_images/colorCode.svg

DC and AC network solutions#

The DC solution of a network is defined as the solution of a network for \(\mathbf{s}=0\), thus the solution of the simplified equation:

(227)#\[\mathbf{I}=\mathbf{G\cdot V.} \label{eq-dcNetwork}\]

The DC network described by ((227)) can be obtained from the original network by:

  1. Removing all capacitors (replacing them with open circuits)

  2. Replacing all inductors with short circuits

  3. Substitution of \(s=0\) in the Laplace expressions of the transfer of controlled sources.

A network has a unique DC solution if the matrix \(\mathbf{G}\) can be inverted, which requires:

\[\det(\mathbf{G})\neq0\]

It is common practice to use the term ‘AC solution’ of a network instead of ‘small-signal solution’. In linear networks, the AC solution of a network equals the solution of the complete network, including all capacitors, inductors and complex transfers.

MNA stamps#

A netlist of a circuit can be converted into an MNA matrix equation with the aid of ‘MNA stamps’. The MNA stamp of an admittance and a voltage-controlled current source have been shown in Fig. 545 and in Fig. 546, respectively. In this section, we will discuss some MNA stamps of two frequently used network elements: the voltage-controlled voltage source and the nullor.

Voltage-controlled voltage sources#

Fig. 557 shows the MNA stamp for a voltage-controlled voltage source \(E_{x}\) with voltage gain \(A_{v},\) connected between node \((1)\) and \((2)\) and controlled by the voltage between node \((3)\) and \((4)\). The unknown current \(I_{Ex}\) through the voltage source is added to the vector with the nodal voltages. The last row of the matrix stamp shows the relation between the branch voltages and the nodal voltages: \(V_{1}-V_{2}=A_{v}\left( V_{3}-V_{4}\right) \).

../_images/MNA-E.svg

Fig. 557 Voltage-controlled voltage source with voltage gain \(A_{v}\), spice syntax, symbol, device equation and MNA stamp.#

Example

Let us now solve the problem from example C.ex-opamp with the aid of MNA.

Fig. 558 shows the circuit with its nodes and the currents through the voltage sources. The MNA equation for this circuit is

\[\left( \begin{array} [c]{cccccc} 0 & 0 & 0 & 0 & V_{s} & 0 \end{array} \right) ^{T}=\mathbf{M\cdot}\left( \begin{array} [c]{cccccc} V_{1} & V_{2} & V_{3} & V_{4} & I_{s} & I_{o} \end{array} \right) ^{T},\]

in which:

\[\begin{split}\mathbf{M}=\left( \begin{array} [c]{cccccc} \frac{1}{R_{s}} & -\frac{1}{R_{s}} & 0 & 0 & 1 & 0\\ -\frac{1}{R_{s}} & \frac{1}{R_{s}} & 0 & 0 & 0 & 0\\ 0 & 0 & \frac{1}{R_{o}} & -\frac{1}{R_{o}} & 0 & 1\\ 0 & 0 & -\frac{1}{R_{o}} & \frac{1}{R_{o}}+sC_{\ell} & 0 & 0\\ 1 & 0 & 0 & 0 & 0 & 0\\ 0 & -\frac{A_{dm}}{1+s\tau} & 1 & \frac{A_{dm}}{1+s\tau} & 0 & 0 \end{array} \right)\end{split}\]

The transfer from the source voltage \(V_{s}\) to the load voltage \(V_{\ell }=V_{4}\) is found from

\[\frac{V_{\ell}}{V_{s}}=\frac{\mathcal{C}_{5,4}}{\det\left( \mathbf{M}\right) },\]

where \(\mathcal{C}_{5,4}\) is the element on the fifth row and the fourth column of the cofactor matrix \(\mathcal{C}\) of \(\mathbf{M}\). We obtain

\[\frac{V_{\ell}}{V_{s}}=\frac{A_{dm}}{s\tau+A_{dm}+sR_{o}C_{\ell}+s^{2}\tau R_{o}C_{\ell}+1},\]

which, of course, is equal to the result from example ex-opamp, expression (223).

../_images/colorCode.svg

The Nullor#

Evaluation of the performance of idealized negative-feedback circuits is an almost daily practice for designers of analog circuits. Such circuits comprise a high-gain amplifying device: the controller and one or more feedback loops. The network abstraction of an ideal controller is a nullor. A nullor consists of two network elements: a nullator and a norator. The nullator sets a network condition, while the norator adds an independent variable such that this condition can be satisfied. Fig. 559 shows the symbol and the MNA stamp of a nullor.

../_images/nullorsComp.svg

Fig. 560 The nullor and an implementations with unity-gain voltage-controlled voltage sources.#

The nullator and norator of the nullor only communicate through the external circuit: there exists no relationship between the input port quantities and the output port quantities. A network comprising \(n\) nullators only has a valid solution if it also has \(n\) norators of which the port variables together create the zero drive conditions for the \(n\) nullators. If more nullors appear in one circuit, one can arbitrarily combine nullators and norators in pairs to form nullors without changing the operation of the circuit.

Many simulators do not have the nullor implemented as a standard component. Fig. 560 shows an implementation of a nullor with two unity-gain voltage-controlled voltage sources.

Below is the definition of a nullor sub-circuit for LTSPICE according to the model from Fig. 560.

1* file: nullor.cir
2* LTspice nullor subcircuit
3.subckt nullor 3 4 1 2
4E1 3 4 3 5 1
5E2 5 4 1 2 1
6.ends nullor

In the following example, we will evaluate the gain of a negative feedback voltage amplifier that has a nullor as controller.

Example

The circuit from Fig. 561 shows the concept of a passive feedback voltage amplifier. We will evaluate the voltage gain from source to load using MNA. The MNA matrix equation can be found as

\[\left( \begin{array} [c]{cccccc} 0 & 0 & 0 & 0 & V_{s} & 0 \end{array} \right) ^{T}=\mathbf{M\cdot}\left( \begin{array} [c]{cccccc} V_{1} & V_{2} & V_{3} & V_{4} & I_{s} & I_{o} \end{array} \right) ^{T},\]

in which the matrix \(\mathbf{M}\) is defined as:

\[\begin{split}\mathbf{M}=\left( \begin{array} [c]{cccccc} \frac{1}{Z_{s}} & -\frac{1}{Z_{s}} & 0 & 0 & 1 & 0\\ -\frac{1}{Z_{s}} & \frac{1}{Z_{s}} & 0 & 0 & 0 & 0\\ 0 & 0 & \frac{1}{Z_{1}}+\frac{1}{Z_{2}} & -\frac{1}{Z_{1}} & 0 & 0\\ 0 & 0 & -\frac{1}{Z_{1}} & \frac{1}{Z_{\ell}}+\frac{1}{Z_{1}} & 0 & -1\\ 1 & 0 & 0 & 0 & 0 & 0\\ 0 & 1 & -1 & 0 & 0 & 0 \end{array} \right) ,\end{split}\]

from which the source-to-load transfer can be found as

\[\frac{V_{\ell}}{V_{s}}=\frac{\mathcal{C}_{5,4}}{\det(\mathbf{M})}=\frac{Z_{1}+Z_{2}}{Z_{2}}.\]
../_images/colorCode.svg

In the following example, we will evaluate the gain of a unity-gain second order active low-pass filter.

Example

Fig. 562 shows the circuit of the two-pole unity-gain active low-pass filter with a nullor as controller. We will derive an expression for the transfer function \(T(s)=\frac{V_{out}}{V_{s}}.\)

../_images/Active-LPF-2.svg

Fig. 562 Second order active low-pass filter with voltage follower.#

To this end, we set up the MNA matrix equation of the circuit and obtain:

\[\left( \begin{array} [c]{cccccc} 0 & 0 & 0 & 0 & V_{s} & 0 \end{array} \right) ^{T}=\mathbf{M\cdot}\left( \begin{array} [c]{cccccc} V_{1} & V_{2} & V_{3} & V_{out} & I_{s} & I_{o} \end{array} \right) ^{T},\]

in which \(I_{s}\) is the unknown current through the signal voltage source and \(I_{o}\) the current delivered by the nullor. The matrix \(\mathbf{M}\) is obtained as:

\[\begin{split}\mathbf{M}=\left( \begin{array} [c]{cccccc} \frac{1}{R_{1}} & -\frac{1}{R_{1}} & 0 & 0 & 1 & 0\\ -\frac{1}{R_{1}} & \frac{1}{R_{1}}+\frac{1}{R_{2}}+sC_{1} & -\frac{1}{R_{2}} & -sC_{1} & 0 & 0\\ 0 & -\frac{1}{R_{2}} & \frac{1}{R_{2}}+sC_{2} & 0 & 0 & 0\\ 0 & -sC_{1} & 0 & sC_{1} & 0 & 1\\ 1 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 1 & -1 & 0 & 0 \end{array} \right) .\end{split}\]

The transfer function \(T(s)\) that describes the transfer from \(V_{s}\) to \(V_{out}\) can be found as

\[T(s)=\frac{V_{out}}{V_{s}}=\frac{\mathcal{C}_{5,4}}{\det(\mathbf{M})}=\frac{1}{1+sC_{2}\left( R_{1}+R_{2}\right) +s^{2}C_{1}C_{2}R_{1}R_{2}}.\]
../_images/colorCode.svg

Overview of MNA stamps#

Fig. 563 gives an overview of the matrix stamps of two-terminal network elements. All elements are considered to be floating with respect to the reference node. Hence, the dimension of their MNA stamp is the sum of the number terminals and the number of dependent currents of the current-controlled elements. Fig. 563G shows a compact matrix stamp for a voltage source in series with an impedance. It assumes that the impedance \(Z\) can be written as a Laplace rational function: \(Z=\frac{N_{z}(s)}{D_{z}(s)}\). Both the numerator \(N_{z}(s)\) and the denominator \(D_{z}(s)\) are polynomials of the Laplace variable \(s\). This way of implementing Laplace rational expressions will be discussed in section Numerator and denominator substitution. This also applies to the matrix stamps of controlled sources. These will be shown in section Numerator and denominator substitution.

Fig. 564 shows the matrix stamps of the nullor (A), the gyrator (B), two coupled inductors (C) and the ideal transformer (D).

../_images/MNA_2T_Stamps.svg

Fig. 563 MNA stamps of two-terminal network elements: A: Resistor; cannot have zero resistance B: Resistor; can have zero resistance C: Capacitor D: Inductor E: Independent current source F: Independent voltage source G: Independent voltage source with series impedance; compact matrix stamp.#

../_images/MNA_4T2_Stamps.svg

Fig. 564 MNA stamps of: A: Nullor B: Gyrator C: Coupled inductors D: Ideal transformer#