Artificial Neural Networks as a Tool for Recognition of Movements by
Electroencephalograms
Semen A. Kurkin, Elena N. Pitsik, Vyacheslav Yu. Musatov,
Anastasia E. Runnova and Alexander E. Hramov
Research and Education Center “Artificial Intelligence Systems and Neurotechnology”, Yuri Gagarin State Technical
University of Saratov, 77 Politechnicheskaya str., Saratov, Russia
Keywords:
Artificial Neural Networks, Brain-Computer Interface, EEG Analysis, Brain Activity, Multilayer Perceptron,
Radial Basis Function, Support Vector Machine.
Abstract:
Recognition of human brain activity associated with imaginary or real movements is a complex task that
requires an accurate and conscious choice of analysis approach. Recent researches revealed the great potential
of machine learning algorithms for electroencephalography data analysis due to the ability of these methods
to establish nonlinear and nonstationary correlations, and the most attention is focused on artificial neural
networks (ANNs). Here, we introduce the ANN-based method for recognition and classification of patterns
in electroencephalograms (EEGs) associated with imaginary and real movements of untrained volunteers.
In order to get the fastest and the most accurate classification performance of multichannel motor imagery
EEG-patterns, we propose our approach to selection of appropriate type, topology, learning algorithm and
other parameters of neural network. We considered linear neural network, multilayer perceptron, radial basis
function network and support vector machine. We revealed that appropriate quality of recognition can be
obtained by using particular groups of electrodes according to extended international 1010 system. Besides,
pre-processing of EEGs by low-pass filter can significantly increase the classification performance. Obtained
results provide better insight on neural networks potential for integration in brain-computer interfaces that are
based on EEG patterns recognition.
1 INTRODUCTION
Development of the recognition methods of hu-
man brain activity associated with imaginary or real
movements is essential for brain-computer interfaces
(BCIs), which are highly demanded in many fields
of science and technology including medicine, high-
tech and industry (Kawase et al., 2017; Spuler, 2017;
Stacey and Litt, 2008). The most striking exam-
ples of possible application of BCIs are rehabilita-
tion of patients with cognitive and motor disabilities,
mental control of exoskeletons, manipulators, robots
and other complex technical devices (Peternel et al.,
2016), improving the education quality using BCI
with biological feedback, etc.
Modern BCI systems require effective processing
tools for EEG-patterns as a part of feedback mecha-
nism. Here, we introduce the approach based on ar-
tificial neural networks. Indeed, application of neural
networks for BCIs is actively studied issue in context
of EEG-data recognition (Hamedi et al., 2014; Manor
and Geva, 2015) due to a high efficiency and good
recognition performance provided by these methods.
In particular, we consider classification of real and
imaginary movements of limbs by EEGs using differ-
ent types of neural networks and various methods of
training data representation (various channels selec-
tions and using of low-pass filter). Obtained results
can be successfully used for development of BCI-
based control systems for exoskeletons or anthropo-
morphic robots for therapy of patients with various
motor disorders after trauma or stroke (Nam et al.,
2018; Peternel et al., 2016).
2 METHODS
2.1 Experimental Setup
31-channel EEG was extracted during several ses-
sions of carefully planned experiments with 12 vol-
unteered participants, both male and female. All
166
Kurkin, S., Pitsik, E., Musatov, V., Runnova, A. and Hramov, A.
Artificial Neural Networks as a Tool for Recognition of Movements by Electroencephalograms.
DOI: 10.5220/0006860201660171
In Proceedings of the 15th International Conference on Informatics in Control, Automation and Robotics (ICINCO 2018) - Volume 1, pages 166-171
ISBN: 978-989-758-321-6
Copyright © 2018 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved
subjects were healthy and were not participating in
any experimental work before, i.e. subjects were not
trained for execution of imagery movements. Two
types of experiments were carried out: the first cor-
responded to real movements, and the second to
the imagery. Each experiment was 30 minutes long
and included two types of tasks: movement of left or
right leg.
Two EEG-datasets corresponding, respectively, to
right and left leg imagery movements were formed,
each one containing 6000 samples. For ANN training,
we used fragments of 3 or 2.5 seconds length. Each
fragment was corresponding to one type of event.
Whole dataset was divided into training and test parts
in the ratio of 50% on 50% (Haykin, 2008).
Note, we collected also EEGs of real movements
of the limbs to perform four-class recognition. Our
goal was to obtain clear and stable classification that
is appropriate for BCIs.
It is important to note that there are certain dif-
ficulties associated with EEG-data analysis extracted
during experiments with untrained subjects. Recent
studies revealed various advantages of BCI-training
for analysis of activity associated with motor im-
agery: for example, evoked motor responses were
larger for BCI-trained subjects (Mokienko et al.,
2013; Dijkerman et al., 2004). Despite that, devel-
opment of new methods of EEG-patterns recognition
and classification of untrained subjects is essential for
BCI-based neurologic rehabilitation therapy because
of inability of patients to perform training (Jackson
et al., 2001). So, current study is dedicated to devel-
opment of ANN-based method that is able to perform
accurate classification of imaginary and real move-
ments by EEG of untrained subjects.
2.2 Machine Learning Methods
In present study, we used four types of neural network
architectures, namely linear neural network, multi-
layer perceptron (MP), radial basis function (RBF)
network and support vector machine. This subsection
contains a short review of mathematical basis of these
algorithms.
Neural networks are biologically inspired models
that process input signal in the way the real neural
network of the brain does. Classical neural network
model consists of one input and one output layers and
one or more hidden layers (see Fig. 1)
This model, in particular, corresponds to mul-
tilayer perceptron (Bishop, 1995; Carling, 1992;
Fausett, 1994; Haykin, 2008). Elements with sig-
moidal activation functions are organized in layered
topology with forward signal transmission. This type
x
1
x
2
x
3
x
4
x
n
Input
Hidden layers
Output
N
11
N
12
N
13
N
14
N
1n
N
k1
N
k2
N
k3
N
k4
N
kn
x
n+1
Figure 1: General model of artificial neural network.
of network can be interpreted as input–output model,
where the weights and biases are free parameters.
Such network can model the function of connection
between inputs and outputs of almost any degree of
complexity, and the number of layers and elements in
each layer defines the complexity of the function.
The second network model that we considered
was radial basis function network (RBFN). RBFN has
a number of advantages over multilayer perceptron.
First, RBFN models a random nonlinear function of
connection between inputs and outputs, using only
one hidden layer, which makes unnecessary the se-
lection of number of layers. Second, parameters of
linear combination in input layer can be completely
optimized, using methods of linear modelling, which
work fast and have no difficulties with local minima
that interfere during multilayer perceptron training.
Thus, RBFN trains much faster than multilayer per-
ceptron.
On the other side, practical use of neural networks
shows that RBFN requires more number of elements
for correct modelling of functions, which means that
RBF-based model will work slower and require more
memory than corresponding MP. RBFN cannot ex-
trapolate the conclusions beyond the area of known
data. When the data is remote from the training set,
the value of response function drops to zero quickly.
On the contrary, MP provides more specific solutions
for processing highly deviant data (Patterson, 1996;
Ripley, 1996).
Along with the multilayer perceptron and RBFN,
support vector machines (SVMs) are universal ap-
proximators used to solve classification problems.
The idea of SVM is constructing a hyperplane that
acts as the surface of solutions that maximally sep-
arates the different classes. SVM can provide good
quality of generalization in classification task without
a priori knowledge about subject area of particular is-
sue. This feature is unique for SVM. According to
this method, the point in space is considered as a vec-
tor of dimension p, and classifier is a hyperplane of
Artificial Neural Networks as a Tool for Recognition of Movements by Electroencephalograms
167
dimension p 1, that divides points. The data can be
classified using differenthyperplanes,but the best one
provides the best division between two classes.
Initially, SVM is a linear classifier, i.e. it can solve
only linearly separable tasks. Applying nonlinear ker-
nel, one can map initial data into the space of greater
dimension, where an optimal separating hyperplane
can exist. The following functions are often used as
the kernel ones:
Linear function: K(x
i
, x) = x
i
t
x
Sigmoid: K(x
i
, x) = tanh(k(x
i
, x)+c), k > 0, c < 0
Radial basis function: K(x
i
, x) = e
γkx
i
xk
2
, γ > 0
During the analysis, we determined that the best
results in accuracy and speed of recognition of EEG-
patterns associated with motor or real imagery were
achieved with next configurations:
RBFN with 251 neurons in hidden layer with
Gaussian activation function, 31 input and 1 out-
put linear neurons;
Multilayer perceptron with one hidden layer con-
sisted of 15 neurons with hyperbolic tangent as an
activation function, 31 input linear neurons and
one output neuron with logistic activation func-
tion;
SVM with nonlinear kernel based on radial basis
function with value 0.01 < γ < 0.1.
All results describing below were obtained us-
ing presented configurations of neural networks. For
greater representativeness we also used linear model,
that consists only of the input and output layer and
does not have any hidden layer. Such model is effec-
tive for establishing simple linear dependencies, but
we studied it additionally in order to increase under-
standing of how neural networks work with such non-
linear and nonstationary data as EEG.
The described ANNs were implemented using the
Matlab package. The method of error backpropaga-
tion was used to train the ANNs.
2.3 Dataset Optimization
Before training ANN, we performeddataset optimiza-
tion in order to improve classification quality. The
idea was to reduce number of EEG channels and use
different channel sets for classification until the com-
bination of both parameters, i.e. channels number and
classification accuracy, is optimal. Channel sets asso-
ciate with brain areas where corresponding electrodes
were placed, namely, with frontal, central, parietal,
temporal and occipital lobes. During classification,
we used 13 different channel sets including full place-
ment consisted of 31 channels. We also calculated the
results of classification averaged on one electrode.
Besides the channel selection, we also performed
low-pass filtering with cutoffs f
c
= 4 Hz or f
c
=
15 Hz. Pre-filtering of EEG data is necessary for re-
ducing intrinsic noise and artifacts, such as eye move-
ments and blinks. It is known that appropriate filter
provides better classification performance due to re-
ducing signal redundancy. However, the selection of
filter type, as well as development new ones, often be-
comes the study objective (Kumar et al., 2017; Gaur
et al., 2015). Here, we shortly describe the effect of
pre-filtering on neural network classification perfor-
mance.
3 RESULTS
The session of numerical experiments was conducted.
The full dataset that contained data from whole exper-
iment was splitting into the sets of duration 2.5 sec-
onds and 3 seconds, each one contained one real or
imaginary movement event. The qualities of classifi-
cation of different ANN architectures and types were
compared.
3.1 Imaginary Movements
The Fig. 2 presents averaged over all subjects values
of recognition accuracy of imaginary movements of
legs using different groups of electrodes. One can
see, that the best results of classification correspond
to RBFN: in the case without pre-filtering (Fig. 2a
and 2b) accuracy reaches 80% when using all elec-
trodes and 70% — in average. Then goes multilayer
perceptron with 70% recognition accuracy maximum
and 65% in average. The linear network shows un-
stable recognition on the level of 58%. Comparison
of Fig. 2a and 2b corresponding to different dataset
lengths shows that this value does not affect signif-
icantly on recognition accuracy. Thus, we used 3-
second fragments in the following analysis.
Then we investigated the influence of pre-filtering
of initial EEGs with low-pass filter with f
c
= 4Hz or
f
c
= 15 Hz. Fig. 2c and Fig. 2d show that pre-filtering
of input data with low-pass filter allows to signifi-
cantly increase the recognition accuracy (10 20%
on average), and the low-pass filter with f
c
= 4 Hz
demonstrates the best results and allows to achieve
the classification accuracy up to 95%. From phys-
ical point of view, the last result means that signif-
icant increase of recognition accuracy due to low-
pass filter appears on account of cleaning the use-
ICINCO 2018 - 15th International Conference on Informatics in Control, Automation and Robotics
168
50%
60%
70%
80%
90%
100%
F+Fp T T+C P P+C O+P P+O+C Fp+F+T Left Right Middle All
50%
60%
70%
80%
90%
100%
F+Fp T T+C P P+C O+P P+O+C Fp+F+T
50%
60%
70%
80%
90%
100%
F+Fp T T+C P P+C O+P P+O+C Fp+F+T
50%
60%
70%
80%
90%
100%
F+Fp T T+C P P+C O+P P+O+C Fp+F+T
Linear network Multilayer perceptron Radial Basis Function Support vector machine
Left Right Middle All
Left Right Middle All
Left Right Middle All
a
b
c
d
Figure 2: Recognition accuracy of legs motor imagery averaged over all subjects using different groups of electrodes (X-axis)
corresponding to different EEG channel sets: (a) without pre-filtering, 3 seconds fragment length; (b) without pre-filtering,
2.5 seconds fragment length; (c) with pre-filtering with f
c
= 15Hz; (d) with pre-filtering with f
c
= 4Hz. Four types of ANNs
were used (see the caption in the figure). We used next channel sets: full placement (All, 31 electrodes), right hemisphere (9
electrodes), left hemisphere (12 electrodes), parietal, occipital and central lobes (P+O+C, 9 electrodes), frontal and temporal
(F p+ F + T, 12 electrodes), parietal and occipital (P + O, 6 electrodes), parietal and central (P +C, 6 electrodes), central
and temporal lobes (C + T, 7 electrodes), frontal (F p+ F, 8 electrodes), middle (12 electrodes), temporal (T, 4 electrodes),
parietal (P, 3 electrodes).
ful low-frequency signal from high-frequency noise,
which appears during EEG recording. Note, that
SVM shows 2 7% lower recognition accuracy than
RBFN.
It is obvious that the full placement (31 EEG
electrode) provides the best classification result, de-
spite the high dimensionality of dataset and redun-
dant number of channels. However, it is possi-
ble to use less electrodes without significant loss in
classification accuracy: one can see that electrodes
placed on frontal and temporal lobes (12 electrodes,
Fp + F + T) and several other sets (6–9 electrodes,
P+ O+C, P+C, T +C, F + F p) provide 90% ac-
curacy. Thus, the selection of channel set depends
on particular goal. If the channel set used in BCI is
more important than classification quality, then one
can choose one of proposed sets. However, it should
be noted that using channel sets above does not affect
accuracy significantly.
We also calculated the “quality per channel” char-
acteristic, which is defined as the ratio of the classifi-
cation accuracy for the given channel set to the num-
ber of channels in the set (see Fig. 3).
One can see, that frontal channel set selected
above as optimal configuration shows one of the
best quality of recognition per electrode. Despite
the fact that middle lobe, that includes 7 electrodes
from frontal, central, parietal and occipital lobes
(Fpz, Fz, FCz,Cz,Cpz, Pz, Oz), shows the best result
in Fig. 3, its integral classification performance is
worse than for frontal channel set. This can be asso-
ciated with complex nature of EEGs corresponding to
imaginary movements, i.e. imagination of leg move-
ment can find a response in electrical activity of re-
mote brain areas that are not not localized near the
middle.
0%
2%
4%
6%
8%
10%
12%
All Right Fp+F+T Left P+O+C Frontal
(F+Fp)
Middle
Linear network Multilayer Perceptron
Radial Basis Function Support vector machine
Figure 3: The results of calculating “quality per channel”
characteristic.
3.2 Real Movements
In the previous section, we examined the optimal ap-
proaches to the choice of input data and channel set,
Artificial Neural Networks as a Tool for Recognition of Movements by Electroencephalograms
169
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
F+Fp P+O+C Fp+F+T Left Right Middle All
Linear Network
Multilayer Perceptron
Radial basis function
Figure 4: Recognition accuracy of legs real movements averaged over all subjects using different groups of electrodes (X-
axis) corresponding to different EEG channel sets. Four types of ANNs were used (see the caption in the figure). All data is
filtered with low-pass filter with f
c
= 4 Hz.
which provide the best quality of recognition and
classification of imaginary movements when using
ANNs. Here, we consider the effectiveness of the
proposed approaches in the recognition of real mo-
tions by EEGs. We represent the results of recogni-
tion accuracy of real movements of legs using dif-
ferent ANNs (see Fig. 4). Analogously, numerical
experiments revealed that pre-filtering with low-pass
filter with f
c
= 4 Hz increases significantly classifica-
tion performance over all channel sets.
In this case, one of the most important results
is high classification performance when using differ-
ent channel sets. In particular, electrodes placed on
frontal lobe (F p + F + T) provide 87% classification
accuracy using RBFN, which can be considered as
good result.
4 CONCLUSIONS
We developed mathematical model based on ANN for
classification of EEG-patterns corresponding to imag-
inary or real movements, which demonstrated high ef-
ficiency for untrained subjects. Achieved recognition
accuracy of movements was up to 9095% for group
of subjects. RBFN demonstrated more accurate clas-
sification performance in both cases. Pre-filtering of
input data using low-pass filter significantly increases
recognition accuracy on 10 20% in average, and the
low-pass filter with cutoff frequency 4 Hz shows the
best results. It was revealed that using different sets
of electrodes placed on different brain areas and con-
sisted of 6-12 channels, one can achieve close to max-
imal classification accuracy. In particular, it is conve-
nient to use electrodes on frontal and temporal lobes
(Fp + F + T) for real movements, and several sets
containing 6-9 electrodes in case with imaginary
movements (P+ O+ C, P + C, T + C, F + F p). This
result is important from practical point of view since
it allows to use more compact systems of registration
of EEGs keeping required recognition accuracy.
ACKNOWLEDGEMENTS
This work has been supported by Russian Science
Foundation (Grant 17-72-30003).
REFERENCES
Bishop, C. M. (1995). Neural Networks for Pattern Recog-
nition. Oxford University Press.
Carling, A. (1992). Introducing Neural Networks. Wilm-
slow, UK: Sigma Press.
Dijkerman, C. H., Ietswaart, M., Johnston, M., and
MacWalter, R. S. (2004). Does motor imagery train-
ing improve hand function in chronic stroke patients?
a pilot study. Clinical rehabilitation, 18(5):538–549.
Fausett, L. (1994). Fundamentals of Neural Networks: Ar-
chitectures, Algorithms and Applications. New York:
Prentice Hall.
Gaur, P., Pachori, R. B., Wang, H., and Prasad, G. (2015).
An empirical mode decomposition based filtering
method for classification of motor-imagery eeg sig-
nals for enhancing brain-computer interface. In Neu-
ral Networks (IJCNN), 2015 International Joint Con-
ference on, pages 1–7. IEEE.
Hamedi, M., Salleh, S., Noor, A., and Mohammad-
Rezazadeh, I. (2014). Neural network-based three-
class motor imagery classification using time-domain
features for bci applications. In Region 10 Symposium,
2014 IEEE, pages 204–207. IEEE.
Haykin, S. (2008). Neural Networks: A Comprehensive
Foundation. Pearson; 3d edition.
Jackson, P. L., Lafleur, M. F., Malouin, F., Richards, C.,
and Doyon, J. (2001). Potential role of mental prac-
tice using motor imagery in neurologic rehabilita-
tion. Archives of physical medicine and rehabilitation,
82(8):1133–1141.
ICINCO 2018 - 15th International Conference on Informatics in Control, Automation and Robotics
170
Kawase, T., Sakurada, T., Koike, Y., and Kansaku, K.
(2017). A hybrid bmi-based exoskeleton for paresis:
Emg control for assisting arm movements. Journal of
Neural Engineering, 14(1):016015.
Kumar, S., Sharma, A., and Tsunoda, T. (2017). An im-
proved discriminative filter bank selection approach
for motor imagery eeg signal classification using mu-
tual information. BMC Bioinformatics, 18(16):545.
Manor, R. and Geva, A. B. (2015). Convolutional neural
network for multi-category rapid serial visual presen-
tation bci. Frontiers in computational neuroscience,
9:146.
Mokienko, O., Chervyakov, A., Kulikova, S., Bobrov, P.,
Chernikova, L., Frolov, A., and Piradov, M. (2013).
Increased motor cortex excitability during motor im-
agery in brain-computer interface trained subjects.
Frontiers in computational neuroscience, 7:168.
Nam, C. S., Nijholt, A., and Lotte, F. (2018). Brain-
Computer Interfaces Handbook: Technological and
Theoretical Advances. CRC Press.
Patterson, D. (1996). Artificial Neural Networks. Singa-
pore: Prentice Hall.
Peternel, L., Noda, T., Petric, T., Ude, A., Morimoto, J.,
and Babic, J. (2016). Adaptive control of exoskeleton
robots for periodic assistive behaviours based on emg
feedback minimisation. PLoS ONE, 11(2):1–26.
Ripley, B. D. (1996). Pattern Recognition and Neural Net-
works. Cambridge University Press.
Spuler, M. (2017). A high-speed brain-computer interface
(bci) using dry eeg electrodes. PLoS ONE, 12(2):1–
12.
Stacey, W. C. and Litt, B. (2008). Technology insight:
neuroengineering and epilepsydesigning devices for
seizure control. Nature Reviews Neurology, 4(4):190.
Artificial Neural Networks as a Tool for Recognition of Movements by Electroencephalograms
171