Biomedical Engineering Reference
In-Depth Information
ing window. The STFT is defined as the DFT applied to the “windowed” segments.
The discrete STFT of a discrete-time signal x ( n ) at time instant n is defined as [38,
41, 45, 46]:
( {}
STFT
xn
=
(3.25)
N
1
2
π
( )
( )()
Xnk
,
=
xn mW m
+
exp
j
km
k
=
012
, ,
,
, N
1
N
m
=
0
where n and k are the discrete time and frequency variables, respectively. The pre-
ceding equation is interpreted as the Fourier transform of x ( n m ) as viewed through
a window w ( m ) that has a stationary origin and n changes. The signal is shifted past
the window so that at each n a different portion of the signal is viewed [38]. The time
variable n can be incremented in steps of
N .
The following MATLAB function is used to estimate the STFT of signal x ( n ):
Δ
with 1
≤Δ≤
S = spectrogram(x,window,noverlap,nfft,fs)
where
window is a Hamming window of length nfft.
noverlap is the number of overlapping segments that produces 50% overlap
between segments.
nfft is the FFT length and is a maximum of 256 or the next power of 2 greater
than the length of each segment of x . (Instead of nfft , you can specify a vector of
frequencies, F .)
fs is the sampling frequency, which defaults to normalized frequency.
Figure 3.12 shows the concatenation of EEG signals described earlier before and
after injury and their STFTs.
3.1.3.2 Wavelet Transform
Fourier analysis uses sines and cosines as the orthogonal basis functions. These basis
functions are localized in frequency but not in time. A small change in frequency will
result in a global change in the time domain. Furthermore, any localized change in
the time-domain signal will cause changes to all Fourier coefficients. Therefore, the
Fourier transform reveals what frequencies exist in a time signal, but fails to localize
the times at which these frequencies occur. This problem was resolved by using the
STFT as explained earlier. Recall, however, that the time and frequency resolutions
of the STFT are determined by the width of the analysis window. The time length of
the analysis window is usually selected at the beginning of the analysis, which yields
constant time and frequency resolutions. This is depicted by squares in the time-fre-
quency analysis shown in Figure 3.13. STFTs with short time windows will lead to
improved time resolution, but poor spectral resolution. If the time window is
increased, the frequency resolution will improve, but the time resolution will deteri-
orate. This conflict between time and frequency resolution is resolved by the wavelet
Search WWH ::




Custom Search