FIR frequency response using the FFT

The frequency response of a finite impulse response filter can be efficiently computed as a Fast Fourier Transform. Without loss of generality, we consider a causal FIR filter, with impulse response \(h[n] \) non-zero in \([0, N-1]\). With \(\mathbf h^N = (h[0], \ldots, h[N-1])\) the vector holding the non-zero coefficients of the impulse response, the DFT \(\mathbf H^N\) of \(\mathbf h^N\) yields samples of the frequency response of the filter: \[\mathbf H^N_k = H\left(\frac{k}{N}\right) \mbox{ pour } 0 \leq k < N.\]

The sampling of the frequency response is too coarse for a faithful plot of the frequency response. Zero-padding can be used. It consists of computing the DFT of \(\mathbf h^L = (h[0], \ldots, h[N-1], 0, \ldots, 0) \) of length \(L > N\). We get a finer sampling of the frequency response: \[\mathbf H^L_k = H\left(\frac{k}{L}\right) \mbox{ pour } 0 \leq k < L.\]

We can then center the plot around the origin to highlight the symmetry of the frequency response of a filter with real coefficients: \(H(-\nu) = H(\nu)^\star\).


FFt shift: