How to plot this model in MATLAB script
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Star Strider
el 14 de Abr. de 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 comentarios
Ver también
Categorías
Más información sobre Response Computation and Visualization en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!