cic_analyse

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

Espace de nom : tsd::filtrage

Prototype

CICAnalyse cic_analyse(const CICConfig &config, float Fe, float Fint=0)

Paramètres

configParamètres principaux (voir CICConfig)
FeFréquence d'échantillonnage d'entrée
FintFréquence où mesurer l'atténuation

Retourne

A tuple with :

  • Theorical transfert function (not taking into account the decimation),
  • 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): \[n_{bits} = N\cdot\log_2(R) - 1\]

Exemple

// 10 MHz input sample frequency
fe = 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_analyse({R, N, M}, fe);

Voir aussi

design_cic()