Transcription of APPLICATION NOTE AN014 Understanding FFTWindows
1 UnderstandingFFTW indowsAPPLICATION NOTEAN014 IntroductionFFT based measurements are subject to errors froman effect known as leakage. This effect occurs whenthe FFT is computed from of a block of data which isnot periodic. To correct this problem appropriate win-dowing functions must be applied. The user mustchoose the appropriate window function for the specif-ic APPLICATION . When windowing is not applied correct-ly, then errors may be introduced in the FFT ampli-tude, frequency or overall shape of the spectrum . Thisapplication note describes the phenomenon of leak-age, the various windowing functions and theirstrengths and weaknesses, and examples are givenfor various Background Most dynamic signal analyzers (Figure 1) computetime and frequency measurements.
2 Time measure-ments include capturing time traces of measured sig-nals, including filtering and statistical measurements that are computed by mostDSAs include Fast Fourier Transform, Power SpectralDensity, Frequency Response Functions, Coherenceand many more. These signals are computed in theDSP from the digitized time data. Time data is digi-tized and sampled into the DSP block by block. A blockis a fixed number of data points in the digital timerecord. Most frequency functions are computed fromone block of data at a time. A block of data is alsocalled a time record or time Fast Fourier Transform (FFT) is the FourierTransform of a block of time data points.
3 It repre-sents the frequency composition of the time 2 shows a 10 Hz sine waveform (top) and theFFT of the sine waveform (bottom). A sine wave iscomposed of one pure tone indicated by the single dis-crete peak in the FFT with height of at 10 Hz. LeakageThe FFT computation assumes that a signal is periodic ineach data block, that is, it repeats over and over againand it is identical every time. Note this was the case inFigure 2 because there are an interger number of cyclesof the sine wave in the data record. Another type of sig-nal that satisfies the periodic requirement is a transientsignal that starts at zero at the beginning of the time win-dow and then rises to some maximum and decays againto zero before the end of the time 1.
4 Dactron FocusTM(left) and the Dactron PhotonTM(right)Dynamic Signal AnalyzersFigure 2. Time waveform of sine function (top) and FFT (bottom).When the FFT of a non-periodic signal is computedthen the resulting frequency spectrum suffers fromleakage. Leakage results in the signal energy smear-ing out over a wide frequency range in the FFT when itshould be in a narrow frequency range. Figure 3 illus-trates the effect of leakage. The left-top graph showsa 10 Hz sine wave with amplitude that is periodicin the time frame. The resulting FFT (bottom-left)shows a narrow peak at 10 Hz in the frequency axiswith a height of as expected.
5 Note the dB scaleis used to highlight the shape of the FFT at low right-top graph shows a sine wave that is not peri-odic in the time frame resulting in leakage in the FFT(bottom-right). The amplitude is less than the expect-ed value and the signal energy is more dispersed shape of the FFT makes it more difficultto identify the frequency content of the measured Reduces Leakage In a signal analyzer the time record length is adjustablebut it must be selected from a set of predefined val-ues. Since most signals are not periodic in the prede-fined data block time periods, a window must beapplied to correct for leakage.
6 A window is shaped sothat it is exactly zero at the beginning and end of thedata block and has some special shape in function is then multiplied with the time data blockforcing the signal to be periodic. A special weightingfactor must also be applied so that the correct FFTsignal amplitude level is recovered after the window-ing. Figure 4 shows the effect of applying a Hanningwindow to a pure sine tone. The left-top plot shows asine tone that is not periodic in the time window with-out the windowing function resulting in leakage in theFFT (left-bottom). When a Hanning window is applied (top-right), then theleakage is reduced in the FFT (bottom-right).
7 The result-ing spectrum is a sharp narrow peak with amplitude Notice that it does not have exactly the same shapeas the FFT of the original periodic sine wave in Figure 3,but the amplitude and frequency errors resulting fromleakage are corrected. A Windowing function minimizesthe effect of leakage to better represent the frequencyspectrum of the functions are most easily understood in thetime domain; however, they are often implemented in thefrequency domain instead. Mathematically there is nodifference when the windowing is implemented in the fre-quency or time domains, though the mathematical proce-dure is somewhat different.
8 When the window is imple-mented in the frequency domain, the FFT of the windowfunction is computed one time and saved in memory andthen it is applied to every FFT frequency value correctingthe leakage in the FFT. This gives rise to one measureof the window's characteristics, known as the side FFT of a window has a peak at the applied frequencyand other peaks, called side lobes, on either side of theapplied frequency. The height of the side lobes indicateswhat affect the windowing function will have on frequen-cies around the applied frequency. In general, lower sidelobes reduce the leakage in the measured FFT butincrease the bandwidth of the major lobe.
9 2 Figure 3. Comparison of periodic sine wave (left) and FFT to nonperiodic (right) with leakage in the 4. Comparison of non periodic sine wave and FFT withleakage (left) to windowed sine wave and FFT showing no leakage(right).Figure 5 shows the Hanning windowing function andits FFT. The highest side lobe is -32 dB. Comparethis with the Flat Top windowing function in Figure highest side lobe is much lower (-74), but themain lobe bandwidth is significantly wider. A comparison of an FFT of a non-periodic sine wavewith Hanning and Flat Top windows is shown in Figure7. 3 Figure 8 shows a frequency response function of a beammeasured with an impact hammer and accelerometerwith and without a window.
10 In this case, leakage drasti-cally affects the overall shape of the spectrum . Theunwindowed spectrum totally obscures the first anti-res-onance and it also caused some aplitude errors in thespectrum peaks that correspond to the structure s a Windowing FunctionFFT windows reduce the effects of leakage but can noteliminate leakage entirely. In effect, they only change theshape of the leakage. In addition, each type of windowaffects the spectrum in a slightly different way. Many dif-ferent windows have been proposed over time, each withits own advantage and disadvantage relative to the oth-ers. Some are more effective for specific types of signaltypes such as random or sinusoidal.