General Sweep Specification

In this topic:

Overview

SIMetrix features a common sweeping algorithm which is used to define the swept analysis modes: .DC, .AC, .NOISE and (now) .TF, along with multiple analyses such as Monte Carlo.

The sweep algorithm has 6 modes:

  • Device. Sweeps a single default value of a specified device. E.g. voltage of a voltage source, resistance of a resistor or the capacitance of a capacitor.
  • Temperature
  • Parameter. Parameter can be referenced in an expression for a model or instance parameter.
  • Model parameter. Named model parameter.
  • Frequency. (Not applicable to .DC)
  • Monte Carlo. Perform a specified number of steps with distribution functions (i.e tolerances) enabled.
Standard SPICE only provides a subset of the above. .DC can only sweep voltage and current sources, .AC and .NOISE can only sweep frequency while .TF can't be swept at all.

As well as providing 6 modes, each of the modes can sweep in four different ways. These are linear, decade, octave and list.

Syntax

All the swept analysis modes use the same general syntax to specify the sweep parameters. However, to maintain compatibility with SPICE and its derivatives including earlier versions of SIMetrix, each analysis mode allows variations to this standard syntax. The general syntax is described below while the variations allowed for each analysis mode are described in the section dedicated to that analysis mode.

All of the analysis modes can optionally be entered in a similar manner to .MODEL statements i.e. as an unordered list of parameter names followed by their values. For example, the following is a perfectly legal noise analysis specification:

.noise V=vout DEVICE=V1 VN=0 F=1k LIN=(100 -10m 10m)
+ INSRC=V1

In the various forms of the syntax described in the following sections, some of the parameter names may be omitted as long as they are entered in a particular order. It is sometimes, however, easier to remember parameter names rather than a default order, so the method described above may be more convenient for some users.

General syntax for swept analyses

.AC|.DC|.NOISE|.TF sweep_spec [ analysis specific parameters ]

sweep_spec: One of the following:

DEVICE device_name step_spec F frequency
TEMP step_spec F frequency
PARAM param_name step_spec F frequency
MODEL model [PARAM] mod_param_name step_spec F frequency
FREQ step_spec
MONTE num_steps F frequency

Where

device_name Name of device to be swept. The following components may be swept: Capacitors, all controlled sources, fixed current source, fixed voltage source, inductors and resistors.
param_name Name of parameter used in expression. Expressions may be used to define an instance or model parameter and may also be used in arbitrary sources.
model Name of model containing parameter to be swept
mod_param_name Name of model parameter
num_steps Number of steps to be performed for Monte Carlo sweep.
frequency Specified frequency for which .NOISE, .AC and .TF analyses are to be performed. May be zero for .AC and .TF.
step_spec See below

step_spec is defined as follows:

STP start stop step
LIN num_points start stop
DEC num_points_decade start stop
OCT num_points_octave start stop
LIST val1 [ val2 ... ]

Where:

start First value
stop Last value (inclusive)
step Interval
num_points Total number of points
num_points_decade Number of points per decade
num_points_octave Number of points per octave
STP and LIN modes are both linear sweeps but specified differently. STP specifies start, stop and a step size, while LIN specifies start, stop and the total number of points.