Frequency response of a CIC filter.

Namespace: dsp::filter

Prototype

Vecf cic_freq(const CICConfig &config, const Vecf &f)

Parameters

configMain parameters of the CIC filter (see CICConfig)
fnormalized frequency, between -0.5 and 0.5 (can be a 1d vector)

Returns

mag Output magnitude, computed at each frequency point

Description

This function computes the CIC frequency response (in magnitude) at the specified normalized frequencies \(f_k\). The magnitude is computed as: \[ \left|H(f)\right| = \left|\frac{\sin(RM \pi f)}{RM\sin \pi f}\right|^N \]

Example

R = 4, N = 8, M = 1;
f = linspace(0,0.5,512);
mag = cic_freq(R,N,M,f);
clf(); plot(f,mag2db(mag));

See also

cic_transfert