next up previous contents index
Next: .disto Line Up: Analysis Specification Previous: .ac Line   Contents   Index

.dc Line

The dc analysis portion of WRspice determines the dc operating point of the circuit with inductors shorted and capacitors opened. The dc analysis is used to generate dc transfer curves: a specified device parameter (commonly a voltage or current source output) is stepped over a user-specified range and the dc output variables are stored for each sequential parameter value.

General Form:
.dc pstr1 start1 [stop1 [incr1]] [pstr2 start2 [stop2 [incr2]]]
.dc vin 0.25 5.0 0.25
.dc vds 0 10 .5 vgs 0 5 1
.dc vce 0 10 .25 ib 0 10u 1u
.dc vdd 5 6
.dc r1 1k 2k 100
.dc d1[temp] 0 50 5

The .dc line defines the dc sweep source and sweep limits. The variation may be in one or two dimensions, depending upon whether the second block is provided.

In traditional Berkeley SPICE, the pstr1 and pstr2 are the names of voltage or current sources in the circuit, and the specified range applies to the output from that source. In WRspice the pstr1 and pstr2 can specify arbitrary device parameters which will be varied through the given range. The complete syntax is


The devname is the name of a device in the circuit. The square brackets are literal, and enclose the name of a parameter of the device. Device parameter names are defined in the device model, and can be listed with the show command.

If the devname is that of a source device, or a resistor, capacitor, or inductor, the square brackets and parameter name can be omitted. In this case, the parameter will default to the source output, or resistance, capacitance, or inductance of the respective device. Other device types require specification of a parameter in square brackets.

The start, stop, and incr parameters are the starting, final, and incrementing values respectively. If the incr parameter is not supplied, analysis is performed at start and stop. If in addition the stop parameter is not given, analysis is performed at start, i.e., the level is fixed. A parameter can be omitted only if all parameters to the right are also omitted.

A second parameter (pstr2) may optionally be specified with associated sweep specification. In this case, the first parameter will be swept over its range for each value of the second parameter. This option can be useful for obtaining semiconductor device output characteristics.

The first example will cause the value of the voltage source vin to be swept from 0.25 volts to 5.0 volts in increments of 0.25 volts.

In stand-alone dc sweep analysis, the circuit operating point is computed for each parameter value. In WRspice, other types of analysis (ac, noise, transfer function, sensitivity, and transient) can be chained to a dc analysis specification. In this case, the requested analysis is performed at each successive operating point, as specified by the dc part of the analysis specification. The resulting circuit variables are saved as multidimensional vectors, which can subsequently be saved in a rawfile or plotted (together or as individual traces).

In intetactive mode, the dc command, which takes the same arguments as the .dc line, can be used to initiate dc analysis.

If the loopthrds variable is set to a value larger than zero, the calculations will use multi-threading so that if multiple CPUs are available, work can be done in parallel, saving time.

If Josephson junctions are present in the circuit, they will be taken as shorted (actually, a resistance of 1uV/Ic) during dc analysis. It is in general not possible to perform this type of analysis on Josephson junctions. The approach taken here may be useful when working with hybrid semiconductor/superconductor circuits, but in no case should one expect dc analysis of Josephson circuits to ``work''. Transient analysis, which takes into account the past history of the Josephson excitation, is required for a complete simulation.

next up previous contents index
Next: .disto Line Up: Analysis Specification Previous: .ac Line   Contents   Index
Stephen R. Whiteley 2017-02-22