You are on page 1of 4

Marcin KOODZIEJ, Andrzej MAJKOWSKI, Remigiusz J.

RAK
Warsaw University of Technology, Institute of the Theory of Electrical Engineering, Measurement and Information Systems

A new method of feature extraction from EEG signal for braincomputer interface design
Streszczenie. W artykule przedstawiono opracowan przez autorw now metod ekstrakcji cech z sygnau EEG na uytek interfejsw mzgkomputer (BCI). W opracowanych algorytmach ekstrakcji cech wykorzystano transformacj falkow oraz statystyki wyszych rzdw. Przedstawiono wyniki bada zwizanych z wykorzystaniem proponowanych metod ekstrakcji cech do konstrukcji interfejsu mzg-komputer dziaajcego w oparciu o wyobraanie sobie ruchu. Eksperymenty przeprowadzono przy uyciu dwch elektrod (Nowa metoda ekstrakcji cech sygnau EEG na uytek interfejsw mzg-komputer). Abstract. The main aim of the article is to introduce a new method of feature extraction from EEG signal for brain-computer interface design. The proposed algorithms are based on wavelet transform and higher order statistics (HOS). Next authors present the research results for brain-computer interface design using motion imagining. Proposed feature extraction methods are implemented in construction of the interface. Experiments are conducted with use of two electrodes ().

Sowa kluczowe: BCI, interfejs mzg-komputer, EEG, ekstrakcja cech, transformata falkowa, statystki wyszych rzdw Keywords: BCI, brain-computer interface, EEG, feature extraction, wavelets, higher order statistics

Introduction In recent years, we can observe a growing interest in brain-computer interfaces (BCI) [3]. The main advantage of the communication between brain and computer is its "directness". The brain activity is processed into information understandable by a computer omitting all indirect factors such as muscles. The application of BCI is primarily to allow contact with paralyzed people. Brain-computer interfaces can also be used in entertainment and for military purposes. At present the main factors that restrict the wider use of brain-computer interfaces are: problems with acquisition of EEG signals and low speed of information conveyed by brain-computer technology [1,2]. Although there are many ways of the brain activity examination, the most widely used is electroencephalography (EEG). To enable brain-computer interface construction an efficient method of feature extraction from EEG signal is needed. In the article authors propose a feature extraction method based on higher order statistics calculated for the details of discrete wavelet transform (DWT) of EEG signal. Next some popular classifiers have been implemented and the results compared. The aim of the research is to check whether the efficient braincomputer interface can be built using only 2 channels of EEG signal. Limiting the number of electrodes is supposed to simplify the use of the interface and reduce the cost of the EEG signal amplifier. This would also facilitate the analysis, processing and classification of signals. BCI systems The current brain-computer interfaces are based on the EEG signals collected from 32 or more electrodes placed on scalp surface [3,4]. One of the key advantage of using EEG is the ability to observe brain activity at the time of occurrence of a specific events. Other methods, such as tomography, functional Magnetic Resonance Imaging (fMRI) enable more accurate location of increased brain activity, but require a relatively long time, and many complex calculations. Acquisition of EEG signal is quite a complex process. Amplitudes of signals collected from the electrodes, placed on the head are measured in just microvolts. So at first, many different disturbances, that manifest themselves as artifacts, have to be eliminated. There are two kinds of artifacts: physiological and technical. Physiological artifacts are bioelectrical signals from muscle activity, for example movements of limbs, tongue, forehead wrinkling, etc. Technical artifacts are all kinds of flaws associated with the

measurement technique and the presence of electric power frequency noise induced on the skin, in the elements of electrodes, wires and in the amplifier circuits. EEG signal changes according to the brain activity states. Depending on these states, we can distinguish several rhythms (waves). The gamma rhythm (above 40 Hz) is associated with mental activity, perception, problem solving, awareness. The beta waves (12 Hz to approximately 28 Hz) occur during daily activities, anxiety, and under the influence of certain drugs. The alpha waves (from 8 to 13 Hz) are typical for state of relaxation, especially with closed eyes. The theta waves (4-7 Hz) occur during deep meditation, intense dreams, intense emotions. The delta waves (from about 0.5 to 3 Hz) occur during a deep sleep, are also typical for young children and for certain types of brain damage. There are several methods of using EEG signal for brain-computer interface design. However, the most interesting and most difficult idea is to apply the imagining of movement by a human for machine control, the so-called brain potentials associated with movement [5,6]. An additional difficulty is that the imagining of motion can occur at any time (asynchronous BCI interface). During the reading of movement imagining effects the fact is used that different parts of cortex are responsible for activity of individual muscles. The brain activity is very similar during imagining of movement and the execution of the same movement. As it was already mentioned, current BCI systems based on the idea of a movement imagining use multichannel EEG signal acquired from 32, or more electrodes. Authors intention is to build such an interface using only two channels of EEG signal. Experiment description Data set used in experiments is provided by IDIAP Research Institute (Silvia Chiappa, Jos del R. Milln). The set contains data from 3 normal subjects acquired during 4 non-feedback sessions. The subjects were relaxed, sat in a normal chairs with arms resting on their legs. Each subject has two tasks to execute: imagination of repetitive self-paced left hand movements, imagination of repetitive self-paced right hand movements. Each session lasted 4 minutes with 5-10 minutes breaks in between them. The subject performed a given task for about 15 seconds and then switched randomly to another task on the operator's request. EEG data is not split in trials

PRZEGLD ELEKTROTECHNICZNY (Electrical Review), ISSN 0033-2097, R. 86 NR 9/2010

35

since the subjects are continuously performing any of the mental tasks. The form of raw EEG signals is as follows. Sampling rate was 512 Hz. Each line of the files contains the 32 EEG potentials acquired at a given time instant in the order: Fp1, AF3, F7, F3, FC1, FC5, T7, C3, CP1, CP5, P7, P3, Pz, PO3, O1, Oz, O2, PO4, P4, P8, CP6, CP2, C4, T8, FC6, FC2, F4, F8, AF4, Fp2, Fz, Cz. In the training files, each line has a 33rd component indicating the class number. In our experiment from the entire 32-channel recording, only two channels C3 and C4 are selected. On these data set feature extraction was carried out. It can be found in the literature [1,2,3], as well as previous studies of authors indicate that information from these electrodes can be sufficient for the purpose of the interface design (the electrodes are on the proper part of the cerebral cortex). Feature extraction steps (fig. 1) include: dividing the EEG signal into one-second intervals with half-second overlap, application of wavelet transform to each signal window (using the 7 level decomposition), calculation of higher order statistics (HOS) such as variance, skewness and kurtosis for each of the seven signal details of wavelet decomposition.

K - nearest neighbor classifier classifies the current feature vector, based on previous observation of the set of neighbor data. The classifier checks to what class belong more neighbors. In our case, the classifier based on the 10 - nearest neighbors was used. We used all 42 features to teach the classifier. As a measure of distance we used sum of absolute differences between features. Knnclassify function from Matlab package was used in that case.

Fig. 2. Details (d1,d2,d3 .. d7) and the approximation (a7) obtained by using wavelet transform of EEG signal from channel C3 Table 1. Classification error [%] for different classifiers and wavelets for the first user Session 1 LDA KNN SVM Mean db3 18,84 32,61 22,46 24,6 db4 20,65 30,07 26,81 25,8 db5 18,48 25,36 21,74 21,9 db6 20,29 21,74 24,64 22,2 db7 16,67 25,36 25,36 22,5 db8 22,83 27,17 26,09 25,4 db9 16,3 25 21,74 21,0 db15 23,91 25 24,64 24,5 db20 21,83 25,36 19,57 22,3 Mean 19,98 26,41 23,67 23,35 Session 2 LDA KNN SVM Mean db3 28,33 34,33 30,67 31,1 db4 26 34 30,67 30,2 db5 26 27,67 24,67 26,1 db6 23,67 25,67 28 25,8 db7 21,33 28 24,67 24,7 db8 24 30,33 26,67 27,0 db9 25,67 27,33 27,33 26,8 db15 25,33 25,67 22,67 24,6 db20 23,67 29,33 28,67 27,2 Mean 24,89 29,15 27,11 27,05 Session 3 LDA KNN SVM Mean db3 27,46 32,75 37,32 32,5 db4 26,41 43,66 33,1 34,4 db5 27,82 40,49 35,92 34,7 db6 30,63 40,49 30,99 34,0 db7 28,87 40,85 32,39 34,0 db8 34,51 39,08 35,92 36,5 db9 27,46 34,15 28,87 30,2 db15 30,99 41,9 39,34 37,4 db20 33,45 40,85 32,39 35,6 Mean 29,73 39,36 34,03 34,37

Fig. 1. Feature extraction steps from EEG signal

In this way 21 features (7 details 3HOS) from one EEG channel were obtained. Since the operation was performed on two channels, we had 42 features. This process was repeated for different Daubechies wavelets: db3, db4, db5, db6, db7, db8, db9, db15 and db20. In this way we have registered data records in our database. Figure 2 presents wavelet decomposition of one second window of EEG signal from channel C3. We used our own, prepared before, Feature Extraction Toolbox [1] in order to build the feature vectors. Each feature data set have been used to teach and test the following classifiers: Linear Discriminant Analysis (LDA), k - Nearest Neighbor (k-NN), Support Vector Machine (SVM). The task of the linear discriminant analysis as a classifier is to find such a hyper-plane that in the best way divides the data set into classes easy to separate. In this case all 42 features were used to build a model. The Matlab function classify was used for that purpose.

36

PRZEGLD ELEKTROTECHNICZNY (Electrical Review), ISSN 0033-2097, R. 86 NR 9/2010

We implemented the support vector machine algorithm with a linear kernel functions for learning and testing all 42 features. For that purpose functions: svmtrain and svmclassify from Matlab package were used. In order to determine the quality of classification, a tenfold cross-validation test was used. The entire feature set was split into 10 subsets. Nine subsets (90% of data) were used for teaching and one (10% of data) for testing. This way we obtained 10 results which were then averaged for further analysis. In that case Matlab functions crossvalind and classperf were implemented. The results from three different classifiers, for different people, three sessions and 10 cases of different wavelets from the family "db" are presented below (table 1,2,3). The results come from a tenfold cross-test.
Table 2. Classification error [%] for different classifiers and wavelets for the second user Session 1 LDA KNN SVM db3 27,57 38,97 39,71 db4 38,6 42,28 40,44 db5 33,82 31,25 33,82 db6 40,81 39,34 41,18 db7 33,46 45,96 31,62 db8 32,35 39,34 41,91 db9 35,66 41,91 35,29 db15 39,34 37,87 45,59 db20 41,54 40,07 46,32 Mean 35,91 39,67 39,54 Session 2 LDA KNN SVM db3 39,31 39,94 44,65 db4 40,57 42,14 42,77 db5 35,22 38,36 40,88 db6 40,57 42,14 39,62 db7 41,19 35,22 38,36 db8 37,74 39,62 37,74 db9 37,42 47,17 38,99 db15 39,62 48,11 41,51 db20 40,88 47,8 44,03 Mean 39,17 42,28 40,95 Session 3 LDA KNN SVM db3 38,32 43,07 46,72 db4 34,67 39,05 43,8 db5 33,21 40,88 34,31 db6 34,67 34,67 37,23 db7 28,47 36,86 29,2 db8 27,74 35,4 32,12 db9 35,4 28,47 47,45 db15 43,43 40,51 40,88 db20 38,69 41,24 44,53 Mean 34,96 37,79 39,58 Mean 35,4 40,4 33,0 40,4 37,0 37,9 37,6 40,9 42,6 38,37 Mean 41,3 41,8 38,2 40,8 38,3 38,4 41,2 43,1 44,2 40,80 Mean 42,7 39,2 36,1 35,5 31,5 31,8 37,1 41,6 41,5 37,44

Session 2 LDA KNN SVM db3 29,87 48,05 25,97 db4 27,27 39,61 34,42 db5 23,38 34,09 28,57 db6 36,36 35,71 35,06 db7 34,42 40,58 37,66 db8 37,34 36,69 38,31 db9 26,95 36,04 33,77 db15 31,82 31,82 22,77 db20 32,47 42,21 33,77 Mean 31,10 38,31 32,26 Session 3 LDA KNN SVM db3 28,25 49,03 31,82 db4 21,94 33,55 29,03 db5 21,94 36,77 27,74 db6 19,35 25,16 25,81 db7 22,26 27,42 22,58 db8 27,74 26,45 27,74 db9 26,77 31,29 27,1 db15 29,03 27,74 30,97 db20 26,13 29,35 28,39 Mean 24,82 31,86 27,91

Mean 34,6 33,8 28,7 35,7 37,6 37,4 32,3 28,8 36,2 33,89 Mean 36,4 28,2 28,8 23,4 24,1 27,3 28,4 29,2 28,0 28,20

In the tables 1, 2, 3 the classification errors for twochannel EEG signal lasting one second are presented. The errors for selected wavelets (db3 db20) and different classifiers (LDA, K-NN, SVM) are shown. Also the average values of the classification errors for the classifier and for the selected wavelets are presented. Conclusions Studies show that in the considered classification problem, the best results are obtained for using linear discriminant analysis (LDA). The results are sometimes even a few percent better than for k-NN algorithm. However, the results do not show clearly whether the kind of used wavelet have a major impact on the classification results. In addition, it is difficult to show the best wavelet for all users, although generally good results were obtained for wavelets db5 and db7. The interesting question is if only two electrodes are sufficient for detection of the complex process of motion imagining. Although the results for the first user look promising, we need to note that two electrodes do not completely solve the problem for other users. It is worth noting that the problem dramatically complicates when more classes are taken into consideration.

Table 3. Classification error [%] for different classifiers and wavelets for the third user Session 1 LDA KNN SVM Mean db3 41,14 44,94 38,61 41,6 db4 30,06 43,99 38,61 37,6 db5 35,76 43,35 35,44 38,2 db6 27,53 48,1 29,11 34,9 db7 28,48 40,19 27,22 32,0 db8 32,91 41,14 36,71 36,9 db9 26,58 45,25 32,91 34,9 db15 32,59 44,3 35,44 37,4 db20 22,78 44,3 27,85 31,6 Mean 30,87 43,95 33,54 36,12

Fig. 3. Feature correlation matrix for db5 wavelet, the first user

PRZEGLD ELEKTROTECHNICZNY (Electrical Review), ISSN 0033-2097, R. 86 NR 9/2010

37

Nevertheless, the precise location of the place which is responsible for the imagining of motion in connection with efficient methods of feature extraction and classification can help to reduce the number of electrodes. The absolute values of the correlation between the data characteristics for each user are presented in the form of matrices (Figs. 3,4,5). Large correlation indicate badlychosen features (redundancy), not bringing in any useful information. However, such results may also be caused by the process of movement imagining by the user. REFERENCES
[1] K o o d z i e j M . , M a j k o w s k i A . , R a k R . , Matlab FE_Toolbox - an universal utility for feature extraction of EEG signals for Brain-Computer Interface realization, Przegld Elektrotechniczny, 2010. [2] K o o d z i e j M . , M a j k o w s k i A . , R a k R . , Brain-computer interface - registration and analysis of EEG signal, selected problems, Przegld Elektrotechniczny, 2009. [3] W o l p a w J . R . , B i r b a u m e r N . , D . J . M c F a r l a n d , P f u r t s c h e l l e r G . , V a u g h a n T . M . , Braincomputer interfaces for communication and control, Clin. Neurophysiol., 113: 767791, 2002. [4] W o l p a w J . R . , M c F a r l a n d D . J . , V a u g h a n T . M . , Brain-Computer Interface Research at the Wadsworth Center, IEEE Trans. Rehab. Eng., 8(2): 222226, 2000. [5] P i n e d a J . A . , A l l i s o n B . Z . , V a n k o v A . , The Effects of Self-Movement, Observation, and Imagination on mRhythms and Readiness Potential (RPs): Toward a Brain-computer Interface (BCI), IEEE Trans. Rehab. Eng., 8(2): 219222, 2000. [6] B a b i l o n i C . , C a r d u c c i F . , C i n c o t t i F . , R o s s i n i P . M., C. Neuper, Pfurtscheller G., Babiloni F., Human Movement-Related Potentials vs Desynchronization of EEG Alpha Rhythm: A High-Resolution EEG Study, NeuroImage, 10: 658665, 1999. Authors: prof. dr hab. in. Remigiusz J. Rak, e-mail: rakrem@iem.pw.edu.pl; dr in. Andrzej Majkowski, e-mail: amajk@iem.pw.edu.pl; mgr in. Marcin Koodziej, e-mail: kolodzim@iem.pw.edu.pl Politechnika Warszawska, Instytut Elektrotechniki Teoretycznej i Systemw InformacyjnoPomiarowych, ul. Koszykowa 75, 00-661 Warszawa. Fig. 5. Feature correlation matrix for db5 wavelet, the third user

Fig. 4. Feature correlation matrix for db5 wavelet, the second user

38

PRZEGLD ELEKTROTECHNICZNY (Electrical Review), ISSN 0033-2097, R. 86 NR 9/2010

You might also like