Author Topic: LTSpice taking longer than normal....  (Read 3071 times)

0 Members and 1 Guest are viewing this topic.

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
LTSpice taking longer than normal....
« on: October 07, 2015, 02:04:24 am »
Anyone notice LTSpice taking way longer than it used to to solve some circuits? 
I have some standard simulations that used to always solve essentially instantly that now take like 10 seconds to finish.  I didn't even change anything in the circuit or LTSpice settings.  Been going on for a couple weeks now.

Anyone else see any weirdness there?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LTSpice taking longer than normal....
« Reply #1 on: October 07, 2015, 03:12:04 am »
As in, new version?  Or just in general?

Computational solutions are amazingly difficult to realize.  As powerful as SPICE is, there are still a multitude of "correct", reasonably sized circuits, which will not simulate in a reasonable time frame, for any environment parameters.

The best approach is to minimize unstable, poorly defined nodes, and get as many continuous derivatives as possible.  Examples of bad circuits: capacitors in series (degenerate voltages -- if Rshunt = inf, gives "singular matrix" error), inductors in parallel (same thing, but for Rseries = 0, and currents being undefined), behavioral blocks using discontinuous (e.g., IF, SGN) or piecewise-continuous (TABLE, LIMIT, etc.) functions, circuits that are highly nonlinear (e.g., oscillators, switchers, discrete (usually non-behavioral*) logic) that don't also have realistic parasitics included in the model (ESR, ESL, strays, etc.).

*Behavioral logic runs in a different subsystem, and only interfaces with analog simulation at port pins.  Which have their own range of concerns, so I'll just leave that out for now..

Of course, rich, relatively accurate models (those including most nonlinearities, parasitics, time and state dependencies, etc.) tend to run very slowly, for the fact that they have a lot to do... but they also tend to go more smoothly.  At least... in as much as, when they don't get randomly hung up on a small timestep, and judging performance relative to the number of nodes in the model.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2252
  • Country: ca
Re: LTSpice taking longer than normal....
« Reply #2 on: October 07, 2015, 02:10:26 pm »
Anyone notice LTSpice taking way longer than it used to to solve some circuits? 
I have some standard simulations that used to always solve essentially instantly that now take like 10 seconds to finish.  I didn't even change anything in the circuit or LTSpice settings.  Been going on for a couple weeks now.

Anyone else see any weirdness there?
This happens. Something in the circuit is oscillating or near oscillating and LTSpice is dutifully using small simulation time steps to try to capture the additional detail, which may or may not actually show up in the eventual output.
Sometimes when this happens I add a pF (or less) cap from an op-amp output to in-, or a RC snubber (again with very small C) to a critical node, usually an output. This usually resolves the problem entirely without having any substantial effect on the circuit. Remember that real circuit construction introduces all kinds of parasitic capacitances and inductances, and this is just adding some of those into the simulation  ;D
« Last Edit: October 07, 2015, 05:06:04 pm by macboy »
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: LTSpice taking longer than normal....
« Reply #3 on: October 07, 2015, 07:18:50 pm »
Thanks for the good feedback.  I was just curious if they maybe changed the way something worked behind the scenes that was causing anyone else problems.  I don't have any evidence, or even remember when the last time I did an update was.  Just a shot in the dark. 

I like the suggestion of adding some parasitic capacitance.  I'll do that and see if it helps. 
 

Offline exmadscientist

  • Frequent Contributor
  • **
  • Posts: 338
  • Country: us
  • Technically A Professional
Re: LTSpice taking longer than normal....
« Reply #4 on: October 08, 2015, 04:39:05 am »
I've also noticed that it's worth trying the Alternate solver mode when things are having trouble converging. "Alternate" is supposed to use higher internal precision and run slower, so I assume the situations where it's actually faster are a sign of severe ill-conditioning somewhere, as others have described above.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf