0% found this document useful (0 votes)
47 views

Hw7 Solutions

The document discusses using MATLAB to analyze the step responses of two systems. It generates step responses for a first-order system and a second-order system. For each system, it plots the step response and finds the rise time and (for the second-order system) the percent overshoot. The rise time for the first-order system is 1.1 seconds, and for the second-order system the rise time is 0.25 seconds and the percent overshoot is 16.2943%.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Hw7 Solutions

The document discusses using MATLAB to analyze the step responses of two systems. It generates step responses for a first-order system and a second-order system. For each system, it plots the step response and finds the rise time and (for the second-order system) the percent overshoot. The rise time for the first-order system is 1.1 seconds, and for the second-order system the rise time is 0.25 seconds and the percent overshoot is 16.2943%.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Use MATLAB to generate the step response of the following systems.

Find the rise time and percent overshoot (if applicable). 20 a. H (s ) = (s + 2) 10 b. H (s ) = 2 s + 10s + 100
% find the step response of the following two systems % first-order system num = [20]; den = [1 2]; tt = 0:0.01:2; figure; subplot(2,1,1); step(num,den,tt); title('Step Response of First-Order System') % second-order system num = [10]; den = [1 10 100]; tt = 0:0.01:2; subplot(2,1,2); step(num,den,tt); title('Step Response of Second-Order System') axis([0 2 0 0.12]);

The rise time and the percent overshoot can be found from the following plots.
Step Response of First-Order System 10 8 Amplitude 6 4 2 0

0.2

0.4

0.6

0.8

1 Time (sec)

1.2

1.4

1.6

1.8

Step Response of Second-Order System 0.12 0.1 0.08 Amplitude 0.06 0.04 0.02 0 0 0.2 0.4 0.6 0.8 1 Time (sec) 1.2 1.4 1.6 1.8 2

Alternatively, we can use more sophisticated MATLAB code to find out the rise times and percent overshoot for us. Type help function_name to learn more about MATLAB functions.
% first-order system num = [20]; den = [1 2]; tt = 0:0.01:2; figure; subplot(2,1,1); step(num,den,tt); [y] = step(num,den,tt); title('Step Response of First-Order System') [I1,J1] = find(y >= 0.1*10); [I2,J2] = find(y >= 0.9*10); tr = tt(I2(1))-tt(I1(1)) % second-order system num = [10]; den = [1 10 100]; tt = 0:0.01:2; subplot(2,1,2); step(num,den,tt); [y] = step(num,den,tt); title('Step Response of Second-Order System') axis([0 2 0 0.12]); [I,J] = find(y >= 0.1); tr = tt(I(1)) y_max = max(y); y_ss = y(end); percent_overshoot = ((y_max - y_ss)/y_ss)*100

Step Response of First-Order System 10 8 Amplitude 6 4 2 0

tr = 1.1 second

0.2

0.4

0.6

0.8

1 Time (sec)

1.2

1.4

1.6

1.8

Step Response of Second-Order System 0.12 0.1 0.08 Amplitude 0.06 0.04 0.02 0 0 0.2 0.4 0.6 0.8 1 Time (sec) 1.2 1.4 1.6 1.8 2

tr = 0.25 second Percent Overshoot = 16.2943%

You might also like