Difference in sample time of discrete model and input
Afficher commentaires plus anciens
I was going through the algorithms on how MATLAB evaluates convolution in CT system. Example code given on MATLAB is
w2 = 62.83^2;
h = tf(w2,[1 2 w2]);
dt = 0.016;
ts = 0:dt:5;
us = (rem(ts,1) >= 0.5);
hd = c2d(h,dt);
lsim(hd,us)
In the above example sample time of input and TF are the same. I have removed ts from lsim because it was making no difference in this case. So in the output I got 313 samples.
w2 = 62.83^2;
h = tf(w2,[1 2 w2]);
dt = 0.016;
ts = 0:0.02:5;
us = (rem(ts,1) >= 0.5);
hd = c2d(h,dt);
lsim(hd,us)
In the above code sample time of input and TF are different. If i put Ts then it gave an error but when I removed it worked fine. So in the output I had 250 samples. Some of the starting samples matched also.
So my question is how the matlab calculates output in 2nd case ??
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Dynamic System Models dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!