0
\$\begingroup\$

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?

\$\endgroup\$
  • \$\begingroup\$ Run it overnight while you sleep - or schedule it to run in the background - used to run simulations that took 40 days or more but that was on a Unix system.... \$\endgroup\$ – Solar Mike Jul 6 '17 at 21:20
  • \$\begingroup\$ Thats silly, its eating up CPU cycles doing absolutely nothing. Sometimes the simulations never finish because they don't reach the right criteria, I want to change the criteria. NO, I want someone to tell me whats going on, and what criteria I can change. \$\endgroup\$ – Voltage Spike Jul 6 '17 at 21:23
  • \$\begingroup\$ Do you normally use ALL of your cpu cycles with useful work? \$\endgroup\$ – Solar Mike Jul 6 '17 at 21:25
  • 1
    \$\begingroup\$ Some of the behavioral sources are fussy, needing delay time or hysteresis \$\endgroup\$ – sstobbe Jul 6 '17 at 21:26
  • 1
    \$\begingroup\$ It's your time that you are paid for, not us.... \$\endgroup\$ – Solar Mike Jul 6 '17 at 21:27
7
\$\begingroup\$

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

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ This is awesome, my simulation time went from 30min of me hitting the esc key to 5seconds with no babysitting. Cant thank you enough. \$\endgroup\$ – Voltage Spike Jul 7 '17 at 17:06
  • \$\begingroup\$ For those who follow, you need to include all three statements, and turn pTranTau on: .options GminSteps=0, SrcSteps=0, pTranTau=1 \$\endgroup\$ – Voltage Spike Jul 7 '17 at 17:08
  • \$\begingroup\$ Heh, I just ran 600 steps in 5 seconds, this is great \$\endgroup\$ – Voltage Spike Jul 7 '17 at 17:12
  • \$\begingroup\$ Np. Do note that pTranTau is a parameter and not a flag. I.e. different (non-zero) values actually effect the pseudo-transient method strategy. The default is 0.1 rather than 1, but I wouldn't expect it to make a big difference. \$\endgroup\$ – user49628 Jul 7 '17 at 17:24
  • \$\begingroup\$ Good to know, 1 works great for me \$\endgroup\$ – Voltage Spike Jul 7 '17 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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