Application of gabor transform in the classification of myoelectric signal

In recent day, Electromyography (EMG) signal are widely applied in myoelectric control. Unfortunately, most of studies focused on the classification of EMG signals based on healthy subjects. Due to the lack of study in amputee subject, this paper aims to investigate the performance of healthy and amputee subjects for the classification of multiple hand movement types. In this work, Gabor transform (GT) is used to transform the EMG signal into time-frequency representation. Five time-frequency features are extracted from GT coefficient. Feature extraction is an effective way to reduce the dimensionality, as well as keeping the valuable information. Two popular classifiers namely k-nearest neighbor (KNN) and support vector machine (SVM) are employed for performance evaluation. The developed system is evaluated using the EMG data acquired from the publicy available NinaPro Database. The results revealed that the extracting GT features can achieve promising performance in the classification of EMG signals.


Introduction
Electromyography (EMG) signal is an electrical potential generated by the muscle when there is a muscle contraction [1].EMG signal is a non-stationary biomedical signal, which has a smaller amplitude that representing the contraction level of muscle.Generally, EMG signal can be captured from the surface of skin using the surface electrode.Additionally, EMG signal contains rich muscle information that describes the performance and characteristic of muscle [2,3].In this regard, EMG signals having high potential in developing the myoelectric robotic hand for rehabilitation application.
Myoelectric robotic hand is a device implements on the prostheses for amputee's use.Meanwhile, it is also applicable for the rehabilitation of stroke survivors and workers with injured hand.In short, EMG is beneficial in the clinical and rehabilitation areas.However, EMG signal is non-stationary, which means the frequency spectrum of EMG signal changes over time [4].In addition, the presence of noise and artifact seriously falsified the quality of EMG signals [5].To obtain the information accurately from the EMG signal, multiple processing is required.
Signal processing including the analysis, modification and synthesis of signal is widely applied in the processing of EMG signal.For simplicity and fast computation time, time domain (TD) is commonly used [6].Nevertheless, TD does not provide spectral information.In such case, frequency domain (FD) such as Fast Fourier Transform (FFT) is employed to obtain the spectral information.However, previous studies showed that FFT is good in analyzing muscle fatigue, but not to the classification of EMG signals [7,8].
In recent day, the time frequency distribution (TFD) is widely used in EMG pattern recognition.TFD is a method that transforms the signal into time-frequency plane, which allows the representation of time and frequency information at the same time.According to literature, TFD yields better performance than TD and FD [9].On the other side, most of the researchers investigated the performance of healthy subject in their experiments [10][11][12].However, the performance evaluation of amputee subject is equally important since amputee and intact subject are different.This paper presents a comparative study of healthy and amputee subjects by applying the Gabor Transform (GT).The EMG signals are acquired from NinaPro database.Next, GT is applied to transform the EMG signal into time-frequency representation (TFR).TFR is a twodimensional matrix which consists of high dimensional vector.To extract the valuable information from TFR, five time-frequency features are extracted.In this work, two popular classifiers namely k-nearest neighbor (KNN) and support vector machine (SVM) are used to evaluate the performance of GT features.Initially, the optimal k-value of KNN is identified.After that, the performance of GT features on both healthy and amputee subjects are investigated.Finally, the results are validated using statistical analysis.

System Overview
The proposed EMG pattern recognition system was shown in Figure 1.In the first step, the multichannel EMG signals are acquired from NinaPro database.Then, GT is employed to transform the EMG signal into TFR.Next, five time-frequency features are extracted from GT coefficient.Finally, the extracting features are fed into the SVM and KNN classifiers for recognizing the 17 hand movement types.17 Hand Movement Types

EMG Data
In this study, the EMG data are collected from the Non-Invasive Adaptive Prosthetics (NinaPro) project, which has been validated and verified to be a benchmark EMG database for the rehabilitation studies [13].NinaPro database consists of a huge number of EMG data of hand movements recorded from the subjects.In this work, the exercise B from NinaPro database 3 (DB3) and database 4 (DB4) are used [13,14].DB3 contained the EMG signals recorded from 11 amputee subjects while DB4 comprised the EMG data of 10 healthy subjects.It is worth noting that exercise B consists of 17 hand movement types.The EMG data was sampled at 2 kHz with resolution of 16 bits.In the experiment, the subjects were asked to perform each hand movement for 5 seconds and followed by the resting state of 3 seconds.Each hand movement was repeated for six times.In total, 1224 EMG signals (17 hand movement types x 6 repetitions x 12 channels) were obtained from each subject.At last, all the resting states are removed.

Gabor Transform
Gabor Transform (GT) is an extension of the short time Fourier transform (STFT) that utilizes the Gaussian window function to execute the time-frequency transformation [15].In a smaller window size, GT provides a good time resolution but poor frequency resolution on the time frequency plane.On the contrary, the frequency resolution improves as the window size increased.GT demonstrates its beneficial in the combination with decomposition and this TELKOMNIKA ISSN: 1693-6930  combination offers the adaptive time-frequency analysis [16].Most studies to date indicated GT outperformed STFT in the detection and identification of signal and source [17,18].In this work, GT with Gaussian window of 256 ms (512 samples) and 50% overlap (256 samples) is applied.Theoretically, GT can be defined as: where () x  is the EMG signal and the window function, ()   can be represented as: () unlike STFT, GT has the advantage that the sigma parameter,  is freely selectable [16].The alpha,  is inversely proportional to the  and the Gaussian probability density function can be written as: where Nw is the Gaussian window size and  is the alpha parameter.Since ( ) Gaussian window and the final GT can be expressed as: in this study, the alpha is set at 2. Figure 2 illustrates the sample GT of the EMG signal obtained from one subject.The sample of EMG signal was shown in Figure 2(a).In Figure 2(b), the red areas display a higher amplitude.In particular, the blue areas present a lower amplitude.

Feature Extraction using GT
GT transforms the EMG signal into TFR, which providing the time and frequency information simultaneously.However, TFR is a two-dimensional matrix that consists of high dimensional vector.Therefore, proper feature extraction methods are required to extract the valuable information from TFR.In this work, five time-frequency features namely spectral entropy, Shannon entropy, Renyi entropy, two dimensional mean and variance are extracted from each GT.

Spectral Entropy
Generally, spectral entropy (SE) is used to evaluate the randomness of the signal energy distribution [19].SE exhibits the complexity of the system.A higher SE shows that the energy of EMG signal is less concentrated on the time-frequency plane.Mathematically, SE can be expressed as: where P is the power spectrum, L and M are the length of time and frequency points, respectively.

Shannon Entropy
Shannon entropy (E) is a fundamental TFR feature that emphasizes the medium tension and focuses on the low intensities of energy in time-frequency distribution [20].E can be represented as: where G is the amplitude of GT, L and M are the length of time and frequency points, respectively.

Renyi Entropy
Renyi entropy (RE) is a time-frequency feature that used to evaluate the time-frequency structure and extract the spectral information of the signal based on the concept of generalized dimension [19].A higher value of RE is achieved if the signal is found to be very high complexity, especially for multicomponent signals.RE can be calculated as: where α is the RE order, G is the amplitude of GT, L and M are the length of time and frequency points, respectively.In the past studies, it is indicated that α should be odd integer and the value of α must be greater than 2 [19].In this work, the α is set at 3.

Statistical Feature
Normally, statistical feature is referred to the one-dimension statistical properties including mean and variance.For time-frequency distribution, the one-dimension statistical features can be extended into two dimensional as follow: where  is referred to the mean, L and M are the length of time and frequency points, respectively.

Classification
After feature extraction, a feature vector is formed.To analyze the performance of GT features, two machine learning algorithms namely k-nearest neighbor (KNN) and support vector machine (SVM) are applied.

K-nearest Neighbor
Recently, KNN is a popular machine learning method due to its processing speed and simplicity in the process of recognition [21].The concept of KNN is pretty simple.KNN algorithm builds a group of k data point in training data and predicts the test data based on the nearest neighbor.However, the value of k must be carefully selected since it has a great influence on the classification performance [22].More specifically, the k-value is mostly depending on the data set and model specification.To obtain the optimal performance, the k-value ranging from 1 to 10 are evaluated separately for both DB3 and DB4.

Support Vector Machine
Support vector machine (SVM) is known as one of the best and accurate classifier in the classification of EMG signals.Many studies, indicated that SVM showed a great potential in classifying the EMG signals [23,24].SVM attempts to offer the best classification function to discriminate the members of different classes in EMG data set.In addition, SVM expands the concept of hyperplane separation to the data to distinguish the data set that failed to separate linearly.However, some drawbacks of SVM are the complexity of the selection of kernel function and longer computational time.According to literature, the radial basis kernel function (RBF) offers the best performance in EMG signals classification [23,25].Thus, SVM with RBF is employed in this work.

Results and Analysis
In this section, the classification performance of KNN and SVM for both healthy and amputee subjects are presented and discussed.The main goal of the classification of EMG signals is to investigate the performance of GT features in both healthy and amputee data sets.As described in Section 2, the EMG data of 17 hand movements from DB3 and DB4 are employed.Five GT features are extracted from each EMG signal and formed a feature vector.In total, 60 features (5 features × 12 channels) are obtained from each hand movement from each subject.After that, the min-max normalization method is applied to normalize the features so that the value of feature is ranging between 0 and 1 [8].Min-max normalization can be expressed as: where fv is the original feature vector, min j and max j are the minimum and maximum number over feature j.The normalized features are then fed into the KNN and SVM for classification.In this study, six-fold cross validation is applied to ensure all the data are tested.The data are divided equally into 6 equal parts and each part is used for testing in succession.On one side, the remaining parts are used for training session.

Selection of k-value in KNN
KNN algorithm is simple, fast and efficient.However, the performance of KNN is mostly depending on the value of k [21].More specifically, the k-value may be different based on the data set.Therefore, the analysis of k-value on both healthy and amputee subjects are done.for healthy and amputee subjects.The error bar represents the standard deviation (SD).One can see that the mean classification accuracy shows a decreasing trend as the k-value increased.For healthy subjects, the best k-value is found to be 1.KNN with k-value of 1 not only provides the optimal classification accuracy, it is also offering a consistent result due to smaller standard deviation value.As can be seen in Figure 3, amputee subjects have the best performance when k=1. Evidently, KNN with k-value of 1 gives the optimal performance using the GT features.Thus, only k-value of 1 is implemented in KNN for the rest of this study.

Performance Evaluation
Here, the performance of GT features for both healthy and amputee subjects are discussed.Table 1 outlines the classification accuracy of KNN and SVM for healthy and amputee subjects.By using the GT features and KNN, majority of healthy subject achieved the classification accuracy of above 90% except subject 4, 8 and 10.A similar performance also can be found in SVM.By contrast, only amputee subject 1, 8, 9 and 11 obtained classification accuracy of above 80% when KNN is employed.As in Table 1, there are only three amputee subjects achieve a high classification accuracy of above 80% in SVM model.From this, it is believed that SVM offered a better performance especially for amputee subjects.Among the amputee, it has been found that amputee subject 7 has the lowest classification accuracy, 22.25% and 36.27% in KNN and SVM, respectively.This would be amputee subject 7 had lost his entire forearm and he did not have any experience of using myoelectric prosthesis.In contrast, amputee subject 9 yields the highest accuracy of 91.18% and 93.14% in KNN and SVM, respectively.This might because amputee subject 9 has 90% remaining forearm and he was using the myoelectric prosthesis, thus leading to high classification performance.
Figure 4 demonstrates the mean classification accuracy of KNN and SVM for both healthy and amputee subjects.The performance of GT features of healthy subjects was better than amputee subjects.This is expected, because amputee subject performed the 17 different hand movements based on their imagination.In such case, the difficulty to recognize the hand movement types is increased.This explains why healthy subjects usually achieve a better accuracy than amputee subjects.Moreover, it is obvious that the performances of healthy subjects were more consistent compared to amputee subjects.As can be seen in Figure 4, as well as Table 1, KNN showed an increment of 0.49% mean classification accuracy as compared to SVM.To examine the performance of classifier, the t-test is utilized.The results show that there is no significant difference (p=0.3969) between the classification accuracy of SVM and KNN.However, KNN offered more consistent results due to smaller standard deviation value (4.3%).For amputee subject, SVM gives a better mean classification accuracy, 67.65% in classifying 17 different hand movements compared to KNN, 65.54%.By applying t-test, it indicates the performance of KNN and SVM for amputee subjects are similar (p=0.2059).This shows that the performances of KNN and SVM are similar.On the whole, it is concluded that the combination of GT features and KNN offered the best performance in the classification of 17 hand movement types.

Conclusion
In this paper, the performance of GT features in the classification of 17 hand movements for both healthy and amputee subjects are presented.Our results indicated that the KNN with k-value of 1 is the most suitable in analyzing the EMG signals.Moreover, the experimental results showed that by using GT features, the hand movements performed by  ISSN: 1693-6930 TELKOMNIKA Vol.17, No. 2, April 2019: 873-881 880 healthy subjects are discriminated very well.However, GT did not offer promising results in amputee dataset.It is very challenging for the amputee subject to carry out the specific hand movement since the movement is performed according to their imagination.

Figure 1 .
Figure 1.Flow diagram of EMG pattern recognition system

Figure 3
Figure 3 illustrates the mean classification accuracy according to the change in k-value (1-10)for healthy and amputee subjects.The error bar represents the standard deviation (SD).One can see that the mean classification accuracy shows a decreasing trend as the k-value increased.For healthy subjects, the best k-value is found to be 1.KNN with k-value of 1 not only provides the optimal classification accuracy, it is also offering a consistent result due to smaller standard deviation value.As can be seen in Figure3, amputee subjects have the best performance when k=1. Evidently, KNN with k-value of 1 gives the optimal performance using the GT features.Thus, only k-value of 1 is implemented in KNN for the rest of this study.

Figure 3 .
Figure 3. Mean classification accuracy according to the change in k-value (a) Healthy subjects (b) Amputee subjects

Figure 4 .
Figure 4. Mean classification accuracy of KNN and SVM for healthy and amputee subjects

Table 1 .
Classification Accuracy of KNN and SVM for Both Intact and Amputee Subjects