Resolving Sinusoids

We saw in §5.4.1 that our ability to resolve two closely spaced sinusoids is determined by the main-lobe width of the window transform we are using. We will now study this relationship in more detail.

For starters, let's define main-lobe bandwidth very simply (and somewhat crudely) as the distance between the first zero-crossings on either side of the main lobe, as shown in Fig.5.10 for a rectangular-window transform. Let $ B_w$ denote this width in Hz. In normalized radian frequency units, as used in the frequency axis of Fig.5.10, $ B_w$ Hz translates to $ 2\pi B_w / f_s$ radians per sample, where $ f_s$ denotes the sampling rate in Hz.

Figure 5.10: Window transform with main-lobe width marked.
\includegraphics[width=\twidth]{eps/rectWinMLM}

For the length-$ M$ unit-amplitude rectangular window defined in §3.1, the DTFT is given analytically by

$\displaystyle W_R(\omega) = M\cdot\hbox{asinc}_M(\omega) \isdef \frac{ \sin \left( M\omega T/2 \right)}{\sin(\omega T/2)} = \frac{ \sin \left( M\pi f T \right)}{\sin(\pi f T)}, \protect$ (6.23)

where $ f$ is frequency in Hz, and $ T$ is the sampling interval in seconds ($ T=1/f_s$ ). The main lobe of the rectangular-window transform is thus ``two side lobes wide,'' or

$\displaystyle \zbox {B_w = 2\frac{f_s}{M}}\quad \hbox{(\hbox{Hz})}$ (6.24)

as can be seen in Fig.5.10.

Recall from §3.1.1 that the side-lobe width in a rectangular-window transform ($ f_s/M$ Hz) is given in radians per sample by

$\displaystyle \zbox {\Omega_M \isdef \frac{2\pi}{M}.}$ (6.25)

As Fig.5.10 illustrates, the rectangular-window transform main-lobe width is $ 2\Omega_M$ radians per sample (two side-lobe widths). Table 5.1 lists the main-lobe widths for a variety of window types (which are defined and discussed further in Chapter 3).


Table 5.1: Main-lobe bandwidth for various windows.
Window Type Main-Lobe Width $ K\Omega_M$ (rad/sample)
Rectangular $ 2\Omega_M$
Hamming $ 4\Omega_M$
Hann $ 4\Omega_M$
Generalized Hamming $ 4\Omega_M$
Blackman $ 6\Omega_M$
$ L$ -term Blackman-Harris $ 2L\Omega_M$
Kaiser depends on $ \beta $
Chebyshev depends on ripple spec


Other Definitions of Main Lobe Width

Our simple definition of main-lobe band-width (distance between zero-crossings) works pretty well for windows in the Blackman-Harris family, which includes the first six entries in Table 5.1. (See §3.3 for more about the Blackman-Harris window family.) However, some windows have smooth transforms, such as the Hann-Poisson (Fig.3.21), or infinite-duration 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 main-lobe width is often defined using the second central moment.6.5

A practical engineering definition of main-lobe width is the minimum distance about the center such that the window-transform magnitude does not exceed the specified side-lobe level anywhere outside this interval. Such a definition always gives a smaller main-lobe width than does a definition based on zero crossings.

Figure 5.11: Lowpass filter design parameters.
\includegraphics[width=3in]{eps/windowParameters}

In filter-design terminology, regarding the window as an FIR filter and its transform as a lowpass-filter 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 frequency-domain 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 $ \Delta f$ 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 $ \Delta f$ Hz. For example, we may require that the main lobes of any Blackman-Harris window meet at the first zero crossings in the worst case (narrowest frequency separation); this is shown in Fig.5.12 for the rectangular-window.

Figure: Two length-$ M$ -rectangular-window transforms displaced by $ 2\pi \Delta f T=2\Omega _M=4\pi /M$ rad/sample.
\includegraphics[width=\twidth]{eps/sinesAnn}

To obtain the separation shown in Fig.5.12, we must have $ B_w
\leq \Delta f$ Hz, where $ B_w$ is the main-lobe width in Hz, and $ \Delta f$ is the minimum sinusoidal frequency separation in Hz.

For members of the $ L$ -term Blackman-Harris window family, $ B_w$ can be expressed as $ B_w = 2L f_s/M$ , as indicated by Table 5.1. In normalized radian frequency units, i.e., radians per sample, we have $ 2\pi B_w T = 2L\Omega_M\isdeftext
K\Omega_M$ . For comparison, Table 5.2 lists minimum effective values of $ K$ for each window (denoted $ K^\ast$ ) given by an empirically verified sharper lower bound on the value needed for accurate peak-frequency measurement [1], as discussed further in §5.5.4 below.


Table: Main-lobe width-in-bins $ K$ for various windows.
Window Type $ K$ $ K^\ast$
Rectangular $ 2$ $ 1.44$
Hamming $ 4$ $ 2.22$
Hann $ 4$ $ 2.36$
Generalized Hamming $ 4$ --
Blackman $ 6$ $ 2.02$
$ L$ -term Blackman-Harris $ 2L$  


We make the main-lobe width $ B_w$ smaller by increasing the window length $ M$ . Specifically, requiring $ B_w
\leq \Delta f$ Hz implies

$\displaystyle B_w = K \frac{f_s}{M} \leq \Delta f \quad \Rightarrow \quad M \ge K \frac{f_s}{\Delta f}$ (6.26)

or

$\displaystyle \zbox {M \ge K \frac{f_s}{\left\vert f_2-f_1\right\vert}.} \protect$ (6.27)

Thus, to resolve the frequencies $ f_1$ and $ f_2$ , the window length $ M$ must span at least $ K$ periods of the difference frequency $ f_2-f_1$ , measured in samples, where $ K$ is the effective width of the main lobe in side-lobe widths $ f_M\isdeftext f_s/M$ . Let $ D\isdeftext \lceil f_s/\vert f_2-f_1\vert\rceil$ denote the difference-frequency period in samples, rounded up to the nearest integer. Then an ``$ L$ -term'' Blackman-Harris window of length $ M\ge KD=2LD$ samples may be said to resolve the sinusoidal frequencies $ f_1$ and $ f_2$ . Using Table 5.2, the minimum resolving window length can be determined using the sharper bound as $ M\ge \lceil K^\ast \cdot D\rceil$ .


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 $ f_1$ .6.6 Physically, any ``driven oscillator,'' such as bowed-string instruments, brasses, woodwinds, flutes, etc., is usually quite periodic in normal steady-state 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 $ f_1$ Hz. Then the harmonic components occur at integer multiples of $ f_1$ , and so they are spaced in frequency by $ \Delta f = f_1$ . To resolve these harmonics in a spectrum analysis, we require, adapting (5.27),

$\displaystyle \zbox {M \geq K \frac{f_s}{f_1}}$ (6.28)

Note that $ f_s/f_1 \isdef P$ is the fundamental period of the signal in samples. Thus, another way of stating our simple, sufficient resolution requirement on window length $ M$ , for periodic signals with period $ P$ samples, is $ \zbox {M \geq KP}$ , where $ K$ is the main-lobe 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 $ P$ samples is assured if we have at least

and so on, according to the simple, sufficient criterion of separating the main lobes out to their first zero-crossings. These different lengths can all be regarded as the same ``effective length'' (two periods) for each window type. Thus, for example, when the Blackman window is 6 periods long, its effective length is only 2 periods, as illustrated in Figures 5.13(a) through 5.13(c).

Figure 5.13: Three different window types applied to the same sinusoidal signal, where the window lengths were chosen to provide approximately the same ``resolving power'' for two sinusoids closely spaced in frequency. The nominal effective length in all cases is two sinusoidal periods.
\begin{figure*}\centering
\subfigure[Length $M=100$\ rectangular window]{
\epsfxsize =\twidth
\epsfysize =1.5in \epsfbox{eps/EffectiveLength1.eps}
}
\subfigure[Length $M=200$\ Hamming window]{
\epsfxsize =\twidth
\epsfysize =1.5in \epsfbox{eps/EffectiveLength2.eps}
}
\subfigure[Length $M=300$\ Blackman window]{
\epsfxsize =\twidth
\epsfysize =1.5in \epsfbox{eps/EffectiveLength3.eps}
}\end{figure*}


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 main-lobe separation that could be considered for purposes of resolving closely spaced sinusoidal peaks.

Figure 5.14: Four alternative main-lobe displacement rules for resolving closely spaced sinusoidal peaks. For peak-frequency measurements based on a few samples at the main-lobe center, (a) is suboptimal, (b) is nearly optimal [1], (c) is analogous to a filter-design specification based on side-lobe level, and (d) is overly conservative, but sufficient and simple to compute for Blackman-Harris windows.
\begin{figure*}\centering
\subfigure[Minimum orthogonal separation]{
\epsfxsize =4.0in
\epsfysize =1.0in \epsfbox{eps/SpecResCases1.eps}
}
\subfigure[Separation to first stationary-point \cite{AbeAndSmith04}]{
\epsfxsize =4.0in
\epsfysize =1.0in \epsfbox{eps/SpecResCases2.eps}
}
\subfigure[Separation to where main-lobe level equals side-lobe level]{
\epsfxsize =4.0in
\epsfysize =1.0in \epsfbox{eps/SpecResCases3.eps}
}
\subfigure[Full main-lobe separation]{
\epsfxsize =4.0in
\epsfysize =1.0in \epsfbox{eps/SpecResCases4.eps}
}\end{figure*}

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 $ M$ -sample segments of sinusoids at this frequency-spacing are exactly orthogonal. ($ M$ is the rectangular-window 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 main-lobe 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 minimum-orthogonal 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 frequency-spacing exactly.6.8

Figure 5.14(b) shows the ``zero-error stationary point'' frequency spacing. In this case, the main-lobe peak of one $ \hbox{asinc}$ sits atop the first local minimum from the main-lobe of the other $ \hbox{asinc}$ . Since the derivative of both $ \hbox{asinc}$ 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 peak-frequency 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 Blackman-Harris 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 side-lobe level. That is, the main lobes are pulled apart until the main-lobe level equals the worst-case side-lobe 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 stationary-point spacing discussed in the previous paragraph.

For ease of comparison, Fig.5.14(d) shows once again the simple, sufficient rule (''full main-lobe separation'') discussed in §5.5.2 above. While overly conservative, it is easily computed for many window types (any window with a known main-lobe width), and so it remains a useful rule-of-thumb 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