Resolving Sinusoids
We saw in §5.4.1 that our ability to resolve two closely spaced sinusoids is determined by the mainlobe width of the window transform we are using. We will now study this relationship in more detail.
For starters, let's define mainlobe bandwidth very simply (and somewhat crudely) as the distance between the first zerocrossings on either side of the main lobe, as shown in Fig.5.10 for a rectangularwindow transform. Let denote this width in Hz. In normalized radian frequency units, as used in the frequency axis of Fig.5.10, Hz translates to radians per sample, where denotes the sampling rate in Hz.
For the length unitamplitude rectangular window defined in §3.1, the DTFT is given analytically by
where is frequency in Hz, and is the sampling interval in seconds ( ). The main lobe of the rectangularwindow transform is thus ``two side lobes wide,'' or
(6.24) 
as can be seen in Fig.5.10.
Recall from §3.1.1 that the sidelobe width in a rectangularwindow transform ( Hz) is given in radians per sample by
(6.25) 
As Fig.5.10 illustrates, the rectangularwindow transform mainlobe width is radians per sample (two sidelobe widths). Table 5.1 lists the mainlobe widths for a variety of window types (which are defined and discussed further in Chapter 3).

Other Definitions of Main Lobe Width
Our simple definition of mainlobe bandwidth (distance between zerocrossings) works pretty well for windows in the BlackmanHarris family, which includes the first six entries in Table 5.1. (See §3.3 for more about the BlackmanHarris window family.) However, some windows have smooth transforms, such as the HannPoisson (Fig.3.21), or infiniteduration Gaussian window (§3.11). In particular, the true Gaussian window has a Gaussian Fourier transform, and therefore no zero crossings at all in either the time or frequency domains. In such cases, the mainlobe width is often defined using the second central moment.^{6.5}
A practical engineering definition of mainlobe width is the minimum distance about the center such that the windowtransform magnitude does not exceed the specified sidelobe level anywhere outside this interval. Such a definition always gives a smaller mainlobe width than does a definition based on zero crossings.
In filterdesign terminology, regarding the window as an FIR filter and its transform as a lowpassfilter frequency response [263], as depicted in Fig.5.11, we can say that the side lobes are everything in the stop band, while the main lobe is everything in the pass band plus the transition band of the frequency response. The pass band may be defined as some small interval about the midpoint of the main lobe. The wider the interval chosen, the larger the ``ripple'' in the pass band. The pass band can even be regarded as having zero width, in which case the main lobe consists entirely of transition band. This formulation is quite useful when designing customized windows by means of FIR filter design software, such as in Matlab or Octave (see §4.5.1, §4.10, and §3.13).
Simple Sufficient Condition for Peak Resolution
Recall from §5.4 that the frequencydomain image of a sinusoid ``through a window'' is the window transform scaled by the sinusoid's amplitude and shifted so that the main lobe is centered about the sinusoid's frequency. A spectrum analysis of two sinusoids summed together is therefore, by linearity of the Fourier transform, the sum of two overlapping window transforms, as shown in Fig.5.12 for the rectangular window. A simple sufficient requirement for resolving two sinusoidal peaks spaced Hz apart is to choose a window length long enough so that the main lobes are clearly separated when the sinusoidal frequencies are separated by Hz. For example, we may require that the main lobes of any BlackmanHarris window meet at the first zero crossings in the worst case (narrowest frequency separation); this is shown in Fig.5.12 for the rectangularwindow.
To obtain the separation shown in Fig.5.12, we must have Hz, where is the mainlobe width in Hz, and is the minimum sinusoidal frequency separation in Hz.
For members of the term BlackmanHarris window family, can be expressed as , as indicated by Table 5.1. In normalized radian frequency units, i.e., radians per sample, we have . For comparison, Table 5.2 lists minimum effective values of for each window (denoted ) given by an empirically verified sharper lower bound on the value needed for accurate peakfrequency measurement [1], as discussed further in §5.5.4 below.

We make the mainlobe width smaller by increasing the window length . Specifically, requiring Hz implies
(6.26) 
or
Thus, to resolve the frequencies and , the window length must span at least periods of the difference frequency , measured in samples, where is the effective width of the main lobe in sidelobe widths . Let denote the differencefrequency period in samples, rounded up to the nearest integer. Then an `` term'' BlackmanHarris window of length samples may be said to resolve the sinusoidal frequencies and . Using Table 5.2, the minimum resolving window length can be determined using the sharper bound as .
Periodic Signals
Many signals are periodic in nature, such as short segments of most tonal musical instruments and speech. The sinusoidal components in a periodic signal are constrained to be harmonic, that is, occurring at frequencies that are an integer multiple of the fundamental frequency .^{6.6} Physically, any ``driven oscillator,'' such as bowedstring instruments, brasses, woodwinds, flutes, etc., is usually quite periodic in normal steadystate operation, and therefore generates harmonic overtones in steady state. Freely vibrating resonators, on the other hand, such as plucked strings, gongs, and ``tonal percussion'' instruments, are not generally periodic.^{6.7}
Consider a periodic signal with fundamental frequency Hz. Then the harmonic components occur at integer multiples of , and so they are spaced in frequency by . To resolve these harmonics in a spectrum analysis, we require, adapting (5.27),
(6.28) 
Note that is the fundamental period of the signal in samples. Thus, another way of stating our simple, sufficient resolution requirement on window length , for periodic signals with period samples, is , where is the mainlobe width in bins (when critically sampled) given in Table 5.2. Chapter 3 discusses other window types and their characteristics.
Specifically, resolving the harmonics of a periodic signal with period samples is assured if we have at least
 periods under the rectangular window,
 periods under the Hamming window,
 periods under the Blackman window,
 periods under the BlackmanHarris term window,
Tighter Bounds for Minimum Window Length
[This section, adapted from [1], is relatively advanced and may be skipped without loss of continuity.]
Figures 5.14(a) through 5.14(d) show four possible definitions of mainlobe separation that could be considered for purposes of resolving closely spaced sinusoidal peaks.
In Fig.5.14(a), the main lobes sit atop each other's first zero crossing. We may call this the ``minimum orthogonal separation,'' so named because we know from Discrete Fourier Transform theory [264] that sample segments of sinusoids at this frequencyspacing are exactly orthogonal. ( is the rectangularwindow length as before.) At this spacing, the peak of each main lobe is unchanged by the ``interfering'' window transform. However, the slope and higher derivatives at each peak are modified by the presence of the interfering window transform. In practice, we must work over a discrete frequency axis, and we do not, in general, sample exactly at each mainlobe peak. Instead, we usually determine an interpolated peak location based on samples near the true peak location. For example, quadratic interpolation, which is commonly used, requires at least three samples about each peak (as discussed in §5.7 below), and it is therefore sensitive to a nonzero slope at the peak. Thus, while minimumorthogonal spacing is ideal in the limit as the sampling density along the frequency axis approaches infinity, it is not ideal in practice, even when we know the peak frequencyspacing exactly.^{6.8}
Figure 5.14(b) shows the ``zeroerror stationary point'' frequency spacing. In this case, the mainlobe peak of one sits atop the first local minimum from the mainlobe of the other . Since the derivative of both functions is zero at both peak frequencies at this spacing, the peaks do not ``sit on a slope'' which would cause the peak locations to be biased away from the sinusoidal frequencies. We may say that peakfrequency estimates based on samples about the peak will be unbiased, to first order, at this spacing. This minimum spacing, which is easy to compute for BlackmanHarris windows, turns out to be very close to the optimal minimum spacing [1].
Figure 5.14(c) shows the minimum frequency spacing which naturally matches sidelobe level. That is, the main lobes are pulled apart until the mainlobe level equals the worstcase sidelobe level. This spacing is usually not easy to compute, and it is best matched with the Chebyshev window (see §3.10). Note that it is just a little wider than the stationarypoint spacing discussed in the previous paragraph.
For ease of comparison, Fig.5.14(d) shows once again the simple, sufficient rule (''full mainlobe separation'') discussed in §5.5.2 above. While overly conservative, it is easily computed for many window types (any window with a known mainlobe width), and so it remains a useful ruleofthumb for determining minimum window length given the minimum expected frequency spacing.
A table of minimum window lengths for the Kaiser window, as a function of frequency spacing, is given in §3.9.
Summary
We see that when measuring sinusoidal peaks, it is important to know the minimum frequency separation of the peaks, and to choose an FFT window which is long enough to resolve the peaks accurately. Generally speaking, the window must ``see'' at least 1.5 cycles of the minimum difference frequency. The rectangular window ``sees'' its full length. Other windows, which are all tapered in some way (Chapter 3), see an effective duration less than the window length in samples. Further details regarding theoretical and empirical estimates are given in [1].
Next Section:
Sinusoidal Peak Interpolation
Previous Section:
Effect of Windowing