1 Introduction
In this post, we’re going to see how the operating point of a circuit can be found in the presence of non-linear elements. Before reading further, make sure you have read my previous post on the Newton-Raphson method.
2 Circuit Description
To illustrate how the process works, we’re going to consider a simple circuit with components whose derivatives are easy to calculate.
The description of the circuit is given below.
- A resistor $R_{1}$ connected between node 1 ($V_{1}$) and an independent voltage source ($V_{\operatorname{in}}$).
- A non-linear device $\phi _{1}$, whose current is explicitly given by $\phi _{1} (V_{1}, V_{2}) = a \cdot (V_{1} - V_{2})^2$, connected between node 1 ($V_{1}$) and node 2 ($V_{2}$).
- A capacitor $C_{1}$ connected between node 1 ($V_{1}$) and node 2 ($V_{2}$). This can be thought of as the parasitic capacitance associated with $\phi _{1}$.
- A resistor $R_{2}$ connected between node 2 ($V_{2}$) and ground.
- A non-linear device $\phi _{2}$, whose current is explicitly given by $\phi _{2} (V_{2}) = b \cdot (V_{2})^2$, connected between node 2 ($V_{2}$) and ground.
- A capacitor $C_{2}$ connected between node 2 ($V_{2}$) and ground. This can be thought of as the parasitic capacitance associated with $\phi _{2}$.
3 Operating Point Analysis
The operating point analysis calculates the steady-state solutions of the circuit. By definition, after all transients die out, the voltages across inductors and the currents through capacitors become equal to zero. Consequently, branches containing capacitances are replaced with independent zero current sources while inductances are replaced with independent zero voltage sources.
Let’s write the Kirchhoff’s Current Law (KCL) equations for nodes 1 and 2:
At node 1:
\begin{equation} \frac{V_{1} - V_{\operatorname{in}}}{R_{1}} + a \cdot (V_{1} - V_{2})^2 = 0 \tag{1} \end{equation}
At node 2:
\begin{equation} \frac{V_{2}}{R_{2}} + b \cdot (V_{2})^2 + a \cdot (V_{1} V_{2})^2 = 0 \tag{2} \end{equation}
To apply the Newton-Raphson method, we start with an initial guess for the unknown voltages, and then iteratively update the guess using the Newton-Raphson update equation:
\begin{equation} \boldsymbol{V}^{(k + 1)} =\boldsymbol{V}^{(k)} - (J (\boldsymbol{V}^{(k)}))^{- 1} F (\boldsymbol{V}^{(k)}) \tag{3} \end{equation}
The function vector is given by:
\begin{equation} F (\boldsymbol{V}) = \left[ \begin{array}{c} f_{1} (V_{1}, V_{2})\\\ f_{2} (V_{1}, V_{2}) \end{array} \right] = \left[ \begin{array}{c} \frac{V_{1} - V_{\operatorname{in}}}{R_{1}} + a \cdot (V_{1} - V_{2})^2\\\ \frac{V_{2}}{R_{2}} + b \cdot (V_{2})^2 - a \cdot (V_{1} - V_{2})^2 \end{array} \right] \tag{4} \end{equation}
The Jacobian matrix is given by:
\begin{equation} J = \left[ \begin{array}{cc} \frac{\partial f_{1}}{\partial V_{1}} & \frac{\partial f_{1}}{\partial V_{2}}\\\ \frac{\partial f_{2}}{\partial V_{1}} & \frac{\partial f_{2}}{\partial V_{2}} \end{array} \right] = \left[ \begin{array}{cc} \frac{1}{R_{1}} + 2 a \cdot (V_{1} - V_{2}) & - 2 a \cdot (V_{1} - V_{2})\\\ - 2 a \cdot (V_{1} - V_{2}) & \frac{1}{R_{2}} + 2 b \cdot V_{2} + 2 a \cdot (V_{1} - V_{2}) \end{array} \right] \tag{5} \end{equation}
Now, you can iteratively update the voltage vector $\boldsymbol{V}$ until convergence is achieved (i.e., when the change in $V$ between iterations is below a certain threshold).
3.1 Python Implementation
|
|
The solution converged after 7 iterations.
|
|
4 DC Sweep Anlysis
A DC sweep analysis is used to analyze the behavior of a circuit over a range of DC voltage or current values. It helps to understand how the circuit performs when the DC input varies. Performing a DC sweep analysis involves performing an operating point analysis for each sweep value. This can be time-consuming, especially for large or complex circuits. In many cases, the circuit being analyzed may have only small changes in the component between successive analysis runs. As a result, the operating point of the circuit may not change significantly from one analysis to the next. In such cases, using the previous solution as an initial guess can lead to faster convergence, since it provides a good starting point for the solver to refine the solution.
4.1 Python Implementation
The implementation is the same as the one for the operating point analysis.
|
|
The result of the simulation is given below.
|
|