Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Speed up simulation with LTspice?

Status
Not open for further replies.

carbonzit

Active Member
On some simulations, LTspice runs verrrrrrrrry slowly. Is there any way to speed up the simulation without affecting the results, by changing the intervals or something?

If a simulation runs slowly, does that indicate problems with the circuit that should be attended to? or does it just happen, depending on the circuit topology, etc.?
 
On some simulations, LTspice runs verrrrrrrrry slowly. Is there any way to speed up the simulation without affecting the results, by changing the intervals or something?

If a simulation runs slowly, does that indicate problems with the circuit that should be attended to? or does it just happen, depending on the circuit topology, etc.?

Post a problem asc file.
 
I'm not as expert as Eric, I'm just a beginner to LTSpice.

Recently, I've read How to use booklet where they talk about the cause of slow simulation, they stated causes like your operating system, memory available and some other factors.
 
Post a problem asc file.

It's "JT multivibrator 2" in this thread here. When it hits the snag, it take about 30 seconds of computer time to grind through 1mS of simulation. (If you have anything to add about the circuit itself, I'm all ears!)

Mind you, I'm not complaining about LTspice per se: I'm sure there's something about my circuit that's causing difficulty in its analysis. I guess there are two questions here: is there something that can be done to speed up LTspice under such conditions? or should one try to reconfigure one's circuit to avoid this problem altogether?

I have managed to crash LTspice when it's been in the middle of such slow calculations several times. What happens it that the simulation speed goes to zero (caught in infinite loop?), and I can't halt the simulation. When I close the simulation and either try to reload it or load another one, then try to run it, I get a pop-up message saying "Can't load Marching Waves" (?!?!?), and then it crashes.

Overall, though, it's a great tool, so I'm not complaining (the price is right!).
 
SPICE solves all the node equations incrementally until it arrives at a convergent solution. Sometimes the nature of the circuit makes is difficult to rapidly arrive at this convergence and SPICE will take a long time (or sometimes fail to reach it at all and the simulation will fail).

You might try changing some of the parameters in the "Tools/Control Panel/SPICE" window. For example a different Default Integration Method may affect the time. Also reducing the accuracy by changing the values of the parameters on the right such as the Abstol, Volttol, etc. to larger values (try a factor of 10 to start) may also speed up the simulation (of course at a likely reduction in simulation accuracy). If none of that helps, then just click the "Reset to Default Values" to go back to the original values.

Understand that when you are simulating 1ms of a circuit that is oscillating at a high frequency, it requires many millions of calculations, and it can take a long time for even a fast PC to perform them all. You are simulating an analog circuit with many incremental digital calculations using complex circuit mesh matrix math. (If you've ever tried to calculate the voltages and currents for just one point in even a simple circuit with a couple loops of inductors, resistors, and capacitors, then you can get an idea of how many calulations are required.) If you can get the desired results with a shorter simulation interval, that will certainly help.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top