Nodal Analysis

Nodal analysis provides the network’s nodal voltages from the independent currents flowing into the nodes. It is based upon the application of Kirchhoff’s current law, which states that the sum of the electric currents that flow into a node equals zero (see: Fig. 1).

Kirchhoff's current law

Fig. 1 Kirchhoff’s current law.

Networks with only voltage-controlled elements \(I=f(V)\) can directly be solved with the nodal analysis method. A network element is said to be voltage-controlled if its branch currents are uniquely defined by its branch voltages. This is not the case for current-controlled elements such as voltage sources. These elements have their voltage unambiguously defined by their current \(V=f(I)\). As we will see later, networks with both voltage-controlled and current-controlled elements can be solved using modified nodal analysis (MNA).

In the next section, we will demonstrate the nodal analysis method for a simple network comprising voltage-controlled elements only.

The matrix equation

The procedure for nodal analysis is as follows:

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

  2. Set up the nodal equations for all nodes except the reference node.

    This results in the following matrix equation:

    (1)\[\begin{equation} \mathbf{I}=\mathbf{YV}, \end{equation}\]

    where \(\mathbf{I}\) is the vector with independent currents that flow into a node, \(\mathbf{Y}\) is the admittance matrix, and \(\mathbf{V}\) is the vector with the nodal voltages: the voltages at with respect to the voltage at the reference node.

    A network having \(n\) nodes requires \(n-1\) nodal equations. The voltage of the reference node is usually assigned zero (ground potential).


Example nodal analysis

In this example, we will derive expressions for the transfer of the current source I1 to the voltage \(V_{\ell}\) of the circuit drawn in Figure Fig. 2. Please notice that 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_{a}\) ).

The node at the top of the current source I1 has been selected as the reference node. The value of I1 is \(I_{s}\) and the load voltage \(V_{\ell}\) is taken as the voltage between node (0) and node (2): \(V_{\ell}=V_0-V_2=-V_2\).

Kirchhoff's current law

Fig. 2 Circuit for demonstration of NA.

The nodal equations for nodes (1) and (2) are:

(2)\[\begin{split} \begin{align} \text{node 1:} & \hspace{1cm}0=I_{s}+V_{1}sC_{a}+V_{1}\frac{1}{R_{a} }+\left( V_{1}-V_{2}\right) sC_{b},\\ \text{node 2:} & \hspace{1cm}0=V_{2}\frac{1}{R_{b}}+\left( V_{2} -V_{1}\right) sC_{b}. \end{align}\end{split}\]

These equations can be written using matrix notation as:

(3)\[\begin{split}\begin{equation} \left( \begin{array} [c]{c}% -I_{s}\\ 0 \end{array} \right) =\left( \begin{array} [c]{cc}% s\left( C_{a}+C_{b}\right) +\frac{1}{R_{1}} & -sC_{b}\\ -sC_{b} & sC_{b}+\frac{1}{R_{b}}% \end{array} \right) \left( \begin{array} [c]{c}% V_{1}\\ V_{2}% \end{array} \right) , \end{equation}\end{split}\]

or, alternatively

(4)\[\begin{equation} \left( \begin{array} [c]{cc}% -I_{s} & 0 \end{array} \right) ^{T}=\mathbf{Y}\left( \begin{array} [c]{cc}% V_{1} & V_{2}% \end{array} \right) ^{T}, \end{equation}\]

where the admittance matrix \(\mathbf{Y}\) equals:

(5)\[\begin{split}\begin{equation} \mathbf{Y}=\left( \begin{array} [c]{cc}% s\left( C_{a}+C_{b}\right) +\frac{1}{R_{a}} & -sC_{b}\\ -sC_{b} & sC_{b}+\frac{1}{R_{b}}% \end{array} \right). \end{equation}\end{split}\]

SLiCAP example nodal analysis

The SLiCAP netlist NA-2.cir for the circuit from Fig. 2 is:

The SLiCAP script NA-2.py that displays the matrix equation on a html page is:

View the html ouput generated by this script.

The matrix equations match those of (3) and the expression for the (transimpedance) gain equals (15).

Download the archive NA-2.zip of this example.

General form of the admittance matrix

The general form of the nodal equation (Kirchhoff’s current law) for node \(k\) is:

\[\begin{equation} \sum i_{k}=-\sum\mathbf{Y}_{k,1}v_{1}-\sum\mathbf{Y}_{k,2}v_{2}\quad ...+\sum\mathbf{Y}_{k,k}v_{k}\quad...-\sum\mathbf{Y}_{k,n-1}v_{n-1}, \end{equation}\]

where:

\[\begin{split}\begin{align} \sum\mathbf{Y}_{k,j} & =\text{sum of the admittances connected between node }k\text{ and node }j;\nonumber\\ \sum\mathbf{Y}_{k,k} & =\text{sum of the admittances connected to node }k;\\ \sum i_{k} & =\text{sum of the independent currents flowing into node }k. \end{align}\end{split}\]

In other words: a diagonal element \(\mathbf{Y}_{k,k}\) of the admittance matrix \(\mathbf{Y}\) equals the sum of the admittances of each network element connected to node \(k\). So, the first diagonal element is the sum of admittances connected to node \(1\), the second diagonal element is the sum of admittances connected to node \(2\), and so on.

The off-diagonal elements \(\mathbf{Y}_{k,j}\) comprise the sum of the negative admittances of the network elements connected between node \(k\) and node \(j\).

Matrix stamps

Kirchhoff's current law

Fig. 3 Matrix stamp of an admittance.

According to the above, an admittance between nodes \(1\) and \(2\) appears in the admittance matrix \(\mathbf{Y}\) at locations \((1,1)\) and \((2,2)\) with a positive sign and at locations \((1,2)\) and \((2,1)\) with a negative sign.

Figure Fig. 3 shows the so-called matrix stamp of an admittance placed in the admittance matrix of a network with \(n\) nodes including the reference node.

A network with passive elements alone, has a symmetrical admittance matrix \(\mathbf{Y}_{j,k}=\mathbf{Y}_{k,j}.\)


View matrix stamps with SLiCAP

Show the way in which a matrix stamp of an element can be displayed with SLiCAP.

Network solution

  1. The nodal voltages are found from

    (6)\[\begin{equation} \mathbf{V}=\mathbf{Y}^{-1}\mathbf{I}. \end{equation}\]
  2. The branch currents \(I(j,k)\) \(\left( j\neq k\right)\) are found from

    (7)\[\begin{equation} I(j,k)=\left( V_{j}-V_{k}\right) Y_{j,k}. \end{equation}\]

Matrix inversion

A brief summary: introduce minors, cofactors, etc.

Network response

Cramer’s rule.

Transfer function

The transimpedance from a current \(I_{k}\) flowing into node \(k\) to a voltage \(V_{j}\) at node \(j\) is found as:

(8)\[\begin{equation} \frac{\mathbf{V}_{j}}{\mathbf{I}_{k}}=\mathbf{Y}_{j,k}^{-1}, \label{eq-MNAtransfer} \end{equation}\]

in which \(\mathbf{Y}_{j,k}^{-1}\) is the coefficient \(j,k\) of the inverse of the admittance matrix \(\mathbf{Y}^{-1}\). It can be obtained as

(9)\[\begin{equation} \left( \mathbf{Y}^{-1}\right) _{j,k}=\frac{\mathcal{C}_{k,j}}{\det (\mathbf{Y})}, \label{eq-MNAtransferCofactor} \end{equation}\]

in which the cofactor \(\mathcal{C}_{k,j}\) is a coefficient of the cofactor matrix \(\mathcal{C}\) of \(\mathbf{Y}\). It is defined as the determinant of the minor matrix \(\mathcal{M}_{k,j}\), multiplied by \(\left( -1\right) ^{j+k}\).

(10)\[\begin{equation} \mathcal{C}_{kj}=\left( -1\right) ^{j+k}\det(\mathcal{M}_{k,j}). \end{equation}\]

The minor matrix \(\mathcal{M}_{k,j}\) is the matrix \(\mathbf{M}\) with the \(k-th\) row and the \(j-th\) column left out.

If an independent current source is supplying a current \(I_{s}\) into node \(p\) and drawing a current from node \(q\), the transfer \(Z_{t}\) from that current source to the voltage between node \(m\) and node \(n\) is found as:

(11)\[\begin{equation} Z_{t}=\frac{V_{m}-V_{n}}{I_{s}}=\frac{\mathcal{C}_{p,m}-\mathcal{C}% _{p,n}-\mathcal{C}_{q,m}+\mathcal{C}_{q,n}}{\det(\mathbf{Y})}. \end{equation}\]
Current to voltage transfer in a network.

Fig. 4 Current to voltage transfer of a network.

Fig. 4 A shows the circuit with \(I_{s}\) flowing from node \(p\) to node \(q\). This branch current can be redirected via the ground node as shown in Fig. 4 B.

By doing so, the figure clearly shows four contributions to the differential voltage \(V_{m}-V_{n}\). Each contribution is given by one term in (11):

  1. \(\frac{\mathcal{C}_{p,m}}{\det(\mathbf{Y})}\) represents the transfer from the current flowing into node \(p\) to the voltage \(V_m\) at node \(m\).

    Since \(I_s\) is flowing into node \(p\), and \(V_{m,n}=+V_m-V_n\) the first term in \(Z_t\) is: \(\frac{+\mathcal{C}_{p,m}}{\det(\mathbf{Y})}\).

  2. \(\frac{\mathcal{C}_{p,n}}{\det(\mathbf{Y})}\) represents the transfer from the current flowing into node \(p\) to the voltage \(V_n\) at node \(n\).

    Since \(I_s\) is flowing from node \(p\), and \(V_{m,n}=+V_m-V_n\) the second term in \(Z_t\) is: \(\frac{-\mathcal{C}_{p,n}}{\det(\mathbf{Y})}\).

  3. \(\frac{\mathcal{C}_{q,m}}{\det(\mathbf{Y})}\) represents the transfer from the current flowing into node \(q\) to the voltage \(V_m\) at node \(m\).

    Since \(I_s\) is flowing from node \(q\), and \(V_{m,n}=+V_m-V_n\) the third term in \(Z_t\) is: \(\frac{-\mathcal{C}_{q,m}}{\det(\mathbf{Y})}\).

  4. \(\frac{\mathcal{C}_{q,n}}{\det(\mathbf{Y})}\) represents the transfer from the current flowing into node \(q\) to the voltage \(V_n\) at node \(n\).

    Since \(I_s\) is flowing from node \(p\), and \(V_{m,n}=+V_m-V_n\) the fourth term in \(Z_t\) is: \(\frac{+\mathcal{C}_{q,n}}{\det(\mathbf{Y})}\).


Determination of a transfer function

Kirchhoff's current law

Fig. 5 Circuit for determination of a transfer function

The current-to-voltage transfer \(\frac{V_{\ell}}{I_s}\) can be obtained with the aid of (11) using \(p=0\), \(q=1\), \(m=0\) and \(n=2\), which yields:

(12)\[\begin{equation} Z_{t}=\frac{\mathcal{C}_{1,2}}{\det(\mathbf{Y})}, \end{equation}\]

where

(13)\[\begin{split}\begin{align} \mathcal{C}_{1,2} & =\left( -1\right) ^{3}\det\left( -sC_{b}\right) ,\\ \mathcal{C}_{1,2} & =sC_{b}, \end{align}\end{split}\]

and

(14)\[\begin{split}\begin{align} \det(\mathbf{Y}) & =\det\left( \begin{array} [c]{cc}% s\left( C_{a}+C_{b}\right) +\frac{1}{R_{a}} & -sC_{b}\\ -sC_{b} & sC_{b}+\frac{1}{R_{b}}% \end{array} \right) ,\\ & =\frac{1+s\left(\left(C_{a}+C_{b}\right) R_{a}+C_{b}R_{b}\right) +s^{2}C_{a}C_{b}R_{a}R_{b}}{R_{a}R_{b}}. \end{align}\end{split}\]

After substitution of (13) and (14) in (12), the transimpedance is found as:

(15)\[\begin{equation} Z_{t}=\frac{sC_{b}R_{a}R_{b}}{1+s\left( \left( C_{a}+C_{b}\right) R_{a}+C_{b}R_{b}\right) + s^{2}C_{a}C_{b}R_{a}R_{b}}. \end{equation}\]

The transfer \(Z_{t}\) has one zero at \(s=0\) (no DC transfer) and two poles that are the solutions for \(s\) of (14).


In the following example, we will demonstrate the use of SLiCAP for setting-up the matrix equations for the circuit from Figure Fig. 2 and for evaluation of the transfer.


SLiCAP example determination of a transfer function

We will now determine the current-to-voltage transfer from expression (15) with SLiCAP. To this end, we need to define the source and the detector, set the gain type to gain and the data type to laplace. The lines below show the way to do this:

View the html ouput generated by this script.

The matrix equations match those of (3) and the expression for the (transimpedance) gain equals (15).

Download the archive NA-2.zip of this example.