0% found this document useful (0 votes)
82 views14 pages

EE 4343/5329 - Control System Design Project: EE 4343/5329 Homepage EE 4343/5329 Course Outline

The document discusses designing a phase-lead compensator for a system using the Bode plot method. It provides the design procedure and simulation results. The procedure involves choosing a DC gain, determining the required phase lead, selecting the compensator parameter and time constant, and simulating the open and closed-loop response.
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)
82 views14 pages

EE 4343/5329 - Control System Design Project: EE 4343/5329 Homepage EE 4343/5329 Course Outline

The document discusses designing a phase-lead compensator for a system using the Bode plot method. It provides the design procedure and simulation results. The procedure involves choosing a DC gain, determining the required phase lead, selecting the compensator parameter and time constant, and simulating the open and closed-loop response.
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/ 14

Copyright S.

Ikenaga 1998
All rights reserved

EE 4343/5329 - Control System Design Project


LECTURE 10

EE 4343/5329 Homepage
EE 4343/5329 Course Outline

Design of Phase-lead and Phase-lag compensators using Bode Plot Method

1. Phase-lead compensator design using Bode Plot Method

Goal: Design a phase-lead compensator for the system G (s ) =


1
, such that the steady-
s (s + 1)
state error is less than 0.1 for a unit ramp input and a % overshoot less than 25%.

Steady-state error specification


K ⋅1
KV = lim sG (s ) = lim s =K
s →0 s → 0 s (s + 1)

1 1
ess = = < 0.1 ⇒ K ≥ 10
KV K

% overshoot specification
Recall the relationship between % overshoot and damping ratio (ζ ) which is given by
ζπ

1 −ζ 2
% Overshoot = 100e
and is shown in Figure 1.

-1-
Figure1. % Overshoot vs. Damping Ratio.

100

90

80

70

60
% Overshoot

50

40

30

20

10

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
damping ratio ζ

Then, the relationship between phase margin (PM) and damping ratio (ζ ) for the special
ω n2
case of open-loop transfer function G (s ) = which is given by
s (s + 2ζω n )
 
−1  2ζ 
PM = tan  
 1 = 4ζ 2 − 2ζ 2 
 
maintains that the phase margin of the compensated system should be greater than 45o to
obtain a percent overshoot less than 25% and is shown in Figure 2.

80

70

60

50
Phase Margin (PM)

40

30

20

10

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
damping ratio ζ

Figure2. Phase Margin vs. Damping Ratio.

-2-
Phase-lead design procedure:

i.) Choose the DC gain constant K such that the steady-state error specification is met. From
above, we know K must be greater than or equal to 10, so let K = 10 .
ii.) Obtain the gain margin and phase margin plots of the uncompensated system along with
the DC gain constant K found in (i.) to determine the amount of phase lead φ m needed to
realize the required phase margin so that the percent overshoot specification is met.

Bode Diagrams

Gm = Inf, Pm=17.964 deg. (at 3.0842 rad/sec)


60

40

20
Phase (deg); Magnitude (dB)

-20

-100

-120

-140

-160

-180
-1 0
10 10
Frequency (rad/sec)

Figure 3. Bode plot of uncompensated system K ⋅ G (s ) .

From Figure 3., the PM of the uncompensated system PM uncomp ≈ 20 o . Thus, choosing the
PM of the compensated system as PM comp = 45o , then the additional amount of phase lead
φ m = PM comp − PM uncomp = 25o . Now that φ m has been determined, the parameter α of
the phase-lead compensator can be chosen from Figure 2.14 in Appendix A, which has
been chosen to be α = 0.3 which corresponds to a maximum phase lead of 33o .
iii.) The maximum phase lead φ m must be added around the new gain-crossover frequency
ω m . The phase-lead compensator contributes a gain around − 10 log (0.3) = 5.2dB at the
new ω m ; therefore, one must determine the frequency at which the uncompensated system
has a magnitude 10 log(0.3) = −5.2dB . Thus, ω m should equal this frequency so that it
becomes the new 0-dB crossover frequency in the compensated system. From inspection
of Figure 3, the magnitude of the uncompensated system equals –5.2dB at the frequency
ω = 4.5 rad sec . Let ω m = 4.5 rad sec .

iv.) Calculate the parameters of the phase-lead compensator based on the values obtained in
steps (i.) thru (iii.). The transfer function of a phase-lead compensator is given as
1 s +1 T jω T + 1
C (s ) = ⋅ or C ( jω ) = with α < 1
α s + 1 αT jωαT + 1

-3-
1
where T = . Thus, for α = 0.3 , T = 0.41 sec . This leads to a phase-lead
ωm α
compensator design of the following:
0.41s + 1
C (s ) =
0.123s + 1

Phase-lead compensator simulation results:

Matlab Simulation
clear all;

wm = 4.5; % gain-crossover frequency


alpha = 0.3; % phase-lead compensator parameter
T = 1/wm/sqrt(alpha); % phase-lead compensator time constant
K = 10; % DC compensator gain

% Phase-lead compensator C(s)


cnum = K*[T 1];
cden = [T*alpha 1];

% Open-loop sys G(s)


gnum = [1];
gden = [1 1 0];

% Unity-Gain Feedback Loop H(s)


hnum = [1];
hden = [1];

% Open-loop sys C(s)*G(s)


numo = conv(cnum,gnum);
deno = conv(cden,gden);

% Closed-loop sys
[gnumc,gdenc] = feedback(K*gnum,gden,hnum,hden,-1);
[numc,denc] = feedback(numo,deno,hnum,hden,-1);

bode(cnum,cden);

-4-
Bode Diagrams

30

25
Phase (deg); Magnitude (dB)

20

30

20

10

-1 0 1 2
10 10 10 10

Frequency (rad/sec)

Figure 4. Bode plot of phase-lead compensator C (s ) .

-5-
sys1 = tf(K*gnum,gden);
sys2 = tf(numo,deno);
[mag1,ph1,w]=bode(K*gnum,gden,logspace(-1,2,500));
[mag2,ph2,w]=bode(numo,deno,logspace(-1,2,500));
subplot(211); semilogx(w,20*log10(mag1),'r', w,20*log10(mag2),'b');
title('Bode Diagrams'); ylabel('Magnitude (dB)');
legend('uncompensated','compensated', -1);
subplot(212); semilogx(w,ph1,'r', w,ph2,'b');
ylabel('Phase (deg)'); xlabel('Frequency (rad/sec)');
legend('uncompensated','compensated', -1);

Bode Diagrams
50
Magnitude (dB)

uncompensated
0
compensated

-50

-100
-1 0 1 2
10 10 10 10

-80

-100
Phase (deg)

uncompensated
-120
compensated compensated
system
-140
uncompensated
-160 system

-180
-1 0 1 2
10 10 10 10
Frequency (rad/sec)

Figure 5. Bode plots of uncompensated and compensated systems.

figure;
sys1c = tf(gnumc,gdenc);
sys2c = tf(numc,denc);
step(sys1c,sys2c);grid;
legend('uncompensated','compensated',-1);

-6-
Step Response

1.6

1.4

uncompensated
1.2 compensated

1
Amplitude

0.8

0.6

0.4

0.2

0
0 2 4 6 8 10 12
Time (sec.)

Figure 6. Step response of uncompensated and compensated system.

-7-
t=0:0.01:5;
y = t;
[y1,x1]=step(gnumc,conv(gdenc,[1 0]),t);
[y2,x2]=step(numc,conv(denc,[1 0]),t);
[y3,x3]=step(numc,denc,t);
[y4,x4]=step(gnumc,gdenc,t);
plot(t,y1,'r',t,y2,'b',t,y,'g');grid;
xlabel('Time (sec)');
title('Unit Ramp Input response');
legend('uncompensated', 'compensated', 'desired',-1);

Unit Ramp Input response


5

4.5

4
uncompensated
3.5 compensated
desired

2.5

1.5

0.5

0
0 1 2 3 4 5
Time (sec)

Figure 7. Response of uncompensated and compensated systems due to unit ramp input.

-8-
2. Phase-lag compensator design using Bode Plot Method

Goal: Design a phase-lag compensator for the system G (s ) =


1
, such that the steady-state
s (s + 1)
error is less than 0.1 for a unit ramp input and a percent overshoot less than 25%.

Steady-state error specification


As computed in (1.), K ≥ 10 .

Percent overshoot specification


As obtained in (1.), PM comp ≥ 45o .

Phase-lag design procedure:

i.) Choose the DC gain constant K such that the steady-state error specification is met. From
above, we know K must be greater than or equal to 10, so let K = 10 .
ii.) Obtain the gain margin and phase margin plots of the uncompensated system along with
the DC gain constant K found in (i.) to estimate the frequency at which the PM of 50o
occurs. Denote this frequency as the new gain-crossover frequency ω m . From Figure 8.,
let ω m = 0.84 rad sec .

Bode Diagrams

Gm = Inf, Pm=17.964 deg. (at 3.0842 rad/sec)


60

40

20

0
Phase (deg); Magnitude (dB)

-20

-100

-120

-140
ωm
-160

-180
-1 0
10 10

Frequency (rad/sec)

Figure 8. Bode plot of uncompensated system K ⋅ G (s ) .

-9-
iii.) Determine the magnitude of uncompensated system at ω m = 0.84 rad sec . From Figure 8.,
the magnitude of the uncompensated system at ω m = 0.84 rad sec is 20 dB. To bring the
magnitude curve down to 0 dB at ω m , the phase-lag compensator must provide
20
20 log (α ) = 20 dB or α = 10 20 = 10 .
iv.) Calculate the parameters of the phase-lag compensator based on the values obtained in
steps (i.) thru (iii.). The transfer function of a phase-lag compensator is given as
1 s +1 T jω T + 1
C (s ) = ⋅ or C ( jω ) = with α > 1
α s + 1 αT jωαT + 1
10 1
where T = = 11.9 sec . This is to ensure that the frequency at ω = is one decade
ωm T
below the new gain-crossover frequency ω m . This leads to a phase-lag compensator
design of the following:
11.9s + 1
C (s ) = .
119s + 1

Phase-lead compensator simulation results:

Matlab Simulation
clear all;

wm = 0.84; % gain-crossover frequency


alpha = 10; % phase-lag compensator parameter
T = 10/wm; % phase-lead compensator time constant
K = 10; % DC compensator gain

% Phase-lead compensator C(s)


cnum = K*[T 1];
cden = [T*alpha 1];

% Open-loop sys G(s)


gnum = [1];
gden = [1 1 0];

% Unity-Gain Feedback Loop H(s)


hnum = [1];
hden = [1];

% Open-loop sys C(s)*G(s)


numo = conv(cnum,gnum);
deno = conv(cden,gden);

% Closed-loop sys
[gnumc,gdenc] = feedback(K*gnum,gden,hnum,hden,-1);
[numc,denc] = feedback(numo,deno,hnum,hden,-1);

- 10 -
bode(cnum,cden);

Bode Diagrams

20

15

10

5
Phase (deg); Magnitude (dB)

-10

-20

-30

-40

-50

-3 -2 -1 0
10 10 10 10

Frequency (rad/sec)

Figure 9. Bode plot of phase-lag compensator C (s ) .

- 11 -
sys1 = tf(K*gnum,gden);
sys2 = tf(numo,deno);
[mag1,ph1,w]=bode(K*gnum,gden,logspace(-1,2,500));
[mag2,ph2,w]=bode(numo,deno,logspace(-1,2,500));
subplot(211); semilogx(w,20*log10(mag1),'r', w,20*log10(mag2),'b');
title('Bode Diagrams'); ylabel('Magnitude (dB)');
legend('uncompensated','compensated', -1);
subplot(212); semilogx(w,ph1,'r', w,ph2,'b');
ylabel('Phase (deg)'); xlabel('Frequency (rad/sec)');
legend('uncompensated','compensated', -1);

Bode Diagrams
50
Magnitude (dB)

uncompensated
0
compensated

-50

-100
-1 0 1 2
10 10 10 10

-80
compensated
system
-100
Phase (deg)

uncompensated
uncompensated compensated
-120
system
-140

-160

-180
-1 0 1 2
10 10 10 10
Frequency (rad/sec)

Figure 10. Bode plots of uncompensated and compensated systems.

- 12 -
sys1c = tf(gnumc,gdenc);
sys2c = tf(numc,denc);
step(sys1c,sys2c);grid;
legend('uncompensated', 'compensated',-1);

Step Response

1.6

1.4

uncompensated
1.2 compensated

1
Amplitude

0.8

0.6

0.4

0.2

0
0 5 10 15 20 25 30 35
Time (sec.)

Figure 11. Step response of uncompensated and compensated system.

- 13 -
t=0:0.01:5;
y = t;
[y1,x1]=step(gnumc,conv(gdenc,[1 0]),t);
[y2,x2]=step(numc,conv(denc,[1 0]),t);
[y3,x3]=step(numc,denc,t);
[y4,x4]=step(gnumc,gdenc,t);
plot(t,y1,'r',t,y2,'b',t,y,'g');grid;
xlabel('Time (sec)');
title('Unit Ramp Input response');
legend('uncompensated', 'compensated', 'desired',-1);

Unit Ramp Input response


5

4.5

4
uncompensated
3.5 compensated
desired
3

2.5

1.5

0.5

0
0 1 2 3 4 5
Time (sec)

Figure 12. Response of uncompensated and compensated systems due to unit ramp input.

- 14 -

You might also like