Skip to main content

Select your region & language

Global

Region

Technical Report on FFT Analyzer 13

7. FFT and Time Windows

7.2 Hanning window

The Hanning window is a practical window function that is often associated with FFT.

The Hanning window is given by the following formula:

Equation 7-8

This Fourier transform is;

  • Equation 7-9

Express W (f) using DFT;

When n / T (n = 0): 0.5

When n = ±1: 0.25

n = Other times: 0

Power attenuation rate = -4.26 dB

Figure 7-10 shows the results of Equation 7-9. As you can see from the figure, the main lobe of the spectrum is approximately twice as wide compared to the rectangular window, while the side lobes decrease rapidly.

  • Figure 7-10

The Hanning window has the characteristic of clearer separation of f 0 than the rectangular window due to less leakage on the high-frequency side. To achieve the same frequency resolution as the previous rectangular window, the length of the window must be taken as 2 times 2T. To set the window length to 2T in the FFT analyzer, it will be necessary to either lower the frequency range or use the data length modification function.

In the rectangular window, the trimmed waveform has no amplitude distortion, but when applying the Hanning window, the amplitude of the waveform is distorted, resulting in a decrease in its power.

The normalized power, multiplied by 1 / 0.5 T so that the amplitude of f 0 can be read directly, is;

(Equation 7-10)

b = 3/2 T, which means that the Hann window is 1.5 times wider than the filter width of the rectangular window.

The power of w(t) before normalization is;

Equation 7-11

In comparison to the rectangular window, there is a power reduction of -4.26 dB. This value will be noted as the power reduction rate after each window type.

When calculating the overall value of the spectrum, it results in a value that is 3/2 times larger compared to using a rectangular window. Therefore, the FFT analyzer performs a window correction during the overall calculation and displays it.

7.3 Hamming window

The Hamming window is a window that further reduces the spectrum of the side lobe adjacent to the main lobe of the Hanning window. With the Hamming window, the side lobe is less than 1/100 of the main lobe.

The Hamming window and its spectrum are given by the following equation:

(Equation 7-12)

(Equation 7-13)

In the DFT of W m (f):

When n / T (n = 0): 0.54

When n = ±1: 0.23

n = Other times: 0

Power reduction rate: -4.0 dB

Equation 7-13 is shown in Figure 7-11.

  • Figure 7-11

7.4 Flat-Top Window

The spectra of rectangular, Hanning, and Hamming windows are not flat at the peak. Therefore, for waveforms with line spectra such as cosine waves, sine waves, and square pulse waves, when performing a DFT, the magnitude of the spectrum corresponding to each frequency is represented by a value smaller than the actual one unless the length of the time window is an exact integer multiple of the wave's period. To address this, the flat-top window was devised as a time window that does not cause significant changes in the magnitude of frequency components even if the length of the time window is not an integer multiple of the fundamental period. The flat-top window is created by multiplying the Hamming window by a waveform sin(4πt/T)/(4πt/T) that has a flat spectrum from -2/T to +2/T, resulting in a spectrum that is flat at the peak as shown in Figure 7-12.

The Flat Top Window is a window function devised by Kenichi Kido, the author of the reference book 'Introduction to Digital Signal Processing' used in this explanation.

Expressing a flat top window in a formula:

(Equation 7-14)

Furthermore, this Fourier transform is given by the following expression as a convolution integral of equations 7-13 and 7-16.

(Equation 7-15)

Here:

(Equation 7-16)

Power reduction rate: -7.0 dB

Equations 7-14 and 7-15 are shown in Figure 7-12.

  • Figure 7-12

7.5 Approximate Calculation of Flat Top Window

Expressing in DFT is not easy, so here, as a practice for convolution integrals, let's adopt the main part of the Hanning window and the discrete spectral values from equations 7-13 and 7-16, and perform the convolution integral from equation 7-15.

(Equation 7-17)

Equation 7-18

The convolution integral is, as mentioned earlier, a moving average, so let W m (f) be the station from x (1) to x (12), and P 2/T (f) be the trains from y (1) to y (5) at the front, and let's consider the trains passing through the station to calculate W f (n). The details of this calculation are shown in Table 1, and a simplified diagram of the obtained W f (f) is shown in Figure 7-13.

X(1) X(2) X(3) X(4) X of 5 X(6) X(7) X(8) X(9) X(10) X(11) X(12)    
0 0 0 0 0 0.23 0.54 0.23 0 0 0 0    
W(1) 0 1 y 5 1 y 4 1 y 3 1 y 2 1 y 1              
W(2) 0.23   1 1 1 1 1 y 1            
W(3) 0.77     1 1 1 1 1 y 1          
W(4) 1       1 1 1 1 1 y 1        
W(5) 1         1 1 1 1 1 y 1      
W(6) 1           1 1 1 1 1 y 1    
W(7) 0.77             1 1 1 1 1 y 1  
W(8) 0.23               1 1 1 1 1 y 1
W(9) 0                 1 1 1 1 y 2

Table 1: Approximate Calculations for Flat-Top Window (Convolution Integrals)

  • Figure 7-13: DFT of the flat-top window obtained from Table 1.

For example, the formulas to find W f (4) and W f (5) are shown by omitting the multiplication by 0;

W (4) = x (8) y (1) + x (7) y (2) + x (6) y (3) + x (5) y (4) + x (4) y (5)

W (5) = x (9) y (1) + x (8) y (2) + x (7) y (3) + x (6) y (4) + x (5) y (5)

will become.

The flat-top window is not suitable for separating closely spaced line spectra, but it is a very effective window function for accurately determining the amplitude of those line spectra.

Figure 7-14 shows the overlapping display of one side of the main part of each window, which clearly illustrates the differences caused by the windows (filters).

  • Figure 7-14 Level Accuracy of Filter Shape Using Window (Main Lobe)

In general, when analyzing periodic signals or random signals with an emphasis on frequency, the Hanning window is used; when emphasizing amplitude, the flat-top window is used; and when measuring transfer functions in impact tests, the rectangular window is said to be used. This can be understood from the characteristics of each window. Additionally, the longer the time length T is taken, the smaller the power of leakage error becomes, thereby reducing its impact. Other various window functions have also been proposed, but I will refrain from discussing them here.

The features of the windows that have been discussed so far are shown in Table 2 for your reference.

Window Name -3dB bandwidth Maximum Side Rope
(dB)
Roll-off
(Damping characteristics of side ropes)
dB/OCT
Equivalent Signal Bandwidth
(b)
Power reduction rate
(dB)
Level Accuracy
(Attenuation of points 1.5/T)
(dB)
rectangular 0.89 tons 13 -6 1.00/T 0 -3.9
Hanning 1.44/T -32 -18 1.50/T 4.26 -1.42
Humming 1.30/T -43 -6 1.36/T 4.01  
Flat top       3.67/T 7.0 -0.1

Table 2: Features of Windows