cancel
Showing results for 
Search instead for 
Did you mean: 

Window Types: Hanning, Flattop, Uniform, Tukey, and Exponential

Siemens Genius Siemens Genius
Siemens Genius

Window Types: Hanning, Flattop, Uniform, Tukey, and Exponential

 

There are several different types of windows used to reduce spectral leakage when performing a Fourier Transform of time data into the frequency domain.

 

In this article, the following windows will be discussed:

  • Hanning
  • Flattop
  • Uniform
  • Tukey
  • Exponential

This article explains some of the details and tradeoffs of using each of these windows.

In the article, the term ‘measurement time’ refers to the time acquired for a single average or FFT of data.  Sometime this is also referred to as ‘frame size’.

 

In several of the examples provided in the article, a frequency domain plot of the effects of a window on periodic and non-periodic data is shown.  In the case of the non-periodic data, it is created with a sine wave half way between two spectral lines to illustrate the worst case amplitude error.

 

To better understand the terms periodic and non-periodic, reading the Knowledge Base article 'Leakage and Windows' is recommended before reading the rest of this article.

 

Hanning

 

When doing noise and vibration measurements, the Hanning window is commonly used.  It is especially useful for random signals that are not periodic as shown in Figure 1. Examples of random signals can include sound generated by driving on a road, or vibration while a pump/motor is running.

 

Figure 1: After applying a Hanning window to random data (left), a random signal becomes smoother at the ends (right)Figure 1: After applying a Hanning window to random data (left), a random signal becomes smoother at the ends (right)

Random data can have severe leakage. Because the signal is not synced with the measurement, it can be cutoff abruptly at the beginning and end of the time block. This cutoff creates leakage, which a window will minimize.

 

Hanning windows are often used with random data because they have moderate (compared to other windows) impact on the frequency resolution and amplitude accuracy of the resulting frequency spectrum. The maximum amplitude error of a Hanning window is 15%, while the frequency leakage is typically confined to 1.5 Δf, or bins, to each side of the original signal.

 

The Hanning window starts at a value of zero and ends at a value of zero (Figure 2). In the center of the window, it has a value of one.  This gradual transition between 0 and 1 ensures a smooth change in amplitudes when multiplying the measured signal by the window, which helps reduce the spectral leakage.

 

Figure 2: Left – Time domain shape of Hanning window, Right – Frequency domain effect of Hanning window on periodic and non-periodic sine wave relative to the measurement timeFigure 2: Left – Time domain shape of Hanning window, Right – Frequency domain effect of Hanning window on periodic and non-periodic sine wave relative to the measurement time

The maximum amplitude error can be seen when viewing the spectrum of a non-periodic sine wave.  Using a RMS calculation around the frequency peak yields the correct value.

 

Flattop

 

The Flattop window has a better amplitude accuracy in frequency domain compared to the Hanning window (Figure 3).  The maximum amplitude error of a Flattop window is less than 0.01%. By contrast, the Hanning window maximum amplitude error is 15%. 

 

Figure 3 – Differences between Hanning and Flattop window for periodic (left) and non-periodic sine wave (right)Figure 3 – Differences between Hanning and Flattop window for periodic (left) and non-periodic sine wave (right)

A Flattop window confines leakage to 3.43 Δf to each side of the original signal. This is a wider frequency range than the 1.5 Δf width of the Hanning window.

 

Like a Hanning window, the Flattop window begins and ends with a value of zero.  The center of the window has a value of one (Figure 4).

Figure 4: Left – Time domain shape of Flattop window, Right – Frequency domain effect of Flattop window on periodic and non-periodic sine wave relative to measurement timeFigure 4: Left – Time domain shape of Flattop window, Right – Frequency domain effect of Flattop window on periodic and non-periodic sine wave relative to measurement time

The frequency accuracy of the Flattop window is more coarse compared to a Hanning window. As a result, the Flattop window is typically employed on data where frequency peaks are distinct and well separated from each other. 

 

One common application for a flattop window is performing calibration.  For example, a sound pistonphone only produces one single and distinct frequency during microphone calibration. In the ‘AC Calibration’ worksheet of LMS Test.Lab, pressing on the ‘Measurement Info’ shows that a Flattop window is being used (Figure 5).

 

Figure 5: In ‘AC Calibration’, a Flattop window is always usedFigure 5: In ‘AC Calibration’, a Flattop window is always used

To ensure amplitude accuracy, the calibration window type cannot be changed by the user.  A Flattop will always be used, even if a different window is selected for measuring.

 

Uniform

 

A Uniform window has a value of 1.0 across the entire measurement time as shown in Figure 6. In reality, a Uniform window could be called “no window”.  Depending on the data acquisition system used, sometimes the term “Rectangular” window is also used.

 

Figure 6: Left – Time domain shape of Uniform window, Right – Frequency domain effect of Uniform window on periodic and non-periodic sine wave relative to the measurement timeFigure 6: Left – Time domain shape of Uniform window, Right – Frequency domain effect of Uniform window on periodic and non-periodic sine wave relative to the measurement time

A Uniform window creates no frequency or amplitude distortion when the measured signal is periodic.  When a measured signal is not periodic, the amplitude is reduced by a maximum of 36% and the frequency content is spread over the entire bandwidth of the measurement.

 

Whenever a measurement signal is periodic, a Uniform window is preferred. Applying a Hanning or Flattop window to a periodic signal will actually create amplitude and frequency distortion.

 

Periodic signals can include:

  • A “burst random” signal that starts and ends at zero during the measurement time
  • Sinusoidal signals that have an integer relationship to the measurement time
  • Impact measurements that fully decay within the measurement time

However, if the signal cannot be guaranteed to be periodic, a Uniform window should be avoided.

 

Tukey

 

A Tukey window is very flat in the time domain, close to a value of 1.0 for a majority of the window. A ‘Taper Length’ can be specified which determines the amount of time that the window maintains a value of one (Figure 7).  The lower the taper length, the longer the Tukey has a value of one over the measurement time.

 

Figure 7: The ‘Taper length’ determines how much of the Tukey window has a value of zeroFigure 7: The ‘Taper length’ determines how much of the Tukey window has a value of zero

Typically, Tukey windows are used to analyze transient data. The advantage of a Tukey window is that the amplitude of transient signal in the time domain is less likely to be altered compared to using Hanning or Flattop (see Figure 8). In a Hanning or Flattop window, the value of the window equals one for a shorter span compared to the Tukey window.

 

Figure 8: Because the Tukey window is close to one for a longer period of time (left) than the Hanning window (right), it is ideal to capture the amplitude of transient eventsFigure 8: Because the Tukey window is close to one for a longer period of time (left) than the Hanning window (right), it is ideal to capture the amplitude of transient events

Typical impact events may last a few milliseconds.  Examples include vibration from jackhammers, bumps in the road, or diesel engine clatter.

 

Exponential

 

Exponential windows are often used in modal impact testing.  They are used to ensure the accelerometer response decays to zero (Figure 9) within the measurement time to avoid leakage issues.

 

Figure 9: The accelerometer signal (upper left) of a modal impact test is multiplied by an exponential window (middle) to ensure the windowed signal decays completely to zero (lower right) to avoid leakageFigure 9: The accelerometer signal (upper left) of a modal impact test is multiplied by an exponential window (middle) to ensure the windowed signal decays completely to zero (lower right) to avoid leakage

An exponential window starts with a value of 1.  The exponential decay parameter, a value between 0% and 100%, determines how much the initial value of the exponential window is reduced by the end of the measurement.  For example, a decay parameter of 25% means that the window decays to a quarter of the original amplitude by the time the measurement is finished, as shown in Figure 10.

 

Figure 10: Varying decay parameters for an exponential windowFigure 10: Varying decay parameters for an exponential window

An exponential decay parameter of 100% is the same as a Uniform window (or not applying a window).  When doing modal impact testing, a decay of 100% is preferred if the signal decays to zero in the measurement time frame.

 

When an exponential window is applied, the measured signal appears to decay more quickly than the original signal (Figure 11).

 

Figure 11: Applying an exponential window to a signal makes it appear to decay more quickly, giving the appearance of added dampingFigure 11: Applying an exponential window to a signal makes it appear to decay more quickly, giving the appearance of added damping

By decaying faster, artificial damping is added to the resulting measurement.  Using the exponential decay parameter recorded in the data, modal curvefitters in LMS Test.Lab can remove the effects and report the correct modal damping values.

 

Conclusions

 

Selecting a window to match the measurement data circumstances is important to get accurate and useful data. For example, a Flattop window is ideal for performing a calibration, while an Exponential window is not appropriate.

 

Hopefully this article provides useful guidance on which windows to use and under what circumstances.

  

Note: Windows affect both the amplitude and frequency content of a signal.  In this article, all spectral data had an amplitude correction factor applied. Read the knowledge base article ‘Amplitude and Energy correction factors’ to learn more about amplitude and energy correction due to windows.

 

Questions?  Call us!

 

Related Links:

 

Contributors