Problem Description Use a script to calculate the overshoot of the step response
ID: 2081116 • Letter: P
Question
Problem Description
Use a script to calculate the overshoot of the step response of a standard second-order underdamped system of the shown form for a range of damping coefficients, zeta.
1/(s^2 + 2*zeta*s + 1)
Instructions
To solve this problem, modify the solution template by adding formulas for calculating the maximum percent overshoot ( Mp ) of the given transfer function's step response for a given vector of damping coefficients zeta in the corresponding order. The variable Mp that is returned should be a vector where each element is the maximum percent overshoot for the corresponding damping coefficient in the the vector zeta. Further, the elements of Mp should be in decimal form such that "1" corresponds to 100% maximum overshoot. You may assume that all elements of zeta take values between 0 and 0.7.
Please do not employ the MATLAB function stepinfo.
Solution
% Using the parameters of the given underdamped second-order system (2 complex poles,
% no zeros), calculate the maximum percent overshoot of the step response for the given
% set of damping coefficients, zeta. The given transfer function has the following form:
%
% 1/(s^2 + 2*zeta*s + 1)
%
% available variables:
%
% zeta = vector of damping coefficients
% First verify the range of damping coefficents
if (max(zeta) > 0.7) || (min(zeta) < 0)
msg = 'expecting the damping coefficients to be between 0 and 0.7';
error(msg)
end
% Calculate the maximum percent overshoot for each element of the zeta vector
for i = 1:length(zeta)
Mp(i) =
end %for
Mp
Explanation / Answer
close all;
clear all;
clc;
% taking input like [.1 .2 .3 ....]
zeta_=input('enter the values of zeta=');
if (max(zeta_)>.7 || min(zeta_)<0)
msg = 'expecting the damping coefficients to be between 0 and 0.7';
error(msg)
else
for i=1:length(zeta_)
M(i)=exp((-zeta_(i)*pi)/sqrt(1-(zeta_(i))^2));
end
end
%to display maximum overshoot
M
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.