1 Introduction

Brain-Computer Interfaces (BCI) is a technology developed for the purpose of providing people with neurological disabilities with an alternative communication channel to activate robot-assisted neurorehabilitation therapy devices. To achieve this goal, BCI systems based on non-invasive electroencephalographic signals (EEG) need to recognize information from mental tasks. Currently, for the development of BCI systems, conventional methods of supervised classification algorithms such as Linear Discriminant Analysis and Support Vector Machines or SVM are implemented [1]. These types of algorithms has provided satisfactory performance in controlled laboratory settings.

The next step in the development of BCIs based on EEGs is the use of these systems in applications during real and everyday activities. This requires greate precision in the detection of mental MI tasks carried out by the user. We propose to explore new classification models such as the Morphological-Linear Neural Network.

This work evaluates the performance of 3 classification algorithms: (i) Morphological - Linear Neural Network (MLNN), (ii) Support Vector Machine (SVM) and (iii) Multilayer Perceptron (MLP) in a three-class classification scenario using Multiclass Common Spatial Patterns (CSP) based features extracted from the EEG signals during motor movement intention and presents a comparison of their performance. The results show that although the classification percentages are similar, the MLNN model uses a smaller number of learning parameters, which means that this model can be used in limited and portable hardware by using fewer resources.

This work shows that Morphological-Linear Neural Network (MLNN) algorithm can be an effective classification model to obtain highest confident classification accuracy in three different movements states of upper limbs. The rest of this paper is organized as follows. Section 2 describes details about how dataset was recorded and prepared, how attributes are calculated to extract relevant information from the EEG signals. Section 3 describes the different classification algorithms used and the performance evaluation process. Section 4 describes the accuracies obtained on three-class classification scenario.

2 Recognition of Movement Intention from EEG Using MLNN

2.1 Data Recording

Seven healthy subjects voluntarily participated in this study. The experiment was conducted in accordance to the Helsinki declaration. All participants were duly informed about the research goals. The participants were asked to carry out a upper limb rehabilitation therapy session using the neurorehabilitation device Tee-R on passive mode [2]. The rehabilitation actions consisted of self-selected and self-paced movements of the right arm. The movements were (A) supination/pronation of the forearm and (B) flexion/extension of the arm. During the execution of the experiment, EEG signals were recorded from 21 scalp locations associated with motor brain activity according to the international 10 / 20 system using a g.USBamp with active electrodes (g.tec medical engineering GmbH, Austria). The reference and ground electrode were placed over left earlobe and AFZ, respectively. In addition, two digital signals from Tee-R were also recorded which indicated the movement type and the movement onset. The EEG signals were acquired at a sampling frequency of 1200 Hz and not filtering was applied.

2.2 Experimental Paradigm

The therapy session consisted of several trials which was controlled by three visual cues (See Fig. 1). The first cue showed during 3 s was an image with the text “relax” indicating to stay relaxed with the robot in the home position. The second cue showed during 12 s was an image with a “cross” indicating to perform any of two movements (self-selected). The subjects were asked to initiate the movement whenever they desired (waiting around 6 s after the cross was first displayed while avoiding any mental count). This means that they decided when to initiate the movement (self-initiated). The last cue showed during 3 s was an image with the text “rest” which indicated to rest, move or blink.

Fig. 1.
figure 1

Description of the experimental paradigm for self-selected and self-initiated movements.

2.3 Data Preprocessing

Visual artifact rejection processing was applied to rule out noise-contaminated trials. EEG signals were low-pass filtered at a cutoff frequency of 45 Hz using a 2nd-order Chebychev-type filter and then common average referenced (CAR) method was applied. Subsequently, EEG signals were shortened to 15-s duration trials, starting from the first visual cue to the second visual cue. For each trial the motion onset signals obtained from the Tee-R were used as time zero reference. EEG signals were aligned with this time reference.

All trials have the same reference to the movement onset (\(t=0\)) but the trial starting point (\(t_{ini}\)) and the trial ending point (\(t_{end}\)) are different for all of them. According to this, the time segment [\(t_{ini}\)+1, \(t_{ini}\)+3) and [−2, 0] correspond to relax and movement intention, respectively. Finally, the time segments of all the trials were labelled according to the motor stage (i.e., Relax, Int A, Int B) to construct the EEG dataset.

2.4 Attributes

The Common Spatial Pattern (CSP) algorithm was used as feature extraction method. CSPs is a technique commonly used in bi-class classification scenarios for brain activity information based on EEG signals. CSP allows to find a set of spatial filters that maximize the separability between the variances of signals of two conditions. CSP algorithm has been extended to a multiclass approach. In this work we use the One-Versus-the-Rest (OVR) algorithm which is a multiclass extension of CSP algorithm [3]. CSP features corresponding to Relax state were extracted from the interval [\(t_{ini}+2\), \(t_{ini}\)+1) and CSP features corresponding to Int A and Int B states were extracted from [\(t_{ini}+2\), \(t_{ini}\)+1) CSP filters were designed for the frequency window 7–30 Hz and the log-variance of the CSP-filtered signals were used as features. The application of this multiclass CSP resulted a feature vector of 60 (used as input for MLNN, SVM and MLP). The number of spatial filters and the number of features were selected in accordance to prior studies with CSP features [4, 5].

3 Classifiers

This section briefly describes the neural models used to classify the EGG signals.

3.1 Multilayer Perceptron Neural Network

Multilayer perceptron neural network (MLPs) are composed of a computation unit called perceptron, defined by Eq. 1. Their objective is to separate two classes through a hyperplane.

$$\begin{aligned} O(\varvec{x})=F(\sum _{i=1}^{n}x_{i}w_{i}+b) \end{aligned}$$
(1)

where \(x_{i}\) represents the ith element of the input \(\varvec{x}\) vector. \(\varvec{w}\) are the synaptic weights, b is the bias and F represents a non-linear activation function [6,7,8]. In our case, the tanh function. A MLP network usually consists of more than two intermediate layers, each layer of a variable Perceptron number, as shown in Fig. 2. These networks are trained by stochastic gradient descent.

Fig. 2.
figure 2

MLP classic architecture.

3.2 Support Vector Machine (SVM)

A SVM is a discriminative classifier, whose objective is to look for a separation hyperplane between two classes, defined by Eq. 2. This maximizes the separation distance between two classes. SVM uses non-linear transformation functions, or kernels. The two most common kernel functions are: the linear \(\left( L_{k}\right) \), Eq. 3, and the radial basis \(\left( G_{k}\right) \), Eq. 4, like gaussians [9, 10].

$$\begin{aligned} D\left( x\right) =\sum _{k=1}^{p}\alpha _{k}K\left( \varvec{x}_{k},\varvec{x}\right) +b \end{aligned}$$
(2)

where \(\alpha _{k}\) are the parameters to be adjusted, \(\varvec{x}_{k}\) is the training pattern. The K function, is a predefined kernel and \(\varvec{x}\) is the support pattern.

$$\begin{aligned} L_{k}=\left( x\bullet w\right) \end{aligned}$$
(3)
$$\begin{aligned} G_{k}=e^{\frac{-||x-\mu _{j}||^{2}}{\sigma _{j}^{2}}} \end{aligned}$$
(4)

where x is the training pattern, \(\mu \) is the center of the Gaussian, \(\sigma \) the variance, and \(\bullet \) is the dot product.

3.3 Morphological-Linear Neural Network

The Morphological-Linear Neural Network (MLNN) is a new hybrid model, introduced in [11], which consists of two layers mainly, the first layer composed of morphological neurons, and the second layer composed of perceptron-like neurons. The first layer works as a feature extractor, and the second layer as a classifier. The architecture of this model is defined by the following equations:

$$\begin{aligned} h_{k}(\varvec{x})=min\left( min\left( \varvec{x}-\varvec{w}_{min},\varvec{w}_{max}-\varvec{x}\right) \right) , \end{aligned}$$
(5)
$$\begin{aligned} f(\varvec{x})=\sigma \left( h_{k}(\varvec{x})\right) , \end{aligned}$$
(6)

where \(h_{k}\) specifies the kth morphological neuron of the middle layer of the network, \(\varvec{w}_{min}\) and \(\varvec{w}_{max}\) specify the initial and final limit of the hyperbox, \(\varvec{x}\) specifies the training pattern, and the function \(f(\varvec{x})\) specifies an activation function. For our specific case, the tanh function. Figure 3 shown the architecture of this network.

Fig. 3.
figure 3

Architecture of the MLNN network for multiclass classification problem.

3.4 Classification Scenarios and Evaluation Procedure

In this section, we describe the evaluation methodology used for the brain signals classification. For the three models of neural network the same methodology was used, methodology proposed by [12], which establishes that to obtain a set of optimal classification hyperparameters, it is necessary to generate a random valued search grid. MLNN network has two configuration hyperparameters, the first is the learning rate (LR), and the second is the number of morphological neurons in the intermediate layer. The grid that was used for the number of morphological neurons consists of 50 values with a uniform distribution on a logarithmic scale in a range of \(\left[ 1,500\right] \) and 50 values in a range of \(\left[ 0.0001, 0.1\right] \) for the learning rate using the same distribution. This gives us a search grid of 2, 500 combinations. For the SVM a similar grid was generated with 2, 500 combinations, 50 values of each hyperparameter \(\mu \) and \(\sigma \) of the radial base kernel. And finally for the MLP search grid, which consists of three configuration hyperparameters, the learning rate was defined in a range of \(\left[ 0.001,0.1 \right] \), the number of intermediate layers in a range of \(\left[ 1,3 \right] \) and the number of perceptrons per layer in a range of \(\left[ 1,250 \right] \) generating a search grid of 3000 combinations.

Classification performance was assessed independently for each subject through a 10-fold cross-validation procedure. For each fold, the performance metric was classification accuracy which was computed as:

$$\begin{aligned} accuracy = \frac{TP+TN}{TP+TN+FP+FN} \end{aligned}$$
(7)

where TP is the true positive rate, TN is the true negative rate, FP is the false positive rate and FN is the false negative rate. Therefore, average and distributions of classification accuracy were obtained for each subject.

4 Results

In this section, we present the results for EEG signal classification with three different types of classifiers the MLNNs, SVMs and MLPs. The results in Table 1 show that, on average, the classification of this type of signals is feasible with MLNN and SVM-RBF models; since the two models obtain similar classification percentages, on average \(80\%\) of classification on ten-fold validation sets.

The main difference between these two models is the number of learning parameters, while the SVM uses 4234 learning parameters distributed in 146 support vectors (each vector with 29 dimensions), the MLNN model uses 1223 learning parameters distributed among 20 morphological neurons in the intermediate layer and 3 perceptrons with their respective bias in the output layer.

Based on the experimental results from Table 1 we conclude that the MLNN classifier is the best option for this type of classification problem.

Table 1. Classification results for EGG signals using MLNNs.

Table 1 shows the average classification rates \(A_{va}\) of the 10 folds for each subject, the column \(P_{n}\) shows the number of parameters used in each model. The last row the parameter average used for classification is shown, as well as the classification average for the seven subjects.

5 Conclusion

In this work, the performance of three classification algorithms was evaluated in a three-class classification scenario using of EEG movement intention signals. Real EEG signals recorded during robot-assisted rehabilitation therapy over seven healthy participants. Common spatial patterns were calculated for the three classes: Relax, Int A, Int B and the log-variances of the CSP-filtered signals were used as attributes.

For classification and performance evaluation, a three-class classification scenario was followed to asses the classification accuracy with the proposed models. The results showed that the accuracy average of the MLNN technique is superior than the other techniques implemented. The better results can be observed for subject 3 (\(84.6\%\)), 7 (\(83.7\%\)) and 8 (\(80.0\%\)); While using a lesser number of training parameters, \(340\%\) less parameters than the SVM.

This work shows that the MLNN technique allows to obtain a confident classification accuracy in three different movement states for upper limbs. This is important since the accurate recognition for motor planning can be used in BCI area to control neurorehabilitation devices. So, the detection of the intention to execute a movement of a limb and the recognition of the type of movement is essential to enhance the performance of robot-assisted rehabilitation.

These results cannot be compared against the related state of the art due to there are several differences with others works [4, 13, 14], as experimental setup (execution of different movements), different state of participants (with some motor injury) and different attributes to classify (frequency domain features). Finally, we consider this work can be a starting point in two ways; (i) to evaluate diverse MLNN architectures that allow to improve the three class MI classification (ii) to explore the classification of motor planning using the MLNN models in others classification contexts, such as on-line classification scenario.