An
FFT Example  20% Pulse Signal
In this note we are going to analyze a pulse signal using the FFT. Here
is the signal. (NOTE: If you are used to Matlab, the indices
here start at zero.)

The signal has 4000 samples,
and the length of the record is 2 milliseconds. (It goes from .001
seconds to +.001 seconds.)

Since the length of the
record is 2 milliseconds, if we compute the FFT for the entire record (which
we would normally do), then the fundamental frequency in the computed results
is going to be 1/.002 = 500 Hz. We will refer to this as the fundamental
frequency of the data record.

Within the data record
is the triangle signal, and it has a period of 1 millisecond, so it has
a frequency of 1 KHz.
Now, we need to examine
what happens when we FFT this signal. We will use the Mathcad
file this link takes you to. (You may have to change the file
name for the data file that is loaded in this workspace.) That file
assumes that the data file has two columns (Time in the first column, data
in the second column. 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.

Notice that there is a
DC component in this signal.

Since the pulse is 5 volts
and is high only for 20% of the time (at +5v) and is low for 80% of the
time) at 5v), the DC level is 3 volts. However, the Mathcad CFFT
function multiplies by 1/N (not 2/N) so the computed result is the correct
value for the DC component. (Remember that the absolute value
of the coefficients is plotted.)

The fundamental frequency
of the data record is the reciprocal of the length (in seconds) of the
data record. Since the data record is 2 milliseconds long (i.e. .002
sec), the fundamental frequency of the data record is 500 Hz.

In Mathcad, the indices
start from zero. So, a_{o}, is going to be placed
in SigFFT_{0} in our workspace above. Here is a short
table of frequencies, indices, etc. In this table, the indices in
the FFT array (SigFFT) are the number of the harmonics of the fundamental
frequency of the data arecord.
Harmonic of the
fundamental frequency of the data record

The actual
frequency

0

0 Hz (DC)

1

500 Hz

2

1000 Hz
(1 KHz)

3

1500 Hz

4

2000 Hz

5

2500 Hz

6

3000 Hz

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

All of the odd components
are zero.

They are components at
500, 1500, 2500 Hz, etc. We would expect them to be zero in a signal
that has a 1000 Hz fundamental.

The first "spike" in the
FFT plot is at SigFFT_{2}. That corresponds to 1000
Hz which is the fundamental of the signal. It is not the fundamental
of the data record. It is, however, related to the fact that there
are exactly two cycles of the signal in the length of the data record.

Since the "2" in the 2/N
factor is missing, the actual value of the fundamental is around 2x1.9
= 3.8.

The second "spike" in
the FFT plot is at SigFFT_{4}. That corresponds to
2000 Hz which is the second harmonic of the signal.

The actual value of the
second harmonic is around 2x1.5 = 3.0.

The same computations
can be used for higher harmonics.

There are some signal
harmonics that are missing. For example, SigFFT_{10}
is missing. That means the fifth harmonic of the signal is zero!
Examining the plot we also see that the 20^{th}, 30^{th}
and 40^{th}, etc. components are missing, so that
the 10^{th}, 15^{th} and 20^{th}
harmonics are missing.