Simple 1ph rectifier doesn't compute

I’m afraid this is a known error but I’m trying to draw a bunch of power electronic simulations and this simple phase rectifier does not run properly. It is sometimes really discouraging.
What do I wrong ?
I run Kicad 7 on Mac.
Single_Phase_Rectifier.kicad_sch (20.8 KB)

So the issue appears to be sane defaults, especially the “reverse breakdown voltage”. SPICE in general has this set to INF while kicad has this as 0V and you can guess what that does to the simulator when any voltage appears across the device

Changing some key values to align to a 1N4004 makes the simulation work

Sim.Params = m=0.333 is=76.9n rs=42.2m n=1.45 tt=4.32u cjo=39.8p bv=400 ibv=5u

And here is attached a three phase bridge that also gives non sense results.
Three_Phase_Rectifier.kicad_sch (28.3 KB)

thanks! I’ll have a look tomorrow.
Thanks a lot, those errors can really be frustrating :wink:

so same thing, set a real diode parameters (NOTE… the kicad defaults need to be changed because an ideal diode should be the default not a singularity)

Piece of advice… change the SPICE reference voltage node to the DCL-negative. kicad-ngspice cannot do differential voltages (yet) so you can only do single-open-ended and thus if you are interested in the rectified voltage you need to move the reference point (downside is you won’t be able to see Vabc but well :slight_smile: )

The main remedy is placing the reference (ground) node to a suitable place.
A help to allow placing the ground node to any place in the circuit is adding shunt resistors to each node by extending the text box to

.tran 100u 100m
.option rshunt=1e11

Due to its high resistance value it does not disturb the behavior, but helps to achieve convergence for any ground position.

Edit: 1e11 may be better.

working on a fix for this… stand by

Eeschema is sending the model .model __D4 D to ngspice, thus relying on its intrinsic diode parameters. The default for the breakdown voltage in ngspice is INF, as simply no breakdown current is calculated when parameter bv is not given.

So there is not need to change the model here, but of course it might finally be better to use existing devices instead of the default.

The bug is in the table saying that bv=0 per default.

The critical issue is the location of the ground symbol. Every spice needs proper dc paths from each node to ground to avoid a matrix singularity. Obviously the default diode model is not a reliable dc path. So the option .option rshunt=1e11 may help to avoid singularities, as it sets a 1e11 Ohms resistor from each node to ground… This option should be made available by Eeschema as one of the potential convergence helpers, enabled by default but being deselectable by experienced users.

1 Like

But as holger says, the incorrect value was purely informational and does not affect a simulation. If you don’t override a default parameter value then KiCad doesn’t write it into the spice netlist, so ngspice uses its internal default (which is supposed to match what the table says).

Thanks all for your help.
Holger, it’s a kind of gibberish to me but somehow I understand the computer needs a path that the diode makes tricky to get. OK why not.
Indeed such option should be by default and a nice diff. Vmeas would be nice too.


How said path is provided (to allow the solver to resolve) is key. Yes the “impedance on every node” is a perfectly valid approach, but also a valid diode, which would include leakage current (and thus a path to reference) also helps