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

AC Analysis (ac)

Description

AC analysis linearizes the circuit about the DC operating point and computes the response to a given small sinusoidal stimulus.

Spectre can perform AC 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. In addition, 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 ac parameter=value ...

Parameters

prevoppoint

no

Use the operating point computed in 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 a parameter other than frequency is being swept.

State-file parameters

readns

File that contains an estimate of the 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

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

readforce

File that contains initial conditions.

skipdc

no

Skip 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

Determines whether operating point information should be computed:if yes, where should it be printed (screen or file). Operating point information is not printed 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 an 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.

perturbation

linear

The type of AC analysis. Default is linear for normal AC analysis. im2ds is for im2 distortion summary and ds is for distortion summary. Possible values are linear, ds, ip3, ip2, im2ds, multiple_beat and triple_beat.

flin_out

0 Hz

Frequency of linear output signal.

fim_out

0 Hz

Frequency of IM output signal.

out1

NULL

Output signal 1.

out2

NULL

Output signal 2.

contriblist

NULL

Array of device names for distortion summary. When contriblist=[""], distortion from each non-linear device is calculated.

maxharm_nonlin

4

Maximum harmonics of input signal frequency induced by non-linear effect.

rfmag

0

RF source magnitude.

rfdbm

0

RF source dBm.

rf1_src

NULL

Array of RF1 source names for IP3/IP2/IM2DistortionSummary.

rf2_src

NULL

Array of RF2 source names for IP3/IP2/IM2DistortionSummary.

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 an operating point was computed during a previous analysis, you can set prevoppoint=yes to avoid recomputing it. For example, if prevoppoint=yes and the previous analysis was a transient analysis, the operating point is the state of the circuit at 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 certain circuit variables to use the values given in the ic file, ic statements, or ic parameter on the capacitors and inductors. The ic parameter controls the interaction of various methods of setting the force values. The effects of individual settings are as follows:

force=none:All initial conditions are ignored.

force=node:The ic statements are used, and the ic parameters 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 ic statements and 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).


Return to top
 ⠀
X