Electronic – Simulating simple SMPS model

spiceswitch-mode-power-supply

I'm trying to simulate using ngspice/kicad a very simple switch mode power supply model, as below.
Simulation schematic

I would expect that the coupled inductors to model a transformer with a 10:1 (primary:secondary) winding ratio and as such I would expect around 34V on the secondary output (V1=340V DC). However, what I get from simulation as as below.
Simulation result

The output waveform (one in cyan) hardly does anything. Why ? What am I missing to make the coupled inductors behave more like a real transformer ?

Best Answer

Given your comment to Tony Stewart's answer you are thinking that you are using an ideal transformer, i.e. two coupled, linear inductors, which is not the case here (also the reason why Math Keeps Me Busy couldn't replicate your results).

The waveforms you're showing don't resemble any linear coupling I know and, sure enough, a quick test in both Ngspice and LTspice with simple coupled inductors proved that the waveforms do not even come close to what you're showing. Reversing the polarity has no effect here since it's a resistive load, no nonlinear diode.

So I added a Chan core with some wet fingerâ„¢ values and the mystery is solved: you must have used a non-linear core in your simulation. I didn't have the MOSFET and diode you are using, but that doesn't matter.

68!=69