Product Documentation
Spectre Circuit Simulator Reference
Product Version 23.1, September 2023

Harmonic Balance Steady State Analysis (hb)

Description

This analysis uses harmonic balance (in the frequency domain) to compute the response of circuits with one fundamental frequency (periodic steady-state, PSS) or multiple fundamental frequencies (quasi-periodic steady-state, QPSS). The simulation time required for an HB analysis is independent of the time-constants of the circuit. This analysis also determines the circuit's periodic or quasi-periodic operating point, which can then be used during a periodic or quasi-periodic time-varying small-signal analysis, such as HBAC,HBSP, or HBNOISE.

Usually, harmonic balance (HB) analysis is a very efficient way to simulate weak nonlinear circuits. In addition, HB analysis works better than shooting analysis (in the time domain) for frequency-dependent components, such as delay, transmission line, and S-parameter data.

An HB analysis consists of two phases. The first phase calculates an initial solution, which the second phase then uses to compute the periodic or quasi-periodic steady-state solution, by using the Newton method.

The two most important parameters for HB analysis are 'funds' and 'maxharms'. The 'funds' parameter accepts a list of names of fundamentals that are present in the sources. These names are specified in the sources by the 'fundname' parameter. If only one name appears, the analysis is an HB PSS analysis. On the other hand, if more than one name appears, the analysis is an HB QPSS analysis. The 'maxharms' parameter accepts a list of numbers of the harmonics that are required to adequately model the responses due to the different fundamentals.

The annotate parameter has two values specific to HB analysis: detailed_hb and internal_hb. when annotate is set to detailed_hb or internal_hb, additional analysis debug information will be printed to log files. In the case of internal_hb, encrypted debug information is stored in the internal log file. Both options are valid for pss and qpss analyses with flexbalance=yes.

Syntax

Name  [p]  [n] hb parameter=value ...

Parameters

HB fundamental parameters

funds

[...]

Array of fundamental frequency names for fundamentals to use in analysis.

fundfreqs

[...]

Array of fundamental frequencies to use in analysis.

maxharms

[...]

Array of number of harmonics of each fundamental to consider for each fundamental.

autoharms

no

Activates automatic harmonic number calculation in harmonic balance. Applies only if tstab>0 or if autotstab=yes. If a steady-state is reached, Spectre does a spectrum analysis to calculate the optimal number of harmonics for HB. The minimum number of harmonics is specified by maxharms. If steady-state is not reached to sufficient tolerance, autoharms may be disabled. Possible values are no and yes.

selectharm

Name of harmonics selection methods. Default is diamond when maximorder is set; otherwise, default is box. Possible values are box, diamond, funnel, axis, widefunnel, crossbox, crossbox_hier and arbitrary.

evenodd

[...]

Array of even, odd, or all strings for moderate tones to select harmonics.

maximorder

Maximum intermodulation order of harmonics in diamond, funnel, widefunnel, crossbox and crossbox_hier cuts. For example, given a two-tone case, a harmonic, [hx hy], is in the diamond, funnel or widefunnel harmonic set when |hx|+|hy| <= maximorder. And it is in the crossbox or crossbox_hier set when |hx| <= maximorder and |hy| <= maximorder.

mappingfft

no

This parameter is valid only for funnel harmonic cut now. When it is set to yes, it is possible to save more memory but maybe at accuracy expense. Possible values are no and yes.

axisbw

The width of the band part of wide funnel harmonic cut along axis.

minialiasorder

The order of mini aliasing harmonic order.

selharmvec

[...]

Array of harmonics indices.

freqdivide

Large signal frequency division.

freqdividevector

[...]

Array of frequency division factors for each tone. This parameter overrides freqdivide.

Simulation interval parameters

tstab

0.0 s

Extra stabilization time after the onset of periodicity for independent sources.

autotstab

no

Activates the automatic initial transient (tstab) in harmonic balance and PSS shooting. If set to yes, the simulator decides whether to run tstab and for how long. Typically, the initial length of tstab is 50 periods; however, it could be longer depending on the type of circuit and its behavior. If steady-state is reached (or nearly reached), tstab terminates early. Possible values are no and yes.

envlp_autotstab

no

Activates the automatic initial envlp (tstabenvlp) in PSS shooting. If set to yes, the simulator decides how long to run tstabenvlp. Typically, the initial length of tstabenvlp is 50 periods; however, it could be longer depending on the type of circuit and its behavior. If steady-state is reached (or nearly reached), tstabenvlp terminates early. Possible values are no and yes.

autosteady

no

Activates the automatic steady state detection during initial transient (tstab) in harmonic balance and PSS shooting. When steady state is reached (or nearly reached), tstab terminates early. This parameter applies only when tstab>0 or when autotstab=yes. autosteady=no|0 turns this feature off; autosteady=yes|1 activates this feature; autosteady=2 runs autosteady with lower steady state tolerance than autosteady=1. autosteady=2 may help pss convergence but with higher tstab costs. Possible values are 0, 1, 2, no and yes.

tstabenvlp_autosteady

no

Activates the automatic steady state detection during tstabenvlp in  PSS shooting. When steady state is reached, tstabenvlp terminates early. This parameter applies only when tstabenvlpstop>0 or when envlp_autotstab=yes. tstabenvlp_autosteady=no|0 turns this feature off; tstabenvlp_autosteady=yes|1 activates this feature; tstabenvlp_autosteady=2 runs autosteady with lower steady state tolerance than tstabenvlp_autosteady=1. tstabenvlp_autosteady=2 may help pss convergence but with higher tstabenvlp costs. Possible values are 0, 1, 2, no and yes.

tstabenvlpstop

0.0 s

Determines the stop time of envelope tstab.

tstabenvlpstep

0.0 s

Determines the step size of envelope tstab.

Time-step parameters

maxstep

(s)

Maximum time step. The default is derived from errpreset.

transres

1e-9*stop s

Transition resolution. The transient analysis attempts to stop at corners of input waveforms (for example, corners of rising/falling edge of a pulse). If such events occur within a time less than transres, the analysis combines the events into one and forces only one time point. The rest of the steps are determined by error control. This may lead to loss of detail.

Initial-condition parameters

ic

all

The value to be used to set the initial condition. Possible values are dc, node, dev and all.

skipdc

no

If set to yes, there is no DC analysis for initial transient. Possible values are no, yes and sigrampup.

readic

File that contains initial condition.

oscic

default

Oscillator IC method. It determines how the starting values for the oscillator are calculated. oscic=lin provides you an accurate initial value, but it takes time; oscic=lin_ic' is not recommended, which is the older version of oscic=lin for shooting analysis for backward compatibility;oscic=fastic is fast, but it is less accurate. 'oscic=skip' directly uses the frequency provided by you as the initial guess frequency. It is only for the two-tier method. Possible values are default, lin, lin_ic, fastic and skip.

useprevic

no

If set to yes or ns, use the converged initial condition from previous analysis as ic or ns. Possible values are no, yes and ns.

tone_homotopy

[...]

Array of homotopy options for convergence assistance with multi-divider cases, when hbhomotopy=aggregation. The number of entries should be equal to that of tones. The possible values for each entry are 0, 1 and 2. '0' means no convergence assistance is applied for that tone. '1' means only transient stabilization (tstab) is run for that tone and '2' means both tstab and a single-tone HB simulation should be run to obtain the initial guess for multi-tone HB simulation.

Convergence parameters

readns

File that contains an estimate of the initial transient solution.

cmin

0 F

Minimum capacitance from each node to ground.

hbhomotopy

tone

Name of Harmonic Balance homotopy selection methods. Possible values are tstab, source, gsweep, tone, inctone, aggregation and steptone.

gstart

1.e-7

Start conductance for hbhomotopy of gsweep.

gstop

1.e-12

Stop conductance for hbhomotopy of gsweep.

glog

5

Number of steps, log sweep for hbhomotopy of gsweep.

sweepic

none

IC extrapolation method in sweep HB analysis. Possible values are none, linear and log.

oscmethod

Osc Newton method for autonomous HB. Possible values are onetier and twotier.

pinnode

Node to pin during autonomous HB simulation.

pinnoderank

Harmonic rank to pin during autonomous HB simulation.

pinnodemag

This parameter gives an estimate of the magnitude of the pin node voltage. Default value is 0.01.

pinnodeminus

Second node to pin during autonomous HB simulation. Needed only when differential nodes exist in oscillator.

backtracking

yes

This parameter is used to activate the backtracking utility of Newton's method. The default is yes. Possible values are no, yes and forced.

Output parameters

save

Signals to output. Possible values are all, lvl, allpub, lvlpub, selected, none and nooutput.

nestlvl

Levels of subcircuits to output.

saveinit

no

If set to yes, the waveforms for the initial transient before steady state are saved. Possible values are no and yes.

harmoutputlist

[...]

Array of harmonics indices for hb output.

Integration method parameters

tstabmethod

Integration method used in stabilization time. The default is traponly for autonomous circuits, or is derived from errpreset for driven circuits. Possible values are euler, trap, traponly, gear2 and gear2only.

Accuracy parameters

errpreset

Selects a reasonable collection of parameter settings. Possible values are liberal, moderate and conservative.

maxperiods

Maximum number of iterations allowed before convergence is reached in shooting or harmonic balance Newton iteration. For PSS and QPSS, the default is 20 for driven circuits, and 50 for oscillators; For HB, the default is 100.

max_innerkrylov_size

20

The maximum iteration number allowed in inner gmres solver in two-level gmres linear solver. The default value is 12 for large signal and 20 for small signal analysis.

max_outerkrylov_size

4

The maximum iteration number allowed in inner gmres solver in two-level gmres linear solver. The default value is 4.

itres

1e-4 for shooting, 0.9 for HB

Controls the residual for iterative solution of linearized matrix equation at each Newton iteration. Tightening the parameter can help with the Newton convergence, but does not affect the result accuracy. The value should be between [0, 1]. Default value for shooting APS flow is 1e-3.

krylov_size

10

The minimum iteration count of the linear matrix solver used in HB large-signal analysis. After reaching krylov_size  iterations, the iteration is forced to terminate because of the poor rate of convergence. Increase krylov_size if the simulation reports insufficient norm reduction errors in GMRES.

oversamplefactor

1

Oversample device evaluations.

oversample

[...]

Array of oversample factors for each tone. This parameter overrides oversamplefactor.

excludeconvgwithBK

yes

Possible values are no and yes.

hbpartition_defs

[...]

Define HB partitions.

hbpartition_fundratios

[...]

Specify HB partition fundamental frequency ratios.

hbpartition_harms

[...]

Specify HB partition harmonics.

hbprecond_solver

basicsolver

Choose a linear solver for the GMRES preconditioner. Possible values are basicsolver, blocksolver, autoset, blockdense, blocksolver2 and directsolver.

lowmem

0

Harmonic balance low memory mode; Possible values are 0, 1, or number (>=10). The default value is '0', the low memory mode is turned off; if '1' is set, the standard low memory mode is turned on; If a number no less than 10 is set, Spectre interprets the value as the memory requested in GigaBytes.

Annotation parameters

annotate

sweep

Degree of annotation. Possible values are no, title, sweep, status, estimated, steps, iters, detailed, rejects, alliters, detailed_hb and internal_hb.

title

Analysis title.

Newton parameters

restart

no

Restart the DC/PSS/QPSS solution if set to 'yes'; if set to 'no', reuse the previous solution as an initial guess; if set to 'firstonly', restart if it is the first point of sweep (supported only in HB). The default value is 'no' for HB and 'yes' for shooting. Possible values are no, yes and firstonly.

Circuit age

circuitage

(Years)

Stress time. Age of the circuit used to simulate hot-electron degradation of MOSFET and BSIM circuits.

State-file parameters

write

File to which initial transient solution (before steady-state) is written.

writehb

File to which final harmonic balance steady-state solution is to be written. Small-signal analyses, such as hbac,hbsp, and hbnoise can read the steady-state solution from this file directly instead of running the hb analysis again.

readhb

File from which final harmonic steady-state solution is to be read. Small signal analyses such as hbac,hbsp, and hbnoise can read in the steady-state solution from this file directly instead of running the hb analysis again.

selharmread

File from which arbitrary harmonic data needs to be read.

selharmwrite

File to which harmonic data needs to be written.

Tstab save/restart parameters

saveperiod

Save the tran analysis periodically on the simulation time.

saveperiodhistory

no

Maintains the history of saved files. If yes, maintains all the saved files. Possible values are no and yes.

saveclock

(s)

Save the tran analysis periodically on the wall clock time. The default is 1800s for Spectre. This parameter is disabled in the APS mode by default.

savetime

[...]

Save the analysis states into files on the specified time points.

savefile

Save the analysis states into the specified file.

recover

Specify the file to be restored.

Compression parameters

xdbcompression

no

Sets the automatic gain compression analysis. In automatic gain compression analysis, Spectre automatically sweeps the input excitation until the gain, as defined by the analysis parameter xdbgain, compresses by the amount specified by the analysis parameter xdblevel. In gain compression analysis, Spectre outputs the hb solution at the calculated compression point only. Dependent analyses, such as hbnoise and hbac, are supported and calculated about the calculated compression level. Auxiliary output includes the gain and voltage/power compression curves. These outputs are available for analysis and post-processing in ADE. The possible values are yes and no. Default is no.

xdblevel

[...]

Sets the gain compression level for compression analysis. The reference point for gain compression is the small-signal gain of the circuits, or as specified by the analysis parameter xdbref. Default is 1.

xdbgain

power

Chooses between the voltage gain and transducer power gain as the target for compression point calculation. When xdbgain=power, the gain is defined as G (dB) = Pload (dBm) - Pavailable (dBm). When xdbgain=voltage, the gain is defined as G (dB) = dB20(|Vload|/|Vsource|). In both cases, Spectre sweeps the excitation source until xdbref - G = xdblevel, where the analysis parameter xdbref defines the reference level for compression calculation. Possible values are power and voltage. Default is power.

xdbref

linear

Sets the reference point for gain compression calculations. When xdbref=linear, spectre uses the small-signal gain as the reference. When xdbref=max, spectre uses the maximum observed gain as the reference. Possible values are linear and max. Default is linear.

xdbsource

The instance name of the excitation source, which is swept automatically to reach the compression level. When xdbgain=power, the excitation source must be a port instance. When xdbgain=voltage, the excitation source must be a vsource instance.

xdbload

The instance name of the load termination. When xdbgain is power, xdbload can be a port, a resistor, or a current probe.

xdbnodep

The output terminals for voltage gain calculation when xdbgain=voltage. If either is left unspecified, the terminal is assumed to be the global ground.

xdbnoden

The output terminals for voltage gain calculation when xdbgain=voltage. If either is left unspecified, the terminal is assumed to be the global ground.

xdbrefnode

The reference node when xdbload is a current probe. The default is the ground node.

xdbharm

[...]

The Integer array which specifies the harmonic indexes of the output voltage or power component.

xdbsteps

100

The maximum number of steps for the compression point search. The simulator terminates if xdbsteps exceeds before the compression point is found. The default is 100.

xdbmax

The maximum input power (or voltage) for the compression point search. Default is 30 dBm when xdbgain=power, and 2.0 V when xdbgain=voltage.

xdbstart

The starting input power (or voltage) for the compression point search. Default is (xdbmax-70) dBm when xdbgain=power, and xdbmax/20000 when xdbgain=voltage.

xdbtol

0.01

Sets the tolerance for compression analysis.  This tolerance is used in compression curve fitting and calculating the compression point.

xdbrapid

no

Sets the automatic gain compression analysis in rapid mode. In this mode, Spectre does not trace the compression curve and calculates only the compression point.

xdbcpi

Sets the estimated input-referred compression point for rapid compression analysis.

backoff

0.0

The backoff point. If defined, an addition harmonic balance analysis will be performed after the compression analysis is done. Default is 0 dBm when xdbgain=power, and 0 V when xdbgain=voltage.

Memory estimation parameters

memoryestimate

no

Sets the memory usage estimate for Harmonic Balance. If yes, a memory estimate is printed in the log file. You can use this memory estimate to plan the computing resources before submitting harmonic balance runs. In memory estimate mode, a short simulation is performed first, and the engine exits after printing the estimate in the log file without saving any results. If no, the simulation continues after the memory estimate is printed. Memory estimation is not recommended for simulations that require less than 500MB approximately. For PSS analysis, memory estimate mode does not apply unless flexbalance=yes. memoryestimate=1 estimates the memory usage for large-signal analysis and memoryestimate=2 estimates both large-signal analysis and small-signal simulations. Possible values are no and yes.

Oscillator tuning mode parameters

tuneparam

When set, tuneparam enables the tuning mode oscillator analysis. In the tuning mode analysis, a circuit parameter is automatically varied to reach the oscillation frequency specified by the fundfreqs parameter. The tuning parameter can be a device instance parameter (as determined by the parameters tunedev) or a netlist parameter. This mode applies only to autonomous circuits (oscillators).

tunedev

Sets the instance name of a device whose parameter (identified by tuneparam) will be varied such that the circuit oscillates at the specified frequency. Applies only in tuning mode autonomous analysis. Tunedev must be used with tuneparam.

tunerange

[...]

The tuning range of the parameter identified by tuneparam. Although tunerange is not required, it can aid in convergence if set. Tunerange also can be used with 'tunestep' or 'tunelin' to decide the acceptable discrete parameter set.

tunestep

Specify the step size between two adjacent discrete tuning points. Must be used with 'tunerange'.

tunelin

Specify the numbers of discrete tuning points. Must be used with 'tunerange'.

tunevalues

[...]

Specify the values of discrete tuning points.

LSSP parameters

lsspports

[...]

Specifies the list of ports on which the large-signal 2-port S-parameters are calculated.

lsspharms

[...]

Specifies the output harmonic for large-signal S-parameter calculations. The input harmonic is defined by the frequency parameters on the input port instance.

lsspfile

Identifies the file name for large-signal S-parameter output.

lsspdatafmt

touchtone

Sets the file format of the large-signal S-parameter output. Possible values are spectre and touchstone. Default is touchstone.

lsspdatatype

msgphase

Sets the data format or the large-signal S-parameter output. Possible values are realimag, magphase and phase. Default is magphase.

Dynamic parameters

param

Name of the parameter to be updated during pss/hb analysis (tstab stage). When param=paramName and param_vec=[t1 value1 t2 value2 ... valuen tn], paramName is set to value1 at t1, value2 at t2, and so on. Pss/hb analysis uses the last value in the param_vec(valuen) to find the steady state.

paramset

Name of the dynamic parameter set.

param_vec

[...] s

The time_value points to param=name.

param_file

The file that contains the time_value points to param=name.

sub

Name of the subcircuit instance parameter specified in param=name.

mod

Name of the device model parameter specified in param=name.

dev

Name of the device instance parameter specified in param=name.

param_step

Defines the frequency of updating the dynamic parameter values. If param_step=0, it updates the parameter value at a given time point.

Osc macro source parameters

oscmacrogene

no

If set to yes, harmonic balance steady-state solution is saved. Possible values are no and yes.

oscmacroprobe

Specify probe of which the current data is to be saved.

oscmacroout

[...]

Specify nodes of which the voltage data is to be saved.

oscmacrosave

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. The initial transient simulation also helps convergence by eliminating the large but fast decaying modes that are present in many circuits.

In some circuits, the linearity of the relationship between the initial and final states depends on when HB analysis begins. In practice, starting at a good point can improve convergence, and starting at a bad point can degrade convergence and slow down the analysis.

When HB analysis simulates oscillators, initialization is performed to obtain an initial guess of the steady-state solution and of the oscillating frequency. Two initialization methods are implemented, based on transient and linear analysis. When oscic=default is specified, transient initialization is used and the length of the transient is specified by tstab. You must 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 by using transient analysis. Initial conditions would be provided for the components of the oscillator's 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 Designers Guide to Spice and Spectre [K. S. Kundert, Kluwer Academic Publishers, 1995] describes in depth some techniques for starting oscillators. When oscic=lin is specified, 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. Either way, specifying a non-zero tstab parameter can improve convergence.

For the 'funds' parameter, the frequencies associated with fundamentals are figured out automatically by the simulator. An important feature is that each input signal can be a composition of more than one source. However, these sources must have the same fundamental name. For each fundamental name, the fundamental frequency is the greatest common factor of all frequencies associated with the name. Omitting a fundamental name in the funds parameter is an error that stops the simulation. If maxharms is not given, a warning message is issued, and the number of harmonics defaults to 1 for each of the fundamentals in multi-tone simulation and 10 in single-tone simulation.

HB signal partition is a method of decomposing a circuit so that multi-rate behavior can be exploited to increase simulation performance. If every part of a circuit has the same spectrum structure, such as fundamental frequency and bandwidth, there is no need to apply signal partition. However, if the RF circuit has multiple tones, the signals in different parts can have various spectrum structures , such as different fundamental frequency and number of harmonics. With HB signal partition, you can divide the circuit into several parts based on the signals contained in them. The parameter 'hbpartition_defs' defines the partitions. Each partition can be made up of one or more instances. For example,

hbpartition_defs = ["I9 I10" "I11 I12" "I13 I14"]

defines three partitions. The first partition consists of instance "I9" and "I10" while the second partition consists of instances "I11" and "I12".  The third one has "I13" and "I14". The number of instances for each partition should not be less than 1 and there is no upper limit for the number. The principle for dividing a circuit is that the subcircuits or instances with the same spectrum properties should be put into one partition. The parameter 'hbpartition_harms' specifies the maximum number of positive harmonics of each tone for every partition.  For example,

hbpartition_harms=["10 0 0" "5 3 3" "3 3 3"]

So the maximum number of positive harmonics for the first partition is 10, 0 and 0, respectively. For the second partition, it is 5, 3 and 3. For the last one, it is 3, 3 and 3. The parameter 'hbpartition_fundratios' indicates the fundamental frequency ratio of each tone for each partition. With these ratios, it is easy to know the fundamental frequencies of each tone of the partitions. For example,

hbpartition_fundratios=["2 1 1" "1 1 1" "1 1 1"]

If three global fundamental frequencies are defined as: LO=1GHz, RF1=1.1GHz and RF2=1.13GHz, it indicates the fundamental frequencies of each tone of the first partition is 2*LO, 1*RF1 and 1*RF2, respectively. The second and third partition has the same frequencies for their each tone: 1*LO, 1*RF1 and 1*RF2. However, you have to make sure that the global fundamental frequencies for each tone are the smallest among all the partitions and the ratios are integers.

The parameter maxperiods default value is set to 50 for HB.

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. If you want a fast simulation with reasonable accuracy, you can set errpreset to liberal (it is not recommended to use liberal on an RF circuit). 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 following table shows the effect of errpreset on other parameters in HB with One-tone Driven Circuits, Multi-tone Driven Circuits and Autonomous Circuits:

------------------------------------------------------------------------------------------

Parameter defaults as a function of errpreset with different circuits

------------------------------------------------------------------------------------------

| One-tone Driven Circuits | Multi-tone Driven Circuits and Autonomous Circuits

-------------------------------------------------------------------------------------------

errpreset   | reltol(max) lteratio | reltol(max) lteratio

-------------------------------------------------------------------------------------------

liberal   | 1e-3 3.5 | 1e-3 3.5

moderate   | 1e-3 3.5 | 1e-4 3.5

conservative |  1e-4   * | 1e-5 *

-----------------------------------------------------------------------------------------

* : lteratio=10.0 for conservative errpreset by default. However, when the option reltol <= 1e-4*10.0/3.5, lteratio is set to 3.5

for One-tone Driven Circuits, and when the option reltol <= 1e-5*10.0/3.5, lteratio is set to 3.5 for Multi-tone Driven Circuits

and Autonomous Circuits.

The values of reltol are usually different in the tstab interval and in the hb interval. During tstab, reltol is set to the option reltol, whose default value is 1e-3. This part is not impacted by errpreset. If you want to change the value, set reltol in Spectre options. Any value more than 1e-3 is ignored.

The value of reltol in the hb interval is affected by both errpreset and the option reltol. errpreset sets the maximum value of reltol (as shown in the table above). If the option reltol is less than the maximum value, it is set to the option reltol. Otherwise, the maximum value is used. reltol value that is more than 1e-3 is ignored.

If errpreset is not specified in the netlist, 'moderate' settings is used.

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 the simulator find the DC or initial transient solution. You can specify nodesets in the circuit description file with nodeset statements, or in a separate file 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 true 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 desired solution. Second, they are 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.

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.

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
 ⠀
X