*=============Duty_Cycle_Plots=======================
One way to view the relationship between an output voltage and
the duty cycle that created it, is to do a duty cycle sweep during
a transient analysis. It is not hard to sweep from 0% to 100% over
a given length of time. A piece wise linear waveform which
ramps from zero to unity can be used to pulse width modulate a
square wave.
=======================================================================
=======================================================================
VP VP 0 DC 3.141592653589793
VT VT 0 PWL ( 0 0 1m .1m )
B_TRI TRI 0 V = acos( cos(v(VP)*v(VT)*2*1e6) )/v(VP)
VD VD 0 PWL ( 0 0 1m 1 )
B_SW PWM 0 V = 2*u( -v(TRI) +v(VD)) -1
B_ON VON 0 V = 5*u( v(PWM) )
=======================================================================
A voltage ramp which represents time "VT" can be constructed.
The time scale can also be scaled. It might be handy to create a
DC voltage "VP" equal to PI. An arcosine of a cosine can
create a very clean "TRI" which is a triangle wave.
The duty cycle voltage "VD" is set to go from zero to one.
This voltage then offsets the triangle wave and is limited
to produce the "PWM" pulse width modulated signal.
=======================================================================
=======================================================================
The three plots above show how the duty cycle voltage "VD"
offsets the triangle wave "TRI" at various times to
to produce the "VON" pulse width modulated signal.
=======================================================================
Buck_Converter
* _ _ _
* ___ / V1 / \/ \/ \ ___ R1
* |VIN|_/ ______| () () |__|OUT|__/\ /\ /\__
* |___| S1 _|_ L1 |___| \/ \/ _|_
* ^ 100u | C1 ///
* 1MHz D1 /_\ |__||__ 3u
* | Freq = 9K || _|_
* _|_ Z=5.8Ohms ///
* ///
=======================================================================
A Buck_Converter almost looks like it is applying a
pulse width modulated signal to a simple LRC lowpass
filter. It that was the case, one would expect the
output to track closely the duty cycle.
But the switch and diode are making things a little nonlinear.
=======================================================================
Buck_Converter
* _ _ _
* ___ / V1 / \/ \/ \ ___ R1 = 50K
* |VIN|_/ ______| () () |__|OUT|__/\ /\ /\__
* |___| S1 _|_ L1 |___| \/ \/ _|_
* ^ 100u | C1 ///
* 1MHz D1 /_\ |__||__ 3u
* | Freq = 9K || _|_
* _|_ Z=5.8Ohms ///
* ///
plot out vs vd
=======================================================================
One can call out a Y vs X plot of the output voltage "OUT"
versus the duty cycle "VD". This output voltage to
duty cycle relationship is a function of the size of
the output load resistor R1. In this case, the load resistor
is 50KOhms.
=======================================================================
Buck_Converter
* VL _ _ _
* ___ / V1 RL 1m / \/ \/ \ ___ R1 = 50K
* |VIN|_/ _______/\ /\ /\_| () () |__|OUT|__/\ /\ /\__
* |___| S1 _|_ \/ \/ L1 |___| \/ \/ _|_
* ^ 100u | C1 ///
* 1MHz D1 /_\ 1m RD |__||__ 3u
* |_/\ /\ /\_ Freq = 9K || _|_
* VD \/ \/ _|_ Z=5.8Ohms ///
* ///
When one sticks in some 1mOhm resistors in series with the diode
and the inductor, the nonlinear output voltage begins to make sense.
Monitoring "V1-VL" shows the inductor current and "VD" is the diode
current.
=======================================================================
=======================================================================
At a time of 60us, the duty cycle is at 6%. The output "OUT" is very close
to zero. Inductor L1 is seeing 5volts across it for 6% of 10usec.
During that 600nsec, one would expect a 100uH inductor to ramp up to a
current of 30mA. When switch S1 is open, inductor L1 will be getting
its current from diode D1 which is 600mV. So the current will ramp down
about 8 times slower. And then no current will flow thru the inductor.
So the inductor, the switch, and the diode are in effect creating an
additional duty cycle as to how long is the inductor drawing current.
=======================================================================
Buck_Converter
* VL _ _ _
* ___ / V1 RL 1m / \/ \/ \ ___ R1 = 50K
* |VIN|_/ _______/\ /\ /\_| () () |__|OUT|__/\ /\ /\__
* |___| S1 _|_ \/ \/ L1 |___| \/ \/ _|_
* ^ 100u | C1 ///
* 1MHz D1 /_\ 1m RD |__||__ 3u
* |_/\ /\ /\_ Freq = 9K || _|_
* VD \/ \/ _|_ Z=5.8Ohms ///
* ///
=======================================================================
At a time around 560us, the applied duty cycle is around 5us of 10us.
At a 50% duty cycle, the output "OUT" is around 4.13 volts.
Now inductor L1 is seeing about 900mV when the switch is on and
will ramp up to around 55mA. When the switch is open, the diode
D1 will produce about 5V around L1, and the current will ramp
down about 5 times faster. Again there is an additional duty
cycle in terms of how long is the inductor drawing current.
=======================================================================
Buck_Converter
* VL _ _ _
* ___ / V1 RL 1m / \/ \/ \ ___ R1 = 50K
* |VIN|_/ _______/\ /\ /\_| () () |__|OUT|__/\ /\ /\__
* |___| S1 _|_ \/ \/ L1 |___| \/ \/ _|_
* ^ 100u | C1 ///
* 1MHz D1 /_\ 1m RD |__||__ 3u
* |_/\ /\ /\_ Freq = 9K || _|_
* VD \/ \/ _|_ Z=5.8Ohms ///
* ///
=======================================================================
At a 75% duty cycle, the output "OUT" is close to 5 volts.
Now inductor L1 is seeing a small voltage when the switch is on
for 7.5us, and will be ramping up to around 17mA. When the
switch is open, inductor L1 see close to 6volt, and ramps
down much faster.
=======================================================================
Buck_Converter
* _ _ _
* ___ / V1 / \/ \/ \ ___ R1 = 25
* |VIN|_/ ______| () () |__|OUT|__/\ /\ /\__
* |___| S1 _|_ L1 |___| \/ \/ _|_
* ^ 100u | C1 ///
* 1MHz D1 /_\ |__||__ 3u
* | Freq = 9K || _|_
* _|_ Z=5.8Ohms ///
* ///
But everything changes when the output resistor R1 is reduced
to 25 Ohms. Plotting the output voltage versus the applied
duty cycle shows a more linear relationship above a 50% duty
cycle. It turns out this happens when the current in inductor
L1 never completely turns off.
plot out vs vd
=======================================================================
Buck_Converter
* VL _ _ _
* ___ / V1 RL 1m / \/ \/ \ ___ R1 = 25
* |VIN|_/ _______/\ /\ /\_| () () |__|OUT|__/\ /\ /\__
* |___| S1 _|_ \/ \/ L1 |___| \/ \/ _|_
* ^ 100u | C1 ///
* 1MHz D1 /_\ 1m RD |__||__ 3u
* |_/\ /\ /\_ Freq = 9K || _|_
* VD \/ \/ _|_ Z=5.8Ohms ///
* ///
At a 6% duty cycle, everything is pretty much the same. The inductor
ramps up to about 30mA, and then back down again.
=======================================================================
Buck_Converter
* VL _ _ _
* ___ / V1 RL 1m / \/ \/ \ ___ R1 = 25
* |VIN|_/ _______/\ /\ /\_| () () |__|OUT|__/\ /\ /\__
* |___| S1 _|_ \/ \/ L1 |___| \/ \/ _|_
* ^ 100u | C1 ///
* 1MHz D1 /_\ 1m RD |__||__ 3u
* |_/\ /\ /\_ Freq = 9K || _|_
* VD \/ \/ _|_ Z=5.8Ohms ///
* ///
But at 56% duty cycle, the output "OUT" is around 2.6volts. Now the
inductor L1 ramps between 37mA and 188mA. So the current in the inductor
never turns off, and the whole Buck converter is acting more like a simple
lowpass filtered 56% duty cycled 5V square wave.
=======================================================================
Buck_Converter
* VL _ _ _
* ___ / V1 RL 1m / \/ \/ \ ___ R1 = 25
* |VIN|_/ _______/\ /\ /\_| () () |__|OUT|__/\ /\ /\__
* |___| S1 _|_ \/ \/ L1 |___| \/ \/ _|_
* ^ 100u | C1 ///
* 1MHz D1 /_\ 1m RD |__||__ 3u
* |_/\ /\ /\_ Freq = 9K || _|_
* VD \/ \/ _|_ Z=5.8Ohms ///
* ///
At 76% duty cycle, the output "OUT" is around 3.6volts. Now the
inductor L1 ramps between 108mA and 218mA. The whole Buck is
looking more like a Pulse width modulated square wave that is
LRC lowpass filtered.
=======================================================================
plot out vs vd
Since the start of the linear region seems to suggest where
the inductor is drawing continuous current. Plotting output
versus duty cycle for three different output loads may
be useful.
===========Full_Netlist_For_Copy_Paste=======================
Buck_Converter
* _ _ _
* ___ / V1 / \/ \/ \ ___ R1
* |VIN|_/ ______| () () |__|OUT|__/\ /\ /\__
* |___| S1 _|_ L1 |___| \/ \/ _|_
* ^ 100u | C1 ///
* 1MHz /_\ |__||__ 3u
* | Freq = 9K || _|_
* _|_ Z=5.8Ohms ///
* ///
VP VP 0 DC 3.141592653589793
VT VT 0 PWL ( 0 0 1m .1m )
VD VD 0 PWL ( 0 0 1m 1 )
B_TRI TRI 0 V = acos( cos(v(VP)*v(VT)*2*1e6) )/v(VP)
B_SW PWM 0 V = 2*u( -v(TRI) +v(VD)) -1
B_ON VON 0 V = 5*u( v(PWM) )
VIN VIN 0 DC 5
*SXXXXXX N+ N- NC+ NC- MODEL <ON><OFF>
S1 VIN V1 PWM 0 SWP
D1 ID V1 DD
L1 V1L OUT 100u
C1 OUT 0 3u
R1 OUT 0 50K
RD ID 0 1m
RL V1 V1L 1m
.MODEL SWP SW( VT=2.6m VH=.2 RON=10u ROFF=100MEG)
.model DD D( IS=3.15e-18 )
*TRAN TSTEP TSTOP TSTART TMAX ?UIC?
.tran .01u 1m 0 .01us
*=========Run_Sim============================================
.control
run
set pensize = 2
plot v(vd) v(von)/6 ylimit -.5 1.5
set pensize = 3
plot v(tri) v(vd) v(von)/5 xlimit .05m .08m ylimit -.5 1.5
plot v(tri) v(vd) v(von)/5 xlimit .49m .52m ylimit -.5 1.5
plot v(tri) v(vd) v(von)/5 xlimit .89m .92m ylimit -.5 1.5
plot out vs vd
plot (v1-v1l)*10000 id*10000 von/50-250m out/10 v1/10 xlimit .05m .07m ylimit -.5 1
plot (v1-v1l)*10000 id*10000 von/50-250m out/10 v1/10 xlimit .55m .57m ylimit -1 1
plot (v1-v1l)*10000 id*10000 von/50-250m out/10 v1/10 xlimit .75m .77m ylimit -1 1
.endc
.end