1.8 Operation modes of analog simulator
The analog simulator begins the analysis of system equations
and construction of system matrix. The system matrix may be derived from
VHDL-AMS description during the compilation and model generation phase.
Starting point and DC analysis
Every analysis begins with a DC operating point calculation.
The DC operating point represents the DC bias of the circuit. During this
phase only the DC currents and voltages are calculated; the circuits capacitors
are modeled as open circuits and the circuit inductors are modeled as short
circuits.
To calculate the DC operating point, the matrix entries
representing voltage and current sources are set to their proper source
values; the simulator makes an initial guess of the node voltage for every
other node in the circuit and stores the guess in the voltage array.
Then the special routine (load routine) uses the initial
node voltages to calculate the equivalent current and conductance for each
nonlinear component in the circuit (see model linearization). The same
routine calculates the companion model for the capacitor and inductor elements
necessary for transient analysis. The equivalent currents are stored in
the current array and the equivalent conductances in the conductance array
as provided by the templates.
The completed system matrix is passed to the Newton-Raphson
solver to calculate a new set of node voltages. This new set of node voltages
is the first set of iterative voltage values that replace the initial guess
values. Then the load routine is called to recalculate the equivalent current
and conductance values for nonlinear elements.This iterative cycle continues
until either all the node voltages and branch currents are sufficiently
close to the previous iterative values or the number of Newton-Raphson
iteration exceeds the allowed number of iterations (e.g. 200 iteration).
In the last case the simulation process terminated normally, in the former
one a nonconvergence problem arises.
DC sweep analysis
In the DC sweep analysis, a source voltage or current
is stepped over a range of values. In each step the simulator performs
the same DC bias point calculation. In sweep analysis each step may require
from 4 to 100 iterations to obtain the solution for this point.
Because the sweep analysis consists of many evenly espaced
steps it is efficient to use the previous-step solution point as initial
guess to the Newton-Raphson iteration for the next solution point.
AC frequency sweep analysis
The AC frequency sweep starts by calculating the DC bias
of the circuit. The AC frequency sweep is defined as a small-signal linear
analysis. Once the bias has been established, the nonlinear large-signal
transistor and diode models are replaced by their linear small-signal models.
The initial small-signal models are determined from the DC bias point of
the circuit.
Small-signal analysis implies the use of complex quantities
like voltage phase and magnitude. To simulate complex quantities, the voltage,
current, and conductance arrays imply both a real and imaginary component.
The system matrices become complex quantities. Note that for small-signal
models the circuit capacitors and inductor impedances are added to the
complex conductance arrays.
Once the complex currents, voltages, and impedances of
the circuit components are ready in system matrix, the simulator solves
the system equations at each frequency point in the analysis. At each freqeuncy
point, the frequency-dependent impedances are calculated and stored in
the conductance array. The solution algorithm based on Gaussian elimination
(only linear elements are used) determines the complex voltages which satisfy
the circuit equations.
The AC analysis does not need Newton-Raphson iterations
and tends to be much faster than sweep analysis.
Transient time sweep analysis
The transient analysis starts with DC bias point calculation.
The bias point describes the state of the circuit at time t=0. After this
timepoint, the analysis process changes.
For following timepoints , the time-dependent capacitor
and inductor impedances are added to system equations. A numeric integration
routine is used to transform the circuit inductors and capacitors into
simplified equivalent circuits. Note that the equivalent circuits represent
the instantaneous I-V relationship of the component, and the equivalent
circuit changes at each new timepoint.
To resolve the system equations includin nonlinear relations,
the simulator goes through a series of Newton-Raphson iterations at each
timepoint. As the transient analysis progresses, the simulator uses the
prevoius solution voltages as initial guess for the next series of iterations.
Note that transient analysis is most complicated and much
longer than simple DC or AC analysis.