Info

この質問は閉じられています。 編集または回答するには再度開いてください。

multistage filter with simulink model

1 回表示 (過去 30 日間)
Sergey Dubrovin
Sergey Dubrovin 2020 年 4 月 5 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
Sergey Dubrovin
Sergey Dubrovin 2020 年 4 月 15 日
Is this something this society can help with?

回答 (1 件)

Elady
Elady 2021 年 7 月 1 日
編集済み: Elady 2021 年 7 月 1 日
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