Sie sind auf Seite 1von 10

Experiment 4

Lead-Lag Compensation

4.1 Introduction
Among the simplest dynamic structures used in compensator design is the lead-lag compensator. A lead-lag
compensator has a transfer function of the form

(s + z1 ) (s + z2 )
Gc (s) = A . (4.1)
(s + p1 ) (s + p2 )

In this experiment, we will use the lead-lag structure to enhance the performance of an operational
amplifier. An op amp is different from the other control systems with which we are working this semester
in that it is a purely electrical device, operating over a relatively high range of frequencies and at low power
level. Nevertheless, compensator design problems for an op amp are mathematically similar to compensator
design problems for more conventional control systems such as a servomotor.

4.2 Operational Amplifier Model


In this experiment, you will be using the power amplifier from the previous experiments as the plant. Besides
the power supply, heat sinks, and miscellaneous hardware, the amplifier consists of an LM12 power op amp.
A close approximation to the actual response of the LM12 is given by the transfer function

s + 1.88 × 106
G (s) = (4.2)
(s + 377)(s + 3.77 × 105 )(s + (2.83 + j4.81) × 106 ))(s + (2.83 − j4.81) × 106 )
9.33 × 1019 s + 1.76 × 1026
= 4 .
s + 6.03 × 106 s3 + 3.32 × 1013 s2 + 1.17 × 1019 s + 4.42 × 1021

G(s) has a DC gain of 92dB, a zero at 300KHz, and poles at 60Hz, 60KHz, and (450 ± j765)KHz. Actual
values of these parameters vary somewhat from one chip to another, but the mathematical model is still
accurate enough to obtain good results.
For the sake of numerical stability when analyzing (4.2) with MATLAB (and for overall convenience),
we will perform a frequency scaling by a factor 106 . This means that we must substitute “106 s” in place of
“s” wherever it appears. Doing so yields

93.3s + 176
G (s) = . (4.3)
s4 + 6.03s3 + 33.2s2 + 11.7s + .00442

One result of this transformation is that all frequencies (e.g. those appearing on Bode plots) must be read
as “Mrad/sec”, rather than “rad/sec”, and “MHz”, rather than “Hz”. Another result is time scaling: Values
of time must now be read as “µsec”, rather than “sec”.
It is useful to refer to the Bode plots for G(s):

25
26 EXPERIMENT 4. LEAD-LAG COMPENSATION

Figure 4.1

4.3 Phase Margin and Gain Crossover Frequency


Define the gain crossover frequency of G to be the frequency ω c where |G(jω c )| = 1. On the magnitude plot
in Figure 4.1, ω c corresponds to the location of the 0dB axis crossing, yielding a value ω c = 3.77×106 rad/sec
(600KHz).
Suppose we apply unity feedback to G:

Figure 4.2

The resulting closed-loop transfer function is


G
H= . (4.4)
1+G
Note that, since |G| ≥ 1 for all ω ≤ ω c ,
¯ ¯
¯ G ¯
|H| = ¯¯ ¯ ≥ |G| ≥ 1 . (4.5)
1 + G ¯ 1 + |G| 2
Thus the closed-loop bandwidth ω b (defined in Experiment 2) and ω c are related by

ωb ≥ ωc . (4.6)
4.3. PHASE MARGIN AND GAIN CROSSOVER FREQUENCY 27

Another important parameter in controller design is the phase margin of G, defined by

φp = ∠G (jω c ) + 180 ◦ . (4.7)

Phase margin of G is related to stability of the closed-loop system according to the following argument:
Suppose φp = 0. This means that ∠G (jω c ) = −180 ◦ , so G(jω c ) = −1. Evaluating (4.4) at ω c shows that
applying unity feedback to a plant with φp = 0 results in a closed-loop system with a pole at s = jω c .
Consequently, H is (marginally) unstable.
A fundamental fact of feedback theory (which we state here without proof) is that the closed-loop
transfer function H is BIBO stable if and only if φp > 0. Moreover, it can be shown that increasing
φp tends to move the poles of the closed-loop system further to the left in the complex plane, increasing
damping. For the LM12, the phase plot of G shows that φp = 15 ◦ . Thus the op amp alone in a unity
feedback configuration would be stable.
Phase margin and gain crossover frequency can also be (somewhat loosely) related to the other closed-
loop performance specifications we encountered in Experiment 2. For example, (4.6) shows that, if ω c is
large, so is ω b ; thus even signals with substantial high frequency components tend to pass through the system
unattenuated. Large ω b also tends to give large ω m . In terms of the step response, large ω b implies that Tr
and Tp are small. If φp is large, the closed-loop system is heavily damped, leading to values of Mp and Mm
close to unity. Generally, a phase margin of 60 ◦ is considered good; smaller φp tends to result in oscillatory
and overshoot phenomena in the closed-loop system response. Settling time Ts is more closely related to the
compensation scheme used, rather than to φp and ω c , since it depends most heavily on the location of the
closed-loop pole with the smallest real part.
The remaining specification of interest in this experiment is the DC gain |G (0)| . The relationship between
DC gain and the steady-state error ess0 to a unit step input can be obtained by applying the Final Value
Theorem of Laplace transforms, yielding

1
ess0 = . (4.8)
1 + |G (0)|

Since op amps invariably have very large DC gains, the approximation

1
ess0 ≈ (4.9)
|G (0)|

is extremely accurate. Excluding Ts , the various design parameters fall into three groups:

1
|G (0)| , (4.10)
ess0
1 1
ωc , ωb , ωm , ,
Tr Tp
1 1
φp , ,
Mp Mm

Ideally, we would like |G(0)|, ω c , and φp to be large. Closing the unity feedback loop around G is equivalent
to building the following circuit:
28 EXPERIMENT 4. LEAD-LAG COMPENSATION

Figure 4.3

Although we cannot actually change the plant itself, open-loop characteristics can, in effect, be altered
by connecting a compensator Gc in series with the plant. The series combination Gc G then replaces G in
the unity feedback configuration as shown.

Figure 4.4

The magnitude and phase characteristics of Gc G can be adjusted by choosing Gc .


The series combination Gc G is called the loop gain and has magnitude |Gc | |G| and phase ∠Gc +∠G. Since
the vertical axis of the magnitude Bode plot is logarithmic, the magnitude curves for Gc and G are simply
added together. Our task is to choose Gc so that the values |Gc (0)| |G (0)|, φp , and ω c (after compensation)
are as large as possible. Since the design algorithm for Gc is couched in terms of the shape of the Bode plots
of Gc G, this approach is referred to as loop shaping.

4.4 Gain Compensation


The problem of gain compensation that we encountered in Experiment 2 can be expressed in terms of Bode
plots, crossover frequency, and phase margin. Let Gc = K > 0. Then the phase plot for Gc G is the same
as that for G, and the magnitude plot for Gc G is the same as for G, except lowered by 20log(1/K)dB. (In
op amp compensation, K is almost always less than 1.) This reduces the crossover frequency to a new value
ω 0c , increasing the phase margin to a new value φ0p .
The design strategy for gain compensation is to find a frequency ω 0c such that φ0p given by

φ0p = ∠G (jω 0c ) + 180 ◦ (4.11)


is sufficient phase margin. Since setting Gc = K has no effect on phase, equation (4.11) expresses the
relationship between achievable values of phase margin and crossover frequency for a gain compensator.
4.4. GAIN COMPENSATION 29

Then K must be calculated to shift the crossover frequency down to the chosen ω 0c . The new gain crossover
frequency satisfies K |G (jω 0c )| = 1, so K is determined by
1
K= . (4.12)
|G (jω 0c )|
This yields steady-state error
1 1
ess0 = = .
|Gc (0) G (0)| K |G (0)|
Typically, gain compensation severely restricts the closed-loop bandwidth and increases steady-state error.
In the special case of op amp compensation, standard practice is to use a resistive network to achieve the
gain K:

Figure 4.5

Thus
R2
K= , (4.13)
R1 + R2
and we.are restricted to values 0 ≤ K ≤ 1. Although an active compensator would allow more flexibility,
such a controller would employ additional amplifiers. This approach would greatly add to the complexity of
the design process, since the magnitude and phase characteristics of each amplifier would have to be taken
into account. Placing Gc in series with G and closing the loop is equivalent to building the following circuit:

Figure 4.6
For a given K, resistance values may be obtained by solving (4.13) for R1 :
µ ¶
1
R1 = − 1 R2 (4.14)
K
The freedom in choosing R2 may be exploited to avoid interactions between the compensator and the input
and output impedances of the amplifier.
30 EXPERIMENT 4. LEAD-LAG COMPENSATION

4.5 Lead-lag Compensation


Lead-lag compensation is achieved by using the following network:

Figure 4.7

The network transfer function is

(s + ω 1 ) (s + ω 2 )
Gc (s) = , (4.15)
s2 + (ω 1 + ω 2 + ω 3 ) s + ω 1 ω 2

where
1 1 1
ω1 = , ω2 = , ω3 = . (4.16)
R1 C1 R2 C2 R2 C1

Comparing (4.1) with (4.15) yields

A = 1, z1 = ω 1 , z2 = ω 2 , (4.17)
µ ³ ´ 12 ¶
1 2
p1 = ω 1 + ω 2 + ω 3 − (ω 1 + ω 2 + ω 3 ) − 4ω 1 ω 2 ,
2
µ ³ ´ 12 ¶
1 2
p2 = ω 1 + ω 2 + ω 3 + (ω 1 + ω 2 + ω 3 ) − 4ω 1 ω 2 .
2

From (4.15),

Gc (0) = Gc (∞) = 1. (4.18)

Evaluating (4.1) at s = 0 gives

p1 p2 = z1 z2 . (4.19)

Hence, only 3 of the 4 poles and zeros can be adjusted independently. These constraints are a consequence
of using a passive compensator.
The closed-loop circuit is depicted below:
4.5. LEAD-LAG COMPENSATION 31

Figure 4.8

The Bode plots for Gc are

Figure 4.9

The phase plot of Gc hints at the origin of the name “lead-lag”. The phase “lags” at lower frequencies
and “leads” at higher frequencies. The basic idea in lead-lag design is to choose the lead portion of the
compensator (p2 and z2 ) to add phase in the vicinity of the desired value of ω 0c . The lag portion (p1 and z1 )
then attenuates the magnitude so that ω 0c is actually the crossover frequency. The phase lag is merely an
artifact of the compensator structure and plays no role in achieving the specifications.
The new gain crossover frequency is determined by
³ ´³ ´
2 2
(ω 0c ) + z12 (ω 0c ) + z22
³ ´³ ´ |G (jω 0c )|2 = 1. (4.20)
0 2 2 0 2 2
(ω c ) + p1 (ω c ) + p2
32 EXPERIMENT 4. LEAD-LAG COMPENSATION

To simplify the problem, set


ω 0c
z1 = z2 = . (4.21)
10
This approach has the advantage of ensuring that the poles and zeros are not distributed over too wide a
range of frequencies and that the zeros degrade the phase at ω 0c by only a small amount (less than 6 ◦ each).
Combining (4.19)-(4.21) and solving for p1 and p2 yields
³ ´ 12
2
p2 ≈ ω 0c |G (jω 0c )| − 1 , (4.22)

2
(ω 0c )
p1 = . (4.23)
100p2
The relationship between φ0p and ω 0c is given by

ω 0c ω0 ω0 ω0
φ0p = arctan + arctan c − arctan c − arctan c + ∠G (jω 0c ) + 180 ◦ . (4.24)
z1 z2 p1 p2

From (4.21),
ω 0c ω0
arctan + arctan c = 168.6 ◦ . (4.25)
z1 z2
From (4.23),
ω 0c p2
arctan = arctan 100 0 ≈ 90 ◦ . (4.26)
p1 ωc
Combining (4.22) with a trigonometric identity yields
µ³ ´ 12 ¶
ω 0c ◦ p2 ◦ 0 2
arctan = 90 − arctan 0 ≈ 90 − arctan |G (jω c )| − 1 . (4.27)
p2 ωc

Combining (4.24)-(4.27),
µ³ ´ 12 ¶
2
φ0p ≈ arctan |G (jω 0c )| − 1 + ∠G (jω 0c ) + 168 ◦ . (4.28)

Note that (4.28) is meaningful only for ω 0c satisfying

|G (jω 0c )| > 1. (4.29)

The design process consists of plotting (4.28), choosing a point on the graph corresponding to acceptable
values φ0p and ω 0c , and calculating z1 , z2 , p1 , and p2 from (4.21)-(4.23). Resistor and capacitor values may
be obtained by solving 4.16 for R1 , C1 , and C2 :
µ ¶
1 1 1 1 1 1 1 1 1
C2 = , R1 = + − − , C1 = . (4.30)
z2 R2 p1 p2 z1 z2 C2 z1 R1

The freedom in choosing R2 may again be exploited to avoid interactions between the compensator and the
input and output impedances of the amplifier.
Note that, regardless of the choice of lead-lag compensator, the steady-state error is extremely small:

1 1
ess0 ≈ = . (4.31)
|Gc (0) G (0)| |G (0)|

The lead-lag approach simultaneously achieves small steady-state error, large phase margin, and large gain
crossover frequency.
4.6. MATLAB COMMANDS 33

4.6 MATLAB Commands


For this experiment, several additional MATLAB commands are required. First we need to look at the basics
of polynomial and rational function manipulation.
MATLAB represents a polynomial as a row vector of coefficients. For example, the polynomial n1 (s) =
s + 2s + 3 is entered by typing
n1=[1 2 3]
Given two polynomials “n1” and “n2”, the sum and product are formed with the commands
sum=p1+p2
prod=conv(p1,p2)
(The symbol “conv” comes from the fact that polynomial multiplication is identical to discrete-time convo-
lution.)
For two rational functions having numerators “n1” and “n2” and denominators “d1” and “d2”, the
numerator and denominator of the sum is formed by
num=conv(n1,d2)+conv(n2,d1)
den=conv(d1,d2)
Similarly, the product of two rational functions is given by
num=conv(n1,n2)
den=conv(d1,d2)
Finally, if a unity feedback configuration is formed around a transfer function with numerator n1 and
denominator d1, the closed-loop transfer function is given by
num=n1
den=n1+d1
These basic commands can be combined to form more complicated feedback configurations.
The MATLAB functions “atan” and “sqrt” return values of arctan and square root; these routines may
be applied to vectors. The function “atan” gives values in radians and may be applied to an imaginary
argument, returning complex values. For this reason, it is important to bear in mind that a command of the
form “plot(w,phi)” plots only the real part of phi.

4.7 Preparation
1) Using MATLAB, construct the Bode plots for the uncompensated transfer function G. Use the frequency-
scaled version (4.3) of G.

2) Plot |H(jω)| and the closed-loop step response for the gain compensated system with K = 1.

3) From the graphs in 1) and 2), record the predicted values of φp , ω c , Ts , Tr , Tp , Mp , ω b , ω m , and Mm for
the unit gain feedback system.

4) From equation (4.11), plot the achievable values of φ0p versus ω 0c for arbitrary gain compensation. (Use
the “semilogx” command.)

5) Based on your graph in 4), determine values of ω 0c , φ0p , and K so that the gain compensated closed-loop
system meets the specifications
ess0 ≤ .01,
ω 0c ≥ 2 × 105 rad/sec,
φ0p ≥ 60 ◦ .
34 EXPERIMENT 4. LEAD-LAG COMPENSATION

6) Construct the Bode plots corresponding to KG.

7) Plot |H(jω)| and the step response for the gain compensated closed-loop system.

8) From the graphs in 6) and 7), record the predicted values of Ts , Tr , Tp , Mp , ω b , ω m , and Mm .

9) Let R2 = 510Ω. (This minimizes interactions between the compensator and the input and output
impedances of the amplifier.) Use equation (4.14) to find the value of R1 so that the gain compensation
network achieves the gain K in 5). (The resistance R2 = 510Ω minimizes interactions of the compensation
network with the amplifier input and output impedances and the signal generator output impedance.)

10) From equations (4.28), plot the achievable values of φ0p versus ω 0c for a lead-lag compensator.

11) Based on your graph in 10) and equations (4.21)-(4.23), determine values of ω 0c , φ0p , p1 , p2 , z1 , and z2 so
that the corresponding lead-lag compensator achieves the specifications
ess0 ≤ .01,
ω 0c ≥ 2 × 106 rad/sec,
φ0p ≥ 60 ◦ .
12) Construct the Bode plots corresponding to Gc G.

13) Plot |H(jω)| and the step response for the closed-loop system.

14) From the graphs in 12) and 13), record the predicted values of Ts , Tr , Tp , Mp , ω b , ω m , and Mm .

15) Assuming R2 = 510Ω, use equation (4.30) to calculate the other resistor and capacitor values for the
lead-lag compensation network.

4.8 Experimental Procedure


Throughout this experiment you may be faced with a variety of nonideal behaviors, such as noise, DC offset,
and amplifier distortion. These problems can be overcome by selecting your input signal level carefully.
Start by using the 0 − 2V range on the signal generator. Do not forget to scale by the input amplitude
when reading amplitude-related quantities like Mp and Mm . When DC offset is observed, it is acceptable to
compensate for the offset by adjusting the vertical position of the oscilloscope trace.

1) Connect the power amplifier in the unity feedback configuration (Figure 4.3).

2) Apply a square wave input, and record the values of ess0 , Ts , Tr , Tp , and Mp .

3) Apply sinusoidal inputs at a variety of frequencies and record the values of ω m , ω b , and Mm .

4) Repeat 2) and 3) for the gain compensation network (Figure 4.6).

5) Repeat 2) and 3) for the lead-lag compensation network (Figure 4.8).

4.9 Analysis
1) Construct a table that summarizes your data. The table should have eight columns corresponding to
Tr , Tp , Ts , Mp , ess0 , ω b , ω m , and Mm and three rows corresponding to the three closed-loop structures you
examined.

2) Write a few paragraphs summarizing your findings. In particular, compare the performance of each of
the three compensators relative to the various response parameters.

Das könnte Ihnen auch gefallen