Sunteți pe pagina 1din 6

EEG SIGNAL CLASSIFICATION USING AAR AND SVM WITH EEG-

GYROSCOPE SENSOR OF EMOTIV EPOC


Ahmad Reza Musthafa, Handayani Tjandrasa
Informatics Department, Institut Teknologi Sepuluh Nopember
Jl. Raya ITS, Kampus ITS, Sukolilo, Surabaya 60111
E-mail: rezaaltraz@yahoo.com, handatj@its.ac.id

ABSTRACT
Electroencephalogram signals (EEG) has been widely researched and developed in various fields of science. EEG signals can
be classified into informations for the application of the topic Brain Computer Interface (BCI). There are several approaches in EEG
signal classification, but some of these approaches are not robust to the EEG signal that has a lot of artifact and recorded in real time.
This study aims to classify the EEG signal to obtain a more optimal result, especially in the EEG signal that has many artifacts and
recorded in real time. This research uses the Emotiv EPOC device to record EEG signals in real time. In this research, we propose the
combination of Automatic Artifact Removal (AAR) and Support Vector Machine (SVM) that it has accuracy of 70% in four classes
classification. This proposed AAR can improve 3% to 6% of accuracy.

Keywords: EEG signal classification, fast fourier transform, artifact removal, BCI

The head movement can affect almost the entire EEG


INTRODUCTION
signals from every electrode channels of EEG device.
EEG signals has been widely researched and Based on the problems found in EEG signals
developed in various fields of science and technology classification and artifacts removal, we proposed
nowadays. EEG is a signal that obtained from human brain Automatic Artifact Removal (AAR) using a modified ICA
activity, which connected with some of the activities of the that use two references of signal, EEG and Gyroscope
human. EEG signals can be classified into useful signals. In previous research, gyroscope sensor used to
information, eg motoric information, emotions, human detect artifact by distribution analysis [5], whereas in this
nature, etc. Classification of the EEG signal, can be a study using a modified ICA. Modification of ICA is to
useful technology for humans, especially for humans with obtain independent component which has a sequence
disabilities. So it can help them to do an activity like a index. The use of gyroscope sensor is expected to
normal people. overcome the problem of EEG signal which has a lot of
There are a lot of relevant researches on the artifacts caused by head movement. The artifacts removal
classification of EEG signals to the topic of Brain in this research had two stages, the first stage is the eye
Computer Interface (BCI). Research by using a blink artifacts removal, then the second stage is the head
combination of wavelet and Support Vector Machine movement artifacts removal. Automatic artifact removal
(SVM) has high accuracy [9]. Research that has the caused by eye blink and head movement is expected to
highest accuracy in EEG signals classification is using a improve the results of EEG signal classification.
combination of wavelet and Interval Type-2 Fuzzy Logic
System (IT2FLS) method [4] based on previous research
theory [8]. However, the research methods are not optimal MATERIALS AND THEORIES
if the input have a lot of artifacts that caused by head EEG signals were used in this research was recorded
movements or eye blink. The research methods are also using the Emotiv EPOC of users age 19 to 32 years[14],
not optimal when applied to EEG signals that acquired in do not have a mental disability, and never drink alcohol.
real time. There are some approaches that can be used to Age affects the production of EEG signals[13]. The type
remove artifacts in the EEG signal. Based on literature classification of EEG signals used in this research is the
between 2010 until 2015, researches on the topic of action signal or a command given by just thinking that
artifact removal only use Independent Component command. In this research used four classes or action,
Analysis (ICA) method [15, 16, 17]. In addition there are such as left, right, up, or down. At the signal recording
approaches that use the combination of ICA with other process, the user should see a visual on the monitor screen.
method, such as Lifting Wavelet Transform [18], and It aims to minimize the variance in the data was recorded.
Daubechies Wavelet Transform [19]. At these approaches EEG signal processing is techniques to process and
simply do the artifacts removal caused by eye blink [6], translate the EEG signal into useful information.
eye movement, and changes in the EEG voltage Classification of the EEG signals, can be a useful
interference. There is no artifact removal caused by head technique for humans, especially for humans with
movement. These approaches will have trouble when EEG disabilities. So it can help them to do an activity like a
signals have a lot of artifacts caused by head movement. normal people. However, the EEG signal processing has
many challenges, particularly the issue of noise or artifacts arithmetic operations as O(N2), whereas the calculation of
contained in the EEG signal. Artifacts can be caused by the FFT operation requires only as much as O(NlogN).
eye blink, head movements, muscle activity, the quality of
the electrode, etc. So its can reduce the quality of the EEG
signal, then the classification result is far from the Power Spectral Density (PSD)
expected. In this research, we proposed a modified ICA This method was first proposed by Welch in 1967.
that use combination of EEG and Gyroscope signals to Input is divided into short segments and periodogram
overcome the problem of artifacts in the EEG signal. calculation is based on FFT calculation, thus to estimate
the power spectrum can be done in a more efficient
Independent Component Analysis (ICA) computation. Each segment of data is modified by
multiplying at a window function (window), before the
Independent Component Analysis (ICA) is a signal calculation of the periodogram. Then periodogram that has
processing technique for finding hidden components that been modified will be averaged and will estimate the
make up a collection of random variables (the result of the better spectrum. The following is the equation to calculate
measurement, signal or general data). If A is n m matrix the power spectrum by using FFT.
of mixing signal and n is the noise, the observed (mixed) 1
| i1 wi xi e ji |2 ,
N

signal vector x can be written as follows: (4)


s(e jw )( N )
1
| i1 wi |2
N

EEG N

s(e jw ) is power spectrum, and wi is window coefficient.


Artifacts

Gyro
Support Vector Machine (SVM)
SVM concepts can be explained simply as an attempt
Figure 1. Artifacts in EEG signal to find the best hyperplane which functions as a two
(Source : Medical Engineering & Physics 35 2013) classes separator in the input space. As shown in Figure 2
[10]. Hyperplane of best separator between the two classes
x As n (1)
After estimate the matrix A, then calculate inverse of A
(called W) using Fast-ICA algoritm. After W is obtained,
source signals can be calculated as follows:
Class 2
y Wx (2)
There are some ambiguity in the ICA, such as can not
ascertain a variant of the independent component and can
not determine the sequence of independent components. Class 1
Therefore, in this research ICA is modified by adding the
calculation of standard deviation values for each
component, then the standard deviation value will be
compared, so as to obtain an independent component in Figure 2. Hyperplane SVM
accordance with the sequence and its variants.
can be found by measuring the margin hyperplane, and
looking for maximum points. Margin is the distance
Fast Fourier Transform (FFT) between the hyperplane to the nearest pattern of each
FFT is an efficient and powerful algorithm to class. SVM can classify the data separated linearly
calculate the Discrete Fourier Transform (DFT) and its (linearly separable) and non-linear (nonlinear separable)
inverse, so it can reduce the amount of DFT calculations, [3]. Linearly separable data is the data that can be
where the principle of DFT is to transform the analog separated linearly.
signal into discrete signals in time domain, and then SVM was first developed by Vapnik for binary
transformed into the frequency domain. This is done by classification, further developed for the multiclass
multiplying the discrete signal with a kernel function. The classification. Its approach is to build a multi-class
following is a calculation of the FFT, Derived from DFT- classifier, that is by combining several binary SVM. This
N data, approach consists of One Against All method and One
Against One method [1].
2
j mi
X (m) i 0 x(n)e
N 1 N (3)
METHODS
with i is an index in the time domain, while m is an index
in the frequency domain [11]. The conclusion of the FFT This research uses two references of signal, EEG and
algorithm, has lower computing time compared to DFT Gyroscope signals. Accordance goals and limitations in
algorithm. DFT calculations directly would require this research, the type of EEG signals used in this research
are beta and gamma waves. That is because the beta wave
Start
occurs when a person is thinking and awake, whereas the
gamma wave is generated when hard thinking. Data EEG signals and gyroscope
obtained from the gyroscope sensor will be used to support
artifacts removal. Figure 4 shows EEG signal processing Head movement artifact removal
in this research. ICA (EEG-Gyro)
Mean and stdev comparation

EEG
AAR FFT EEG IC Artifact IC
Gyroscope
Eye blink artifact removal
Get and signal ICA (EEG)
Mean and stdev comparation

SVM PSD EEG IC Artifact IC

Finish
Result : Left, Up, Down, or Right
Figure 5. Artifact removal design
Figure 3. Research design
Feature Extraction
a There are several approaches for EEG signal feature
extraction, such as spectrum analyzers, the Bayesian
approach [7], statistical analysis, wavelet transform. In this
b research, we use Power Spectral Density (PSD). This stage
aims to get features that are used for training and testing
process using SVM.
c

Classification
d
SVM classification method is divided into two
processes: training and testing. In the training process, the
e features are obtained from the feature extraction process of
the training data. While in the testing process, the features
are from the testing data.
Figure 4. EEG signal processing: (a) EEG signal, Training algorithm for each SVM-binary can be
(b) Artifact removal, (c) FFT result, (d) Inverse FFT written as follows: Matrix B (feature extraction results) as
for alpha and beta waves, (e) PSD result an input and the vector Y as a target input and the output is
w, x, b (variables of hyperplane). The steps [2] are
described as follows:
Automatic Artifact Removal 1. Initialize Input (Z = B) and Target (Y) as a training
In this research we proposed Automatic Artifact composition of two classes.
Removal (AAR) using a modified ICA that use two 2. Calculate Gaussian kernel K(Z,Zi ) = exp | Z Z i | 2
( )
references of signal, EEG and Gyroscope signals. (2 2 )
Especially for artifacts removal caused by head 3. Calculate Hessian matrix H = K(Z,Zi ) * Y * YT.
movements and eye blink. 4. Initialize c and epsilon.
The results produced by the ICA method sometimes 5. Initialize vector e as a vector unit which has
have indexes that are not similar sequence between the dimensions equal to the dimension Y.
EEG signals and the ICA outputs. To overcome this, we 6. Calculate quadratic programming solutions: min
added a comparison between mean and standard deviation
values of each ICA outputs.
1
L( ) T H e T , where yT 0 and
2
0 c.
SVM-Multiclass classification for One Against All of testing data. In this research we use LIBSVM library
will build several binary SVM k (k is the count of classes). [12].
Kernel functions used in this research is Gaussian kernel.
K(x,y)=exp ( | x y | ) .
2
(5) RESULTS AND DISCUSSIONS
(2 )
2

A number of support vector at each training data The data used in this research is 150 EEG signals,
must be calculated to get the best solution of separator or eight channels in each signal. EEG signals were recorded
hyperplane. Solution of separator obtained by the using Emotiv EPOC device directly, and requires two
following formula w =iyixi ; b = yk- wTxk for each xk , seconds duration. The recorded signals has a length of 256
bit for each channel. Recording process must consider the
with k 0. The testing process at each SVM-binary also
use w, b, and xi value that resulting in the training process terms of the recording process that used in this research,
such as having age between 19 to 32 years, never drink
in each SVM-binary. Function generated for the testing
alcohol, and do not have a mental disability. The recorded
process is
EEG signals will be processed by using proposed method
f i K ( xi , x d )wi bi (6)
in this research, then the results are stored into a database
where : i = 1 until k; xi = support vector; xd = testing data. to be used as training and testing data. 115 data are used as
The output is an index with the largest fi which is a class training data, and 35 data are used as testing data. Results

...
a

...
b

c
...

d ...

Figure 6. Feature of every class : (a) Left, (b) Right, (c) Up, (d) Down

Table 1. Experimental result of classification with proposed AAR

Class Method Precission Recall F-Measure


AAR* + SVM 0.92 1.00 0.95
2 AAR* + NN 1.00 1.00 1.00
AAR* + NN-SVM 0.92 1.00 0.95
AAR* + SVM 0.70 0.96 0.81
4 AAR* + NN 0.74 1.00 0.85
AAR* + NN-SVM 0.68 1.00 0.81

Table 2. Experimental result of classification without AAR

Class Method Precission Recall F-Measure


SVM 0.96 1.00 0.97
2 NN 0.96 1.00 0.97
NN-SVM 0.96 1.00 0.97
SVM 0.67 0.95 0.79
4 NN 0.68 1.00 0.81
NN-SVM 0.65 1.00 0.79
of EEG signal classification consist of information about can improve 3% to 6% of accuracy. In this research, the
thinking the action right, left, up, or down. results of NN are better than SVM in classification

EEG signals captured in


real time
Object moves depend on classification result

Figure 7. EEG classification experiment in real time

Offline testing performed by comparing the accuracy


of some methods that has been done in the previous
research. Online testing performed by controlling the a
simulation using the commands or instructions from EEG
signal in real time. Modification of ICA in this research is
done by adding a comparison of the mean and standard b
deviation to obtain independent components that have an
index corresponding to variants, as well as using the EEG
signal and gyroscope sensor as references. The use of c
gyroscope sensor is able to overcome the problem of
artifacts caused by head movement. Since the Emotiv
EPOC records gyroscope and EEG signal simultaneously. Figure 8. EEG signal: (a) EEG signal with
The results of classification with four class has 70% of head movement artifact, (b) Gyroscope
accuracy due to difficult to get detailed information from signal, (c) Cleaned EEG signal
the EEG signal. The results of classification with two
classes was able to obtain 92% of accuracy. The recorded process, but SVM are better than NN in time performance.
signals may also be affected by EOG, ECG, or EMG
activities. The accuracy value can be better if users or REFERENCES
volunteers are in high concentration condition when EEG
signals was recorded. There are differences in accuracy [1]. Hsu, C. W. 2002. A Comparison of Methods for
results of ICA method and modified ICA method. The Multi-class Support Vector Machines. IEEE
difference occurs when the EEG signals recorded have Transactions on Neural network, 13(2), 415-425.
many artifacts caused by head movement. When the user [2]. Damayanti, F., & Arifin, A. Z. 2010. Face
moves the head, the artifacts affect every electrode on the recognition using two dimentional linear
EEG device. It causes the artifacts removal process which discriminant analysis and support vector machine (In
only use EEG signals has not optimal results. Figure 8a is Indonesian). Kursor journal, 5(3), 147-156.
an EEG signal that is affected by head movement. Figure [3]. Burges, C. J. C. 1998. A Toturial on Support Vector
8b is a signal that obtained from gyroscope sensor. If only Machines for Pattern Recognition. Data Mining and
use EEG signal references, it will be difficult to remove Knowledge Discovery, 2(2), 955-974.
artifacts caused by head movement. [4]. Nguyen, T., & Khosravi, A., & Creighton, D., &
Therefore, in this research we use modified ICA with EEG Nahavandi, S. 2015. EEG signal classication for
and gyroscope signals. Our proposed method were able to BCI applications by wavelets and interval type-2
eliminate these artifacts, as shown in Figure 8c. the EEG fuzzy logic systems. Elsevier.
signal that has been cleaned from artifacts can improve the [5]. ORegan, S., & Faul, S., & Marnane, W. 2013.
accuracy value of classification.
Automatic detection of EEG artifacts arising from
head movements using EEG and giroskop signals.
CONCLUSIONS Elsevier, 867 874.
EEG signals classification by using our proposed [6]. Bertrand, A., & Moonen, M. 2014. Distributed eye
method has accuracy of 70% for four classes and 92% for blink artifact removal in a wireless EEG sensor
two classes. On the application of EEG signal processing network. IEEE International Conference on Acoustic,
in real time requires high enough computer performance, Speech and Signal Processing (ICASSP).
due to the EEG signals will be processed every two [7]. Suk, H. 2013. A Novel Bayesian Framework for
seconds. Automatic Artifact Removal in this research is
Discriminative Feature Extraction in Brain-Computer
better to use in case that more than two classes. That AAR
Interfaces. IEEE VOL. 35 0162-8828.
[8]. Liang, Q., & Mendel, J. M. 2000. Interval Type-2
Fuzzy Logic Systems: Theory and Design. IEEE
TRANSACTIONS ON FUZZY SYSTEMS, VOL. 8.
[9]. Alomari, M. H., & AbuBaker, A. 2014. EEG
Mouse:A Machine Learning-Based Brain Computer
Interface. International Journal of Advanced
Computer Science and Applications, Vol. 5, No. 4.
[10]. Lenc, L., & Kral, P. 2015. Automatic Face
Recognition System Based On The Sift Features.
ScienceDirect.
[11]. Riyanto, S. 2009. Decimation in Time (DIT) Fast
Fourier Transform (FFT) algoritm with 1/10 Hertz
resolutions (In Indonesian). Proceedings of the
National Seminar on Research, Education, and
Implementation. MIPA, UNY.
[12]. Chang, C. C., & Lin, C. J. 2011. LIBSVM : a library
for support vector machines. ACM Transactions on
Intelligent Systems and Technology, 2:27:1 - 27:27.
[13]. Vysata, O., & Kukal, J. 2014. Age-related changes in
EEG coherence. Neurologia, Science Direct, vol 48
(35-38).
[14]. Golz, M., & Sommer, D. 2013. Driver drowsiness
immediately before crashes A comparative
investigation of EEG pattern recognition.
Proceedings of the Seventh International Driving
Symposium on Human Factors in Driver
Assessment, Training, and Vehicle Design.
University of Applied Sciences Schmalkalden,
Germany.
[15]. Zhang, C., & Tong, L. 2015. Automatic Artifact
Removal from Electroencephalogram Data Based on
A Priori Artifact Information. China National Digital
Switching System Engineering and Technological
Research Center, Zhengzhou 450002, China.
[16]. Zachariah, A. 2013. Automatic EEG artifact removal
by independent component analysis using critical
EEG rhythms. Control Communication and
Computing (ICCC). IEEE 364-367
[17]. Zou, Y. 2014. Automatic Identification of Artifact-
Related Independent Components for Artifact
Removal in EEG Recordings. IEEE Engineering in
Medicine and Biology Society 73-81.
[18]. Jirayucharoensak, S. 2013. Automatic removal of
EEG artifacts using ICA and Lifting Wavelet
Transform. Computer Science and Engineering
Conference (ICSEC). IEEE 136-139.
[19]. Roy, V. 2014. Automatic Removal of Artifacts from
EEG Signal based on Spatially Constrained ICA
using Daubechies Wavelet. International Journal of
Modern Education and Computer Science (IJMECS)
Vol.6, No. 7.

S-ar putea să vă placă și