Step function returning NaN values.

T = A(i,1);
K = A(i,2);
if T==0
T=0.001;
end
s = tf('s');
X= ((-1*s^3)+(-1.533*10e-17*s^2)+(0.0001996*s)+9.227*10e-22)/((s^5)+(-2.602*10e-18*s^4)+(0.00378*s^3)+(6.935*10e-21*s^2)+(1.267*10e-6*s));
Y= 0;
Z= ((-0.01994*s^2)+(-3.174*10e-5))/((s^5)+(-2.602*10e-18*s^4)+(0.00378*s^3)+(6.935*10e-21*s^2)+(1.267*10-6*s));
num=[(0.6*(T^2)*K) 4.8*K*T 9.6*K];
den=[8*T 0];
tfPID=tf(num,den);
itf=X+Y+Z;
jtf=itf*tfPID;
ftf=jtf/(1+jtf);
step(ftf);
dt = 20;
t = 0:dt:800;
e = 1 - step(ftf,t);
H = sum(t'.*abs(e)*dt);
My step function, for varying values of T and K, is giving nan values.I made sure that denominator does not become zero. This is affecting my values in H. How to avoid this? Please help.

回答(0 个)

此问题已关闭。

产品

关闭:

2018-3-10

Community Treasure Hunt

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

Start Hunting!

Translated by