Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Proceedings of the 2 nd International IEEE EMBS

Conference on Neural Engineering


Arlington, Virginia · March 16 - 19, 2005

A Wavelet Based Approach for the Detection of


Coupling in EEG Signals
R. Saab1, M.J. McKeown2,3, L.J. Myers4,and R. Abu-Gharbieh1

1 2 4
Department of Electrical and Department of Medicine (Neurology) Sensory Motor Performance
3
Computer Engineering, Pacific Parkinson's Research Centre, Program (SMPP)
The University of British The University of British Columbia , Rehabilitation Institute of Chicago
Columbia, Vancouver, BC Vancouver, BC Chicago, IL
Canada V6T 1Z4 mmckeown@intechange.ubc.ca L-myers2@northwestern.edu
rayans@ece.ubc.ca

Abstract—Electroencephalograms (EEGs) provide a non- approach by building it a theoretical point of view and
invasive way of measuring brainwave activity from sensors providing a study of its statistical significance. The use of
placed on the scalp. In this paper we present an approach to Fourier coherence in neurophysiology is extensive [5][6]. The
measure coupling, or synchrony, between various parts of the
latter utilizes a short time Fourier transform (STFT) approach
brain, critical for motor and cognitive processing, using wavelet
coherence of EEG signals. We provide an argument, highlighting to coherence.
the benefits of using this approach as opposed to the regular In the rest of this paper, we briefly present coherence as a
Fourier based coherence, in the context of localizing short measure of coupling, and also introduce STFT extension to
significant bursts of coherence between non-stationary EEG coherence as one of the proposed solutions to the problem of
signals, to which regular coherence is insensitive. We further non-stationarity. We then introduce wavelet coherence, and
highlight the benefits of the wavelets approach by exploring how
present its formulation as a natural and logical extension to
a single time-frequency coherence map can be controlled to yield
various time and/or frequency resolutions. coherence measures, and explain its benefits over the standard
STFT approach. We present the results to verify our
arguments using real EEG data collected from a human
I. INTRODUCTION subject performing an isometric motor task. We compare
standard STFT results with the wavelet approach based on
Understanding of cerebral dynamics is aided by the ability
statistical significance.
to track temporal coupling between various neural signals [1].
The most common way of measuring coupling is through the
II. COHERENCE
use of the coherence metric. Coherence is the degree of time-
locked correlation between two signals as a function of A. Regular Coherence and its Statistical Significance
frequency [2]. The problem that we address in this paper, and
Coherence as a measure is an extension to Pearson’s
suggest a solution for, is that coherence assumes stationarity
correlation coefficient, and is defined as the absolute square of
of the signals in question, and does not show changes in
the cross-spectrum of two signals normalized by the product
coupling with time. We claim and verify that through the use
of their auto-spectra [6]. Thus one way of calculating
of a wavelets extension to classical Fourier coherence, one can
coherence between two signals x(t) and y(t) is as follows:
effectively measure the dynamic behavior of coupling, thus
First, calculate the Fourier transform of each of the signals
observing how changes in task, for example, affect coupling
over multiple contiguous segments (overlapping or
between various locales in the brain. We believe this tool has
contiguous).
widespread applicability for investigating the relationships
between its various cortices. (1)

− j 2 π ft
X i ( f ) = 1 / 2π x (t )e dt

Coherence is a metric that has been utilized to measure the


(2)

− j 2 π ft
linear relationship between signals at various frequencies, and Yi( f ) = 1 / 2π y (t )e dt
its statistical properties have been studied extensively [4].
Previous work has alluded to the possible uses of wavelet Note that the integrals in (1) and (2) above are definite
coherence, namely by Torrence and Campo [3], and a paper integrals running over the length of each segment, and that
some time later by Lachaux et al [1] greatly developed this instead of x(t) and y(t) one could, and generally does use the

0-7803-8709-0/05/$20.00©2005 IEEE
v
signals modulated by a smooth window function H, to reduce approach are given in [1].
problems such as spectral leakage.
Next, calculate the auto-spectrum of each signal and their III. WAVELET COHERENCE
cross-spectrum over each segment.
A. Wavelets
Pxx ( f , i ) = X i ( f ) X i* ( f ) (3)
In contrast to the short time Fourier transform, which is an
Pxy ( f , i ) = X i ( f )Yi* ( f ) (4) extension of the regular Fourier transform, adapted to handle
non-stationarity, the wavelet transform is inherently a time-
Pyy ( f , i ) = Yi ( f )Yi * ( f ) (5) frequency analysis of a signal. It is similar to the STFT in that
In (3), (4) and (5) Pxx and Pyy represent the auto-spectra it uses finite duration basis functions to estimate the transform,
while Pxy represents the cross spectrum, with the * operator but different in that the length of the support is a function of
indicating complex conjugation. frequency. Thus while the STFT uses a fixed size rectangular
Finally, calculate the coherence between the two signals. tiling of the time-frequency plane, the wavelet transform
(Use the average of the spectra over the segments or utilizes rectangles of variable dimensions but constant area.
windows). Naturally, they are still governed by the uncertainty principle.
2

∑P i
xy ( f , i)
K( f ) = . (6)
∑Pi
xx ( f , i )∑ Pyy ( f , i )
i
Using the Schwarz inequality, observe that the coherence
takes on a value between 0 and 1. Also note here that the
coherence (K) can be considered 95% significant if it exceeds Fig.1.The time frequency tiling of the STFT (left) and the wavelet
the following threshold. [7] transform (right).

K 0.05 ( w) = 1 − 0.051 /( N −1)


, (7) Figure 1 shows the tiling of time frequency plane employed
Where N represents the number of non-overlapping by the STFT and wavelet transform respectively.
windows used to form the coherence estimate. This tiling has the advantage of high frequency resolution at
B. Time-varying STFT coherence low frequencies and high temporal resolution at high
frequencies. A more rigorous mathematical formulation
One of the problems with the coherence measure described
defines the continuous wavelet transform as [8]:
in the previous section is that it assumes stationarity of the
1 u −b
signals and is completely insensitive to the changes in
coupling over time. In solving this problem, an STFT
W x ( s, b) =
s
∫ x(u)ψ ( s
)du . (8)

approach is generally used to generate auto- and cross- Where x(t) is the signal to be transformed, Ψ the wavelet, b
spectrogams, which are in turn utilized to produce a and s, are the time shift and scale respectively. Thus,Ψ((u-
‘coherogram’. The coherogram is coherence calculated around b)/s) is a shifted and scaled version of a mother wavelet Ψ(u).
a number of time instants. It results in a three dimensional In general, there exists an inverse relation between scale and
matrix of time and frequency versus coherence. frequency; frequency is inversely proportional to scale. The
The problem with such an approach is that, while it removes wavelet we have chosen for this work is the complex Morlet
the assumption of wide sense stationarity inherent in the wavelet [9].
coherence measure, it still requires stationarity within each
1 iπ f c u −u 2
/ fb
time interval for which coherence is calculated. More Ψ (u ) = e e (9)
importantly, in practice it requires careful design of several πfb
parameters, namely section length (over which each coherence
Where fc is the wavelet center frequency and fb is its
estimate is measured), window length and overlapping (within
bandwidth (we select these parameters to be 1 and 5
each coherence estimate), which affects the resolution of the
respectively). One can observe from (9) that the Morlet
coupling measure. Thus the STFT approach requires a priori
wavelet is a complex sinusoid multiplied by a Gaussian
information about the coupling range in time and frequency, in
window. The size of the window increases with frequency,
order to allocate the time-frequency resolution which is
while preserving the same number of oscillations across all
constrained by the uncertainty principle: the wider the
frequencies, which is how it differs from the STFT. The STFT
windows, the better the frequency resolution, at the expense of
preserves window sizes while varying the number of
timing information, and vice versa. More details on this
oscillations within each window.

vi
B. Wavelet Coherence x 10
-4
EEG Signal Recorded Over the Primary Motor Cortex
2
Following [1], we first define the wavelet cross spectrum:
* 1
PW xy (t , f ) = W x (t , f )W y (t , f ) . (10)
0
The definition of the auto-spectrum follows naturally from
this, as in the preceding section on coherence. Next we -1

calculate the wavelet coherence (C) as follows: -2


0 5 10 15 20 25 30 35 40 45
∆ 2

∑ PW
-4
EEG Signal Recorded Over the Supplementary Motor Cortex
xy (T , f , i ) 4
x 10

i =− ∆
C (t , f ) = , (11) 2

∑ PW
i
xx (T , f , i )∑ PW yy (T , f , i )
i
0

Where T is the time around which the coherence is calculated, -2

i is the current index, and f is the frequency. The summations -4


0 5 10 15 20 25 30 35 40 45
are carried around a variable segment size ∆, which is Fig.2. EEG signal recorded from the primary motor cortex (top) and
inversely proportional to frequency. Just as with the Fourier supplementary motor cortex (bottom).
based coherence, the Schwarz inequality forces the wavelet
coherence to take on a value between 0 and 1. In this paper, Regular Coherence
0.4
we set ∆ to 10 cycles of the frequency f. In other words, at 30
Hz, we chose ∆ so that the summation over i covers 0.35

1 / 30 * 10 = 0.333 seconds, whereas for 60Hz it covers 0.3


0.166 seconds of data. Note, that like the STFT coherence, the
wavelet coherence is also a function of both time and Coherence Index
0.25

frequency, measuring the coupling across both variables. 0.2


The fact that the wavelet transform uses a shorter window
for higher frequencies, and a longer one for lower frequencies, 0.15

in addition to the fact that the coherence segment ∆ is also 0.1


inversely proportional to frequency, makes this approach more
suited to quantifying time varying coherence. This is 0.05

accomplished via a frequency-adaptive tiling of the time 0


10 20 30 40 50 60 70
frequency plane. In contrast, the constant size windows, and Frequency
summation segments of the STFT coherence, force it to have Fig.3. Regular coherence plotted versus frequency. Observe the peak at
the same resolution over all frequencies. 30Hz.

IV. EXPERIMENT
100, corresponding to 0.5 seconds, and overlapping of half the
A. Methods window size. The results are displayed in fig.3. Fig.3 indicates
EEG was recorded from the scalp using 61 electrodes. Two that the strongest coupling is around 30Hz, however it gives
channels located over the primary motor cortex (PMC) and no information as to how that coupling is distributed over the
one channel located over the supplementary motor cortex 45-second duration of the experiment. Thus, to gain more
(SMC) were selected for coherence, STFT coherence and insight into the temporal distribution of the coherence, we
wavelet coherence measurements. The subject was resort to computing both the STFT coherogram and the
performing an isometric task. Data length was 45 seconds and Wavelet coherogram. Fig.4 displays the result of the STFT
onset of the task was at approximately 5 seconds. Data were coherogram, after we removed the insignificant peaks. We
sampled and digitized at 2000Hz. The entire EEG data set was evaluated significance based on (7), calculated at each time
subjected to a Laplacian Spatial Filter using commercial instant, and verified via Monte Carlo simulations on white
software[10]. It was then bandpass filtered between 0.5 and noise [1]. The STFT coherence was based on a segment size
70Hz and downsampled to 200Hz to reduce the computational of four seconds
load. Figure 2 displays the time domain signals after the Next, we perform the wavelet coherogram as in (11), to
preprocessing steps. obtain the result in fig.5 showing only the significant peaks.
Significance was tested based on the tabulated values reported
B. Results in [1]. Fig.5 shows the high temporal resolution exhibited by
We computed regular coherence between the first PMC the wavelet based coherence. It shows us that the coherence in
channel and the SMC channel as in (6) using a window size of the 30Hz band, previously shown to be related to ongoing

vii
wavelet Coherogram
muscle contraction is in fact not completely continuous. This 70

information would have been lost on us with the STFT


coherence. However, for the sake of comparing the two 60

methods fairly, we smooth the wavelet coherogram over a four


second interval. The rationale behind this choice is that four 50

seconds is the length of each segment in the STFT coherence.

Frequency
The results of this smoothing operation can be seen in fig.6. 40

For further comparison with Fourier based coherence, fig. 7


displays the average wavelet coherence across time. Upon 30

comparing with fig.3, one can observe that they offer


approximately identical frequency resolution. 20

STFT Coherogram
70 10
0 5 10 15 20 25 30 35 40
Time

60 Fig.5. Wavelet Coherence plotted as a grayscale image. Darker regions


indicate higher levels of coherence. This is the coherence between the
first PMC channel and the SMC channel.
50
Frequency

wavelet Coherogram
40 70

30 60

20 50

Frequency
10 40
0 5 10 15 20 25 30 35 40 45
Time

Fig.4. STFT coherence plotted as an image in grayscale versus time and 30

frequency. The darker regions indicate higher levels of coherence. This is


the coherence between the first PMC channel and the SMC channel. 20

10
To further test the wavelet coherence method, in 0 5 10 15 20
Time
25 30 35 40

comparison with the STFT coherence method, we next Fig.6. Wavelet coherence displayed after smoothing over a span of four
evaluate both of them over another pair of channels. This time seconds. Compare with fig. 4.
we choose a second channel from the primary motor cortex
more anterior than the first, with the same supplementary 0.46
Average Wavelet Coherence

motor cortex channel as previously. We show the results of


0.44
the STFT approach in fig.8, and of the wavelets approach in
fig.9.
Averaged Wavelet Coherence Index

0.42

C. Discussion 0.4

Upon comparing fig.4 and fig.6, one notices that the wavelet 0.38

coherence detects the coupling between the two signals, 0.36

regardless of the frequency range. This is an immediate


0.34
consequence of the frequency-adaptive window size utilized in
both the wavelet transform and the wavelet coherence 0.32

estimate. On the other hand, the STFT coherence, whose 0.3

parameters were designed to detect coherence around the


30Hz range, fails at detecting coupling at 60Hz, which we 10 20 30 40
Frequency
50 60 70

know exists as a result of line interference on both channels.


Fig.7. Marginal Wavelet Coherence plotted versus frequency. This was
Similarly, upon comparing fig.8 and fig.9, one immediately obtained by averaging the wavelet coherence across all time instances.
notices the predominant 10Hz coherence in both. We
speculate that this 10Hz signal represents subcortical influence
detected in instances where the STFT approach fails to register
of the basal ganglia, via the venterolateral thalamic nucleus, to
significant coherence. For example, the STFT approach again
the SMC, which is then being communicated to the PMC.
fails to detect the 60Hz coherence, and also fails to register
With the wavelets approach, this important coherence was

viii
some instances where 10Hz coherence exists. In conclusion, we have shown how the wavelets
wavelet Coherogram
coherence performs favorably compared to the STFT
70 coherence approach at detecting coupling at various
frequency ranges, especially when the potentially
60
‘interesting’ frequencies cannot be specified a prior. As
50 both methods reveal that the EEG-EEG coupling between
brain regions are transient, task-dependent, and take place at
40
multiple frequencies, the wavelet coherence may prove
Frequency

30
advantageous because it is more versatile in modifying the
temporal resolution to observe long-term trends in coupling.
20

REFERENCES
10
[1] J. P. Lachaux, et al., “Estimating the time-course of coherence between
0
single-trial brain signals: an introduction to wavelet coherence,”
0 5 10 15 20 25 30 35 40 Neurophysiol. Clin , 32(3),2002, pp.157-74.
Time
[2] J.N. Caviness, C.H. Adler, M.N. Sabbagh, D.J. Connor, J.L. Hernandez,
Fig.9. Wavelets coherence of the second primary motor cortex T.D. Lagerlund, “Abnormal corticomuscular coherence is associated
channel, with the supplementary motor cortex channel, plotted after with the small amplitude cortical myoclonus in Parkinson's disease,”
smoothing. The darker regions indicate higher levels of coherence. Mov Disord.,18(10), Oct 2003, pp. 1157-62.
[3] C. Torrence, and G.P. Compo, “A Practical Guide to Wavelet Anaysis,”
Bulletin of the American Meteorogical Society, vol.79 (1), pp. 61-78.
[4] D.M. Halliday, J.R. Rosenberg, A.M. Amjad, P. Breeze, B.A. Conway,
and S.F. Farmer, “A Framework for the analysis of mixed time
series/point process data- theory and application to the study of
physiological tremor, single motor unit discharges and
electromyograms,” Prog. Biophys. Molec. Biol.,vol. 64(2-3), 1995,
STFT Coherogram
70 pp.237-278
[5] M.R. Baker, and S.N. Baker, “The effect of diazepam on motor cortical
60 oscillations and corticomuscular coherence studied in man,” J.Physiol,
546(3), 2003, pp.931-942.
50
[6] P. Grosse, M.J. Cassidy, P. Brown, “EEG-EMG, MEG-EMG and EMG-
EMG frequency analysis: physiological principles and clinical
applications,” J.Clinical Neurophysiology, vol. 113, 2002, pp. 1523-
40
Frequency

1531
[7] J.R. Rosenberg, A.M. Amjad, P. Breeze, D.R. Brillinger, and D.M.
30
Halliday, “The Fourier approach to the identification of functional
coupling between neuronal spike trains,” Prog. Biophys. Mol. Biol., vol
20 53, 1989, pp 1-31
[8] S. Mallat, A Wavelets Tour of Signal Processing. San Diego, CA:
10 Academic Press, 1998, ch. 4.
[9] Inc The Math Works, MATLAB wavelets toolbox 2.0 reference
0 guide.
0 5 10 15 20 25 30 35 40 45
Time [10] D.J. Macfarland, L.M. McCane, S.V. David, J.R. Wolpaw, “Spatial filter
selection for EEG-based communication,” Electroencephalogr.Clin.
Fig.8. STFT coherence of the second primary motor cortex channel, Neurophysiol, vol. 103(3), sep 1997, pp.386-394.
with the supplementary motor cortex channel, plotted as an image
in grayscale versus time and frequency. The darker regions indicate
higher levels of coherence.

ix

You might also like