Keywords

1 Introduction

Brain computer interface (BCI) is an alternative communication system that allows a user to interact with the environment through the conversion of brain signals into commands without the use of the neuromuscular system [1, 2]. A BCI system aims to offer people with disabilities the possibility of communication, controlling computers and other devices in an independent way, improving their quality of life, and reducing social cost [2, 3].

A crucial point within a BCI system is the way in which it extracts the electroencephalogram (EEG) signal features for better accuracy in signal recognition, since recognition accuracy affects system performance [4]. It is known that a set of variables leads to different levels of classification accuracy, such as positions of electrodes and number of channels [2]. Another well-known challenge is to extract discriminative characteristics of raw EEG signals, since this method presents a poor signal-to-noise ratio and a mixture of different sources of brain activities [5]. Other characteristics that have great relevance in the accuracy of signal identification are the selection of the frequency band and the time segment of the EEG data [5].

In a BCI system, motor imagery (MI) refers to the signals obtained while the user is imagining a motor action [3]. When a subject imagines a limb movement, specific frequencies change, allowing EEG signals to be used to control a BCI system [6]. The identification of MI is performed by classifying the activity of power attenuation of sensorimotor rhythms, known as event-related desynchronization (ERD), and an increase of power of sensorimotor rhythms, known as event-related synchronization (ERS) [7]. ERD/S events normally occur in the Mu and Beta frequency bands around 8–32 Hz [8]. In this way, these signals can be converted into computer commands.

As explained, the difficulties of creating a MI-based BCI system are directly related to the choice of characteristics that optimize the signal classification performed by a computer. So, in this context, this work aims at developing an MI classification procedure using a EEG signal acquisition device, called Emotiv EPOC+. The proposed procedure is based on the well-known MI common spatial pattern (CSP) software package, part of the OpenVibe signal processing and classification toolkit [9]. During the process of creating the procedure, initial experiments were made in order to choose the kernel of the classifier that would be used. Then, considering the chosen classifier, the analyses were extended to select the best frequency band, filter parameters, and classifier parameters. Considering the mean accuracy of related works, we assumed a value of recognition accuracy equal or greater than 80% to be satisfactory.

The remainder of the paper is organized as follows. Section 2 presents the related works. Section 3 describes the materials and methods used in this work. A summary of the results is presented and discussed in Sect. 4. Finally, Sect. 5 summarizes our conclusions and addresses future works.

2 Related Works

This section addresses only works that performed the classification of imagined movements and also used the Emotiv EPOC+ device.

In [3], a classification of four MI (forward, backward, left, and right) was performed. The authors used wavelet daubechies and symlets for feature extraction, and multilayer perceptron, simple logistic, and bagging for classification. The signals were acquired from five healthy men aged between 26–35 years. The subjects imagined 40 s for each of the classes to be classified. The best accuracy was obtained with wavelet daubechies and simple logistic, with a mean total accuracy of 80.4% using a 10 fold cross-validation.

The identification of three mental states of MI was performed in the work presented in [10]. The considered states were: rest, up, and down, with a capture time of 60, 10, and 10 s, respectively. The EEG signals were captured from only eight channels, the characteristic extraction was based on the power spectrum, and the classifier used was an artificial neural network with a backpropagation learning algorithm. The algorithm presented an accuracy of 72% in online tests performed with three subjects, with a training time of 15 min for each of them.

In [11], the authors present a time-series discrimination methodology called motor imagery discrimination by relevance analysis (MIDRA) to support BCI systems. The classifier used was a K-Nearest Neighbor, with 10 folds in cross-validation. The signal captured during the MI lasted four seconds, and each subject performed 160 trials: 80 MI related to the right hand and 80 MI related to the left hand. The classification accuracy values for the two subjects considered were 92.5% and 90%.

It is noteworthy that none of the related studies performed a complete analysis of the variables that make up the entire EEG signal classification process. In this context, this work intends to investigate how far a complete evaluation of the characteristics from acquisition until classification could improve the accuracy of a BCI system based on imagined movements.

3 Materials and Methods

3.1 Experimental Protocol

A dataset was created in order to investigate the classification accuracy of different MI tasks. This dataset has MI data from five male subjects, right-handed, aged between 20–25 years, and with no prior BCI experience. In total, each subject has performed 24 MI trials, 12 to the right arm and 12 to the left arm, given a total of 120 trials. During the MI period, the subject was asked to imagine the constant movement of the arm, according to the stimulus presented previously, right or left, until the end of the experiment, which was indicated on the screen.

Regarding the capture session protocol, each volunteer was placed comfortably in a chair in front of a computer display where the simulation experiment occurred. The subject was asked to be relaxed with his hands on his knees and physical movement was not allowed during the MI sessions. The performance of the subject and the screen were completely recorded during the experiment, for later evaluation in case of inconsistency or incoherence of the data. The time between trials was randomly chosen (between 1.5–3.5 s), as well as the stimuli order (right or left), therefore, the subject could not predict when the stimulation starts, avoiding the creation of a synchronized pattern, making it difficult the classification. The goal was performing self-paced sessions. Figure 1 shows the characteristics of a trial.

Fig. 1.
figure 1

Scheme of the MI capture session protocol. Notice that only three seconds of each trial were used in the classification process.

The experimental scenario was built by using the OpenVibe software [5]. It is a platform that allows the acquisition, filtering, processing, and classification of brain signals and fast prototyping of BCI systems. For the sake of experimentation, we explored three OpenVibe scenarios in this work: (1) Acquisition scenario: the EEG data was acquired and stored in a file; (2) CSP training scenario: the common spatial filter (CSP) was trained; and (3) Training and classification scenario: the classifier was trained and tested.

3.2 Data Acquisition

The EEG data was acquired by using an Emotiv EPOC+ neuroheadset with 14 electrodes placed according to the international 10–20 locations [12] and sampled at 128 Hz. EEG signals were filtered using a zero-phase bandpass Butterworth 4th order filter with cutoff frequencies in the range of 5–30 Hz. After the acquisition, as MI is related to motor actions, we used only channels located in the frontal lobe {F3, F4} and fronto-central lobe {FC5, FC6} that capture activities from premotor and motor cortex [13].

3.3 Methods

Figure 2 shows the adopted classification methodology. The band power is a function that returns the power average for a given input signal. First, the signal is squared becoming smoothed [14], and after the band power, the Eq. 1 is applied to the power average, as it assists in the improvement of the classification performance.

Fig. 2.
figure 2

Adopted classification methodology (signal = x).

$$ { \ln }\left( {{\text{x}} + 1} \right) $$
(1)

For classification, we used the support vector machine (SVM) approach, since it is fast and has shown good results in EEG analysis [4, 15,16,17]. Moreover, SVM has been shown to be a good binary classification algorithm with an excellent generalization capability [18]. After that, a study on the accuracy of the SVM with different kernels was performed in order to choose the one with the best result. The next evaluation was performed to investigate which frequency bands improve classification accuracy. Finally, the number of output channels of the CSP filter was determined, the SVM parameters were analysed and defined, and the classification results were obtained.

4 Results and Discussions

In order to select the type (Nu-SVM or C-SVM) and the kernel of the SVM, the 24 MI trials dataset was used to run on different kernels, as shown in Fig. 3, and the mean accuracy was calculated. As can be seen, Nu-SVM with radial basis function (RBF) kernel was selected because of the best classification result. The cross-validation considered 5 folds, and this number of folds was maintained as standard for the next analyses.

Fig. 3.
figure 3

Mean accuracy (%) for C-SVM, Nu-SVM, and different kernels.

4.1 Evaluating the Importance of Frequency Bands in Classification Accuracy

According to [19], the effectiveness of a BCI system depends on the choice of the frequency band. Then, in order to select the appropriate frequency band, an analysis was performed considering the frequency spectrum Mu (8–12 Hz) and Beta (12–30 Hz) which refer to frequencies related to MI [11]. The frequency band values were varied using a bandpass Butterworth filter and the mean accuracy was obtained.

As shown in Fig. 4, the final value of the frequency range was decreased, with the 8–10 Hz frequency band achieving the best result. Then, the lower frequency limit was changed, as shown in Fig. 5. The value of the frequency band of 9–10 Hz was the one that obtained the best classification accuracy. This is consistent with MI studies previously reported [2], where the highest accuracy was obtained for the 8–15 Hz frequency band. In this work, we decided to keep the range 9–10 Hz as the standard for the next evaluations.

Fig. 4.
figure 4

Mean accuracy (%) decreasing the final value of the frequency range (8–30/8–10 Hz).

Fig. 5.
figure 5

Mean accuracy (%) increasing the initial value of the frequency range (5–10/9–10 Hz).

4.2 Evaluating the Best Number of CSP Filter Output Channels

The CSP filter extracts characteristics of the signals that maximize the difference between mental states [14]. The filter can generate two or more output channels by combining the input signals. The analysis was performed considering the mean accuracy and using CSP filters with 2 until 14 output channels, as can be seen in Fig. 6. The best value was obtained with six channels, so this number was maintained for the next experiments.

Fig. 6.
figure 6

Mean accuracy (%) for different numbers of output channels in the CSP filter.

4.3 Evaluating How the Classifier Parameters Improves Classification Accuracy

The last analyses were performed on the Nu and gamma parameters which can improve the accuracy of Nu-SVM with RBF kernel [20]. The value of the Nu parameter varies from 0 to 1 [21], and consequently the tests were concentrated in this range. The experimental results using the 24 MI trials dataset are shown in Fig. 7. It was observed that the best mean accuracy value was obtained with Nu equal to 0.5. Next, in order to verify the range near to this value, the analysis was extended, as can be seen in Table 1.

Fig. 7.
figure 7

Mean accuracy (%) for different values of Nu.

Table 1. Mean accuracy (%) and standard deviation to all subjects for values of Nu near to 0.5.

To evaluate the gamma values, we maintained the three values of Nu that presented the best accuracy: 0.35, 0.4, and 0.45. Then, a grid-search was performed and various pairs of (Nu, gamma) values were tested, as shown in Fig. 8. In the end, the (0.35, 70) pair was chosen, once it presented the best mean accuracy.

Fig. 8.
figure 8

Mean accuracy (%) for gamma and Nu values.

Finally, the proposed procedure and the OpenVibe MI standard classification scenario were executed for each subject separately. Some characteristics of the OpenVibe MI Standard include a bandpass Butterworth filter with 8–30 Hz frequency band; six output channels in the CSP filter; and the Linear Discriminant Analysis algorithm as the classification approach. The results per subject in the 24 MI trials dataset with a 5-fold cross validation are presented in Fig. 9. The proposed procedure and the OpenVibe framework achieved 93,91% and 64,95% of mean accuracy, respectively.

Fig. 9.
figure 9

Mean accuracy (%) results obtained using the proposed procedure and the OpenVibe standard scenario for MI classification.

5 Conclusions and Future Works

This work proposed a discrimination procedure of two EEG signal classes produced by imagined movements through the OpenVibe software. A MI database was built and several characteristics were considered in order to create the proposed procedure. These aspects were carefully analysed, ranging from the signals acquisition to the SVM classifier parameters configuration. The procedure obtained an increase of 28,96% in the mean accuracy, regarding to the OpenVibe MI standard scenario, showing that to improve a BCI system performance these characteristics need to be considered, since they are directly related to the classification results. In the future, we intend to create BCI systems that run automatically the procedure as well as to apply the procedure to other databases. In addition, a framework of the proposed procedure will be created in a way unrelated to OpenVibe and some applications will be implemented to test its online performance.