Each of the analysis modes DC, AC, AC Noise and Transfer Function are swept. That is they repeat a single analysis point while varying some circuit parameter. There are 6 different sweep modes that can be applied to these analyses. These modes are also used to define multi step analyses which are explained in Multi-step Analyses. The 6 modes are:
As well as 6 different modes there are 3 different sweep methods
Each of the sweep modes is explained in more detail below.
In this topic:
In this mode the principal value of a single device is swept. The analysis definition must specify the part reference for the device. The following types of device may be used.
Device | Value swept |
Capacitor | Capacitance |
Diode | Area |
Voltage controlled voltage source | Gain |
Current controlled current source | Gain |
Voltage controlled current source | Transconductance |
Current controlled voltage source | Transresistance |
Current source | Current |
JFET | Area |
Inductor | Inductance |
Bipolar Transistor | Area |
Resistor | Resistance |
Lossless Transmission Line | Impedance |
Voltage source | Voltage |
GaAs FET | Area |
Global circuit temperature is swept.
Similar to device sweep except applied to a named model parameter. Both the model name and the parameter name must be specified.
It is recommended that any model parameter being swept is also specified in the .MODEL parameter list. In most cases it isn't actually necessary but there are a few instances - such as for terminal resistance parameters - where it is necessary.
A user named variable that can be referenced in any number of expressions used to define model or device parameters. Here is an example. (See Examples/Sweep/AC_Param.sxsch)
This is a simple long tailed pair. The above circuit resistors R1 and R2 have been given the values {restail}. restail is a parameter that is swept in an AC sweep to plot the gain of the amplifier vs tail resistance at 100kHz. Here is the result of the run:
Note that this analysis mode is not available in standard SPICE or the majority of its derivatives. Most offer parameter sweeping, but only for DC analysis.
Sweeps frequency for the small signal analysis modes namely AC, AC Noise and Transfer Function. In standard SPICE it is the only sweep mode available for AC and Noise while Transfer Function can not be swept at all.
Repeats analysis point for a specified number of times with device tolerances enabled. The following graph show the result for the same circuit as shown above but with restail=1k and with a 1000 point Monte Carlo AC sweep. This run takes a fraction of a second on any modern machine:
The graph shows the variation in gain for 1000 samples. Using the histogram feature a statistical distribution of the above can easily be plotted.
In the AC, DC, Noise or Transfer Function analysis sheets, select the Define... button in the Sweep Parameters box. This will bring up the following dialog
Select the desired mode on the left then enter the necessary parameters on the right. The parameters required vary according to the mode as follows:
Mode | Parameters |
Device | Device part reference (e.g. V1) Frequency (AC, Noise and TF only) |
Parameter | Parameter name Frequency (AC, Noise and TF only) |
Model Parameter | Model name Model parameter name Frequency (AC, Noise and TF only) |
Temperature | Frequency (AC, Noise and TF only) |
Frequency (not available for DC) | None |
Monte Carlo | Number of points Frequency (AC, Noise and TF only) |
◄ Operating Point | DC Sweep ▶ |