Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Step function returning NaN values.

2 visualizzazioni (ultimi 30 giorni)
Pulkit Sharma
Pulkit Sharma il 10 Mar 2018
Chiuso: Stephen23 il 10 Mar 2018
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.

Risposte (0)

Questa domanda è chiusa.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by