0% found this document useful (0 votes)
38 views

The Dark Side of Loop

This document outlines the agenda for a seminar on loop control theory. The seminar will cover topics such as implementing PID blocks, considering output impedance in switching regulators, and understanding delay and modulus margins. The purpose is to shed light on less commonly covered topics in control theory and show their relevance to power electronics applications. The seminar will provide introductions to concepts like closed-loop systems, error signal processing, and using proportional, integral and derivative actions to shape the compensator and achieve the desired operating characteristics for speed, precision and robustness.

Uploaded by

songzheng chen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

The Dark Side of Loop

This document outlines the agenda for a seminar on loop control theory. The seminar will cover topics such as implementing PID blocks, considering output impedance in switching regulators, and understanding delay and modulus margins. The purpose is to shed light on less commonly covered topics in control theory and show their relevance to power electronics applications. The seminar will provide introductions to concepts like closed-loop systems, error signal processing, and using proportional, integral and derivative actions to shape the compensator and achieve the desired operating characteristics for speed, precision and robustness.

Uploaded by

songzheng chen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 143

The Dark Side of Loop

Control Theory
Christophe Basso

IEEE Senior Member


1 • Chris Basso – APEC 2012
Course Agenda
 Introduction to Control Systems
 Shaping the Error Signal
 How to Implement the PID Block?
 The PID at Work with a Buck Converter
 Considering the Output Impedance
 Classical Poles/Zeros Placement
 Shaping the Output Impedance
 Quality Factor and Phase Margin
 What is Delay Margin?
 Gain Margin is not Enough
2 • Chris Basso – APEC 2012
What is the Purpose of this Seminar?
 There have been numerous seminars on control loop theory

 Seminars are usually highly theoretical – link to the market?

 Control theory is a vast territory: you don't need to know everything!

 This 3-hour seminar will shed light on some of the less covered topics:

 PID compensators and classical poles/zeros compensation

 Output impedance considerations in a switching regulator

 Understanding delay and modulus margins

 In a 3-hour course, we are just scratching the surface…!

3 • Chris Basso – APEC 2012


Course Agenda
 Introduction to Control Systems
 Shaping the Error Signal
 How to Implement the PID Block?
 The PID at Work with a Buck Converter
 Considering the Output Impedance
 Classical Poles/Zeros Placement
 Shaping the Output Impedance
 Quality Factor and Phase Margin
 What is Delay Margin?
 Gain Margin is not Enough
4 • Chris Basso – APEC 2012
What is a Closed-Loop System?
 A closed-loop system forces a variable to follow a setpoint
 The setpoint is the input, the controlled variable is the output
 French term is "enslavement": the output is slave to the input
 A car steering wheel is a possible example:

u t  y t 
control


The input u The output y

5 • Chris Basso – APEC 2012


Representing a Closed-Loop System
 A closed-loop system can be represented by blocks
 The output is monitored and compared to the input


sensor
+  Error vc
processing °
° V - V
The compensator The plant
G H 

 Any deviation between the two gives birth to an error 


 This error is amplified and drives a corrective action

6 • Chris Basso – APEC 2012


A Servomechanism or a Regulator?
 Airplane elevator control is a servo
servo--mechanism
mechanism:
• The pilot imposes a mechanical position via the yoke


y t 
Variable u t 
setpoint 
Output follows
the input

 Car cruise control is a regulator


regulator:
• The speed is set, the car keeps it constant despite wind, etc.
v

u t  v  constant
Fixed
setpoint Output is constant

7 • Chris Basso – APEC 2012


Processing the Error Signal
 The error signal is processed through the compensator G
 We want the following operating characteristics:
 Speed
 Precision 1.40
overshoot precision
 Robustness u t 
1.00

Since
600m
1930

200m speed

PID -200m y t 
12.0u 36.0u 60.0u 84.0u 108u

8 • Chris Basso – APEC 2012


Course Agenda
 Introduction to Control Systems
 Shaping the Error Signal
 How to Implement the PID Block?
 The PID at Work with a Buck Converter
 Considering the Output Impedance
 Classical Poles/Zeros Placement
 Shaping the Output Impedance
 Quality Factor and Phase Margin
 What is Delay Margin?
 Gain Margin is not Enough
9 • Chris Basso – APEC 2012
Where do You Shape the Signal?
 The compensator is the place where you apply corrections

 Error vc
processing

The compensator: G
 The compensator is built with an error amplifier:

vc 
vc 

Op amp TL431 OTA

10 • Chris Basso – APEC 2012


The PID Compensator
 A PID welcomes a Proportional block

 t  kp vc  t   k p   t 

240m
vc  t  248 mV
kp is high:
120m
100 mV  reaction speed
0
 t   risks of overshoot
kp is low:

k p  2.48  sluggish response


4.29u 12.9u 21.5u 30.1u 38.7u

11 • Chris Basso – APEC 2012


The PID Compensator
 A PIID includes an Integrating block
t
kp kp
 t  vc  t       d
i  i
0

240m -2.92
vc  t  Integral action:
120m -2.94

 t   no static error
0 -2.96
-100 µV  slow response
  decreases stability
-2.98 S
i  large overshoots
-3.00
-100u . 30k = -3 V  i  107 μs
8.59u 25.8u 42.9u 60.1u 77.3u

12 • Chris Basso – APEC 2012


The PID Compensator
 A PID
D offers a Derivative block

d d t 
 t  k p d vc  t   k p d
dt dt

240m 2.00 k p d S  1.63 V


Derivative action:
120m 1.00 S
 t   perturbation variation
0 0
is known: anticipation
vc  t 
-1.00
 stabilizes the response
o no static effect
-2.00
 d  163μs
3.66u 11.0u 18.3u 25.6u 32.9u

13 • Chris Basso – APEC 2012


The PID Compensator
 The Derivative block anticipates the signal evolution and speed
y

 t   d   t 
  t   t   d    t 

 t  S t d
t
t
t t d

d  t 
 t   d    t    d
dt
if  d small
later now

14 • Chris Basso – APEC 2012


Combining the Blocks
 You can formulate the PID transfer function in different ways:
d t 
 differentiation: vc  t    Vc  s     s  s
dt
 s
 integration: vc  t     t  dt  Vc  s  
 s
 The standard form:
The derivative term cannot
 1  be physically implemented:
G  s   k p 1   s d 
 s i  lim s d  
s 
 The parallel form:
Need a pole
ki s d
G  s   k p   skd s d 
s s d
1
N
15 • Chris Basso – APEC 2012
Combining the Blocks
 The transfer function becomes a filtered PID:
 
 1 s d 
G  s   k p 1   
 s i 1  s d 
 N 
 If we develop, we obtain a more familiar expression:

    
1  s  d   i   s 2  d i   d i 
N   N  A double zero
G s  An origin pole
i  d 
s 1  s  A high-frequency pole
kp  N 

16 • Chris Basso – APEC 2012


Course Agenda
 Introduction to Control Systems
 Shaping the Error Signal
 How to Implement the PID Block?
 The PID at Work with a Buck Converter
 Considering the Output Impedance
 Classical Poles/Zeros Placement
 Shaping the Output Impedance
 Quality Factor and Phase Margin
 What is Delay Margin?
 Gain Margin is not Enough
17 • Chris Basso – APEC 2012
Practical Implementation
 Sum up the output of each individual block:

u(t) P kp

+
(t) kp
 I
i   vc(t)
-
d
D k p d
dt

y(t)
 This is the parallel form of the PID
18 • Chris Basso – APEC 2012
Practical Implementation
 This is the filtered standard form of the PID

u(t)

+
(t) 1
 I
i   P kp vc(t)
-
d 1

D d
dt 1 s d N
y(t)

19 • Chris Basso – APEC 2012


Bridging a PID to a Type 3
 A type 3 is implemented around an op amp

G s 
1  s  1  s  
z1 z2

s  s  s 
1   1
  p 
 po   p1  2 

Added
pole

 1 1  2 1 
1 s   s 
  z  z    z1 z 
G s   1 2   2 
s  s  s 
1   1  
 po   p1    p2 

20 • Chris Basso – APEC 2012


Bridging a PID to a Type 3
 Identify the terms and write the equations:

      1 1  2 1 
1  s  d   i   s 2  d i   d i  1 s   s 
  z  z    z1 z 
N   N1   2   
G s  G s  1 2

i  d  s  s 
s 1  s  1  
kp  N   po   p1 

 Four unknowns, four equations:

d 1 1  d i 1
i     d i 
N z 1
z 2 N z z
1 2

i 1 d 1
 
kp  po N p 1

21 • Chris Basso – APEC 2012


Bridging a PID to a Type 3
 From Type 3 to PID:

d 
 p1   z1  p1   z2  N
p 2 1
1
 p1 z   p z  z z
1 1 2 1 2
 p1
 p z   p z  z z
1 1 1 2 1 2

z  z 1  po  po  po
i  1 2
 kp   
z z 1 2
p 1
z  p z1 1 2

 From PID to Type 3:

 d  4 N 2 d i  N 2 i 2  2 N d i   d 2  N i N
fz  f p1 
1
2 d i 1  N  2 2 d

 d  4 N 2 d i  N 2 i 2  2 N d i   d 2  N i kp
fz  f po 
2
2 d i 1  N  2 2 i

22 • Chris Basso – APEC 2012


Testing the Conversion
 Assume a type 3 compensator calculated for:
G fc  1 at a crossover of f c  2740 Hz
f z1  200 Hz f z2  600 Hz f p1  21400 Hz f p2  21400 Hz
 The "0-dB crossover" pole is placed at: High-frequency
pole
2 2
 fc   fc 
1  1 
 f p   f p 
 1  2
f po  G fc f z1  43.4 Hz  272 rd s
2 2
 f z1   fc 
1  1 
f
  f z 
 c   2

 d  194u  i  1.05m N  25.6 k p  0.287

23 • Chris Basso – APEC 2012


What is the "0-dB Crossover" Pole?
 s appears as an isolated term in N(s), it is an origin pole
1
G s  s = 0 is the origin pole

s 1  s  p1 
 If s is affected by a coefficient it is the "0-dB crossover pole"
s
1  s sz1 sz1

sz1 s  1  
 po sz1 s  1 
sz1 s  1  
G s     G0

As 1  s  p1  s

1  s  p1 
 z1 1  s  p1
 
1  s  p1 
 po
G s Dimension
of a gain
Crossover
pole
 po
0 dB log10  f 

24 • Chris Basso – APEC 2012


Testing with Mathcad®
 We wanted a magnitude of 1 at 2.7 kHz

20

Filtered PID G s 100


10
180

20 log G1( i 2  f ) 10   
arg G 1( i 2  f ) 

0 0
20 log G2( i 2  f ) 10 180
 
arg G 2( i 2  f ) 
G  s  
 10
 100
Type 3

 20
3 4 5
10 100 110 110 110
f
2.7 kHz, 0 dB
Maximum phase boost

25 • Chris Basso – APEC 2012


Testing with SPICE
parameters parameters

fc=2740 TD = 1.929e-004
i=(1+fc^2/fp1^2)*(1+fc^2/fp2^2) Gfc=0
j=(1+fz1^2/fc^2)*(1+fc^2/fz2^2) Integration N = 2.594e+001
Wpi=sqrt(i/j)*G*fz1*2*pi G=10^(-Gfc/20)
pi=3.14159 C6
0.1u
TI = 1.054e-003
e=(Wp1-Wz1)*(Wp1-Wz2) 4.00V -500uV

f=Wp1*Wz1+Wp1*Wz2-Wz1*Wz2 fz1=600
7 6 KPF = 2.871e-001
fz2=200
Td=e/(f*Wp1) fp1=21.4k X5
R10
N=((Wp1^2)/f)-1 fp2=21.4k IntFilt AMPSIMP
{Ti/0.1u}
Ti=((Wz1+Wz2)/(Wz1*Wz2))-(1/Wp1)
kpf=(Wpi/Wz1)-(Wpi/Wp1)+(Wpi/Wz2) Wz1=2*pi*fz1
Wz2=2*pi*fz2
Wp1=2*pi*fp1 Vstim
DeriveFilt X3
R9
R11x {Td/0.1u} SUM2
0V stim
10k K1 = 1
X6
115uV
11
Filtered 0V 8 9 K2 = -1
X9
POLE derivation AMPSIMP C7 5.00V -
FP = fp2 X8 0.1uF K1
K = -1 AMPSIMP R12 K1 SUM2
{10k/kpf} 4.00V 5
SUM3 K2
0V K 5.00V
K2
+ V3
Vout 12 10 S+A -500uV 16 unknown
K 500uV
K3 5.00V
2 S+A 3 13
17
1.15V -1.15V X4 R8
SUM3 10k Vrefx Vbias
X1 5 4.9995
K1 = 1 -50.0nV
POLE
kp K2 = 1
K3 = 1
FP = (N/Td)/(2*pi) R11
10k
14

 This is the filtered -1 X10


AMPSIMP

form implementation
26 • Chris Basso – APEC 2012
Testing with SPICE
0 1

dB 
20.0 360

10.0 180
G  s 

0 0
G s

-10.0 -180

2.7 kHz, 0 dB
Maximum phase boost
-20.0 -360

10 100 1k 10k 100k

27 • Chris Basso – APEC 2012


Course Agenda
 Introduction to Control Systems
 Shaping the Error Signal
 How to Implement the PID Block?
 The PID at Work with a Buck Converter
 Considering the Output Impedance
 Classical Poles/Zeros Placement
 Shaping the Output Impedance
 Quality Factor and Phase Margin
 What is Delay Margin?
 Gain Margin is not Enough
28 • Chris Basso – APEC 2012
Stabilizing a Buck with a PID
 We will use a PID to stabilize a voltage-mode Buck converter
L1 R6
75u 100m vout
10.0V 5.01V
a c
2
5.21V
12
5.21V
Vout2 Out
d Resr
3
PWM switch VM p 70m
Vin Rload
{Vin} X7 5.01V
16 2.5
AC = 0 PWMVM
L = 75u Cout
Fs = 100k 220u

523mV
5
GAIN

XPWM
GAIN
K = 1/Vpeak

1.04V
H s
4

Vstep The Plant


V3
In unknown

29 • Chris Basso – APEC 2012


Small-Signal Response of the Buck
 The transfer function shows a resonance at 1.2 kHz
30.0

10.0

-10.0

-30.0 Resonance
-50.0 H s at 1.2 kHz 5

10 100 1k 10k 100k

90.0

-90.0

-180

-270 H  s 
10 100 1k 10k 100k

30 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 We will explore three different methods for compensation:

1. Shape closed-loop gain to make it a 2nd-order system


2. Place poles and zeros to crossover at 10 kHz
3. Shape the output impedance only

 Method 1 – derive the open-loop gain first

G s H s TOL  s   G  s  H  s 

31 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 The loop gain expression is that of the PID and H(s)

d  2   d i  N(s)
1 s  i   s    d i 
 N   N  1  s  z1
TOL  s   H0 2
i  d   s  s
s 1  s 
kp  N     1
 0  Q00 D(s)

 To simplify the expression, we can neutralize D(s) by N(s)

Place a double zero at the double pole position:


2
d  2   d i   s  s
1 s  i   s    d i      1
N   N   0  Q00

32 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 The loop gain expression is now well simplified:

TOL  s  

H 0 1  s  z1 
i  d 
s  1 s 
kp  N 

 For a unity feedback control system, the closed-loop gain is:



H 0 1  s  z1 
i  d 
s  1  s
kp  N  1  s  z1
TCL  s   
1

H 0 1  s  z1   1
1 s  
i  2   d i
  s 


 z H 0 k p
s
i  d 
1 s   1   NH 0 k p 

kp  N 

33 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 We want a damped second-order response:
2
 1   2   d i  s  s 
1 s   i   s    1   
 z H 0 k p  c Qc  c 
 1   NH 0 k p 

Closed-loop denominator Second-order canonical form

 Choose a crossover frequency and a quality factor:

Qc  0.5 Non-ringing response c  27.3rd s 10 kHz

34 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 Four unknowns, four equations:
1 Ti 1 Td Ti 1 Td 1 Td Ti 1
   2  Ti   Td Ti  2
z1
H 0 k p c Qc NH 0 k p c N 0 Q0 N1 0

Q0 Qc 2 z1 20 2  Qc 2 z1 0c 2  Q0 Qc 2c 4  Qc z1 20c  2Q0 Qc z1 c 3  Q0 z1 2c 2


Td   1.116 ms
0c  Qcc   z 1
 Qcc 2   z1 c  Q0 Qc z1 0 
Q0 Qc 2 z1 20 2  Qc 2 z1 0c 2  Q0 Qc 2c 4  Qc z1 20c  2Q0 Qc z1 c 3  Q0 z1 2c 2
N   72.4
0 Qc z  Qcc   z c  Q0 Qc z 0 
1
2
1 1

Ti  
Qcc 2   z1 c  Q0 Qc z1 0
 14.6μs kp  

Qc z1 Qcc 2   z1 c  Qc Q0 z1 0   0.178
Q z1 0c  Q0 Qc0c 2 
H 0 Q00  z1  Qcc 
2

35 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 We can now compute our transfer functions in Mathcad®
60
G s
40 G  s  100

180
 
20 log G1( i 2  f ) 10 20 0  
arg G 1( i 2  f ) 

0
Compensator  100

response G(s)  20
3 4 5
10 100 110 110 110
f

60

10 kHz
40 100

TOL  s  crossover
20
180
 
20 log T OL( i 2  f ) 10 0 
arg T OL( i 2  f )  

0

 100
Open-loop gain  20
TOL  s  m = 80°
response TOL(s)  40
3 4 5
10 100 110 110 110
f

36 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 The closed-loop system is perfectly compensated

TCL  s  11.8 kHz


-3 dB 100
 10
180

20 log T 1( i 2  f ) 10  0  
arg T 1( i 2  f ) 

 20 TCL  s 
 100

 30
3 4 5
10 100 110 110 110
f

TOL  s 
TCL  s  
1  TOL  s 

37 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 We can test the compensation with SPICE
L1 R6
vout
parameters a 75u 100m
10.0V c
5.10V
2
5.10V
12
5.00V
Vout2

fc=10k
Gfc=-20 d Resr C6
3
Vin=10 PWM switch VM p 70m 0.1u
Vin Rload 1.15V -1.27mV
Vpeak=2 {Vin} X7 10 9
5.00V 16 2.5
AC = 0 PWMVM
G=10^(-Gfc/20) L = 75u Cout
Fs = 100k 220u X5
pi=3.14159 R10
IntFilt AMPSIMP
{Ti/0.1u}

fz1=1.2k
fz2=1.2k 511mV
fp1=10k 5

fp2=50k DeriveFilt X3
R9 vout
GAIN

XPWM R11x SUM2


{Td/0.1u}
GAIN 0V 0V K1 = 1
10k 1.12mV
11 13
Wz1=2*pi*fz1 K = 1/Vpeak X6 15 K2 = -1
X9
Wz2=2*pi*fz2 1.02V POLE
AMPSIMP
C7 -
1.02V X8 K1
4 FP = fp2 0.1uF
Wp1=2*pi*fp1 K = -1
AMPSIMP R12 K1
-1.27mV
SUM2
23
LoL {10k/kpf} 0V K 5.00V+
SUM3 K2 K2
18 17 20
1kH K -1.02V 1.26mV S+A
1.15V K3
6 8 14
i=(1+fc^2/fp1^2)*(1+fc^2/fp2^2) S+A
X4 R8
j=(1+fz1^2/fc^2)*(1+fc^2/fz2^2) R13 Vref
T SUM3 X1 10k
100m VPIDFiltered
Wpi=sqrt(i/j)*G*fz1*2*pi K1 = 1 POLE
5

22 K2 = 1 FP = (N/Td)/(2*pi) R11
e=(Wp1-Wz1)*(Wp1-Wz2) CoL K3 = 1 -1.39uV 10k
f=Wp1*Wz1+Wp1*Wz2-Wz1*Wz2 1kF 25

Td=e/(f*Wp1) V1
AC = 1 Vdirect
N=((Wp1^2)/f)-1 X10
Ti=((Wz1+Wz2)/(Wz1*Wz2))-(1/Wp1) AMPSIMP
kpf=(Wpi/Wz1)-(Wpi/Wp1)+(Wpi/Wz2)

Tdd=1.116m
Tii=14.6u
kpff=0.178
NN=72.4

38 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 We can test the compensation with SPICE

° dB
TOL  s 
180 60.0

m = 80°
90.0 30.0
TOL  s 

0 0

Perfect
10-kHz compensation
-90.0 -30.0 crossover dude!

-180 -60.0

10 100 1k 10k 100k

39 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 We have a stable but oscillatory response!
1
5.08
   0.128
2
 
 2 
45 mV 1  
5.04   20  
 ln  45  
  
20 mV
Q  1 2  3.9
5.00

Wasn't it
supposed to
4.96 67 mV be perfect,
806 µs uh?

1.2 kHz
4.92
Vout  t 
500u 1.50m 2.50m 3.50m 4.50m

I out  1 A in 100 μs

40 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 Bode or Nyquist do not predict the oscillatory response
m
4.00 TOL  s 

2.00

1, j 0
1/GM
0
m
c

-2.00

-4.00

-4.00 -2.00 0 2.00 4.00 e

41 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 We compensated the Vout to Vref path only!
Vin  s  GVin  s 
+ I out  s  Z out  s 
+ (s) d(s) -
Vref  s  GPWM H(s) +
Vout  s 
 T  s

G(s)

TCL  s  100
 10

 20 TCL  s 
0
?
 100
Vref  t   30 3 4 5
Vout  t 
10 100 10 10 10

42 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 The output response is as expected

5.35

5.25

5.15

5.05

4.95 Vout  t 
300u 900u 1.50m 2.10m 2.70m

 Where is the issue coming from then?

43 • Chris Basso – APEC 2012


Course Agenda
 Introduction to Control Systems
 Shaping the Error Signal
 How to Implement the PID Block?
 The PID at Work with a Buck Converter
 Considering the Output Impedance
 Classical Poles/Zeros Placement
 Shaping the Output Impedance
 Quality Factor and Phase Margin
 What is Delay Margin?
 Gain Margin is not Enough
44 • Chris Basso – APEC 2012
Compensating the Buck – Method 1
 In reality, Vref is fixed: "we have a regulator, stupid!"
I out  s  Z out ,OL  s 
-
+
Vref  s  G(s) H(s) +
Vout  s 

 Because the system is linear, superposition applies


T s
Vout1  s   Vref  s  OL Vout 2  s   I out  s  Z out ,OL  s   Vout  s  TOL  s  I think he's
1  TOL  s  right…
TOL  s  Z out ,OL  s 
Vout  s   Vout1  s   Vout 2  s   Vref  s   I out  s 
1  TOL  s  1  TOL  s  Z out ,CL

 During the load step, vˆref 0: Zout fixes the response!

45 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 What matters is the output impedance Z out ,CL

model I2
Rth I out
Vth
I1

 What is the output impedance of a buck converter?


Vout  s 
It follows
L
rC I out  s  the form N s
Z out  s   R0
Rload D s
rL Cout
Ω Ω
No dimension

46 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 The output impedance is a transfer function
Vout  s  response
Z out  s  
I out  s  excitation

 Let's find the term R0 in dc: open caps, short inductors


I out  s 
rL Rload R0  rL || Rload

 The zeros cancel the response


Vout  s   0?
 L  rL
L
rC I out  s  sL  rL  0 rL  s  1  0 z 
 rL 
1
L
Rload 1
1 z 
rL  rC  0 1  srC Cout  0 2
rC Cout
Cout sCout

47 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 The denominator is solely dependent on the structure

 It is independent from the excitation: set it to zero!


 There are two storage elements: this is a 2nd–order network
2
2 s  s 
D  s   1  a1s  a2 s  1   
0 Q  0 
1 2
 D must be dimensionless thus: a1   Hz  a2   Hz 

 The two possible terms for a1 are 1   2


L
 or   RC
 1 '2 R
 The two possible terms for a2 are
 '1  2

48 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 For a1 look at the resistance R driving L and C

 Look at the driving impedance at L while C is in its dc state


 Look at the driving impedance at C while L is in its dc state

R? R?
 L 
Rload Rload ... s   C  rL || Rload   rC  
 rL  Rload 
rL rC rL rC

1 2

R  rL  Rload R   rL || Rload   rC

49 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 how 1 (involving L) combines with '2 (involving C)? a2
 how 2 (involving C) combines with '1 (involving L)?
 Look at the driving impedance at C while L is in its HF state
 Look at the driving impedance at L while C is in its HF state

R? If we chose R? If we chose
Rload L
1  Rload  2  C  rL || Rload   rC 
rL  Rload
rL rC rL rC

Same result
L
 '2  C  rc  Rload   '1 
 1 '2   '1  2 rL   Rload || rC 

50 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 We have our denominator!
 L   r  Rload 
D s  1 s   C  rL || Rload   rC    s 2  LC C 
r
 L  Rload   rL  Rload 

 The complete transfer function is now:

 L
 1  s  1  srC Cout 
 rL 
Z out  s    rL || Rload 
 L  2 rC  Rload 
1 s   C  rL || Rload   rC    s  LC 
 rL  Rload   rL  Rload 

See "Fast Analytical Techniques" from Vatché Vorpérian, Cambridge Press

51 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 It can be put under the following form:

Z out  s   R0
1  s  1  s  
z1 z2
2
s  s 
1  
0 Q   0 

 Where we can identify the terms:


rL 1
R0  rL || Rload  z1   z2 
L rC Cout

1 rL  Rload LCout0  rC  Rload 


0  Q
LCout rC  Rload L  Cout  rL rC  rL Rload  rC Rload 

52 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 If we now plot the output impedance, we see peaking
 For an non-oscillatory response, the peaking must be damped!
dBΩ f0
3.00
Z out ,max

-7.00

Z out ,OL
-17.0

rC
-27.0
Z out ,OL
-37.0 1  TOL  s 
10 100 1k 10k 100k

 It's not, this is where the problem comes from


53 • Chris Basso – APEC 2012
Compensating the Buck – Method 1
 We organized a gain deficit right at the resonance!
60
G s
40 G  s  100

180
 
20 log G1( i 2  f ) 10 20 0  
arg G 1( i 2  f ) 

0
 100

G s  20
3 4 5
10 100 110 110 110
f

To tame the peaking, we must have gain at f0


 How much do we peak at f0?
2 2

Z out ,max 0   R0



1  0  z1  
1   0  z2 
2 2
 2 rC  Rload     L 
 1   0  LC out  
  0   C out  rC  rL || R 
load  
  rL  Rload   r
  L  Rload 

54 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 We can impose a magnitude to stay below rC
 evaluate the needed gain to fulfill this goal:

Z out ,max  f 0   Z out ,max  f 0  Z out ,max  f 0 


 rC  rC TOL  f 0  
1  TOL  f 0  TOL  f 0  rC
Closed-loop
output impedance

 Applying the numerical values of the buck:

1.12
TOL  f 0    16 or 24 dB
70m
 Is this enough to obtain a ringing-free response?

55 • Chris Basso – APEC 2012


Compensating the Buck – Method 1
 No, ringing is reduced but not eliminated
dBΩ V
-10.0 5.08

-30.0 5.04

-50.0 5.00

-70.0 4.96
Z out ,OL Less than 0.4%
Increased
-90.0 OL gain 1  TOL  s  4.92 Vout  t 
10 100 1k 10k 100k 500u 1.50m 2.50m 3.50m 4.50m

 The peaking in the output impedance is still there!


 The notched zeros are the cause for the gain dip at f0
 We must find a different compensation method
56 • Chris Basso – APEC 2012
Another (Bad) Example
 Can we crossover at 10 Hz according to this plot?
dB °
40.0 180 H 10 Hz   14 dB

20.0 90.0

0 0

-20.0 -90.0
arg H 10 Hz   0

-40.0 -180
1
10 100 1k 10k 100k
 We have no phase lag at 10 Hz, a type 1 could do?
57 • Chris Basso – APEC 2012
Rolling-off the BW at Low Frequencies
 SPICE gives us the open-loop gain snapshot
rLf L1
10m 100u vout
a c vout
7 3
parameters

Vout=5V d R10
11
Rupper=10k PWM switch VM p 1m
Vin R11
fc=10 10 X3
PWMVM 16 1
Gfc=14 L = 100u
Fs = 100k Vcp(t) C5
1m
G=10^(-Gfc/20)
pi=3.14159

C1=1/(2*pi*fc*G*Rupper)
fp0=1/(2*pi*C1*Rupper) vout
8

-6 dB
GAIN

X1
GAIN
K = 0.5 PWM gain C1
{C1}
Rupper
2
10k

LoL
1kH
Vin

Verr Rlower
CoL X2 10k
1kF V2
AMPSIMP 2.5
9

Vstim
AC = 1

58 • Chris Basso – APEC 2012


The Open-Loop Gain Looks Good…
 The type 1 confirms our 0-dB crossover frequency
dB °
T s
40.0 180

argT  s 
20.0 90.0

m  90
0 0
GM  24 dB

-20.0 -90.0
f c  10 Hz

-40.0 -180

100m 1 10 101 1k 10k

59 • Chris Basso – APEC 2012


As Expected: It is Ringing!
 The load step reveals a ringing ac output
V
5.60
I out  2 A
Vout  t  1 f0
5.20

48
47

4.80

4.40

4.00 Vcp  t 
Vcp(t) is first order
5.50m 16.5m 27.5m 38.5m 49.5m Munch

60 • Chris Basso – APEC 2012


Good dc Coupling, Weak ac Coupling
 H1 is stable per Bode analysis, but H2 is out of the loop…

Vin Vout(s)
H1(s) H2(s)

T(s)
d(s)
dc
Loose coupling
f < fc in ac, no signal
G(s) transmission >> fc…
ac
f >> fc
 The dc is fed back via the loop but not the ac…
 Oscillations are NOT due to the loop!
“Fast Analytical Techniques for Electrical and Electronic Circuits”, V. Vorpérian, Cambridge Press, 2002

61 • Chris Basso – APEC 2012


Again, an Undamped RLC Network…
 No gain at resonance: the RLC network runs open loop
dBΩ
20.0

output filter f0
0

Gain action
-20.0

Zout,OL
-40.0

Zout,CL Properly compensated, fc = 4 kHz


-60.0
Zout,CL

1 10 100 1k 10k 100k 1Meg

 The system cannot reduce the Q at the resonant frequency


62 • Chris Basso – APEC 2012
Course Agenda
 Introduction to Control Systems
 Shaping the Error Signal
 How to Implement the PID Block?
 The PID at Work with a Buck Converter
 Considering the Output Impedance
 Classical Poles/Zeros Placement
 Shaping the Output Impedance
 Quality Factor and Phase Margin
 What is Delay Margin?
 Gain Margin is not Enough
63 • Chris Basso – APEC 2012
Compensating the Buck – Method 2
 In this method, we will focus on two parameters:
 crossover frequency fc
 phase margin m
 First, look at the ac response of the power stage:
dB °
40.0 180
resonance
H s
20.0 90.0

0 0
-20 dB
H  s  -132 °
-20.0 -90.0

-40.0 -180
ESR zero
10 100 1k 10k 100k

64 • Chris Basso – APEC 2012


Compensating the Buck – Method 2
 The peaking in H brings a severe phase lag at f0
 stay away from f0 , pick fc at least 10 times above (10 kHz)
 extract the phase/magnitude of H at 10 kHz:
H 10 kHz   20 dB H 10 kHz   132

 The compensator G must shape the loop gain TOL by

 providing a high dc gain for precision: place an origin pole


 reducing the phase lag at 10 kHz to provide a m of 70°

What compensation type do we need?

65 • Chris Basso – APEC 2012


Compensating the Buck – Method 2
 The origin pole brings a permanent phase lag of 90°
 added to the op amp inversion of -180°, we have -270°
 total phase (op amp and H) must be -360 + 70° = -290°
 the needed phase boost at fc is thus:
boost   m  H  f c   90  70  132  90  112

G s G s G s

boost

boost
270
G  s   270 270
G  s  G  s 
1 2 5 10 20 50 100 200 500 1k 10 100 1k 10k 100k 10 100 1k 10k 100k

Type 1 – no boost Type 2 – up to 90° Type 3 – up to 180°

66 • Chris Basso – APEC 2012


Compensating the Buck – Method 2
 type 3: an origin pole, a double zero and 2 poles
 this is our PID compensator!
 s  s    z1  s 
1   1   1   1  
  z1    z2   po  s    z2 
G s   
s  s  s   z1  s  s 
 1   1    1   1  
 po   p1    p2    p1   p2 

 The magnitude is derived as:  The argument is found to be:


2
 f 
2
arg G  f   arg N  arg D
 f z1 
1   1 
f po  f   f z   f z1   f 
 2 arg N  arctan       arctan  
G f   f  f 
f z1  f 
2
 f 
2    z2 
1  1   f   f 
 f p   f p  arg D  arctan    arctan  
 1  2  fp   fp 
 1  2
67 • Chris Basso – APEC 2012
Compensating the Buck – Method 2
 Place the double zero at f0 ,the second pole at Fsw/2

 The 0-dB crossover pole is adjusted to provide +20 dB at fc

 The first pole is adjusted to provide the right m

 f z1   fc   fc   fc 
arg G  f c   arctan       arctan    arctan    arctan  
 fc       
 f z2   f p1   f p2 

fc
f p1    10.8 kHz
 1
 fc  f
1  z1  1
 fc  
tan  arg G  tan   tan    tan   
  f p  f
 c   f 
  2  z2  

68 • Chris Basso – APEC 2012


Compensating the Buck – Method 2
 The 0-dB crossover pole is adjusted to give 20 dB at 10 kHz
2 2
 fc   fc 
1  1 
 f p   f p 
 1  2
f po  G  f c  f z1  2 kHz
2 2
 f z1   fc 
1   1 
 fc   f z 
 2
 The final configuration is as follows:

|G(s)| 10.8 kHz 50 kHz


-1
20 dB
+1
0
-1 TOL 1.2 kHz   G 1.2 kHz  H 1.2 kHz   37 dB
0 dB
1.2 kHz
double
It should be ok to damp Zout
zero (+2) 2 kHz

69 • Chris Basso – APEC 2012


Compensating the Buck – Method 2
 Enter the PID coefficients from the poles/zeros positions

 d  55.5u  i  250u N  3.76 k p  3.1

dB ° dB
60 180 -10.0

30 90.0
TOL  s  -30.0
Z out ,CL
0 0
m = 70°
-50.0
-21 dB

-30 -90.0 -70.0


TOL  s  Z out ,OL
-60 -180 -90.0 1  TOL  s 
10 100 1k 10k 100k 10 100 1k 10k 100k

 More than 30 dB at f0 and absolutely no peaking in Zout

70 • Chris Basso – APEC 2012


Compensating the Buck – Method 2
 The transient response with a 0.1-A load step is excellent

5.000 Vout  t 

4.998

4.996

8 mV
4.994

4.992
Z out ,CL 10k   21dB  84 mΩ
683u 906u 1.13m 1.35m 1.58m

71 • Chris Basso – APEC 2012


Course Agenda
 Introduction to Control Systems
 Shaping the Error Signal
 How to Implement the PID Block?
 The PID at Work with a Buck Converter
 Considering the Output Impedance
 Classical Poles/Zeros Placement
 Shaping the Output Impedance
 Quality Factor and Phase Margin
 What is Delay Margin?
 Gain Margin is not Enough
72 • Chris Basso – APEC 2012
Compensating the Buck – Method 3
 The capacitor stray elements affect the transient response
5.000
4.994
4.988 Depends on
Cout fc m
rC 4.982
Vout  t 
4.976
ESR 80.0u zoom 240u 400u 560u 720u

4.998
4.994 SlC Vout  t 
4.990
C 4.986 rC I out
4.982
SlC
94.7u 102u 109u 117u 124u
lC 1.10 t
900m
ESL 700m I out S  I out
500m t I out  t 
300m
94.7u 102u 109u 117u 124u

R. Redl et al."Optimizing the Load Transient Response of the Buck Converter", APEC 1998

73 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 During a step load, the converter fights the current change
Vmax
Vmax  Vmin
Vmax  Vmin
2
5.000 5.000

Vout  t  Vout  t 
Vmin
936u 1.16m 1.39m 1.61m 1.84m 500u 1.50m 2.50m 3.50m 4.50m

 Traditional compensation:  Adaptive Voltage Positioning


 inductive output impedance  resistive output impedance

Limited excursion Full-span excursion

74 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 Whatever the gain, Zout meets the open-loop value beyond fc
dBΩ
0
lim Z OL ,CL
s 
Z out ,OL
-20.0
rC

-40.0

-60.0

-80.0
Z out ,CL
10 100 1k 10k 100k

 Make the output impedance equal to rC along the freq. range

75 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 How to force the output impedance to be resistive?

 s  s 
 1    1  
Z out ,OL   z1    z2  1
Z out ,CL   R0 2
1 T s  s  s 1
s
   1 z
 0  0 Q 1 H0 2
1
G s
 s  s
   1
  0  0 Q
Extract G(s)
to have:

Z out ,CL  rC

76 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 Once G(s) is extracted, what filter is that?
40

 s   s 2 s
30
f p1
R0 1      1
 z
G s   2    0  Q0 dB 20

rC G0  s  f z1
G0 1 
  z  10
 1  G s
0
3 4 5
1 10 100 1´ 10 1´ 10 1´ 10

s
1
z
G  s   K0 G

s
1
p G

77 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 Some parameter identification is now needed:
r r rL rC  1 1  rC
K 0  L C  1.8 a   47.7 p b  rL     74.2u
H 0 rC z z 0 2   z  z  Q0
1 2  1 2 

b  b 2  4ac
c  rL  rC  0.27 f pG  f z1  24 kHz f zG   580 Hz
4 a
40

30

dB 20
approximated

10

G s
0
3 4 5
1 10 100 1´ 10 1´ 10 1´ 10
YAO et al. ,"Design Considerations for VRM Transient Response Based on the Output Impedance", IEEE Proceedings, 2003

78 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 The following op amp architecture will do the job
Vout  s 
vc  s  R
Z1  1
Vout  s  Z1
C1
 1 
R1 R2  R3  
R2 R3  sC1 
Z1 
 1 
R2   R3  
vc  s   sC1 

R2 1  sC1  R2  R3  
G s  
R1 1  sR3C1

R2 1 1
K0  z  p 
R1 1
C1  R2  R3  1
R3C1

79 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 A test fixture is assembled using a buck averaged model
L1 R6
75u vout
10.0V 0.3 5.00V
Vin a c Vout2
2 12
5.30V 5.30V

parameters d Resr
3
PWM switch VM p 30m
Vin
Vin=10 {Vin} X7
Rload
5.00V 2.5
Vpeak=2 AC = 0 PWMVM 16

L = 75u Cout
Fs = 100k 220u
pi=3.14159

fz1=580
fp1=24k
531mV
5 vout
Wz1=2*pi*fz1
Wp1=2*pi*fp1

GAIN
kv=1.8 XPWM Rf C2
GAIN {R1} {C1}
2.50V 2.50V
K = 1/Vpeak
8 10
R1=10k
1.06V
R2=R1/kv 4
X8 R12 R8
AMPSIMP {R2} {R3}
R3=R1*Wz1/(Kv*(Wp1-Wz1))
C1=(Kv*(Wp1-Wz1))/(R1*Wp1*Wz1) LoL
1kH 1.06V
Vin 6
2.50V
9
R13
100m Vout Vref R7
2.5 {R2*1.47}
22
CoL
1kF
7

V1
AC = 1

80 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 After stabilization we have good margins with a 20-kHz fc
dB ° dBΩ
40 0 40 Z out ,CL  s 
T s
20 -90 20

0 -180 0

T  s 
-20 -270 -20
30 dBΩ  31mΩ
-40 -360 -40

10 100 1k 10k 100k 10 100 1k 10k 100k

 The output impedance is purely resistive!


 But the dc gain is low: line and load regulation problems!

81 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 Also, the gain expression K0 can be a problem:
rL  rC
K0   0  rL  rC
G0 rC

5.005
30 mV
4.995

4.985

4.975

4.965 Vout  t 
I out  1A
500u 1.50m 2.50m 3.50m 4.50m

 VM, fixed frequency, is not the best for Zout resistive shaping

82 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 Going current-mode, fixed frequency is one way to go

duty-cycle L rL vout  s 
a c

rC
vc Rload
Vin PWM switch CM p

Cout

vc  s 
G s

 Use the PWM switch model in current-mode for Zout

83 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 The large-signal model combines two current-sources

duty-cycle Ia Ic
a c a c
vc I L
vc dI c I1 I2 
PWM switch CM p Ri 2

vc p
Ri Ic
Vout L
I L vc 1  D  Tsw
I2   Vout
Ri 2L
I L t  toff

84 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 For ac study, we must obtain a small-signal model
 Vout 
1   Tsw
Vc 1  D  Tsw Vc  Vin 
I 2 Vout , Vc    Vout   Vout
Ri 2L Ri 2L
 Calculate the partial derivative coefficients to vout and vc

I 2 I 2 vˆc Tsw  2Vout 


vˆc  vˆout     1 vˆout
Vc Vout Ri 2 L  Vin 
gm
 Update the schematic with this linear source
 as R, L and C are also linear, Laplace applies

85 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 We look at the output impedance closed-loop
L rL vout  s 

rC
I2 Rload
vc  s  iout  s 
 gm  vout  s 
Ri
Cout

vc  s 
Tsw  2Vout 
gm    1
G s 2 L  Vin 
86 • Chris Basso – APEC 2012
Compensating the Buck – Method 3
 We can apply the superposition theorem:
 vc  s    1 
vout  s     gm  vout  s    Rload ||  rC    iout is 0
R  sCout
 i   
  1 
vout  s   iout  s   Rload ||  rC    I2 is 0
 sCout  
 
 Considering vc  s   G  s  vout  s  we have:
 G s   1    1 
vout  s   vout  s   gm    Rload ||  rC     iout  s   Rload ||  rC   
 Ri    sCout    sCout 
  G s   1    1 
vout  s  1   gm    Rload ||  rC      iout  s   Rload ||  rC   
 Ri    sCout   sCout 
  

87 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 The output impedance is thus:
  1 
 Rload ||  rC   
vˆout  s    sCout  
Z out ,CL  s    
ˆiout  s   G s   1 
1   gm   R ||
  load  C r   
 R i   sCout 
 Giving a small massage, we obtain:
Rload Ri 1  srC Cout
Z out ,CL  s  
Ri  G  s  Rload  Ri Rload  gm  R R  Ri rC  G  s  Rload rC  Ri Rload rC gm 
1  sCout  i load 
 Ri  G  s  Rload  R R
i load  gm 
"There is a
massage
for you"

88 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 Factoring and re-arranging, we have:
1  s  z1 Rload Ri 1
Z out ,CL  s   R  s  R s  z1 
1  s  p1 Ri  G  s  Rload  Ri Rload  gm rC Cout
1
p  1
 Ri Rload  Ri rC  G  s  Rload rC  Ri Rload rC gm 
Cout  
 Ri  G  s  Rload  Ri Rload  gm 

 Now make Zout,CL(s) = rC and extract G(s):

Rload rC 2 gm  rC 2
1  sCout
Ri  Rload  rC  Rload rC gm  Rload  rC  Rload rC gm
G s 
rC Rload 1  srC Cout

89 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 The compensator brings a single pole/zero response
1  s  z1 Ri  Rload  rC  Rload rC gm  R 1
G  s   G0 G0   i p 
1  s  p1 rC Rload rC
1
Cout rC

1 1 Very high frequency


z  
1
Rload rC 2 gm  rC 2 rC 2 can be neglected
Cout Cout
Rload  rC  Rload rC gm Rload

dB °
30
Ri  0.6 Ω
20
G s 100 rC  30 mΩ
Cout  220μF
10 0
G  s 
0  100

 10
3 4 5 6
10 100 10 10 10 10

90 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 Sub-harmonic oscillations at Fsw 2 can cause peaking
 Place a zero at  Fsw as recommended by YAO and al.
Vout  s 
Z1 vc  s  R
 1
C1 Vout  s  Z1
 1 
R2  R3  
R1  sC1 
R2 R3 Z1 
 1 
R2   R3  
vc  s   sC1 

R2 1  sC1  R2  R3  
G s  
R1 1  sR3C1

R2 1 1
G0  z  p 
R1 1
C1  R2  R3  1
R3C1
YAO et al. ,"Design Considerations for VRM Transient Response Based on the Output Impedance", IEEE Proceedings, 2003

91 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 Run the SPICE simulation with the CM PWM switch model
d
499mV

L1 R6
duty-cycle 75u vout
10.2V 0.02 5.05V
parameters Vin a c Vout2
2 12
5.09V 5.09V

Vin=10.18 Slope
1.42V
vc Resr
3 4
se=20k PWM switch CM p 30m

Fsw=100k
comp. Vin
X3
{Vin} 5.05V R1 AC = 1
16
PWMCCMCM
pi=3.14159 AC = 0
L = 75u
2.5 I2
Cout
Fs = 100k 220u
Ri = 0.6
pi=3.14159 Se = Se
Ri=0.6
Cout=220u
rC=30m vout
wp=1/(rC*Cout)
Rfx C2
Wz1=pi*Fsw {R1} 2.50V 2.50V
{C1}
Wp1=1/(rC*Cout) 6 10

G=Ri/rC X8 R12 R14


AMPSIMP {R2} {R3}

R1=10k
R2=R1/G 2.50V
R3=R1*Wz1/(G*(Wp1-Wz1)) 9

C1=(G*(Wp1-Wz1))/(R1*Wp1*Wz1) Vrefx R7
2.5 {R2}

Automated calculations

92 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 The output impedance is resistive, the system is stable.
Ω °
40.0m 180

20.0m 90.0 Z out ,CL  s 


0 0

-20.0m -90.0 Z out ,CL  s 


-40.0m -180

10 100 1k 10k 100k 1Meg

180 40.0
 m  66
90.0 20.0 TOL  s  TOL  s 
0 0

-90.0 -20.0 f c  40 kHz


-180 -40.0

10 100 1k 10k 100k 1Meg

93 • Chris Basso – APEC 2012


Compensating the Buck – Method 3
 The output response is a square signal as expected

5.090
Vout  30 mV

5.080

f z1 @ Fsw
5.070

5.060

5.050 Vout  t 
I out  1A
500u 1.50m 2.50m 3.50m 4.50m

94 • Chris Basso – APEC 2012


Course Agenda
 Introduction to Control Systems
 Shaping the Error Signal
 How to Implement the PID Block?
 The PID at Work with a Buck Converter
 Considering the Output Impedance
 Classical Poles/Zeros Placement
 Shaping the Output Impedance
 Quality Factor and Phase Margin
 What is Delay Margin?
 Gain Margin is not Enough
95 • Chris Basso – APEC 2012
Output Impedance and Quality Factor
 How to get Q and m from the available signals?
9.00 V peak 1  8.21 V
6.33  5
k  0.414 You need
8.21  5
7.00 V peak 3  6.33 V enough signal
and ringing to
extract the data
5.00

3.00
td  841.5 μs
Must remain
1.00
small-signal!
Q = 3.6
Vout  t 
500u 1.50m 2.50m 3.50m 4.50m

2
   1 1 1
Q      f0 
 ln k  4  2 
2
td 1   2
  1
 ln k 

96 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 Extraction is difficult with flat ac 2nd-order responses
7.00

5.00

3.00

1.00

-1.00 5-V step response Vout  t 


 dB 500u 1.50m 2.50m 3.50m 4.50m

180 80.0
Ac analysis
90.0 40.0

0 0
H s
-90.0 -40.0
H  s 
-180 -80.0

10 100 1k 10k 100k 1Meg

97 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 The phase drops at a different pace as Q changes
dB
20.0 Q = 10 H s
Q=5
10.0
Q=3
0

-10.0 Q=1
-20.0
Q = 0.6
10 100 1k 10k 100k 1Meg
° Q = 10
-10.0
Q=5 H  s 
-50.0 Q=3
-90.0
Q = 0.6

-130
Q=1

-170

10 100 1k 10k 100k 1Meg

98 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 Is there a link between Q and the phase rate of change?
Group delay
d  
g   [s]
d
 Let's apply the definition to a 2nd-order network:

1 s  j 1
H s  2
H  j  
s  s  2 
1   1 2  j
0 Q   0  0 0 Q

a b
 
 
1  b   1
H    a 2  b 2  H    tan 1    tan 1  
2 2
a  0 Q   2 
 2      1  2 
1  2       0  
 0   0 Q 

99 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 We can apply g definition to the argument

 
 
 1
d tan 1  
 0 Q   2 
 1  2 

  0   Q0  2  0 2 
g   
d Q 2 4  2Q 2 20 2  Q 20 4   20 2

  0
2Q
g 
0

 At 0 the following formula links Q to the group delay


 g 0
Q   g  f0
2

100 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 Let's apply the theory to a classical case, the RLC filter
Vin
R1 L1 parameters
{R} out
{L}
3 2 Vout
Vp=5
V1 C1 f0=1.2k
AC = 1 {C}
L=10u
C=1/(4*3.14159^2*f0^2*L)
w0=(L*C)^-0.5
Q=0.6
R=L*w0/Q
R2=1/(Q*C*w0)
Q1=(sqrt(L/C))/R
 plot the ac response Dzeta=(R/2)*sqrt(C/L)
Dzeta1=R/(2*L*w0)
 calculate the group delay Q3=1/(2*Dzeta)
per=1/(f0*sqrt(1-Dzeta^2))
 see if we can find Q tp=1/(2*f0*sqrt(1-Dzeta^2))

101 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
1
0

-10.0

-50.0 f 0  1207 Hz
-90.0

-130

-170
Z out  s 

260u

200u
 g  158 μs
140u

80.0u

20.0u Group delay


10 100 1k 10k 100k 1Meg

Q   g  f 0  1207  158u  3.14159  0.599

102 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 Knowing Q can also lead us to the phase margin m
 dB
180 80.0 TOL  f  Approximation of T(s)
TOL  f  around fc
90.0 40.0 m

0 0

fc 1
TOL  s  
-90.0 -40.0
-1
 s  s 
0   1  
0 dB 
 0   2 
-180 -80.0 2
-2

10 100 1k 10k 100k

Open-loop ac analysis

103 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 If we consider the open-loop gain around fc only…
Closed-loop
1 TOL  s  1
TOL  s   
 s  s  1  TOL  s  s2 s
  1    1
 0    2  Unity return 02 0
Identify
1 1 0
 Qc  c  02
s2 s s2 s 2
 1  1
02 0 c 2 c Qc
Closed-loop Open-loop
data data

 We want to link Qc and the crossover frequency


1 1
TOL  s   TOL  s  
 s  s   s  s 
  1   0  Qc 22  2  1  

 0   2  Q 
 c 2   2 

104 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 Calculate the TOL magnitude at crossover with Qc in:

Solve c
1
 jc   

Qc 22 2
2 2 c 
2  1  4Qc 4  1 
jc    c 4
 2  1   c 2
2
Q 
 c 2   2  TOL c   1

 Derive the argument of TOL, simplify it:


 
 jQc 22 2   
1  1 
arg TOL  s   arg  arg    arg
 s  s   c2  jc 2    c 2 c 2 
  1     j Q 2 2  Q 2 2 
 0    2   c 2 c 2 
  c 2 
 
1  Qc 22 2  1   2 
arg TOL  s   arg  1  tan      tan  
 c 2   c 
 Q 2 2 
 c 2 

105 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 If we substitute c by its definition, we have:
   
2 2
arg TOL  s     tan 1       tan 1  



1  4Qc 4   1  


1  4Qc 4   1 
 dB
180 60.0
TOL  f c    m  
TOL  s 
90.0 30.0
fc  m  TOL  f c   
0 0 TOL  f c 

-90.0 -30.0
TOL  s  m  
2
-180 -60.0   m  tan 1  

1 10 100 1k 10k 100k




1  4Qc 4   1 

106 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 We can now extract the closed-loop quality coefficient:
4
1  tan  m 
2
cos  m   4Q 4  1  1 
1c
Qc    m  cos  2

tan  m  sin  m   2Qc 
 
dB
20
 m  10
Qc
8
10 Qc  m  20
6  m  30
 
Q m m 0  m  45
4 -3 dB

 10
2 T s
0.5 1 T s  m  90
0
0 20 40 60 80 100  20
10 100 1 kHz 10 kHz 100 kHz
360
 m 76°
2  Closed-loop gain

107 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 The formula considers the vicinity of fc only: precision?
 dB
TOL  s  5.16 128 mV
80.0 120  m  23
40.0 60.0
TOL  s  5.08 47 mV

0 0 5.00

fc 4.92
-40.0 -60.0 Double zero
-80.0 -120
close to fc 4.84 Vout  t 
Step-load response
1 10 100 1k 10k 100k 869u 1.15m 1.43m 1.70m 1.98m

2
 
   1  4Q 4  1  1 
1 c
Qc      3.1  m  cos  2
  18
  47  4  2Qc 
ln
  128    
  
"Revisiting the Response of Closed Loop of PWM Converters ", S. Ben-Yaakov, IEEE Apec 2008

108 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 We can ac sweep the output impedance also and check g
 dB 3.5 kHz
140 0

100 -20.0 Z out  s 


60.0 -40.0 Z out  s 
20.0 -60.0

-20.0 -80.0

240u

120u

-120u

-240u Group delay  g  253 μs


1 10 100 1k 10k 100k

Q   g  f 0  3.5k  253u  3.14159  2.8 m  20.4

109 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 We can apply the technique to simple linear regulators
H s

Z out  s 
Vout  s 
+
Vin rC
vc  s 
Rload

Cout

 You have no means to perform open-loop analysis


 Plot its output impedance with a network analyzer…
S. Sandler, C. Hymowitz, "New Technique for Non-Invasive Testing of Regulator Stability", PET Magazine, September 2011

110 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 Plot magnitude and phase of Zout and compute g
 dBΩ
120 0 Z out  s 
80.0 -20.0
Z out  s 
40.0 -40.0

0 -60.0

-40.0 -80.0

500u

300u

100u

-100u
 g  574.9 μs
-300u Group delay
10 100 1k 10k 100k

Q   g  f 0  1k  574.9u  3.14159  1.8


 4Q 4  1  1   4  1.84  1  1 
1 1
 m  cos    cos    cos 1  857 m   31
 2Q 2
  2  1.8 2 
   

111 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 The LDO circuit is made of the following elements
Iout

Q1
2N3055 5.00V
7 Vout
10.0V
Q2
2N2219 5.69V
11
C2 L2
{C2} 13 20n
R1
10k
R4
C3 R2 10k 12
2 1 {C1} {R2} C1
Vin 10
1mF
10 2.50V 0V I1
2.50V
3 unknown
4
6.38V R3
2.50V 20m
6

Verr
X1 Vref R5
AMPSIMP 2.5 10k
GAIN = 30000

 We can open its loop and plot the open-loop gain TOL(s)

112 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 The open-loop plot confirms the experimental results

80.0 180

TOL  s 
40.0 90.0  m  30

0 0

f c  1 kHz
-40.0 -90.0

TOL  s 
-80.0 -180

10 100 1k 10k 100k

113 • Chris Basso – APEC 2012


Output Impedance and Quality Factor
 The phase margin is increased to 60°
dBΩ °
0 120 Z out  s  1.3 kHz
-20.0 80.0 Z out  s 
-40.0 40.0

-60.0 0

-80.0 -40.0

500u

300u

100u

-100u
 g  185.5 μs
-300u Group delay
10 100 1k 10k 100k

Q   g  f 0  1.3k  185.5u  3.14159  0.76


 4Q 4  1  1 
1 1
 4  0.764  1  1 
 m  cos    cos    cos 1  457 m   63
 2Q 2
  2  0.76 2 
   
114 • Chris Basso – APEC 2012
Course Agenda
 Introduction to Control Systems
 Shaping the Error Signal
 How to Implement the PID Block?
 The PID at Work with a Buck Converter
 Considering the Output Impedance
 Classical Poles/Zeros Placement
 Shaping the Output Impedance
 Quality Factor and Phase Margin
 What is Delay Margin?
 Gain Margin is not Enough
115 • Chris Basso – APEC 2012
Considering a Delay in the Loop
 Before a decision is actually executed, a delay occurs
 The delay can be digital (computation time) or analogue
 A typical delay is the duty-ratio conversion in a VM converter
ton
G 5V

+ d
ton
Verr  t  0V Tsw
+ Tsw
- d t 
Prop. delay in
compensator - the 50 – 100 ns
Vramp  t 
range
Vramp  t 
Vp
Verr  t 
Tsw

116 • Chris Basso – APEC 2012


A Delay is a Time-Domain Shift
 The output signal is the input signal that occured  s before

u t 
advance delay

y t 
t y t   u t  

t
t1 t2

u t 
Time delay y t 

117 • Chris Basso – APEC 2012


Deriving the Delay
 To account for the delay, we need its Laplace expression

The plant H  s 

1  s  z1
vc  s  1 d s
Verr  s  s  s 
2
Vout  s 
V peak 1  
0 Q  0 

  delay   ?

118 • Chris Basso – APEC 2012


Deriving the Delay
 To account for the delay, we need its Laplace expression

  y  t     u  t    

 Let's start with a sinewave phasor expression

Time delay
 y t 

u  t   Ae jt y  t   Ae j  t  

e a eb  e a  b y  t   Ae j t    Ae jt e  j  u  t  e  j

119 • Chris Basso – APEC 2012


Deriving the Delay
 Let's take the Laplace transform of the new expression

 s Y s  s
s  j Y  j 
Y s  U se e  e  j
U s U  j 
 Euler phasor formula uses the argument as the exponent

arg e  j  


e  j  e j
e  j  1

 A delay block is a simple delay line!

u t  UTD y t 
K = 1, td = 250 ns

120 • Chris Basso – APEC 2012


Building the Delay
 A delay line can time-shift the input signal

Delay block
parameters

tau=250n
T1
2 Vout
TD = {Tau}
50 = Zo
3 1

R1
E1
50
4 1
Vin
AC = 1 E2
1

 Best simulation practice is to buffer the input and the output


D. Adar, S. Ben-Yaakov, "Generic Average Modeling and Simulation of Discrete Controllers ", APEC Anaheim, 2001

121 • Chris Basso – APEC 2012


Building the Delay
 A Bode plot confirms the 0-dB magnitude over frequency

4.00

2.00 e  s
Magnitude
0

-2.00
is flat
-4.00

-20.0 e  s
-40.0
-9°
-60.0

-80.0
10 100 1k 10k 100k 1Meg

180
100 kHz    100k  6.28  250n   9

122 • Chris Basso – APEC 2012
Adding the Delay in the Laplace Domain
 We can now update our transmission chain with the delay

The plant H  s 

1  s  z1
vc  s  1 d s
Verr  s  e  st
s  s 
2
Vout  s 
V peak 1  
0 Q  0 

e  s 1  s  z1
H s  2
V peak s  s 
1  
0 Q  0 

123 • Chris Basso – APEC 2012


Adding the Delay in the Laplace Domain
 st
 How do you deal with the term e in the transfer function?
 You don't: replace it with a poles/zeros combination!
 A pole will bring phase shift as frequency increases
1  
1
arg   tan  
1  s    
 But you still need to compensate the transmittance decrease
 A zero will do but now, all is neutralized!
2
 
1  
1  s       1   
mag  1 arg  tan 1    tan  0
1  s   
2
     
1  
  

124 • Chris Basso – APEC 2012


Calling the RHP Zero for Help
 Replacing the LHP zero by a RHP zero does the job
 Both pole and zero magnitude neutralize each other
 The RHPZ phase lags and cumulates with that of the pole
dB °
20

10 1  s  100
 st 1  s 
e  1  s 
1  s  0 0

 1  s  
 10 arg    100
 1  s  
 20
3 4 5 6
10 100 10 10 10 10

125 • Chris Basso – APEC 2012


Mapping the Delay to the Pole/Zero Position
 Both arguments must be equal:
 1  s  
arg  e  s   arg     arg 1  s    arg 1  s  
 1  s  

 Replacing s by j:
   1    1   
  tan 1     tan     2 tan  
   
     

 Use the arctangent Taylor series equivalent: 0


3 5
     
     
x3 x5    
1
tan x  x    ...   2          
3 5  3 5
  
 
 

126 • Chris Basso – APEC 2012


We Have the Padé Approximation
 Solving for  gives us…
2
 

 Substituting  in our first expression
s Henri Padé
1 1863-1953
e  s  2
s
1
2
 This is the 1st-order Padé approximant of an exponential
x 2nd-order 1 1
1 1 x  x2
ex  2 ex  2 12
x 1 1
1 1  x  x2
2 2 12
http://en.wikipedia.org/wiki/Padé_approximant

127 • Chris Basso – APEC 2012


Padé Approximant Frequency Response
 When frequency increases, a phase deviation occurs
dB °
0

2  1  s 2 
arg    20
 1  s 2 
e  s  40
0
1  s 2
 60
1  s 2
2
e  s
 80

10 100 110 3 110 4 110 5 110 6

Use higher order approximants to improve precision

128 • Chris Basso – APEC 2012


How to Avoid the Delay Line?
 A delay line adds computational burden in simulations
 Is there any simpler circuit that could be used?

parameters
R1
{1/(10n*Wtau)}
tau=250n
2 3
Wtau=2/tau C1
K1

10n SUM2
5 Vdelay1
K2
1
R3
{1/(10n*Wtau)} V1  s  X2
SUM2
7 6 K1 = 1
V1 C2 K2 = 1
10n E4 E3
AC = 1
1 1k
RHPZ

R1
Vout  s   V1  s   V1  s   V1  s  1  sR1C1 
1 sC1

129 • Chris Basso – APEC 2012


How to Avoid the Delay Line?
 Good phase response of the analogue circuit
° dB
Op amp phase
0 4.00
response

-20.0 2.00

Op amp output magnitude


-40.0 0 12
11

Delay line output magnitude

-60.0 -2.00
Delay line phase
response

-80.0 -4.00

10 100 1k 10k 100k 1Meg

130 • Chris Basso – APEC 2012


Delay Margin versus Phase Margin
 The characteristic equation is affected by the delay:

 s  1 T s  0   s   1  e  s T  s   0
Unity return denominator T(s)

 The stability condition for the magnitude does not change:

e  s max T c   1 e  s  1 T  c   1

 The stability condition for the argument does change:

 
  arg e  s max  arg T c    max  arg T c 

m    arg T c 
m
The max acceptable
 max 
delay in the loop c Solving
for  max

131 • Chris Basso – APEC 2012


Delay Margin versus Phase Margin
 The delay margin is thus defined by:
   max   Current delay
Maximum acceptable
delay

1. A buck converter features a 250-ns internal delay


2. At a 100-kHz crossover, the phase margin is 49.5°
3. The maximum delay, accounting for 250 ns, is:
m 49.5 
 max    1.375 μs
c 2  100k 180
  1.375  0.250  1.125µs Maximum acceptable extra delay

132 • Chris Basso – APEC 2012


Checking via Simulation
 The delay is simply added in series with the PWM block
L1 R6
vout
10.0V {L} 100m 5.00V
a c Vout
3 2 12
5.20V
5.20V

524mV
d Resr
9
PWM switch VM p {Resr}
Vin Rload
10 X1 5.00V 16 2.5
PWMVM2
L=L Cout
Fs = 1Meg {Cout}

parameters

tau=250n T1
TD = {Tau} out
50 = Zo
X4
out

3 1
Config_1
R1
E1
in 50
in

1
524mV vout E2
6 C2 1
{C2}
R3
GAIN

XPWM {R3}
R2 C1
GAIN Rupper 5.00V
{R2} {C1}
K = 0.5 {Rupper} 13
15 C3
1.05V 1.04V 2.50V
5 10 {C3}
LoL 1.05V
1G
4
2.50V
8 Rlower
CoL Verr

0V
7
1G
X2
AMPSIMP
V2
2.5
{Rlower}
Delay built with an adapted
V1
AC = 1 transmission line

133 • Chris Basso – APEC 2012


Checking via Simulation
 With a 250-ns delay, the phase margin is acceptable
dB °

40.0 180
T s

20.0 90.0 m
49.5°
T  s 

0 0

fc
100 kHz
-20.0 -90.0

-40.0 -180

100 1k 10k 100k 1Meg

134 • Chris Basso – APEC 2012


Checking via Simulation
 If we add 1.125 µs to 250 ns, no phase margin at all!
dB °
40.0 180 T s

20.0 90.0
m
T  s  0°

0 0

fc
100 kHz

-20.0 -90.0

-40.0 -180

100 1k 10k 100k 1Meg

135 • Chris Basso – APEC 2012


Course Agenda
 Introduction to Control Systems
 Shaping the Error Signal
 How to Implement the PID Block?
 The PID at Work with a Buck Converter
 Considering the Output Impedance
 Classical Poles/Zeros Placement
 Shaping the Output Impedance
 Quality Factor and Phase Margin
 What is Delay Margin?
 Gain Margin is not Enough
136 • Chris Basso – APEC 2012
Gain Margin Defines the Robustness
 GM defines the robustness of a system to gain variations

TOL  s  Conditions for


oscillations:
TOL  s   0

TOL  s  drift TOL  s   0 dB


0 dB 0°

-38 dB 1
20 dB/div GM   38dB
T  f 
T  f 
10 100 1k 10k 100k 1Meg

 If the gain drifts up by 38 dB, we have oscillations


137 • Chris Basso – APEC 2012
Gain Margin Defines the Robustness
 In Bode representation but also in Nyquist
m

2 T  s    or  
II I

1 Im T  s   0
ReT  
1 GM
-1,j0
0 e
 m 0 rd 1
h
GM 
2 2
T  s  Re T  f   Im T  f 
c
1

 
III  IV
2 1
2  Re T  f 
2 1 0 1 2 GM

138 • Chris Basso – APEC 2012


Gain Margin in Nyquist
 What really matters is the distance to the "-1" point
m
-1 ReT  
2 1  ReT  

1
1 ReT c  h
-1,j0 ReT c 
0 e
h
ImT c 
ImT  
c
1 2 2
h    1  Re T      Im T  

2
2 1 0 1 2 h  1 T s

139 • Chris Basso – APEC 2012


Rejecting the Perturbation
 A closed-loop system rejects the incoming perturbation u1
perturbation u1(s)

+ (s)
u2(s) G(s) H(s) y(s)
+

T s 1
y  s   u2  s   u1  s 
1 T s 1 T s 1
h  1 T s 
S
Sensitivity function S

140 • Chris Basso – APEC 2012


Watch for a Peak in S
 The trajectory must keep away from the "-1" point
 A 0.5-radius circle detects a peak in S: modulus margin
m m

2 2

1 1

1/GM 1/GM
-1,j0 -1,j0
0 M e 0 M e

c c
1 1
 

2 2
2 1 0 1 2 2 1 0 1 2
Spec limit Margin violation
141 • Chris Basso – APEC 2012
Bode can also Show the Modulus Margin
frequency = 26.3k hertz
800m real = -649m
imag = -111m

400m
M 1/GM
imag

0
1 S min
-400m

-800m 

-1 -800m -400m 0 400m 800m


real
dB
20.0
1
S 
10.0 1 T s
6-dB limit

-10.0

-20.0 frequency = 26.3k hertz


sens = 8.67 dB

10 100 1k 10k 100k

142 • Chris Basso – APEC 2012


Conclusion
 Switching or linear power supplies are regulators
 Applying a pure mathematical compensation brings problems
 Engineering judgment found output impedance guilty
 Lack of sufficient gain at resonance brings oscillations
 Standard poles/zeros placement method gives good results
 For high-speed dc-dc converters, resistive shaping rules
 Q to phase margin approximation requires engineering judgment
 Less known delay and modulus margins are useful figures!

Merci !
Thank you!
Xiè-xie!

143 • Chris Basso – APEC 2012

You might also like