Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

multistage filter with simulink model

1 visualización (últimos 30 días)
Sergey Dubrovin
Sergey Dubrovin el 5 de Abr. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Good day,
I have a multistage filter, that consists of sinc3, two FIRs and one IIR, which I need to get frequency response of. I'm using cascade and freqz commands, however the last stage is represented by a IIR simulink filter, which I cannot use directly in the Matlab workspace.
How can I use this Simulink model into the freqz or fvtool command? I've tried to get transmfer function of it, and insert in the filter object num and dnum, but had not consistent result. Somethink like the reverse 'realizemdl' whould work.
  1 comentario
Sergey Dubrovin
Sergey Dubrovin el 15 de Abr. de 2020
Is this something this society can help with?

Respuestas (1)

Elady
Elady el 1 de Jul. de 2021
Editada: Elady el 1 de Jul. de 2021
Hello,
Since you mentioned that you use a filter cascade, I assume that you are using the DSP Systems Toolbox.
Using MATLAB IIR filter objects (or system objects, see note below) is the way to go here. Given that you have the transfer function, you can use the dfilt IIR filter objects (offered in all cannonical forms, i.e. dfilt.df1, dfilt.df2, dfilt.df1t, or dfilt.df2t). Those can be used with a filter object cascade. Regarding inconsistent results, it's hard to tell without more details.
I am not aware of a tool that takes a Simulink model consisting of a graph of blocks and parses it automatically as an IIR filter (this almost falls into the category of system identification). However, since your model is relatively simple, determining the numerator and denominator should not be too difficult to do by hand.
Last note: I would recommend using System objects instead of filter objects, which are gradually being phased out. That is, use dsp.FIRFilter, dsp.IIRFilter, and dsp.FilterCascade system object. You can use the fvtool() with System objects as well.
Regards,
Elad

Community Treasure Hunt

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

Start Hunting!

Translated by