Post Go back to editing

LTspice 24.1 Much Slower than 24.0: "Initializing Circuit Matrix" Takes Significant Time in Former

Category: Software
Product Number: 0
Software Version: Ltspice 24.1.1

Dear ltspice software team!

Simulting the same circuit with ltspice 24.0.12 and 24.1.1 i encountered big differences in simulation runtimes

I know that my circuit is very special (60bus problem of high energy loadflow computation) and the circuit has many floating nodes (for measurement purpose)

The timedifference is about 3s for ltspice 24.0.12 to about 20s with ltspice 24.1.1 

Especially the iniitialization of the circuit matrix is much more time consuming for version 24.1.1 as for version 24.0.12

I added my simulation files hopeing you can optimize the initialization routine of the matrix

Regards,

Friedrich

NOTE: The main file of this example is 60-bus-example_pv.asc

60-bus-example.zip

Edit Notes

Changed Title
[edited by: MStokowski at 3:02 AM (GMT -5) on 3 Feb 2025]
  • Hi  ,

    I see the difference in the simulation time.

    but its not as long as 20s for me, its only about 10s-14s tops.

    Nonetheless, have you tried checking for LTspice software updates yet? This could have been addressed already.

    If you had already updated your LTspice, may I ask if there are changes in the expected performance of your simulation or only the simulation time had changed?

    Best Regards,
    EArl

  • Hi  ,  ,

    LTspice 24.1.1 is the latest publicly available. Took me 2s in LTspice 24.0.12; 16s in 24.1.2 (soon to be released). The time difference is interesting, mostly spent in the "Initializing Circuit Matrix" message, as stated. For fun, I netlisted from 24.0 and ran the netlist in 24.1.2 and had the same result. Looks like your Gear method took the longest. I matched everything: Modified Trap.

    mike

  • Dear  ,

    Thanks for providing this test case!

    The additional delay is caused by a new feature of LTspice 24.1. It compiles all math expressions and certain other parts of the simulation into highly optimized machine code. This speeds up behavioral sources by a factor of 2. But it also takes time ...

    If this turns out to be problem, we need to add an option to turn this off.

    Best Regards,
    Mathias

  • Dear Mathias!

    I think that your new optimization is a nice feature for ltspice

    The problem is that if simulation time is small relative to optimization time, there is no benefit at all. This is true especially for the .op analysis where the simulation time is very small (1s) and the matrix optimization is as long as for the transient analysis about 10-20s !!

    Therefore i would suggest that you add the option to turn this behaviour off to let the user decide to use this new feature in a sensful way

    For long simulation times your optimization is a good feature (see below)

    Best regards,

    Friedrich

    NOTE: I`ve tested my circuit with a 1000x longer transient endtime and
    only one waveform variable to plot and i get 176sec for 24.0.12 and 92sec for the new optimized 24.1.1! This is impressing and shows that for longer simulations and restriced number of waveforms to plot the optimized version is much better  !! Thank you