next up previous contents index
Next: Output Generation Up: Analysis Specification Previous: .tf Line   Contents   Index

.tran Line

The transient analysis portion of WRspice computes the transient output variables as a function of time over a user-specified time interval. The initial conditions are automatically determined by a dc analysis. All sources which are not time dependent (for example, power supplies) are set to their dc value. The transient time interval is specified on a .tran control line.

General Form:
.tran tstep1 tstop1 [[start=]tstart1 [tmax]] [tstep2 tstop2 ... tstepN tstopN] [uic]
[scroll | segment base delta] [dc dc_args]
.tran 1ns 100ns
.tran 1ns 1000ns 500ns
.tran 10ns 1us uic

The tstep values are the printing or plotting increments for output, in the ranges

tstep1: tstart < = time < tstop1
tstep2: tstop1 < = time < tstop2
tstepN: tstopN-1 < = time < tstopN

The tstart is the initial time, assumed 0 if not given. This can be preceded by a ``start='' keyword, for HSPICE compatibility. The transient analysis always begins at time zero internally. In the interval [0, tstart), the circuit is analyzed (to reach a steady state), but no outputs are stored. Subsequently, the circuit is analyzed and outputs are stored.

The parameter tmax is the maximum internal timestep size that WRspice will use. The internal timestep is computed dynamically from the circuit. The output generated at the specified tstep points is interpolated from the ``real'' internal time points. The tmax parameter can be used when one wishes to guarantee a computing interval which is smaller than the output increment, tstep.

If not given, the effective tmax is taken as the smaller of tstep, and (tstop - tstart)/50. This is different from Berkeley SPICE3, which chooses the larger value (which may be a bug), and earlier releases of WRspice.

It is important to understand the consequences of this difference. This change was made to improve results from circuits containing only devices that weakly limit the time step (e.g. MOSFETs, ring oscillator results) which otherwise can be ugly and wrong. This allows users of such devices to get good results without having to set an explicit maximum time step in the tran line.

However, if the printing time increment tstep is too small, the simulation time can dramatically increase, since these points are actually being calculated and not just interpolated. The user in this situation has several options:

  1. Accept the longer analysis time as the cost of greater accuracy.
  2. Use a larger printing time increment (tstep).
  3. Use the tmax parameter to set a larger limit.
  4. Use .options oldsteplim to use the old limit of (tstop - tstart)/50.

The uic keyword (use initial conditions) is an optional keyword which indicates that the user does not want WRspice to solve for the quiescent operating point before beginning the transient analysis. If this keyword is specified, WRspice uses the values specified using ic=... on the various elements as the initial transient condition and proceeds with the analysis. If the .ic line has been given, then the node voltages on the .ic line are used to compute the initial conditions for the devices. See the description of the .ic line (2.4.2) for its interpretation when uic is not specified.

If Josephson junctions are present in the circuit, if uic is not given, the operating point is computed taking the Josephson junctions as shorted (actually, a resistance of 1uV/Ic). After this, the Josephson junctions will be given any specified initial voltage and phase (or these will be reset to exactly zero with no initial conditions given). Thus, the Josephson junctions are always ``uic'', but the circuit is not in uic mode unless uic is actually given in the transient analysis command.

In addition, with Josephson junctions present the value of current flowing through all inductors in the circuit is reset to zero before transient analysis and after the operating point is calculated. This is required to enforce the flux and Josephson phase relationship around loops of Josephson junctions and inductors. The algorithm requires that both phase and flux start at zero, and evolve acording to the forces applied by the rest of the circuit.

In 3.2.11 and earlier releases, the presence of Josephson junctions would automatically cause simulation in uic mode. as if ``uic'' was included in the tran command. In releases after 3.2.11, the presence of Josephson junctions does not automatically specify uic mode. Instead, as with simulations without Josephson junctions, a dc operating point calculation is performed to obtain the initial node voltages, which are used as the starting point for transient analysis. If Josephson junctions are present, the calculated inductor currents are zeroed before transient analysis starts, which is a technical requirement for maintaining the flux/phase relationship in JJ/inductor loops.

If a circuit containing Josephson junctions has all sources with a time=0 value of zero, then it is possible to give uic explicitly in the tran command line. This will avoid the dc operating point analysis, and therefor perhaps simulate slightly faster.

If a circuit has sources that have nonzero time=0 values, it is not recommended to give uic, though it will typically work. Effectively, there is a large initial transient, which may initialize multi-valued Josephson circuits into an unexpected mode, or produce other undesirable effects.

The advantage of the present non-uic approach when simulating with Josephson junctions is that it facilitates simulating hybrid semiconductor/superconductor circuits. In this case, a dc operating point calculation is generally needed to initialize the semiconductor circuitry.

The scroll keyword is useful in the tran command in interactive mode. If the scroll keyword is given, the simulation will continue indefinitely, until stopped by a stop command or interrupt. The time range of data tstop - tstart behind the current time is retained in the plot.

If the segment keyword is given, along with a character string token base and real value delta, individual rawfiles are output for each range of delta as the simulation advances. The internal plot data are cleared after each segment is output. The files are named with the base given, as base.s00, base.s01, etc. This will not happen if a rawfile is being produced. If scroll is also given, it is ignored. If a dc analysis is chained, it is legitimate to pass a delta of zero, in which case a file is produced for each cycle. Otherwise, the delta should be a multiple or submultiple of tstop, or the files will be difficult to interpret. It is an error if delta is nonpositive if there is no chained dc analysis. The purpose of this feature is to facilitate extremely lengthly transient analysis runs.

The optional dc sweep is a dc analysis specification which will cause the transient analysis to be performed at each point of the dc sweep. The dc operating point is reevaluated at every sweep point, and output vectors will be multidimensional. The optional parameters before dc can be omitted in this case, as the parser recognizes the ``dc'' keyword as the start of a dc sweep specification. If the scroll keyword is given, the dc sweep is not available.

In interactive mode, the tran command, which takes the same arguments as the .tran line, can be used to initiate transient analysis.

During transient analysis, a special vector @delta maps to the (most recent) internal time step. To use in a plot, it must be saved first (using a .save line or the save command). It is sometimes useful or interesting to see how the internal timestep varies in a simulation.

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