Noisy sine wave with an asymmectrical zero crossing distortion

# Using phase to differentiate noise from distortion

Published on August 12, 2019

In my last article I proposed an idea that sounds insane. Using the phase angle of harmonics to differentiate harmonic distortion from noise. It sounds crazy, I have friends who think I'm nuts. But as my old boss at TTC used to tell me, "My friends think I'm crazy, but I'm crazy like a fox."

Above you can see a noisy (look closely, you can see the noise) sine wave with an asymmetrical zero crossing distortion. Zero crossing distortions are usually symmetrical, due to the fact that amplifiers are usually made up of two matched PNP/NPN (or N-Channel/P-Channel) transistors, but in order to figure out what is going on with harmonics, sometimes we have to bend reality and try things that you normally wouldn't see in the real world. On this 50th anniversary of the US Moon landing, I am reminded of an experiment that Commander David Scott did for the TV cameras, replicating something that Galileo predicted, but couldn't prove because he didn't access to an Apollo spacecraft. You have to remove some variables to see what is the basis of the physics you are investigating.

So I do all my experiments in Excel in a noise free environment and carefully choose the kind of distortion I'm going to test. But here, I added noise, a lot of it, to see what effect it would have on Bullard Laws of Harmonics #5;

### "The harmonics of a distorted sine wave will always start at 0, 90, 180 or 270 degrees relative to the fundamental, no exceptions."

It seems crazy, and a friend of mine is trying to prove me wrong, but I'm pretty sure I'm right. When you distort a device's transfer function, the harmonics created by that distortion will always produce harmonics that are aligned to the fundamental in one of four values. Plus or minus nothing at all! Now, like Galileo ignored air resistance, I am ignoring noise, because each spectral line is the vector sum of harmonics and noise, and there's no way to separate them.....or is there? I think I have a way to prove to you that I can do what was previously considered impossible.

I came up with a way to add various amounts of noise to the distorted waveform and did the FFT, and here is a part of the FFT:

The Fundamental and all the Odd harmonics are in blue, the Even harmonics are all in red. Zero crossover creates an interesting pattern, where the Odd harmonics start low, then rise up, but the Even harmonics start high and then hump down to a notch, then hump back up again.

I did the same thing with various amounts of noise, from 1/100th of the signal amplitude (40dB SNR) to 1/100,000th (100dB SNR), then I recorded the phase angles for each harmonic. I also rounded them so we didn't have 10 digit numbers to deal with, but here they are.

Looking through these phase values, you can see that the worse the noise is, the more variable the phases are. That is, the columns on the left seem to vary quite a bit from the expected values of 0, 90, 180 and 270 degrees. Take a look at the value for the 20th harmonic (an Even harmonic) for the worst noise level. You can see by looking at the smaller noise levels that the value wants to be 90 degrees from the fundamental, but with the worst noise level the phase is 126 degrees, that's 36 degrees away from where it's supposed to be. Now, why would it be so bad for the 20th harmonic? Take a look at the spectrum above again. Can you count the red harmonics by two to the 20th harmonic? Wow, what a shock, the 20th harmonic is at the bottom of a notch, so the harmonic is quite small compared to all the other harmonics, so the noise has a lot more influence on the amplitude and of course, on the phase! Where does the Odd harmonics form its first notch? At bin 37, right? Looking again at the table, you will find that in the worst case noise, the phase is 161 degrees instead of the 180 degrees it's supposed to be, but the 36th harmonic is at 91 degrees, just one degree off of where it's supposed to be. That's because the Odd and Even harmonics amplitudes are "out of phase" in asymmetrical zero crossing distortion. When the Even harmonics are reaching their lowest point, the Odd harmonics are just peaking. It's an interesting effect and it shows up here nicely when looking at the noise vs the harmonic amplitudes.

The other thing you can see here is that generally, the less noise we have, the more the harmonics obey Law #5, which was the whole point of the previous article. Generally is a term I have to use with random noise, because from run to run, we don't know what the amplitude or the phase of the noise is going to be. In Excel I could fix it to a certain value, prevent the numbers from re-calculating, but I think it's more fun if I let it reflect reality a little bit! I mean, I don't own an Apollo spacecraft either!