Hand and Leg Movement Prediction using EEG Signal by Stacked DeepAuto Encoder

: Brain Computer Interface (BCI) is device that enables the use of the brain’s neural activity to communicate with others or to control machines, artificial limbs, or robots without direct physical movements. Brain–computer interfacing is an uprising field of research wherever signals extracted from the human brain are used for deciding and generation of control signals. Selection of the most appropriate classifier to find the mental states from electroencephalography (EEG) signal is an open research area due to the signal’s non-stationary and ergodic nature. In this research work the proposed algorithm is designed to solve an important application in BCI where left hand forward–backward movements and right hand forward-backward movements as well as left leg movement and right leg movement are needed to be classified. Features are extracted from these datasets to classify the type of movements. A staked Deepauto encoder is used for classification of hand and leg movements and compared with other classifiers. The accuracy of stacked deepauto encoder is better with respect to other classifiers in terms of classification of hand and leg movement of EEG signals.


I. INTRODUCTION
A BCI (Brain-Computer Disability Interface) technology is a means of communication that allows people with simple immunity to communicate with peripheral devices that use EEG or other brain signals. The brain is made up of over 100 billion neurons. The BCI scheme should be able to classify the different EEG signals of the brain activity as precisely as possible, and the BCI user should learn how to generate separate brain signals to perform the different task. BCI has developed a synergistic combination of computational neuroscience, physiology, engineering, signal processing, computer science and different types of interdisciplinary research [1]. Research groups have focused on many areas of light and television control, yes / no questions, word processing, wheelchair control, robotic prostheses, autonomous vehicles, etc [2], [3].
The promising future foreseen for BCI has inspired analysis community to review the involvement of BCI within the lifetime of non-paralyzed humans through medical applications. However, the scope of analysis has been any widened to incorporate non-medical applications. newer studies have targeted traditional people by exploring the employment of BCIs as a completely unique data input device and investigation the generation of hands-free applications [4].
Motor neural activity of the brain are often translated into a real movement activity which might be wont to control a prosthetic device. By victimization graphical record recording machine, brain signal are often recorded from the surface of the human scalp. Necessary options are often extracted victimization mathematical formula from the recorded signal and translated into real activity movement command. The strategy of changing the brain signal into a command signal is understood as Brain computer Interfacing (BCI). BCI is outlined as a system that produces an impression output through a conversion method of electrical brain signal as associate signal originating from the brain psychological feature processes. The management signal are often applied to regulate associate application like computer control and mechanical prosthetic device [5].
Study on the brain machine interface (BMI) using motor mental imagery still provides an open discussion among the researchers. Numerous feature extraction and classification strategies were applied by the early researchers to investigate the electroencephalogram signal [6], [7]. The objective of this paper is not only to study neurophysiological understanding of the human brain but also to investigate electroencephalography as a means of identifying mental activity. This paper reviews on EEG based BCI systems that are implemented and also compared the performance of different feature classification techniques and puts forth best classification methods for hand and leg movement.
II. RELATED WORK Hema et al. [8] proposed Elman neural network and Functional Link neural network are employed using principle component analysis (PCA) features.
Marquez L. et al. [9] classified four arm movements such as left arm forward-backward movements and right arm forward backward movements using discrete wavelet transform (DWT) coefficients of corresponding EEG signals and multilayer perceptron neural network (MPNN). Researchers identified four movements of the arms of a healthy person: right hand back and forth, left hand back and forth. The accuracy obtained was 88.72%. There is lack of precision of the system in the final tests.
Zhiwei et al. [10] used wavelet packet entropy of EEG signal as feature where SVM is used as classifier.
Ting et al. [11] used wavelet packet transform and Probabilistic Neural Network (PNN) for classification. Since wavelet packet transform decomposes a signal into different frequency bands, the information about the frequencies of the EEG signal is distributed in several levels. However, to obtain more frequency information of EEG signal, Fourier analysis is carried out on sub band components. Statistical features from pre-processed EEG signal are obtained using wavelet packet decomposition and Fourier transform. KNN classifier is used to classify hand movements and compared to artificial neural network (ANN) which has many parameters to control.
Syed Khairul Bashar and Mohammed Imamul Hassan Bhuiyan [12], proposed a method to classify arm movements using statistical features of electroencephalogram (EEG) signals calculated from wavelet packet and Fourier transforms and classified using K-nearest neighbor (KNN)-based classifiers to dentify the arm movements, right hand forward and backward; left hand forward and backward. A mean accuracy of 92.84% is achieved.
Saugat Bhattacharyya et al. [12], introduced interval type-2 fuzzy system within the fray to enhance its uncertainty handling. Also, real time situations need a classifier to identify 2 mental states. Thus, a multi-class discriminating formula supported the fusion of interval type-2 mathematical logic and ANFIS is used in this research work. Two variants of this algorithm are developed on the idea of One-Vs-All and One-Vs-One strategies [14]. Each of the variants are tested on an experiment involving the real time robotic arm control, wherever each the variants of the proposed classifier, produces an average success rate of reaching a target to 65% and 70% respectively.
Prasant KumarPattnaik et al. [15] discussed how Brain Computer Interface has helped severely disabled patients. In this research, a small set of EEG signals were generated for various movements of the fingers and hands, and artifacts were removed using a low-pass filter technique and compared to the original data sets, which yielded results satisfactory. The frequencies of the alpha and beta bands were extracted from the EEG signal using the discrete wavelet transform and were therefore considered advanced for signal classification. This work intended for left hand movement and right-hand movement classification and obtained approx. 50 RMSE. In this paper there is no focused on feature extraction as well as classification Accuracy is not mentioned.
Muhammed Al-Suify et al. [16] with an aim to provide an effective system for classifying left and right movements of hand. The scheme is based on the combination of linear and non-linear characteristics to improve the classification rate. The linear characteristics are extracted by amplitude frequency (AFA) of the EEG signal. While non-linear features are extracted from a density matrix generated by the signal phase space. Four classification approaches in this study are used which are linear discriminant analysis (LDA), support vector machine (SVM), Bayes and KNN classifiers. The 2003 Graz data sets were used in this study. The maximum classification rate reached is 89.3%. The results confirmed the robustness of the new technique and demonstrated its value as a classification approach in the field of the BCI computer interface.
It is observed through literature is that hand and leg movement classification is possible using EEG signals. Extracting important features and use of various classifiers with more statistical features and use of classifier for better result can be obtained.

III. PROPOSED METHODOLOGY
The aim of this research is to classify different tasks of hand as well as leg movements as illustrated in figure 1. The proposed methodology is discussed in four steps. The first step is involves acquired EEG data. The second step was signal Preprocessing, to remove the noise and unwanted data. After noise removal the third step includes feature extraction from the EEG signals. The fourth step is to classify EEG signals to the corresponding movements i.e. hand and leg movements. Flow chart in figure 1 provides the proposed methodology which is discussed in details in section 3.1.

Signal Acquisition
In this paper, for simulation of proposed methodology, dataset is taken from the BCI project for EEG signal of 21-yearold man which include left hand right hand and leg movement signals. The data taken for simulation are following: • Left hand forward movement • Left hand backward movement • Right hand forward movement • Right hand backward movement • Left leg movement • Right leg movement Figure 1: Proposed methodology analysis of EEG signals 3.2 Pre-processing EEG data acquired is usually noisy and therefore call for noise removal. The EEG signals were filtered with band pass filter between 8 and 25Hz using a Butterworth filter to remove the unwanted artifacts. A band pass filter allows a predetermined band of frequencies to pass through. This is achieved by connecting a high pass filter with a low pass filter. The higher corner point (ƒ H ) as well as the lower corner frequency cut-off point (ƒL) are calculated the same as before in the standard first-order low and high pass filter circuits. Obviously, a reasonable separation is required between the two cut-off points to prevent any interaction between the low pass and high pass stages. The amplifier also provides isolation between the two stages and defines the overall voltage gain of the circuit.

Figure 3: Band Pass Frequency Response
An ideal electrical filter should not only completely reject the unwanted frequencies but should also have uniform sensitivity for the wanted frequencies. Using a Band pass filter to reduce the frequency band used, reducing the numbers of channels (channel selection) and reducing the number of features, have a direct impact on reducing the execution time, and increasing the utilization of memory which enhance the system performance which is shown in figure 4 and 5 for hand and leg dataset. Once noise has been removed DWT features are extracted from the frequency band of the EEG dataset. When the input data to an algorithm is too large to be processed and it is suspected to be notoriously redundant (much data, but not much information) then the input data will be transformed into a reduced representation set of features (also named features vector). Transforming the input data into the set of features is called features extraction. Thus the extraction of discriminatory features in the signal enhances the reduction of the length of the data vector by eliminating redundancy in the signal and compressing the relevant information into a feature vector of significantly lower dimension.
Discrete wavelet transform is used to extract characteristics from a signal on various scales proceeding by successive high pass and low pass filtering. The wavelet coefficients are the successive continuation of the approximation and detail coefficients The basic feature extraction procedure consists of: 1. Decomposing the signal using DWT into N levels using filtering and decimation to obtain the approximation and detailed coefficients.

Extracting the features from the DWT coefficients
Out of these DWT some useful information are extraction that reduces the dimensionality of the DWT features. Ten different useful information or features like mean, median, variance, standard deviation, skewness, kurtosis, complexity and mobility are generated and explained below: i. Mean Mean relates to the focus/center of a set of value. The Mean is considered for each and every sub-band signals [14]. It is computed as in equation (3.1).
Here x i is the ith data value and N is total number of instances.
ii. Median The median [14] is the value splitting the upper half of a data sample/a population, or a probability distribution, from the lower half. In modest relations, it may be considered as the "intermediate" value of a data set.
iii. Variance The average of the squared differences from the Mean is called variance. It is computed as in equation (3.2).
Here x is the data value and N is total number of instances and µ is mean.

iv. Standard deviation
Standard deviation [15] is a simple measure of the changeability of a data set. The Standard deviation is the root-meansquare (RMS) deviation of its values from the mean computed as in equation (3.3).
Here x is the data value and N is total number of instances.

vi. skewness
Skewness is a degree of the asymmetry of the probability distribution of a real-valued random variable about its mean [15,16]. The skewness value can be either positive or negative, or even undefined. This is given by equation (3.4).
) Here x is the data value, µ is mean and is standard deviation.

vii. Kurtosis
Kurtosis characterizes the comparative peakedness or flatness of a distribution associated with the normal distribution [15]. This is given by equation (3.5).
= µ4 / 4 (3.5) where, µ4 is the fourth moment about the mean and ϭ is the standard deviation.

ix. Complexity
The Complexity parameter signifies the variation in frequency [15]. This is given by equation (3.6).
Here y is the frequency. x. Mobility The mobility parameter signifies the mean frequency or the proportion of standard deviation of the power spectrum [15,16]. This is given by equation (3.7).
Here y is the frequency. Sample of all extracted features are shown in table 1.

Classification
Once the features are obtained these features are combined into vector to use. The available data set is first splitted into training and testing dataset respectively. Once the data is splitted classifier is first applied on training data for each ratio to generate rules of classifier. Then the test dataset was used to classify the data. For classification stacked deep auto encoder is used.

Stacked Deep Autoencoder
A stacked deep autoencoder is constructed by combining a stacked autoencoder, which comprises a desired number of cascaded autoencoder layers with a softmax classifier. The basic architecture of an autoencoder is a move forward with an input layer, often one hidden layers and an output layer. An autoencoder neural network is an unsupervised learning algorithm that applies backpropagation, setting the target values to be equal to the inputs. Internally, it has a hidden layer 'h' that describes a code used to represent the input. The network may be viewed as consisting of two parts: an encoder function, h=f(x) and a decoder that produces a reconstruction, r=g(h).

Figure 7: Stacked Deep Auto Encoder Architecture
The layer of deep autoencoder contains input layer, hidden layer and output layer. The input layer is for passing the input values The value at hidden layer is calculated as:

Where, W= weight matrix X= input data values coming from input layers B=Bias Matrix
And transfer function is calculated as : Where, e=error value The stacked deep autoencoder neural network involves multiple layer of autoencoders neural network and the loss function that is to be minimized as : Where, W 1 , W 2 , ……W l = weight function of all autoencoders = Decoding function of autoencoders f(x) = function to calculate data values at each layer Softmax classifier A frequent use of the softmax function appears in the domain of machine learning, it associate with each output possibility a score, which is converted into probability with the softmax function. When a classification task has more than two classes, it is standard to use a softmax output layer. It is the latest layer and it offers a way to predict a discrete probability distribution over the classes.

A.
Performance Parameters i. Accuracy This measure signifies the recognition accuracy in percentage for each known test input to the total trained data and is given by [ The result analysis is performed by analyzing the performance of different classifiers, i.e. SVM, KNN, RF, Neural Network, Naïve Bayes and Stacked Deepauto Encoder. For evaluating the performance of these classifiers, the EEG hand and leg movement dataset is first of all cleaned. For cleaning purpose Butterworth filter is used to remove unnecessary noise from the dataset. Further features are extracted from the cleaned dataset and finally dataset is divided into two groups i.e. training set as well as testing set. For more efficient result analysis training and testing ratio are divided into 60:40 ratio, 70:30 ratio and 80:20 ratio respectively.  Table 2 illustrates the accuracy analysis of different classifiers for 60:40 ratio. From the result, it has been seen that stacked deepauto encoder gives more accurate result for all 4 classes of dataset.  Similarly, table 4 illustrates the accuracy analysis of different classifiers for 70:30 ratio. From the result, it has been seen that stacked deepauto encoder gives more accurate result for all 4 classes of dataset and performance also increases with increase in training ratio. So, it is also concluded that with increase in training ratio accuracy of the classifier also increases.  Figure 9 illustrates the graph of performance evaluation of proposed classifier against some existing classifiers and it has been seen that stacked deep auto encoder gives better performance. The result analysis was performed on five different testing data samples and their average value is considered as an output for the 70:30 ratio dataset. From the result it is seen that stacked deep auto encoder have achieved approx. 90% accuracy and approx. 87% precision which is highest among all other classifiers.  Table 6 illustrates the accuracy analysis of different classifiers for 80:20 ratio. From the result, it has been seen that stacked deepauto encoder gives more accurate result for all 4 classes of dataset and performance also increases with increase in training ratio. So, it is also concluded that with increase in training ratio accuracy of the classifier also increases.   Figure 10 illustrates the graph of performance evaluation of proposed classifier against some existing classifiers and it has been seen that stacked deep auto encoder gives better performance. The result analysis was performed on five different testing data samples and their average value is considered as an output for the 80:20 ratio dataset. From the result it is seen that stacked deep auto encoder have achieved approx. 91% accuracy and approx. 87% precision which is highest among all other classifiers.
V. CONCLUSION BCI is the gift for people with disabilities, especially for those who cannot use the normal way out and muscle movements of the brain. BCI techniques vary depending on the application and require different methods to recognize the characteristics of pre-processed EEG signals and monitoring devices. This research presented the current assessment and trends in BCI. Non-invasive methods such as EMG, fMRI and NIRS are more popular and easier to use because no surgical implant is required. Non-invasive BCI records the brain signals with integrally embedded noise which may include electromyography, signal evoked by muscular activity, eye blinking etc. These unwanted components can be filtered out with suitable filters. In this research work the proposed algorithm is designed for BCI applications where left hand forward-backward movements and right hand forward-backward movements as well as left leg movement and right leg movement are classified. Features are extracted from these datasets for classification of type of movements SVM, KNN, RF, Neural Network, Naïve Bayes and Stacked Deepauto Encoder techniques are used to classify and evaluate the performance measures. After result analysis it is concluded that stacked Deepauto encoder outperforms better as compared to all other classifiers in terms of accuracy. BCI is a most innovative application that are being developed day-by day with an application of artificial intelligence. Additional research is also required for BCI development. These include explorations of: useful brain signals; signal recording techniques; feature extraction and translation strategies; methods for engaging short-and long-term variations between user and system therefore as to optimize performance; acceptable BCI applications; and clinical validation, dissemination, and support. So in future work, in all above areas it is needed to be used more effectively in real-life environments.