You are on page 1of 13

Heikki Koivo 44

4. DESIGN OF PHASE-LEAD COMPENSATOR

Phase-lead compensator, which corresponds to PD controller, is appropriate, when speed is


required, because it will speed up the original response. Typical applications are in servos.

Transfer function of phase-lead compensators is given by


1 + a2 τ s
WLead (s) = , a2 > 1 (4- 1)
1 + τs

Gain at high frequencies

W Lead ( ∞) dB = ( a 2 ) dB . (4-2)

and at low frequencies


WLead (0) = 1 = 0 dB. (4- 3)

Upper cut-off frequency


1
ωu = (4- 4)
a2 τ
and lower cut-off frequency
1
ωl = . (4- 5)
τ
Maximum phase shift φ max of phase-lead compensator
a −1
φ max = sin −1 ( 2 ) (4- 6)
a2 + 1
occurs at frequency
1
ωm = . (4- 7)
τ a2
The value of gain at that frequency is
W (ω m ) = a2 = ½ (a2 ) dB (4- 8)

This information is used as design cornerstone!

A typical Bode diagram of a phase-lead controller is given in Figure 4.1.


Heikki Koivo 45

Bode Diagrams
From: U(1)
15

Phase (deg); Magnitude (dB)


10

0
50
40
To: Y(1)

30
20

10

0 -2 -1 0 1
10 10 10 10

Frequency (rad/sec)

1 + 5s
Fig.4. 1. Bode diagram of a typical phase-led compensator: W ( s) = .
1+ s

Checking the calculations:


a −1 5−1
Computing φ max = sin −1 ( 2 ) = sin −1 ( . 0 at
) = 418
a2 + 1 5+1
1 1
ωm = = = 0.45 rad / s holds with the values read from Figure 4.1.
τ a2 5

The name of phase-lead controller follows from the property that the phase of the output of
WLead(s) is leading ahead the phase of the input signal. As can be seen from Figure 4.1 the gain
increases at higher frequencies. The gain at higher frequencies is a 2. Since a 2 > 1, this means
that W Lead ( ∞) = (a 2 ) dB is positive, which is clear from Figure 4.1. Let us study more
dB
carefully how much phase margin can be added for various values of a 2 .

Parameters a2, 1/2*(a2)dB and φ max

Compute a table showing maximum phase φmax of the phase-lead compensator as a function of
a 2 and also as a function of ½(a2)dB. Here are the MATLAB commands required

» a2=1:.25:10; %Here a2 is computed at intervals of 0.25


»half a2db=0.5*20*log10(a2);
»phimax=asin((a2-1)./(a2+1));
%Note dot after the term(a2-1).

Table 4.1. Dependencies of different parameters in phase lead circuit.


Heikki Koivo 46

a2 ½(a2 ) (dB) phimax (°)


1.00 0 0
2.00 3.01 19.47
3.00 4.77 30.00
4.00 6.02 36.86
5.00 6.98 41.81
6.00 7.78 45.58
7.00 8.45 48.59
8.00 9.03 51.05
9.00 9.54 53.13
10.00 10.00 54.90
Figures 4.2 and 4.3 display graphically the same dependencies.

0.8

0.6
phimax

0.4

0.2

0
1 2 3 4 5 6 7 8 9 10
a2

Fig.4. 2. The maximum phase φmax in phase lead circuit as a function of a2. The change in gain
at the same frequency is ½ (a2) dB.
Heikki Koivo 47

0.8

0.6
phimax

0.4

0.2

0
0 2 4 6 8 10
½(a2) (dB)

Fig.4. 3. The maximum phase φmax in phase lead circuit as a function of ½ (a2)dB.

Phase-lead compensator behaves like a PD controller at small frequencies. Let us draw a PD


controller, which roughly corresponds to the phase-lead compensator in Figure 4.1:

W PD ( s) = 1 + 5 s (4- 9)

or in MATLAB form
» WPD=tf([5 1],[1]);
The result is displayed in Figure 4.4.
Heikki Koivo 48

Bode diagram of PD control

From: U(1)
15

Phase (deg); Magnitude (dB)


10

0
80

60
To: Y(1)

40

20

0 -2 -1 0
10 10 10

Frequency (rad/sec)

Fig.4. 4. Bode diagram of PD controller WPD ( s) = 1 + 5s . For ω > 4 rad/s the PI controller
behaves like the phase-lead compensator of Figure 4.1.

Steps in design of phase-lead compensator


STEP 1.
Choose gain K to satisfy steady-state requirements.

STEP 2.
Draw Bode-diagram of KG(s).

STEP 3.
Determine the new crossover frequency ω , i.e.., the frequency at which the uncompensated
c
o
system has phase (-180 +PM’), where PM’ = desired phase margin by choosing a few values
of a 2 starting with a 2 =2 and going up to 10-20. Construct a table showing how much this
1
choice will add to phase margin and also to magnitude. In this way a 2 and ω m = can
τ a2
be determined.
This procedure also reveals if one phase lead circuit is enough. Remember also that the bigger
a 2 is, the more susceptible it is for noise.

STEP 4.
1
The new crossover frequency ωc = ω m = . This determines τ.
τ a2
Heikki Koivo 49

This completes the design of the phase-lead compensator.

STEP 5.
Check the design by simulating step response. Draw also the open-loop Bode diagram of the
compensated system for comparison purposes.

STEP 6.
If requirements are met, stop. Otherwise go back to STEP 1.

EXAMPLE

Open-loop transfer function of a unity feedback system of Fig.4.5 is given by

1
G (s ) = . (3- 1)
s(1 + 0.2 s)

Controller System
R(s) + 1 Y(s)
G( s ) =
WLEAD (s) s(1 + 0.2 s)
-

Fig.4. 5. The block diagram of the overall system. Here WLead (s) represents the phase-lag
controller or compensator and G(s) the open-loop system transfer function. The system has
unity feedback, H(s) = 1.

Specifications for the system are:


• Accuracy for a unit ramp input < 2%, i.e. steady-state error < 0.02.
• Maximum percent overshoot = PO < 20%.

Design a phase-lead compensator that satisfies the requirements.

SOLUTION:

STEP 1. (is the same as in phase lag)


Compute the steady-state for unit ramp input ess

1
ess = lim sE (s) = lim s( ) R( s) (4- 10)
s→ 0 s→ 0 1 + G ( s)
Heikki Koivo 50

1 1
e ss = lim [s( )] =K
s → 0 1+ K s2 (4- 11)
s(1 + 0.2s)
< 0.02

This implies that

K > 1/0.02 = 50, choose K = 50. (4- 12)

Gain is now sufficient. The controller is at this point a P (proportional) controller.

STEP 2. (As in phase lag)

From Fig.2.5 percent overshoot PO <20% corresponds to > 48° phase margin, PM. This
holds for second order systems and therefore we will make the dominant pole assumption.

Draw the Bode dia gram of the transfer function KG(s) = 50 / s(1 + 0.2s) as before. It is
redrawn in Fig.4.6.
» kg=zpk([],[0 -5],250)
Zero/pole/gain:
250
-------
s (s+5)
Bode Diagrams

From: U(1)
60

40

20
Phase (deg); Magnitude (dB)

-20

-40

-80

-100
To: Y(1)

-120

-140

-160

-180
0 1 2
10 10 10

Frequency (rad/sec)

Fig.4.6. Fig.3.4 redrawn. The Bode diagram of the open-loop transfer function KG(s). The
steady-state requirement is now satisfied. Plotting is done with bode(kg) command.
Heikki Koivo 51

REMARK: If you want grids on Bode diagram as shown, activate in e.g. magnitude in Bode
diagram figure. Then choose Tools from menu and under this Axis properties. Finally, choose
Grid On for both X and Y.

STEP 3
1
Recall that maximum phase shift φ max occurs at ω m = and that
τ a2
a −1
φ max = sin −1 ( 2 ) and
a2 + 1

W (ω m ) = a 2 = ½ (a 2 )dB

or phase-lead circuit adds ½ (a 2 )dB in dB:s at the same time as φ max is added to the original
phase margin.

Construct the following table using Bode diagram by going through values of a2 between 2-10.

» num=[50];den=[0.2 1 0]; kg=tf(num,den);


» w=logspace(-1,2);[mag phase] =bode(kg,w);
» a2=1:0.2:10.8; halfa2db=0.5*20*log10(a2);
» phimax=asin((a2-1)./(a2+1));
» phi=180.+phase; magdb = 20*log10(mag);
» phim=phi'+phimaxdeg;
» [a2' halfa2db' magdb phi phimaxdeg' phim' w']

Table 4.2. Effect of phase-lead circuit on phase margin of KG(s)


Heikki Koivo 52

The first three columns, a 2 , ½(a2)dB, and phimax(°), come from the phase-lead
compensator. The third, fourth and fifth, magdb, w, phi (current phase margin, if gain would
become zero), are the original magnitude and phase.
The final column, phim= phimax + phi , gives the phase margin of the compensated
system.

a2 ½(a2 )dB phimax(°) magdb w phi(°) phim(°)


2.0 3.0103 19.4712 -3.0 18.4 15.2 34.65
3.0 4.7712 30.0000 -4.5 20.2 13.9 43.9
4.0 6.0206 36.8699 -6.1 22.2 12.7 49.6
5.0 6.9897 41.8103 -6.9 23.3 12.1 53.9
6.0 7.7815 45.5847 -7.7 24.4 11.6 57.2
7.0 8.4510 48.5904 -8.5 25.6 11.1 59.7
8.0 9.0309 51.0576 -9.0 26.3 10.7 61.8
9.0 9.5424 53.1301 -9.7 27.9 10.4 63.5
10.0 10.0000 54.9032 -10.1 28.1 10.1 65.0

How is the above table constructed? Start with the phase-lead compensator. Consider the
third row.
Give a value for a2, a 2 = 4 , which in dB:s is ( a2 ) dB = (4 )dB = 12 dB . Half of that is
½ (a 2 ) dB = 6 dB , which is the value in the second column.

On the third column we see the additional phaseφ max = 37° (= 36.8699 0) of the phase-lead
compensator when a 2 = 4.

Next determine the frequency at which the gain has approximately the value
− ½ (a 2 )dB = − 6dB , because the effect of phase-lead will add this much to the gain. The
corresponding frequency is ω = 22.2 rad / s and the gain ≈ -6.1 dB. These are seen in
columns five and four respectively.

It is further seen that the original phase margin at this frequency is phi = φ m = 12.7 o . This is
displayed in the sixth column. Adding this to phimax = φ max of the third column gives the new
phase margin phim = φ 'm = φ m + φ max = 12.7 0 + 369
. 0 = 49.6 0 , which is shown in the last
column. The phase margin is now enough.

STEP 4
1
Since ω m = = 22.2 rad/s and a 2 = 4 , we can solve τ:
τ a2

1
= 22.4 or τ = 0.022.
τ 4

Transfer function of the designed phase-lead network W(s) is


Heikki Koivo 53

»numw=[0.088 1]; denw=[0.022 1]; w=tf(numw,denw);

The open loop, compensated transfer function W(s)G(s) is calculated by


»wg=w*g;

Plotting the Bode diagram of W(s)G(s)


» bode(wg)
The result is given in Figure 4.7.
Bode Diagrams

From: U(1)
100

50
Phase (deg); Magnitude (dB)

-50

-100

-80

-100
To: Y(1)

-120

-140

-160

-180
0 1 2
10 10 10

Frequency (rad/sec)

Fig.4. 7. The Bode diagram of the open-loop, phase-lead compensated transfer function
W(s)G(s).

Let us compare the Bode diagrams of the uncompensated and compensated systems by
drawing them in the same figure, Figures 4.8.

bode(kg,wg)
Heikki Koivo 54

Bode Diagrams

From: U(1)
100

50

Phase (deg); Magnitude (dB)


0

-50

-100

-80

-100
To: Y(1)

-120

-140

-160

-180
0 1 2
10 10 10

Frequency (rad/sec)

Fig.4. 8. Bode diagrams of open-loop uncompensated and compensated magnitudes (above)


and phases (below). Observe how the phase-lead compensator adds gain and at higher
frequencies and phase in the middle frequencies.

The closed-loop uncompensated (K=50) transfer function is calculated by:


» gcl=feedback(kg,1)

Zero/pole/gain:
250
----------------
(s^2 + 5s + 250)

The unit step response is obtained by


» t=linspace(0,3); y1=step(gcl,t)

The closed-loop transfer function of the compensated system is computed similarly:


» gcl1=feedback(wg,1)

Zero/pole/gain:
1000 (s+11.36)
--------------------------------
(s+17.44) (s^2 + 33.01s + 651.4)
The step responses are plotted in the same figure, Fig.4.10:

» step(gcl,gcl1)
Heikki Koivo 55

Step Response
From: U(1)
1.8

1.6

1.4

Amplitude 1.2

To: Y(1) 1

0.8

0.6

0.4

0.2

0
0 0.5 1 1.5 2 2.5

Time (sec.)

Fig. 4.9. The step responses of the closed-loop systems, P-compensated (K=50) and the
phase-lead compensated (--). The overshoot for the compensated system is slightly more than
is required. This is due to the dominant pole approximation. Note how the phase-lead
compensation makes the response faster. The system also becomes more susceptible to noise.

The overshoot is ≈ 23% or almost what was required. Note the fast response that the phase-
lead compensated system produces. Recall that the phase-lag compensation slows the
response compared with the original one.

Test the dominant pole assumption by computing the closed-loop roots. First transfer from zpk
mode to tf-mode.
» tf(gcl1)

Transfer function:
1000 s + 1.136e004
------------------------------------
s^3 + 50.45 s^2 + 1227 s + 1.136e004
Roots of the denominator are
» roots([1 50.45 1227 11360])
ans =
-16.5034 +19.4652i
-16.5034 -19.4652i
-17.4432
Heikki Koivo 56

There are two complex poles, but the third pole clearly has a strong effect on the response.
Checking also the zeros:
» roots([1000 11360])
ans = -11.3600

The zero is not very close to the pole p = -17.4439 but seems to cancel most of its
effect, but not quite enough. This is probably the reason why the PO requirement was not
satisfied right away.

Let us finally draw the Bode diagram of the phase-lead compensator.

» numw=[0.088 1]; denw=[0.022 1]; w=tf(numw,denw); bode(w)

Bode Diagrams

From: U(1)
15

10
Phase (deg); Magnitude (dB)

40

30
To: Y(1)

20

10

0
0 1 2
10 10 10

Frequency (rad/sec)

Fig. 4.10. Bode diagram of phase lead compensator.

You might also like