Sie sind auf Seite 1von 2

Experiment # 7

Aim:- Write down the MATLAB code for calculation of rise time, peak time, peak overshoot
and settling time using MATLAB.

Theory: ((%% graph of response of second order system for unit step input and definition of
terms i.e rise time, peak time , maximum overshoot and expression for each term %%))

Matlab code:

clc
clear all

format short

wn=input('enter the value of natural frequency (in r/s) = ');

del=input('enter the value of damping coefficient = ');

% optional pi = 3.14

x=sqrt(1-del^2);

phi = atan(x/del); % value will be in radian

tr=((pi-phi)/(wn*x));

tp = (pi/(wn*x));

mp = 100*exp(-(pi*del)/x);

disp(['value of Rise time (Tr) is (in Sec) = ',num2str(tr),]);

disp(['value of Peak time (Tp) is (in Sec) = ',num2str(tp),]);

disp(['value of Maximum Overshoot (Mp) is (in %) =


',num2str(mp),]);
>>

enter the value of natural frequency (in r/s) = 6

enter the value of damping coefficient = 0.5

value of Rise time (Tr) is (in Sec) = 0.40307

value of Peak time (Tp) is (in Sec) = 0.6046

value of Maximum Overshoot (Mp) is (in %) = 16.3034

>>

Result: value of Rise time, Peak time and Maximum overshoot are obtained using matlab
code.

Das könnte Ihnen auch gefallen