Question 2.9.1: Step Response of a Second-Order Model Consider the following...
Step Response of a Second-Order Model
Consider the following model:
\frac{X(s)}{F(s)}=\frac{cs+5}{10s^2+cs+5}
a. Plot the unit-step response for c = 3 using the time span selected by MATLAB.
b. Plot the unit-step response for c = 3 over the range 0 ≤ t ≤ 15.
c. Plot the unit-step responses for c = 3 and c = 8 over the range 0 ≤ t ≤ 15. Put the plots on the same graph.
d. Plot the step response for c = 3, where the magnitude of the step input is 20. Use the time span selected by MATLAB.
The MATLAB programs are shown below for each case.
a. This illustrates the use of the step function in its most basic form.
sys1 = tf([3,5],[10,3,5]);
step(sys1)
The plot is shown in Figure 2.9.1.
b. This illustrates how to use a user-selected time span and spacing.
sys1 = tf([3,5],[10,3,5]);
t = 0:0.01:15;
step(sys1,t)
The plot is shown in Figure 2.9.2.
c. This illustrates how to plot two responses on the same graph.
sys1 = tf([3,5],[10,3,5]);
sys2 = tf([8,5],[10,8,5]);
t = 0:0.01:15;
step(sys1,sys2,'–',t),gtext('sys1'),gtext('sys2')
The plot is shown in Figure 2.9.3. The gtext function lets you place labels on the plot.
d. This illustrates how to obtain the response when the magnitude of the step input is not unity. The output of the step(sys1) function is for a unit-step input, and so it must be multiplied by 20. This multiplication can be performed within the plot function.
sys1 = tf([3,5],[10,3,5]);
[y, t] = step(sys1);
plot(t,20*y),xlabel('t'),ylabel('x(t)')
The plot is shown in Figure 2.9.4.



