Keywords

1 Introduction

The brain’s natural intelligent computing ability to control all activities, such as human behavior, mind and motor movements, is driving the development of research in the field of signal processing and control. The main purpose is to emulate the capabilities of the human brain. One of them is the Brain-Computer Interface (BCI), which gives the ability for the human brain to interact with a computer device [1]. It enables the user to command a computer or other peripheral device by brain activities independent of sensory nerves and muscles [1, 2]. The Electroencephalogram (EEG), the human brain activity recording, is an interpretation of potential changes in the cerebral cortex due to the interaction of various interconnected neurons [3]. The EEG signals are divided based on the delta, theta, alpha, beta and gamma channel frequencies. The features extraction of random time-varying EEG signals and accurate signals classification is the main challenge in current BCI research [1]. The use of appropriate feature extraction can produce features that represent data classes. The BCI aims to interpret the EEG signal in digital form, which performs as a command for a computer [1].

The BCI system used can be considered as a helpful method to support patients with compromised motor functions, such as ‘locked-in’ and ‘completely-locked-in’ patients [4]. Motor imagery (MI) is the process of the subject imagining the movement of one or more of his bodies. Motor-Imagery Brain-Computer Interface (MI-BCI) allows users with disabilities in the body to interact with the environment [5]. MI-BCI offers communication between people suffering from neural disorders with various devices such as robotic prostheses and wheelchairs [5]. In this work, we utilize the Root Mean Square (RMS) value as a time-domain feature. The RMS value of the signal provides the same average power with constant signals at the same load [6]. The RMS feature has low complexity in EEG signal processing [7]. The RMS feature itself has been widely used in previous EEG signal classification studies [8,9,10], and the resulting classification accuracy is above 70%. The choice of classification method is also important in BCI. Artificial Neural Network (ANN) is inspired by the ability of the human brain by computing network patterns to make decisions [11]. ANN is proven to be robust in multiclass classification [5]. Research on EEG based MI classification was conducted in [12] but there are only two classes, namely left and right foot. Whereas in [13] using hands and feet MI with a classification accuracy of 57%. The level of accuracy in this research needs to be improved. Based on previous work, we worked with the ANN method in the EEG classification. We organized this paper into several sections, as follows: Sect. 1 showed the overview and the literature review about EEG classification in MI-BCI. Section 2 presented the method used in this work. Section 3 discussed the experimental results, and Sect. 4 presented the conclusion of this research.

2 Method

2.1 Data

The right and left hands, legs, and tongue movements have been widely used as a paradigm for BCI interactions. In this study, we used the EEG signal obtained from thirteen subjects divided into 75 BCI EEG recording sessions with the imagery right and left hands, and legs movement. The electrode placement is based on the 10/20 international system. EEG signal data acquisition using the EEG-1200 JE-921A EEG device from Nihon Kohden, Japan [13]. Participants imagine the body moves according to the instructions displayed on the screen. This recorded EEG signal is called the Motor Imagery (MI) EEG signal. In this research, we use only ten subjects labelled with HaLT (Hand Leg and Tongue). Data with this label contains four classes used in this research, which are left hand, right hand, left leg, and right leg movement. The dataset has a sampling frequency of 200 Hz with 22 electrodes including 3 ground electrodes. We removed the EEG signal from the ground electrode so that only 19 electrodes were used in this research. Figure 1 shows an example of an EEG signal at the electrodes Fp1, C3, and T3 from a subject. The signal has a length of 664,400 samples.

Fig. 1
figure 1

Example of The Raw EEG Signal

The dataset marked several codes to define the movements. The code markers used to mark signals in a dataset divided into classes. Table 1 shows the codes that are used in the dataset that divided into nine classes. This marker data is obtained based on the instructions that appear on the screen at the time of recording.

Table 1 Code Marker in The HaLT Dataset

2.2 System Design

EEG based motor imagery classification system in this research conducted into three main stages: filtering, feature extraction, and classification. Figure 2 shows the classification system in this research to describe each stage’s correlations. The preliminary stage was the filtering, which purposed to obtain EEG signals in the delta (1–4 Hz), theta (4–8 Hz), alpha (8–12 Hz), beta (12–30 Hz), and gamma (>30 Hz) channel. The type of filter used in this research was the Finite Impulse Response (FIR) filter, a non-recursive filter that has a finite number of impulse responses. The FIR is always stable, easy to realize, and provides a linear phase response. The FIR is always stable because it is implemented using an all-zero transfer function [14]. In this research, the FIR filter was designed using the windowing method that employed the Hamming window in Eq. (1).

Fig. 2
figure 2

The Classification System of Motor Imagery EEG Signal

$$W_{hamming} (n) = 0.54 - 0.46\left( {1 - cos\left( {\frac{2\pi n}{N - 1}} \right)} \right);\quad 0 \le n \le N - 1$$
(1)

The filtered EEG signals were used to feature extraction process in the second stage. This stage calculated the Root Mean Square (RMS) value of the signal for each channel using Eq. (2). The feature extracted in this step for each channel consisted of the four EEG-based motor imagery classes: left hand, right hand, left foot, and right foot. These features were used as input for the Artificial Neural Network (ANN) process.

$$X_{RMS} = \left( {\frac{1}{n}\mathop \sum \limits_{i = 1}^{n} x_{i}^{2} } \right)^{1/2}$$
(2)

This work employed a Multilayer Perceptron (MLP) with a backpropagation learning algorithm, one of the ANN method. The proposed methods used a simple ANN that consisted of a single input layer, hidden layer, output layer. ANN performed a cycle process that processed information to produce an optimum result for any datasets and backward algorithm to complete a network cycle. Backpropagation is an algorithm that returns the error value from the output layer to the hidden layer. Our ANN model consisted of 19 nodes in the input layer, 8 nodes in the hidden layer, and 4 nodes in the output layer. The training and testing process used 10-fold cross-validation. The system performance was analyzed by using the confusion matrix with the accuracy as the main parameter.

3 Result and Discussion

In the initial step, the proposed method filtered the EEG signal into five channels using an FIR filter. Figure 3 shows the filtered EEG signal from the Fp1 electrode signal. As we know, the delta waves have the lowest frequency, and gamma waves have the highest frequency, so it confirms in Fig. 3. Another process in pre-processing steps was giving a code marker. The filtered signal parsed based on the code maker. The classification system for motor imagery used signals with code markers 1, 2, 4 and 6 due to represent the motor imagery signals of the left hand, right hand, left foot, and right foot, respectively. The parsing signal for each subject amounted to 163 × 4 classes. So that the overall becomes 163 × 4 × 10 parsed signals. The filtered and parsed signal is then calculated its RMS value based on Eq. (2). This value is then used as an ANN input. In this research, no scenario was carried out on ANN because this research focused on the effect of channel use on the accuracy value. In addition, a classification process was carried out on each subject.

Fig. 3
figure 3

Example of Filtered Signal of Fp1 Electrode

Figure 4 shows the confusion matrix of the third subject using the beta channel. Based on the confusion matrix, the ratio between the correctly classified with the total data for each marker shows the accuracy value. For example, the use of beta channels in subject 3. The system recognized 97 signals as the correct right-hand movement, 163 signals as the correct left-hand movement, 148 signals as the correct right-leg movement, and 93 signals as the correct left-leg movement. The accuracy calculated by the correct signals was 14.8% for the right hand, 24.8% for the left hand, 22.5% for the right leg, and 14.2% for the left leg. The system accuracy summarized the accuracy of each marker.

Fig. 4
figure 4

Confusion Matrix of Subject 3 Beta Channel

Table 2 shows the accuracy of the ten subjects used in this work. Based on the accuracy result in Table 2, we conclude that the beta or theta channel should be used for EEG based classification due to average accuracy for these channels superior to other channels. Several subjects show exception results like the alpha channel in subject two, seven, and ten that brings the best accuracy result for each subject. Furthermore, the gamma channel should not be used for EEG based motor-imagery classification. As a comparison, the results obtained from this study were higher than [13]. The accuracy obtained in [13] is 57% for the HaLT dataset. Meanwhile, research [12] only used 2 classes of MI, namely left and right foot. The accuracy obtained is 86.26% using linear SVM.

Table 2 Accuracy on Each Subject

4 Conclusion

This research discusses the classification of the four-class EEG based imagery motor. The system extracted the time-domain feature from ten subject EEG signals, which were extracted in the form of the RMS value. The channel variation employed to determine the accuracy system for each channel. ANN is used to map these features into four imagery motor classes. The highest average accuracy is 61.2% for the beta channel. Further research plans are focused on the variation of hidden layer nodes and changes in classification methods. Based on the research results, it is recommended to use the beta channel in the classification of the imagery motor EEG signal, due to the highest average accuracy.