Path: EDN Asia >> Design Centre >> IC/Board/Systems Design >> Addressing SPICE convergence problems
IC/Board/Systems Design Share print

Addressing SPICE convergence problems

30 Jul 2013  | Mike Robbins

Share this page with your friends

Convergence concerns are a frustrating deterrent to the use of simulation in analogue and power electronics design, and in the four decades of SPICE, millions of engineers have suffered from the failed, painfully slow, or incorrect simulations that result. We found that a large class of convergence issues (especially in switching-dominated circuits) came from well-defined circuits that simply collided with the dynamic range of the IEEE 64bit floating point "double" type. We have now released the first extended-precision numerical core inside a circuit simulation engine.


Unsolvable equations
The CircuitLab community ran more than half a million simulations last month. Each one involved constructing tens, hundreds, or even thousands of simultaneous, highly non-linear, strongly coupled differential equations, which are repeatedly linearized and solved iteratively. Last month alone, our software constructed and factored more than 600 million matrices, and solved those factored systems more than 1.6 billion times.

Some simulations were failing to converge even though the circuits were well defined, by which we mean that any proficient high school math student could have computed the correct solution. But the numerical methods in the solver could not!

For example, here's a two-diode circuit in another simulation engine:



This simple circuit situation occurs many times within larger systems, often with one or both diodes implicitly hidden within a power MOSFET or a CMOS input. It is easily analysed by inspection and the current should be limited in both directions by the diode reverse saturation current plus any transient current charging the diode, but it faces serious convergence issues in simulation. In another simulation engine, this takes hours and hours to even partially simulate, and displays noisy currents millions of times larger than would be seen in reality. Does your software do this?

In CircuitLab, with the new extended-precision numerical core we'll describe below, this circuit and others simulates quickly and correctly in milliseconds (figure 2).

Here's the core of the problem:

1 + 1e-16

Try computing this sum in your favourite programming language. The result is simply:

1

when, to any high schooler (not aware of the limited precision of floating-point datatypes), the answer should of course be:

1.0000000000000001

This truncation happens because most programming languages use a standard IEEE "double precision" 64bit floating point number to represent real numbers internally, which is like working on a calculator that only has room for about 16 decimal digits and must truncate the rest between operations.

1 • 2 Next Page Last Page


Want to more of this to be delivered to you for FREE?

Subscribe to EDN Asia alerts and receive the latest design ideas and product news in your inbox.

Got to make sure you're not a robot. Please enter the code displayed on the right.

Time to activate your subscription - it's easy!

We have sent an activate request to your registerd e-email. Simply click on the link to activate your subscription.

We're doing this to protect your privacy and ensure you successfully receive your e-mail alerts.


Add New Comment
Visitor (To avoid code verification, simply login or register with us. It is fast and free!)
*Verify code:
Tech Impact

Regional Roundup
Control this smart glass with the blink of an eye
K-Glass 2 detects users' eye movements to point the cursor to recognise computer icons or objects in the Internet, and uses winks for commands. The researchers call this interface the "i-Mouse."

GlobalFoundries extends grants to Singapore students
ARM, Tencent Games team up to improve mobile gaming


News | Products | Design Features | Regional Roundup | Tech Impact