hw2_sol
-
Upload
saied-aly-salamah -
Category
Documents
-
view
267 -
download
0
Transcript of hw2_sol
![Page 1: hw2_sol](https://reader036.fdocuments.net/reader036/viewer/2022081907/54546125b1af9f04298b4e2b/html5/thumbnails/1.jpg)
UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN
Department of Electrical and Computer Engineering
ECE 486: Control Systems
HOMEWORK 2 - SOLUTION
Spring 2012
Problem 3.23
For the electric circuit shown in Fig. 3.56, find the following:
(a) The time-domain equation relating i(t) and v1(t);
(b) The time-domain equation relating i(t) and v2(t);
(c) Assuming all initial conditions are zero, the transfer function V2(s)/V1(s) and the dampingratio ζ and undamped natural frequency ωn of the system;
(d) The values of R that will result in v2(t) having an overshoot of no more than 25%,assuming v1(t) is a unit step, L = 10 mH, and C = 4 µF.
Solution:
(a) By the Kirchhoff’s voltage law (KVL),
v1(t) = Ldi
dt+Ri+
1
C
∫
u(t)dt.
(b) v2(t) is equal to the voltage around the capacitor.
v2(t) =1
C
∫
i(t)dt.
![Page 2: hw2_sol](https://reader036.fdocuments.net/reader036/viewer/2022081907/54546125b1af9f04298b4e2b/html5/thumbnails/2.jpg)
(c) Apply Laplace transform to the equations in (a) and (b),
V1(s) = sLI(s) +RI(s) +I(s)
sC
V2(s) =I(s)
sC⇒ I(s) = sCV2(s), plug-in to the above equation
V1(s) = s2LCV2(s) + sRCV2(s) + V2(s)
V2(s)
V1(s)=
1sC
sL+R+ 1sC
=1
s2LC + sRC + 1=
1/LC
s2 + (R/L)s + 1/LC=
ω2n
s2 + 2ζωns+ ω2n
.
ωn =1√LC
.
ζ =1
2ωn· RL
=R
2√
LC
.
(d) For 25% overshoot ζ ≈ 0.4 (see Page 118 Figure 3.23),
0.4 ≈ ζ =R
2√
LC
R = 2ζ
√
L
C= (2)(0.4)
√
10× 10−3
4× 10−6= 40 Ω.
Problem 3.25
For the unity feedback system shown in Fig. 3.58, specify the gain and pole location of thecompensator so that the overall closed-loop response to a unit-step input has an overshoot ofno more than 25%, and a 1% settling time of no more than 0.1 sec. Verify your design usingMATLAB.
Solution:
Y (s)
R(s)=
100K(s+a)(s+25)
1 + 100K(s+a)(s+25)
=100K
s2 + (25 + a)s + 25a+ 100K=
100K
s2 + 2ζωns+ ω2n
.
2
![Page 3: hw2_sol](https://reader036.fdocuments.net/reader036/viewer/2022081907/54546125b1af9f04298b4e2b/html5/thumbnails/3.jpg)
Using the given information:
R(s) =1
sunit step,
Mp ≤ 25%,
ts ≤ 0.1sec.
Solve for ζ:
Mp = e−πζ/√
1−ζ2 ,
ζ =
√
(lnMp)2
π2 + (lnMp)2
∣
∣
∣
∣
∣
Mp=0.25
≥ 0.4037.
Solve for ωn:e−ζωnts = 0.01, for a 1% settling time.
ts ≤4.605
ζωn= 0.1,
⇒ ωn ≈ 114.07.
Now find a and K:2ζωn = (25 + a)
a = 2ζωn − 25 = 92.10 − 25 = 67.10
ω2n = (25a + 100K),
K =ω2n − 25a
100≈ 113.34.
The step response of the system using MATLAB is shown below.
a = 67.10;
K = 113.34;
% Compensator
num1 = K;
den1 = [1 a];
sys1 = tf(num1,den1);
% Plant
num2 = 100;
den2 = [1 25];
sys2 = tf(num2,den2);
sys3 = series(sys1,sys2);
3
![Page 4: hw2_sol](https://reader036.fdocuments.net/reader036/viewer/2022081907/54546125b1af9f04298b4e2b/html5/thumbnails/4.jpg)
% The feedback system
num4 = 1;
den4 = 1;
sys4 = tf(num4,den4);
sys = feedback(sys3,sys4,-1);
hold on;
[y,t] = step(sys);
plot(t,y);
title(’Step response’);
xlabel(’Time (sec)’);
ylabel(’y(t)’);
grid on;
0 0.02 0.04 0.06 0.08 0.1 0.12 0.140
0.2
0.4
0.6
0.8
1
1.2
1.4Step response
Time (sec)
y(t)
4
![Page 5: hw2_sol](https://reader036.fdocuments.net/reader036/viewer/2022081907/54546125b1af9f04298b4e2b/html5/thumbnails/5.jpg)
Problem 3.27
A certain servomechanism system has dynamics dominated by a pair of complex poles andno finite zeros. The time-domain specifications on the rise time (tr), percent overshoot (Mp),and settling time (ts) are given by,
tr ≤ 0.6sec,
Mp ≤ 17%,
ts ≤ 9.2sec.
(a) Sketch the region in the s-plane where the poles could be placed so that the system willmeet all three specifications.
(b) Indicate on your sketch the specific locations (denoted by ×) that will have the smallestrise-time and also meet the settling time specification exactly.
Solution:
(a)-(b)
tr =1.8
ωn≤ 0.6 =⇒ ωn ≥ 3
Mp = e−
ζπ√1−ζ2 = 0.17 =⇒ ζπ
√
1− ζ2= − log 0.17 ≈ 1.772
=⇒ θ = sin−1 ζ = tan−1
(
ζ√
1− ζ2
)
= tan−1
(
1.772
π
)
≈ 29.42
ts =4.6
σ≤ 9.2 =⇒ σ ≥ 0.5
5
![Page 6: hw2_sol](https://reader036.fdocuments.net/reader036/viewer/2022081907/54546125b1af9f04298b4e2b/html5/thumbnails/6.jpg)
Problem 3.30
The equation of motion for the DC motor shown in Fig. 2.32 were given in Eqs. (2.52-53) as
Jmθm +
(
b+KtKe
Ra
)
θm =Kt
Rava.
Assume that
Jm = 0.01 kg ·m2,
b = 0.001 N ·m · sec,Ke = 0.02 V · sec,Kt = 0.02 N ·m/A,
Ra = 10 Ω.
(a) Find the transfer function between the applied voltage va and the motor speed θm.
(b) What is the steady-state speed of the motor after a voltage va = 10 V has been applied?
(c) Find the transfer function between the applied voltage va and the shaft angle θm.
(d) Suppose feedback is added to the system in part (c) so that it becomes a position servodevice such that the applied voltage is given by
va = K(θr − θm),
where K is the feedback gain. Find the transfer function between θr and θm.
(e) What is the maximum value of K that can be used if an overshoot Mp < 20% is desired?
(f) What values of K will provide a rise time of less than 4 sec? (Ignore the Mp constraint.)
(g) Use MATLAB to plot the step response of the position servo system for values of the gainK = 0.5, 1, and 2. Find the overshoot and rise time for each of the three step responsesby examining your plots. Are the plots consistent with your calculations in parts (e) and(f)?
Solution:
Jmθm +
(
b+KtKe
Ra
)
θm =Kt
Rava.
(a)
JmΘms2 +
(
b+KtKe
Ra
)
Θms =Kt
RaVa(s)
6
![Page 7: hw2_sol](https://reader036.fdocuments.net/reader036/viewer/2022081907/54546125b1af9f04298b4e2b/html5/thumbnails/7.jpg)
sΘm(s)
Va(s)=
Kt
RaJm
s+ bJm
+ KtKe
RaJm
.
Jm = 0.01 kg ·m2,
b = 0.001 N ·m · sec,Ke = 0.02 V · sec,Kt = 0.02 N ·m/A,
Ra = 10 Ω.
sΘm(s)
Va(s)=
0.2
s+ 0.104
(b) Final Value Theorem
˙θm(∞) = sΘm(s)Va(s)|s=0 =s(10)(0.2)
s(s+ 0.104)
∣
∣
∣
∣
s=0
=2
0.104= 19.23.
(c)Θm(s)
Va(s)=
0.2
s(s+ 0.104).
(d)
Θm(s) =0.2K(Θr −Θm)
s(s+ 0.104).
Θm(s)
Θr(s)=
0.2K
s2 + 0.104s + 0.2K.
(e)
Mp = e−πζ/√
1−ζ2 ≤ 0.2 (20%),
ζ ≥ 0.4559.
Θm(s)
Θr(s)=
ω2n
s2 + 2ζωns+ ω2n
.
2ζωn = 0.104,
ωn ≤ =0.104
2ζ=
0.104
2(0.4559)= 0.114 rad/sec,
ω2n = 0.2K = (0.114)2,
K < 6.50× 10−2.
7
![Page 8: hw2_sol](https://reader036.fdocuments.net/reader036/viewer/2022081907/54546125b1af9f04298b4e2b/html5/thumbnails/8.jpg)
(f)
ωn ≥ 1.8
tr=
1.8
4, ωn ≈ 0.45
ω2n = 0.2K = (0.45)2
K ≥ 1.01.
(g) MATLAB
% Problem 3.30 FPE6e
clear all
close all
K1=[0.5 1.0 2.0 6.5e-2];
t=0:0.01:150;
for i=1:1:length(K1)
K = K1(i);
titleText = sprintf(’K= %1.4f ’, K);
wn = sqrt(0.2*K);
num=wn^2;
den=[1 0.104 wn^2];
zeta=0.104/2/wn;
sys = tf(num, den);
y= step(sys, t);
% Finding maximum overshoot
if zeta < 1
Mp = (max(y) - 1)*100;
overshootText = sprintf(’Max overshoot = %3.2f %’, Mp);
else
overshootText = sprintf(’No overshoot’);
end
% Finding rise time
idx_01 = max(.nd(y<0.1));
idx_09 = min(.nd(y>0.9));
t_r = t(idx_09) - t(idx_01);
risetimeText = sprintf(’Rise time = %3.2f sec’, t_r);
% Plotting
subplot(3,2,i);
plot(t,y);
grid on;
title(titleText);
text( 0.5, 0.3, overshootText);
text( 0.5, 0.1, risetimeText);
end
8
![Page 9: hw2_sol](https://reader036.fdocuments.net/reader036/viewer/2022081907/54546125b1af9f04298b4e2b/html5/thumbnails/9.jpg)
%%%%%%%%%%%%%%%%
% Function for computing rise time
function tr = risetime(t,y)
% A. Emami 2006
% normalize y to 1:
y = y/y(length(y));
idx1 = min(find(y>=0.1))
idx2 = min(find(y>=0.9))
if ~isempty(idx1) & ~isempty(idx2)
tr = t(idx2) - t(idx1);
else
tr = 0
end
0 50 100 1500
0.5
1
1.5
2K= 0.5000
Max overshoot = 59.23 Rise time = 3.70 sec
0 50 100 1500
0.5
1
1.5
2K= 1.0000
Max overshoot = 69.23 Rise time = 2.51 sec
0 50 100 1500
0.5
1
1.5
2K= 2.0000
Max overshoot = 77.17 Rise time = 1.73 sec
0 50 100 1500
0.5
1
1.5K= 0.0650
Max overshoot = 19.99
Rise time = 13.66 sec
For part (e) we concluded that K < 6.50 × 10−2 in order for Mp < 20%: This is consistentwith the above plots. For part (f) we found that K ≥ 1.01 in order to have a rise time of lessthan 4 seconds. We actually see that our calculations is slightly off and that K can be K ≥ 0.5,but since K ≥ 1.01 is included in K ≥ 0.5, our answer in part (f) is consistent with the aboveplots.
9
![Page 10: hw2_sol](https://reader036.fdocuments.net/reader036/viewer/2022081907/54546125b1af9f04298b4e2b/html5/thumbnails/10.jpg)
Problem 3.33
In aircraft control systems, an ideal pitch response (qo) versus a pitch command (qc) is describedby the transfer function
Qo(s)
Qc(s)=
τω2n(s+ 1/τ)
s2 + 2ζωns+ ω2n
.
The actual aircraft response is more complicated than this ideal transfer function; nevertheless,the ideal model is used as a guide for autopilot design. Assume that tr is the desired rise timeand that
ωn =1.789
tr,
1
τ=
1.6
tr,
ζ = 0.89.
Show that this ideal response possesses a fast settling time and minimal overshoot by plottingthe step response for tr = 0.8, 1.0, 1.2, and 1.5 sec.
Solution:
The following program statements in MATLAB produce the following plots:
% Problem 3.33 FPE6e
tr = [0.8 1.0 1.2 1.5];
t=[1:240]/30;
tback=fliplr(t);
clf;
for I=1:4,
wn=(1.789)/tr(I); %Rads/second
tau=tr(I)/(1.6); %tau
zeta=0.89; %
b=tau*(wn^2)*[1 1/tau];
a=[1 2*zeta*wn (wn^2)];
y=step(b,a,t);
subplot(2,2,I);
plot(t,y);
titletext=sprintf(’tr=%3.1f seconds’,tr(I));
title(titletext);
xlabel(’t (seconds)’);
ylabel(’Qo/Qc’);
ymax=(max(y)-1)*100;
msg=sprintf(’Max overshoot=%3.1f%%’,ymax);
text(.50,.30,msg);
yback=flipud(y);
10
![Page 11: hw2_sol](https://reader036.fdocuments.net/reader036/viewer/2022081907/54546125b1af9f04298b4e2b/html5/thumbnails/11.jpg)
yind=find(abs(yback-1)>0.01);
ts=tback(min(yind));
msg=sprintf(’Settling time =%3.1f sec’,ts);
text(.50,.10,msg);
grid;
end
0 1 2 3 4 5 6 7 80
0.2
0.4
0.6
0.8
1
1.2
1.4tr=0.8 seconds
t (seconds)
Qo/
Qc
Max overshoot=2.3%
Settling time =2.3 sec
0 1 2 3 4 5 6 7 80
0.2
0.4
0.6
0.8
1
1.2
1.4tr=1.0 seconds
t (seconds)
Qo/
Qc
Max overshoot=2.3%
Settling time =2.9 sec
0 1 2 3 4 5 6 7 80
0.2
0.4
0.6
0.8
1
1.2
1.4tr=1.2 seconds
t (seconds)
Qo/
Qc
Max overshoot=2.3%
Settling time =3.5 sec
0 1 2 3 4 5 6 7 80
0.2
0.4
0.6
0.8
1
1.2
1.4tr=1.5 seconds
t (seconds)
Qo/
Qc
Max overshoot=2.3%
Settling time =4.4 sec
11