Basic buck converter simulation - switching node not going to zero volts

Thread Starter

jorisd

Joined Dec 9, 2018
10
Hello all,

I am a newbie to electronics, just messing around in LTspice.

Trying to simulate a basic buck converter (see pic), but the switching node never goes to zero volts - it charges up with the output. The circuit is so simple, how can it not work?

Any help appreciated.screenshot9.png
 

Thread Starter

jorisd

Joined Dec 9, 2018
10
Found out it works when the inductor has value around 10mh. That seems a bit high as all the circuits I checked had the inductor in the 100uH range. This circuit is high-voltage/low current. Can this be why a high-ish inductor is needed?
 

ebp

Joined Feb 8, 2018
2,332
It would be helpful to those of us who don't run that sim software to post some waveforms for "working" and "non-working" values.

I can't tell what the pulse parameters are supposed to be.

What is the input voltage (I'd get rid of the AC sources and use a fixed DC until the rest is sorted out)?

What is the load - it seems to be disconnected?

If the inductor current goes discontinuous, that is, drops to zero each switching cycle, then the switching node will sit at the output voltage once the inductor has discharged, however immediately after the FET turns off it will go to a diode drop negative with respect to "ground." In discontinuous mode the relationship among input voltage, output voltage and duty cycle do no "hold" i.e. Vout will not be Vin time duty cycle.
 

Thread Starter

jorisd

Joined Dec 9, 2018
10
I'm making progress. When the switching node doesn't go down to zero, raising the switching frequency (keeping same duty cycle) can solve the issue. Can anyone explain why this is so?
 

ebp

Joined Feb 8, 2018
2,332
I really need to see a waveform that shows no more than about 3 switching cycles several milliseconds after the start of the simulation in order to show decent detail under steady state conditions (input and output capacitor average voltage stable from one switching cycle to another).

Try significantly (e.g. factor or 5, 10 or more) reducing the load resistance. If you are using the AC input circuit, this may make things hard to see because of the ripple voltage, which is why I suggest a simple DC source until you get the basic function worked out.

With all other things equal, changing the frequency will change the current at which the mode changes from continuous inductor current to discontinuous inductor current.

some simple things explain "all" switch mode converter behavior:
- you can't instantaneously change the voltage on a capacitor (with finite current) - during the course of a single switching cycle it is normally sufficient to assume the voltage will remain constant; it isn't quite constant, but close enough for simple analysis
- in equilibrium, the average current through the output capacitor is zero (otherwise the average voltage would be changing)
- in equilibrium, the average voltage across the inductor is zero (otherwise the average current would be changing)
- the current in an inductor is described by
Vdt = Ldi or di/dt = V/L, that is, the rate of change of current (differential of current with respect to time) is equal to the potential across the inductor in volts divided by the inductance in henries

Think about the voltage across the inductor when the switch is ON (with the output voltage at equilibrium) and when it is OFF (to simplify, assume both the switch and diode have zero volts across them when they are conducting) - the "volt-second product" of those two parts of the switching cycle must be equal - zero average voltage across the inductor.

Crutschow is very good with LTspice and can help you set up things like "initial conditions" and making waveform plots that start some time after the simulation starts. These things are very helpful in looking at equilibrium conditions in detail instead of having plots that show how the output cap gets charged up initially but in which you can't see any detail because of the time scale. (I'm useless for help on those things because I don't use LTspice, though it looks to me like it may be the best free electronics software to be had - I just don't do electronics anymore).
 

Thread Starter

jorisd

Joined Dec 9, 2018
10
Edp, thanks for your replies. LTspice is really great for newbies like me to play around without losing time on building prototypes that don't work. In my vacuum tube projects it has given very precise results, be it on the amplifier circuits themselves or the power supply regulators. Once a circuit has been tested in LTspice I build it and it works as expected - an incredible confidence boost for a newbie.

I usually build shunt regulators for my amps - I like their sound but as you know the efficiency is out the window - that's why I try to broaden my horizon with SMPSes.

I know how to start plots after a given time, and use that extensively. Here are plots of current through mosfet, diode and inductor after all voltages have stabilized: everything seems normal. Got to add a snubber to get rid of the spikes though.

screenshot11.png

With 1/10th the load there seems to be onset of ringing:

screenshot12.png
 

ebp

Joined Feb 8, 2018
2,332
The ringing is typical of operation in discontinuous current mode - after the energy stored in the inductor is discharged you get ringing between the inductance and the circuit capacitances, including the inductor's own parasitic capacitance. It looks fearsome, but usually there is very little energy being shifted around.

The big very narrow drain current spike looks like it may be due to the capacitance of the the diode. You get spikes like that from reverse recovery of a diode, but Schottky diode reverse recovery is almost non-existent. That type of spike can sometimes be tamed with a lossy ferrite bead and sometimes reduced by reducing the gate drive current so turn-on is a bit slower. If you actually operate in discontinuous mode, slow turn-on doesn't cost much efficiency because the inductor current starts at zero. Simulation is great for that sort of thing if the models are good since you can mess around with drive and easily see differences in switching losses. It's difficult in a real circuit - usually requires a current probe which is a few thousand dollars.

Your inductor is in the circuit "backwards", possibly intentionally, as far as LTspice is concerned. LTs considers current that flows from pin 1 to pin 2 of a passive part to be positive, so I presume you have pin 2 at the switch node. It does make it easier to see what is going on when you don't have everything over top of each other, as long as you can mentally do the inversion.

Your first waveform is just slightly into discontinuous operation. Increasing the load current a little should push it into continuous mode, where the Vout = Vin x duty cycle equation begins to hold. Alternatively, increase the inductance a little.

Beware of switchers - they can be bloody nasty things. The little ones where you build them according to the chip manufacture's recommended layout tend to be well behaved and just work. Once you get into circuits with parts more spread out, discrete FETs and higher voltages, they can be miserable. At least you aren't switching many amperes along with your high voltage. I often say of switchers that everything is in conflict with everything else.
 

Thread Starter

jorisd

Joined Dec 9, 2018
10
Yes to be honest I am a bit intimidated by switchers, especially since my interest in them is for high voltages. The one time I played around with a 555-based one with discrete components on a breadboard, without much CAD simulation, I remember the output voltage would fly around between 100v and 500-600v just by slighly pushing/pulling the parts' pins in the breadboard sockets. It showed how sensitive they are to parasitics and board layout. I am more cautious now :)

Thanks for the good info.
 

Thread Starter

jorisd

Joined Dec 9, 2018
10
You were right, Schottky diodes got rid of the spikes. Got to get some HV ones.
This is in line with my readings, just about every design use them for their very small recovery parasitic characteristics. Saw a few use UFs so I tried it since I have a stock but they won't cut it.
 

Thread Starter

jorisd

Joined Dec 9, 2018
10
If anyone is interested, here's a prototype circuit that works (in simulation). Control circuitry will be floating about the switching node as I don't have/want a HV P-channel mosfet and don't care much about charge pumps and high-side switch drivers.

screenshot14.png

Load regulation is surprisingly good, voltage stays set with less than 1V pk-pk ripple voltage difference from no load to 70mA, about .5v ripple pk-pk at nominal 50mA/310V. Perhaps a precision voltage reference for the op-amp error amplifier could better this but it is still pretty decent for my application.

Included asc file for anyone wanting to run it. Includes are in another post above.

Here's some screenshots of currents through main components. I'm a bit puzzled from the reverse current on the mosfet though... can't be the reverse diode, switch node is always lower than Vin....? Anyway, if someone sees something wrong, please do tell :)

screenshot15.png screenshot16.png
 

Thread Starter

jorisd

Joined Dec 9, 2018
10
Almost complete elimination of mosfet ringing with proper gate resistors. gate resistor (R1) = 10K, gate-drain resistor (R13) 1meg.

Also forget about the ripple figures in post above wrt to voltage reference. That was when I planned to drive the error amp from the output itself through a zener shunt regulation. I then decided to just add a little SMPS for the error ampl section. The figures I posted were with the ideal 12V voltage source pictured.

screenshot17.png
 
Top