Slew Rate and harmonics
I have a rule: I never draw a sine wave freehand. OK, if I'm doing a classroom lecture with a white board behind me, I'll give it a shot. But in documents I always find a way to create the sine wave, because it's too easy to make what you need in Excel, a graphing calculator program, or some other tool on your computer. To do anything less is the sign of a lazy person who doesn't really care about quality.
Now, looking at the sine wave above you might think it looks fine, and that is why I have this rule. That wave has a serious problem that you didn't even notice! I used my Excel program to reduce the slew rate to 4 Volts per millisecond (4V/ms). Look at it again. You can see that a straight ramp connects the two nicely rounded peaks. It's a pretty innocuous looking failure, and as one of my readers told me, some people can't even hear it. Now, because it's a failure in time and not voltage, can an FFT pick it up? Let's look:
Look at that! Odd harmonics galore! Why? Because while most people believe that harmonics come from discontinuities in voltage, in fact, harmonics can be created by discontinuities in time too. This epiphany came to me when I looked into harmonics created in square waves and triangle waves. Discontinuities in time cause harmonics because of Bullard Laws of Harmonics #1: Harmonic amplitudes are proportional to the area of the distortion. Area is the integral of voltage and time. So time and voltage are both responsible for harmonic creation. If that's true, then increasing the slew rate (allowing the wave to move faster) should change the harmonic signature. Let's see:
This sine wave looks perfect compared to the first one. It should look better, I increased the slew rate to 6V/ms. But don't be fooled, this is exactly why we don't have people looking at o'scopes to verify waveform quality anymore. Instead, let's do an FFT and look at the spectrum:
There they are, a bunch of Odd harmonics, just smaller in amplitude than the first wave. But looking at the time domain version of the wave, it looks perfect, but it's not, and only an FFT can tell you that for sure. That's why the invention of the FFT by Cooley and Tukey is such a watershed event in human history. It allows us to deduce signal quality very, very quickly (hence the name FAST Fourier Transform).
In the two spectra, the Even harmonics (red) are likely due to the fact that my poor sine wave gets one cycle to run through the "filter" of my slew rate restriction. The DC offset (bin zero) is a clue to what is going on. In a real device, over time the Even harmonics would disappear entirely because the slew rate restriction is symmetrical, but because it's a filter, it takes time to let thing settle, but I don't have that much time. In Excel I have one cycle to get it right, and the FFT is limited to dealing with only 2048 samples.
Principal II Design/Test Engineer
6 年Yeap, I immediately noticed that bad boy sine wave. It’s inbred after years of engring & music with synths (Moogs)