Doubt with stepinfo. Matlab file and program attached

1 view (last 30 days)
Please find attached the code
sys = fotf([0.08 1.88 0],[2 1 0],[1.8],[0]);
pidi = fotf([1 0],[x(4) 1],[x(3) x(1) x(2)],[x(4)+x(5) x(4) 0]);
sysnew = sys*pidi;
final = feedback(sysnew,1);
%finalWithoutPID = tf([0.01125],[0.0005 0.01175 0.01125]);
time = 0:0.1:10;
[y,t]=step(oustapp(final,10^(-6),10^(6),6,'oust'));
% step(final);
ac =stepinfo(y,t,1)
step(final)
x is a 5 dimensional value to be taken from variable BestmPosn of 1fractry.mat whhich is also attached here. I need to find Overshoot, Rise Time and Settling time for all the 100 values and store them and find their mean, variance,etc. The problem here is that when I run the attached code to find Overshoot(along with rise and settling time), sometime it gives correct values of these parameters and sometimes incorrect values. Why is this happening?
For example for the 1st value of the variable BestmPosn is sometimes giving overshoot of 0.6629 which is clearly wrong. But sometimes it gives correct values too. I am at loss to understand why is this happening. Please tell how should I rectify it?

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!