next up previous contents
Next: DELETE command Up: Command descriptions Previous: CLEAR command   Contents

Subsections


DC command

Syntax

DC start stop stepsize {options ...}
DC label start stop stepsize {options ...}

Purpose

Performs a nonlinear DC steady state analysis, and sweeps the signal input, or a component value.

Status

Nesting of sweeps is not supported. (SPICE supports two levels of nesting.)

Comments

The nodes to look at must have been previously selected by the print or plot command.

If there are numeric arguments, without a part label, they represent a ramp from the generator function. They are the start value, stop value and step size, in order. They are saved between commands, so no arguments will repeat the previous sweep.

A single parameter represents a single input voltage. Two parameters instruct the computer to analyze for those two points only.

In some cases, you will get one more step outside the specified range of inputs due to internal rounding errors. The last input may be beyond the end point.

This command also sets up a movable operating point for subsequent AC analysis, which can be helpful in distortion analysis.

The program will sweep any simple component, including resistors, capacitors, and controlled sources. SPICE sweeps only fixed sources (types V and I).

Options

* multiplier
Log sweep. Multiply the input by multiplier to get the next step. Do not pass zero volts!!

> file
Send results of analysis to file.

» file
Append results to file.

BY stepsize
Linear sweep. Add stepsize to get the next step.

Continue
Use the last step of a OP, DC or Transient analysis as the first guess.

Decade steps
Log sweep. Use steps steps per decade.

LOop
Repeat the sweep, backwards.

NOPlot
Suppress plotting.

PLot
Graphic output, when plotting is normally off.

Print
Send results to printer.

Quiet
Suppress console output.

REverse
Sweep in the opposite direction.

TEmperature degrees
Temperature, degrees C.

Times multiplier
Log sweep. Multiply the input by multiplier to get the next step. Do not pass zero volts!!

TRace n
Show extended information during solution. Must be followed by one of the following:
Off
No extended trace information (default, override .opt)
Warnings
Show extended warnings
Iterations
Show every iteration.
Verbose
Show extended diagnostics.

Examples

dc 1
Do a single point DC signal simulation, with `1 volt' input.

dc -10 15 1
Sweep the circuit input from -10 to +15 in steps of 1. (usually volts.) Do a DC transfer simulation at each step.

dc
With no parameters, it uses the same ones as the last time. In this case, from -10 to 15 in 1 volt steps.

dc 20 0 -2
You can sweep downward, by asking for a negative increment. Sometimes, this will result in better convergence, or even different results! (For example, in the case of a bi-stable circuit.)

dc
Since the last time used the input option, go back one more to find what the sweep parameters were. In this case, downward from 20 to 0 in steps of 2. (Because we did it 2 commands ago.)

dc -2 2 .1 loop
After the sweep, do it again in the opposite direction. In this case, the sweep is -2 to +2 in steps of .1. After it gets to +2, it will go back, and sweep from +2 to -2 in steps of -.1. The plot will be superimposed on the up sweep. This way, you can see hysteresis in the circuit.

dc temperature 75
Simulate at 75 degrees, this time. Since we didn't specify new sweep parameters, do the same as last time. (Without the loop.)


next up previous contents
Next: DELETE command Up: Command descriptions Previous: CLEAR command   Contents
Al Davis 2002-03-26