# Setting up Norton Equivalent of RLC circuit automatically?

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 2x2 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 2x2 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 2x2 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?

• for AC you can use complex analysis. – ralu Mar 14 '13 at 20:06