## Graphical Abstract

## * * Metrics

**Submitted**

**Accepted**

**Published**

# Analysis and Classification of Motor Imagery Using Deep Neural Network

### Corresponding Author(s) : Isah Salim Ahmad

*Journal of Applied Materials and Technology*,
Vol. 2 No. 2 (2021): March 2021

## License

Copyright (c) 2021 Isah Salim Ahmad, Shuai Zhang, Sani Saminu, Isselmou Abd El Kader, Jamil maaruf musa; Imran Javid, Souha Kamhi, Ummay Kulsum

This work is licensed under a Creative Commons Attribution 4.0 International License.

## Abstract

Motor imagery based on brain-computer interface (BCI) has attracted important research attention despite its difficulty. It plays a vital role in human cognition and helps in making the decision. Many researchers use electroencephalogram (EEG) signals to study brain activity with left and right-hand movement. Deep learning (DL) has been employed for motor imagery (MI). In this article, a deep neural network (DNN) is proposed for classification of left and right movement of EEG signal using Common Spatial Pattern (CSP) as feature extraction with standard gradient descent (GD) with momentum and adaptive learning rate LR. (GDMLR), the performance is compared using a confusion matrix, the average classification accuracy is 87%, which is improved as compared with state-of-the-art methods that used different datasets.

### Most read articles by the same author(s)

- Sani Saminu, Guizhi Xu, Zhang Shuai, Abd El Kader Isselmou, Adamu Halilu Jabire, Ibrahim Abdullahi Karaye, Isah Salim Ahmad, Abubakar Abdulkarim, Electroencephalogram (EEG) Based Imagined Speech Decoding and Recognition , Journal of Applied Materials and Technology: Vol. 2 No. 2 (2021): March 2021

## Keywords

## Full Article

## Introduction

Brain-computer interface (BCI) is a collection or system which translates brain activities, patterns of a user via commands or messages for interactive uses, BCI it’s also hardware and software communicative devices via brain and output devices [1]. Its records as well as analyze the brain activities by invasive or non-invasive modalities. Invasive modality involved electrocorticography (ECoG) and acquisition of electrical signals of single neurons. Non-invasive modality include recording electroencephalography(EEG) and magnetoencephalography (MEG)[1,2]. EEG is widely being used in BCI because of safety used, gives better spatial as well as temporal resolution, wider bandwidth, better signal to –noise ratio (SNR), and higher amplitude as well as lower artifact [3]. BCI gives a clear communication channel between the brain and external devices beyond the brain’s normal output channels of peripheral nerves and muscles [4]. For the purposed of having the best communication channel between the human brain and devices, Motor imaginary (MI)-based brain-computer interfaces (BCIs) have called the attention of researchers because systems can function using time-unlocked electroencephalogram (EEG) data [5]. All BCI systems deal with evoked potentials and motor imagery, the effect of external surrounding and hardware weakened the signal-to-noise ratio (SNR) of EEG signal, individual differences also caused low control accuracy as well as poor real-time transmission rate [6]. BCI-based EEG is a challenging task in the scientific and engineering field today because it interprets mental imagery command [7].

### Motor Imaginary abd its Wide Range of Applications

Motor imaginary (MI) deals with the movement of many parts of the body obtained from sensory-motor cortex activation. using BCI and some algorithms lead to the classification of EEG signal characteristics behaviors or pattern as well as design feedback to enable real-time or single-trial basis, a lot of technique had been employed such as; artificial neural network, Bayesian learning, support vector machine, feed-forward back-propagation neural network (FFBPNN), linear discriminant analysis fuzzy -art neural network has been used for classification motor imagery [3].

A person with a mental disability required alternative assistive devices or ways to do motor tasks interlude with the surroundings. BCI had extended antiquity centered based on motor control applications such a helping people with disabilities [3-8] paralyzed body parts [10,9], cursor robotic arms, wheelchairs prosthesis limbs, etc. a lot of application was for the need of disabling community. The hemisphere of the human brain was segmented into four lobes with various functions these lobes were separated by the sulcus. The primary semantic sensory cortex (parietal lobe) and primary motor cortex (temporal lobe) are the very important region in BCI studies. To the present, motor imagery has been helped greatly in the field of medicine to help people by connecting their minds to control devices as well as detecting their brain abnormalities [7]. The main goal of this research is to identify and classify the activities of MI, such as; imaging the movement of the left and right hand, foot, and tongue movement of BCI. Using deep neural network (DNN) and using co-space model (CSP) as extraction feature [7].

## Related Worked

Many studies have been conducted to improve the classification of Motor imaginary (MI) data. The efficiency of these systems almost depends on the features selected and the algorithms used for classification purposes. A method for motor imaginary (MI) was proposed for the classification of multichannel electrocorticogram (ECoG), Taking from patients with medically intractable focal epilepsy. Two features extraction method used, which is autoregressive (AR) model coefficients and local binary pattern (LBP) operators. It gives spatial resolution and angular space knowledge along with the gradient boosting (GB) together with ordinary least squares (OLS) algorithm was used as a classifier for improving the efficiency Motor imaginary (MI) classification for ECoG based Brain-Computer Interface (BCI) system. The Results of the Experimental on the BCI Competition III data set I showed that the novel method had very good performance and gave a cross-validation accuracy of 88.8% and accuracy of 93%, respectively [1]. Proposed the alliance of continuous Wavelet Transform (CWT) together with deep-learning-based transfer learning to solve the problem, he achieved an accuracy of 97.06% [11]. A feed-forward back-propagation neural network (FFBPNN) was proposed based on the motor in order to improve the performance motor imagery classification plan. And the accuracy was 99.8% [12] propound better method for EEG Classification from the feature extraction and classification, he analyzed and compared the effectiveness of the following algorithms; CSP-LDA, SCSP-LDA, CSP-RDA, and SCSP-RDA, The detailed study showed that the classification performance of SCSP-RDA was better than CSP-LDA, SCSP-LDA, CSP-RDA in decipher EEG signal and classification algorithms is better than traditional algorithms, improved by 10.75% [13]. Presented EEG datasets for MI BCI from 52 subjects as well as the result of the psychological and physiological questionnaire, EMG datasets, the position of 3d electrodes, and EEGs for non -task-related states. The data was analyzed based on the percentage of bad trials, even- related desynchronization/ synchronization (ERD/ERS) analysis.73.08% datasets gave reasonable approval information [14]. Joined fNIR and EEG signals for classification 8-class problems, by CNN -an artificial intelligence tool. The classification accuracy on voluntary and imagery-related tasks using the bimodal approach for CNN-based BCI gave an excellent result [15]. A deep learning method upon on Restricted Boltzmann Machine (RBM) was proposed, particularly, Frequency domain representation of EEG signals was obtained through fast Fourier transform (FFT) and wavelet package decomposition (WPD) were got and trained three RBMs. And stacked up the RBMs together with the remaining layer to form a frequent deep belief network (FDBN). Conjugate gradient and backpropagation methods were used to fine-tune the FDBN. Public datasets were used and FDBN improved the performance over other states of -the art method [8]. Using and validating the percentage of bad trials, even related desynchronization/synchronization (ERD/ERS), The EEG datasets for the MI BCI dataset of 52 subjects as well as result of psychological and physiological questionnaire was used, it showed 73.08% of the data was statistically used for analysis. Feature extraction method via time-series prediction based on the ANFIS for the BCI application was proposed, the result showed the potential use of the ANFIS time-series suggestion with MVFFV features in Motor imaginary (MI) classification. The ANFIS times series prediction together with MFFV features got better results in the BCI field [16]. He proposed and refined the time-frequency-spatial approach and applied it to a one-dimensional “cursor control” BCI experiment with online feedback. Via ofﬂine analysis of the available data, then evaluated, the efficiency of the present reﬁned way was compared with the original time-frequency-spatial methods. The improved performance in forms of classiﬁcation accuracy was found for the proposed approach, with a mean accuracy rate of 91.1% for two subjects studied [17]. The activity of EEG rhythms (mu rhythms) was studied, in connection to imaging of foot, tongue, right, and left-hand movement with 60 EEG electrodes in nine able-bodied subjects. The hand mu rhythms desynchronized all the subjects. While progressive hand region mu rhythm was studied during tongue or foot motor imagery in all the subjects. The reactive component frequency was 11.7Hz±0.4, while broad-banded the design chromized components at Centre 10.9Hz±0.9, the narrowband and higher frequency were observed on desynchronized components. The classification between the four-motor imagery based on EEG trial was improved [14]. CEMD and IDMSCNN method was proposed for improved the performance of motor imagery (MI) EEG signals classification. The best EMD algorithm is optimized properly and added two conditions to select effective IMFs. The multi-scale convolutional neural network was used as a feature extractor, the result shows that the algorithms can extract the best effective feature or information [18]. A method was proposed and developed for classifying new motor imagery using the Temporal Convolutional Network (TCN). The wider causal convolution within TCN was included, the temporal information in a parallel way with much higher computational efficiency than the traditional RNNs. Time stacked spatial EEG signal had been employed as the input to the TCN. Based on this, both the spatial distribution information and temporal variation of the brain signal were considered. The TCN method had a solution that obtained state-of-the-art performance on the multi-subject and multi-task motor imagery classification. The classification accuracy was 97.89% on 20 subjects and 5 tasks had been obtained [19]. The convolutional neural networks (CNN) were proposed to classify the motor imaginary MI-EEG signals. Three algorithms were used, data augmentation along with an exclusive transfer learning strategy were used to solve the problem of few trials in motor imagery tasks. The analytical regression measured was applied to the raw data for mitigating the stress of EOG on EEG. Then, the simulation results vividly showed the contribution of the proposed algorithm via testing on BCI competition IV dataset 2b. Applying EOG noise removal and data augmentation methods result in a 0.07 improvement in the kappa coefficient. in addition, this proposed transfer learning method led to a 0.06 improvement in form of the kappa coefficient [20]. The analysis and discriminated the EEG patterns of several force stages for motor imaginary (MI) using MRCPs. During the experiment, nine healthy subjects were used to carried-out the experiment, the hand force motor imagery tasks (30% MVC and 10% MVC). Based on MRCPs, the best good difference between the two levels of mental tasks was the manifestation of motor planning. The mean classification accuracy for features including both MRCP and CSP was 78.3%, which was 8.5% higher than the CSP-based features (p<0.001) and 2% higher than the MRCP-based features. The feasibility of using MRCPs for hand force motor imagery classification was achieved [21]. A consumer-grade brain-computer interface device was proposed which has four channels left with right-hand movement to design an interface to collect a total of closely 600 samples for left- and right-hand motor imagery (MI) from two subjects. Hilbert-Huang Transform was used as feature extraction, then support-vector machine (SVM) and k-nearest neighbors (k-NN) algorithms for learning the features and classiﬁcation were used. This approach has few abilities to classify left- and right-hand motor imagery EEG signals [22]. A new source separation method was proposed, which used the correct model of the head to un-mix the EEG signals via a different source in terms of their physical locations. It recognized sources located in distinct physical regions of the brain. It’s compared with independent component analysis (ICA), the new source separation method had the best spatial specificity as well as allowing higher classification accuracy of 8.6% [23]. A framework for overcoming EEG uncertainties in real-time multiclass MI BCI was proposed, the multiclass extension of the common spatial pattern (CSP) was used for artifact rejection and joint approximate diagonalization (JAD) was used as feature extraction .an adaptive resonance theory (ART) based neuro-fuzzy classifier named self-regulated supervised Gaussian fuzzy adaptive system art (SRSG-Fas Art) was used for multi-class applications. It showed better multiclass classification accuracy as related to state of art method [24]. the workability of Spiking Neural Network (SNN) models in pattern recognition was tested for classification EEG signal with five tasks i.e. rest, left hand, right hand, foot, and tongue movements in motor imaginary MI, the performance of other traditional classifiers as well as the performance of input features with constant values and input feature were compared power spectral density and wavelet decomposition was used as feature extraction stage, the result showed that with a smaller number of Spiking neurons, simple problems can be solved [25].** **Using complementary information to ERD/ERS-based features. It was proposed aiming to improve the performance of motor imaginary-based EEG classiﬁcation with the few-channel condition, and together support vector learning (ESVL) based approach was used to connect the advantages of the ERD/ERS-based features and the event-related potential-based features in motor imaginary-based EEG classiﬁcation. ESVL classiﬁer could be used posterior probabilities to get ensemble learning and the ESVL-based motor imagery classiﬁcation approach had the advantage of the merits of ERD/ERS based feature and event-related potential based feature to improve the experimental performance [26]. SCP was proposed with Deep ELM as a classifier with Good efficiency [27].** **Motion –onset VEP DBN using** **EEG time points as classifier with 3.5 improvement [28].** **SSVEP and CNN were proposed using** **Band power as classifier w99.28% & 94.03% improvement [29].** **P300,** **CNN with EEG time as a classifier with an accuracy of 95.5%[30]. Band power using DBN with Significant improvement[8]. EEG based on CNN was proposed MDA is 82.17%, FBCSP is 84.0% [31]. Band power based on DBN was used with improved accuracy [32]. Band power based on CNN+DBN was proposed with improved of 9% [33].** **Workload with Band power and Adaptive DBN was proposed [34]. Motor imagery based on band power using DBN as a classifier with 5.26% improvement [35]. ErrP,P300,MRCP.Motor imagery based on** **EGE time point using CNN as a classifier with 2% improved [36]. Motor imagery based on EEG Raw data 9% improvement [37].** **Motor imagery** **based on EEG Raw using CNN-VAE as classifier with 3% improved [38].

### Deep Learning (DL)

Deep learning is machine learning that used the model to learn to carry out classification tasks from EEG signal, text, images, etc. neural network was used to implement deep learning. The term deep simply means the number of network layers, the higher the layers, the deeper the network. There are 2 to 3 layers with the traditional network and more than hundreds of layers with the deep network.

### Application of Deep Learning

EEG signal analysis, Face recognition, voice recognition, and classification, text interpretation, sound recognition, traffic sign recognition, lane classification, driver assistance, smartphone app, an ATM.

Deep learning has a degree of accuracy compared to other models due to the following properties: mass data can be access easily, a large amount of data can be accessed within a short period, and the model was built by experts [39].

DNN joint several nonlinear layers via simple mechanisms working in parallel and inspired by biological nervous systems. DNN has input, hidden, and output layers connected through neurons or nodes, the output layer was used as the input of the next layer [40].

In this papers we Used a deep neural network (DNN) and using co-space model (CSP) as a feature extractor, the summary research done using a deep neural network were given in the table below.

## Methodology

### Experimental Data

BCI data set was obtained at(http://gigadb.org/dataset/100295), for classification with 52 subject, both male and female of 20 to 25years, sat on a chair and relax with arm rests.by imaging the left and right hand movement, the experiment was approved by the institutional review board of gwangju of science and technology. The data was recorded using 64 Ag/AgCl active electrodes. 64 channel were used using based on 10-10 system, the channel are; AF7, AF3, AFZ, AF4, AF8, FP1, FPZ, FP2, F7, F5, F3, F1, FZ, F2, F4, F6, F8, FT7, FC5, F3, FC1, FCz, FC2, FC4, FC6, FT8, T7, C5, C3, C1, Cz, C2, C4, C6, C8, TP7, CP5, CP3, CP1, CPZ, CP2, CP4, CP6, TP8, P7, CP5, CP3, CP1, CPZ, CP2, CP4, CP6, P7, P5, P3, P1, PZ, P2, P4, P6, P8, PO7, PO3, POz, PO4, P08, P9, .O1, .Oz, .O2, .Iz with sample rate of 512hz. EEG Data was collected using BCI2000, at time interval of 3s to 9s, with 140 test trials, 120 training and 2 classess, at sample rate of 128Hz, the signal were filter between 0.5-30Hz, the time taken for each trial was 9s long. The anterior ‘+’, posterior ‘-‘of the bipolar EEG channel were measured with C3, CZ, and C4 [16].

### Flow Chart of Proposed BCI System

Deep learning neural network (DNN) based on pre-processing EEG signals using co-space model (CSP) as feature extractor, the steps involved are shown in Figure 1 below.

### Data Processing

The signal is filtered using a Bandpass filter and the signal frequency is divided into two bands, Beta and Mu band respectively. The deep neural network was used Common Spatial Pattern (CSP) as the feature extractor.

### Common Spatial Pattern (CSP)

Common Spatial Pattern (CSP) is used as a feature extraction algorithm, used for spatial filtering, usually done for two-class classification purposes. spatial distribution component of all classes can be extracted from multi-channel data, the idea of CSP algorithms is to diagonalize the matrix to get a set of optimal filters for projection, the difference between the variance of the two types of signals will be maximized, hence, high discrimination accuracy of the feature vector will be obtained [4].

The main basis of CSP Algorithms is spatial filter W, the parameter and equations are as fellow;

The category of the preprocessed EEG data is as follow;

The known classify (\( j E \)[16]) \( X_{i} \) sample covariance matrix can be calculated with following equation:

\begin{equation} P_{xi}=cov\left ( X_{i} \right ) \tag{1} \end{equation}

Then, normalized covariance of the class can calculate as a fellow, using the following equation,

\begin{equation} P_{j}=\frac{1}{n}\sum_{i=1}^{nj}P_{X_{i}} \tag{2} \end{equation}

For \( j \)= 1 or 2, and is the number of trials in each class.

The eigenvalue decomposition will be performed using the following equation;

\begin{equation} \left (P_{1}+P_{2} \right )^{-1}P_{1}=W\wedge W^{T} \tag{3} \end{equation}

\( W \) filter the EEG signal using the relation as fellow;

\( Z_{N*T}=W_{N*N}\times E_{N*T} \), \( N \) is the number of a channel of the EEG signals, \( T \) denoted the number of the sample point in one test. From the filter matrix \( Z_{N*T} \) the feature \( f_{p} \) vector as well illustrated in equation 4, the channel number \( N \) of the EEG signal will be equal to or less than the feature dimension.

\begin{equation} f_{p}=\log \left ( \frac{var\left ( Z^{_{p}} \right )}{\sum_{i=1}^{2m}var\left ( Z_{i} \right )} \right ) \tag{4} \end{equation} (4)

Consequently, by composing the matrix \( Z_{p} \) of the rows and last m rows extracted from \( Z\left ( 2M< N \right ) \).

The Generalized Rayleigh quotient based sparse CSP are as fellow;

\begin{equation} J\left ( W \right )=\frac{W^{T}X_{1}X_{1}^{T}W}{W^{T}X_{2}X_{2}^{T}W}=\frac{W^{T}PX_{1}W}{W^{T}PX_{2}W} \tag{5} \end{equation}(5)

where \( T \) is the transpose matrix.

Hence: \( W,X_{1},X_{2}\left ( \frac{X_{i}}{2} \right )=1,2 \) and \( \left ( P_{X1},\frac{P_{X2}}{2}=1,2 \right ) \)

The constant value \( K \) was multiplied to numerator and denominator, and the equation 5 does not change that is \( J (W) \),

\begin{equation} J\left ( kW \right )=J\left ( W \right ) \tag{6} \end{equation} (6)

Letting the value \( W^{T}P_{X2}W=1 \), the extreme value of \( W^{T}P_{X2}W \), \( W \) as simplified and transform as;

\begin{equation} L\left ( \lambda ,W \right )=W^{T}P_{X2}W-\lambda\left (W^{T}P_{X2}-1 \right ) \tag{7} \end{equation}

By taking the partial derivatives (7) of Lagrangian concerning W, it equal to zero, then \( P{X_{2}}^{-1}P_{X1}W\lambda W \).

Based on the above formula, CSP algorithms will be converted into eigenvalue for solving complex EEG signals.

With generalized eigenvalues, Gradient Descent with momentum and adaptive LR was used to compare future extraction results, repeated 5000 times.

### Gradient Descent Method

Gradient descent is a first-order iterative optimization algorithm used for obtaining a local minimum of a differentiable function, it’s based on the observable multi-variable function \( F(x) \) within a point the function will decrease rapidly by from a** **to the direction of \( F \) at \( a \) , \( \Delta F(a) \).

\( a_{n+1}=a_{n}-\gamma \triangledown F\left ( a_{n} \right ) \)

Also \( \gamma \) is a smaller positive real number \( F\left ( a_{n} \right )\geqslant F\left ( a_{n+1} \right ) \). Consequently, \( F\left ( x_{0} \right )\geqslant F\left ( x_{1} \right ) \geqslant F\left ( x_{2} \right )F\left ( x_{4} \right ) \) and so on

\begin{equation} \gamma n=\frac{\left | (X_{n}-X_{n-1})^{T} \left [ \bigtriangledown FX_{n}-\bigtriangledown FX_{n} \right ]\right |}{\left \|(\bigtriangledown F(X_{N})-\bigtriangledown FX_{n-1})^{2} \right \|} \tag{8} \end{equation}

if the chosen is large to estimate, it will hang or swing around the optimal point, not following the actual result but if chosen small vast amount of iteration and change the approach of the optimum iteration, GDs have being used by researchers classification available data.

The classification performance of motor imaginary (MI) was improved with momentum and adaptive LR [41].

### Encoder dan Decoder

Encoder and decoder were used for converting EEG signal from one form to another for easy processing as well as sending and receiving the signal [42].

### Performance Evaluation

In this research, the performance accuracy classification was evaluated in percentage (%) for both testing and train data.

\begin{equation} Accuracy=\left (\frac{number \hspace{2mm} of \hspace{2mm} correct \hspace{2mm} trials}{total \hspace{2mm} number \hspace{2mm} of \hspace{2mm} trials} \right )\times 100\% \tag{9} \end{equation}

\begin{equation} Sensitivity=\frac{TP}{TP+TN}\times 100\% \tag{10} \end{equation}

\begin{equation} Specificity=\frac{TN}{TN+FN}\times 100\% \tag{11} \end{equation}

\begin{equation} Accuracy=\frac{TP+TN}{TP+FN+TN+FP} \tag{12} \end{equation}

where \( TP \) is true positive, \( TN \) is true negative, \( FN \) is false negatice and \( FP \) is false positive.

### Linear Regression

Linear regression is a technique that shows and investigates the relationship between two variables, it’s used to identify the relationship between our target and output result. And the accuracy, precision, and analysis of the impact of the model of the system are measured. It’s given by equations as

\( K=M+IX \)

where \( M \) and \( X \) are defined by equations as:

\begin{equation} M=\left ( Intercept \right )=\frac{\sum K \sum X^{2} - \sum X \sum Xk }{n\sum X^{2}- \sum X^{2}} \tag{13} \end{equation}

\begin{equation} I=\left ( Slope \right )=\frac{n\sum XK - (\sum X) (\sum K) }{n\sum X^{2}- (\sum X)^{2}} \tag{14} \end{equation}

\( R^{2}=\frac{Variation(Mean)-Variation(fit)}{Variation(Mean)} \)

hence, \( X \) and \( K \) are two variables, \( I \) is slope, \( M \) is vertical libe, \( X \) is first data A value used and \( K \) is second data set used.

## Analysis and Results

Three models were used in this research the minimum error of the training and testing was a target as =0.001-0.05, learning rate and maximum epoch are 0.01and 15000 respectively, gradient descent (GD) and gradient descent with momentum and LR (GD LR) functions, have similar design and parameter for processing.

The experimental result of the models have an accuracy of 82% with the GD training method as well as GDMLR, the performance depend on the number of iteration that occurs, as more details shown in Figure 3 and Figure 4.

### Training Performance

The training performance is obtained by Improving Data and Algorithm Tuning. The quality of the models is generally constrained by the quality of training data best performance is obtained at 0.042096 at epoch 19881 shown in Figure 5.

The main goal of using square error is to minimize the error which is defined by the Loss Function. The best training performance of 0.91193 at 23 epochs shown in Figure 7.

The classifier performance of both left and right-hand movements is shown in Figure 8.

The image showed the classification result of EEG signals, the change of the color showed the effect of parameter and the performance of the classifier.

## Discussion

The deep neural network was used for the classification EEG data left hand and right hand of Motor imaginary (MI), with the following range-band of frequency 8-30Hz, 8-14Hz, and 14-30Hz, mu rhythms are best for feature extraction frequency range of (8-14Hz) and improve the performance with the beta band (14-30Hz), lastly, using confusion matrix models for knowing the performance of classification, better classification can be achieved with mu band. The Specificity and sensitivity of the test confusion matrix were found to be 81.4% and 82.0 % respectively shown in figure 9 and 10, and for the train confusion matrix the specificity and sensitivity are also found to be 85.7% and 87.1%, misclassification rates were found to be 17.9% and 13.6%.

Our result showed that GDMALR training has a better performance and is used for classification MI than normal GD. Large data required the higher the network parameter to increase the speed of processing, large data affect the system efficiency. The number of iteration depends on by desired pattern recognition accuracy. Deep neural networks use the above information for the classification of Motor imaginary (MI). Positive regression is obtained as shown in fig.7. With intercept of o.1 and training rate of 0.91193 which show less variation, The classification curve and number of iteration, the number of iteration is much higher than the number of trials, for 20000 iterations, the time taken was 19s which is equal to 0.95s for each iteration, which showed that the method is fast, the best training performance is at 0.042066 at epoch 19861 shown in Fig. 5, the best performance is at 0.0015998 at epoch 23 which is the best controlling flow of data and avoiding overfitting and minimizing the loss. From the Fig. 6. The validation error was zero at 20000 iterations, this means the model used is working perfectly for classification Motor imaginary (MI).

## Conclusion

In this work, an approach to classify motor imagery (MI) EEG signals using a deep neural network (DNN) with CSP feature extraction with standard gradient descent (GD) method and gradient descent method with momentum and adaptive LR (GDMLR) has been proposed. the classification accuracy was found to be 87% which is an 11% improvement.

In future work, we plan to use more recent feature extraction and classification methods such as spiking neural network, joint time frequency-space classification and improve this technique to develop a model based on BCI classification tasks.** **

## References

- Xu Fangzhou, Zhou Weidong, Zhen Yilin, Yuan Qi. Classification of motor imagery tasks for electrocorticogram based brain-computer interface.
*Biomedical Engineering Letters.*2014; 4(2)DOI - Lotte F, Congedo M, Lécuyer A, Lamarche F, Arnaldi B. A review of classification algorithms for EEG-based brain–computer interfaces.
*Journal of Neural Engineering.*2007; 4(2)DOI - Lee Seung-Bo, Kim Hyun-Ji, Kim Hakseung, Jeong Ji-Hoon, Lee Seong-Whan, Kim Dong-Joo. Comparative analysis of features extracted from EEG spatial, spectral and temporal domains for binary and multiclass motor imagery classification.
*Information Sciences.*2019; 502DOI - Kato Masaki, Kanoga Suguru, Hoshino Takayuki, Fukami Tadanori. Motor Imagery Classification of Finger Motions Using Multiclass CSP.
*2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC).*2020. DOI - Llorella Fabio R., Patow Gustavo, Azorín José M.. Convolutional neural networks and genetic algorithm for visual imagery classification.
*Physical and Engineering Sciences in Medicine.*2020; 43(3)DOI - Dong Enzeng, Zhou Kairui, Tong Jigang, Du Shengzhi. A novel hybrid kernel function relevance vector machine for multi-task motor imagery EEG classification.
*Biomedical Signal Processing and Control.*2020; 60DOI - Qin Lei, He Bin. A wavelet-based time–frequency analysis approach for classification of motor imagery for brain–computer interface applications.
*Journal of Neural Engineering.*2005; 2(4)DOI - Lu Na, Li Tengfei, Ren Xiaodong, Miao Hongyu. A Deep Learning Scheme for Motor Imagery Classification based on Restricted Boltzmann Machines.
*IEEE Transactions on Neural Systems and Rehabilitation Engineering.*2017; 25(6)DOI - Hsu Wei-Yen. EEG-based motor imagery classification using neuro-fuzzy prediction and wavelet fractal features.
*Journal of Neuroscience Methods.*2010; 189(2)DOI - Lu Na, Li Tengfei, Pan Jinjin, Ren Xiaodong, Feng Zuren, Miao Hongyu. Structure constrained semi-nonnegative matrix factorization for EEG-based motor imagery classification.
*Computers in Biology and Medicine.*2015; 60DOI - Kant Piyush, Laskar Shahedul Haque, Hazarika Jupitara, Mahamune Rupesh. CWT Based Transfer Learning for Motor Imagery Classification for Brain computer Interfaces.
*Journal of Neuroscience Methods.*2020; 345DOI - Jana Gopal Chandra, Swetapadma Aleena, Pattnaik Prasant Kumar. Enhancing the performance of motor imagery classification to design a robust brain computer interface using feed forward back-propagation neural network.
*Ain Shams Engineering Journal.*2018; 9(4)DOI - Fu Rongrong, Han Mengmeng, Tian Yongsheng, Shi Peiming. Improvement motor imagery EEG classification based on sparse common spatial pattern and regularized discriminant analysis.
*Journal of Neuroscience Methods.*2020; 343DOI - Pfurtscheller G., Brunner C., Schlögl A., Lopes da Silva F.H.. Mu rhythm (de)synchronization and EEG single-trial classification of different motor imagery tasks.
*NeuroImage.*2006; 31(1)DOI - Rahman Md. Asadur, Uddin Mohammad Shorif, Ahmad Mohiuddin. Modeling and classification of voluntary and imagery movements for brain–computer interface from fNIR and EEG signals through convolutional neural network.
*Health Information Science and Systems.*2019; 7(1)DOI - Cho Hohyun, Ahn Minkyu, Ahn Sangtae, Kwon Moonyoung, Jun Sung Chan. EEG datasets for motor imagery brain–computer interface.
*GigaScience.*2017; 6(7)DOI - Yamawaki N., Wilke C., Liu Z., He B.. An Enhanced Time-Frequency-Spatial Approach for Motor Imagery Classification.
*IEEE Transactions on Neural Systems and Rehabilitation Engineering.*2006; 14(2)DOI - Tang Xianlun, Li Wei, Li Xingchen, Ma Weichang, Dang Xiaoyuan. Motor imagery EEG recognition based on conditional optimization empirical mode decomposition and multi-scale convolutional neural network.
*Expert Systems with Applications.*2020; 149DOI - Lu Na, Yin Tao, Jing Xue. A Temporal Convolution Network Solution for EEG Motor Imagery Classification.
*2019 IEEE 19th International Conference on Bioinformatics and Bioengineering (BIBE).*2019. DOI - Parvan Milad, Ghiasi Amir Rikhtehgar, Rezaii Tohid Yousefi, Farzamnia Ali. Transfer Learning based Motor Imagery Classification using Convolutional Neural Networks.
*2019 27th Iranian Conference on Electrical Engineering (ICEE).*2019. DOI - Wang Kun, Xu Minpeng, Zhang Shanshan, Ke Yufeng, Ming Dong. Analysis and Classification for EEG Patterns of Force Motor Imagery Using Movement Related Cortical Potentials.
*2018 40th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC).*2018. DOI - Wang Ganyu, Martin Miguel, Hung Patrick, MacDonald Shane. Towards Classifying Motor Imagery Using a Consumer-Grade Brain-Computer Interface.
*2019 IEEE International Conference on Cognitive Computing (ICCC).*2019. DOI - Daly Ian, Rybar Milan. Neural component analysis: source localisation for motor imagery classification.
*2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC).*2020. DOI - Jafarifarmand Aysa, Badamchizadeh Mohammad Ali. Real-time multiclass motor imagery brain-computer interface by modified common spatial patterns and adaptive neuro-fuzzy classifier.
*Biomedical Signal Processing and Control.*2020; 57DOI - Virgilio G. Carlos D., Sossa A. Juan H., Antelis Javier M., Falcón Luis E.. Spiking Neural Networks applied to the classification of motor tasks in EEG signals.
*Neural Networks.*2020; 122DOI - Luo Jing, Gao Xing, Zhu Xiaobei, Wang Bin, Lu Na, Wang Jie. Motor imagery EEG classification based on ensemble support vector learning.
*Computer Methods and Programs in Biomedicine.*2020; 193DOI - Ding Shifei, Zhang Nan, Xu Xinzheng, Guo Lili, Zhang Jian. Deep Extreme Learning Machine and Its Application in EEG Classification.
*Mathematical Problems in Engineering.*2015; 2015DOI - Ma Teng, Li Hui, Yang Hao, Lv Xulin, Li Peiyang, Liu Tiejun, Yao Dezhong, Xu Peng. The extraction of motion-onset VEP BCI features based on deep learning and compressed sensing.
*Journal of Neuroscience Methods.*2017; 275DOI - Kwak No-Sang, Müller Klaus-Robert, Lee Seong-Whan. A convolutional neural network for steady state visual evoked potential classification under ambulatory environment.
*PLOS ONE.*2017; 12(2)DOI - Cecotti H, Graser A. Convolutional Neural Networks for P300 Detection with Application to Brain-Computer Interfaces.
*IEEE Transactions on Pattern Analysis and Machine Intelligence.*2011; 33(3)DOI - Schirrmeister Robin Tibor, Springenberg Jost Tobias, Fiederer Lukas Dominique Josef, Glasstetter Martin, Eggensperger Katharina, Tangermann Michael, Hutter Frank, Burgard Wolfram, Ball Tonio. Deep learning with convolutional neural networks for EEG decoding and visualization.
*Human Brain Mapping.*2017; 38(11)DOI - Sturm Irene, Lapuschkin Sebastian, Samek Wojciech, Müller Klaus-Robert. Interpretable deep neural networks for single-trial EEG classification.
*Journal of Neuroscience Methods.*2016; 274DOI - Tabar Yousef Rezaei, Halici Ugur. A novel deep learning approach for classification of EEG motor imagery signals.
*Journal of Neural Engineering.*2016; 14(1)DOI - Yin Zhong, Zhang Jianhua. Cross-session classification of mental workload levels using EEG and an adaptive deep learning model.
*Biomedical Signal Processing and Control.*2017; 33DOI - Yin Zhong, Zhao Mengyuan, Wang Yongxiong, Yang Jingdong, Zhang Jianhua. Recognition of emotions using multimodal physiological signals and an ensemble deep learning model.
*Computer Methods and Programs in Biomedicine.*2017; 140DOI - Wu Dongrui, Xu Yifan, Lu Bao-Liang. Transfer Learning for EEG-Based Brain-Computer Interfaces: A Review of Progress Made Since 2016.
*IEEE Transactions on Cognitive and Developmental Systems.*2020. DOI - An Xiu, Kuang Deping, Guo Xiaojiao, Zhao Yilu, He Lianghua. A Deep Learning Method for Classification of EEG Data Based on Motor Imagery.
*Intelligent Computing in Bioinformatics.*2014. DOI - Dai Mengxi, Zheng Dezhi, Na Rui, Wang Shuai, Zhang Shuailei. EEG Classification of Motor Imagery Using a Novel Deep Learning Framework.
*Sensors.*2019; 19(3)DOI - Majidov Ikhtiyor, Whangbo Taegkeun. Efficient Classification of Motor Imagery Electroencephalography Signals Using Deep Learning Methods.
*Sensors.*2019; 19(7)DOI - Kim Phil. MATLAB Deep Learning-With Machine Learning, Neural Networks and Artificial Intelligence. Apress: Berkeley, CA; 2017. DOI
- Wanto Anjar, Andani Sundari Retno, Poningsih Poningsih, Dewi Rafiqa, Lubis Muhammad Ridwan, Saputra Widodo, Kirana Ika Okta. Analysis of Standard Gradient Descent with GD Momentum and Adaptive LR for SPR Prediction.
*INA-Rxiv.*2018. DOI - Dimolitsas Spiros, Lister Paul F. Waveform preserving encoders for the compression of EEG data.
*Signal Processing.*1986; 10(4)DOI

*How to Cite*

*Journal of Applied Materials and Technology*,

*2*(2), 85–93. https://doi.org/10.31258/Jamt.2.2.85-93

##### Download Citation

Endnote/Zotero/Mendeley (RIS)BibTeX