EngeeDSP.CICInterpolator
Signal interpolation using a cascade integrator-comb filter.
| Library |
|
| Block |
Description
System object EngeeDSP.CICInterpolator interpolates the input signal using a Cascaded comb Integrator (CIC) filter. The structure of the interpolation CIC filter is a cascade of sections of comb filters, followed by a change in the sampling rate by a factor of , and then a cascade of integrator sections. For more information, see Algorithms. Property NumSections sets the number of sections in the CIC filter. Property InterpolationFactor sets the interpolation coefficient .
To interpolate the input signal, follow these steps:
-
Create an object EngeeDSP.CICInterpolator and set its properties.
-
Call the object with arguments as if it were a function.
To learn more about how to work with system objects, see Engee System Objects.
Syntax
Creation
-
cicInterp = EngeeDSP.CICInterpolator()creates a CIC interpolation system object that applies a CIC interpolation filter to the input signal. -
cicInterp = EngeeDSP.CICInterpolator(R,M,N)creates an interpolation CIC system object, which has the InterpolationFactor value setR, for the DifferentialDelay — valueM, and for the property NumSections — the valueN.
-
cicInterp = EngeeDSP.CICInterpolator(___,Name=Value)creates an interpolation CIC objectcicInterpwith the specified propertyName, set to the specified valueValue. You can specify additional arguments as a name-value pair in any order (Name1=Value1,…,NameN=ValueN). Unspecified properties have default values.Example:
# creating a CIC interpolation system object with 4 sections cicInterp = EngeeDSP.CICInterpolator(NumSections = 4)
Using
-
cicInterpOut = cicInterp(input)interpolates the input data using the CIC interpolator.
Arguments
Input arguments
# input — input data
+
vector | the matrix
Details
Input data specified as a vector or matrix.
| Data types |
|
| Support for complex numbers |
Yes |
Output arguments
# cicInterpOut — output of the CIC interpolator
+
vector | the matrix
Details
The interpolated output data returned as a vector or matrix. The size of the output frame is (1 / InterpolationFactor) × input frame size. The complexity of the output data corresponds to the complexity of the input data.
If the input data has an embedded integer or fixed-point data type, the length of the output word and the length of the fraction depend on the fixed-point data type specified using the FixedPointDataType.
full accuracy
If for a property FixedPointDataType value set "Full precision", the following relation is applied:
where
-
— length of the output data word;
-
— the length of the fractional part of the output data;
-
— the length of the input data word;
-
— the length of the fractional part of the input data;
-
— the number of sections in the CIC filter, set by the property NumSections.
Values and they are inherited from the input data passed to the object’s algorithm. For embedded integer input data, the length of the fractional part is 0.
_ Setting the length of the word and the fractional part_
If for a property FixedPointDataType value set "Specify word and fraction lengths", then the length of the word and the length of the fractional part in the output will correspond to the values specified in the properties OutputWordLength and OutputFractionLength.
| Data types |
|
| Support for complex numbers |
Yes |
Features
#
NumSections —
number of integrator and comb filter sections
Int64 integer
Details
The number of integrator sections and the comb CIC filter, set as a positive integer. This number indicates the number of sections in the comb and integrator parts of the filter. The total number of sections in the CIC filter is twice the number of sections specified by this property.
#
FixedPointDataType —
the method of setting fixed-point properties
Symbol
Details
A method for setting fixed-point properties, specified by one of the following values:
-
"Full precision"— the length of the word and the length of the fractional part of the fixed-point numbers for the sections of the CIC filter and the output data of the object are processed with full accuracy.
-
"Specify word and fraction lengths"— specify the length of the word and the length of the fractional parts in the sections of the CIC filter and in the output data of the object using the properties SectionWordLengths, SectionFractionLengths, OutputWordLength and OutputFractionLength.
#
DifferentialDelay —
differential delay of the comb signal sections
Int64 integer
Details
The differential delay value used in each of the comb filter sections is set as a positive integer. For more information, see Algorithms.
# SectionFractionLengths — the lengths of the fractional parts of fixed-point numbers for each filter section
Details
The lengths of the fractional parts of fixed-point numbers used for each filter section, specified as a scalar or vector of integers. The fraction length can be negative or equal to 0 or positive. If you specify a scalar, the value is applied to all sections of the filter. If you specify a vector, its length should be equal to 2 × NumSections.
Dependencies
To use this property, set the FixedPointDataType value "Specify word and fraction lengths".
#
OutputWordLength —
the length of the fixed-point word for the filter output
Int64 integer
Details
The length of the fixed-point word used for the filter output, set as an integer greater than or equal to 2.
Dependencies
To use this property, set the FixedPointDataType value
"Specify word and fraction lengths".
#
OutputFractionLength —
the length of the fixed-point fraction for the filter output
Int64 integer
Details
The length of the fixed-point fraction used for the filter output is set as an integer.
Dependencies
To use this property, set the FixedPointDataType value "Specify word and fraction lengths".
# SectionWordLengths — the length of the fixed-point word for each filter section
Details
The length of the fixed-point word for each filter section, set as a scalar.
The length of the word must be greater than or equal to 2.
This value applies to all filter sections.
Dependencies
To use this property, set the FixedPointDataType value
"Specify word and fraction lengths".
#
InterpolationFactor —
the interpolation coefficient
Int64 integer
Details
The coefficient by which the input signal is interpolated, set as a positive integer.
Additional Info
CIC filter
Details
CIC filters are an optimized class of linear phase FIR filters consisting of comb filters and integrators connected in series.
Conceptually, the interpolation CIC filter is an element of increasing the sampling frequency, followed by a single-frequency CIC filter. , which is a low-pass filter for distortion suppression. The CIC interpolation filter increases the sampling rate of the input signal by an integer factor using a Cascaded comb Integrator (CIC) filter.
In a more efficient implementation, the CIC filter , which operates without changing the sampling rate, is decomposed into factors in this way:
where
-
— transfer function sections of a cascade of comb filters, each of which has a width of ;
-
— the transfer function of the cascade of integrators;
-
— the number of sections. The number of sections in a CIC filter is defined as the number of sections either in the comb part or in the integrating part of the filter. This value does not reflect the total number of sections in the entire filter.;
-
— the interpolation coefficient;
-
— differential delay.
The algorithm that provides full multi-rate filtering takes into account the remarkable identity for interpolation, which allows you to move the operation of changing the sampling frequency. for the cascade of comb filters without distorting the result of the operation.
The transfer function of the resulting filter is given by the following equation:
For a flowchart showing a multi-speed implementation, see Algorithms.
Fixed-point signal
Details
The diagram of fixed-point signals shows the types of data that the object EngeeDSP.CICInterpolator It is used for fixed-point signals.

Here
-
secNT = numerictype(1, secWL, secFL); -
outNT = numerictype(1, outWL, outFL); -
secWL— the length of the section word, set using the SectionWordLengths; -
secFL— the length of the fractional part of the section, set using the SectionFractionLengths; -
outWL— the length of the output word, set using the OutputWordLength; -
outFL— the length of the fractional part of the output word, set using the OutputFractionLength.
The value of the NumSections property in this diagram is 2.
Algorithms
CIC Interpolation filter
Details
The CIC interpolation filter described in the Additional Info section is implemented as a cascade of comb filters, followed by an element of increasing the sampling rate of the signal by a factor of , and then a cascade of integrators.

The diagram shows a cascade of comb filters with two sections and a cascade of integrators, also consisting of two sections. The single delay in the CIC filter integrators can be located in both the forward and feedback circuits. These two configurations produce identical filter frequency characteristics. However, the actual numerical sequences in the output for these two configuration options will be different due to the effect of the delay. In this algorithm, a single delay is placed in the path of the direct line of the integrator, since this configuration is preferable for the HDL implementation.
Literature
-
Hogenauer, E.B. «An Economical Class of Digital Filters for Decimation and Interpolation» IEEE Transactions on Acoustics, Speech and Signal Processing. Vol. 29, Number 2, 1981, pp. 155–162, 1981.
-
Meyer-Baese, U. Digital Signal Processing with Field Programmable Gate Arrays. New York: Springer, 2001.
-
Harris, Fredric J. Multirate Signal Processing for Communication Systems. Indianapolis, IN: Prentice Hall PTR, 2004.