liu2012

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

2012 5th International Conference on BioMedical Engineering and Informatics (BMEI 2012)

EEG Feature Extraction and Pattern Recognition


During Right and Left Hands Motor Imagery in
Brain-Computer Interface

Cheng Liu1,Hailing Wang1, Hui Pu1 Yi Zhang1,Ling Zou1,2


1 2
School of Information Science and Engineering, State Key Laboratory of Robotics and System, Harbin
Changzhou University, Changzhou, Jiangsu, 213164, Institute of Technology,
China Harbin, Heilongjiang, 150001, China

Abstract—at present, it is an important issue to obtain accurate physical hand movements [4]. Brain activities modulated by
classification of EEG signal in brain-computer interface. We motor imagery of either the left or right hand are regarded as
collected the EEG data which are recorded at a sampling rate of good features for BCIs, because such activities are readily
250Hz by EGI-64 scalp electrodes placed according to the reproducible and show consistent EEG patterns on the
international 10/20 system. Firstly, discrete wavelet transform sensorimotor cortical areas [5]. Moreover, thanks to the
method is used to decompose the average power of the channel contralateral localization of the oscillatory activity, the
C3/C4 and P3/P4 in left and right hands imagine movement activities evoked from left and right hand motor imagery are,
during the some experimental period of time. The reconstructed comparatively, readily discriminated [6]. The signals generated
signal of approximation coefficient A6 on the sixth level is
in the motor cortex can be recorded from electrodes over
selected to build up a feature signal. Secondly, the performances
by Fisher Linear Discriminant Analysis and Support Vector
central head regions and the research has produced encouraging
Machine methods are compared. The final classifications results results [7][8][9]. The aim is to train subjects to control the
show that correct classification rate by Support Vector Machine cursor automatically by using the operant conditioning
is higher and gain an ideal classification results, which can approach.
establish a basis of real-time BCI application. Effective feature extraction method is an important
approach to improve the recognition accuracy. There are
Keywords-Brain-Computer Interface; Feature Extraction;
several feature extraction methods, such as: (1) Power Spectral
Motor Imagery; Pattern Classification
Analysis. Power Spectral Analysis can reflect variances of
signals’ power, but the time information may be lost. (2)
I. INTRODUCTION Adaptive Autoregressive (AAR). AAR model can reflect
There are some kinds of diseases which can damage the variances of event-related electroencephalograph (EEG)
neuromuscular communication between brain and the outside without prior information of related bands and is suitable for
environment, such as amyotrophic lateral sclerosis (ALS) [1]. online analysis. However, artifacts should be controlled
These diseases cause people to lose their movement ability effectively in application of this method. (3) Common Spatial
gradually and at a later stage people may become totally Pattern (CSP) [10]. The goal of CSP is to design spatial filters
paralyzed. Although modern life-support technology can which lead to new signal matrix whose variances are optimal
prolong patients’ lift, they live with low quality of life and for the discrimination of two classes of EEGs. Specific
bring their families and society heavy burden. People try to frequency bands need not to be pre-selected, but multi-
build a kind of communication and control channel directly electrode are required for the EEG analysis which limits the
between the brain and external devices, without the application of CSP in portable BCI system. So it is necessary to
participation of peripheral nerves and muscles, which named optimize the number of electrodes further. As a classifier,
Brain Computer Interface (BCI) [2]. linear discriminant analysis (LDA), support vector machine
(SVM) and neural network are used [11].
A number of groups around the world are developing BCI
systems, in which surface electroencephalography (EEG) is In this paper, we propose a method to classify the EEG of
used because it is noninvasive and mobile. The cognitive task mental tasks for left-hand movement imagination and right-
most commonly used in BCI studies is motor imagery, as it hand movement imagination [12]. Comparing with what we
produces changes in EEG that occur naturally in movement study before, the diffference is that the data in this paper is real
planning and are relatively straightforward to detect. Motor EEG data which we collect in our laboratory, and we also
imagery, defined as mental simulation of a kinesthetic compare and analyse the data of P3 and P4 electrode. The goal
movement [3], has been well established that the imagination of this study is to prove the viability of a movement imagery
of each left and right hand movement results in event-related prediction brain-computer interface (BCI), and to expect that
desynchronization (ERD) of mu-band power in the the two mental tasks can be classified with higher classification
contralateral sensorimotor areas, which is also the case for rate. Firstly, a rational time window is set by calculating the
1 Address correspondence to Ling Zou, Faculty of Information Science &
Engineering, Changzhou university, Changzhou, Jiangsu, 213164, China.
email: zouling@ cczu.edu.cn

978-1-4673-1184-7/12/$31.00 ©2012 IEEE 506


average power of channel C3/C4 and P3/P4 in left and right the part which played a role for the task of classification may
hands imagine movement. The time window’s average power be just one period. In order to find a suitable time window, the
is then decomposed by discrete wavelet transform (DWT). The average power of different imagine tasks of C3 and C4 channel
reconstructed signal of approximation coefficient A6 on the is computed firstly, so as to provide effective reference of the
sixth level is selected to build up a feature signal. Secondly, next step. And the process steps in channel P3/P4 are the same
Fisher Linear Discriminant Analysis (FLDA) is used with two as the process steps in channel C3/C4. Here, we just display
different threshold calculation ways and obtain good some results of the process steps in channel C3/C4.
misclassification rate. We also use Support Vector Machine The formula for calculating average power is:
(SVM) to compare the performance with Fisher Linear
Discriminant Analysis. The final classification results show
that correct classification rate by Support Vector Machine is 1 N 2
P( j ) = ∑ x f (i, j ) (1)
higher and gain an ideal classification results. N i =1

II. METHOD x 2f (i , j ) is the jth EEG data of the ith time experiment, P(j) is
In this paper, we use data which is collected during the BCI the average power of the jth EEG data corresponding to the N
experiments, and analyz them after the experiments, we would time experiments.
explain it later in this part. We could calculate the average power of C3 and C4 when
one imagined left-hand movement and one imagined right-hand
A. Data Set Description movement shown in Figure 2, 3. From these two figures, we
This dataset is recorded from three normal subjects (2 can see that the average power of the C3 electrode is stronger
males, 24y) during a feedback session. The subject sat in a than the average power of the C4 electrode in 0.6s to 0.8s,
relaxing chair with armrests. The task is to control a feedback obviously.
bar by means of imagery left or right hand movements. The
order of left and right cues is random. The experiment consists
of 7 runs with 40 trials each. All runs are conducted on the
same day with several minutes break in between. Given are 280
trials of 9s length. The first 2s is quite, at t=2s an acoustic
stimulus indicates the beginning of the trial with the “beep”,
and a cross “+” is displayed for 1s; then at t=3s, an arrow (left
or right) is displayed as cue. At the same time the subject is
asked to move a bar into the direction of the cue. The EEG data
are recorded at a sampling rate of 250Hz by EGI-64 scalp
electrodes and defined by 10-20 system. It is filtered between
0.01Hz and 40Hz. The figure 1 shows the experiment
paradigm. Figure 2. The relationship between the time and the average power of the C3
electrode and C4 electrode for left-hand imagery movement

Figure 1. Timing scheme

B. Preprocessing
In this paper, we use Net-Station software to preprocess the
Figure 3. The relationship between the time and the average power of the C3
data collected from our laboratory, and the steps are Filtering, electrode and C4 electrode for right-hand imagery movement
Lowpass filtering, Segmentation, Artifict Detection, Bad
Channel Replacement, Average, Montage Operations, Baseline In this study, we choose the Daubechies wavelets as the
Correction. In the next step, we use the process result with basic wavelet functions for their simplicity and general purpose
Baseline Correction for the feature extraction. applicability in a variety of time-frequency representation
problems. According to the sampling frequency of 250Hz, a 6
C. Feature Extraction level decomposition to the average power at time window is
Because the channel Cz show its independence of the motor used, thus having 6 scales of details (d1-d6) and a final
imagery, channels C3, C4, P3, P4 are chosen to used for feature approximation (a6). The decomposition results are shown in
extraction. The duration of each experiment is 9 seconds, but Figures 4, 5.

507
Figure 4. The wavelet decomposition of the C3 electrode and C4 electrode
for left-hand imagery movement
Figure 6. The feature signals of the left-right hands imagery movement

D. Classification
In order to demonstrate the effectiveness of the proposed
features in BCI application, the FLDA classification method
and SVM method are used in this paper. For the sake of self-
containment, this section briefly introduced the FLDA and
SVM.
a) FLDA Classifier
The goal in Fisher’s linear discriminant analysis (FLDA) is
to compute a discriminate vector that separates two or more
classes as well as possible. Here we consider the two-class
case. We were given a set of input vectors xi ∈ RD, i∈{1…N}
and the corresponding class-labels yi = {-1,1}. Denoting by N1
Figure 5. The wavelet decomposition of the C3 electrode and C4 electrode the number of training examples for which yi = 1, by C1 the set
for right-hand imagery movement of indices i for which yi = 1, and using analogous definitions
for N2, C2, the objective function for computing a discriminate
Here, the final approximation signals of C3 and C4 when vector w ∈ RD is
imagined left-hand movement are indicated as LC3A6 and
LC4A6, respectively, while the final approximation signals of
C3 and C4 when imagined right-hand movement are indicated ( μ1 − μ 2 ) 2
as RC3A6 and RC4A6, respectively. The results show that J ( w) = (4)
there is significant difference between left-hand and right-hand σ 12 + σ 12
imagery movement concerning the signal of approximation
coefficient A6 on the sixth level. The value of LC3A6 is bigger
than LC4A6 when imagined left-hand movement, while the 1 T
value of RC3A6 is smaller than RC4A6 when imagined right- μk = ∑ w xi (5)
N i∈Ck
hand movement. Supposing LA6 and RA6 are the difference of
the signal of approximation coefficient A6 on the sixth level of
C3 and C4, respectively, they are defined as the following
equations: σ k2 = ∑ ( wT xi − μ k ) 2 (6)
i∈Ck

LA6 = L3 A6 − L 4 A6 (2) This means that one was searching for discriminate vectors
that result in a large distance between the projected means and
small variance around the projected means (small within-class
RA6 = R3 A6 − R 4 A6 (3) variance). To compute directly the optimal discriminate vector
for a training data set, matrix equations for the quantities (μ1-
The curve of LA6 and RA6 is shown in Figure 6. μ2)2 and σ21+σ22 can be used. We first define the class means
Obviously, LA6 and RA6 can be selected as the features for mk:
distinguish the left-right hands imagery movement.

508
1 where σ is the kernel parameter. It is fair to note that the
mk = ∑ xi (7) parameters C and σ should be tuned properly for accurate
N i∈Ck
prediction of unseen amples. In this study, they are selected
using LIBSVM by 5-fold cross-validation over the following
Now we can define the between-class scatter matrix SB and
the within-class scatter matrix SW. grid of (C, σ ): (2−7… 27) × (2−10… 23).
The protruding characteristics of SVM lies in its elegant
mechanism of handling nonlinear function classes, i.e.,
S B = (m1 − m2 )(m1 − m2 )T (8) nonlinear information processing is carried out by means of
linear techniques in an implicit high-dimensional feature space
mapped by a nonlinear transformation φ(xi) from original input
2 space. Although the analytical expressions of φ(xi) is unknown,
SW = ∑ ∑ ( xi − mk )( xi − mk )T (9) only the inner product operations φ(xi)Tφ(xj) are involved, the
k =1 i∈Ck
kernel functions can be used to substitute the inner product
operations according to the Mercer theorem. Vapnik’s theory
With the help of these two matrices, the objective function show that the SVM solution is found by minimizing both the
for FLDA can be written as a Rayleigh quotient: error on the training set (empirical risk) and the complexity of
the hypothesis space, expressed in terms of VC dimension. In
this sense, the decision function found by SVM is a tradeoff
wT S B w between learning error and model complexity.
J ( w) = (10)
wT SW w
III. RESULTS AND CONCLUSION
By computing the derivative of J and setting it to zero, one Taking into account the different number of samples of
can show that the optimal solution for w satisfies the following experiments may have an impact on classification results, the
equation: data of the three subjects are carried out on grouping at the
beginning of the experiment. All of the groups are consisted of
250 training samples and 30 test samples, recorded as Subject
w∞SW−1 (m1 − m2 ) (11)
1, Subject 2, respectively. Experimental results are showed in
Table 1. From the Table 1, we could see that in the case of
The classification is conducted as follows: using Subject 1 (or Subject 2) data set, the results of Subject 1
and Subject 2 are almost the same when we used Fisher linear
Class1 if y >0 discriminant analysis method, when we use SVM for
x ∈ {Class 2 if y <0 (12) classification, the classification results are quite close. Also, we
could see that the feature in C3/C4 channel was better than it in
b) SVM Classifier P3/P4 channel. In addition the results obtain from SVM
method are superior to the results obtain from FLDA method
SVM is a classification algorithm based on statistical for both algorithms.
learning theory. The invention of SVM is driven by underlying
statistical learning theory, i.e., following the principle of
structural risk minimization that is rooted in VC dimension TABLE I. CLASSIFICATION OF DIFFERENT METHODS
theory, which makes its derivation even more profound. The Discriminate Criterion DWT+FLDA DWT+SVM
SVM has been a topic of extensive research with wide
applications in machine learning and engineering. The output C3/C4 Subject 1 81.2% 82.1%
of a binary SVM classifier can be computed by the following Subject 2 70% 89.7%
expression:
P3/P4 Subject 1 79.4% 79.5%
Subject 2 71.5% 77.1%
n
f ( x) = sgn( ∑ α i∗ yi K ( xi , x) ∗
+b ) (13) Average classification 75.5% 82.1%
i =1 rate
The above experimental results show that both the FLDA
Where {xi, yi} Ni=1 are training samples with input vector classifier and SVM classifier are effective based on DWT
xi = Rd; class labels yi∈{-1,1}, αI ≥ 0 are Lagrangian feature extraction when identifying the different mental tasks
multipliers obtained by solving a quadratic optimization from EEG signals; but the SVM classifier is more effective.
problem; b is the bias, and k{xi, xj} is called kernel function in The experimental results show that the feature extraction
SVM. Here only use the one typical kernel functions: linear and classification algorithm is rational, we also accumulate
kernel. experience and lay the foundation of the following study of
online brain-computer interface system.
K ( xi , x j ) = xT xi (14) We could also see that the classification method is offline,
and the subject is normal. In the future, we would make further

509
study on online BCI for the people with movement disorder,
which would promote BCI application in rehabilitation project.

ACKNOWLEDGMENT
This work is supported by the open project of the State Key
Laboratory of Robotics and System at Harbin Institute of
Technology (SKLRS-2010-2D-09, SKLRS-2010-MS-10), the
Natural science fund for colleges and universities in Jiangsu
Province (10KJB510003) and the Natural science fund in
Changzhou City (CJ20110023).

REFERENCES
[1] E. W. Sellers, and E. Donchin, “A P300-based brain-computer
interface: initial tests by ALS patients,” Clin Neurophysiology. vol.
117(3), pp. 538–548, March 2006.
[2] B. Blankertz, C. Sannelli, S. Halder, E. M. Hammer, A. Kübler, and K.
R. Müller, “Neurophysiological predictor of SMR-based BCI
performances,” NeuroImage. vol. 51(4), pp. 3–9, May 2010.
[3] M. Jeannerod, and V. Frak, “Mental imaging of motor activity in
humans,” Curr Opin Neurobiol. vol. 9(6) pp. 735-739, December 1999.
[4] G. Pfurtscheller, and C. Neuper, “Motor imagery and direct brain-
computer communication,” Proc. IEEE. vol. 89, pp. 1123–1134, July
2001.
[5] P. Höllinger, R. Beisteiner, W. Lang, G. Lindinger, and A. Berthoz,
“Mental representations of movements. Brain potentials associated with
imagination of eye movements,” Clin Neurophysiol. vol. 110(5), pp.
790–805, May 1999.
[6] B. Kamousi, A. N. Amini, and B. He, “Classification of motro imagery
by means of cortical current density estimation and Von Neumann
entropy,” J Neural Eng. vol. 4, pp. 17–25, June 2007.
[7] N. F. Ramsey, M. P. van de Heuvel, K. H. Kho, and F. S. S. Leijten,
“Towards human BCI applica-tions based on cognitive brain systems: an
investigation of neural signals recorder from the dorsolateral prefrontal
cortex,” IEEE Trans Neural Syst Rehabi Eng. vol. 14(2), pp. 14–17,
June 2006.
[8] G. Pfurtscheller, T. Solis-Escalante, R. Ortner, P. Linortner, and G. R.
Muller-Putz, “Self-paced operation of an SSVEP-based orthosis with
and without an imagery-based “brain switch: A feasibility study towards
a hybrid BCI,” IEEE Trans Neural Syst Rehabil Eng. vol. 18(4), pp. 9–
14, August 2010.
[9] H. J. Hwang, K. Kwon, and C. H, Im, “Neurofeedback-based motor
imagery training for brain-computer interface (BCI),” J. Neurosci.
Methods. vol. 179(1), pp.50–56. Jauary 2009.
[10] L . Fraiwan, K . Lweesy, and N. Khasawneh, “Classification of sleep
stages using multi-wavelet time frequency entropy and LDA,” Methods
Inf. Med. vol. 49(3), pp. 230-237, April 2010.
[11] D. Garrett, A. P. David, C. W. Anderson, and M. H. Thaut, “Comparison
of linear, nonlinear, and feature selection methods for EEG signal
classification.” IEEE Trans Neural Syst Rehabil Eng. vol. 11 (2), pp.
141–144, August 2003.
[12] Z. Ling, W. Xinguang, S. Guodong, and M. Zhenghua, ”EEG Feature
Extraction and Pattern Classification Based on Motor Imagery in Brain-
Computer Interface,” IJSSCI. vol. 3(3), pp. 43-56, July-September
2011.

510

You might also like