Effects of windowing on the spectral content of a signal
暂无分享,去创建一个
Figure 3. Spectrum of a sine wave with the Hanning window: (a) f = f0; (b) f = f0 – ∆f/8; (c) f = f0 – ∆f/2. Fourier analysis is commonly used to estimate the spectral content of a measured signal. When choosing the appropriate window, one needs to be aware of its advantages and pitfalls in order to fit the measurement situation. The following deals with some practical considerations on the effects of windowing.1 The Fourier series assumes periodicity of the signal in the time domain. An FFT is actually a Fourier Series performed upon an interval, Tspan = n∆t where n is the number of samples observed and ∆t is the constant time between samples. Since the sampled time signal may not exactly contain an integer number of periods, this assumption may not be truly satisfied. In effect, the truncation of the original signal corresponds to its multiplication with a Rectangular window of length Tspan. The Fourier series then assumes that the signal is the succession of versions of this truncated signal in the time domain leading to a spectrum with harmonic components at frequencies equal to multiples of ∆f = 1/TSpan. Let us examine the situation with a sine wave of frequency f0. In theory the corresponding spectrum is a peak at f0. When a noninteger number of periods is acquired, this results in signal leakage, characterized by the smearing of the spectrum. Figure 1 illustrates this phenomenon by comparing three cases, where f is the sine wave frequency and ∆f the frequency resolution. Case 1(a) allows us to determine the ideal situation where an integer number of periods (200) is set for the signal generator. The corresponding frequency is f0 = 508.626 Hz. In practice this case is not likely to occur, because the frequency that is being measured rarely falls on a frequency line. On the other hand, case 1(b) represents a typical situation where the leakage is clearly visible. Here f has been slightly decreased, which results in a non-integer number of periods within Tspan. The maximum leakage is obtained in case 1(c). Why? The answer lies in the spectrum of the window as shown in Figure 2(a). The FFT emulates a bank of parallel bandpass filters with the center frequencies exactly centered on integer multiples of ∆f. The width and shape of each filter is identical and are given by the spectrum of the observation window shown in Figure 2. Note that the filter shape is characterized by multiple lobes separated by zero values at multiples of ∆f and that all filters in the bank ‘overlap.’ When f of an applied sine corresponds exactly to a filter center-frequency [case 1(a)], only that filter will respond because f corresponds to an amplitude notch of all other filters in the bank. Conversely, if f is not exactly on a frequency line [case 1(b)], the energy at f is smeared over adjacent frequencies because the secondary lobes of all other filters overlap f with nonzero gain and these filters respond in proportion to this gain. This perverse effect is maximum when f = f0 – ∆f/2 [case 1(c)], since the frequency f coincides with the peak of each side lobe. If side lobes could be reduced in amplitude, this error would decrease as well. This is why people have used a number of windows to weight the truncated signal such that the starting value and the ending value are zero. This produces a signal that appears periodic in Tspan, meeting the basic assumption of the Fourier Series. Weighting avoids the sharp discontinuities induced by the Rectangular window and yields reducedamplitude side lobes as desired. Figure 2(b) shows the spectrum of the well known Hanning2 window. Observe that the amplitude of the first side-lobe is reduced from –13.2 dB to –32.2 dB. More importantly, notice that the amplitudes of subsequent side-lobes fall off at 60 dB/ decade as opposed to 20 dB/decade for the Rectangular window. These improvements come at a cost. The width of the primary lobe essentially doubles, eliminating the first set of zeroamplitude points. The primary lobe of the Rectangular window has a –3 dB bandwidth of 0.85 ∆f. That of the Hanning window is increased to 1.4 ∆f. However, the benefits far outweigh the cost as shown in Figure 3. Here the Hanning window is applied to the three cases previously examined. Indeed results with the Hanning window are close to case 1(a) done with the Rectangular window (ideal case). However, the Hanning window exhibits a deficiency. Like the Rectangular window, its primary lobe has significant curvature or ‘ripple’ across the ±∆f band. When a sine falls “exactly between cells,” its amplitude is reported 15% (–1.42 dB) lower than it would be at the filter center-frequency. The Rectangular window exhibits this same fault, but more pronounced at 36% (–3.92 dB). When the application requires an accurate measure of peak amplitude (e.g. rotating machinery), the Flat-Top window is usually selected. Its spectrum is characterized by a nearly flat main lobe across fi ±∆f, which reduces maximum amplitude error to 0.1%! As for the side lobes, their amplitudes remain at –70 dB below that of the main lobe, which strongly reduces leakage. However this window must be used with care, particularly if the periodic signal of interest is ‘buried’ in broadband noise. The Flat-Top window should only be applied to clean periodic waveforms. It is indeed a poor choice for random-signal or mixed-signal analysis because it lacks selectivity. A Hanning