On the Gibbs Ringing

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:

Article content

where Π(t/d) denotes a unity amplitude pulse with duration d centered at t=0. Its Fourier series coefficients can be obtained as:

Article content

Notice that magnitudes of the Fourier series coefficients follow a sinc function. Now, the truncated (or partial) Fourier series sum can be written as:

Article content

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:

Article content
Gibbs Oscillations

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:

  1. Windowing: Applying a window function (e.g., Hann, Hamming, Kaiser, etc.) to the Fourier series or impulse response can suppress the oscillations. These windows reduce the side lobes of the sinc function, albeit at the cost of a wider main lobe or less sharp transitions in the frequency domain.
  2. Oversampling: Increasing the sampling rate of the signal can reduce the relative prominence of the oscillations. Although this does not eliminate the phenomenon, it pushes the oscillations further into higher frequencies where they are less perceptible.
  3. Smoothing Filters: Post-processing with smoothing filters can help reduce the visible artifacts of Gibbs-related oscillations in applications like image reconstruction or signal processing.
  4. Edge-Preserving Techniques: In fields like medical imaging, edge-preserving reconstruction techniques can be used to minimize the distortions caused by the Gibbs phenomenon near sharp transitions.

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:

  • Medical Imaging (e.g., MRI): The sharp transitions in magnetic resonance imaging (MRI) images are often distorted by Gibbs-related ringing. This can create false edges or artifacts around high-contrast boundaries, reducing the image's diagnostic accuracy.
  • Signal Processing: In communication systems, the oscillations caused by Gibbs phenomenon cause pulses to spread out or leak, interfering with adjacent symbols, and thus leading to more inter-symbol interference (ISI) if not properly accounted for.
  • Audio Processing: When low-pass filtering audio signals, Gibbs oscillations around sharp frequency cutoffs can introduce unwanted ripples, degrading audio quality.
  • Image Processing: In image reconstruction or compression, Gibbs ringing can appear as visible artifacts near sharp edges, especially in techniques relying on truncated Fourier series or transforms.
  • Filter Design: Designing practical filters often involves managing the trade-offs introduced by the Gibbs phenomenon. Techniques such as applying smoother windowing functions (e.g., Hann, Hamming, Kaiser windows, etc.) help reduce oscillations, though they do so at the cost of widening the filter’s transition band.


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.



Trevor Dobbin

HVDC - System Studies - Control Systems

5d

One 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".

Juan Abelaira

Satellite C&DH Team lead. Electronics and FPGA developer

5d

Very 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

To view or add a comment, sign in

Explore topics