Keywords

1 Introduction

Electromyography (EMG) signal, which is a measurement of the electrical activity in muscles as a result of contraction, is one of the electrophysiological signals that has been expansively studied. EMG signals have been applied both clinically as well as in the engineering domain for assistive technologies and rehabilitation engineering. The EMG signal consists of discrete waveforms; namely, motor unit action potentials (MUPs) that result from the recurring discharges of motor units (MUs), which are groups of muscle fibers [1, 2]. By placing certain electrodes on the skin, the summation of action potentials from the muscle fibers can be recorded to represent the EMG signal. Moreover, for recording the EMG signals in varying degrees of voluntary muscle activity, a typical needle EMG treatment is performed using a concentric needle electrode.

Feature extraction and function classification represent a significant challenge in processing and analyzing the EMG signals. Many machine learning (ML) techniques are used for the classification problems. The success of any classification system is dependent on selecting its parameters carefully. This research focuses on using support vector machines (SVMs) for solving the problem of EMG signals classification. SVMs proved its efficiency as a classification method. But, SVMs face some challenges, when adopted in real practical applications. Setting the optimal parameters of SVMs is one of these challenges. This research presents a method for selecting the best parameters for SVMs via applying an optimization algorithm [35]. Selecting these parameters correctly guarantees to obtain the best classification accuracy [4]. SVMs have two types of parameters (penalty constant C parameter and kernel functions parameters), and the values of these parameters affect the performance of SVMs [3].

This paper presents a hybrid optimized classification system for EMG signals classification. The proposed system implements grey wolf optimizer (GWO) combined with support vector machines (SVMs) classification algorithm in order to achieve enhanced EMG classification accuracy via selecting the optimal settings of SVMs parameters to be used later for assistive technologies and rehabilitation engineering. Grey Wolf Optimization (GWO) algorithm is a new meta-heuristic method, which is inspired by grey wolves, to mimic the hierarchy of leadership and grey wolves hunting mechanism in nature. This research chooses GWO algorithm. The reason of this choice is that comparing with some of the most well-known evolutionary algorithms such as Particle Swarm Optimization (PSO), Genetic Algorithm (GA), Ant Colony Optimization (ACO), Evolution Strategy (ES), and Population-based Incremental Learning (PBIL), The results showed that the GWO algorithm has the ability to provide very competitive results in terms of improved local optima avoidance. The proposed approach consists of three phases; namely pre-processing, feature extraction, and GWO-SVMs classification phases. The obtained experimental results obviously indicate significant enhancements in terms of classification accuracy achieved by the proposed GWO-SVMs classification system compared to classification accuracy achieved by the typical SVMs classification algorithm.

The rest of this paper is organized as follows. Section 2 presents research work considering processing and analyzing the EMG signals. Section 3 introduces the proposed optimized classification system and describes its different phases; namely pre-processing, feature extraction, and classification phases. Section 4 presents the tested EMG dataset and discusses the obtained experimental results. Finally, Sect. 5 presents conclusions and discusses future work.

2 Related Work

Generally, there is a number of current researches that tackle the problem of EMG signals classification problem. Authors in [6] presented a new rehabilitation robotics control design based on multilayer perceptron neural network and the analysis of real-time EMG. The proposed system consists of three main phases namely; signal preprocessing, feature extraction, and classification phases. For signal preprocessing, signal rectification, removing DC offset (mean value of waveform) from EMG signal and creation of envelope curve were applied. Then for feature extraction phase, time domain, frequency domain, and dynamic system features were calculated to be used as a feature vector. Finally, a multilayer perceptron neural network is used as a binary classifier for human actions. Experimental results showed that the proposed system achieved an accuracy of 90 % for clapping and handshaking, 91 % for kneeing and pulling, 75 % for hammering and headering, 98 % for running and hugging and 88 % for elbowing and slapping. In [7], authors proposed a new method based on back propagation neural network classifier for classification of myopathy patient’s and healthy subjects using EMG signal. The proposed method has four basic steps, which are preprocessing, singular value decomposition, feature extraction, and classification. In this research, authors used The extracted singular values as a feature vector. Finally, they applied back propagation neural network as a classifier. Experimental results showed that the proposed method achieved an accuracy of 96.75 %.

Moreover, in [8], authors present a comparison of different algorithms for EMG signal classification in order to find an effective machine learning algorithm for EMG signals classification. The presented framework for classification used multi-scale principal component analysis (MSPCA) for de-noising, discrete wavelet transform (DWT) for feature extraction, and different machine learning algorithms for classification. CART, C4.5 and random forests (RF) decision tree classification algorithms have been applied to classify EMG signal into myopathic, ALS (Amyotrophic lateral sclerosis) or normal. Using different performance measures, the obtained results showed that the best accuracy of 96.67 % is achieved using a combination of DWT and RF algorithms.

In this paper, a hybrid optimized classification system for EMG signals is presented. The proposed system utilizes grey wolf optimization algorithm along with SVMs classification algorithm to improve classification accuracy via selecting the best parameters of SVMs.

3 The Proposed Hybrid GWO-SVMs Classification Approach

The proposed classification approach consists of three phases; namely, pre-processing, feature extraction, and classification phases. Figure 1 describes the general structure of the proposed approach.

Fig. 1
figure 1

Architecture of the proposed hybrid GWO-SVMs classification approach

3.1 Pre-processing Phase

During pre-processing phase, the proposed approach applies the following steps:

  1. 1.

    Apply EMG signal rectification.

  2. 2.

    Remove any DC offset of the signal.

  3. 3.

    Create an envelope curve of EMG signal via applying a 4th degree low pass butterworth filter at 10 Hz.

  4. 4.

    Segment each time series to 15 windows.

3.2 Feature Extraction Phase

Based on the literature, features in analysis of the EMG signal can be generally divided into three main groups; namely time domain, frequency domain, and time-frequency or time-scale features [911]. Time-scale features cannot be directly used by themselves and features extracted from time-frequency or time-scale methods should be reduced their high dimensions before being sent to a classifier. Hence, only two feature sets, time domain features and frequency domain features, with twenty-three features, have been considered for experiments conducted in this research [6, 12].

Time Domain Features: The time domain features considered in this paper are integrated EMG (IEMG), mean absolute value (MAV), modified mean absolute value type 1 (MAV), modified mean absolute value type 2 (MAV), simple square integral (SSI), variance of EMG (VAR), absolute value of the 3rd, 4th, and 5th temporal moment (TM3, TM4 and TM5), root mean square (RMS), V-order, log detector (LOG), waveform length (WL), average amplitude change (AAC) and difference absolute standard deviation value (DASDV) [6, 12].

Frequency Domain Features: The frequency domain features considered in this paper are total power (TTP), mean frequency (MNF), median frequency (MDF), peak frequency (PKF), mean power (MNP), The 1st, 2nd, and 3rd spectral moments (SM1, SM2 and SM3) [9].

During feature extraction phase, the proposed approach implements steps shown in Algorithm 1.

figure a

3.3 GWO-SVMs Classification Phase

Finally, for classification phase, the proposed approach applied a hybrid GWO-SVMs model that employs grey wolf optimization (GWO) combined with support vector machines (SVMs) algorithm to improve the classification accuracy via selecting the optimal SVMs parameters setting for One-against-One multi-class SVMs.

Support Vector Machines (SVMs): One of the most widely used machine learning techniques for classification and regression of high-dimensional datasets with excellent results is support vector machines (SVMs) [1315]. SVMs can solve any classification problem via attempting to find an optimal separating hyperplane between two classes. Maximizing the margin around the separating hyperplane between a positive and negative classes is the main aim of SVMs [1315].

Let \(S=\{(x_1, y_1), (x_2, y_2), \dots , (x_n, y_n)\}\) is a training dataset with n samples, where \(x_i\) is a n-dimensional feature vector and \(y_i \in {-1,1}\) is the class label (classes \(C_1\) and \(C_2\)). Geometrically, finding an optimal hyperplane with the maximal margin to separate two classes requires to solve the optimization problem, as shown in Eqs. (1) and (2).

$$\begin{aligned} maximize \sum _{i=1}^n \alpha _i - \frac{1}{2} \sum _{i,j=1}^{n} \alpha _i \alpha _j y_i y_j .K(x_i,x_j) \end{aligned}$$
(1)
$$\begin{aligned} Subject-to: \sum _{i=1}^n \alpha _i y_i, 0 \le \alpha _i \le C \end{aligned}$$
(2)

where, \(\alpha _i\) is the weight assigned to each training sample \(x_i\). If \(\alpha _i > 0\), \(x_i\) is called a support vector. C is a regulation parameter used to trade-off the training accuracy and the model complexity. K is a kernel function, which is used to measure the similarity between two samples.

Grey Wolf Optimization Grey wolf optimizer (GWO) is a new meta-heuristic technique. It can be applied for solving optimized problems and achieves excellent results [16, 17]. In fact, the GWO mimics the grey wolves’ leadership hierarchy and hunting mechanism. To simulate the leadership hierarchy, there are four types of grey wolves which are alpha (\(\alpha \)), beta (\(\beta \)), delta (\(\delta \)) and omega (\(\omega \)). Those four types can be used for simulating the leadership hierarchy. The hunting (optimization) is guided by three wolves(\(\alpha \), \(\beta \) and \(\delta \)). The \(\omega \) wolves follow them [17, 18]. During the hunt process, it is known that grey wolves surround their prey. Mathematically, this is modeled by Eqs. (3), (4) [16, 17]:

$$\begin{aligned} {D}=| {C} . { X_p}(t) - { X}(t)| \end{aligned}$$
(3)
$$\begin{aligned} {X}(t+1)= {X_p}(t) - {A} . { D} \end{aligned}$$
(4)

where t is the current iteration, \( {A}\) and \( {C}\) are coefficient vectors, \( {X_p}\) is the vector of the prey position, and \( {X}\) indicates the vector of the grey wolf position. \( {A}\) and \( {C}\) vectors can be calculated as shown in Eqs. (5), (6).

$$\begin{aligned} {A}= 2 {a} . {r_1} - {a} \end{aligned}$$
(5)
$$\begin{aligned} {C}=2 . {r_2} \end{aligned}$$
(6)

where components of a are linearly decreased from 2 to 0, over the course of iterations and \(r_1\), \(r_2\) are random vectors in [0, 1]. To mimic the hunting process of grey wolves, assume that the \(\alpha \) (the best candidate solution), \(\beta \) and \(\delta \) have a superior knowledge about the possible position of prey. So, the best obtained three solutions are saved so far and force other search agents (including \(\omega \)) to update their positions according to the position of the best search agents. To update the grey wolves positions, Eqs. (79) are being applied [17, 18].

$$\begin{aligned} {D_{\alpha }}=| {C_1} . {X_{\alpha }} - {X}| , {D_{\beta }}=| {C_2} . {X_{\beta }} - {X}| , {D_{\delta }}=| {C_3} . {X_{\delta }} - {X}| \end{aligned}$$
(7)
$$\begin{aligned} {X_1}= {X_{\alpha }} - {A_1} . ( {D_{\alpha }}) , {X_2}= {X_{\beta }} - {A_2} . ( {D_{\beta }}) , {X_3}= {X_{\delta }} - {A_3} . ( {D_{\delta }}) \end{aligned}$$
(8)
$$\begin{aligned} {X}(t+1)=\frac{ {X_1} + {X_2} + {X_3}}{3} \end{aligned}$$
(9)

GWO can be summarized by steps shown in Algorithm 2.

figure b

Details of the Proposed GWO-SVMs Hybrid Approach The input are training dataset feature vectors and their corresponding classes, GWO initialized parameters, whereas the output is the optimal SVMs parameters and the action name of each sample in the testing dataset. SVMs was trained and tested using different kernel functions (multilayer perceptron (MLP), radial basis function (RBF), and polynomial) and a 3 folds cross-validation. Details of the proposed approach is shown at (Fig. 2).

Fig. 2
figure 2

Proposed GWO-SVMs optimized classification approach

4 Experimental Results

Simulation experiments in this article are done considering the (EMG Physical Action Dataset) that was downloaded from UCI-Machine Learning Repository [19]. This dataset includes 10 normal and 10 aggressive physical actions that measure the human activity. The data have been collected using the Delsys EMG wireless apparatus. In this research, a dataset of only 3 subjects is used. They used a total of 8 electrodes, which corresponds to 8 input time series one for a muscle channel (ch\(1{-}8\)). Also, simulation experiments in this research used a dataset of total 900 (3 subjects * 20 experiments * 15 actions per experiments) instances of actions for both training and testing datasets with 3-fold cross-validation. Training dataset is divided into 20 classes representing the different normal and aggressive actions. Normal actions are bowing, clapping, handshaking, hugging, jumping, running, seating, standing, walking, waving, while aggressive actions are elbowing, frontkicking, hamering, headering, kneeing, pulling, punching, pushing, sidekicking, slapping. The proposed GWO-SVMs approach has been implemented considering the One-against-One multi-class SVMs system to select the best parameters for SVMs penalty cost parameter, which varied between (1 and 1000) and kernel functions parameters. Different kernel functions have been tested. The most popular kernel functions are:

  • Gaussian radial basis function (RBF): \(\sigma \) parameter varied between (1 and 100).

    $$\begin{aligned} k(x, y) =exp^{(-\frac{||x-y||^2}{2\sigma ^2})} \end{aligned}$$
    (10)
  • Polynomial function: d degree paramete varied between (1 and 10).

    $$\begin{aligned} k(x, y) =( x^Ty + 1)^d \end{aligned}$$
    (11)
  • Multi layer perceptron (MLP) function: \(\alpha \) varied between (1 and 100), while \(c_1\) varied between (\(-50\) and \(-1\)).

    $$\begin{aligned} tanh(\alpha x^Ty+c_1) \end{aligned}$$
    (12)

The accuracy of the proposed system can be calculated using this equation:

$$\begin{aligned} Accuracy=\frac{Number\,of\,correctly\,classified\,samples}{Total\,number\,of\,testing\,samples}*100 \end{aligned}$$
(13)

Figure 3 shows classification accuracies obtained via applying the proposed hybrid GWO-SVMs against SVMs classification approaches, using one-against-one multi-class approach and 3-fold cross-validation.

Fig. 3
figure 3

Results of GWO-SVMs and SVMs kernel functions using one-against-one multi-class approach and 3-fold cross-validation

It is noticed from (Fig. 3) that accuracy achieved by SVMs MLP kernel function without GWO optimization is very low and equals to 48.33 %, while it achieved an accuracy of 64.1 % using GWO-SVMs, which means that the accuracy increased by \(\approx \)15.77 %. For RBF kernel function, it is noticed from (Fig. 3) that by trying different values for \(\sigma \) parameter, the accuracy change significantly. Accuracy changed from 40.44 to 79.56 % without optimization, while it has increased to 90.78 % using GWO-SVMs proposed approach. Finally, for polynomial kernel function, an accuracy achieved without optimization changes from 65.78 to 78.44 %, while it has increased to 81.44 % using GWO-SVMs.

5 Conclusions and Future Work

This paper proposes a hybrid optimized classification model for EMG signals classification. The proposed system implements grey wolf optimizer (GWO) combined with support vector machines (SVMs) classification algorithm in order to improve the classification accuracy via selecting the optimal settings of SVMs parameters. Obtained experimental results showed that the proposed GWO-SVMs classification system has outperformed the typical SVMs classification algorithm via achieving an accuracy of over 90 % using the radial basis function (RBF) kernel function. Also, experimental results showed that trying different values for the \(\sigma \) parameter of the RBF kernel function positively changed the accuracy in a significant way. That is achieved accuracy changed from 40.44 to 79.56 % without applying GWO optimization algorithm, then increased to 90.78 % using GWO-SVMs proposed approach. For future work, it is planned to enhance the system proposed in this paper in order to be widely considered in many clinical and engineering applications. Performance enhancements will be achieved via considering other bio-inspiring optimization algorithms and more effective features. Features selection techniques will be considered, in order to improve system performance.