Scaling API-first – The story of a global engineering organization
Concept Kit:PWM Buck Converter Average Model
1. PWM Controller Power Switches Filter & Load
(Voltage Mode Control) U?
U?
PWM_CTRL BUCK_SW
L
VOUT
1 2 Vo
-
-
+
PWM C
+
D
1/Vp
Rload
REF ESR
VREF VP = 2.5
VREF = 1.23
Concept Kit:
PWM Buck Converter
Average Model
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 1
2. Contents
• Concept of Simulation
• Buck Converter Circuit
• Averaged Buck Switch Model
• Buck Regulator Design Workflow
1. Setting PWM Controller’s Parameters.
2. Programming Output Voltage: Rupper, Rlower
3. Inductor Selection: L
4. Capacitor Selection: C, ESR
5. Stabilizing the Converter (Example)
• Load Transient Response Simulation (Example)
Appendix
A. Type 2 Compensation Calculation using Excel
B. Feedback Loop Compensators
C. Simulation Index
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 2
3. Concept of Simulation
Block Diagram:
PWM Controller Power Switches Filter & Load
(Voltage Mode
Control) Averaged Buck Parameter: VOUT
Switch Model •L
-
+
Parameter: •C
• VP • ESR
VREF • VREF • Rload
Models:
U? U? L
PWM_CTRL BUCK_SW 1 2 Vo
-
C
PWM D
+ Rload
1/Vp ESR
REF
VP = 2.5
VREF = 1.23
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 3
4. Buck Converter Circuit
Power Switches Filter & Load
U2
BUCK_SW L
1 2 Vo
D C
Vin
Rload
ESR
0 PWM Controller
Type 2 Compensator
C2
R2 C1
U3 Comp Rupper
PWM_CTRL
- FB
d
PWM +
1/Vp Rlower
REF
VP = 2.5
VREF = 1.23 0
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 4
5. Averaged Buck Switch Model
iin U2 iout
BUCK_SW
+ D +
vin vout
D
- -
• The Averaged Buck Switch Model represents relation between input and output
of the switch that is controlled by duty cycle – d (value between 0 and 1).
• Transfer function of the model is
vout = d vin
• The current flow into the switch is
iin = d iout
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 5
6. Buck Regulator Design Workflow
1 Setting PWM Controller’s Parameters: VREF, VP
2 Setting Output Voltage: Rupper, Rlower
3 Inductor Selection: L
4 Capacitor Selection: C, ESR
5 Stabilizing the Converter: R2, C1, C2
• Step1: Open the loop with LoL=1kH and CoL=1kF then inject an AC signal to generate Bode plot. (always default)
• Step2: Set C1=1kF, C2=1fF, (always keep the default value) and R2= calculated value (Rupper//Rlower) as the initial values.
• Step3: Select a crossover frequency (about 10kHz or fc < fosc/4). Then complete the table.
• Step4: Read the Gain and Phase value at the crossover frequency (10kHz) from the Bode plot, Then put the values to
the table
• Step5: Select the phase margin at the fc ( > 45 ). Then change the K value until it gives the satisfied phase margin, for this
example K=6 is chosen for Phase margin = 46.
• Remark: If K-factor fail to gives the satisfied phase margin, Increase the output capacitor C then try Step1 to Step5
again.
6 Load Transient Response Simulation
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 6
7. Buck Regulator Design Workflow
U2
BUCK_SW 3 L
1 2 Vo
D C
Vin
Rload
ESR
4
0
5 Type 2 Compensator
C2
R2 C1
2
U3 Comp Rupper
PWM_CTRL
- FB
d
PWM +
1/Vp Rlower
REF
1 VP = 2.5
0
VREF = 1.23
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 7
8. 1 Setting PWM Controller’s Parameters
U? vcomp
PWM_CTRL • VREF, feedback reference voltage, value
- FB is given by the datasheet
d PWM
• VP = (Error Amp. Gain vFB ) / d
+
1/Vp
Error Amp.
REF • vFB = vFBH – vFBL
VP = 2.5 • d = dMAX – dMIN
VREF = 1.23
• Error Amp. Gain is 100 (approximated)
The PWM block is used to transfer the error voltage
(between FB and REF) to be the duty cycle. where
3.0V
2.0V
VP is the sawtooth peak voltage.
SEL>> VP vFBH is maximum FB voltage where d = 0
0V
V(osc) V(comp)
vFBL is minimum FB voltage where d =1(100%)
dMAX is maximum duty cycle, e.g. d = 0(0%)
V(PWM) Duty cycle (d) is a value from 0 to 1 dMIN is minimum duty cycle, e.g. d =1(100%)
Time
If vFBH and vFBL are not provided, the default value, VP=2.5 could be used.
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 8
9. 1 Setting PWM Controller’s Parameters (Example)
If the VP ( sawtooth signal amplitude ) does not informed by the datasheet,
It can be approximated from the characteristics below.
from
vFBH
VP = (Error Amp. Gain vFB )/d
vFB = •Error Amp. Gain = 100 (approximated)
25mV
•from the graph on the left, vFB = 25mV
(15m - (-10m))
vFBL
d = 1 (100%) • d = 1 – 0 = 1
VP ≈ ( 100 25mV )/1
dMIN dMAX
≈ 2.5V
LM2575: Feedback Voltage vs. Duty Cycle
If vFBH and vFBL are not provided, the default value, VP=2.5 could be used.
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 9
10. 2 Setting Output Voltage: Rupper, Rlower
• Use the following formula to select the resistor values.
Rupper
VOUT VREF1 Type 2 Compensator Vo
Rlower C2
• Rlower can be between 1k and 5k. R2 C1
U3 Comp Rupper
Example PWM_CTRL
Given: VOUT = 5V - FB
d
VREF = 1.23 PWM
+
Rlower = 1k 1/Vp Rlower
Error Amp. REF
then: Rupper = 3.065k
VP = 2.5
VREF = 1.23 0
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 10
11. 3 Inductor Selection: L
L
1 2 Vo Inductor Value
C
• The output inductor value is selected to set the
converter to work in CCM (Continuous Current
Rload
ESR
Mode) or DCM (Discontinuous Current Mode).
• Calculated by
LCCM
VI , max VOUT RL, min
2 fosc VI , max
Where
• LCCM is the inductor that make the converter to work in CCM.
• VI,max is input maximum voltage
• RL,min is load resistance at the minimum output current ( IOUT,min )
• fosc is switching frequency
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 11
12. 3 Inductor Selection: L (Example)
L
1 2 Vo Inductor Value
C
from
ESR
Rload
LCCM
VI , max VOUT RL, min
2 foscVI , max
Given:
• VI,max = 40V, VOUT = 5V
• IOUT,min = 0.2A
• RL,min = (VOUT / IOUT,min ) = 25
• fosc = 52kHz
Then:
• LCCM 210(uH),
• L = 330(uH) is selected
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 12
13. 4 Capacitor Selection: C, ESR
L
1 2 Vo Capacitor Value
• The minimum allowable output capacitor value should
C
be determined by
Rload
ESR
C 7,785
VI , max
F
VOUT L( H)
Where
• VI, max is the maximum input voltage.
• L (H) is the inductance calculated from previous step ( 3 ).
• In addition, the output ripple voltage due to the capacitor ESR must be considered as
the following equation.
VO , RIPPLE
ESR
IL , RIPPLE
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 13
14. 4 Capacitor Selection: C, ESR (Example)
L
1 2 Vo Capacitor Value
From
C
C 7,785
VI , max
F
ESR
Rload
VOUT L( H)
and
VO , RIPPLE
ESR
IL , RIPPLE
Given:
• VI, max = 40 V
• VOUT = 5 V
• L (H) = 330
Then:
• C 188 (F)
In addition:
• ESR 100m
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 14
15. 5 Stabilizing the Converter
U2
BUCK_SW L H(s)
1 2 Vo
D C
Vin
12Vdc Rload
ESR
0
Type 2 Compensator G(s)
• Loop gain for this configuration is C2
R2 C1
Rupper
GPWM
T ( s) H ( s) G( s) GPWM
3.066k
U3 Comp
PWM_CTRL
- FB
d
PWM +
1/Vp Rlower
REF
1.0k
VP = 2.5
VREF = 1.23 0
• The purpose of the compensator G(s) is to tailor the converter loop gain
(frequency response) to make it stable when operated in closed-loop
conditions.
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 15
16. 5 Stabilizing the Converter (Example)
U2 L
Specification: BUCK_SW
1
330uH
2 Vo
VOUT = 5V D C
330uF
VIN = 7 ~ 40V Vin Rload
12Vdc ESR 5
ILOAD = 0.2 ~ 1A 100m
PWM Controller: 0
G(s) Type 2 Compensator
VREF = 1.23V 1 C2
VP = 2.5V e.g. Given values
from National R2 C1
fOSC = 52kHz
Semiconductor Corp.
IC: LM2575 Rupper
Rlower = 1k, 2 U3
3.1k
PWM_CTRL
Rupper = 3.1k, LOL - FB
L = 330uH, 3 1kH
d
PWM +
C = 330uF (ESR = 100m) 4 COL
1/Vp
REF
Rlower
1.0k
1kF
VP = 2.5
0
Task: 1Vac
V3 VREF = 1.23
0Vdc
• to find out the element of the
Type 2 compensator ( R2, C1, 0
and C2 )
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 16
17. 5 Stabilizing the Converter (Example)
The element of the Type 2 compensator ( R2, C1, and C2 ), that stabilize the converter, can
be extracted by using Type 2 Compensator Calculator (Excel sheet) and open-loop
simulation with the Average Switch Models (ac models).
U2 L
BUCK_SW 330uH
1 2 Vo
D C
330uF
Vin Rload
12Vdc ESR 5
100m
0
Step2 Set C1=1kF, C2=1fF,
Type 2 Compensator
and R2=calculated value
Step1 Open the loop with C2
1f
(Rupper//Rlower) as the
LoL=1kH and CoL=1kF then inject R2 C1 initial values.
an AC signal to generate Bode 0.756k 1k
plot. Rupper
3.1k
U3
PWM_CTRL
LOL - FB
d
PWM
1kH +
1/Vp Rlower
COL 1k
1kF REF
VP = 2.5
V3 VREF = 1.23 0
1Vac
0Vdc
C1=1kF is AC shorted, and C2 1fF is AC opened (or
Error-Amp without compensator).
0
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 17
18. 5 Stabilizing the Converter (Example)
Type 2 Compensator Calculator Step3 Select a crossover frequency
(about 10kHz or fc < fosc/4 ), for
Switching frequency, fosc : 52.00 kHz this example, 10kHz is selected.
Cross-over frequency, fc Then complete the table.
(<fosc/4) : 10.00 kHz
Rupper : 3.1 kOhm
values from 2
Rlower : 1 kOhm
R2 (Rupper//Rlower) : 0.756 kOhm (automatically calculated)
Calculated value of
PWM the Rupper//Rlower
Vref : 1.230 V
values from 1
Vp (Approximate) : 2.5 V
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 18
19. 5 Stabilizing the Converter (Example)
Gain: T(s) = H(s)GPWM
80
40
Step4 Read the Gain and Phase value
at the crossover frequency (10kHz)
0
(10.000K,-44.211) from the Bode plot, Then put the values
-40
to the table.
-80
DB(v(d))
180d
Phase at fc
Parameter extracted from simulation
90d (10.000K,65.068)
Set: R2=R1, C1=1k, C2=1f
Gain (PWM) at foc ( - or + ) : -44.211
SEL>>
0d
Phase (PWM) at foc : 65.068
100Hz 1.0KHz 10KHz 100KHz
P(v(d))
Frequency
Tip: To bring cursor to the fc = 10kHz type “ sfxv(10k) ” in Search Command.
Cursor Search
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 19
20. 5 Stabilizing the Converter (Example)
Step5 Select the phase margin at fc
K-factor (Choose K and from the table) (> 45 ). Then change the K value
K 6 (start from K=2) until it gives the
-199 (automatically calculated)phase margin, for this
satisfied
example K=6 is chosen for Phase
Phase margin : 46 (automatically calculated) 46.
margin =
R2 : 122.780 kOhm (automatically calculated)
As the result; R2,
C1 : 0.778 nF (automatically calculated)
C1, and C2 are
C2 : 21.600 pF (automatically calculated) calculated.
Remark: If K-factor fail to gives the satisfied phase margin, Increase the output
capacitor C then try Step1 to Step5 again.
K Factor enable the circuit designer to choose a loop cross-over frequency and phase
margin, and then determine the necessary component values to achieve these results. A very
big K value (e.g. K > 100) acts like no compensator (C1 is shorted and C2 is opened).
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 20
21. 5 Stabilizing the Converter (Example)
The element of the Type 2 compensator ( R2, C1, and C2 ) extraction can be completed by Type 2
Compensator Calculator (Excel sheet) with the converter average models (ac models) and open-loop
simulation. U2 L
BUCK_SW 330uH
1 2 Vo
D C
330uF
Vin Rload
12Vdc ESR 5
100m
0
The calculated values of the
Type 2 Compensator
C2
type 2 elements are,
21.6p
R2=122.780k, C1=0.778nF,
R2
122.780k
C1
0.778n
and C2=21.6pF.
Rupper
3.1k
U3
PWM_CTRL
LOL - FB
d
PWM
1kH +
1/Vp Rlower
COL 1k
1kF REF
VP = 2.5
V3 VREF = 1.23 0
1Vac
0Vdc
*Analysis directives:
0 .AC DEC 100 0.1 10MEG
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 21
22. 5 Stabilizing the Converter (Example)
Gain and Phase responses after stabilizing
80
40
(9.778K,0.000)
0
-40
SEL>>
Gain: T(s) = H(s) G(s)GPWM
-100
DB(v(d))
180d
Phase at fc
90d
(9.778K,45.930)
0d
100Hz 1.0KHz 10KHz 100KHz
P(v(d))
Frequency
• Phase margin = 45.930 at the cross-over frequency - fc = 9.778kHz.
Tip: To bring cursor to the cross-over point (gain = 0dB) type “ sfle(0) ” in Search Command.
Cursor Search
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 22
23. Load Transient Response Simulation (Example)
The converter, that have been stabilized, are connected with step-load to perform load transient
response simulation.
U2 L
Load
BUCK_SW 330uH
1 2 Vo
D C
330uF I1
Vin Rload I1 = 0
20Vdc ESR 25 I2 = 0.8
100m TD = 10m
TF = 25u
TR = 20u
PW = 0.43m
PER = 1
0 Type 2 Compensator
C2
21.6p 5V/2.5 = 0.2A step
R2 C1
to 0.2+0.8=1.0A load
122.780k 0.778n
Rupper
3.1k
U3
PWM_CTRL
- FB
d
PWM +
1/Vp Rlower
REF
1k
*Analysis directives: VP = 2.5
VREF = 1.23 0
.TRAN 0 20ms 0 1u
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 23
24. Load Transient Response Simulation (Example)
Simulation Measurement
5.2V 4.0A
1 2
Output Voltage Change
5.1V 3.5A
5.0V 3.0A
4.9V 2.5A
4.8V 2.0A
4.7V 1.5A
Load Current
4.6V 1.0A
4.5V 0.5A
>>
4.4V 0A
9.9ms 10.1ms 10.3ms 10.5ms 10.7ms 10.9ms
1 V(vo) 2 I(load)
Time
• The simulation results are compared with the measurement data (National
Semiconductor Corp. IC LM2575 datasheet).
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 24
25. A. Type 2 Compensation Calculation using Excel
Switching frequency, fosc : 52.00 kHz Given spec, datasheet
Cross-over frequency, fc
(<fosc/4) : 10.00 kHz Input the chosen value ( about 10kHz or < fosc/4 )
Rupper : 3.1 kOhm Given spec, datasheet, or calculated
Rlower : 1 kOhm Given spec, datasheet, or value: 1k-10k Ohm
R2 (Rupper//Rlower) : 0.756 kOhm (automatically calculated)
PWM
Vref : 1.230 V Given spec, datasheet
Vp (Approximate) : 2.5 V Given spec, or calculated, (or leave default 2.5V)
Parameter extracted from simulation
Set: R2=R2, C1=1k, C2=1f
Gain (PWM) at foc ( - or + )
: -44.211 dB Read from simulation result
Phase (PWM) at foc : 65.068 Read from simulation result
K-factor (Choos K and from the table)
K 6 Input the chosen value (start from k=2)
-199 (automatically calculated)
Phase margin : 46 (automatically calculated) Target value > 45
R2 : 122.780 kOhm (automatically calculated)
C1 : 0.778 nF (automatically calculated)
C2 : 21.60 pF (automatically calculated)
All Rights Reserved Copyright (C) Bee Technologies Corporation 2011 25