Professional Documents
Culture Documents
EE 4343/5329 - Control System Design Project: EE 4343/5329 Homepage EE 4343/5329 Course Outline
EE 4343/5329 - Control System Design Project: EE 4343/5329 Homepage EE 4343/5329 Course Outline
Ikenaga 1998
All rights reserved
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-
1 2
% Overshoot
70
60
50
40
30
20
10
0
0.1
0.2
0.3
0.4
0.5
damping ratio
0.6
0.7
0.8
0.9
Then, the relationship between phase margin (PM) and damping ratio ( ) for the special
n2
G
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
60
50
40
30
20
10
0
0.1
0.2
0.3
0.4
0.5
0.6
damping ratio
0.7
-2-
0.8
0.9
45
to
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
20
0
-20
-100
-120
-140
-160
-180
-1
10
10
Frequency (rad/sec)
where T
s 1 T
s 1 T
1
or C j
j T 1
with 1
jT 1
-3-
C s
0.41s 1
0.123s 1
bode(cnum,cden);
-4-
Bode Diagrams
30
25
20
30
20
10
-1
10
10
10
Frequency (rad/sec)
-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;
sys1c = tf(gnumc,gdenc);
sys2c = tf(numc,denc);
step(sys1c,sys2c);grid;
legend('uncompensated','compensated',-1);
-6-
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.)
-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-
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)
-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
11.9 s 1
.
119 s 1
- 10 -
bode(cnum,cden);
Bode Diagrams
20
15
10
5
0
-10
-20
-30
-40
-50
-3
10
-2
-1
10
10
Frequency (rad/sec)
- 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
- 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.)
- 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 -