ftp.delorie.com/electronics/spice-stuff/   search  
Spice/GNUCap Projects

Buck Regulator

This circuit is a simplified buck regulator. Instead of a digital logic block controlling the regulator, a simple triangle wave and comparator generates the switch pulses. Commands to run:
gnetlist -v -g spice-sdb -obuck.net buck.sch
ngspice
    source buck.net
    tran 0.001us 0.25ms
    plot nout ndiode nin Vind#branch Vcap#branch

gnucap notes

gnucap
    get buck.net
    print tran v(*) i(*)
    tran 0.25ms 0.25ms trace all >z
    !gwave z &
then drag the signals you want onto the gwave canvas.

Things to try

The buck-math script generates ideal values for the inductor and capacitor based on the load and vin/vout parameters. What happens is you use a smaller inductor? A smaller capacitor?

The inductor value is a minimum. Try one ten times bigger. Add a PWL/switch/resistor to the load to simulate a step load. What happens to the load response time?

The current through the inductor falls nearly to zero, or even hits zero depending on the vin/vout ratio. What can you do to keep it from falling to zero?

What changes if you change the frequency? What doesn't change?


  webmaster     delorie software   privacy  
  Copyright © 2011     Updated Dec 2011