An FFT Example - Done Using Matlab

        In this note we are going to analyze a triangle signal using the FFT. Here is the signal.

Now, we need to examine what happens when we FFT this signal.  We will use the m-file below.  This basic m-file was discussed in another note. Now, if we look at the plot of the absolute value of the SigFFT array, we get a plot like the one below.
        Now, the fundamental frequency of the data record is 500 Hz.  You need to be able to get from that to the actual frequency components of the signal.  Here is what you need to use.
Index
Harmonic of the fundamental frequency of the data record
 The actual frequency
 SigFFT(1)
 0
0 Hz (DC)
 SigFFT(2)
1
500 Hz
 SigFFT(3)
2
 1000 Hz
(1 KHz)
 SigFFT(4)
3
 1500 Hz
SigFFT(5)
4
2000 Hz
SigFFT(6)
5
2500 Hz
SigFFT(7)
6
3000 Hz

        Now, we can get at the frequencies in the FFT plot.  Notice the following.

        With that, you should be able to interpret the horizontal scale of the FFT plot  - at least the plots that Matlab produces.

        Now, we need to address the vertical scale.  First, you should realize that the vertical plot is the absolute value of the c's in the Fourier expansion.  If you need to understand what the c's are, check these links.

        When we did the calculation, we found that the third element in the SigFFT array (That's the one that is the first, large value - somewhere over 8000 on the plot!.) has a value of 8,103.  That's not a number that we would expect from a triangle wave that has an amplitude of 5 volts.

        The explantion for the seemingly ridiculous value of over 8000 is this:


What do you conclude from this?

        From the material above, you should be able to determine the actual Fourier Series components if you have a signal in a file.  You should be able to distinguish between the fundamental frequency of the data record and the fundamental frequency of the signal embedded in the data record - if that signal is periodic.  And, you should be able to determine the frequencies present in the signal, as well as the amplitudes.


What if the signal doesn't have an integral number of periods in the data record?

        Here is an example of a signal with 2.5 periods in the data record.  In this signal, we only have 2000 points, so we have to factor that in.

You can see that there is not an integral number of periods in the data record.  Now, let's see what happens when we FFT this data record.  That's shown below.

  • Generally, this can only be described as a mess.  There are no clear-cut lines in this FFT spectrum.  However, note the following table.

  •  
    Index
    Harmonic of the fundamental frequency of the data record
     The actual frequency
     SigFFT(1)
     0
     0 Hz
     SigFFT(2)
    1
    500 Hz
     SigFFT(3)
    2
     1000 Hz
    (1 KHz)
     SigFFT(4)
    3
     1500 Hz
    SigFFT(5)
    4
    2000 Hz
    SigFFT(6)
    5
    2500 Hz
    SigFFT(7)
    6
    3000 Hz

            Now, we can get at the frequencies in the FFT plot.  Notice the following.

            All of that is well and good, but the third harmonic of the embedded signal is at 3750 Hz and that would appear between indices 8 and 9.