48
D.-W. Kim and C.-H. Im
spacing, but it does not influence the sensitivity of the spectrum; zero-padding should
be regarded as a kind of interpolation of a given power spectrum, not a solution to
decrease leakage. In the example shown in Fig. 3.7, the spectral peak of the signal
in Fig. 3.7b can be precisely detected by increasing the frequency resolution by a
factor of two via zero-padding—see Fig. 3.7c.
There is no standard on how to choose the epoch length, so it is recommended to
make the epoch length be a multiplication of a multiple of two and the sampling frequency. This enables all integer frequency samples to be harmonics of f c . Therefore,
most EEG researchers have used either 2 or 4 s epochs [25], because both epoch
lengths provide adequate frequency resolution (0.5 and 0.25 Hz, respectively) and
also have sufficient temporal margin to reject epochs with excessive artifacts.
3.3.3 Reducing Leakage
To reduce spectral leakage, two recommendations can be made [26]. The most ideal
solution is to increase the length of the epoch; however, it is not easy to increase
the epoch size due to some practical reasons described in the previous section. An
alternative approach to reducing the spectral leakage is to taper both ends of the epoch
by multiplying the epoch by an appropriate window function [40]. Figure 3.4e is an
example of applying a Hanning window on the same signal shown in Fig. 3.4c. As
shown in Fig. 3.4f, the use of a Hanning window could effectively reduce the spectral
leakage. This procedure is known as windowing. There are many types of windowing
functions, such as rectangular, Barlett, Hanning, Hamming, and Backman [13]; each
window has its own characteristic to shape the spectrum—Table 3.1; see Prabhu et al.
[33] for the detailed performance comparison among window functions.
It should be noted that the window function must be used before the signal is
padded with zeros, because window functions are used to smooth the endpoints of
the truncated signal while preserving the spectral power of the original signal.
3.3.4 Window Function for STFT
Two factors must be carefully determined for STFT analysis: the type and size of
the window function. Various types of window function can be considered, such
as rectangular, Hanning, Hamming, Gaussian, and Blackman, all of which can be
used to suppress spectral leakage but are slightly different from each other in their
performance [33]. Among them, Hanning and Hamming windows have been most
widely used in EEG spectral analysis. However, the length of the window function is
more difficult to decide. As the window size increases, the frequency resolution also
increases, but the analysis results become less sensitive to time. Use of a short window
size would provide good temporal resolution but give poor frequency resolution. The
window should be narrow enough to ensure that the signal truncated by the window is
D.-W. Kim and C.-H. Im
spacing, but it does not influence the sensitivity of the spectrum; zero-padding should
be regarded as a kind of interpolation of a given power spectrum, not a solution to
decrease leakage. In the example shown in Fig. 3.7, the spectral peak of the signal
in Fig. 3.7b can be precisely detected by increasing the frequency resolution by a
factor of two via zero-padding—see Fig. 3.7c.
There is no standard on how to choose the epoch length, so it is recommended to
make the epoch length be a multiplication of a multiple of two and the sampling frequency. This enables all integer frequency samples to be harmonics of f c . Therefore,
most EEG researchers have used either 2 or 4 s epochs [25], because both epoch
lengths provide adequate frequency resolution (0.5 and 0.25 Hz, respectively) and
also have sufficient temporal margin to reject epochs with excessive artifacts.
3.3.3 Reducing Leakage
To reduce spectral leakage, two recommendations can be made [26]. The most ideal
solution is to increase the length of the epoch; however, it is not easy to increase
the epoch size due to some practical reasons described in the previous section. An
alternative approach to reducing the spectral leakage is to taper both ends of the epoch
by multiplying the epoch by an appropriate window function [40]. Figure 3.4e is an
example of applying a Hanning window on the same signal shown in Fig. 3.4c. As
shown in Fig. 3.4f, the use of a Hanning window could effectively reduce the spectral
leakage. This procedure is known as windowing. There are many types of windowing
functions, such as rectangular, Barlett, Hanning, Hamming, and Backman [13]; each
window has its own characteristic to shape the spectrum—Table 3.1; see Prabhu et al.
[33] for the detailed performance comparison among window functions.
It should be noted that the window function must be used before the signal is
padded with zeros, because window functions are used to smooth the endpoints of
the truncated signal while preserving the spectral power of the original signal.
3.3.4 Window Function for STFT
Two factors must be carefully determined for STFT analysis: the type and size of
the window function. Various types of window function can be considered, such
as rectangular, Hanning, Hamming, Gaussian, and Blackman, all of which can be
used to suppress spectral leakage but are slightly different from each other in their
performance [33]. Among them, Hanning and Hamming windows have been most
widely used in EEG spectral analysis. However, the length of the window function is
more difficult to decide. As the window size increases, the frequency resolution also
increases, but the analysis results become less sensitive to time. Use of a short window
size would provide good temporal resolution but give poor frequency resolution. The
window should be narrow enough to ensure that the signal truncated by the window is
