Uploaded by Liyu Cao

Design Type II Compensator in A Systematic Way

advertisement
Design Type II Compensation In A Systematic Way
Liyu Cao, Ametek Programmable Power
liyu.cao@ametek.com
Type II compensators are widely used in the control loops for power converters. A type II
compensator has two poles (one at the origin) and one zero, and the zero is placed
somewhere between the poles. Designers use this type of compensator to provide a phase
boost to the control loop. It is known that the compensator reaches its maximum phase
boost at the geometric mean of the zero’s frequency and the second pole’s frequency. To
design this type of compensator, the popular approach is to place the desired loop
crossover frequency at the geometric mean of the zero and pole [1,2]. This approach can
produce maximum phase margin from a given compensator. However, it does not take
the other important loop parameter, the gain margin, into consideration.
In general, to make a control loop work properly, it is necessary to have both enough
phase margin and gain margin, In this sense, it is important to have a design procedure
that can take care of both design parameters. In this note, a systematic design procedure
is developed to design a type II compensator, which gives the designer an easy way to
take both phase margin and gain margin into consideration and to adjust the compensator
until the design requirement is satisfied.
C1
R2
C2
R1
Vi
OUT
Vo
+
Figure 1. A type II error amplifier configuration using four passive components.
Gain and phase characteristics.
The schematic of a type II compensator is shown in figure 1, where four passive circuit
components are needed. The transfer function of the Type II compensator in figure 1 is
given by
C (s ) =
vo
sC2 R2 + 1
=−
vi
R1 (C1 + C2 ) s ( sC12 R2 + 1)
Equation 1
where C12 is the parallel combination of C1 and C2,
1
C12 =
C1C 2
C1 + C 2
Equation 2
The transfer function in Equation (1) can be rewritten as
G(
C ( s) = −
s(
s
ωz
s
ωp
+ 1)
Equation 3
+ 1)
where the zero's and pole's frequencies are given by
ωz =
1
C 2 R2
Equation 4
ωp =
1
C12 R2
Equation 5
1
R1 (C1 + C 2 )
Equation 6
The constant gain G is given by
G=
The amplitude of the transfer function in Equation 3 at a given frequency ω can be
calculated as
ω
)
ωz
ω 2
)
ωz
G
G
=
C ( jω ) =
ω
ω 1+ ( ω )2
ω
(1 + j
)
ωp
ωp
(1 + j
1+ (
Equation 7
The phase of the transfer function in Equation 3 at a given frequency ω can be calculated
as
ϕ [C ( jω )] = ϕ (
G
ω
ω
) + ϕ (1 + j ) − ϕ (1 + j
)
ωp
jω
ωz
π
ω
ω
= − + tan
− tan −1
2
ωz
ωp
Equation 8
−1
As can be seen, the phase of C(j ω) has two parts: a constant phase of -π/2 due to the pole
at the origin, and a variable part as a function of frequency ω. The variable part is given
by
ϕ v (ω ) = tan −1
ω
ω
− tan −1
ωz
ωp
Equation 9
2
In [1], ϕv(ω) is defined as the phase boost of the compensator.
Equation 9 can be converted to
ϕ v (ω ) = tan −1
ω (ω p − ω z )
ω 2 + ω zω p
Equation 10
Equation 10 has a useful feature in that the function reaches its maximum at the
geometric mean of ωz and ωp. That is, ϕv(ω) reaches its maximum value at the frequency
defined by
ω m = ω pω z
Equation 11
In the following, we call ωm the maximum phase frequency of the compensator. By
substituting Equation 11 into 10, one can get the maximum phase of ϕv(ω) as
ω p ω z (ω p − ω z )
ω p − ωz
ϕ v (ω m ) = tan −1
= tan −1
2ω pω z
2 ω pω z
Define the ratio of the pole’s frequency to the zero’s frequency as
k=
ωp
ωz
Equation 12
From Equation 10 and 11 one can see that k can also be defined as
k=
ωm ω p
=
ω z ωm
Equation 13
Then the maximum phase of ϕv(ω) can be written as
ϕ v (ω m ) = tan −1
k −1
Equation 14
2 k
And the maximum phase of the type II compensator is given by
ϕ[C ( jω m )] = −
π
2
+ tan −1
k −1
Equation 15
2 k
We can see that k is a measure on the distance between the zero and pole, and hence we
call it separation factor. With Equation 15, we can calculate the maximum phase boost of
the type II compensator for a given separation factor, or vise versa.
Design Procedure.
Designing a type II compensator is about where to place the zero (ωz) and pole (ωp), and
how to choose the constant gain G. Since three parameters are involved, selecting these
parameters to meet the gain margin and phase margin may be very complicated and timeconsuming. In the following, a design approach is developed, which uses the maximum
phase frequency ωm as the only parameter to "tune" the compensator and hence is very
3
simple to use. In addition, a systematic procedure is established to calculate the
components' values, which can be easily implemented in some computer programs like
Microsoft EXCEL. By a few times of running the procedure, the targeted phase margin
and gain margin can be achieved.
Given the desired crossover frequency ωc and phase margin ϕm, and the control plant’s
gain and phase at ωc as Gp and ϕp. The main difference between the proposed design
approach in this note and the popular approach in [1,2] is in the placement of ωm, which
can be expressed in relative to the desired crossover frequency, that is,
ω m = αω c
Equation 16
where α is a number to be determined. For the popular approach, α is always chosen to
be 1, while here α is adjustable. We can start the design with α=1, and after finishing the
design check the loop gain margin. If the gain margin is not satisfied, we can adjust α and
run the design procedure again. This process continues until both phase margin and gain
margin meet the targets.
With a selected ωm, the type II compensator can be calculated as follows.
At the crossover frequency, based on Equation 10 we have
ϕ v (ωc ) = tan −1
ω c (ω p − ω z )
ω c2 + ω z ω p
Equation 17
To meet the phase margin requirement, we need to satisfy the following equation,
−
π
2
+ ϕv (ωc ) + ϕ p + π = ϕ m
Equation 18
From Equation 17 and 18 we can get
ωc (ω p − ω z )
π
tan −1 2
= ϕm − ϕ p −
2
ωc + ω z ω p
or equivalently
ωc (ω p − ω z )
π
= tan(ϕ m − ϕ p − ) = cot(ϕ p − ϕ m )
2
2
ωc + ω pω z
Equation 19
Based on Equation 11 and Equation 19, we can get the following two equations about ωp
and ωz
ω z ω p = ω m2
Equation 20
ω p − ωz = ωd
Equation 21
where ωd is defined by
4
ω d = (1 + α 2 )ω c cot(ϕ p − ϕ m ) .
Equation 22
Note that ωd is known with the given parameters ϕm and ϕp, and the selected frequencies
ωc and ωm.
We can solve Equation 20 and 21, and figure out the solutions to them as follow
ω z = 0.5( ω d2 + 4ω m2 − ω d )
Equation 23
ω p = 0.5( ω d2 + 4ω m2 + ω d ) .
Equation 24
With ωz and ωp determined based on the above equations, we can calculate the constant
gain G as follows. From Equation 7 we have
C ( jω c ) =
G
ωc
ωc 2
)
ωz
ω
1+ ( c )2
ωp
1+ (
Equation 25
At the crossover frequency,
C ( jω c ) G p = 1
Thus, we can calculate the compensator’s constant gain G as
G=
ωc
Gp
ωc 2
)
ωp
ω
1 + ( c )2
ωz
1+ (
Equation 26
We can see that the compensator's transfer function is completely determined with the
zero, pole and constant gain given by Equation 23, 24 and 26. Now we are ready to
calculate the components' values. We have four components to select, but three
conditions (expressed in Equation 4, 5 and 6) to constrain these components. For this
reason, one component's value needs to be selected first, and then the rest of the
components' values are calculated to meet Equation 4, 5 and 6. In practice the resistor R1
is usually chosen first, and this note follows this convention.
Equation 4 and 5 can be converted to
C 2 R2 =
1
ωz
C1C 2 R2
1
=
C1 + C 2 ω p
Equation 27
Equation 28
And Equation 6 is equivalent to
5
C1 + C 2 =
1
GR1
Equation 29
Equation 27, 28 and 29 are the three equations to determine the components R2, C1 and
C2 after R1 has been chosen. Although two of the equations are nonlinear, they can be
solved easily as described below.
By substituting Equation 27 and 29 into Equation 28, we can get the solution for C1 as
given by
C1 =
ωz
ω p R1G
Equation 30
With C1 given, C2 can be calculated based on Equation 29
C2 =
1
− C1
GR1
Equation 31
Then from Equation 27, we can determine R2 as
R2 =
1
ω z C2
Equation 32
Now we can summarize the complete design procedure in the following.
1. Select a resistor value for R1.
2. Select α and calculate the compensator's maximum phase frequency ωm using
Equation 16.
3. Calculate the difference between the zero's frequency and pole's frequency using
Equation 22.
4. Calculate the zero's frequency ωz and pole's frequency ωp using Equation 23 and
Equation 24 respectively.
5. Calculate the compensator’s constant gain G using Equation 26.
6. Calculate C1 using Equation 30.
7. Calculate C2 using Equation 31.
8. Calculate R2 using Equation 32.
9. Plot the loop Bode plot and verify the phase margin.
10. Check the gain margin. If the gain margin is not satisfied, adjust α and go back to
step 2 to re-design the compensator.
6
11. If both phase margin and gain margin are satisfactory, check the calculated
components' value to see if they are reasonable (for example, not too big or too
small). If some of them is not reasonable, properly change R1 and go back to step
2.
12. Standardize the components' values.
An Example.
Take a current-mode controlled DC-DC converter as an example. The current loop
compensation design was already finished, and the measured control plant's Bode plot
(under current-mode control) is shown in figure 2. The design task is to design a voltage
loop compensator to achieve the target loop bandwidth of 3kHz, the phase margin of 60
degrees, and the gain margin not less than 9dB.
0
dB
-20
-40
-60
1
10
2
10
3
10
4
10
5
10
200
degree
100
0
-100
-200
1
10
2
10
3
10
Hz
4
10
5
10
Figure 2. Control plant's Bode plot measured from the current set-point to the voltage feedback
signal, showing one-pole characteristic due to current-mode control.
As can be seen from figure 2, the control plant's gain plot basically has a –1 slope
between 40Hz and 2kHz, and a zero at about 4kHz due to the output capacitor's ESR.
Since this zero is very close to the target crossover frequency, it can have negative impact
on the loop gain margin.
First the compensator is designed using the traditional approach, that is, to place the
maximum phase frequency at the loop crossover frequency. This is done by setting α=1.
With this choice, the resulted voltage loop Bode plot is shown in figure 3. One can notice
7
from figure 3 that, although the loop crossover frequency is 3kHz, the gain passes
through the crossover frequency with a slope larger than –1. This leads to a reduced gain
margin of 7.5dB. This is not desirable since a flat crossover curve means the crossover
frequency is sensitive to small amount of gain changes, and may lead to an unstable
control loop.
loop magnitude
100
50
X: 8902
Y: -7.473
0
-50
-100
1
10
2
3
10
10
4
10
5
10
loop phase
100
0
X: 2915
Y: -119.8
-100
X: 196.3
Y: -147.3
-200
-300
1
10
2
10
3
10
4
10
5
10
Figure 3. The voltage loop Bode plot with the popular approach (α
α=1), having a quite flat crossover
section.
Next, the loop is redesigned by adjusting α. It is found that by setting α=0.2, the required
gain margin can be reached, and the crossover section of the gain plot is also improved as
shown in figure 4. As can be seen in figure 4, the crossover section has a slope close to –
1, which makes it a better loop than that of figure 3 in terms of less sensitivity to possible
gain changes.
It is worth to note that the difference in the phase plots between figure 3 and figure 4. As
can be seen in figure 3, the phase drops to –147 degrees at about 200Hz, while in figure 4
the phase basically stays at –100 degrees at the frequencies up to 1.5kHz. From the
viewpoint of unconditional stability, the loop in figure 4 is better than the loop in figure
3, since the former allows more phase drop than the later before becoming conditionally
stable.
8
loop magnitude
100
50
X: 8111
Y: -9.185
0
-50
-100
1
10
2
10
3
10
4
10
5
10
loop phase
100
0
X: 2915
Y: -119
-100
-200
-300
1
10
2
10
3
10
4
10
5
10
Figure 4. The voltage loop Bode plot with α=0.2, showing an improved crossover section and gain
margin.
Summary.
A new design approach has been developed for designing a type II compensator. Unlike
the traditional approach, the new approach allows the maximum phase frequency to be
different from the loop crossover frequency. By adjusting the maximum phase frequency,
not only the phase margin but also the gain margin can be taken into consideration.
References.
1. D. Venable, The K factor: A new mathematical tool for stability analysis and
synthesis, Proceeding of Powercon 10, 1983.
2. D. Venable, Venable Technical Paper #3, Optimum feedback amplifier design for
control systems.
About the author
Liyu Cao is a Sr. Engineer at Ametek Programmable Power, where he is engaged with
designing programmable DC and AC power supplies and control loops. Liyu holds a
Ph.D degree in electrical engineering from Tsinghua University, Beijing, China.
9
Download