On the Gibbs Ringing
Gibbs ringing is a phenomenon with significant practical relevance, yet it often receives little attention in signal processing education. In this brief piece, I explain the effect from both time and frequency domain perspectives, illustrating how windowing or truncation in the frequency domain leads to oscillations—or ringing—in the time domain, and vice versa. This behavior arises directly from the fundamental mathematics of Fourier analysis.
1. The Gibbs Phenomenon in the Time Domain
The Gibbs phenomenon refers to the oscillations that occur when approximating a signal with a sharp discontinuity (e.g., a square wave) using a finite number of Fourier components. When reconstructing a signal with discontinuities using its truncated Fourier series, the overshoot near the discontinuity does not diminish as the number of terms increases. Instead, the maximum overshoot approaches a fixed value of approximately 9% of the jump in the discontinuity.
Mathematically, consider a periodic square wave signal x(t) defined as:
where Π(t/d) denotes a unity amplitude pulse with duration d centered at t=0. Its Fourier series coefficients can be obtained as:
Notice that magnitudes of the Fourier series coefficients follow a sinc function. Now, the truncated (or partial) Fourier series sum can be written as:
As M→∞, the partial sum converges to x(t). However, at and near these discontinuities, the partial sum produces oscillations that persist irrespective of how many terms are included in the sum! This oscillatory behavior near the discontinuity is what is known as the Gibbs phenomenon or Gibbs ringing. This is shown in the picture below for different values of M, i.e., the number of terms used in the partial sum:
Note that the Gibbs phenomenon does not contradict pointwise convergence of the Fourier series sum under the Dirichlet conditions. Pointwise convergence still occurs, e.g., if we fix a point t=τ near a jump, the partial sum evaluated at τ would still converge 0 or 1 as M→∞, given that the ripples get more and more compressed and move closer and closer to the jump. But remember that the Dirichlet conditions ensure pointwise convergence only, which is weaker than uniform convergence.
These Gibbs oscillations, which manifest as ringing near the discontinuities, arise from the inherent limitations of representing non-smooth functions with a finite number of smooth sinusoidal components.
2. Historical Context of the Gibbs Phenomenon
The Gibbs phenomenon was first observed by Henry Wilbraham in 1848, though it gained prominence after J. Willard Gibbs analyzed it in 1898. Initially, these oscillations were dismissed as artifacts of experimental setups, measurement errors, or inadequacies in instrumentation.
Gibbs challenged this notion by demonstrating that the overshoots were intrinsic to the inherent mathematics of Fourier series! His work showed that these oscillations occur due to the inability of finite sums of sinusoidal functions to perfectly approximate sharp discontinuities. Thus, the phenomenon was mathematically explained and accepted as a property of Fourier series, rather than an issue with measurement instrumentation.
3. Mathematical Explanation: Truncation and Convolution
The Gibbs phenomenon can be understood as a result of truncating the Fourier components in the frequency domain, which is equivalent to windowing the signal's spectrum. This truncation in the frequency domain results in a convolution in the time domain between the square wave and the sinc function.
The sinc function is the Fourier transform of a rectangular window. So multiplying the signal spectrum with a window in the frequency domain implies convolution of the signal in the time domain with the inverse Fourier transform of the the frequency domain window. That means convolving the time-domain signal with the sinc function, which is exactly what causes the oscillations near the discontinuities in the time domain. The result is an approximation of the square wave that has noticeable oscillations near the jumps, with the overshoot magnitude converging to approximately 9%.
4. The Dual of the Gibbs Phenomenon in the Frequency Domain
The Gibbs phenomenon also manifests in the frequency domain due to windowing in the time domain. To design a causal filter, its impulse response must be truncated in time. For instance, an ideal low-pass filter with a "brick-wall" frequency response has an impulse response in the form of a sinc function. However, since the sinc extends infinitely (i.e., has infinite support in time), it must be windowed to make the filter implementable.
Assuming a rectangular window, windowing the sinc signal in the time domain results in convolution of the desired frequency response with the sinc function in the frequency domain. This convolution causes "ringing" around the transitions from pass band to stop band, creating oscillations in the filter's frequency response near the cutoff frequency.
5. Mitigating the Impact of the Gibbs Phenomenon
While the Gibbs phenomenon cannot be entirely eliminated due to its inherent mathematical nature, there are several practical techniques to reduce its impact:
By leveraging these methods, engineers and scientists can mitigate the practical challenges introduced by the Gibbs phenomenon.
6. Practical Implications and Challenges
The Gibbs phenomenon has several real-world implications, in either time or frequency domain, across various fields:
7. Conclusion
The Gibbs phenomenon highlights the intrinsic limitations of using finite Fourier representations to approximate functions with sharp discontinuities. Whether in time-domain or in frequency domain, its mathematical roots in convolution reveal the interplay between truncation, windowing, and oscillatory behavior.
While the phenomenon is mathematically unavoidable, mitigation techniques like windowing and edge-preserving methods can reduce its practical impact. Understanding and addressing the Gibbs phenomenon ensures that engineers can develop more effective solutions across a variety of fields, from medical imaging to audio processing.
HVDC - System Studies - Control Systems
5dOne incredible thing of Gibbs is the apparent non-causality. Imagine an apparently relaxed equipment drastically oscillating before the next step (lower right signal).
And lack of knowledge leads to interesting stories. A fellow engineer made her colleages' life miserable because of Gibbs phenomenon. Applying harmonic balance simulator to a circuit, the limited number of harmonics showed up as Gibbs. Fellow engineer confused that with continuous oscillations, pressed the red button of design emergency problem and management (equally clueless) believed her lack of knowledge plus blind trust in simulators. Even more, she proposed that it will only show up if, and only if, you put a signal of exactly XYZ Hz. Scope and real time step response measurement showed nothing...just a well behaved step response. Months and months of fruitless discussions, frustrated colleagues; exacerbated by her unique approach that she could never be wrong (fancy PhD school does not make you error free for life!!!) and management could never be wrong either. Gibbs, simulator settings and egotistical people were the cause. Even with real time measurement and plain transient (very clean response by the way)...."Sorry oscillation cannot be discarded".🙄🙄🙄 You could guess that the only instability in this scenario, was "mental instability".
Satellite C&DH Team lead. Electronics and FPGA developer
5dVery high frequencies are damped, absorbed or not picked up by the oscilloscope, so what we see on the screen is definitely a limited number of Fourier terms. As they say: there are truths, there are lies, and there are oscilloscope screens
Cool!