An FFT Example - 60% Pulse Signal |
An FFT Example - 60% 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 for 60% of the time (at +5v) and is low for 40% of the
time) at -5v), the DC level is 1.0 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 |
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 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 2x3.0 =
6.0.
- 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 2x0.8 = 1.8.
- The same computations can
be used for higher harmonics.
- There are some signal
harmonics that are missing. For example, SigFFT10 is
missing. That means the fourth harmonic of the signal is zero! Examining
the plot we also see that the 10th, 20th
and 30nd, etc. components are missing, so that the 10th,
15th and 20th harmonics are missing.
|