# FFT Analysis

Publish Date: Aug 22, 2017 | 31 Ratings | 3.68 out of 5 | Print

## Overview

This tutorial recommends tips and techniques for using National Instruments high-speed digitizers to build the most effective data sampling system possible. In this tutorial, you will learn fundamental information about the underlying theory of sampling with a high speed digitizer and various methods to optimize the performance of your data sampling. This section of the tutorial covers the topics below.

### 1. Why Do We Need Frequency Domain Analysis?

Often, you will sample a signal that is not a simple sine or cosine wave, it looks more like the "sum" wave in Figure 1 below. However, Fourier’s theorem states that any waveform in the time domain (that is, one that you can see on an oscilloscope) can be represented by the weighted sum of sines and cosines. The "sum" waveform below is actually composed of individual sine and cosine waves of varying frequency. The same "sum" waveform appears in the frequency domain as amplitude and phase values at each component frequency (that is, f0, 2f0, 3f0).

Figure 1. Time vs. Frequency Domain

### 2. What is FFT and Where Does It Come From?

The Fourier transform converts a time domain representation of a signal into a frequency domain representation. However, a digitizer samples a waveform and transforms it into discrete values. Because of this transformation, the Fourier transform will not work on this data. Instead, the Discrete Fourier Transform (DFT) is used, which produces as its result, the frequency domain components in discrete values, or “bins.” The Fast Fourier Transform (FFT) is an optimized implementation of a DFT that takes less computation to perform.

 The Fourier Transform is defined by the following equation: (1) where x(t) is the time domain signal, X(f) is the FFT, and ft is the frequency to analyze. Similarly, the Discrete Fourier Transform (DFT) maps discrete-time sequences into discrete-frequency representations. DFT is given by the following equation: (2) where x is the input sequence, X is the DFT, and n is the number of samples in both the discrete-time and the discrete-frequency domains. Direct implementation of the DFT, as shown in equation 2 above, requires approximately n^2 complex operations. However, computationally efficient algorithms can require as little as n log2(n) operations. These algorithms are FFTs, as shown in equations 4, 5, and 6. When you use the DFT, the Fourier transform of any sequence x, whether it is real or complex, always results in a complex output sequence X of the following form: (3) An inherent DFT property is the following: (4) where the (n-i)^th element of X contains the result of the -i^th harmonic. Furthermore, if x is real, the i^th harmonic and the -i^th harmonic are complex conjugates: (5) Consequently, (6) and (7) These symmetrical Fourier properties of real sequences are referred to as conjugate symmetric (equation 5), symmetric or even-symmetric (equation 6), and anti-symmetric or odd-symmetric (equation 7).

The use of the FFT for frequency analysis implies two important relationships.

1. The first relationship links the highest frequency that can be analyzed (Fmax) to the sampling frequency (fs) (see discussion of the Nyquist theorem).
(8)
1. The second relationship links the frequency resolution (f) to the total acquisition time (T), which is related to the sampling frequency (fs) and the block size of the FFT (N).
(9)

The FFT spectrum output is complex; that is, every frequency component has a magnitude and phase. The phase is relative to the start of the time record, or relative to a cosine wave starting at the beginning of the time record. Single-channel phase measurements are stable only if the input signal is triggered. Dual-channel phase measurements compute phase differences between channels so that if the channels are simultaneously sampled, triggering is usually not necessary.

Applications that use FFT analysis are quite extensive. Those applications requiring fast response times, such as transient analysis, vibration and shock testing use FFT analysis. Preventative maintenance and structural dynamics testing also use FFT analysis primarily in their applications.

Link to Begin the FFT Tutorial now

Using Fast Fourier Transforms and Power Spectra in LabVIEW
The Fundamentals of FFT-Based Signal Analysis and Measurement in LabVIEW and LabWindows/CVI
Spectrum Analyzer Determined by Choice of Measurements

### 3. The Power Spectrum

The energy content of the signal over its frequencies is given by the Power Spectrum. The Power Spectrum is simply the magnitude of the total spectrum. The magnitude is the square root of the FFT times its complex conjugate, or the square root of the sum of the squares of the real and imaginary parts of the FFT. The phase is the arctangent of the ratio of the imaginary and real parts of the FFT, and is usually between p and -p (between 180 and -180 degrees).

The Power Spectrum is commonly used in many applications where phase information is not needed. This is similar to the information provided by swept spectrum analyzers which do not provide phase information.