10.06.2016 Views

eldo_user

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Speed and Accuracy<br />

Integration Methods<br />

Integration Methods<br />

The process of ‘eliminating’ the time-derivatives in the original circuit equations is a source of<br />

error.<br />

Tip<br />

See “Speed and Accuracy in Eldo” on page 1245.<br />

These time-derivatives are replaced with finite differences, which only approximate the true<br />

time-derivatives. One of the most basic approximation schemes is the Backward-Euler method,<br />

which approximates v’(ti) using the finite difference (v(ti)-v(ti-1)) / (ti-ti-1). Intuitively, it is<br />

easy to understand that the smaller the time step (h=ti-ti-1) the smaller the error. More<br />

sophisticated schemes exist, which provide less error with the same time step, such as the socalled<br />

trapezoidal and Gear methods.<br />

The numerical resolution of differential equations is a vast subject. Dozens of methods have<br />

been proposed and studied in depth, some of them having very attractive properties, particularly<br />

allowing the use of very large time steps without encountering stability issues. However, in the<br />

context of circuit simulation, many of these methods are not practically applicable. The<br />

differential equations that model an electrical network (either IC or PCB) dynamics<br />

unfortunately have undesirable characteristics. For example, they are implicit (in most if not all<br />

formulations used in commercial simulators) and very often ‘stiff’ (which means that the<br />

individual time constants involved in the system can routinely exhibit orders of magnitude<br />

differences). The cost of evaluation of the non-linear functions is also very high. This<br />

unfortunate situation leaves very few good practical candidates as integration methods.<br />

Eldo implements three integration methods, namely the simple Backward-Euler (BE) method,<br />

the trapezoidal method (TRAP), and the Gear method (GEAR). The trapezoidal method is the<br />

default in Eldo; it provides a very good speed/accuracy compromise. TRAP and GEAR are both<br />

second-order methods, whereas BE is a first-order method. The accuracy of BE is theoretically<br />

one order of magnitude worse than TRAP or GEAR, so it is usually reserved for cases where<br />

speed is the most important criterion, and accuracy, to a certain extent, can be sacrificed. In<br />

many cases, the speed increase obtained with BE is not considerable, although the loss in<br />

accuracy can be significant. This is because the GEAR and TRAP methods are still relatively<br />

simple methods (the derivative approximations are not too complicated). Thus the accuracy<br />

improvement with TRAP or GEAR over BE is generally worth the increased CPU time.<br />

Although TRAP and GEAR have similar theoretical accuracy, they still have their own<br />

characteristics. TRAP has the very undesirable tendency to generate numerical ‘ringing’,<br />

particularly on the current variables. Ringing shows up as obviously non-physical oscillations<br />

of small (or large!) amplitude riding on top of a correct and accurate average value. The<br />

oscillations have the rhythm of the time steps (they don’t belong to the circuit intrinsic time<br />

constant(s)) and they usually dampen over time if the simulator properly controls the time step.<br />

This does not happen systematically with all test cases, but it is a well-known artifact of the<br />

TRAP method. All simulators, including Eldo, implement some code that tries to eliminate or<br />

reduce these oscillations, but sometimes it may be very difficult to eliminate them entirely.<br />

1246<br />

Eldo® User's Manual, 15.3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!