Product Documentation
Spectre Circuit Simulator Reference
Product Version 23.1, September 2023

Stability Analysis (stb)

Description

The STB analysis linearizes the circuit about the DC operating point and computes the loop gain and gain and phase margins (if the sweep variable is frequency)for a feedback loop or a gain device.

Spectre can perform the analysis while sweeping a parameter. The parameter can be frequency, temperature, component instance parameter, component model parameter, or netlist parameter. If changing a parameter affects the DC operating point, the operating point is recomputed at each step. You can sweep the circuit temperature by giving the parameter name as temp, without a dev or mod parameter. You can sweep a netlist parameter by giving the parameter name without a dev or mod parameter. After the analysis is complete, the modified parameter returns to its original value.

Syntax

Name stb parameter=value ...

Parameters

prevoppoint

no

Use the operating point computed on the previous analysis. Possible values are no and yes.

Sweep interval parameters

start

0

Start sweep limit.

stop

Stop sweep limit.

center

Center of sweep.

span

0

Sweep limit span.

step

Step size, linear sweep.

lin

50

Number of steps, linear sweep.

dec

Points per decade.

log

50

Number of steps, log sweep.

values

[...]

Array of sweep values.

valuesfile

Name of the file containing the sweep values.

Sweep variable parameters

dev

Device instance whose parameter value is to be swept.

mod

Model whose parameter value is to be swept.

param

Name of parameter to sweep.

freq

(Hz)

Frequency when parameter other than frequency is being swept.

Probe parameters

probe

Probe instance around which the loop gain is calculated.

localgnd

Node name of local ground. If not specified, the probe is referenced to global ground.

State-file parameters

readns

File that contains estimate of DC solution (nodeset).

write

DC operating point output file at the first step of the sweep.

writefinal

DC operating point output file at the last step of the sweep.

Initial condition parameters

force

none

Which set of initial conditions to use. Possible values are none, node, dev and all.

readforce

File that contains initial conditions.

skipdc

no

Skip the DC analysis. Possible values are no and yes.

useprevic

no

If set to yes or ns, use the converged initial condition from previous analysis as ic or ns. Possible values are no, yes and ns.

Output parameters

save

Signals to output. Possible values are all, lvl, allpub, lvlpub, selected, none and nooutput.

nestlvl

Levels of subcircuits to output.

oppoint

no

Should operating point information be computed; if yes, where should it be sent. Operating point information would not be output if the operating point computed in the previous analysis remains unchanged. Possible values are no, screen, logfile and rawfile.

Convergence parameters

restart

yes

Restart the DC solution from scratch if any condition has changed. If not, use the previous solution as initial guess. Possible values are no and yes.

Annotation parameters

annotate

sweep

Degree of annotation. Possible values are no, title, sweep, status and steps.

title

Analysis title.

margininfo_unstable

no

Print GainMargin and PhaseMargin info when the circuit is actually not stable. Possible values are no and yes.

diffprobe

DiffProbe instance around which the loop gain is calculated.

swap

Swap decides the connection of diffprobes to the circuit.

mode

Mode decides the calculation mode for diffprobes, e.g. CM for common-mode or DM for differential mode.

You can define sweep limits by specifying the end points or the center value and span of the sweep. Steps can be linear or logarithmic, and you can specify the number of steps or the size of each step. You can specify a step size parameter (step, lin, log or dec) to determine whether the sweep is linear or logarithmic.  If you do not specify a step size parameter, the sweep is linear when the ratio of stop to start values is less than 10 and logarithmic when this ratio is 10 or greater. All frequencies are in Hertz.

The small-signal analysis begins by linearizing the circuit about an operating-point. By default this analysis computes the operating point, if it is not known, or recomputes it if any significant component or circuit parameter has changed.  However, if a previous analysis computed an operating point, you can set prevoppoint=yes to avoid recomputing it.  For example, if you use this option when the previous analysis was a transient analysis, the operating point is the state of the circuit on the final time point.

Nodesets help find the DC or the initial transient solution. You can specify nodesets in the circuit description file with nodeset statements or in a separate file by using the readns parameter. When nodesets are specified, Spectre computes an initial guess of the solution by performing DC analysis, while forcing the specified values on to nodes by using a voltage source in series with a resistor whose resistance is rforce. Spectre then removes these voltage sources and resistors and computes the required solution from this initial guess.

Nodesets have two important uses. First, if a circuit has two or more solutions, nodesets can bias the simulator towards computing the required solution. Second, this is a convergence aid. By estimating the solution of the largest possible number of nodes, you might be able to eliminate a convergence problem or significantly speed up convergence.

When you simulate the same circuit multiple times, it is recommended that you use both write and readns parameters and assign the same file name to both parameters. DC analysis then converges quickly even if the circuit has changed since the last simulation, and the nodeset file is automatically updated.

During the initial operating point DC analysis, you may force some of the circuit variables to the values given in the ic file, ic statements, or ic parameter on the capacitors and inductors. The ic parameter controls the interaction of the various methods for setting the force values. The effects of individual settings are as follows:

force=none:   Any initial condition specifiers are ignored.

force=node:   The ic statements are used, and the ic parameter on the capacitors and inductors are ignored.

force=dev:   The ic parameters on the capacitors and inductors are used, and the ic statements are ignored.

force=all:   Both the ic statements and the ic parameters are used, with the ic parameters overriding the ic statements.

If you specify an ic file with the readforce parameter, force values from the file are used, and any ic statements are ignored.

After you specify the initial conditions, Spectre computes the DC operating point with the specified nodes forced to the given value by using a voltage source in series with a resistor whose resistance is rforce (see options).

Understanding Loop-Based and Device-Based Algorithms

Two algorithms-loop-based and device based are available for small-signal stability analysis. Both algorithms are based on the calculation of Bode's return ratio. Loop gain waveform, gain margin, and phase margin are the analysis output.

The probe parameter must be specified to perform stability analysis. When it points to a current probe or voltage source instance, the loop-based algorithm is run; when it points to a supported active device instance, the device-based algorithm is run.

Loop-Based Algorithm

The loop-based algorithm calculates the true loop gain, which consists of normal loop gain and reverse loop gain. The loop-based algorithm requires the probe being placed on the feedback loop to identify and characterize the particular loop of interest. The introduction of the probe component should not change any of the circuit characteristics.

The loop-based algorithm provides accurate stability information for single loop circuits and also for multi-loop circuits in which a probe component can be placed on a critical wire to break all loops. For a general multi-loop circuit, such a critical wire may not be available. The loop-based algorithm can only be performed on individual feedback loops to ensure that they are stable. Although the stability of all feedback loops is only a necessary condition for the whole circuit to be stable, the multi-loop circuit tends to be stable if all individual loops are associated with reasonable stability margins.

For the loop based algorithm, a probe needs to be placed on the feedback loop.The common way is to insert a current probe or voltage source instance in the netlist, and the probe parameter points to this instance. The second way to insert the probe is by specifying the terminal of some instance.

The syntax format :

probe = X:n

X can be an instance or a subcircuit instance and n is the terminal index. The second way has a limitation: We can not specify a branch whose current consists of more than one instance's terminal current. A current probe or voltage source instance needs to be inserted manually.

This can be shown below:

___

|----|___|-----|

|-----||-------|

| |<--- probe

| ___ |__|---||---|

|---|___|--||__ |

=== | | |

|--------------|--------|

No instance can specify the probe's location.

Device-Based Algorithm

The device-based algorithm calculates the loop gain around a particular active device. This algorithm is often applied to assess the stability of circuit design in which local feedback loops cannot be neglected; the loop-based algorithm cannot be performed for these applications because the local feedback loops are inside the devices and cannot be accessed from the schematic or netlist level to insert the probe component.

With the probe parameter pointing to a particular active device, the dominant controlled source in the device is nulled during the analysis. The dominant controlled source is defined as by nulling this source renders the active device to be passive. The device-based algorithm produces accurate stability information for a circuit in which a critical active device can be identified, so that nulling the dominant gain source of this device renders the whole network passive.

Stability Analysis of Differential Feedback Circuits

A balanced fully differential feedback circuit is illustrated below:

|---------[ ZF ]---------|

| |

| X1

| |------------------| |

| | | |

... ---[ ZS ]---|--|in+ out- |--|---[ ZL ]--- ...

| OPAMP |

... ---[ ZS ]---|--|in- out+ |--|---[ ZL ]--- ...

| | | |

| |------------------| |

| X2

| |

|---------[ ZF ]---------|

The feedback loops are broken at X1 and X2, with x1in and x2in being the input side nodes and x1out and x2out being the output side nodes. The following subcircuit connects these four nodes together:

subckt diffprobe x1in x2in x1out x2out

ibranch inout x1out iprobe

vinj inout x1in iprobe

evinj x2in x2out x1in x1out vcvs gain=0

fiinj 0 x2out pcccs probes=[ibranch vinj] coeffs=[0 1 1] gain=0

ends diffprobe

If the 'localgnd' parameter is specified, the above subcircuit should be modified as follows:

subckt diffprobe x1in x2in x1out x2out localgnd

ibranch inout x1out iprobe

vinj inout x1in iprobe

evinj x2in x2out x1in x1out vcvs gain=0

fiinj localgnd x2out pcccs probes=[ibranch vinj] coeffs=[0 1 1] gain=0

ends diffprobe

Let diffprobe_inst be the instance of subcircuit diffprobe, the following analysis measures the differential-mode loop gain:

DMalterv alter dev=diffprobe_inst.evinj param=gain value=-1

DMalteri alter dev=diffprobe_inst.fiinj param=gain value=-1

DMloopgain stb probe=diffprobe_inst.vinj

and, the following analysis measures the common-mode loop gain:

CMalterv alter dev=diffprobe_inst.evinj param=gain value=1

CMalteri alter dev=diffprobe_inst.fiinj param=gain value=1

CMloopgain stb probe=diffprobe_inst.vinj


Return to top
 ⠀
X