Electrical – Improving LT Spice DC sweep convergence time

ltspice

I have a circuit that's kind of finicky, I'm trying to run a DC sweep but it takes forever to run simulation steps. The main problem is even after adding circuit elements to make the circuit converge faster\better (like parallel resistance and capacitance on sources, and parasitic capacitance and series source resistance), the circuit still takes a long time and won't stop stepping the source or not converging (I don't know whats going on under the hood).

I get this at the bottom of the screen:

enter image description here

To make it run faster I hit esc because it is done stepping but probably not to the tolerance that some setting requires. If I even run 10 steps this takes about 15 mins of my time that I could be doing something else, I would like to run 30 steps, but that would take a long time.

How do I set the limit for the source stepping or stop it?

How can I get the steps to run back to back so I don't have to babysit the simulation by hitting the ESC key?

Best Answer

When you hit escape during a stalled DC simulation in LTSpice, the simulator progresses to the next solution method. The first method is direct Newton-Raphson iteration. If that fails, LTSpice will try the following strategies in order by default:

  1. Adaptive gmin stepping
  2. Adaptive source stepping
  3. "Pseudo Transient"

From your screen shot, it looks like you are still hung up when you get to adaptive source stepping. My guess is that when you hit escape at that point, you progress to the Pseudo Transient method and get convergence relatively quickly thereafter. I see this a lot.

If you know which method is converging well for your circuit and you are confident in the results, then you can avoid baysitting your sim by presenting .options directives that disable the methods that are bound to hang up. From the LTSPice manual, the specific directives are:

Direct Newton Iteration: .options NoOpIter

Adaptive Gmin Stepping: .options GminSteps=0

Adaptive Source Stepping: .options SrcSteps=0

Pseudo Transient: .options pTranTau=0

Related Topic