FFT Example - 75% 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.)
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.
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, 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 for 75% of the time (at +5v) and is low for 25% of the time)
at -5v), the DC level is 2.5 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, ao, is going to be placed
in SigFFT0 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
0 Hz (DC)
Now, we can get at the frequencies in the FFT plot. Notice the following.
All of the odd components
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 SigFFT2. 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 2x2.3
The second "spike" in
the FFT plot is at SigFFT4. That corresponds to
2000 Hz which is the second harmonic of the signal.
The actual value of the
second harmonic is around 2x1.55 = 3.1.
The same computations
can be used for higher harmonics.
There are some signal
harmonics that are missing. For example, SigFFT8
is missing (in this case, maybe just very small). That means the
fourth harmonic of the signal is zero! Examining the plot we also
see that the 16th, 24th and 32nd,
etc. are missing, so that the 8th, 12th
and 16th harmonics are missing.