Internally, the transmission line models store a table of past values of the currents and voltages at the terminals, which become excitations after the delay time. As excitations, these signals can cause errors or nonconvergence if their rate of change is too large. These errors are reduced or eliminated by two mechanisms: time step truncation and breakpoint setting. Time step truncation occurs if the excitation derivative exceeds a certain threshold. A breakpoint which occurs at this time will also be rescheduled to one delay-time later. Breakpoints are set by the independent voltage and current sources at times where a slope change occurs, in piecewise linear outputs. At a breakpoint, the internal time step is cut and integration order reduced to accommodate the change in input accurately.
If no timestep control keywords are given, the defaults are the following:
Lossless case, any level | truncsl |
Level=1 (Pade) | truncdontcut |
Level=2 (convolution) | trunclte |
Only one of the trunc flags should be given. The latter two apply only to a lossy line with level=2, and if given in a different case the default timestep control is applied.
The slope algorithm computes the difference between the quadratic extrapolation from the last three and the linear extrapolation from the last two time points, and uses this difference formula to determine the time when this error is equal to slopetol multiplied by the maximum absolute value of the signal at the three time points.
When using level=2, there are two alternative timestep control options. If the trunclte flag is given, the timestep is reduced by one half if the computed local truncation error is larger than an error tolerance, which is given by
where trtol, reltol and abstol are the values of the SPICE options trtol, reltol and abstol, and input1 and input2 are the internally stored excitations. If the truncnr flag is given, a timestep is computed based on limiting the local truncation error to the tolerance given above.
The handling of breakpoints is controlled by the following flags:
The breakpoint setting is controlled by the three flags nobreaks, allbreaks, and testbreaks. Only one should be given, and the default is testbreaks. If nobreaks is set, breakpoints will not be rescheduled. If allbreaks is set, all breakpoints will be rescheduled to the break time plus the delay time. The default testbreaks will reschedule a breakpoint if a slope test is passed. This slope test makes use of the rel and abs parameters. The slopes at the last two time points are computed. The breakpoint is rescheduled if
where d1 and d2 are the two slopes. The parameters rel and abs default to 1e-3 and 1e-12, respectively. The dt parameter is the sum of the last two time deltas, and vmax is a running peak detect function representing the maximum voltage applied to the line. Note that these are different defaults (and a different algorithm) from the parameters of the same name used in the SPICE3 transmission line models.
In most cases, the defaults for the timestep and breakpoint controls are sufficient. Excessive setting of breakpoints and timestep truncation increases execution time, while insufficient control can produce errors. An alternative approach is to limit the maximum internal timestep used with the .tran line, which can provide highly accurate results for comparison when experimenting with the control parameters.
See the description of the transmission line model (2.14.11) for more information.