Fatal error too small

Hello, people.
I got the following error

Fatal error: Timestep too small(1.7114e-16) at t=0.00136812

while simulating the following circuit:

Could you please provide any advise?

This circuit poses convergence challenges in QSPICE.
(note : running this circuit in LTspice and checking the SPICE Output Log reveals that its solver constantly relaxes tolerances to reach convergence.)

In Qspice, adding cshunt for convergence. And because this is an oscillator circuit, you should set maxstep significantly smaller than the oscillation period.

.option maxstep=1µ
.option cshunt=1p

transistor.qsch (6.5 KB)

Or, include Cje and Cjc in NPN an PNP .model (can remove .option cshunt=1p). In short, parasitic capacitance smooths the steep I-V curves during transient simulation.

.model NPN NPN Cje=1p Cjc=1p
.model PNP PNP Cje=1p Cjc=1p

Thank you so much for your assistance. Greetings from Panama :panama:

1 Like

Hello @KSKelvin, @topito222

It’s best to be wary of cshunt because, as you know, it adds capacitance to every node, which might have adverse effects (or not). Instead, one thing that can be done to the original schematic is to use “real” models, or add a .model (which you already have) – in fact, even solely .model npn npn cje=1p is enough, or a simple 1p cap across one of the junctions, or from Q2 base to ground, nothing else. Of course, tighter timesteps will provide better resolution but, that depends on the needs; since the OP didn’t even include a proper .model, I’m guessing this is just a “let’s see how it works”.

.opt cshunt=xxx tends to be regarded as a “lazy” solution because all it takes is a single command that takes care of everything, instead of carefully using a single cap where it’s needed – it might solve the problem but, at what cost?

Vlad

PS: Also, a stepped supply sometimes does wonders (e.g. pwl 0 0 1u 12).

1 Like