How to plot this model in MATLAB script
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have an output error model: y(t)=(0.006559z^-1 - 0.005439z^-2)/(1-1.893z^-1 + 0.8988z^-2) u(t) How would this be plotted using a MATLAB script? I assume it would involve using vectors to represent t and u, but am unsure how the equation would be represented.
0 Commenti
Risposte (1)
Star Strider
il 14 Apr 2017
You need to use the Control System Toolbox tf function (supply the correct sampling interval to get the correct plots):
% % H(z) = (0.006559z^-1 - 0.005439z^-2)/(1-1.893z^-1 + 0.8988z^-2)
Ts = -1; % Unknown Sampling Time Interval = ‘-1’
num = [0 0.006559 -0.005439];
den = [1 -1.893 0.8988];
sys = tf(num, den, Ts, 'Variable','z^-1'); % Create System Object
figure(1)
bode(sys)
This plots the Bode plot. You can plot others once you create the system object. You can also convert to other forms, such as state-space. See the documentation on the various functions for details.
0 Commenti
Vedere anche
Categorie
Scopri di più su Response Computation and Visualization in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!