Periodic Steady-State Analysis (pss)
Description
This analysis computes the periodic steady-state (PSS) response of a circuit by using harmonic balance (in the frequency domain) or shooting (in the time domain). The simulation time of PSS analysis is independent of the time-constants of the circuit. In addition, PSS analysis determines the periodic operating point for the circuit. The periodic operating point can then be used during a periodic time-varying small-signal analysis, such as PAC, PXF, PNOISE, PSP, or PSTB.
Generally, harmonic balance (HB) is very efficient in simulating weak non-linear circuits while shooting is more suitable for highly non-linear circuits with sharply rising and falling signals. HB is also advantageous over shooting in handling frequency dependent components, such as delay, transmission line, and S-parameter data.
PSS analysis can handle both autonomous (non-driven) and driven (non-autonomous) circuits. Autonomous circuits,even though they are not driven by a time-varying stimulus, generate non-constant waveforms. Driven circuits require some time-varying stimulus to generate a time-varying response. The most common example of an autonomous circuit is an oscillator. Common driven circuits include amplifiers, filters, and mixers. When PSS is applied to autonomous circuits, it requires you to specify a pair of nodes, p and n. This is how PSS analysis determines whether it is being applied to an autonomous or a driven circuit. If the pair of nodes is supplied, PSS assumes the circuit is autonomous; if not, the circuit is assumed to be driven.
With driven circuits, specify the analysis period, or its corresponding fundamental frequency fund. The period must be an integer multiple of the period of the drive signal or signals. Autonomous circuits have no drive signal, and the actual period of oscillation is not known precisely in advance. Instead, you specify an estimate of the oscillation period and PSS analysis computes the precise period along with the periodic solution waveforms.
PSS analysis consists of two phases, an initial transient phase, which initializes the circuit, and the shooting or harmonic balance phase, which computes the periodic steady-state solution. The transient phase consists of three intervals. The first interval starts at tstart, which is normally 0, and continues through the onset of periodicity tonset for the independent sources. The onset of periodicity, which is automatically generated, is the minimum time for which all sources are periodic. The second interval is an optional user-specified stabilization interval whose length is tstab. The final interval length is period for driven circuits, or four times period for autonomous circuits. This interval has a special use for the autonomous PSS analysis, that is, the PSS analysis monitors the waveforms in the circuit and develops a better estimate of the oscillation period. After the initial transient phase is complete, the shooting or HB phase begins. In this phase, the circuit is iteratively solved using Newton method to find the periodic steady-state solution (and the period when applied to autonomous circuits).
Syntax
Name [p] [n] pss parameter=value ...
Parameters
Simulation interval parameters
|
File that contains an estimate of the initial transient solution. |
||
|
Stress time. Age of the circuit used to simulate hot-electron degradation of MOSFET and BSIM circuits. |
Oscillator tuning mode parameters
|
If set to yes, harmonic balance steady-state solution is saved. Possible values are no and yes. |
||
|
File to which harmonic balance steady-state solution is to be written. |
The initial transient analysis provides a flexible mechanism to direct the circuit to a particular steady-state solution of interest, and to avoid undesired solutions. Another use of the initial transient simulation is to help in convergence by eliminating large but fast decaying modes that are present in many circuits. For example, in case of driven circuits, consider the reset signal in the figure below.
clock _____| |__| |__| |__| |__| |__| |__| |__| |__
__________________________________
Q2 ________________________| |_____| |_____|
In the above figure, the initial transient analysis runs from tstart to tstop. If initial transient results are relevant, you can output them by setting saveinit to yes. The steady-state results are always computed for the specified period, from tinit to tstop. By default, tstart and tstab are set to zero, while tinit, tonset and tstop are always automatically generated.
It happens in some circuits that the linearity of the relationship between the initial and final state depends on when the shooting or HB begins. Conceptually, when shooting or HB begins should not matter, as long as it is after the time when the stimuli have become periodic, because the periodic response repeats endlessly. However, in practice, starting at a good point can improve the convergence, and starting at a bad point can degrade the convergence and slow down the analysis. In general, it is best to try to avoid starting the shooting interval at a point where the circuit is undergoing strong nonlinear behavior. For example, when shooting is used to simulate switch-capacitor filters, it is best if tinit falls at the beginning of a clock transition, preferably a transition that follows a relatively long period of settling. If instead tinit occurred during a clock transition or soon after one, it is likely that the opamps will undergo slew-rate limiting at the start of the shooting interval, which will slow convergence. Switching mixers follow similar rules.
When PSS analysis simulates oscillators, either transient or linear initialization is performed to obtain an initial guess of the steady-state solution and the oscillating frequency. Two initialization methods are implemented based on transient and linear analysis, respectively. When oscic=default is specified, transients initialization is used and the length of the transient is specified by tstab. It is necessary to start the oscillator by using initial conditions, or by using a brief impulsive stimulus, just as you would if you were simulating the turn-on transient of the oscillator using transient analysis. Initial conditions would be provided for the components of the oscillators' resonator. If an impulsive stimulus is used, it should be applied so as to couple strongly into the oscillatory mode of the circuit, and poorly into any other long-lasting modes, such as those associated with bias circuitry. The Designer's Guide to Spice and Spectre [K. S. Kundert, Kluwer Academic Publishers, 1995] describes techniques for starting oscillators in some depth. When oscic=default is specified, oscic=lin, linear initialization is used. In this method, both oscillation frequency and amplitude are estimated based on linear analysis at DC solution. No impulsive stimulus or initial conditions are needed. Linear initialization is suitable for linear type of oscillators, such as LC and crystal oscillators. Note that tstab transient is still performed after linear initialization though it can be significantly shortened (or skipped in HB). Either way, specifying a non-zero tstab parameter can improve convergence.
By default, only the time-domain results are computed in shooting. If you specify either harms or harmsvec, or set outputtype to freq or all, the frequency-domain results will also be computed. If frequency-domain results are requested, but the desired harmonics are not specified, its default value is 9. The time-domain output waveform generation can be inhibited by setting outputtype to freq.
The accuracy of the results does not depend on the number of harmonics that are requested, but only on the accuracy parameters, which are set in the same fashion as in the transient analysis. Besides a few new parameters, like steadyratio and maxacfreq, all the others parameters work in PSS analysis in exactly the same manner as they work on transient analysis. For HB, besides reltol, abstol, steadyratio and lteratio, the number of harmonics has the most impact on the accuracy of simulation results. When too few harmonics are used, an error occurs due to the aliasing effect. To obtain accurate results, harms should be big enough to cover the signal bandwidth.
Several parameters determine the accuracy of the PSS analysis. reltol and abstol control the accuracy of the discretized equation solution. These parameters determine how well charge is conserved and how accurately steady-state or equilibrium points are computed. You can set the integration errors in the computation of the circuit dynamics (such as time constants), relative to reltol and abstol, by setting the lteratio parameter.
For shooting, the steadyratio parameter adjusts the maximum allowed mismatch in node voltages or current branches from the beginning to the end of the steady-state period. For HB, the steadyratio parameter adjusts the maximum allowed error in the node voltages or in the current branches of the steady-state. This value is multiplied by lteratio and reltol to determine the convergence criterion. The relative convergence norm is printed along with the actual mismatch value at the end of each iteration, indicating the progress of the steady-state iteration.
For shooting, the parameter maxperiods controls the maximum number of shooting iterations for PSS analysis. Its default value is set to 20 for driven PSS and 50 for autonomous PSS. For HB, the parameter 'maxperiods' controls the maximum number of HB iterations for both driven and autonomous HB analysis. Its default value is set to 100.
The finitediff parameter allows the use of finite difference (FD) after shooting. Usually this eliminates the above mismatch in node voltages or current branches. It can also refine the grid of time steps. In some cases, numerical error of the linear solver still introduces a mismatch. You can set steadyratio to a smaller value to activate a tighter tolerance for the iterative linear solver. If finitediff is set to no, FD method is turned off. If it is set to yes, PSS applies FD method and tries to improve the beginning small time steps, if necessary. If it is set to refine, PSS applies FD method and tries to refine the time steps. When the simulation uses second-order method, uniform second-order gear is used. finitediff is automatically changed from no to yes when readpss and writepss are specified to re-use PSS results.
The maxacfreq parameter is used to automatically adjust the maxstep and reduce errors due to aliasing in frequency-domain results. By default, the maxacfreq is set to four times the frequency of the largest requested harmonic, but is never set to less than forty times the fundamental.
The parameter relref determines how the relative error is treated. The relref values are as follows:
relref=pointlocal: Compares the relative errors in quantities at each node to that node alone.
relref=alllocal: Compares the relative errors at each node to the largest values found for that node alone for all past time.
relref=sigglobal: Compares relative errors in each circuit signal to the maximum for all signals at any previous point in time.
relref=allglobal: Same as relref=sigglobal, except that it also compares the residues (KCL error) for each node to the maximum of each node's past history.
The errpreset parameter lets you adjust the simulator parameters to fit your needs quickly. In most cases, it should also be the only parameter you need to adjust.
Guidelines for using errpreset in driven circuits in shooting are as follows:
If the circuit contains only one periodic tone and you are only interested in obtaining the periodic operating point, set errpreset to liberal. This setting provides reasonably accurate result and the fastest simulation speed.
If the circuit contains more than one periodic tone and you are interested in intermodulation results, set errpreset to moderate. This setting provides accurate results.
If you want a very low noise floor in your simulation result and accuracy is your main interest, set errpreset to conservative.
The effect of errpreset on other parameters for driven circuits is shown in the following table.
----------------------------------------------------------------------------
Parameter defaults and estimated numerical noise floor in simulation
result as a function of errpreset
----------------------------------------------------------------------------
errpreset reltol relref method lteratio steadyratio maxstep
----------------------------------------------------------------------------
liberal 1e-3 sigglobal traponly 3.5 0.001 period/50
moderate 1e-3 alllocal gear2only 3.5 0.001 period/200
conservative 1e-4 alllocal gear2only * 0.01 period/200
* : lteratio=10.0 for conservative errpreset. Only if user-specified reltol <= 1e-4 * 10.0/3.5, lteratio is set to 3.5.
The new errpreset settings include a new default reltol, which is an enforced upper limit for appropriate setting. An increase of reltol above the default value is ignored by the simulator.by the simulator. You can decrease this value in the options statement. The only way to increase reltol is to relax errpreset.
Estimated numerical noise floor for a weak non-linear circuit is -70dB for liberal, -90dB for moderate, and -120dB for conservative settings. For a linear circuit, the noise floor is even lower.Multi-interval Chebyshev (MIC) is activated when you explicitly set highorder=yes, which drops numerical noise floor by at least 30dB. MIC falls back to the original method if it encounters difficulty converging. You can tighten psaratio to further drop numerical noise floor.
Spectre sets the value of maxstep so that it cannot be larger than the value given in the table. Except for reltol and maxstep, errpreset does not change the value of parameters that you explicitly set. The actual values used for the PSS analysis are given in the log file. If errpreset is not specified in the netlist, liberal settings is used. For HB, only reltol is affected by errpreset and the effect is the same as that in shooting. However, lteratio remains 3.5 and steadyratio remains 1 with all values of errpreset.
Guidelines for using errpreset in autonomous circuits are as follows:
If you want a fast simulation with reasonable accuracy, you can set errpreset to liberal.
If you have some concern for accuracy, you can set errpreset to moderate.
If accuracy is your main interest, you can set errpreset to conservative.
The effect of errpreset on other parameters for autonomous circuits is shown in the following table.
-------------------------------------------------------------------------------
Parameter defaults as a function of errpreset
-------------------------------------------------------------------------------
errpreset reltol relref method lteratio steadyratio maxstep
-------------------------------------------------------------------------------
liberal 1e-3 sigglobal traponly 3.5 0.001 period/50
moderate 1e-4 alllocal gear2only 3.5 0.01 period/200
conservative 1e-5 alllocal gear2only * 0.1 period/400
* : lteratio=10.0 for conservative errpreset by default. Only if user-specified reltol <= 1e-5*10.0/3.5, lteratio is set to 3.5.
The value of reltol can be decreased from default in the options statement. The only way to increase reltol is to relax errpreset. Spectre sets the value of maxstep so that it cannot be larger than the value given in the table. Except for reltol and maxstep, errpreset does not change the value of any parameters you have explicitly set. The actual values used for the PSS analysis are given in the log file.If errpreset is not specified in the netlist, liberal settings will be used.Multi-interval Chebyshev (MIC) is activated when you explicitly set highorder=yes, which drops numerical noise floor by at least 30dB. MIC falls back to the original method if it encounters difficulty in converging. You can tighten psaratio to further drop numerical noise floor.
A long stabilization (by specifying a large tstab) can help with PSS convergence. However, it can slow down simulation. By default, in the stabilization stage, the following settings are used: reltol=1e-3, maxstep=period/25, relref=sigglobal, and method=traponly. These settings are overwritten when maxstep, relref, or tstabmethod are specified explicitly in pss statement, or reltol is specified explicitly in options statement.
If the circuit you are simulating has infinitely fast transitions (for example, a circuit that contains nodes with no capacitance), Spectre might have convergence problems. To avoid this, you must prevent the circuit from responding instantaneously. You can accomplish this by setting cmin, the minimum capacitance to ground at each node, to a physically reasonable nonzero value. This often significantly improves Spectre convergence.
You can specify the initial condition for the transient analysis by using the ic statement or the ic parameter on the capacitors and inductors. If you do not specify the initial condition, the DC solution is used as the initial condition. The ic parameter on the transient analysis controls the interaction of various methods of setting the initial conditions. The effects of individual settings are as follows:
ic=dc: All initial conditions are ignored, and the DC solution is used.
ic=node: The ic statements are used, and the ic parameter on the capacitors and inductors is ignored.
ic=dev: The ic parameters on the capacitors and inductors are used, and the ic statements are ignored.
ic=all: Both ic statements and ic parameters are used, and the ic parameters override the ic statements.
If you specify an initial condition file with the readic parameter, initial conditions from the file are used, and any ic statements are ignored.
After you specify the initial conditions, Spectre computes the actual initial state of the circuit by performing a DC analysis. During this analysis, Spectre forces the initial conditions on nodes by using a voltage source in series with a resistor whose resistance is rforce (see options).
With the ic statement, it is possible to specify an inconsistent initial condition (one that cannot be sustained by the reactive elements). Examples of inconsistent initial conditions include setting the voltage on a node with no path of capacitors to ground, or setting the current through a branch that is not an inductor. If you initialize Spectre inconsistently, its solution jumps, that is, it changes instantly at the beginning of the simulation interval. You should avoid such changes because Spectre can have convergence problems while trying to make the jump.
You can skip DC analysis entirely by using the parameter skipdc. If DC analysis is skipped, the initial solution is trivial or is given in the file that you specified by using the readic parameter, or if the readic parameter is not specified, by the values specified on the ic statements. Device-based initial conditions are not used for skipdc. Nodes that you do not specify with the ic file or ic statements start at zero. You should not use this parameter unless you are generating a nodeset file for circuits that have trouble in the DC solution; it usually takes longer to follow the initial transient spikes that occur when the DC analysis is skipped than it takes to find the real DC solution. The skipdc parameter might also cause convergence problems in the transient analysis.
The possible settings of parameter skipdc and their descriptions are as follows:
skipdc=no: Initial solution is calculated using normal DC analysis (default).
skipdc=yes: Initial solution is given in the file specified by the readic parameter or the values specified on the ic statements.
skipdc=sigrampup: Independent source values start at 0 and ramp up to their initial values in the first phase of the simulation. The waveform production in the time-varying independent source is enabled after the rampup phase.The rampup simulation is from tstart to time=0 s, and the main simulation is from time=0 s to tstab. If the tstart parameter is not specified,the default tstart time is set to -0.1*tstab.
Nodesets help find the DC or the initial transient solution. You can specify nodesets in the circuit description file with nodeset statements or in a separate file by using the readns parameter. When nodesets are specified, Spectre computes an initial guess of the solution by performing DC analysis, while forcing the specified values on to nodes by using a voltage source in series with a resistor whose resistance is rforce. Spectre then removes these voltage sources and resistors and computes the required solution from this initial guess.
Nodesets have two important uses. First, if a circuit has two or more solutions, nodesets can bias the simulator towards computing the required solution. Second, this is a convergence aid. By estimating the solution of the largest possible number of nodes, you might be able to eliminate a convergence problem or significantly speed up convergence.
When you simulate the same circuit multiple times, it is recommended that you use both write and readns parameters and assign the same file name to both parameters. DC analysis then converges quickly even if the circuit has changed since the last simulation, and the nodeset file is automatically updated.
Nodesets and initial conditions have similar implementation, but produce different effects. Initial conditions define the solution, whereas nodesets only influence it. When you simulate a circuit with a transient analysis, Spectre forms and solves a set of differential equations. Because differential equations have an infinite number of solutions, a complete set of initial conditions must be specified to identify the required solution. Any initial conditions that you do not specify are computed by the simulator to be consistent. The transient waveforms then start from initial conditions. Nodesets are usually used as a convergence aid and do not affect the final results. However, in a circuit with more than one solution, such as a latch, nodesets bias the simulator towards finding the solution closest to the nodeset values.
The method parameter specifies the integration method. The possible settings and their meanings are as follows:
method=euler: Backward-Euler is used exclusively.
method=traponly: Trapezoidal rule is used almost exclusively.
method=trap: Backward-Euler and the trapezoidal rule are used.
method=gear2only: Gear's second-order backward-difference method is used almost exclusively.
method=gear2: Backward-Euler and second-order Gear are used.
The trapezoidal rule is usually the most efficient when you want high accuracy. This method can exhibit point-to-point ringing, but you can control this by tightening the error tolerances. For this reason, though, if you choose very loose tolerances to get a quick answer, the backward-Euler or second-order Gear will probably give better results than the trapezoidal rule. Second-order Gear and backward-Euler can make systems appear more stable than they really are. This effect is less pronounced with second-order Gear or when you request high accuracy.
Spectre provides two methods for reducing the number of output data points saved: strobing, based on the simulation time, and skipping time points, which saves only every N'th point.
The parameters strobeperiod and strobedelay control the strobing method.strobeperiod sets the interval between the points that you want to save, and strobedelay sets the offset within the period relative to skipstart. The simulator forces a time step on each point to be saved, so that the data is computed, and not interpolated.
The skipping method is controlled by skipcount. If this is set to N, only every N'th point is saved.
The parameters skipstart and skipstop apply to both data reduction methods. Before skipstart and after skipstop, Spectre saves all computed data.
With parameter 'hbhomotopy', you can specify harmonic balance homotopy selection methods. The possible values of parameter 'hbhomotopy' and their descriptions are as follows:
'hbhomotopy=tstab': Simulator runs a transient analysis and generates an initial guess for harmonic balance analysis; it is recommended for nonlinear circuits or circuits with frequency dividers.
'hbhomotopy=source': For driven circuit, the simulator ignores tstab and accordingly increases the source power level; for oscillators, the simulator accordingly adjusts the probe magnitude until the probe has no effect on the oscillators. It is recommended for strongly nonlinear or high Q circuits.
'hbhomotopy=tone': This method is valid only for multi-tone circuit. The simulator first solves a single-tone circuit by turning off all the tones, except the first one, and then solves the multi-tone circuit by restoring all the tones and using the single-tone solution as its initial guess. It is recommended for multi-tone simulation with a strong first tone.
'hbhomotopy=inctone': Simulator first solves a single tone, then turns on moderate tones incrementally till all tones are enabled. It is recommended for circuits with one strong large tone.
'hbhomotopy=gsweep': A resistor, whose conductance is g, is connected with each node, and the sweep of g is controlled by gstart, gstop, and glog. It is recommended for circuits containing high-impedance or quasi-floating nodes.
Return to top