DESIGN OF PHASE-LEAD COMPENSATOR

13

Click here to load reader

description

Design of a phase-lead compensation

Transcript of DESIGN OF PHASE-LEAD COMPENSATOR

Page 1: DESIGN OF PHASE-LEAD COMPENSATOR

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

W sa s

sLead ( ) = ++

11

22

ττ

, a > 1 (4- 1)

Gain at high frequencies

W aLead dB dB( ) ( )∞ = 2 . (4-2)

and at low frequencies

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

Upper cut-off frequency

ωτu a

= 1

2 (4- 4)

and lower cut-off frequency

ωτl = 1 . (4- 5)

Maximum phase shift φ max of phase-lead compensator

φ max sin ( )=−+

−1 2

2

11

aa

(4- 6)

occurs at frequency

ωτm a

= 1

2. (4- 7)

The value of gain at that frequency is

W a am dB( ) ½ ( )ω = =2 2 (4- 8)

This information is used as design cornerstone! A typical Bode diagram of a phase-lead controller is given in Figure 4.1.

Page 2: DESIGN OF PHASE-LEAD COMPENSATOR

Heikki Koivo

45

Frequency (rad/sec)

Pha

se (

deg)

; Mag

nitu

de (

dB)

Bode Diagrams

0

5

10

15From: U(1)

10-2 10-1 100 1010

10

20

30

40

50T

o: Y

(1)

Fig.4. 1. Bode diagram of a typical phase-led compensator: W sss

( ) = ++

1 51

.

Checking the calculations:

Computingφ max sin ( ) sin ( ) .=−+

=−+

=− −1 2

2

1 011

5 15 1

418aa

at

ωτm a

= = =1 15

02

.45 rad / s holds with the values read from Figure 4.1.

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 a2. Since a2 > 1, this means that W aLead dB dB( ) ( )∞ = 2 is positive, which is clear from Figure 4.1. Let us study more

carefully how much phase margin can be added for various values of a2 .

Parameters a2, 1/2*(a2)dB and φ max Compute a table showing maximum phase φmax of the phase-lead compensator as a function of a2 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.

Page 3: DESIGN OF PHASE-LEAD COMPENSATOR

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.

1 2 3 4 5 6 7 8 9 100

0.2

0.4

0.6

0.8

1

a2

phim

ax

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.

Page 4: DESIGN OF PHASE-LEAD COMPENSATOR

Heikki Koivo

47

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:

WPD s s( ) = +1 5 (4- 9)

or in MATLAB form

» WPD=tf([5 1],[1]);

The result is displayed in Figure 4.4.

0 2 4 6 8 100

0.2

0.4

0.6

0.8

1

½(a2) (dB)

phim

ax

Page 5: DESIGN OF PHASE-LEAD COMPENSATOR

Heikki Koivo

48

Frequency (rad/sec)

Pha

se (

deg)

; Mag

nitu

de (

dB)

Bode diagram of PD control

0

5

10

15From: U(1)

10-2 10-1 1000

20

40

60

80T

o: Y

(1)

Fig.4. 4. Bode diagram of PD controller WPD s s( ) = +1 5 . 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 ω

c, i.e.., the frequency at which the uncompensated

system has phase (-180o+PM’), where PM’ = desired phase margin by choosing a few values of a2 starting with a2 =2 and going up to 10-20. Construct a table showing how much this

choice will add to phase margin and also to magnitude. In this way a2 and ωτm a

=1

2 can

be determined. This procedure also reveals if one phase lead circuit is enough. Remember also that the bigger a2 is, the more susceptible it is for noise.

STEP 4.

The new crossover frequency ωc = ωτm a

= 1

2. This determines τ.

Page 6: DESIGN OF PHASE-LEAD COMPENSATOR

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

G ss s

( )( . )

=+1

1 0 2. (3- 1)

-

+

Controller System

WLEAD (s)

R(s)R(s) Y(s)Y(s)G s

s s( )

( . )=

+

11 0 2

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

e sE s sG s

R ssss s

= =+→ →

lim ( ) lim (( )

) ( )0 0

11

(4- 10)

Page 7: DESIGN OF PHASE-LEAD COMPENSATOR

Heikki Koivo

50

ess lims 0

[s( 1

1K

s(1 0.2s)

)] 1

s2

0.02

=→ +

+

=

<

K (4- 11)

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 diagram 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)

Frequency (rad/sec)

Pha

se (

deg)

; Mag

nitu

de (

dB)

Bode Diagrams

-40

-20

0

20

40

60From: U(1)

100 101 102-180

-160

-140

-120

-100

-80

To: Y

(1)

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.

Page 8: DESIGN OF PHASE-LEAD COMPENSATOR

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

Recall that maximum phase shift φ max occurs at ωτm a

=1

2 and that

φ max sin ( )=−+

−1 2

2

11

aa

and

W a am dB( ) ½ ( )ω = =2 2 or phase-lead circuit adds ½ ( )a dB2 in dB:s at the same time as φ maxis 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)

Page 9: DESIGN OF PHASE-LEAD COMPENSATOR

Heikki Koivo

52

The first three columns, a2 , ½(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, a2 4= , which in dB:s is ( ) ( )a dBdB dB2 4 12= = . Half of that is

½ ( )a dBdB2 6= , which is the value in the second column. On the third column we see the additional phaseφ max = 37° (= 36.86990) of the phase-lead compensator when a2 = 4. Next determine the frequency at which the gain has approximately the value − = −½ ( )a dBdB2 6 , 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 =φ mo= 12 7. . 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 369 49 60 0 0 , which is shown in the last column. The phase margin is now enough. STEP 4

Since ωτm a

=1

2 = 22.2 rad/s and a2 4= , we can solve τ:

14

22 4τ

= . or τ = 0.022.

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

Page 10: DESIGN OF PHASE-LEAD COMPENSATOR

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.

Frequency (rad/sec)

Pha

se (

deg)

; M

agni

tude

(dB

)

Bode Diagrams

-100

-50

0

50

100From: U(1)

100 101 102-180

-160

-140

-120

-100

-80

To: Y

(1)

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)

Page 11: DESIGN OF PHASE-LEAD COMPENSATOR

Heikki Koivo

54

Frequency (rad/sec)

Pha

se (

deg)

; Mag

nitu

de (

dB)

Bode Diagrams

-100

-50

0

50

100From: U(1)

100 101 102-180

-160

-140

-120

-100

-80

To: Y

(1)

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)

Page 12: DESIGN OF PHASE-LEAD COMPENSATOR

Heikki Koivo

55

Time (sec.)

Am

plitu

de

Step Response

0 0.5 1 1.5 2 2.50

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8From: U(1)

To:

Y(1

)

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

Page 13: DESIGN OF PHASE-LEAD COMPENSATOR

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)

Frequency (rad/sec)

Pha

se (

deg)

; Mag

nitu

de (

dB)

Bode Diagrams

0

5

10

15From: U(1)

100 101 1020

10

20

30

40

To: Y

(1)

Fig. 4.10. Bode diagram of phase lead compensator.