There is a strong difference in the results in the Qspice and LTspice programs when calculating the simplest circuit!


By default, LTspice, as any other SPICE, treats all diodes as snap diodes, i.e., diodes that instantly switch off once the stored charge depletes. This is utterly unrealistic.

Diodes have two charge storage mechanism: junction and diffusion capacitance. Cjo and m describe the junction capacitance. With the diode off, the more you reverse bias the diode, the farther the electrons and holes move from each other and the less junction capacitance. It’s the mechanism of a varactor diode.

But when the diode is forward biased, there are electrons and holes in the junction looking for each other to annihilate to effect the current through the junction. Those carriers make the diffusion capacitance. The more forward current through the diode, the more charge in the junction; hence the parameter that describes this charge has the units of time an is called TT. TT multiplied by the forward current is the charge in the junction that must be removed for the diode to stop conducting. A diode can be made to make this turn off extremely quick, causing an almost instantaneous stop in the current flow. These very special diodes are called snap diodes and are used in instrumentation to make exceeding fast pulses. For example, one can differentiate that abrupt stop in current to make a pulse just 100ps wide.

But most diodes are not snap diodes, even though SPICE treats all diodes as perfect snap diodes. You’ll never get a 1N4007 to turn off in 1ps as it will in most SPICE versions.

There have been a number of suggested ways to fix this shortcoming in SPICE. I use the parameter VP, which dampens the turn off. VP does not default to zero in QSPICE. If you want to duplicate the erroneous result of a standard SPICE in QSPICE, add VP=0 to your diode model.



I actually compared the recovery of the 1N4007 model from QSpice with lab measurements. Conclusions:

  • The model in QSpice does not fully capture the real diode behavior in every detail but it is very significantly more realistic than any other model I could find from any manufacturer website, or from LTspice. So below I will call the new Qspice 1N4007 model the “full model” anyway.
  • The models from these other sources all show surprisingly over-simplified behavior, and this can not easily be judged by just looking at the model definition.
  • The full model behaves identically in Qspice and LTspice, at least in a small test circuit. The model parameters are understood identically by both, and it looks like the internal simulator code is identical or fully compatible.
  • In a big LTspice project however, the full model caused serious convergence problems in LTspice, so it could not be used!

About that last point: I did not port that big project to Qspice, and don’t plan to do so because its an old and finished project. However, I’m wondering why the full model is standard in Qspice but not in LTspice, even though they both can support it.
@Engelhardt Maybe some improvements in Qspice were actually required to avoid risk of convergence problems that come along with the behavior of the full model? Or would Qspice also show these convergence problems in similar circumstances?