Convergence

On occasions Spice can fail to converge with its default settings. The Simulation Setup Spice options tab can be used to change the defaults in order to get convergence.

Solving most convergence problems is usually down to having a little think about the circuit. Understand what the circuit is doing, and make sure that it is not trying to do something that is impossible in the real world. Switching a 10 mohm source into a capacitor in 1ps will invariable give problems.

General Guidelines

Source Stepping and GMIN Stepping

Enabling source stepping and gmin stepping will usually cure most non-converging circuits, and is the default. This is in the spice options tab of the simulation setup dialog.

SuperSpice uses more advanced algorithms then traditional Spice3. Spice3 uses a "number of steps" parameter for gmin and source stepping such that often, for large settings, e.g. 1000 steps to obtain convergence on stubborn circuits there is usually an excessive number of steps for most initial non convergence. SuperSpice uses the option:

VARGMIN=1

to engage dynamic, VARiable step sizes. This option overrides the default settings of gmin and source settings when enabled, and forces the XSpice engine gminsteps and sourcesteps options to equal 1 when enabled.

Note: sometimes it schematics may converge faster if gminsteps is set to 0, which will force source stepping to be tried before any gmin stepping.

For backward compatibility, setting this option to 0 recovers the prior Spice3 method.

Ground

Make sure that there is a ground connected, and that there is a DC path to ground through all nodes. Floating nodes are not allowed in spice. There is a spice option RSHUNT, that can be enabled to connect all nodes to ground with a GMIN, 1e12 resistor.

Add Resistance and Capacitance

Make the circuit real. Adding even 1pf of capacitance to select nodes can improve convergence dramatically. This is because spice cannot handle circuits attempting to switch in zero time. Adding small resistors in series with capacitive loads can also help tremendously, e.g. mosfet gate resistors are often required in the virtual world, just as they are usually required in the real world.

Current Sources

Avoid ideal current sources when possible. These often cause problems. Use diodes to supplies to limit voltages across ideal current sources.

GMIN

GMIN is the value of conductance that is inserted across diode junctions. It alleviates floating node issues that cause matrix singular errors.

Setting Gmin to 10p, 20p, ...100p, 200p etc.. to 10n often helps. Its exact value being found by trial an error. A value of 10n is 100Mohms, so using larger values of GMIN may significantly effect circuit operation.

.NODESET

Perform a transient run as described in Spice Options to set initial conditions for other types of analysis.

Transient Iteration Limit ITL4

"Timestep too small error"

Increasing ITL4, the transient time point iteration limit often helps. Its default is 10. Values of 50 to 500 are typical values that often work very successfully. Unduly large values when not required will slow down the simulation.

RELTOL

The basic error tolerance is given by RELTOL. The default of this is 0.001 or 0.1%. Setting this option to 1% may help convergence on some occasions, but usually a more lax tolerance makes things worse. If accurate simulations are required , set this to say, 0.00001. However, too tight a tolerance can also cause convergence issues.

PIVTOL

This default is 1e-13. probably best left alone.

PIVREL

This default is 1e-3. Setting PIVTOL at 1u, 5u, 10u, 30u to 100u etc... may help. Its exact value being found by trial and error.

General. In most case setting GMIN, RELTOL and PIVREL and ITL are the most successful in curing many convergence problems.

TRTOL

The default for this value is 1. The original Spice3 default was 7. Setting it to 7 can often result in a transient speedup of around 3 times. However, sometimes accuracy is unduly impacted. Experimentation may be required.

Dynamic Range of Signals

Windows spice has a numerical limit of about 12 digits of accuracy. If resistances, currents and voltage ratios exceed this limit there will often be problems. Keep the maximum resistance/minimum resistance in the circuit < 1012

Dual State Systems

Bistables and Schmitt triggers.

Make sure that indeterminate states are forced to a predictable value. Schmitt triggers do not have a stable DC state if their output is feed back to its input, therefore a solution is very unlikely without taking specific measures. Force a known state by using a voltage controlled switch and a pulse generator that is only switched on for the first few ns or so of a transient run.

Power Supplier/High Currents

The most obvious immediate change to make when higher currents are involved is the absolute current tolerance, ABSTOL. By default this is set to10pa (this is a departure from the Spice3/XSpice default of 1pa ). Setting this to the na range may improve convergence significantly. A reasonable starting point would be to try a value from 100p to 1ua, noting that the ratio of maximum current to minimum current should not be larger than 10e12.

For higher voltages setting the absolute voltage tolerance, VNTOL may be helpful. Its default value is 1nv.

Simulation Setup

Contents