DC simulation: a very odd problem has occured when DC voltage sweeping

I’m simulating a circuit (I attach the project archive), which simulates perfactly in transient mode, and also in DC voltage sweep mode in most situations. But with serious exceptions!

Example1:
Source: V1
Start: 0
Final: 19
Step: 70m (and below)
This simulation fails totally

Example2:
Source: V1
Start: 0
Final: 19
Step: 71m (and higher)
This simulation runs perfectly with the expected results (from the transient simulation).

Playing around, I changed the DC sweep start and step:

Example3:
Source: V1
Start: 2
Final: 19
Step: 30m
This simulation fails totally

Example4:
Source: V1
Start: 2
Final: 19
Step: 31m
This simulation runs perfectly with the expected results (from the transient simulation).

Can someone explain this behaviour, please? Is there a maximum number of simulation points that cannot be exceeded? Or?

Thanks.
19V_350mA.zip (897.1 KB)


The info on KiCad and ngspice version is missing.
The model for the BD437 is missing.
I cannot reproduce your results. It always converges (KiCad 6.0.7, ngspice-37).

Please have a look at the TLV431 data sheet. Max. Cathode voltage is 6 V.

If you run a simulation outside of the givven range of a device, anything can happen.

Thanks, holger.
Looking in the archive file (.zip), I see that the BD437 model is missing, but it’s actually in the schematic. Very odd, how can that happen?
Your point about the TLV431 cathode voltage is very good, thanks, I’ll look into that.

OK, I still have the same problem.
I’ve modified the resistor values so there’s no chance that the TLV431 can ever operate outside its limits.

Exporting the archive file still does not include the BD437 spice model. Don’t ask me why. It’s there.
And the DC voltage sweep (0…19 V) still gives trouble.
A step of 60m simulates perfectly, a step of 50m delivers garbage.
I attach the new archive (without BD437) plus BD437.LIB separately.
I hope someone has an idea.

Thanks.
19V_350mA.zip (897.6 KB)
BD437.LIB (972 Bytes)

UPDATE: I just don’t believe this: when I change the file name from BD437.LIB to BD437.lib, it gets included in the archive:
19V_350mA.zip (898.2 KB)
Seriously? But that’s an Archiver problem. The simulation problem persists.

I have added another model for the BD437 which converges much better. Main difference is the parameter VAF. You will have to compare both and measure which is the more realistic model.
BD437.LIB (1.3 KB)

Thanks.
Unfortunately your BD437 model does not converge (the first model does, but that’s the same official one that I’m already using from onsemi.com, Qbd437=QQbd427).
The second model (BD437) does not work at all. Perhaps because it’s an LTSpice model? IDK.
But that doesn’t change the fact, that all simulations on my circuit work perfectly, except the DC sweep. I really think there’s a problem here.

Are you able to reproduce the issue using my new files?

Thanks for your help.

No, I always get convergence, with some ngspice effort when using the onsemi model and without any problems (extra iterations etc) with the LTSPICE model. So there must be some difference in simulator setup or version.

The onsemi model creates some potential instability. When plotting the U1 Cathode voltage versus Sweep, there is a steep negative slope at around 13 V Sweep. Negative slope may cause instability, which the simulator also may face. This negative slope is absent with the LTSPICE model.

The next one is simulated with the LTSPICE model:

No instability here with the onsemi model.

But the LTSpice model immediately creates problems:

Can it be an uppercase/lowercase issue? Ngspice simply does not like the parameters. Or does the model need a line telling ngspice that it’s an LTSpice model? I’m confused.