6.5 Practical implementation of Welch’s Method
6.5.1 Window parameters
Time domain parameters
The time domain function describes the shape of the window in time. Two categories are described; flat-top and sinusoidal windows. The former are characterised by a plateau in the middle range of the length of the segment, and the sinusoidal have a Gaussian (bell) shape.
Let N be the length of the discretely sampled segment described in Section 6.4.3. The window function w(n) is described at n = 0, ..., N − 1. The most basic example of the latter is the rectangular w(n) =2n/N for n = 0, ..,N/2and w(n) =2(N −n)/N and the triangular (Bartlett) window (6.35).
Sinusoidal windows are of the shape w(n) = sinαNnπ . The coefficient α varies from 1-4 and α = 2 corresponds to the Hanning window [130] . A variant of the Hanning is the Hamming is window characterised by the equation w(n) = α + (1 − α) cosα2n
Nπ, with an optimal value of α = 25 46 [130].
The function w(n) is symmetric; hence wn = wN −n. A detailed description will not be done here,
for each and many other functions have been extensively detailed in DSP literature [128–130]. The main attribute of a window in the time domain is to annihilate the input signal yn at n = 0
and n = N − 1 and maintain the windowed function ˆyn = yN/2 in the middle of the range. Fig.
6.3a shows a sequence made of Hanning and Hamming windows applied to a zero-average Gaussian input signal with N = 2048. It can be clearly observed that the signal windowed by the Hanning performs better because it cancels the noise closer to zero. The Hamming window, on the other hand, shows a residual noise ∼ 5 − 10% of the maximum amplitude at n = 0, N − 1. This remainder noise is the leakage of the window function. Mathematically, leakage cannot be zero, but the lower w(0) gets the better the performance of the window function. As shown in Fig. 6.3a, the amplitude of the Hanning close to n = 0 is more than 3 orders of magnitude lower in amplitude.
An interesting design to minimise leakage is based on Bessel functions and is called the Kaiser function [129]. It can be defined as w(n) = I0(παp1 − [2Nn − 1]2)/I0(πα) for n = 0, ..., N − 1.
The function I0 represents the Bessel function of the first kind defined as I0(y) =P∞k=0
h(y/2)k
k!
i2 . The parameter α however represents the attenuation of the function that shapes the spectral response of the function [129].
(a) Comparative noise cancellation performance (b) Window function comparison
Figure 6.3: Comparative performance of Hamming (solid line) and Hanning (dotted line) windows in the time domain.
Spectral parameters
In addition to the time-domain description, the spectral response of the window provides the core attributes of the window function. Windowing in the time domain is equivalent to convolving the signal and the window spectra in the frequency domain [128]. By default, the spectral density is represented in amplitude/power and expressed in decibels (dB) as
scale(dB) = 20 log( A(f ) Amax(f )
) = 10 log( P (f ) Pmax(f )
), (6.43)
where A, Amax represent the amplitude and the maximal amplitude of the spectra respectively, and
P, Pmax for spectral power. It is convenient to express the spectra as a function of the ratio of the
sampling and the resolution frequency in order to get the quantities independent from the sampling frequency. One unit of such ratio represents a width of the resolution frequency and is referred to as a frequency bin [128, 129].
frequency bin = fS
∆f (6.44)
The spectra of window functions are generally made of a central lobe which determines the bandwidth property of the window and side peaks at regular intervals called sidelobes.
The Bandwidth of the central lobe is the first parameter to take into consideration depending on the nature of the signal. The bandwidth is estimated at -3dB of the spectrum. Fig. 6.4 represents a comparative amplitude spectrum of the Hamming and Hanning windows. The amplitude of the window spectrum is plotted against the frequency bin number. The spectra show the same shape in the central lobe. The -3dB amplitude bandwidth (BW) is 1.44bins for the Hanning. The BW is usually expressed as normalised equivalent noise bandwidth (NENBW) that is defined using the
(a) Hanning and Hamming windows spectra (b) Kaiser10 and Hamming windows
Figure 6.4: Window function spectra for random signal processing
Parseval theorem (6.13) as follows [129];
NENBW = NS2 S2 1
, (6.45)
where S1 and S2 are the normalisation sums S1 = P N −1
0 w(n) and S2 the power content in the
window defined in (6.30). The NENBW is 1.5 bins for the Hanning and 1.3 for the Hamming windows. For a signal sampled at 125 Hz for instance with N = 2048, the BW of the central lobe is NENBW ×f s/N = 0.1 Hz.
The sidelobe height is the amplitude of the first lobe on the side of the central lobe expressed in dB. The sidelobes represent the stopband of the window and are henceforth the expression of the leakage in the spectrum i.e. the smearing out of the signal energy over a wide-band area instead of being concentrated in a the central lobe [131]. Therefore, the lower and the faster their intensity decreases in frequency, the better. The rate of decrease of the lobes is called the sidelobe roll-off. The Hamming and Hanning spectra are strikingly similar in the passband, however, the Hamming window provides a perfect cancellation of the first sidelobe.
The Kaiser window is designed to minimise the energy in the stopband [129]. The parameter α represents the rate of attenuation in the sidelobes called the sidelobe roll-off rate. Analytically, to design a rate of attenuation in the desired range, it is necessary to define a design parameter β, so that β = 0.11(α − 8.7), 0.584(α − 21)0.4+ 0.0788(α − 21), 0, for α > 50 for 50 > α > 21 for α < 21
Table 6.2 presents the properties of commonly used windows for random noise [129]. Depending on the type of signal and the properties wanted, a careful choice of the window can be made. The
Table 6.2: Parameters of window functions based on [129, 130]; the normalised equivalent noise band- width, the bandwidth maximum sidelobe amplitude and sidelobe amplituderoll-off rate are represented.
Window NENBW BW [fS = 125 Hz, N = 2048] max. sidelobe ampl. ampl.roll-off rate
(bins) (Hz) (dB) (dB/10bins)
Hanning 1.5 0.091 -32 -8.4
Hamming 1.30 0.080 -43 -5.1
Kaiser10 1.84 0.112 -83 -3.5
Kaiser filter with β = 10 (dubbed Kaiser10 here) shows excellent cancellation noise properties in the sidelobe height despite that its central lobe bandwidth is relatively larger.
The choice of the window is motivated by the type of the input signal, and its frequency content. The window must be small enough to resolve different components of the frequency in the spectrum. Geomagnetic signals in the SR range as random stochastic signals show a frequency bandwidth of the order of ∼ 1 Hz at the first SR [19]. Henceforth, all the windows listed in Table 6.2 can effectively resolve such type of signal. The main task, therefore, will consist in cancelling as much as possible the noise in the stopband. In this regard, the Kaiser10 window perfectly fits this role. The maximum sidelobe amplitude is reduced by −40 dB in amplitude in comparison to a Hamming window and by −50 dB to a Hanning as shown in Fig. 6.3. It is worth mentioning that the Kaiser window has also been recommended for random signals in [129].