The frequency resolution of a spectrum-analysis window is determined by its main-lobe width (Chapter 3) in the frequency domain, where a typical main lobe is illustrated in Fig.5.6 (top). For maximum frequency resolution, we desire the narrowest possible main-lobe width, which calls for the rectangular window (§3.1), the transform of which is shown in Fig.3.3. When we cannot be fooled by the large side-lobes of the rectangular window transform (e.g., when the sinusoids under analysis are known to be well separated in frequency), the rectangular window truly is the optimal window for the estimation of frequency, amplitude, and phase of a sinusoid in the presence of stationary noise [230,120,121].
The rectangular window has only one parameter (aside from amplitude)--its length. The next section looks at the effect of an increased window length on our ability to resolve two sinusoids.
where and , and the frequency separation is radians per sample. The zero-padded Fourier analysis uses rectangular windows of lengths , , , and ( , where ). The length FFT output is divided by so that the ideal height of each spectral peak is .
The longest window ( ) resolves the sinusoids very well, while the shortest case ( ) does not resolve them at all (only one ``lump'' appears in the spectrum analysis). In difference-frequency cycles, the analysis windows are two cycles and half a cycle in these cases, respectively. It can be debated whether or not the other two cases are resolved, and we will return to them shortly.
using the same frequency separation and window lengths. However, now the sinusoids are 90 degrees out of phase (one sine and one cosine). Curiously, the top-left case ( ) now appears to be resolved! However, closer inspection (see Fig.5.9) reveals that the ``resolved'' spectral peaks are significantly far away from the sinusoidal frequencies. Another curious observation is that the lower-left case ( ) appears worse off than it did in Fig.5.7, and worse than the shorter-window analysis at the top right of Fig.5.8. Only the well resolved case at the lower right (spanning two full cycles of the difference frequency) appears unaffected by the relative phase of the two sinusoids under analysis.
The preceding figures suggest that, for a rectangular window of length , two sinusoids are well resolved when they are separated in frequency by
where the frequency-separation is in radians per sample. In cycles per sample, the inequality becomes
where the denotes normalized frequency in cycles per sample. In Hz, we have
Note that is the number of samples in one period of a sinusoid at frequency Hz, sampled at Hz. Therefore, we have derived a rule of thumb for frequency resolution that requires at least two full cycles of the difference-frequency under the rectangular window.
A more detailed study  reveals that cycles of the difference-frequency is sufficient to enable fully accurate peak-frequency measurement under the rectangular window by means of finding FFT peaks. In §5.5.2 below, additional minimum duration specifications for resolving closely spaced sinusoids are given for other window types as well.
In principle, we can resolve arbitrarily small frequency separations, provided
- there is no noise, and
- we are sure we are looking at the sum of two ideal sinusoids under the window.
The rectangular window provides an abrupt transition at its edge. While it remains the optimal window for sinusoidal peak estimation, it is by no means optimal in all spectrum analysis and/or signal processing applications involving spectral processing. As discussed in Chapter 3, windows with a more gradual transition to zero have lower side-lobe levels, and this is beneficial for spectral displays and various signal processing applications based on FFT methods. We will encounter such applications in later chapters.
Other Definitions of Main Lobe Width
Nonlinear Optimization in Matlab