A Sine Wave is a Sine Wave, Right? |
A Sine Wave is a Sine Wave,
Right?
In this note we
want to look at a sinusoidal signal and what happens when we compute the
frequency components in the signal. We will start with the signal below.
Then, we will take the FFT
of this signal. The result is graphed below.
There is one line in the
spectrum of this signal, and it appears at a very low value of the index, i. We
can expand the graph of the FFT, and we get the graph below.
Except for a little "fuzz"
the only point in the spectrum is at i = 1, i.e. at the fundamental. Since we
have a data record length of .001 second, that fundamental is at a frequency of
1000 Hz, i.e. 1 KHz.
Now consider
what happens when the sine wave is changed to the one below. The only
difference is that the frequency of the sine wave is now 2000 Hz.
Now, the spectrum looks
like the plot below.
At first glance, this plot
looks pretty much like the plot for the first signal. Closer inspection shows
that the point on the spectrum is at i = 2 (and the previous one was at i = 1).
Thinking about that you should note the following.
- The fundamental
frequency of the data set is 1 Hz since the data set record length is 1
millisecond (.001 sec).
- The fundamental
frequency of the sine wave is 2 KHz, so that the sine wave is at twice the
fundamental frequency of the data set. That's why the sine wave's spectral
point is at i = 2.
Now, try to predict
what will happen when we make the frequency of the sine wave 2.5 KHz. Here is a
plot of the signal.
Notice that there are 2 and
a half periods in the data set. When we take the FFT of this data set we get
some interesting results - as displayed in the graph below.
Clearly, even though this
is a sine wave, there are several non-zero points in the spectrum. Or is it
really a sine wave. Remember that we are computing coefficients of a Fourier
Series of the signal in the data record assuming that it repeats. Let's look at
the signal just above when it repeats - i.e. plotting it for twice the data
record length.
As you can see, when the
signal repeats it isn't exactly a sinusoid. Parts of the signal are sinusoidal,
but that double peak in the middle takes it out of the realm of "sinusoidiality".
And, that's the
major point to make here. When we FFT a data record, we are assuming that the
data in the record repeats when we do that FFT. If you can plot two cycles of
the data record and you get something like that almost-sinusoidal signal above,
then you have to be careful. And the time to be careful is right at the
beginning before you even take the data. End of story.
|