Setting up Norton Equivalent of RLC circuit automatically

passive-networksspice

I'm trying to gain a better understanding of how the internal SPICE solve works, and for the most part I understand the basics of DC analysis and transient analysis when it comes to RLC networks. The big issue I'm running into is how to handle circuits with voltage sources instead of a current sources. Dr. Mitcheson's Lecture notes suggests converting voltage sources to a Norton equivalent current source. However, I am having a hard time figuring out how to automatically calculate the Norton equivalent circuit params in code.

Current strategy (no pun intended):

  1. Resistors have a basic 2×2 elemental conductance matrix.
    \begin{equation}\boldsymbol G =
    \begin{bmatrix}
    \frac{1}{R} & \frac{-1}{R}\\
    \frac{-1}{R} & \frac{1}{R}
    \end{bmatrix}
    \end{equation}
  2. Capacitors are converted into a simple numerical derivative:
    \begin{equation}
    \frac{I_c^{k+1} + I_c^k}{2} = c \frac{V^k – V^{k-1}}{\Delta t}
    \end{equation}
    Here k is the current time step and k-1 is the previous time step. Can easily be converted into a 2×2 elemental conductance matrix.
  3. Inductors are approximated with a numerical integration (trapezoidal rule).
    \begin{equation}
    I_L^k = \frac{\Delta t}{2 L} \left ( V^k + V^{k-1} \right ) + I_L^{k-1}
    \end{equation}
    Here k is the current time step and k-1 is the previous time step. Can easily be converted into a 2×2 elemental conductance matrix.
  4. Currents should be known for all nodes at the previous time step and current time step.
  5. Superimpose all elements together to get linear system which can be solved with any matrix solver. Repeat for each time step.

From the above capacitor and inductor approximations I can create an equivalent resistor model which is valid at that time step only and work only with a pseudo-resistive network for calculating the Norton equivalent, which would be quite simple by hand.

Is my strategy at all valid? If so, how would I take the next step and make a computer perform the same calculation?

Best Answer

This doesn't quite answer the same question as how to resolve Norton Equivalent current/resistance using a computer, but it does offer an alternative route to handling voltage sources (which was the original goal): Modified Nodal Analysis

The basic idea is to treat the currents as additional unknowns. We can then add a few extra linear equations describing the current, and by adding in "trivial" equations we can continue to use known voltages as "unknown quantities". This makes combining the elemental matrices still a trivial task, and we just end up with a slightly larger matrix to solve.