Question: Problem Description Use a script to calculate the peak time of the step response of a second-order system of the shown form for a range
Problem Description
Use a script to calculate the peak time of the step response of a second-order system of the shown form for a range of zero values (where the zero = -1/T).
(T*s + 1)/(s^2 + 2*zeta*wn + wn^2)
Instructions
To solve this problem, modify the solution template by adding formulas for calculating the peak time ( tp ) of the given transfer function's step response for a given vector of parameters T where each element of the vector ( T(i) ) corresponds to the transfer function having a single zero at -1/T(i). The variable tp that is returned should be a vector where each element is the peak time for the corresponding element in the vector T. You may assume that parameters of the transfer function ( zeta and wn ) are available for your calculations and that the system is underdamped (0 < zeta < 1) and wn > 0.
You may find the MATLAB function stepinfo helpful.
Solution
% Using the parameters of the given second-order system, calculate the peak time % of the step response for the given set of zeros (based on the vector T). The % given transfer function has the following form: % % (T*s+1)/(s^2 + 2*zeta*wn*s + wn^2) % % available variables: % % T = vector of time constants for the zero % zeta = damping ratio (should be between 0 and 1) % wn = (undamped) natural frequency (should be greater than 0)
% First verify the values of the damping coefficent and natural frequency if (zeta >= 1) || (zeta <= 0) msg = 'expecting the system to be underdamped'; error(msg) end
if (wn <= 0) msg = 'expecting wn > 0'; error(msg) end
% Calculate the peak time of the step response for each element of the T vector. % You may find the command 'stepinfo' helpful. for i = 1:length(T) tp(i) = end %for
tp
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
