Signal Integrity: Back to Basics

Circuit Simulation – Part Two – How Various Components and Analyses Are Handled

April 20, 2009 · Leave a Comment

(Syndicated content from: http://ping.fm/mj40n)

In part one, we just covered DC analysis of conductances and current sources. What about other analyses and components?

It turns out that pure nodal analysis can’t handle voltages sources because they have infinite conductance. So the answer to puzzle event #3 is voltages sources. (Larry Nagel pointed out in a comment there that non-linear resistor is also a right answer if its current is not a well behaved function of its voltage. So give yourself credit that was your answer and you knew the bit about the current not being a well behaved function of its voltage. :-) )

Supernode in SPICE modified nodal analysis (MNA)

SPICE avoids the infinite conductance problem by modified nodal analysis (MNA). Nodes joined by infinite conductances are considered “super-nodes” whose constituent node voltages Vx and Vy move up and down in lock step. When SPICE creates a super-node the two individual KCL equations are eliminated and replaced by one KCL equation that sums all the currents into both nodes (into the blue dashed oval in the figure above) plus one internal constitutive equation, namely Vx = Vy + Vxy, where Vxy is the known value of the voltage source. Shorts and current sinks (i.e. the input ports of current controlled sources) can be treated similarly.

(MNA isn’t the only solution to the infinite conductance problem. For example Hachtel et al. proposed a sparse tableau method of where both branch currents and node voltages are considered unknown, both KCL and KVL equations are formulated. You then have to pick out a set of linearly independent equations.)

How about more than two terminals? It turns out that when the current source “stamped” its pattern-of-four into the conductance matrix, it was a special case of a more general four terminal “stamp.” The general case is the transconductance:

Transconductance in SPICE

The “pattern of four” is simply displaced off-diagonal in the conductance matrix.

Column a Column b Column x Column y
Row a +Gm −Gm
Row b −Gm +Gm
Row x
Row y

Non-linear (“transient”) analysis

For transient analysis, components are represented in differential or integral form. See the table below. SPICE performs numerical ordinary differential equation (ODE) solution.
Non-linear elements are solved by an iterative method (e.g. Newton-Raphson) at each time step. An initial guess at the node voltages is created (usually all zeros). The slope and intercept of the tangent to the actual I-V curve is used to calculate a linear approximation of the non-linear element. The linear approximation (a conductance and a current source) is inserted into the conductance matrix as a proxy for the real device. Solution of the linear proxy yields better guess at the voltage vector. A new set of conductance/current source proxies is calculated using tangents at the new voltages. This is repeated until — hopefully! — convergence is reached for that time step.

SPICE uses variable time steps. The initial voltage vector guess for each time step is the converged solution of the previous step. If the time step causes accuracy problems, SPICE backtracks by disregarding that calculation and taking a small step from the previous time point.

AC Analysis

For DC analysis, reactive elements — inductors and capacitors — are treated as shorts and opens, respectively. For AC analysis, complex admittance is used in place of real conductance. For example admittance of a capacitor and inductor are jωC and 1/jωL, respectively. Again see the table below.

Table of branch constitutive equations for various components and various analyses in SPICE

Branch constitutive equations for various components and various analyses in SPICE

Please give feedback on this article by leaving a comment below.

Categories: RSS

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment