# Modified nodal analysis

In electrical engineering, modified nodal analysis or MNA is an extension of nodal analysis which not only determines the circuit's node voltages (as in classical nodal analysis), but also some branch currents. Modified nodal analysis was developed as a formalism to mitigate the difficulty of representing voltage-defined components in nodal analysis (e.g. voltage-controlled voltage sources). It is one such formalism. Others, such as sparse tableau formulation, are equally general and related via matrix transformations.

## Method

The MNA uses the element's branch constitutive equations or BCE, i.e., their voltage - current characteristic and the Kirchhoff's circuit laws. The method is often done in four steps, but it can be reduced to three:
Step 1
Write the KCL equations of the circuit. At each node of an electric circuit, write the currents coming into and out of the node. Take care, however, in the MNA method, the current of the independent voltage sources is taken from the "plus" to the "minus" (see Figure 1). Also, note that the right hand side of each equation is always equal to zero, so that the branch currents that come into the node are given a negative sign and those that go out are given a positive sign.
Step 2
Use the BCEs in terms of the node voltages of the circuit to eliminate as many branch currents as possible. Writing the BCEs in terms of the node voltages saves one step. If the BCEs were written in terms of the branch voltages, one more step, i.e., replacing the branches voltages for the node ones, would be necessary. In this article the letter "e" is used to name the node voltages, while the letter "v" is used to name the branch voltages.
Step 3
Finally, write down the unused equations.

## Example

The figure shows a RC series circuit and the table shows the BCE of a linear resistor and a linear capacitor. Note that in the case of the resistor the admittance $G$ i, $G=1/R$, is used instead of $R$. We now proceed as explained above.
| Element | Branch equation |
| Resistor | $I_{R}=GV_{R}$ |
| Capacitor | $I_{C}=C{\frac {dV_{C}}{dt}}$ |
Step 1
In this case there are two nodes, $e_{1}$ and $e_{2}$. Also there are three currents: $i_{V_{s}}$, $i_{R}$ and $i_{C}$.
At node e1 the KCL yields:
$i_{V_{s}}+i_{R}=0$
and at node e2:
$-i_{R}+i_{C}=0$
Step 2
With the provided BCEs in the table and observing that:
$V_{s}=e_{1}$
$V_{R}=e_{1}-e_{2}$
$V_{C}=e_{2},$
the following equations are the result:
$G(e_{1}-e_{2})+i_{V_{S}}=0$
$C{\frac {de_{2}}{dt}}+G(e_{2}-e_{1})=0$
Step 3
Note that at this point there are two equations but three unknowns. The missing equation comes from the fact that
$e_{1}=V_{s}$
and so finally we have three equations and three unknowns, that leads to a solvable linear system.

### Modified Nodal Analysis and DAEs

If the vector $\mathbf {x} ={\begin{pmatrix}e_{1}&e_{2}&i_{V_{S}}\end{pmatrix}}^{T}$ is defined, then the above equations can be put in the form $Ex'(t)+Ax(t)=f,$
where $A={\begin{pmatrix}G&-G&1\\-G&G&0\\1&0&0\end{pmatrix}}$, $E={\begin{pmatrix}0&0&0\\0&C&0\\0&0&0\end{pmatrix}}$ and $f={\begin{pmatrix}0&0&V_{s}\end{pmatrix}}^{T}$.
This is a linear differential algebraic equation (DAE), since $E$ is singular. It can be proved that such a DAE coming from the Modified Nodal Analysis will have differentiation index less or equal than two as long as only passive RLC components are used. When using active components, such as operational amplifiers, the differentiation index can be arbitrarily high.

## Non-smooth analysis

DAEs assume smooth characteristics for individual components; for example, a diode can be modeled/represented in a MNA with DAEs via the Shockley equation, but one cannot use an apparently simpler (more ideal) model where the sharply exponential forward and breakdown conduction regions of the curve are just straight vertical lines. Circuit analysis (including MNA) with the latter kind of equations is actually more involved (than using DAEs) and is the topic of non-smooth dynamical systems (NSDS) analysis, which relies on the theory of differential inclusions.