Sie sind auf Seite 1von 30

(Time)Frequency Analysis of EEG Waveforms

Niko Busch
Charit
e University Medicine Berlin; Berlin School of Mind and Brain

niko.busch@charite.de

niko.busch@charite.de

1 / 23

From ERP waveforms to waves


ERP analysis:
time domain analysis: when do things (amplitudes) happen?
treats peaks and troughs as single events.

Frequency domain (spectral) analysis (Fourier analysis):


magnitudes and frequencies of waves no time information.
peaks and troughs are not treated as separate entities.

Timefrequency analysis (wavelet analysis):


when do which frequencies occur?
niko.busch@charite.de

2 / 23

From ERP waveforms to waves


ERP analysis:
time domain analysis: when do things (amplitudes) happen?
treats peaks and troughs as single events.

Frequency domain (spectral) analysis (Fourier analysis):


magnitudes and frequencies of waves no time information.
peaks and troughs are not treated as separate entities.

Timefrequency analysis (wavelet analysis):


when do which frequencies occur?
niko.busch@charite.de

2 / 23

From ERP waveforms to waves


ERP analysis:
time domain analysis: when do things (amplitudes) happen?
treats peaks and troughs as single events.

Frequency domain (spectral) analysis (Fourier analysis):


magnitudes and frequencies of waves no time information.
peaks and troughs are not treated as separate entities.

Timefrequency analysis (wavelet analysis):


when do which frequencies occur?
niko.busch@charite.de

2 / 23

Why bother?
(Time)Frequency analysis complements signal analysis:
neurons are oscillating.
analysis of signals with trial-to-trial jitter.
analysis of longer time periods.
analysis of pre-stimulus and spontaneous signals.
necessary for sophisticated methods (coherence, coupling, causality, etc.).

niko.busch@charite.de

3 / 23

Parameters of waves
Oscillations regular repetition of some measure over several cycles.
Wavelength length of a single cycle (a.k.a. period).
1
the speed of change.
Frequency wavelength
Phase current state of the oscillation angle on the unit circle. Runs
from 0 (-) 360 ()
Magnitude (permanent) strength of the oscillation.

niko.busch@charite.de

4 / 23

How to disentangle oscillations


Jean Joseph Fourier (17681830): An arbitrary function, continuous or with

discontinuities, defined in a finite interval by an arbitrarily capricious graph can


always be expressed as a sum of sinusoids.

niko.busch@charite.de

5 / 23

The discrete Fourier transform


The DFT transforms the signal from the time domain into the frequency
domain.
Requires that the signal be stationary.
5 Hz
5
0
5
0

FFT Spectrum
4
2

0.5
Time

50
Hz
FFT Spectrum

100

50
Hz
FFT Spectrum

100

50
Hz
FFT Spectrum

100

50
Hz

100

50 Hz
5
0
5
0

5
0
5
0

0.5
Time
10 Hz

0.5
Time
Sum of 5 + 10 + 50

2
1
0

5
0
5
0

1
0.5
0

2
0.5
Time

niko.busch@charite.de

6 / 23

The discrete Fourier transform


The DFT transforms the signal from the time domain into the frequency
domain.
Requires that the signal be stationary.
EEG raw data

reverted raw data

100

100

50

50

50

50

100
0

2
3
Time [sec]
FFT Spectrum

100
0

20

20

15

15

10

10

20

40
Hz

60

2
3
Time [sec]
FFT Spectrum

20

40

60

Hz

niko.busch@charite.de

6 / 23

The discrete Fourier transform


The DFT transforms the signal from the time domain into the frequency
domain.
Requires that the signal be stationary.

Non-stationary signals:
When does the 10 Hz oscillation occur?
DFT does not give time information.
Time information is not necessary for stationary signals
Frequency contents do not change all frequency components exist all the
time.
How to investigate eventrelated spectral changes in brain signals?

niko.busch@charite.de

6 / 23

Eventrelated synchronisation / desynchronisation


Cut the signal in two time windows and assume stationarity in each half.
ERD/ERS 1 =

poststimulus power baseline power


baseline power

100

But why not use even smaller windows?


Windowed FFT / Short term Fourier transform.
1 Pfurtscheller

& Lopes da Silva (1999). Clin Neurophysiol


niko.busch@charite.de

7 / 23

The short term Fourier transform (STFT) I


Assume that some portion of a nonstationary signal is stationary.
Important parameters:
window function (Hamming, Hanning, Rectangular, etc.)
window overlap
window length: width should correspond to the segment of the signal where its
stationarity is valid.
1.5
Hanning window
Hamming window
Boxcar window

0.5

50

100

150

200

250

niko.busch@charite.de

8 / 23

The short term Fourier transform (STFT) I


Assume that some portion of a nonstationary signal is stationary.
Important parameters:
window function (Hamming, Hanning, Rectangular, etc.)
window overlap
window length: width should correspond to the segment of the signal where its
stationarity is valid.
EEG raw data
100

100
0

1000

2000

3000

4000

5000

6000

7000

8000

6000

7000

8000

6000

7000

8000

shifted Hanning window


1
0.5
0
0

1000

2000

3000

4000

5000

windowed EEG signal


50

50
0

1000

2000

3000

4000

5000

niko.busch@charite.de

8 / 23

The short term Fourier transform (STFT) I


Assume that some portion of a nonstationary signal is stationary.
Important parameters:
window function (Hamming, Hanning, Rectangular, etc.)
window overlap
window length: width should correspond to the segment of the signal where its
stationarity is valid.
EEG raw data
100
50
0
50
100
0

6
8
10
Time [sec]
SPECTROGRAM, R = 256

12

14

12

14

frequency

30
20
10
0
0

10

time
niko.busch@charite.de

8 / 23

The short term Fourier transform (STFT) II


Window length affects resolution in time and frequency
short window: good time resolution, poor frequency resolution.
long window: good frequency resolution, poor time resolution.
EEG raw data
100
0

frequency

100
0

30
20
10
0

6
8
10
Time [sec]
SPECTROGRAM, width = 1024

12

14

12

14

10

frequency

SPECTROGRAM, width = 64
30
20
10
0

8
time

10

12

14
niko.busch@charite.de

9 / 23

Uncertainty principle
Werner Heisenberg (19011976):
Energy and location of a particle cannot be both known with infinite precision.
a result of the wave properties of particles (not the measurement).

Applies also to timefrequency analysis:


We cannot know what spectral component exists at any given time instant.
What spectral components exist at any given interval of time?

Spectral/temporal resolution trade off cannot be avoided but it can be


optimised.
Good frequency resolution at low frequencies.
Good time resolution at high frequencies.

niko.busch@charite.de

10 / 23

From STFT to wavelets

STFT: fixed temporal & spectral resolution


Analysis of high frequencies insufficient temporal resolution.
Analysis of low frequencies insufficient spectral resolution.

Wavelet analysis:
Analysis of high frequencies narrow time window for better time resolution.
Analysis of low frequencies wide time window for better spectral resolution.

niko.busch@charite.de

11 / 23

What is a wavelet?
Motherwavelet
2

|ej0t|

et /2

|(t)|

0.15

1.8

1.5

0.1

1.6
1
1.4
0.5

0.05

1.2

0.8

0.5

0.05

0.6
1
0.4
1.5
2
0.5

0.1

0.2
0

Cosine

0.5

0
0.5

0.5

Gaussian

0.5

0.5

Wavelet

Zero mean amplitude.


Finite duration.
Mother wavelet: prototype function (f = sampling frequency).
Wavelets can be scaled (compressed) and translated.
niko.busch@charite.de

12 / 23

What is a wavelet?
Motherwavelet
2.5
10 Hz

Spectral Density

20 Hz

40 Hz

1.5

0.5

0
-0.6

-0.4

-0.2

0
Time (s)

0.2

0.4

0.6

10

20

30
40
Frequency ( Hz )

50

60

70

Zero mean amplitude.


Finite duration.
Mother wavelet: prototype function (f = sampling frequency).
Wavelets can be scaled (compressed) and translated.
niko.busch@charite.de

12 / 23

Wavelet transform of ERPs


Bandpassfiltered ERP

ERP

V
2.0

V
6.0

0.1

0.1

0.2

Oz

s
0.3

0.1

6.0

0.1

s
0.3

0.2

2.0

Wavelet transformed ERP


V
2.0

GammaBand: ca. 30 80 Hz
[uV]
0.6

80.00
Oz

0.1

0.1

0.2

s
0.3

Frequency [Hz]

70.00
60.00
0.3

50.00
40.00
30.00

2.0

20.00
-0.10

0.0
0.00

0.10

0.20 0.30
Time [s]

0.40

0.50

0.60

... but be careful:


any signal can be represented as oscillations w. time-frequency analysis
but it does not imply that the signal is oscillatory!
niko.busch@charite.de

13 / 23

Important parameters of a wavelet


B Wavelet - frequency domain

A Wavelet - time domain


0,08
0,06
0,008

0,02

Amplitude

Amplitude

0,04

0,00
-0,02
-0,04

0,006
0,004
0,002

-0,06
-0,15 -0,10 -0,05

0,00 0,05
Time[s]

0,10

0,15

0,000
0

10

20

30
40
50
Frequency (Hz)

60

70

80

Length how many cycles does a wavelet have?


e.g. 40 Hz wavelet (25 ms/cycle), 12 cycles 250 ms length
t standard deviation in time domain: t =

m
2f0

f standard deviation in frequency domain: f =

1
2t

time resolution increases with frequency, whereas frequency


resolution decreases with frequency.
niko.busch@charite.de

14 / 23

Evoked and induced oscillations I


evoked/ phase-locked

induced/ non-phase-locked

..

10

Average
100

200

300

400

500

600

700

ms

Evoked time-frequency representation of the average of all trials (ERP).


Induced average of time-frequency transforms of single trials.
niko.busch@charite.de

15 / 23

Evoked and induced oscillations II


Wavelet analysis of single trials reveals nonphaselocked activity.
Evoked/ phase-locked

Induced/ non/phase-locked

Wavelet-transformed trials

..

10

Average
100

200

300

400

500

600

700

ms

Evoked time-frequency representation of the average of all trials (ERP).


Induced average of time-frequency transforms of single trials.

niko.busch@charite.de

16 / 23

Phaselocking factor (PLF)

a.k.a. intertrial coherence (ITC) or phaselockingvalue (PLV).


measures phase consistency of a frequency at a particular time across trials.
PLF = 1: perfect phase alignment.
PLF = 0: random phase distribution.
niko.busch@charite.de

17 / 23

The EEG state space

Frequency x phase locking x amplitude changes2


Evoked and induced activity are extremes on a continuum.
ERPs cover only small part of the EEG space.
2 Makeig,

Debener, Onton, Delorme (2004). TICS


niko.busch@charite.de

18 / 23

Examples 1: spontaneous EEG


Stimulus pairs are presented at different phases of the alpha rhythm
sequential or simultaneous?3
If the stimulus pair falls within the same alpha cycle perceived simultaneity.
Does the visual system take snapshots at a rate of 10 Hz?

Simultaneity and the alpha rhythm

Figure from VanRullen & Koch (2003): Is perception discrete of continuous? TICS

3 Varela

et al. (1981): Perceptual framing and cortical alpha rhythm.


Neuropsychologia
niko.busch@charite.de

19 / 23

Examples 2: pre-stimulus EEG power


Spatial attention to left or right.
Stronger alpha power over ipsilateral hemisphere.4

40

30

20
-2

10

-4
-0.6

-0.4

-0.2
0
time [s]

0.2

0.5
0

dB

50

-log10[p]

frequency [Hz]

Attention: ipsi- vs. contra-lateral

-0.5
8 15 Hz
-0.4 0 s

4 Busch & VanRullen (2010): Spontaneous EEG oscillations reveal periodic sampling
of visual attention. PNAS.
niko.busch@charite.de

20 / 23

Examples 3: analysis of long time intervals


Sternberg memory task with different set sizes.
Alpha power increases linearly with set size.5

Effect of set size

5 Jensen et al. (2002): Oscillations in the alpha band (912 Hz) increase with
memory load during retention in a short-term memory task. Cereb Cortex.
niko.busch@charite.de

21 / 23

Recommended reading
WWW:
EEGLABs time-frequency functions explained: http://bishoptechbits.blogspot.com/
FFT explained: http://blinkdagger.com/matlab/matlab-introductory-fft-tutorial/
Wavelet tutorial http://users.rowan.edu/ polikar/WAVELETS/WTtutorial.html
Books:
Barbara Burke Hubbard: The World According to Wavelets.
Steven Smith: The Scientist & Engineers Guide to Digital Signal Processing
(http://www.dspguide.com/).
Herrmann, Grigutsch & Busch: EEG oscillations and wavelet analysis. In:
Event-related Potentials: A Methods Handbook.
Papers:
Tallon-Baudry & Bertrand (1999) Oscillatory gamma activity in humans and its role
in object representation. TICS.
Samar, Bopardikar, Rao & Swartz (1999) Wavelet analysis of neuroelectric
waveforms: a conceptual tutorial. Brain Lang.

niko.busch@charite.de

22 / 23

Thank you...

... for your interest !


Please ask questions!!!

niko.busch@charite.de

23 / 23

Das könnte Ihnen auch gefallen