0% found this document useful (0 votes)
43 views2 pages

Experiment # 7: Theory: ( (%% Graph of Response of Second Order System For Unit Step Input and Definition of

The document describes an experiment to write a MATLAB code to calculate the rise time, peak time, peak overshoot, and settling time of a second order system for a unit step input. The MATLAB code prompts the user to input the natural frequency and damping coefficient, then calculates and displays the rise time, peak time, and maximum overshoot based on the user input values. When example values of 6 for the natural frequency and 0.5 for the damping coefficient are used, the output rise time is 0.40307 seconds, peak time is 0.6046 seconds, and maximum overshoot is 16.3034%.

Uploaded by

Varun
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
43 views2 pages

Experiment # 7: Theory: ( (%% Graph of Response of Second Order System For Unit Step Input and Definition of

The document describes an experiment to write a MATLAB code to calculate the rise time, peak time, peak overshoot, and settling time of a second order system for a unit step input. The MATLAB code prompts the user to input the natural frequency and damping coefficient, then calculates and displays the rise time, peak time, and maximum overshoot based on the user input values. When example values of 6 for the natural frequency and 0.5 for the damping coefficient are used, the output rise time is 0.40307 seconds, peak time is 0.6046 seconds, and maximum overshoot is 16.3034%.

Uploaded by

Varun
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 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.

You might also like