aaExample Problems and Solutions 247MATLAB 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 + tt Sec012345678910Outputc(t) and Inputr(t) = 2 +t120426810Figure 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