# Gibbs Phenomenon

1. Jul 24, 2010

### goldfronts1

How does the Gibbs Phenomenon effect the choice of the kth harmonics for bandwidth selection?

Basically, I have plotted a square wave using the fourier series analysis for choosing the kth harmonics. As, I increase the kth harmonics the oscillations increase. What is the smallest harmonic i can go to that is still an accurate representation of the signal. Or does it not matter.

Confused

Thanks

2. Jul 25, 2010

### uart

As the number of harmonics (N) increases the resultant waveform becomes progressively closer (in the sense of mean square difference) to the original square wave. Gibbs phenomenon refers to the fact that, despite getting ever closer in a mean squared sense, the convergence is very poor near the discontinuity (the edge) and in fact the maximum error at the "ringing overshoot" doesn't actually get any smaller as you increase N.

Tapering (instead of abruptly truncating) the truncated Fourier series (also called "windowing") is a very useful method for reducing these ringing artefacts. For example you could taper off the series with a "Hamming" type of window using something like : $w(k) = 0.54 + 0.46 \cos( (k-1)\pi/(N-1) )$

In other words, instead of using $\sin(2 \pi (2k-1) t)/(2k-1)$ for the k-th term in the series you would use $w(k) \sin(2 \pi (2k-1) t)/(2k-1)$ instead. Give it a try, you'll be surprised what a big improvement it makes.

3. Jul 25, 2010

### uart

The attachment shows a 20 term (sine) fourier series for a square wave, both with and without windowing being used. The window I used was w(k) as defined in the previous post.

#### Attached Files:

• ###### windowed_fourier.png
File size:
13.5 KB
Views:
107
4. Jul 25, 2010

### goldfronts1

Ok, so what's the difference if I use 60 terms, which gives me about 99% of the power in the signal versus using 20 terms which gives me about 95% of the power in the signal? When the ultimate goal is to have the smallest bandwidth. I guess the gibbs phenomenon is still present in either case, but the signal is closer to the original when you use more k-terms, but that uses up more bandwidth. Is this just a judgment call? I guess which one is best?

Last edited: Jul 25, 2010