I tried simulating the loop gain of several negative feedback circuits using QSPICE, but I was confused because there was a surprisingly large difference compared to LTspice, which I had been using regularly. I don’t know the reason as I don’t know any calculation algorithms for both.
As a typical example,
I used Middlebrook.qsch, one of the QSPICE DEMOs, to compare the frequency characteristics of LoopGain by porting the exact same device model as QSPICE to LTspice.
The formula for Middlebrook’s loop gain is:
Both QSPICE and LTspice
It was unified.
The results are as follows.
A table summarizing (Gain, Phase) values at frequencies for each decade is shown below.
The FT value is
It calculates frequencies that are significantly different.
Now, QSPICE vs. LTspice, which simulation calculates closer to the true value?
you are sure that the transistor models in the two programs are the same. Also what is the Rser parameter in LTspice for a 100 µF capacitor?
Specify the attributes of the parasitic series resistance of 100uf by LTspice.
I got the same issue, with another circuit.
That the phase differes significantly but the gain seems similar.
Did you resolve why the difference was this large?
I think those who have tried QSPICE from LTspice have seen similar differences regarding LoopGain.
However, this is an untouchable area that only developers can solve. Therefore, I look forward to hearing Mike’s views.
I found the Issue in my circuit, so the difference is neglicatble between the two simulators, but my circuit is much less complex than yours.
Anyway have you tried the Tian method in both LTspice and Qspice?
In my knowledge it’s more accurate, and less prone to error in the calculation and more immune for the polarity of pertubation.
I have a similar problem.
Took the schematic from the LTspice Education folder. Entered the same circuit in Qspice, and got a completely different result. I replaced the operational amplifier in the original circuit with a simple model and changed some nominal values.
I can confirm another Issue were they differ alot, mostly in phase but in gain aswell.
Earlier I did for a type II TL431 in both simulators with no issues but the issues arrised when implementing a TYPE III compensator
A npn transistor model is used to compare Qspice, LTspice and TINA-TI .ac analysis.
The circuit is built in Qspice, export to Netlist, and run netlist in LTspice and TINA-TI (slightly modification is required, but none are related to device parameters)
Test circuit with npn transistor, use BC546B model which is from LTspice library.
This is netlist in Qspice, LTspice and TINA-TI
- LTspice : add “;” in line 2 to comment NPN (cannot be interpreter in LTspice)
- TINA-TI : add “;” in line 2 to comment NPN, also comment .plot command, and add a .probe (which are all necessary for TINA-TI to run a .ac analysis)
All data are exported and compare in this chart, simulation uses their default options.
All simulators give slightly different results. If only one transistor can have deviation between simulators, deviation can be expected for a circuit with multiple nonlinear elements (diodes, transistors)
Different method, formula, implementation, numerical method and options between simulators, it is common that results can deviate.
I found an Issue within LTspice for the model used,
apparently LTspice round every Emission coefficient for diodes nowadays to 0.1 if it’s lower.
So when I changed the Emission coefficient for the diode to 0.1 in the subckt affected by this rounding they give the same results. Now the simulations coincides.
Emission Coefficient rounding in LTspice
Bordodynov, what was the issue in your case?
I wonder if it’s something worth sharing
Current source Ii ac u(-prb) —> ac u(prb)