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
EE 4343/5329 Homepage
EE 4343/5329 Course Outline
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 ζ
-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
40
20
Phase (deg); Magnitude (dB)
-20
-100
-120
-140
-160
-180
-1 0
10 10
Frequency (rad/sec)
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
Matlab Simulation
clear all;
% 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)
-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;
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.)
-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);
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
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
40
20
0
Phase (deg); Magnitude (dB)
-20
-100
-120
-140
ωm
-160
-180
-1 0
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
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
Matlab Simulation
clear all;
% 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)
- 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)
- 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.)
- 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);
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 -