Trapezoidal - gear - modified trap

P

Paul Burridge

Guest
Why have three modes? Is there one of the three one could consider as
a default for the vast majority of simulations?
--

The BBC: Licensed at public expense to spread lies.
 
Paul,

Why have three modes? Is there one of the three one
could consider as a default for the vast majority of
simulations?
Gear, compared to trap, has the advantage that it
is numerically more stable, but less accurate. In
principle, it's better defined because Steven Gear
even specifies when you change integration order
and timestep size. PSpice is hard-wired to use
Gear(well, the docs say it a proprietary
algorithm, but it acts like Gear.) The inaccuracy
of Gear comes from the fact it dampens the circuit.
The amount of dampening decreases with decreasing
step size.

Trapezoidal is faster and usually much more
accurate. Occasionally it's not as numerically
stable, especially when running non-physical
circuits described with macro-models. It has
the disadvantage that it can ring as a simulation
artifact. This can be disconcerting to novice
SPICE users. Most SPICE programs have some
form of Trapezoidal integration as the default.
There's fair bit of leeway in trap implementations,
so I call them all affectionately cowboy
integration.

Modified-trap is a proprietary algorithm that
has the speed and accuracy of trap but precisely
cancels traditional trap ringing. It is the
most accurate method I know of.

If you're using LTspice, use the default of modified
trap. Use trap and Gear only as diagnostics.
Gear will let you duplicate some PSpice simulations.
For example, if LTspice says a circuit is unstable
but PSpice says it's stable, you can switch LTspice
to use basically the same integration method of
PSpice to duplicate it's erroneous results for
diagnostic purposes. Switch to pure trap instead
of Modified-trap if you want to see if your circuit
is trap ringing. If the trap ringing that Modified-
trap cancels is spread over several circuit nodes,
then the cancellation might not work well. Using
pure trap lets you investigate potential simulation
artifacts.

There's yet another method called backward Euler.
Where mod-trap, trap, and Gear are all implemented
as 2nd order methods in SPICE programs, backward
Euler is the 1st order method. 1st order mod-trap,
trap, and Gear are all identical and simply called
backward Euler. You can use this method by adding
the SPICE directive ".options maxord=1" to your
simulation. Backward Euler is as stable if not
more so than Gear, but is the slowest and least
accurate of all methods.

--Mike
 
On 21 Feb 2004 15:10:14 EST, "Mike Engelhardt" <pmte@concentric.net>
wrote:

Gear, compared to trap, has the advantage that it
is numerically more stable, but less accurate. In
principle, it's better defined because Steven Gear
even specifies when you change integration order
and timestep size. PSpice is hard-wired to use
Gear(well, the docs say it a proprietary
algorithm, but it acts like Gear.) The inaccuracy
of Gear comes from the fact it dampens the circuit.
The amount of dampening decreases with decreasing
step size.
[rest snipped....]

Phew!
Thanks, Mike. I shall need some considerable time to digest that lot
so can't respond at present. But it will all be noted.....


--

The BBC: Licensed at public expense to spread lies.
 

Welcome to EDABoard.com

Sponsor

Back
Top