Published on April 4, 2019

Copyright © **Dan P. Bullard**

Some time ago I was volunteering at a Vancouver, WA (yeah, the other one) Community Library book sale and found an electronics book. I looked in the index for Harmonics, found it, flipped to the page indicated and found this jewel. I put my own comments in *italics* and brackets to poke fun at this insanity.

"For example, theoretically speaking, [*meaning, I'm taking a wild guess here because I really don't know, nobody does, except Dan Bullard*] a square wave contains all harmonics, but predominantly odd harmonics [*WRONG! A square wave contains only odd harmonics if the duty cycle is exactly 50%, if the duty cycle is anything other than 50%, it will also contain even harmonics*]"

"By applying a square wave to an integrator, the odd harmonics are removed, leaving the even harmonics in the form of a triangle wave. [*WRONG! A triangle wave works the same way, so a 50% Trise/Ttotal triangle wave will have only odd harmonics, and if the rise/fall ratio becomes anything other than 1:1, even harmonics will appear and I have the formula*]"

I use that example on my Amazon page for my book, Distortion to show people how stupid so many other books are, and they are **ALL** that screwed up, trust me. But I thought it would be fun to show you something out of chapter 2 of my book that shows how wrong this is. In my book, I make the point that a 100% Tr/Tt (rise Time/total Time) is harmonically very, very close to that of a square wave. It was one of the most stunning things I discovered when writing Distortion, and still, reading it even today, 4 years later gives me the greatest feeling in the world.

So here is the harmonic constituent plot from the aforementioned Ramp wave with no fall time, only rise time equal to the total time, the kind of wave you might use to test DAC or ADC linearity.

The ramp is in black at the bottom and above it is the fundamental (harmonic #1) and then the other harmonics, 2-20, blue for Odd harmonics, red for Even harmonics, but scaled up by a factor of 2 to make it easier to see them. Now I am only showing you 20 harmonics, but if the harmonics go out to infinity, the ramp wave will look like that, and you can see why. Every wave starts by going low, then rising up to the positive peak at the far right. That is how you make a ramp wave.

Now, using my cool Excel spreadsheet I flip a switch and kill all the Even harmonics. What do you think will happen?

And the result is... drum roll please... a square wave! But not just that, the square wave is one half the amplitude of the ramp wave! So the Even harmonics did two things: They countered the Odd harmonics to keep them from making the ramp wave into a square wave, but they also doubled the amplitude of the ramp wave, that is, the Even harmonics contributed energy to the wave. That's why on the second to last page of Chapter 2 you find out that the ramp wave's harmonics (Odd and Even) fall off at the same rate as a square wave (1/harmonic#) but they are also down by 6dB, or a factor of two. For a given square wave, say 2Vpp, if you have a ramp wave of the same amplitude, the harmonics will be half the amplitude of the spectrum of the square wave, but the square wave is missing the Even harmonics. (Here is an article to explain that to you.) And you might then say,"but that's not fair!" And you would be right. If you take away the Even harmonics, your total harmonic energy is half, and so now the square waves loses half its energy ending up with a lower peak-to-peak value, 1Vpp instead of 2Vpp. Seems strange right? The square wave has twice the energy, two fast edges instead of just one, and yet if you compare the spectrum of a 2Vpp square wave and a 2Vpp ramp wave, the Even harmonics are missing from square wave spectrum, but the Odd harmonics are twice as tall, (6dB higher) and that just doesn't make sense! Ah, but for the Even harmonics to go away, they have to cancel out, and the Odd harmonics have to double in amplitude! That makes the total harmonic energy the same for both waves, yet the square wave has twice the energy. That's just the way it works. That is why I say that when you have symmetry in voltage or in time (like a square wave) the Even harmonics cancel out (Bullard Laws of Harmonic #3). They didn't just disappear, because if they did, the square wave would be half the amplitude, like it is in this experiment.

When I have friends reading my book, I implore them to at least get through chapter 2. It will open your eyes and suddenly you will see what I'm talking about. It's like an entire college education, without the math in just 14 pages.

Oh, and that statement above; can you see why I love making fun of these idiots now? A square wave contains **only** Odd harmonics (if the duty cycle is 50%) but a triangle wave with a Tr/Tt ratio has exactly the same Odd harmonics, just a bit smaller, 1/harmonics#^2 instead of 1/harmonic# for a square wave. But make the triangle wave asymmetrical in **time** and the Even harmonics come out, and make it very, very asymmetrical and the Even harmonics are the only difference between a square wave and the ramp wave, except every harmonic is half as big, down 6dB. Almost exactly the opposite of what they said: "By applying a square wave to an integrator, the odd harmonics are removed, leaving the even harmonics in the form of a triangle wave." Look at that plot one more time:

What will happen is you had a magic device that removed all Odd harmonics? That's right, you'd have a flat line, no signal at all! What a bunch of losers these people are!