Slow simulation on switching power supply (hours), Simulation and plot windows not synchronized

Thanks for the suggestions.

Remove the four diodes and V4 V5.
These parts were there to get to a stable output faster, in anticipation of adding more circuitry to the design, but have a serious effect when running for 12mS.

Add .option trtol = 3
Trtol has a huge effect, but accuracy suffers if greater than 3.

Add .option fastmath = 1;
This has a large effect from 75 seconds to 38.6 seconds, but doesn’t effect the efficiency accuracy result like trtol.

RPAR = 30K on L1 reduces the circuit efficiency by 5% and with the other changes made has no effect on speed, so I removed it.

LTSPICE is down to 72 seconds with TI parts.
QSPICE is down to 1003 seconds with TI parts.
Still no idea why QSPICE is so much slower than LTSPICE with TI parts.
I did notice that removing the diodes and V4 V5 has much less effect on LTSPICE, so I think LTSPICE is being speed limited by the TI parts. I’ll have to get behavior models into LTSPICE when I get the chance.
One of the reasons I wanted to use QSPICE, is when I add my additional circuitry to LTSPICE, I can’t get it to solve. Each group of circuits solve by themselves, but putting them together doesn’t.
I’m going to try combining circuits in QSPICE next.

Go into the LTspice circuit and put an inductance on it. Then select the inductance and set it. Look at the parameters including Rpar. Yes, this parameter increases the inductance loss as well as the Rser, but for some reason you did not throw out this parameter Rser. The parallel inductance resistor Rpar simulates an increase in losses with an increase in frequency in a ferrite core. Do you need a reliable result or a good one?
Perhaps a long time is due to the fact that the Table functions with a large number of points are used. Previously, there were problems with the account in LTspice. I even replaced them with VFWD diodes because the tables mimicked diodes. But in recent versions of LTspice, this has been improved. In my version, TRTOL has a standard value, and this is TRTOL=2.5 .

The inductor has 460m for RSER and 8p for CPAR in the circuit for both PSPICE and LTSPICE.
I checked and Coilcraft has a spice model for their part.
As it turns out LTSPICE has that part in their parts list, although it didn’t have the parallel capacitance, so I added it.
So the efficiency goes from 89.5% with what I had, to 87.5% when I put the specific model in.
I actually changed the circuit to use a cascode FET design. It allows me to bias the top FET gate with the incoming voltage and drive the bottom FET directly from the comparator.
It gains a couple of percent in efficiency but runs two times slower in LTSPICE.
I could gain a couple of percent with a lower RDSON in the top FET, and a physically bigger inductor.

I did not find your coil in LTspice. I found someone close to her. Pay attention to the value of Rpar.

Odd, I just double checked in LTSPICE.
Inductance 150u
Peak current 0.95
Series Resistance 0.442
Parallel Resistance 76147.3
Parallel Capacitance 0, I changed this to 8p although it makes no difference compared to other circuit capacitance.

The following is from Coilcraft.
Not sure how to use both of these, but notice the 76k resistance.
.subckt LPS8045B-154_freq port1 port2 PARAMS: Cpar=7pF Ind=150uH
X1 port1 port2 Model1A PARAMS:

  • R1=6
  • R2=0.379
  • C= {Cpar}
  • K1=0.0031
  • K2=36
  • K3= {Ind}
  • K4=0.025
  • K5=0.000025
  • L=0
  • Is=0
  • a=0
  • L_Z0=0
  • L_EL=0
  • L_F0=0E6
  • PkZ=76147.3261
    .ends LPS8045B-154_freq

*======================================================================

  • SPICE Model generated by Coilcraft
  • Coilcraft Part Number : LPS8045B-154
  • Inductance = 150uH
    *======================================================================
  • Model Parameters:
  • Valid Frequency Range = 0.1MHz-50MHz
  • Ambient Temperature = 25 degC
  • Inductor Impedance Model
  • Use model for Time Domain simulations
    *======================================================================
    .subckt LPS8045B-154_imp port1 port2 PARAMS: Cpar=6.994pF Ind=150uH
    X1 port1 port2 Model1D PARAMS:
  • R1=6
  • R2=0.379
  • C= {Cpar}
  • K1=0.0031
  • K2=36
  • K3= {Ind}
  • K4=0.025
  • K5=0.000025
  • L=0
  • Is=0
  • a=0
  • L_Z0=0
  • L_EL=0
  • L_F0=0E6
  • PkZ=76147.3261
    .ends LPS8045B-154_imp

I picked this part because it’s rated 400 volts, most inductors are rated 100 or 200, or give no voltage rating at all. The inductor sees more than 200 volts in the circuit.

1 Like

I removed the TI comparator and op-amp in the LTSPICE circuit and replaced with diffschmtbuf and UniversalOpAmp2. I increased the simulation time slightly to 13mS to ensure the output was stable for the efficiency calculation.
LTSPICE now solves in 13 seconds, QSPICE solves in 91.6 seconds.
Still can’t explain why QSPICE is slower than LTSPICE with or without the TI parts.

A new problem has come up, the net label “425VMINUS” is not recognized for plotting or the .meas command. If I move it to the right side of R3 it works, left side of R3 doesn’t.
simple-power-700V-FET-cascode-diode-double-NoTI_AB.qsch (62.0 KB)

Sorry. I’ve lost interest in this topic. Especially since you’re creating problems. You change models and don’t upload them.

Sorry, it wasn’t intentional, I’ve done a lot in the last couple of days. Didn’t realize I had any new models in this version.
I’m assuming you mean M21 and M30.
If anyone is still interested, the Netlabel not appearing to work seems to be a bug.
IPD60R280PFD7S_L0.txt (2.2 KB)
SSM3K376R.txt (2.8 KB)

Thank You for those who helped.
Final results.
LTSPICE behavior model 19 second
QSPICE behavior model 79 seconds
LTSPICE Maxim comparator, Analog Devices op-amp 61 seconds
QSPICE Maxim comparator, Analog Devices op-amp 86.2 seconds
LTSPICE TI comparator and op-amp 86.8 seconds
QSPICE TI comparator and op-amp Can’t solve.
QSPICE TI comparator and Analog Devices op-amp 2880 seconds.

QSPICE has real problems with TI models.
QSPICE is always slower than LTSPICE

The saving grace for me is that now that the speed is usable, when I added my amplifier circuits to the power supply circuits, QSPICE would solve and LTSPICE won’t, this was the reason I tried QSPICE in the first place.
LTSPICE would solve both individually, but not together.
QSPICE would solve both individually and together.

Qspice offers Model Generator that allows us to create a .model for MOSFET. In addition to TI models, FET models like IPD60R280PFD7S_L0 and DMN60H080DS are things that slow your simulation down in Qspice. I used the Model Generator to create models for these two subcircuits, simplified them into VDMOS, and integrated them back into your schematic. This simulation can be completed in around 10 seconds on my laptop.

By the way, I replaced the comparator from my library with Qspice ¥-Device HMITT, but this change did not affect the simulation speed. I saw you using Ã-Device RRopAmp, therefore, put a Qspice comparator back.

And for the “425VMINUS”, you used .save statement, but you saved v(425vmin) instead of v(425vminus). The only thing I don’t understand is why moved to R3 right side and without v(425vminus) in .save, how that data be saved.

simple-power-700V-FET-cascode-diode-double-NoTI_AB-ModelGen.qsch (62.6 KB)

1 Like

I also encountered difficulties with transistor models in the form of a subcircuit from International Rectifier. This surprised me a lot, because they are used in different Spice programs. I found a way out in using VDMOS models.