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

Bod Elect

This document describes the design of phase-lead and phase-lag compensators for a control system using the Bode plot method. It provides step-by-step procedures to design a phase-lead compensator to meet specifications of less than 0.1 steady-state error for a unit ramp input and less than 25% overshoot. Similarly, it provides the design process for a phase-lag compensator to meet the same specifications. MATLAB simulations are included to verify the designs meet the specifications in time and frequency domain analyses.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views14 pages

Bod Elect

This document describes the design of phase-lead and phase-lag compensators for a control system using the Bode plot method. It provides step-by-step procedures to design a phase-lead compensator to meet specifications of less than 0.1 steady-state error for a unit ramp input and less than 25% overshoot. Similarly, it provides the design process for a phase-lag compensator to meet the same specifications. MATLAB simulations are included to verify the designs meet the specifications in time and frequency domain analyses.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 14

EE 4343 Control System Design

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


The University of Texas at Arlington, 1998

1. Phase-lead compensator design using Bode Plot Method


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

1
, such that the steadys s 1

state error is less than 0.1 for a unit ramp input and a % overshoot less than 25%.
Steady-state error specification
KV lim sG s lim s
s 0

ess

s 0

K 1
K
s s 1

1
1

0.1 K 10
KV
K

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

% Overshoot 100e

1 2

and is shown in Figure 1.


100
90
80

% Overshoot

70
60
50
40
30
20
10
0

0.1

0.2

0.3

0.4
0.5
damping ratio

0.6

Figure1. % Overshoot vs. Damping Ratio.

-1-

0.7

0.8

0.9

Then, the relationship between phase margin (PM) and damping ratio ( ) for the special
n2
G

case of open-loop transfer function


which is given by
s s 2 n

PM tan 1

1 4

maintains that the phase margin of the compensated system should be greater than
obtain a percent overshoot less than 25% and is shown in Figure 2.
80
70

Phase Margin (PM)

60
50
40
30
20
10
0

0.1

0.2

0.3

0.4
0.5
0.6
damping ratio

0.7

Figure2. Phase Margin vs. Damping Ratio.

-2-

0.8

0.9

45

to

Phase-lead design procedure:


i.)
ii.)

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 .
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

Phase (deg); Magnitude (dB)

20
0
-20
-100
-120
-140
-160
-180

-1

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 . Thus, choosing the
PM of the compensated system as PM comp 45 , then the additional amount of phase lead
m PM comp PM uncomp 25 . 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 33 .
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

-3-

C s

where T

1 s 1 T

s 1 T

or C j

j T 1
with 1
jT 1

. 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

Phase (deg); Magnitude (dB)

25

20
30
20
10
-1

10

10

10

Frequency (rad/sec)

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

-5-

10

M a g n itu d e (d B )

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

50

Bode Diagrams

uncompensated
compensated

0
-50
-100
-1
10

10

10

10

P h a s e (d e g )

-80
-100

uncompensated
compensated

compensated
system

-120
-140 uncompensated
system
-160
-180
-1
10

10
10
Frequency (rad/sec)

10

Figure 5. Bode plots of uncompensated and compensated systems.

-6-

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

A m p litu d e

1.2
1
0.8
0.6
0.4
0.2
0
0

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
compensated
desired

3.5
3
2.5
2
1.5
1
0.5
0

2
3
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 45 .
Phase-lag design procedure:

ii.)

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 .
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 50
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
Phase (deg); Magnitude (dB)

i.)

0
-20
-100
-120
-140

-160
-180

-1

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 log 20 dB or

20
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
C s

1 s 1 T

s 1 T

or C j

jT 1
with 1
jT 1

10
1
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

where T

design of the following:


C s

11.9 s 1
.
119 s 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

Phase (deg); Magnitude (dB)

10
5
0
-10
-20
-30
-40
-50
-3

10

-2

-1

10

10

Frequency (rad/sec)

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

- 11 -

10

M a g n itu d e (d B )

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

uncompensated
compensated

0
-50

P h a s e (d e g )

-100
-1
10

10

10

10

-80 compensated
system
-100

uncompensated
compensated

uncompensated
system

-120
-140
-160
-180
-1
10

10
10
Frequency (rad/sec)

10

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
compensated

A m p litu d e

1.2
1
0.8
0.6
0.4
0.2
0
0

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
compensated
desired

3.5
3
2.5
2
1.5
1
0.5
0

2
3
Time (sec)

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

- 14 -

You might also like