Nodal Analysis¶
Prerequisites for this topic
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).
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:
Set up the circuit diagram, select a reference node and number all remaining nodes.
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\).
The nodal equations for nodes (1) and (2) are:
These equations can be written using matrix notation as:
or, alternatively
where the admittance matrix \(\mathbf{Y}\) equals:
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:
where:
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¶
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¶
The nodal voltages are found from
(6)¶\[\begin{equation} \mathbf{V}=\mathbf{Y}^{-1}\mathbf{I}. \end{equation}\]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:
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
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}\).
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:
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):
\(\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})}\).
\(\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})}\).
\(\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})}\).
\(\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
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:
where
and
After substitution of (13) and (14) in (12), the transimpedance is found as:
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.