2nd International Mediterranean Science and Engineering Congress (IMSEC 2017) Çukurova University, Congress Center, October 25-27, 2017, Adana / TURKEY Pages: 72-78, Paper ID:59
Wavelet Transform Based Feature Extraction and Classification of EMG Signals Gazi Akgün1, Osman Ülkir2*, Erkan Kaplanoğlu3 Marmara University, Institute of Pure and Applied Science, Department of Mechatronics Engineering, Turkey; Email:
[email protected] 2 Marmara University, Technology Faculty, Department of Mechatronics Engineering, Turkey; Email:
[email protected] 3 Marmara University, Technology Faculty, Department of Mechatronics Engineering, Turkey; Email:
[email protected]
1
Abstract Electromyography (EMG) signals widely used for artificial prosthesis control systems to determine correlation between movements and actions. For this purpose EMG signals should be successfully classified. In this study, surface EMG signals obtained from hand motions are analyzed and classified by different methods and results are compared. Signals are collected from 7 basis hand motion as they meets majority of daily hand activities. EMG signals measured from forearm muscles with 8 EMG sensors on “Myo Armband”. Wavelet transform is applied to the measured EMG data set for separate components and to create multidimensional signal. Different wavelets used for the transform and results compared. Obtained feature vectors classified by Support vector machine (SVM) and Artificial neural network methods. And then results has been compared and discussed. Keywords: EMG signals, prosthesis, feature extraction, Myo Armband, wavelet transform, classification.
1. INTRODUCTION Human hand has about 20 degrees of freedom (Dof ) [1]. The basic tasks such as gripping, performing with the nerves, muscles, and tendons, respectively. Conversely, in biomechatronics based prosthesis, the actuators providing motor movement are controlled by EMG signals measured from healthy limb muscles. EMG signals can be acquired either surface electrodes over the skin or needle electrodes from the muscles. EMG is sum of the bio-potential signals that generated in many muscle fibers as a result of contraction [2]. The amplitude of the EMG signal is proportional to muscle activity [3]. These signals are an important instrument for diagnosis, treatment and automatic control of the prosthesis. In prosthetic limp applications, EMG signals are used to control the specially designed artificial limb. EMG signals are the result of polarization of sodium (Na+) and potassium (K+) ions in the myofibrils of muscles. This polarization begins with signals transmitted through the nervous system through the brain [4]. The first prosthesis designed to controlled with EMG signals have a single gripping ability that can be operated with open close or simple proportional control methods [5]. For this, simple threshold and proportional operations on the EMG signal were sufficient. When multi grasp prosthesis are designed, it is necessary to classify EMG signals. There are many methods for classifier design such as heuristic, explicit, statistical, artificial intelligence and fuzzy approach [6], [7].
2. EMG SIGNAL ACQUISITION AND THE EXPERIMENT Surface EMG signals acquisitioned for 7 different movement of hand from 5 people aged between 25 and 40. These movements are reposition, cylinder, tip, opposition, lateral pinch, hook and point as seen in figure 1. These movements are important movements to carry out such as holding a key, carrying a bag, gripping a doorknob, holding a credit card and pressing button. These movements were chosen as movements that enable 90% of hand activities used in daily life to be carried out [8][9].
(*) Corresponding author 2nd International Mediterranean Science and Engineering Congress (IMSEC 2017), October 25-27, 2017, Adana/Turkey 72
Figure 1: Hand movements.
Myo Arm Band with 8 sensors was worn to measure EMG signals from flexor and extensor muscles as seen in figure 2.
Figure 2: Myo Arm Band position.
Ch4 (mV)
7
50 0 -50
6
0
10
20
30
40
50
60
70
80
90
100
50 0 -50
0
10
20
30
40
50
60
70
80
90
100
0
10
20
30
40
50
60
70
80
90
100
20 0 -20 50
Class of motion
Ch3 (mV)
Ch2 (mV)
Ch1 (mV)
Audible and visual feedback were given to volunteers to switch between movements during the experiment. The time is set to take about 1000 samples for each motion. Each movement was continued for 5 second with a sampling frequency of 200 Hz and EMG signal was recorded. The order of movements in each set has been changed. Thus, different movement transition could be examined. The EMG signals and movement classes recorded in the end set of experiments are as shown in the figure 3.
5
4
3
2
0 -50
0
10
20
30
40
50
Time(s)
60
70
80
90
100
1
0
10
20
30
40
50
Time (s)
60
70
80
90
100
Figure 3: EMG signals and hand motion classes
3. FEATURE EXTRACTION Features to be used for classification purposes can be selected in time or frequency domain. In this study, wavelet transform is applied to the signals. The weighted average value calculated for each component in the obtained different 2nd International Mediterranean Science and Engineering Congress (IMSEC 2017), October 25-27, 2017, Adana/Turkey
frequency values is recorded as a feature.
3.1 Wavelet Transform Wavelet transform is a mathematical method for analyzing the signal in different resolutions for the desired frequency bands[10]. Good time resolution and poor frequency resolution at high frequencies and good frequency resolution and poor time resolution at low frequencies are obtained with wavelet transform. Low frequency components of the signal include the approximation of the signal, high frequency components of the signal include detail information of the signal. Therefore, wavelet transform is an important transformation tool for signal processing [11]electrocardiographic (ECG. 3.2 Discrete Wavelet Transform Discrete wavelet transform (DWT) provide efficient processed of the sign in the time and frequency domain. It can be thought of as a filter bank. Transformation produce results as representing the signal with coefficients with filter passing through several high-pass and low-pass filters. Depending on the number of high-pass filters (resolution), this filter bank details the signal at each level. The low-pass filter called a scaling function (∅) and the high-pass filter is called a wavelet function (𝜓). The wavelet functions haar, daubechies and symlets are used in the discrete wavelet transform. DWT is expressed by the following [12]. (1) Where is signal and is wavelet function. DWT analysis can be done using fast, pyramidal algorithms associated with multi frequency filters [10]. DWT, analysis signal at different resolutions in different frequency bands, separating it into a rough approximation and detail coefficients. Separate signal into different frequency bands is achieved by passing the time domain signal through high and low pass filters. This is a level decomposition and is mathematically shown in following [13].
(2)
yhigh [ k ] and ylow [ k ] are high pass filter and low pass filter responses, respectively. This process can be expressed mathematically as convolution with band-pass filters. These filters composed with wavelet and scale functions. At each step, the signal obtained by the low pass filter gives the main shape of the signal, while the signal obtained by the high-pass filter gives the details of the signal in that resolutions. For this reason, the coefficient sequences obtained from these low and high pass filters are also referred to as approximation and detail coefficients, respectively.
Figure 4: Tree of Wavelet Transform
4. CLASSIFICATION Classification is performed in order to determine movement class of the EMG signals. For this purpose used to many methods such as Artificial Neural Network (ANN), Fuzzy Logic, Support Vector Machine (SVM), K-means, K nearest neighbour, Parzen classifier and Linear discriminant analysis. Decomposition and modeling of EMG signals is very difficult [14]. The method to be used for solving the classification problem must also be a method that can perform ex2nd International Mediterranean Science and Engineering Congress (IMSEC 2017), October 25-27, 2017, Adana/Turkey
periential processing. ANN and SVM, which have the ability to converge non-linear models to any continuous function are methods that can be used for classification.
4.1 Multi-Channel Support Vector Machine Classifier Support vector machine (SVM) is a machine learning method proposed for classification problems. SVM uses a sigmoid kernel function and has a feed forward neural network with two layers. One of the basic assumptions of the SVM is that all the samples in the training set are distributed independently and similarly [15]. SVM can be run on classification and regression problems. The basic idea in the SVM regression method is to have a linear discriminant function that reflects the feature of the training data in the true sense as closely as possible and fits the statistical learning theory [16]. SVM performs linear or non-linear data classification with the aid of the most appropriate decision function. There are many hyper-planes that separate two classes. Objective of SVM is to determine the hyper-plane that separates two classes most successfully from these hyper-planes. SVM performs this with using decision function. Support vector machine classifies data differently depending on the linear separability and non-linear separability of the data. SVM’s are generally designed for two class problems. However, in many practical applications, multi-class classification is required. Problem is divided into several 2-class problems to solve multi-class problems using SVM. Then classifiers are trained to solve these problems. And these are reconfigured for output. In this study “one against one” method was applied. In this method multiple support vector classifiers are trained. Each support vector machine divides the data set into binary classes. For example, for a classification problem of three classes, the first classifier separates one and two labeled classes. The second classifier separates one and three tagged classes. Third classifier separates the two and three labeled classes [17], [18].
4.2 Classification with ANN Artificial neural network (ANN) is computer system based on mathematical models of biological Neural Networks in order to realize their ability to derive and discover new information through learning from the properties of the human brain[19], [20]. ANN learns from the relation between input and output about any events. ANN can generate solutions for events that have never been seen before, using the weight and bias values obtained with the previous examples. In single layer ANN, input values multiplied by the weights and summed with the threshold value (θ). Then activation function is applied to the output of the neuron. The output of the artificial neuron can be expressed as follow. (3) Where weight of the inputs is, is threshold is output and is input.
5. RESULTS AND DISCUSSION Discrete time wavelet transform is applied to EMG signals recorded from subjects. The weighted average of the components obtained for each motion was recorded as a feature. For wavelet transform applied at 3rd degree, 211x 64 feature matrix and 211x1 class matrix are obtained. When test data set selected from the training data set is applied to SVM trained with data from all the subjects, the results is as shown in fig.5a. Accordingly, SVM outputs and class input data overlapped. The classifier’s success is 100% and mean square error (mse) of the SVM output is 0. When test data selected from outside the training data set is applied to SVM, the results is as shown in fig 5b. In this example, we can see that the classifier has made a mistake. The value of mse calculated from this experiment is 1.1 and classifier’s success is 86%.
2nd International Mediterranean Science and Engineering Congress (IMSEC 2017), October 25-27, 2017, Adana/Turkey
7
7
Class of Motion Calculated class with SVM
6
6
5.5
5.5
5
5
4.5
4.5
4
4
3.5
3.5
3
3
2.5
2.5
2
0
10
20
30
40
50
Time (s)
60
Calculated class with SVM Class of motion
6.5
Class
Class
6.5
70
80
90
100
2
0
10
20
30
40
(a)
50
Time (s)
60
70
80
90
100
(b) Figure 5: SVM classification results
The results of the experiment with the multi-layer artificial neural network (ANN) trained with the same training data are shown in fig 6. When test data set selected from the training data set is applied to ANN trained with data from all the subjects, the results is as shown in fig.6a. The classifier’s success is 94% and ‘mse’ of the ANN output is 0.0808. When test data selected from outside the training data set is applied to ANN, the results is as shown in fig 6b. The classifier’s success is 98% and mse of the ANN output via class input is 0.0205. 8
8
Class of motion Calculated class with ANN
7
6
5
Class
Class
6
4
3
5
4
3
2
1
Class of moiton Claculated class with ANN
7
2
0
10
20
30
40
50
Time(s)
60
70
80
90
100
1
0
10
20
(a)
30
40
50
Time (s)
60
70
80
90
100
(b) Figure 6: ANN classification results
As a result of the experiments, it has been observed that SVM classifier has shown great success with the test data selected from the training data. But the classifier is more likely to encounter EMG data that it has never seen while working in application areas as artificial limbs. For this reason, it can be said that the success of ANN is better suited for EMG classification task in artificial limbs.
6. CONCLUSION Classification of EMG, an important instrument for controlling artificial limbs, is important for the control of multi-grasp artificial limbs. This paper presented wavelet transform of the EMG signals and its classification with SVM and ANN algorithms. Classification performance was compared with calculated mean square error by input class via classifier output. According to the experimental result, it is concluded that the artificial neural network algorithm is more successful for artificial limb applications The classifiers will be run on embedded system applications to compare online classify success as the future work. Furthermore, in future works, different mathematical approaches and different features will calculate on the wavelets, and the effect of these features on the success of the classification algorithm will be studied.
REFERENCES [1]
E. N. Kamavuako, K. B. Englehart, W. Jensen, and D. Farina, “Simultaneous and Proportional Force Estimation in Multiple Degrees of Freedom From Intramuscular EMG,” vol. 59, no. 7, pp. 1804–1807, 2012.
[2]
S. D. Hickman, “Classification of Surface EMG Signals with Respect to Percent Maximum Voluntary Contraction Using Artificial Neural Networks,” 2014. 2nd International Mediterranean Science and Engineering Congress (IMSEC 2017), October 25-27, 2017, Adana/Turkey
[3]
M. GÜNAY and A. ALKAN, “Spektral Yontemler ve DVM Siniflandirici ile EMG isaretlerinin Tasnifi,” 2010.
[4]
İ. Yazıcı, “EMG işaretlerinin işlenmesi ve sınıflandırılması,” Sakarya Üniversitesi, 2008.
[5]
K. Englehart, B. Hudgins, P. A. Parker, and M. Stevenson, “Classification of the myoelectric signal using time-frequency based representations,” Med. Eng. Phys., vol. 21, no. 6, pp. 431–438, 1999.
[6]
K. Englehart, B. Hudgin, and P. A. Parker, “A wavelet-based continuous classification scheme for multifunction myoelectric control,” IEEE Trans. Biomed. Eng., vol. 48, no. 3, pp. 302–311, 2001.
[7]
G. Akgun, M. DEMETGUL, and E. Kaplanoğlu, “EMG Signal Feature Extraction and Classification with Artificial Neural Network Algorithm.”
[8]
. Jacobson-Sollerman, C., Sperling, “Grip function of the healthy hand in a standardized hand function test. A study of the Rancho Los Amigos test.,” Scand. J. Rehabil. Med., p. 9(3), 123-129., 1977.
[9]
E. A. Sollerman C., “Sollerman hand function test: A standardised method and its use in tetraplegic patients,” Scand. J. Plast. Reconstr. Surg. Hand Surg, vol. 29, p. 16, 1995.
[10] L. Debnath and F. A. Shah, Wavelet transforms and their applications. Boston: Birkhäuser., 2002. [11] D. Cvetkovic, E. D. Übeyli, and I. Cosic, “Wavelet transform feature extraction from human PPG, ECG, and EEG signal responses to ELF PEMF exposures: A pilot study,” Digit. Signal Process. A Rev. J., vol. 18, no. 5, pp. 861–874, 2008. [12] E. Ayaz, “Wavelets and their applications on electrical engineering (Doctoral dissertation),” 1997. [13] S. G. Mallat, “Multiresolution approximations and wavelet orthonormal bases of l2(r),” vol. 315, no. 1, pp. 69–87, 1989. [14] H. Xie, H. Huang, J. Wu, and L. Liu, “A comparative study of surface EMG classification by fuzzy relevance vector machine and fuzzy support vector machine,” Physiol. Meas., vol. 191, p. 191. [15] T. B. Meier, A. S. Desphande, S. Vergun, V. A. Nair, J. Song, B. B. Biswal, M. E. Meyerand, R. M. Birn, and V. Prabhakaran, “NeuroImage Support vector machine classi fi cation and characterization of age-related reorganization of functional brain networks,” Neuroimage, vol. 60, no. 1, pp. 601–613, 2012. [16] A. Arslan, “A new training method for support vector machines : Clustering k -NN support vector machines,” vol. 35, pp. 564–568, 2008. [17] S. YILDIRIM, “Arıza Teşhisinde Destek vektör Makinelerinin Kullanımı,” Fırat Üniversitesi, 2006. [18] A. Statnikov, C. F. Aliferis, I. Tsamardinos, D. Hardin, and S. Levy, “Gene expression A comprehensive evaluation of multicategory classification methods for microarray gene expression cancer diagnosis,” vol. 21, no. 5, pp. 631–643, 2017. [19] M. M. H. Ã, M. G. Khalafallah, and E. A. Hassanien, “Prediction of wastewater treatment plant performance using artificial neural networks,” vol. 19, pp. 919–928, 2004. [20] E. Oztemel, Artificial Neural Networks. 2003.
2nd International Mediterranean Science and Engineering Congress (IMSEC 2017), October 25-27, 2017, Adana/Turkey
2nd International Mediterranean Science and Engineering Congress (IMSEC 2017), October 25-27, 2017, Adana/Turkey