ME335 Dr.
Youssef
Fast Fourier Transform Tutorial
Fast Fourier Transform (FFT) is a tool to decompose any deterministic or non-deterministic
signal into its constituent frequencies, from which one can extract very useful information about
the system under investigation that is most of the time unavailable otherwise. Engineers and
scientists often resort to FFT to get an insight into a system or a process.
By examining the following signal one can observe a high frequency component riding on a low
frequency component. The question what are these frequencies? In this example, FFT will be
used to determine these frequencies.
Low High
Frequency Frequency
1
CSUN-Mechanical Engineering Department
© 2011 Dr. George H Youssef
ME335 Dr. Youssef
Fourier Analysis is part of the Data Analysis ToolPak. If you cannot find the Data Analysis
ToolPak, please refer to Appendix 1 of this tutorial to enable the Analysis ToolPak.
First, you need to insert the following five labels: Time, Signal, Frequency, Magnitude, and
Complex Fourier, which should corresponds to the cells A1:E1, respectively. Note that the time
and signal are stored in column A and column B.
Labels
Select Cell E2 and access Fourier Analysis by click Data/Data Analysis and select Fourier
Analysis.
Excel will prompt you with Fourier Analysis dialog box, in which you must enter the following
information:
• Input Range: select the range where the signal data is stored. The number of cells
must be 2n number of samples.
• Output Range: select the range where the complex FFT will be stored. In our
example, select the corresponding range in column E.
• After enter the information, as shown in the figure below, click OK. Excel will
populate column E with the complex FFT results.
2
CSUN-Mechanical Engineering Department
© 2011 Dr. George H Youssef
ME335 Dr. Youssef
Check if
you
included
cell B1 in
the input
range
Note: if you included cell B1 in the input range, you must click the check box to indicate that the
Labels in First Row.
Second, calculate the FFT magnitude by using IMABS(ref) function in column D, where ref
refers to cells in column E where the complex FFT data stored. Recall from our Fourier
Transform formulation discussed in class that the integral was double-sided (i.e. integral bounds
from -∞ to ∞). Also, the Fourier Integral was divided by the number of samples N (i.e. number
of data points). Therefore, the magnitude calculation has to be adjusted for the number of
samples and the double-sided properties of the transform by multiplying IMABS(ref) by 2/N. in
this example N=512. Fill in column D with this formula in the range corresponding to the range
where FFT complex data is stored.
Third, fill in the frequency column by performing the following steps:
1- Insert 0 in cell B2.
2- Calculate the sampling frequency such that
1
fs =
∆t
where, fs is the smapling frequency and Δt is the time step (i.e. the number stored in cell
A3).
3- Calculate δfs which will be used to fill in series
fs
δ fs =
N
3
CSUN-Mechanical Engineering Department
© 2011 Dr. George H Youssef
ME335 Dr. Youssef
4- Fill in a series column C by clicking Home/Fill (in Cells Tab)/Series
δfs fs
Last, plot FFT Magnitude vs Frequency to display the transformed spectra. Note due the
symmetry properties of Fourier Transform don’t plot more than N/s data points, failing to do so
the FFT spectra will duplicate itself.
2nd
1st Frequency
Frequency
4
CSUN-Mechanical Engineering Department
© 2011 Dr. George H Youssef
ME335 Dr. Youssef
Appendix 1: Data Analysis ToolPak
By default, this add-in is not activated. Therefore the first step is to activate the Analysis
ToolPak.
Go to Office Button (application Button)/Excel Options
Office Button
(Application Button)
Select the Add-Ins Tab, then select Excel Add-Ins from the Manage dropdown menu located at
the bottom of the dialog box and click Go.
Excel will prompt you with another dialog box “Add-Ins” to select the analysis tools you want
to activate. Check the box beside Analysis ToolPak and Analysis ToolPak-VBA and click OK.
You don’t have to perform these steps every time you use the data analysis tools. You follow
these steps if you can’t access the Data Analysis tools, which usually is the first time you use PC
with freshly installed Office or the first time you use the ToolPak.
5
CSUN-Mechanical Engineering Department
© 2011 Dr. George H Youssef
ME335 Dr. Youssef
6
CSUN-Mechanical Engineering Department
© 2011 Dr. George H Youssef