aa
Example Problems and Solutions 247
MATLAB Program 5–23
num = [5];
den = [1 1 5];
t = 0:0.05:10;
r = 2+t;
c = lsim(num,den,r,t);
plot(t,r,'-',t,c,'o')
grid
title('Response to Input r(t) = 2 + t')
xlabel('t Sec')
ylabel('Output c(t) and Input r(t) = 2 + t')
Response to Input r(t) = 2 + t
t Sec
012345678910
Output
c(
t) and Input
r(
t) = 2 +
t
12
0
4
2
6
8
10
Figure 5–61
Response to input
r(t)=2+t.
2
s(s + 1)
R(s) C(s)
+
−
Figure 5–62
Control system.
Solution.A possible MATLAB program is shown in MATLAB Program 5–23. The resulting
response curve, together with a plot of the input function, is shown in Figure 5–61.
A–5–14. Obtain the response of the system shown in Figure 5–62 when the input r(t)is given by
[The input r(t)is the unit-acceleration input.]
r(t)=
1
2
t^2