21. Feb. 2017

# Let’s Clear Up Some Things About FFT…

## Part 1 of 2: The basics

**The "Fast Fourier Transformation" (FFT) is an important measurement method in the science of audio and acoustics measurement. It converts a signal into individual spectral components and thereby provides frequency information about the signal. FFTs are used for fault analysis, quality control, and condition monitoring of machines or systems. This article explains how an FFT works, the relevant parameters and their effects on the measurement result.**

Strictly speaking, the FFT is an optimized algorithm for the implementation of the "Discrete Fourier Transformation" (DFT). A signal is sampled over a period of time and divided into its frequency components. These components are single sinusoidal oscillations at distinct frequencies each with their own amplitude and phase. This transformation is illustrated in the following diagram. Over the time period measured, the signal contains 3 distinct dominant frequencies.

*
*

*View of a signal in the time and frequency domain*

**Step by step**

In the first step, a section of the signal is scanned and stored in the memory for further processing. Two parameters are relevant:

- The sampling rate or sampling frequency fs of the measuring system (e.g. 48 kHz). This is the average number of samples obtained in one second (samples per second).
- The selected number of samples; the
blocklength BL. This is always an integer power to the base 2 in the FFT (e.g., 2^10 = 1024 samples)

**Bandwidth fn** (= Nyquist frequency). This value indicates the theoretical maximum frequency that can be determined by the FFT.

*fn = fs / 2*

For example at a sampling rate of 48 kHz, frequency components up to 24 kHz can be theoretically determined. In the case of an analog system, the practically achievable value is usually somewhat below this, due to analog filters - e.g. at 20 kHz.

** Measurement duration D**. The measurement duration is given by the sampling rate fs and the

* D = BL / fs.
*

At fs = 48 kHz and BL = 1024, this yields 1024/48000 Hz = 21.33 ms

** Frequency resolution df**. The frequency resolution indicates the frequency spacing between two measurement results.

*df = fs / BL*

At fs = 48 kHz and BL = 1024, this gives a df of 48000 Hz / 1024 = 46.88 Hz.

In practice, the sampling frequency fs is usually a variable given by the system. However, by selecting the

- A small
blocklength results in fast measurement repetitions with a coarse frequency resolution. - A large
blocklength results in slower measuring repetitions with fine frequency resolution.

*Representation of the FFT of a signal with small and large*blocklength

**To Infinity…**

In the Fourier transformation, the assumption is that the sampled signal segment is repeated periodically for an infinite period of time. This brings two conclusions:

- The FFT is only suitable for periodic signals.
- The sampled signal segment must contain a whole number of periods.

It can be seen that condition 2. would apply only to very few signals. The sampling of a signal whose frequencies are not an integer multiple of df would begin and end within a block of 2^n samples with different values. This results in a jump in the time signal, and a "smeared" FFT spectrum. (aka Leakage)

*Un-windowed time signal with smeared spectrum*

Windowing

In order to prevent this smearing, in practice "windowing" is applied to the signal sample. Using a weighting function, the signal sample is more or less gently turned on and off. The result is that the sampled and subsequent "windowed" signal begins and ends at amplitude zero. The sample can now be repeated periodically without a hard transition.

*Windowed time signal with spectrum*

**A practical example**

A classic example of the signal theory is the spectral composition of a square-wave signal. This consists of the sum of all weighted odd multiples of the fundamental frequency.

This video shows the creation of a 500 Hz square wave as a time signal and spectrum.

**How to measure?**

The portable audio and acoustic analyzer XL2 is ideally suited for fast and simple FFT analysis up to 20 kHz. For multi-channel and more detailed analysis or calculations, a modern system with large bandwidth and fast signal processors such as the FLEXUS FX100 Audio Analyzer is required. In conjunction with the FX-Control PC software, the FFT can be easily and quickly adapted and visualized according to the requirements of the measurement. The larger internal memory of the FLEXUS FX100 allows significantly longer

**Preview of Part 2**

The second part of this article deals with these topics:

- Aliasing
- Window functions
- Averaging of spectra
- Power vs. Peak measurement
- Calculations with FFT results
- State analysis with FFT

Any questions? Please contact NTi Audio

Read part 2 of this article.

Read more about the FX100 Audio Analyzer

Read more about the XL2 Audio and Acoustic Analyzer