Mathemetical modeling and computer simulation of analog electronic circuits
The overriding assumptions are that “good programs” already exist to solve any given problem of basic circuit simulation, and to some extent, they do [1][2][3][4].
First-order systems of ordinary differential equations
Analog electronic circuit simulation problems are first-order systems of ordinary differential equations to be solved numerically or approximately.
Every node in a circuit has an electric potential, and every device carries an electric current. (Transistor base and collector currents are considered separate variables in the simulation, while the emitter current is constrained to be equal to the negative sum of them.)
The differential equations are ordinary and of the first order, because they involve these potentials and currents and their first derivatives with respect to time only.
Problems of convergence and so-called “stiffness”
Convergence problems [5] have plagued many SPICE (Simulation Program with Integrated Circuit Emphasis) implementations.
During the space race, Erwin Fehlberg found that many of the Runge-Kutta methods then in use, including many he had earlier proposed himself, were too complicated, requiring too many evaluations and calculations per time step without achieving any better accuracy. The best he presented at the time of Neil Armstrong’s moon landing [6] is a particular RK1(2) method which is little more than a modified first-order Euler-Cauchy method with a simple error estimate fed back to the algorithm to adjust the step size or time increment.
Systems of differential equations whose solutions do not converge to within an acceptable error bound using these fairly simply, naïve, elementary methods are often said to be “stiff.” We would generally prefer to avoid the math jock lingo, but that is the classic terminology from the Hippie era. “Math is hard.”
If the easy way doesn’t work, we have to do it the hard way
When “non-stiff” methods of solving differential equations fail, according to the literature, we must turn to “stiff” methods [7]. Many of these methods have the theoretical properties of being A-stable and/or L-stable [8][9].
Range of potentials and accuracy of floating point representation
There is no such thing as an “absolute” electric potential, although sometimes the earth, or an iron rod pounded into the earth and affixed with an electrical lug, is taken as such. All potentials are relative in any given circuit. If two nodes of a circuit are equal or “crossing over” in potential, there is often “interesting” behavior that may be much better modeled if the difference between those potentials is directly represented as a floating point value rather than two differences from an arbitrary ground reference. Very small numbers may be represented in floating point format with large negative exponents, whereas if all potentials are expressed as differences from an arbitrary fixed ground point, then the accuracy of representation is limited to the worst relative precision of the potentials from the fixed ground point.
On the other hand, directly representing very small potential differences without reference to an arbitrarily chosen ground point is a non-conservative approach to a conservative problem, and it introduces additional degrees of freedom which may be undesirable in some situations.
- ↑ LTspice: Fast • Free • Unlimited https://www.analog.com/en/resources/design-tools-and-calculators/ltspice-simulator.html
- ↑ ngspice - open source spice simulator https://ngspice.sourceforge.io/
- ↑ Circuit simulation and schematics. https://www.circuitlab.com/
- ↑ Circuit Design and Simulation Software https://www.keysight.com/us/en/products/software/pathwave-design-software/eda-software-for-circuit-design.html
- ↑ LT wiki: Convergence Problems. https://ltwiki.org/index.php?title=Convergence_problems%3F
- ↑ Erwin Fehlberg. Low-order classical Runge-Kutta formulas with stepsize control and their application to some heat transfer problems. NASA TR R-315 https://ntrs.nasa.gov/api/citations/19690021375/downloads/19690021375.pdf
- ↑ Chris Rackauckas. Solving Stiff Ordinary Differential Equations. October 14th, 2020 https://book.sciml.ai/notes/09-Solving_Stiff_Ordinary_Differential_Equations/
- ↑ T. D. Bui. Some A-Stable and L-Stable Methods for the Numerical Integration of Stiff Ordinary Differential Equations. Journal of the ACM (JACM), Volume 26, Issue 3. Pages 483 - 493. https://dl.acm.org/doi/10.1145/322139.322147
- ↑ K. Selva Kumar and K. Jason. L-Stable and A-Stable numerical method of order two for stiff differential equation. April 2022. https://www.researchgate.net/publication/367887368_L-Stable_and_A-Stable_numerical_method_of_order_two_for_stiff_differential_equation
