Skip to content

Select your region & language

Global

Region

Frequency Analysis from the Basics (14) - "DFT (FFT) and Time Windows"

This time, we will discuss the time window,​ ​one of the most important and noteworthy functions of an FFT analyzer as a digital frequency analyzer. Since FFT is a specific algorithm that performs DFT, we will treat them as the same in this explanation.

As discussed in "Frequency Analysis from the Basics (8) -Discrete Fourier Transform (DFT)," applying the DFT (Discrete Fourier Transform) to a continuous time signal requires discretization and finiteization of the time signal. For the first discretization, the frequency bandwidth is limited before sampling using an anti-aliasing filter, allowing for analysis with almost no error. However, since numerical calculations can only realistically handle a finite amount of data, the second process involves extracting a certain number of points (specifically, the number of points used in the FFT calculation) from the discretized digital data and performing a finite DFT. This process of extracting a continuous time signal is called applying a time window. Various time windows (window functions) have been devised to minimize spectral errors caused by this finiteization process. This time, we will introduce the characteristics and applications of representative window functions equipped in FFT analyzers.

Performing an FFT analysis on digital data discretized at a sampling frequency​ ​fs, where only N points are extracted, means that, due to the properties of DFT, it is calculated as a continuous periodic function with a repetition period of T seconds (= N/fs). This T is called the time window length. If this time window length T is an integer multiple of the period of the input signal (which is practically impossible), then the time signal being analyzed becomes equal to the original time signal, and the correct spectrum is calculated (Figure 1). If this is not the case (which is the case for most actual signals), the waveform becomes discontinuous at the beginning and end of the extracted time window length T, resulting in waveform distortion and a broadening of the spectrum centered around that frequency (the reciprocal of the input signal period)​ ​(Figure 2).

  • Figure 1: Example of FFT analysis when the time window length T is an integer multiple of the input signal period.
    Figure 1: Example of FFT analysis when the time window length T is an integer multiple of the input signal period.
  • Figure 2: Example of FFT analysis when the time window length T is not an integer multiple of the input signal period.
    Figure 2: Example of FFT analysis when the time window length T is not an integer multiple of the input signal period.

In this way, the dominant frequency component peak (main lobe) decreases, and gentle tails (side lobes) appear on both sides of the peak, causing the peak's energy to leak out into its vicinity. This phenomenon is called leakage error. Therefore, as shown in Figure 3 (in this example, the Hanning window, which will be discussed later), this error can be reduced by applying a time window that is zero at the beginning and end of the FFT analysis. Thus, in a typical FFT analyzer, a specially designed time window is used to process the data so that the side lobes are as small as possible in order to obtain the spectrum.

  • Figure 3: Example of FFT analysis with a Hanning window applied.
    Figure 3: Example of FFT analysis with a Hanning window applied.

Below, we will explain three common types of time windows.

First, there is the rectangular window. This window is simply a time window function obtained by cutting out an interval of time window length T, and it is the most basic and important time window that serves as the basis for other time windows. As shown in Figure 2, the largest side lobes appear, so it is not very suitable for normal continuous time waveforms, but for time waveforms such as shock waves, it does not distort the waveform, so the spectrum can be determined accurately.

If we define the window function of a square wave as given by equation (1), then its spectrum is given by equation (2).

  • Frequency Analysis from the Basics (14) - "DFT (FFT) and Time Windows" No. 1

.................................(1)

  • Frequency Analysis from the Basics (14) - "DFT (FFT) and Time Windows" No. 2

.................................(2)

Furthermore, the shape of the square wave and its spectrum are shown in Figure 4.

  • Figure 4: Shape of a rectangular window and its spectrum.
    Figure 4: Shape of a rectangular window and its spectrum.

Now, let's give a qualitative explanation of why the spectrum looks like Figure 2. The waveform actually subjected to the FFT is the product of the continuous time signal x(t) before cutting and the time window w(t) from equation (1), so its frequency spectrum is the convolution of each Fourier transform between the original time signal and the time window function. For example, if the input signal x(t) is a sine wave with frequency f1, its spectrum will have a center frequency of f1 and its shape will be as shown in the lower part of Figure 4. In the case of Figure 1, the center frequency f1 is exactly in the middle of the spectrum of the square window, and all the side lobes are zero (null), resulting in the spectrum of Figure 1. In contrast, in the case of Figure 2, the peak is shifted and drops off, and the side lobes also trace the peaks on both sides, resulting in the spectrum of Figure 2.

As an important parameter for evaluating the properties of the time window function, Equivalent Noise Bandwidth
Bandwidth,below ENBW) This is because the main lobe contains the total energy of the spectrum.
This corresponds to the practical resolution width of an FFT analyzer, with the equivalent bandwidth normalized by the peak value.

  • Frequency Analysis from the Basics (14) - "DFT (FFT) and Time Windows" No. 3

.................................(3)

  • Frequency Analysis from the Basics (14) - "DFT (FFT) and Time Windows" No. 4

.................................(4)

  • Figure 5 Equivalent noise bandwidth
    Figure 5 Equivalent noise bandwidth

The ENBW of the square window is Δf itself, which is the reciprocal of the time window length T.
The calculated frequency resolution Δf in wavenumber analysis is called the frequency bin (or simply bin).
It is called that.

Next is the Hanning window, which also appeared in Figure 3. This marks the beginning of the time window length T.
And to prevent discontinuities in the waveform at the end, the cut time waveform is distorted to forcibly connect the beginning and end.
This is a time window with its end point set to 0, and it is the most commonly used FFT analyzer.

If we define the window function of the Hanning window as equation (5), then its spectrum is given by equation (6).

.................................(5)

  • Frequency Analysis from the Basics (14) - "DFT (FFT) and Time Windows" No. 6

.................................(6)

Furthermore, the shape of the Hanning window and its spectrum are shown in Figure 6.

  • Frequency Analysis from the Basics (14) - "DFT (FFT) and Time Windows" No. 6
    Figure 6. Hanning window and its spectrum

 

The ENBW of the Hanning window can be found from equation (4):

  • Frequency Analysis from the Basics (14) - "DFT (FFT) and Time Windows" No. 7

.................................(7)

Thus, the Hanning window has a worse equivalent resolution compared to the square window, but the side
The lobe characteristics have been greatly improved, and small spectra buried by side lobes in the square window are no longer visible.
This makes it possible to detect the components.
Furthermore, compared to the square window, a weight is applied that decreases before and after the time window, thus affecting the overall power
This will result in a decrease. The ratio of the power with the window installed to the power with the square wave window is Power reduction rate
It is called and is defined by equation (8).

  • Frequency Analysis from the Basics (14) - "DFT (FFT) and Time Windows" No. 8

The power reduction rate for the Hanning window is 3/8 (= -4.6 dB).

lastly, Flat-top window That's it. The square windows and Hannings that I've explained so far...
The top of the spectrum of windows and other similar structures is not flat. Therefore, line spectral structures such as sine waves are not flat.
When analyzing signals with a peak, the peak will be attenuated, as shown in the example in Figure 2.
Flat-top windows were designed to prevent this problem.

This window is constructed in the opposite way to the time window function, aiming to be as flat as possible at the peak points on the frequency axis.
Next, we take the form of equation (2) on the time axis and apply an appropriate window function to it. From here,
The time function for a flat-top window is approximately given by equation (9).

  • Frequency Analysis from the Basics (14) - "DFT (FFT) and Time Windows" No. 9

.................................(9)

The shape of the flat-top window and its spectrum are shown in Figure 7.

  • Figure 7 Flat-top window and its spectrum
    Figure 7 Flat-top window and its spectrum

From equations (4) and (9), we can calculate the ENBW of this window.

...............................(10)

Thus, flat-top windows have very poor equivalent resolution and multiple adjacent peaks.
It is not suitable for spectral analysis like this, but the main lobe is almost flat, so line spectrum
Suitable for reading the peak of the Torr.

Actual FFT analyzers analyze data using a set of filters corresponding to the filter shape of the selected time window.
This is equivalent to having a number of lines L arranged at frequency bin intervals of Δf.

As shown in Figure 8, when the time window length T is not an exact integer multiple of the period of the input signal, the adjacent
There is a drop in performance between the matching filters, so Picket fence We call it an effect.

  • Figure 8: Picket fence effect of hourly window
    Figure 8: Picket fence effect of hourly window

Figure 9 compares the maximum drop-through (level accuracy) of the three filters described so far.

  • Figure 9: Picket fence effect of the time window
    Figure 9: Picket fence effect of the time window

 

Table 1 summarizes the explanations given so far.

Table 1 Typical types and characteristics of time windows used in FFT analyzers

Time window ENBW Level accuracy (dB) frequency resolution Main uses
Rectangle 1 Δf -3.9 ・Transient signal
- Hammering test
Hanning 1.5 Δf -1.42 - Continuous signal
• General measurements
Flat Top 3.671 Δf ±0.1 - Peak values of the line spectrum
reading

In a very rough way, when selecting a time window in an FFT analyzer, it means "the waveform of a transient phenomenon..."
These are rectangular windows, and the others are Hanning windows.

Finally, here's a summary.

  1. To apply the Discrete Fourier Transform (DFT) to a continuous time signal, the time signal
    Discretization and finiteization are necessary.
  2. For discretization, before discretizing (sampling) the time signal, anti-aging
    By using a rearing filter, analysis can be performed with virtually no error.
  3. For finiteization, in order to minimize errors, before performing the FFT...
    You need to apply the optimal time window.
  4. A rectangular window is simply a window function cut out by a time window length T, and its frequency resolution is much lower.
    While this is also acceptable, it produces many side lobes and should not be used for continuous signals.
    It is suitable for transient waveforms such as those in hammering tests.
  5. The Hanning window is the most common time window in FFT analyzers and is used for typical continuous time signals.
  6. The flat-top window is a time window designed to minimize filter drop-off on the frequency axis, making it ideal for reading peak levels of non-adjacent line spectra.

【keyword】
Time window, discretization, finiteization, anti-aliasing filter, time window length,
Main lobe, side lobe, leakage error, leakage error, square window, rectangular window, rectangular window
Dual window, convolution, equivalent noise bandwidth, ENBW, frequency bin, Hanning window, power reduction
Low rate, flat top windows, picket fence effect, level accuracy


[Reference materials]

  1. "Digital Fourier Analysis (I) - Fundamentals -" by Kenichi Kido, Corona Publishing Co., Ltd. (2007)
  2. "Easy Guide to Using an FFT Analyzer," edited by Yamaguchi and Ono, Ohmsha (1994)

(Excerpt from the email newsletter issued on March 20, 2014)