HW3 Solution

advertisement
ECE382/ME482 Fall 2008
Homework 3 Solution
October 20, 2008
1
Homework Assignment 3
Assigned September 30, 2008.
Due in lecture October 7, 2008.
Note that you must include all of your work to obtain full credit. Also the paper you submit
must be your own work. To copy someone else’s homework is cheating, which is not permitted
and will result in a score of 0 for both the original and the copy.
1. Consider the close-loop transfer function
T (s) =
5(s + 3)
Y (s)
=
.
R(s)
(s + 7)(s2 + 8s + 36)
(1)
(a) If r(t) is a step input, find the steady-state error.
Solution: The final value theorem indicates that
yss = lim sY (s) = lim sT (s)R(s).
s→0
Thus
yss
s→0
5(s + 3)
= lim s
s→0
(s + 7)(s2 + 8s + 36)
1
s
= 15/252 = 5/84.
(2)
(3)
The error is defined to be e(t) := y(t) − r(t) so the steady state error is 79/84 (which
would indicate that if we were actually trying to generate yss = 1, we’d need to
change the gain).
(b) Suppose that the real pole can be ignored as discussed in the section on the effects
of a third pole and a zero on second order system response. Calculate the overshoot
and 2% settling time for this second order system.
Solution: Since 2ζωn = 8, we expect the 2% settling time to be 4/(ζω) = 1. Since
ωn = 6, we find that ζ = 2/3. To calculate the percent overshoot we have to
be a little careful.
Using the formula in the text, the percent overshoot would be
√
2
1−ζ
−ζπ/
= 6%. This does not match the observed value of 30% calculated
100yss e
from the actual response in the Matlab transcript below. The reason for this is the
zero, which is not accounted for in the calculation in the textbook.
Here’s the transcript of my Matlab session.
>> ps3p1
Actual System:
Transfer function:
5 s + 15
------------------------s^3 + 15 s^2 + 92 s + 252
Max Value of y(t):
0.077143
ECE382/ME482 Fall 2008
Homework 3 Solution
Steady State Value of y(t):
Percent Overshoot: 0.29601
Max Value of y(t): 0.077143
Steady State Value of y(t):
October 20, 2008
0.059524
0.059524
Reduced Order System:
Transfer function:
5 s + 15
-----------------7 s^2 + 56 s + 252
omnz =
4
zeta =
0.6667
Percent Overshoot: 0.45629
Max Value of y2(t): 0.086684
Steady State Value of y2(t):
0.059524
2-percent settling time: 1.16
Expected settling time: 1
Expected Percent Overshoot: 6.0209
Here’s the script I used.
tofs = tf(5*[1 3],[1 7+8 56+36 7*36]);
tofs2 = tf(5*[1 3],7*[1 8 36]);
t = [0:.01:5];
y=step(tofs,t);
y2=step(tofs2,t);
figure(1)
plot(t,y,t,y2)
title(’Problem 1: Step Response Comparison’)
xlabel(’t’)
ylabel(’y(t)’)
legend(’Original System’,’Reduced Order System’)
grid
disp(’Actual System:’)
tofs = tf(5*[1 3],[1 7+8 56+36 7*36])
disp([’Max Value of y(t): ’,num2str(max(y))])
disp([’Steady State Value of y(t):
’,num2str(y(max(size(y))))])
2
ECE382/ME482 Fall 2008
Homework 3 Solution
October 20, 2008
3
ymax = max(y);
yss = y(max(size(y)));
disp([’Percent Overshoot: ’,num2str( (ymax-yss)/yss )])
ts2p = 0;
for index = max(size(t)):-1:1
if ts2p == 0,
if abs( (y(index)-yss)/yss ) > 0.02,
ts2p = t(index+1);
end;
end;
end;
disp([’Max Value of y(t): ’,num2str(max(y))])
disp([’Steady State Value of y(t):
’,num2str(y(max(size(y))))])
disp(’ ’)
disp(’Reduced Order System:’)
tofs2 = tf(5*[1 3],7*[1 8 36])
omnz = 8/2
zeta = omnz/sqrt(36)
y2max = max(y2);
y2ss = y2(max(size(y2)));
disp([’Percent Overshoot: ’,num2str( (y2max-y2ss)/y2ss )])
ts2p2 = 0;
for index = max(size(t)):-1:1
if ts2p2 == 0,
if abs( (y2(index)-y2ss)/y2ss ) > 0.02,
ts2p2 = t(index+1);
end;
end;
end;
disp([’Max Value of y2(t): ’,num2str(max(y2))])
disp([’Steady State Value of y2(t):
’,num2str(y2(max(size(y2))))])
disp([’2-percent settling time: ’,num2str(ts2p2)])
disp([’Expected settling time: ’,num2str(4/omnz)])
disp([’Expected Percent Overshoot: ’,num2str(100*exp((-pi*zeta)/sqrt(1-zeta^2)))])
print -deps ps3p1c.eps
(c) Use Matlab to plot the response of the actual system and the second order system
on the same (properly labelled) plot.
Solution: The plot that was generated by the script above is shown in Figure 1c.
(d) Now, consider
T (s) =
Y (s)
5(s + 3)
=
,
R(s)
(s + ω)(s2 + 8s + 36)
(4)
select an ω such that the criterion in the text is satisfied. Plot the response of the
original and second order systems for this case.
ECE382/ME482 Fall 2008
Homework 3 Solution
October 20, 2008
4
Problem 1: Step Response Comparison
0.09
Original System
Reduced Order System
0.08
0.07
0.06
y(t)
0.05
0.04
0.03
0.02
0.01
0
0
0.5
1
1.5
2
2.5
t
3
3.5
4
4.5
5
ECE382/ME482 Fall 2008
Homework 3 Solution
October 20, 2008
5
Solution: The criterion in the text is
|1/γ| ≥ 10|ζωn |
where 1/γ is the ω that we are asked to find. Thus we need omega ≥ 40 so let’s choose
ω = 50. In order to get the same yss we’ll have to multiply the transfer function by
50. The step responses are compared in Figure 1d
Problem 1(d): Step Response Comparison
0.014
Original System
Reduced Order System
0.012
0.01
y(t)
0.008
0.006
0.004
0.002
0
0
0.5
1
1.5
2
2.5
t
3
3.5
4
4.5
2. Consider a unity negative feedback system with forward path (open loop) transfer function
G(s) =
K(s2 + 120s + 110)
.
s2 + 8s + 7
(5)
Find the gain K that minimizes the damping ratio of the closed loop system poles and
indicate the resulting damping ratio.
5
ECE382/ME482 Fall 2008
Homework 3 Solution
October 20, 2008
6
Solution: The closed loop transfer function will be
G(s)/(1 + G(s)) =
=
K(s2 + 120s + 110)
s2 + 8s + 7 + K(s2 + 120s + 110)
K(s2 + 120s + 110)
.
(1 + K)s2 + (8 + 120K)s + 7 + 110K
(6)
(7)
Thus the damping ratio is
ζ=
8 + 120K
1+K
s
1+K
7 + 110K
1
2
=
8 + 120K
p
2 (1 + K)(7 + 110K)
!
.
(8)
We then must solve dζ/dK = 0 for K ∗ . After some algebra,
dζ
2(1535K + 93)
,
=p
dK
(110K + 7)3 (K + 1)
(9)
so K ∗ = −93/1535. To verify that we have minimized as opposed to maximized
ζ we
√
2
2
compute d ζ/dK |K=K ∗ which turns out to be positive, indicating that ζ = 8 70/103 ∼
=
0.65 is the minimal damping ratio.
3. Consider the unity negative feedback system with forward path (open loop) transfer function
K
15
Ga (s)Gd (s) =
.
(10)
s+7
s(s + 3)
(This is a simple model of an aircraft aileron actuator and airplane dynamics.)
(a) Find the closed loop transfer function.
Solution: The closed loop transfer function will be
15K
Ga (s)Gd (s)
=
.
1 + Ga (s)Gd (s)
s(s + 3)(s + 7) + 15K
(11)
(b) Find a value of K for which the system has 3 real roots; a value for which the system
has a complex conjugate pair; and a value for which the behavior of the system can
be approximated using the concept of dominant roots.
Solution: The characteristic equation is
s(s + 3)(s + 7) + 15K = s3 + 10s2 + 21s + 15K.
(12)
Suppose that we would like (s + 1) to be a factor of the characteristic equation. Then
by long division
(s3 + 10s2 + 21s + 15K)/(s + 1) = s2 + 9s + 12 + (15K − 12)/(s + 1)
(13)
Let’s start by selecting a real root and then checking the others. If we let K =
12/15 = 4/5 we then have s = −1 as one root. The other two are
√
√
−9 ± 33
−9 + 81 − 48
=
(14)
s=
2
2
ECE382/ME482 Fall 2008
Homework 3 Solution
October 20, 2008
7
which are also real.
Next, we examine the characteristic equation again and see that to get complex
conjugate roots we should decrease the value of the coefficient of s1 or increase the
value of the coefficient of s0 in (15). To do this we increase the magnitude of the real
root, we try a few values before obtaining
(s3 + 10s2 + 21s + 15K)/(s + 8) = s2 + 2s + 19 + (15K − 19)/(s + 8)
(15)
√
where 4 − 76 will result in a pair of complex conjugate roots. For this we need
K = 19/15 and obtain the complex conjugate pair
√
√
√
−4 ± j 72
−4 + 4 − 76
=
= −2 ± j 18.
s=
(16)
2
2
To find a value of K such that (s + η) is a factor of the characteristic equation and
|η| ≥ 10|ζωn we first observe that the previous value of K doesn’t achieve this because
4 6≥ 10. This tells us that we need to continue increasing η to obtain an acceptable
value. Let’s take η = 20 to obtain
(s3 + 10s2 + 21s + 15K)/(s + 20) = s2 − 10s + 31 + (15K − 31)/(s + 20)
(17)
which requires K = 31/15.
(c) For this last value of K, calculate the expected peak time and overshoot.
(d) Plot the actual response and the predicted response.
(e) Find a value of K for which the peak time is reduced by 1/3 (i.e. new peak time is
2/3 of old peak time) if this is possible.
4. Write a Matlab script to generate the plot of transient response of a second order system
for a range of values of ζ as is done in the text (p. 282 of 11th edition). Properly label
the resulting plot. (You must turn in both the script and the plot.)
Solution: The plot is shown in Figure 4. The Matlab script used to generate the plot
was:
figure(4)
t = [0:.01:30]’;
y = zeros(max(size(t)),6);
zetas = [0.1,0.2,0.4,0.7,1,2]
for index = 1:6
y(:,index) = step(tf([1],[1 2*zetas(index) 1]),t);
end;
plot(t,y(:,1),t,y(:,2),t,y(:,3),t,y(:,4),t,y(:,5),t,y(:,6))
title(’Second Order Step Response’)
xlabel(’Normalized Time \omega_n t’)
ylabel(’y(t)’)
legend(’\zeta = 0.1’,’\zeta = 0.2’,’\zeta = 0.4’,’\zeta = 0.7’,...
’\zeta = 1 ’,’\zeta = 2 ’)
grid
print -depsc ps3p4.eps
ECE382/ME482 Fall 2008
Homework 3 Solution
October 20, 2008
8
Second Order Step Response
1.8
ζ = 0.1
ζ = 0.2
ζ = 0.4
ζ = 0.7
ζ=1
ζ=2
1.6
1.4
1.2
y(t)
1
0.8
0.6
0.4
0.2
0
0
5
10
15
Normalized Time ωn t
20
25
30
ECE382/ME482 Fall 2008
Homework 3 Solution
October 20, 2008
9
5. For ζ = 0.2, plot (on the same graph) the step response of a second order system for the
following values of ωn : 1/2, 1, 2, 4, 8 rad/sec. (You must turn in both the script and the
properly labelled plot.)
Solution: The plot is shown in Figure 5. The Matlab script used to generate the plot
Second Order Step Response
1.6
1.4
1.2
y(t)
1
0.8
ωn = 1/2
0.6
ωn = 1
0.4
ωn = 2
ωn = 4
0.2
ωn = 8
0
0
5
10
15
20
25
Time t
was:
figure(5)
t = [0:.01:25]’;
y = zeros(max(size(t)),6);
zet = 0.2
omegas = [1/2,1,2,4,8]
for index = 1:5
y(:,index) = step(tf([omegas(index)^2],[1 2*zet*omegas(index) omegas(index)^2]),t);
ECE382/ME482 Fall 2008
Homework 3 Solution
October 20, 2008
end;
plot(t,y(:,1),t,y(:,2),t,y(:,3),t,y(:,4),t,y(:,5))
title(’Second Order Step Response’)
xlabel(’Time t’)
ylabel(’y(t)’)
legend(’\omega_n = 1/2’,’\omega_n = 1 ’,’\omega_n = 2
’\omega_n = 8 ’)
grid
print -depsc ps3p5.eps
’,’\omega_n = 4
10
’,...
Download