2
\$\begingroup\$

I've discovered that if one has convergence problems with the circuit simlation software LTspice, the option cshunt may give you some hope in resolving the issue. But, why exactly does adding small value capacitors helps with convergence?

I made another question relating to these concept here

\$\endgroup\$
1
  • \$\begingroup\$ You should not disconnect a charged inductor without damping element, otherwise a huge voltage spike will be induced on inductor. A damping element to inductor is resistor or capacitor or diode(if you do it occasionally) . \$\endgroup\$ Commented Jul 18, 2023 at 14:38

1 Answer 1

5
\$\begingroup\$

If the self-resonant frequency of an inductor is ridiculously and unrealistically high due to lack of parallel capacitance and you do something to cause it to 'ring' the time step to simulate the ringing will be too small. If you look at real (and tiny) inductors, say 10nH, the SRF is perhaps 5GHz, so that implies 0.1pF of parallel capacitance exists.

In general if the parts are too ideal (resulting, say, in too high 'Q') you might have convergence problems. The algorithms also require smooth (differentiable) behavior. For this reason, switches that behave properly do not snap from \$\infty\$Ω to 0Ω, rather they smoothly change from a high resistance to a low resistance in a continuously differentiable curve.

In reality you're going to have significant capacitance in parallel with any inductance, certainly significant in comparison with numbers like 0.0001pF. LTspice also helpfully (?) can add some resistance in series with inductors (1mΩ by default), and has a convergence hack that optionally adds a minimum inductor damping if you omit a parallel resistor.

enter image description here

You could probably play with the Control Panel defaults and get it to converge with insanely non-physical numbers but that might not be desirable unless you are sure your numbers really have some resemblance to reality (there is a risk of getting results that are 'garbage-in garbage-out' rather than 'garbage-in warning out'). And even that won't save you if there is a zero value where there needs to be something non-zero.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ As an addendum to this: inductors are almost never perfect enough in real life to totally ignore their series resistance and shunt capacitance. If I can do a simulation with a perfect inductor and work out with a pencil & paper how the real circuit will actually work I may do that -- otherwise I'll take the numbers from the actual part I'm designing into the circuit and put those into the inductor model. Were I using a SPICE that didn't let you do that in one step, I'd add the parasitic components explicitly. \$\endgroup\$
    – TimWescott
    Commented Jul 18, 2023 at 16:23
  • 1
    \$\begingroup\$ The other side of "parts are too ideal" is parts are too complex. An example is a texas instruments model of the ubiquitous LM324 opamp that attempts to model some of its quirkier behavior. It not only has convergence problems of the type Spehro mentions, but garbage-out problems too. Another much simpler LM324A model (both LM324.sub & LM324A.sub ship with LTSpice) has neither problem. \$\endgroup\$
    – glen_geek
    Commented Jul 18, 2023 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.