FIR Filter Design by Windowing and the Gibbs Phenomenon

April 11, 2026 · Luciano Muratore

Expanding our study of LTI systems, we now address the practical challenge of implementing ideal filters. While the theoretical models provide perfect frequency separation, their realization in finite-time systems introduces unique mathematical artifacts, most notably the Gibbs phenomenon.

1. The Ideal Lowpass Filter and its Impulse Response

An ideal lowpass filter has a rectangular frequency response, H(ejω)H(e^{j\omega}), which is 11 for frequencies below a cutoff ωc\omega_c and 00 otherwise. The impulse response is calculated via the inverse DTFT:

h[n]=12πωcωcejωndω=sin(ωcn)πn=ωcπsinc(ωcπn)h[n]=\frac{1}{2\pi}\int_{-\omega_{c}}^{\omega_{c}}e^{j\omega n}d\omega = \frac{\sin(\omega_{c}n)}{\pi n} = \frac{\omega_{c}}{\pi}\text{sinc}\left(\frac{\omega_{c}}{\pi}n\right)

The Implementation Challenge: The resulting impulse response is infinite in duration (non-causal and not absolutely summable). Therefore, it cannot be directly implemented as a Finite Impulse Response (FIR) filter.

2. FIR Approximation by Truncation

To create a practical filter, we can truncate the infinite impulse response to a finite number of samples[cite: 13]. We define a (2N+1)(2N+1)-tap FIR filter coefficients as:

h^[n]={h[n],NnN0,otherwise\hat{h}[n]=\begin{cases}h[n],&-N\le n\le N\\ 0,&\text{otherwise}\end{cases}

This approach is not just intuitive; it satisfies a precise mathematical criterion by minimizing the mean-square error (E2E_2) between the ideal and the approximated frequency responses:

E2=ππH(ejω)H^(ejω)2dωE_{2}=\int_{-\pi}^{\pi}|H(e^{j\omega})-\hat{H}(e^{j\omega})|^{2}d\omega

By Parseval’s theorem, this is equivalent to minimizing the energy of the difference in the time domain: E2=2πnZh[n]h^[n]2E_{2}=2\pi\sum_{n\in\mathbb{Z}}|h[n]-\hat{h}[n]|^{2}.

3. Why the Gibbs Phenomenon Persists

Truncating the impulse response (which is equivalent to multiplying by a rectangular window) leads to the Gibbs phenomenon—oscillations near the points of discontinuity in the frequency response.

L2L^2 vs. Uniform Convergence

The FIR approximation works within the Hilbert space L2([π,π])L^2([-\pi, \pi]). While the approximation converges to the ideal filter in the L2L^2 sense (the total energy of the error goes to zero as NN increases), it does not converge uniformly:

  • Energy Reduction: ππH^N(ejω)H(ejω)20\int_{-\pi}^{\pi}|\hat{H}_{N}(e^{j\omega})-H(e^{j\omega})|^{2}\rightarrow0 as NN \to \infty.
  • Persistent Peak Error: The maximum error near the jump discontinuity remains constant at approximately 0.089490.08949 (about 9%), regardless of how large NN becomes.

4. Consequence for Filter Design

Because the sequence H^N\hat{H}_N cannot converge uniformly to HH, the “ripples” near the cutoff frequency do not vanish with increasing filter length; they simply crowd closer to the discontinuity.

Gibbs persists because truncation yields L2L^2 convergence rather than the uniform convergence required to eliminate these oscillations. To mitigate this in practical DSP, alternative windowing functions (like Hamming or Kaiser windows) are used to trade off main-lobe width for reduced side-lobe ripples.