My attempt to replicate a wave at EEP

# Morons, everywhere morons*

Published on July 14, 2019

I often browse the web for articles on harmonics, mostly to find fodder for insulting people who claim to know what they are talking about, but clearly don't. I gave up on finding the solution to harmonics years ago. Apparently I am the only person on the planet who understands how harmonics work, so it's kind of fun to find stuff out there that is totally made up under the guise of "expert knowledge." At Electrical Engineering Portal I found another one, an article on harmonics by a guy who is probably an OK engineer, but he's not a scientist, because a scientist does not publish conjecture as fact.

One of my favorite episodes of STNG is an episode called Where No Man Has Gone Before, where a "propulsion expert" named Kosinski claims he can get more performance out of the Enterprise's warp engines. Commander Riker sees through Kosinski right away, noting that all he does is hawk useless formulas that are just gibberish, and later it is revealed that all the real work is being done by a mysterious alien from Tau Alpha C known only as The Traveler who seems to have powers beyond explanation, but lets Kosinski take credit for his special talents.

So if you read the article on EEP, you will find that the founder is just making stuff up. Yeah, he's got a formula, but it doesn't mean much. He's just showing how you can sum sine waves to make up a non-sinusoidal wave.

I can do that in Excel, but knowing the formula is not the secret to understanding harmonics. Which harmonics, their phases and amplitudes is the key, and this article does nothing to shed light on that "mystery" of harmonics. Of course, it's no mystery to me, only to the rest of the world. In this article there is also a wave (made up I assume) that is supposed to be a distorted sine wave, and just like MIT did, he creates a harmonic constituent diagram that shows (supposedly) the harmonics contained in his wave.

There are several mistakes here. One is that these "sine waves" are not sine waves at all! Sine waves are not rounded at the peaks, they have a particular curvature that you can see right away. This is one reason I never attempt to draw sine waves by hand, I always use Excel or some other tool that is capable of doing the math to create sine waves. Secondly, look closely at the 3rd harmonic; notice how it's going down when the distorted wave is cresting positive, and then later it's going up when the distorted wave is cresting negative? What are we seeing here? Aha! He copied what MIT did in their course material on harmonics! He gave us the harmonic constituents of a square wave, and then claimed it was the constituents of this wave! Remember, in that other article, MIT's coursework showed the exact same progression of harmonics for a square wave and for a ramp wave! You can't have the same harmonic amplitudes and phases for different waves, it can't be! That's like saying that a horse and a fish have the same DNA. Sure, in both cases it's a test tube full of goo, but that doesn't make it all the same or the fish would have legs and the horse would have fins!

Now, based on this miserable article, I created an Excel spreadsheet to try to replicate his wave in a Bullard plot. This was kind of fun, and I didn't even need to suffer through the hours and hours of doing FFTs. Make a change and the feedback is instantaneous thanks to the computer cranking through the math for me. After a couple of hours banging away at it on a nice sunny summer day, I came up with this, compared to their attempt on the right in sidebar fashion.

You can see that my wave is close to what he created, and I wish I could get it closer, but like I said, it was a sunny day, and I live on the river, so I wasn't going to spend my whole day inside trying to duplicate his wave. One of the differences you can see right away is that my wave has no 3rd harmonic, zero. It took me a while to realize that's what it took to make this wave, but when I finally got rid of the 3rd harmonic, it started looking right, and you can see why. The 5th harmonic does most of the heavy lifting here and it has a phase offset of zero, so it lines up pretty well with the product wave. (I should say here that I gained up the harmonics by a factor of 10 to make them visible.) However, to make this wave, notice that I also had to add a significant amount of 7th, 9th and 11th harmonic energy with 180 degree phase offset. That is what gives the wave that wacky shape. Without those 180 degree phase shifts, it starts looking like a square wave, and this is definitely not a square wave. Notice on his wave in green on the right, all of his phase offsets are zero, and that is how you get a square wave, but if you want this wave, you need to have some of the harmonics shifted by 180 to counter the fundamental peak.

I guess the one thing he got right is that he left out the Even (red) harmonics, because if you had any of those, the wave would be asymmetrical to some degree. But again, reading his article, I don't think he's that clever, I think he just copied MIT's course material which uses the harmonic constituents of a square wave for every wave they have ever seen!

So in the big scheme of things, we have come across yet another Kosinski, a guy who swings his college degree around like a sword to ward off challengers and wields worthless formulae like magic potions. And then, somewhere out there is me; The Traveler, the guy who can do amazing things, but nobody can understand how he does it.

And if you want to play with the tool I used to create this waveform, go here.

* From the name of Chapter 6 of my new book, More On Harmonics For Morons and other college graduates.