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 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 27 Jun. 2009
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.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by