Engee documentation

CIC Decimation

Signal decimation using a cascaded integral comb filter.

cic decimation

Description

Block CIC Decimation performs the reduction of the sampling frequency (decimation) of the input signal by an integer factor. Cascade CIC filters are a class of linear phase FIR filters consisting of cascaded comb filters and integrators.

The block supports real and complex fixed-point input signals. In normal operation of the block CIC Decimation when the adders overflow, a cyclic carry is performed, where the counting continues from the minimum value at the top overflow and the maximum value at the bottom overflow. For details see 1 and 3. Overflow does not affect further signal processing.

Ports

Output

# OUT_1 — decimated output signal
vector | matrix

Details

The output signal decimated by the CIC filter and returned as a vector or matrix. The type of output data is determined by the block parameter settings. Complexity of output data corresponds to the complexity of input data.

The number of output lines is equal to , where is the decimation factor and is the number of input lines.

Data types

Int8 | Int16 | Int32 | Int64 | Fixed-point

Complex numbers support

Yes

Input

# IN_1 — input signal
vector | matrix

Details

An input signal specified as a vector or matrix. The number of rows of the input signal must be a multiple of the decimation factor.

Data types

Int8 | Int16 | Int32 | Int64 | Fixed-point

Complex numbers support

Yes

Parameters

Main

# Coefficient source — filter information source
Dialog parameters

Details
  • Dialog parameters - input of information about the filter in the block dialogue window. For example, through the parameters Decimation factor (R), Differential delay (M) and Number of sections (N).

Values

Dialog parameters

Default value

Dialog parameters

Program usage name

CoefficientSource

Tunable

No

Evaluatable

No

# Decimation factor (R) — decimation factor
Real number

Details

The decimation factor of a filter, specified as an integer greater than 1.

Default value

2

Program usage name

DecimationFactor

Tunable

No

Evaluatable

Yes

# Differential delay (M) — differential delay
Real number

Details

Set the differential delay of the comb filter, , as a positive integer.

Default value

1

Program usage name

DifferentialDelay

Tunable

No

Evaluatable

Yes

# Number of sections (N) — number of filter sections
Real number

Details

Specify the number of filter sections. The number specified specifies both the number of sections in the comb filter and the number of integrators, but not these values combined.

Default value

2

Program usage name

NumberOfSections

Tunable

No

Evaluatable

Yes

# Data type specification mode — method of specifying word length and fractional length of fixed-point numbers for filter and output sections
Full precision

Details

A method of specifying word length and fractional part length of fixed point numbers for filter and/or output sections, said as:

  • Full precision - word lengths and fixed-point fractional part lengths for the filter and output sections are automatically selected. The word lengths of the output signal/output and last section ( ) are set as:

where

  • - is the word length of the input signal;

  • - differential delay;

  • - number of sections;

  • - interpolation coefficient.

The word lengths of the other sections are set taking into account bit growth as described in Hogenauer’s work. The lengths of all fractional parts are set equal to the fractional part of the input signal.

Values

Full precision

Default value

Full precision

Program usage name

SpecificationMode

Tunable

No

Evaluatable

No

# Rate options — signal processing mode
Enforce single-rate processing

Details

The input signal processing mode specified as:

  • Enforce single-rate processing - the unit retains the sampling frequency of the input signal.

Values

Enforce single-rate processing

Default value

Enforce single-rate processing

Program usage name

RateOptions

Tunable

No

Evaluatable

No

Optional

*CIC filter

CIC-filters are an optimised class of linear phase FIR filters consisting of cascaded comb filters and integrators.

Conceptually, a decimation CIC filter is a CIC filter, , which is a low-pass reconstruction filter that performs filtering without changing the sampling rate, followed by a downsampling element. The block CIC Decimation reduces the sampling rate of the input signal by an integer factor using a cascaded integral comb filter (CIC).

cic interpolation 1

In a more efficient implementation of the CIC filter, operating without changing the sampling rate, is decomposed into multipliers in this way:

where

  • - is the transfer function of the cascade of integrators;

  • - transfer function of sections of the cascade of comb filters, each of which has a width of ;

  • - number of sections. The number of sections in a CIC filter is defined as the number of sections in either the comb part or the integrator part of the filter. This value does not reflect the total number of sections in the entire filter;

  • - decimation factor;

  • - differential delay.

In an algorithm that provides full multirate filtering, two remarkable identities for interpolation are taken into account, which allow the operation of changing the sampling rate ® to be moved behind a cascade of N comb filters without distorting the result of the operation.

The transfer function of the resulting filter is given by the following equation:

For a block diagram showing the multirate implementation, see the section Algorithms.

Algorithms

*Decimation CIC filter.

The decimation CIC filter is implemented as a cascade of integrators, followed by an element of downsampling the signal by a factor of R, and then a cascade of N comb filters.

cic interpolation 2

The diagram shows a cascade of integrators with two sections and a cascade of comb filters, also consisting of two sections. The unit delay in the CIC filter integrators can be located in either the forward or feedback circuit. These two configurations give identical frequency characteristics of the filter. However, the actual numerical sequences at the output for these two configurations will be different due to the influence of the delay. In this algorithm, the unit delay is placed in the forward path of the integrator, as this configuration is preferred for HDL implementations.

References

  1. 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.

  2. Meyer-Baese, U. "Digital Signal Processing with Field Programmable Gate Arrays." New York: Springer Verlag, 2001.

  3. Harris, Fredric J., "Multirate Signal Processing for Communication Systems." Upper Saddle River, NJ: Prentice Hall PTR, 2004.