Calculating Performance Metrics of Second-Order Systems Using MATLAB

Calculating Performance Metrics of Second-Order Systems Using MATLAB

Input the transfer function of a second-order system to output the system’s rise time, peak time, maximum overshoot, and settling time. % Transfer function coefficients num1=[0 0 16]; den1=[1 5 16]; timeStep1=0.001; t1=0:timeStep1:10; [y1,x1,t1]=step(num1,den1,t1); i1=1; while y1(i1)<1.0001 i1=i1+1;end % Rise time riseTime=(i1-1)*timeStep1; [yMax1,tPeak1]=max(y1); % Peak time timePeak1=(tPeak1-1)*timeStep1; % Maximum overshoot overShoot1=yMax1-1; Len1=length(t1); k1=Len1; while y1(k1)>0.98 … Read more