Published on June 27, 2019

Copyright © **Dan P. Bullard**

I was reading MIT's (Morons In Training) online courseware and came across something that I wrote about back in 2018. They call it the Gibbs phenomenon, named after a guy who rediscovered something discovered in 1848 by Henry Wilbraham. Rather than give good old Henry the credit as Hugo de Vries, Carl Correns, and Erich von Tschermak did with the long forgotten Mendelian laws of inheritance, Gibbs took credit for the discovery himself. But is it right? Who could doubt it? How's about me? I sense another law coming on...

MIT and Wikipedia go on and on about how the Gibbs phenomenon will cause overshoot, undershoot and (they never call it this) pre-shoot that can never be eliminated, no matter what you do. Millions of people are taught this apparently, well, except those of us without formal college training, we are spared the obvious idiocy of this statement. Because it's not true! Why did you go to college to learn things that are not true? How many of you are still paying for the right to be told things that are not true? I never paid and dime and I discovered 5, (now maybe 6) laws of physics. Let's take a look and see what is wrong with the Gibbs phenomenon.

Here is a square wave made from the spectrum of a square wave through an inverse FFT. That is, I created a square wave in time domain, did an FFT on it, then removed all harmonics except the first 100. Then I did an inverse FFT and got this time domain wave.

You can clearly see overshoot, undershoot and pre-shoot on this wave. I'll never forget teaching a TSEC KW-7 course at CTMS (I could tell you more but then I would have to kill you) and while we were 'scoping out signals in the digital-only KW-7 a student asked me why he was seeing a sine wave. I took a look and found that he had his scope set to 2mV per division and was looking at the top of the square wave, so yes, it looked like a sine wave to him, but it was just overshoot. This tells me that these are not just mathematical artifacts, this is a real effect in any band-limited system, and let me tell you, when it comes to band limited digital, the KW-7 was the king! So the Gibbs phenomenon is real, sort of. It's real if you limit the bandwidth of the signal. But what if we increase the bandwidth of the signal? Let me do the same thing, but this time, I will keep 500 harmonics instead of just 100 harmonics.

Boy, those extra harmonics really help reduce the overshoot, undershoot and pre-shoot, but as MIT says, it appears you can't make them go away entirely. Or can you? In this experiment, my number of samples (N) is 2048, so I have 1024 harmonics (half of those are zero because this is a 50% duty cycle square wave) to select from, filter out, whatever. Let's allow a few more harmonics to come through, this time 1000.

Wow, what happened to Gibbs? There isn't much left of the overshoots, etc. We have allowed 1000 harmonics to get through, and the overshoot, undershoot, etc have almost gone away. We only have 1024 harmonics total, what if we allow 20 more through?

While the overshoot, undershoot and pre-shoot are mostly gone (despite what MIT and Wikipedia say) there is a little bit of oscillation near the edges. Could the remaining four harmonics (two really, since two of them are zero being Even harmonics) really make that much difference?

With all 1024 harmonics let through, all signs of overshoot, undershoot and pre-shoot are obliterated. Gibbs has been totally disproven, along with MIT and Wikipedia. A new law now begins to coalesce in my mind, something I have been thinking about for years but until now had no reason to codify.

*"If a square wave's harmonics are unimpeded, there will be no overshoot, undershoot or other anomalies."*

Give it a name, the Sbbig (Gibbs spelled backwards) phenomenon, Bullard Laws of Harmonics #6, whatever, I don't care. Just stop believing MIT and Wikipedia. As I point out in my newest book on the topic, More On Harmonics For Morons, there are morons everywhere, and many of them have college degrees. They will tell you that an FFT is just an approximation, or it's just a button on a scope, or that it's too hard to understand. None of those are true. To understand electronics, it helps to be "grounded" in the practical, like spending years working on HF radios, SOSUS sonar systems or TSEC KW-7 encryption systems. Oops, I told you too much. As the snipers say, don't run, you'll only die tired.