Hi, everyone. Comparing QSpice to LTspice (which is what I used to use) I collect all possible information ans came across this video on youtube https://www.youtube.com/watch?v=CbqXWWtBoGA
Language is german but at 6:45 we are shown simulation result much much worse than the results given by LTspice (5:20) so translation is not that important I guess.
Can you help QSpice with its calculations? Are there quirks hidden in the simulation? Any ideas or suggestions about this simulation?
I did not find a way to attach the schematic, so if I do I will, of course, do so later for convenience.
Try to use Vh=-0.01, because it is hard switching on and off. Negative value in Vh is making much smother transition and add reltol. Here I have new simulation.
Thank you for your advice! reltol is a good advice to play with.
I always found it annoying when tweaking of the spice settings in LTspice was necessary so at first I was surprised to see that LTspice performed better with the exact same simulation.
Should one say that both engines have strengths and weaknesses at the moment?
In general QSpice is supposed to be superior to LTspice in simulation (ok I KNOW that there might be a lot of marketing strategies going on but that is stated many times)
This replicate the boost example in the youtube video. I took @ivan1 circuit and modified that with parameters (Ron=1m instead of 100m) closer to LTspice example in the youtube example. I believe what make people uncomfortable is the repeated oscillation when simulation run into steady state.
I discussed this boost example with Mike Engelhardt. My study suggests the problem is related to simulation timestep profile in running this example. In general, it is not a common situation you run into as this is a lengthy setup (run up to 4s). Default Qspice setting seems not handle this example well. To run this example with a result similar to LTspice, Mike suggests to set .option trtol2=0
But anyway it seems strange as in ltspice the oscillations are finished after about 0.4s, and in qspice oscillations are finished after about ~1s. Is the same as in your simulation Kelvin. I do not know what is causing the oscillation to die in ltspice so fast, and in qspice not so fast.
Parasitic plays an important role. People simulating converter in ideal easily forgot how great the impact can be for parasitic. Be remember that, Qspice and LTspice defines inductor parasitic very differently. LTspice with default Rser=1mohms if Rser is omitted. Qspice with default Rpar=INDUCTANCE÷(15.91×GMIN) if Rpar is omitted. To force a Qspice to be identical to LTspice, add L1 instance parameter Rpar=0 (this equivalent to set Rpar to infinite) and Rser=1m. Everytime you see damping, bode different and the circuit with inductor between LTspice and Qspice, set Rpar=0 and Rser=1m to retry.
And talking about compare, in general, the best way is to export Qspice circuit into a netlist, comment those line that not support in LTspice, this is a more fair comparison. But in general, it is not that necessary for compare except something really look very weird. My personal opinion is that Qspice is in a relatively mature status currently.
Impressive, however, the results did not look right when I compared with other simulators. I double-checked with PLECS, and got the attached result. Note that in PLECS (and in LTspice) there are at least 10 clearly visible “peaks” in the waveform, while the QSPICE result has barely 6, and is nearly flat at 0.4 seconds (instead of 0.8s).
If you refer to the 4th reply (Poor Simulation results compared to LTspice - possible improvement? - QSPICE - Qorvo Tech Forum), Qspice can generate a profile similar to what was simulated in PLECS. Cornel raised a question about why oscillation in LTspice finishes faster, and I explained that parasitics play an important role. I demonstrated this by changing the inductor series resistance (Rser=1mohm) to match the default value in LTspice, resulting in matching results between LTspice and Qspice.
This setup simulates a result that is closer to what you have shown above. However, it’s important to note that PLECS/PSIM/SIMPLIS and LTspice/Qspice have different simulation engines and concepts. I’m unsure how PLECS includes device losses, and even if the losses match perfectly between PLECS and Qspice, it is uncertain whether they can generate an “exactly same” profile to match every simulation point.
This is supplementary information if anyone is interested about the different of default inductor Rser and Rpar in LTspice and Qspice. There are few posts in Qspice forum questioned about different of LTspice/Qspice simulation result and is related to this default setting.
Thanks for your answer, I read ‘trtol2’ as ‘trtol’ and got confused!
For your information: In this particular case (all devices are almost perfectly ideal) PLECS shows the same losses as SPICE/QSPICE. The picture above is generated in 233ms, so there is some room for improvement in all SPICEs :–)
Assigning some default minimum value to parts and their parasitics is not a bad idea.
No voltage supply in the real world is ever 0 Ohm. Very few things in nature is “0”.
No resistor is ever 0 milliohms, else you would not bother to use a resistor symbol.
Not assigning values to parts results in an error being thrown, so some value of every part used must have some number put in.
LTspice defaults all the switching power supplies demo circuits to “0” Ohm internal resistance, which in real life would/could work great, or not at all.
Zero is more of a abstraction than an engineering reality.