IDA Wiki


Time-frequency analysis using wavelets and the short-time Fourier transform


Background

Most often, signals are analyzed either in the time domain (eg ERPs) or in the frequency or Fourier domain (eg alpha bandpower). Looking at the time domain signal gives an accurate representation of the temporal structure of the signal but little information about its frequency content; vice versa, the Fourier transform gives an accurate representation of the phase and amplitude of oscillatory components but no information about when they occur. Time-frequency transforms explore both time and frequency content simultaneously. There are two major approaches to TF analysis:

Short-time Fourier transform (STFT). The STFT is a variant of Fourier analysis. Instead of calculating the Fourier transform on the whole signal, it is performed in a sliding window (say, 200 ms). The size of the window determines the trade-off between time resolution (small window = good time resolution) and frequency resolution (large window = good frequency resolution). The signal is windowed using some window function (eg cosine window) and then subjected to a Fourier transformation.

Wavelets. As the STFT, the continuous wavelet transform can yield information about the frequency content over time. The transform is determined by convolution of the signal with a wavelet function. For each frequency, the wavelet is a scaled version of a so-called mother wavelet. In other words, the mother wavelet is "squeezed" or "stretched" to a particular scale. In contrast to STFT, a wavelet function does not need to be based on a sinusoid. Furthermore, wavelets can be real (eg Gabor) or complex (eg Morlet). Complex wavelets have the advantage that the real and imaginary parts of the coefficients can be used to derive both amplitude and phase information.

morlet_time_domain.png

{i} STFT and the continuous wavelet transform are similar. Coarsely, the main difference is that the window size is fixed in STFT but varies with frequency in wavelet analysis, with large windows for low frequencies (giving a good frequency but low time resolution) and short windows for higher frequencies (giving a good time but low frequency resolution). Wavelets can be more useful than STFT when the goal is to search for transient oscillatory bursts, because due to the scaling of the wavelet it can detect burst activity at any scale. On the other hand, plots of STFT spectra with constant window sizes across frequencies are easier to read and interpret.

Further reading

Toolbox

M-file

Author(s)

Matthias Treder matthias.treder@tu-berlin.de

IDA Wiki: IDA/BerlinBCI/ToolBox/ToolboxTimeFrequency (last edited 2011-12-13 18:04:45 by MatthiasTreder)