DSP Format Discrete Transfer Function Matlab

1 visualización (últimos 30 días)
Si Bennett
Si Bennett el 28 de En. de 2022
Respondida: Paul el 28 de En. de 2022
Hi,
If I have a discrete transfer function, defined using sys = filt(num,den)
In Matlab, how to I plot the response of the filter.
Can freqz be used? If so, how do I pass the filt(num,den) to freqz to obtain the bode diagram?
Thank you

Respuesta aceptada

Paul
Paul el 28 de En. de 2022
You can use freqz() if you want, Because filt() returns a tf object from the Control System Toolbox, bode() or bodeplot() functions in that toolbox can also be used
num = [1 2];
den = [1 2 3 4];
sys = filt(num,den);
w = logspace(-2,pi,100);
[m,p] = bode(sys,w);
figure
subplot(211);
semilogx(w,db(squeeze(m)));
subplot(212)
semilogx(w,180/pi*angle(exp(1j*squeeze(p*pi/180))))
h = freqz(sys.num{:},sys.den{:},w);
figure;
subplot(211);
semilogx(w,db(abs(h)));
subplot(212);
semilogx(w,angle(h)*180/pi)

Más respuestas (0)

Categorías

Más información sobre Dynamic System Models en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by