cic_analysis

This function computes and shows the frequency response of a CIC filter and then analyse the aliasing that occurs after decimation.

Calling sequence

cic_analysis(R, N, M, Fin)
[h,nbits] = cic_analysis(R, N, M, Fin)

Parameters

R:

Decimation ratio

N:

Number of integrators / differentiators

M:

Design parameter (typically M=1)

Fin:

Input sample frequency

h:

Theorical transfert function (not taking into account the decimation)

bits:

Number of additionnal bits needed to implement the CIC filter

Description

This functions draws two plots:

  • The first plot shows the frequency response before decimation (both the global one, and one centered on the passband).

  • The second plot shows the effect of the decimation (aliasing in the baseband).

Also, this function computes the number of additionnal bits needed to implement the filter in fixed point / integer arithmetic. This is computed as (see http://www.tsdconseil.fr/log/scriptscilab/cic/cic-en.pdf):

Example

// 10 MHz input sample frequency
Fin = 10e6;
// Decimation ratio = 16, 5 CIC stages
// (sample rate at output of CIC is 10 MHz / 16 = 625 KHz)
R = 16, N = 5, M = 1;
cic_analysis(R, N, M, Fin);

Frequency response of a CIC filter, before decimation

Frequency response of a CIC filter, and aliasing, after decimation


See also