How do I properly use the Cascaded integrator-comb (CIC) filter in the cascade filter structure to filter a signal in Filter Design Toolbox 3.0 (R14)?

4 次查看(过去 30 天)
There are four CIC filters, namely, MFILT.CICDECIM, MFILT.CICDECIMZEROLAT, MFILT.CICINTERP, and MFILT.CICINTERZEROLAT. I would like to include any one of these CIC filters in the cascade filter that I am going to construct.

采纳的回答

MathWorks Support Team
Currently, the CIC filters only work with the built-in signed integer data types such as INT8, INT16, and INT32.
The CIC filter must come first in the cascade. The following code shows how the code should be written:
L = 7; % variable interpolation factor
N = 4; % number of stages
hcic = mfilt.cicinterp(L,1,N);
dcGain = L*gain(hcic);
hscalar = dfilt.scalar(1/dcGain);
hscalar.Arithmetic = 'fixed';
Hcas = cascade(hcic,hscalar); % Note that the CIC comes first
x = randn(1,64);
y = filter(Hcas,int16(x));
Please note that the CIC filter (hcic) must come first in the cascade. The reason is that output of the CIC filter is an INT16 in this case and the hscalar filter can interpret that data type. In Filter Design Toolbox 3.0 (R14) the CIC filters do not work with the output that is an embedded.fi object. In this example, the output of the hscalar filter is an embedded.fi object.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Filter Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by