design_fir_half_band
Half-band FIR design.
Namespace: dsp::filter
Prototype
Vecf design_fir_half_band(int n, float fc)
Parameters
n | Filter order (must be odd). |
fc | -3 dB cutt-off frequency (amplitude = \(1 / \sqrt(2)\)). |
Returns
Coefficients vector of the FIR filter (vector of length n)
Description
The design is based on: A “TRICK” for the Design of FIR Half-Band Filters, P. P. VAIDYANATHAN AND TRUONG Q. NGUYEN, 1987.
Note that in all cases, the frequency at which the amplitude is 0.5 will always be 0.25 (symétry around \(f_s/4\)).
The filter order \(n\) must be odd. Besides, except for the central coefficient, one coefficient every two is null. That's why, if \(m=(n-1)/2\) is event, then the first and last coefficient will be necessarily null (and useless for computations).