Decimate signal using cascaded integrator-comb filter — optimized for HDL code generation
The dsp.HDLCICDecimation
System object™ decimates an input signal by using a cascaded integrator-comb (CIC) decimation
filter. CIC filters are a class of linear phase FIR filters consisting of a comb part and an
integrator part. The CIC decimation filter structure consists of N sections
of cascaded integrators, a rate change factor of R, and then
N sections of cascaded comb filters. For more information about CIC
decimation filters, see Algorithms.
The System object supports fixed and variable decimation rates for scalar inputs and only fixed decimation for vector inputs. For both types of inputs, the System object provides a scalar output. The System object provides an architecture suitable for HDL code generation and hardware deployment.
The System object supports real and complex fixed-point inputs.
To filter input data with an HDL-optimized CIC decimation filter:
Create the dsp.HDLCICDecimation
object and set its properties.
Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?.
creates an
HDL-optimized CIC decimation filter System object, cicDecFilt
= dsp.HDLCICDecimationcicDecFilt
, with default properties.
creates the filter with properties set using one or more name-value pairs. Enclose each
property name in single quotes.cicDecFilt
= dsp.HDLCICDecimation(Name,Value
)
[
filters the input data using the specified variable decimation factor,
dataOut
,validOut
] = cicDecFilt(dataIn
,validIn
,decimFactor
)decimFactor
. The VariableDownsample
property
must be set to true
.
[
filters the input data when dataOut
,validOut
] = cicDecFilt(dataIn
,validIn
,decimFactor
,reset
)reset
is false
and
clears filter internal states when reset
is true
.
The System object expects the reset
argument only when you set the
ResetIn property
to true
. The VariableDownsample
property is set to
true
.
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
[1] Hogenauer, E. “An Economical Class of Digital Filters for Decimation and Interpolation.” IEEE Transactions on Acoustics, Speech, and Signal Processing 29, no. 2 (April 1981): 155–62. https://doi.org/10.1109/TASSP.1981.1163535.
dsp.CICCompensationDecimator
| dsp.CICCompensationInterpolator
| dsp.CICDecimator
| dsp.CICInterpolator