{'fraction_non_alphanumeric': 0.03902347505921531, 'fraction_numerical': 0.012663868108158814, 'mean_word_length': 4.723758389261745, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Fast EMG-Based Algorithm for Upper-Limb Motion Intention Detection by Using Levant’s Differentiators

Electromyography (EMG) signals are widely used for predicting human movement intention in the operation of robotic assistive devices that improve the quality of people’s lives with motor problems. One of the current challenges controlling such devices is achieving a natural interaction between the device and the user. However, the most common algorithms applied in motion detection exhibit a slow time response. In this work, we propose the use of robust differentiator algorithms to extract features from EMG signals that allow a fast detection of movement intention. Experimental results show that by using robust differentiator algorithms, we can significantly reduce the latency between the detection movement intention and the real movement, without losing accuracy.


I. INTRODUCTION
According to the World Health Organization (WHO), more than one billion people live with some form of disability; this represents around 15% of the world population. Likewise, 3.8% of people over 15 years have significant difficulties functioning in society and often require healthcare services. The number of people with disabilities is growing, partly due to the population aging and the increase in chronic health problems [1]. In addition, life expectancy continues to improve; therefore, the number of old people is expected to increase [2]. Among the different types of disabilities, movement disorder can dramatically reduce people's quality of life. One possibility to improve mobility capacity or to assist people with motor problems is through robotic devices and rehabilitation systems, such as prostheses, exoskeletons, or robotic orthosis. The advances related to these devices have rapidly increased over the last few years due to great scientific and technological developments. However, despite the significant advances, there are still some challenges related to the The associate editor coordinating the review of this manuscript and approving it for publication was Shihong Ding . design of controllers that allow a natural operation by the user. In recent years, different approaches have been proposed; a well-consolidated, non-invasive approach is the design of control assistive devices whose control is performed based on electromyographic (EMG) signals, since the muscle signals correlate with the user's movement intention [3], [4], [5]. However, the existing methods for processing EMG signals add a significant latency between the user's command and the device's movement, which results in a non-smooth nonnatural device operation.
In detail, a myoelectric control system estimates the user's movement intention from EMG signals and uses this information to control the activation of the device [6], [7]. Fig. 1 shows a typical control scheme of a robotic orthosis for the upper limb, based on EMG signals. First, the user's EMG signals are obtained through surface electrodes. These signals are processed by the motion detection block, which consists of three stages 1) pre-processing, 2) feature extraction, and 3) detector. The pre-processing stage removes undesired signal components, such as noise or motion artifacts. Then, in the feature extraction stage, characteristic features are extracted from the EMG signals, such as signals intensity and main frequencies. The detector algorithm uses this information to decode the user's movement intention. Finally, the output from the motion detection block is transferred to a control algorithm to actuate the robotic orthosis.
The performance of the motion detection block largely depends on the selected feature extraction method [6]. In the literature, different methods to extract characteristics from EMG signals have been reported, which can be classified into three categories: frequency domain, time-frequency domain, and time domain, each of which describes different components of the EMG signals [4], [6], [8]. The most used feature extraction in the frequency domain are: power spectral density (PSD) [9], mean frequency (MNF) [10], [11], median frequency (MDF) [10], [11] and frequency ratio (FR) [10]. The main disadvantage of these feature extraction methods is that it is impossible to know when a particular event occurs, since the time domain information of the signal is lost. Therefore, these methods will not be effective for analyzing EMG signals in a dynamic movement, as it requires the EMG signals to be stationary [8]. The most used feature extraction methods in the time-frequency domain are: Shorttime Fourier transform (STFT) [12], discrete wave transform (DWT) [10], [13], packet transform of waves (WPT) [12], and standing wave transform (SWT) [12]. The time-frequency domain characteristics provide an accurate description of the physical phenomenon; however, these features are obtained through local stationarity, i.e., signals are assumed to be stationary within a time window [8], which causes a delay in the movement detection depending on the length of the window. Feature extraction in the time domain is the preferred class of methods used for processing EMG signals [4], [6], [7], [14]. The most frequently used feature extraction methods in this domain are: mean absolute value (MAV) [10], [15], [16], [17], [18], [19], root mean square (RMS) [4], [6], [11], [20], [21], zero-crossing (ZC) [4], [10], [19], [22], variance (VAR) [10], [22], mean absolute difference (MAD) [23], and slope sign change (SSC) [19]. One of the advantages of these feature extraction methods is the simplicity of its implementation; however, they are susceptible to noise and artifacts. Hence, features are calculated as the average over a time window. The window length must be large enough since the EMG signal variance decreases as the length of the window increases [6]. Therefore, the obtained feature signals arise after a processing delay depending on the length of the time window. In all the cases, the main metric for measuring the schemes success is the classification results accuracy [6]. However, in addition to the classification accuracy, the response time is also crucial for controlling a system based on EMG. Nevertheless, the latency effect has not been properly studied in the literature.
In this work, we address the problem of movement intention detection latency named time delay (TD), which is defined as the time elapsed between the detection of the movement intention from the EMG signal and the actual movement of the limb. To be acceptable for real-time operation, the response time of the control system must not create a delay that the user perceives during the operation. To exemplify this, figs. 2(a) and 2(b) show the outputs of a couple of motion detection algorithms from EMG signals from the biceps muscle. A classification output value above 0.5 means that the muscle is contracting (e.g., producing arm flexion movement), and a value below 0.5 means that the muscle is relaxed (e.g., the arm is not moving). The vertical dashed lines indicate the start of the real arm movement, detected by an encoder, positioned on the user's elbow. The algorithm of fig. 2(a) detects movement intention after the real movement, since this algorithm uses a time window to deal with noise effects. If this method is used as the input to a controller, the user would always perceive a delay no matter how fast the controller is. On the other hand, the algorithm of fig. 2(b) detects the movement start before the real limb movement. This is possible since the EMG signal is produced about 50-100 ms before the actual movement occurs [4]. Thus, using this signal as an input to a control system, it is possible to perform a smoother and more natural control, i.e., the system's delay will not be perceived by the user.
As a contribution of this work, we propose the use of robust differentiator algorithms [24], [25] to obtain features from EMG signals to detect the user's movement intention. In particular, we consider two key features: 1) the estimate of the absolute value of the EMG signal without noise provided by the differentiator, and 2) the estimate of its first derivative. Our hypothesis is that these signals are sufficient to obtain an accurate movement detection, avoiding the addition of latency. Compared to other feature extraction methods, the main advantage of using a robust differentiator algorithm as an EMG feature extraction method is the lack of latency between the limb movement and the movement detection by the algorithm, without compromising the classification accuracy. Other existing methods always produce a delay between the limb movement and the movement detection by the feature extraction algorithm, since existing methods involve averaging over a time window to deal with the high noise present in the EMG signals. However, robust differentiators do not need such averaging, providing an estimate of the signal and its derivative without delay, resulting in a novel time-domain feature extraction method. Our final objective is to decrease the latency between the algorithm's motion intention detection and the real movement (as performed in fig. 2(b)) to obtain a smoother and more natural control for the users.
In recent years, several researchers have proposed robust differentiator algorithms for the computation of derivatives of a given noisy signal in real-time based on Sliding Mode Control (SMC). A particular technique of interest was proposed by Levant [25], which is based on the Super-Twisting Algorithm, being robust against the presence of noise. Other authors have proposed related algorithms with finite-time convergence (see for instance [26]). In recent years, researchers have focused on the design of differentiators and observer algorithms whose convergence occurs before a given time upper-bound, independently of the initial conditions of the generator, leading to algorithms with fixed-time convergence [27], in which the convergence time is uniformly upper bounded [28], [29]. Other formulations have been recently proposed in which the differentiators converge in a given prescribed-time (also called predefinedtime) [30], [31], [32]. To the best of our knowledge, the Levant's algorithms have not been used for detecting movement intention based on EMG signals. Thus, the novelty of the proposed motion detection scheme is the use of the Levant's differentiators for processing raw EMG signals. Through experiments, we will show that using Levant's algorithms allows an almost instantaneous detection of the movement intention, while the existing methods in the literature introduce latency in this process. In this exploratory work, we will focus on the Levant's differentiator (LD) [25] and the recent Levant's filter differentiator (LFD) algorithms, [24] as a novel approach to detect movement intention through EMG signals.
This paper is organized as follows. Section II introduces the proposed method for feature extraction of EMG signals based on robust differentiators, the use of these features for the classification of movement intention, and the description of the conducted experiment. Section III presents the results of the experiments performed to evaluate the accuracy and latency of the proposed method, including a comparison to other well-known methods. Finally, some conclusions and future work are given in Section IV.

A. EMG-BASED DETECTION OF MOVEMENT INITIATION
The key factor for controlling devices based on EMG signals is the ability to decode the intention of the user's movement from these signals. Therefore, in order to use such devices VOLUME 10, 2022 effectively in real-time life scenarios, it is necessary to design robust models that can achieve a reliable and fast motion detection. The movement intention decoding scheme proposed in this work consists of two stages (motion detection block in fig. 1): 1) Feature extraction and 2) Detector (motion intention detection algorithm). A pre-processing stage is not required in this proposal since the robust differentiator algorithms provide an estimation of the absolute value of the signal without noise from the raw EMG signal. The role of the feature extraction is to obtain key information from the raw input signals. This key information is described as a vector of variables whose values are sufficient (and desirably minimal) to distinguish whether the current signal corresponds to one class or another (in this work, the EMG signals pattern corresponds to movement or no movement). The classification algorithm (the detector) then takes the feature vector to compute a prediction of the corresponding class.

B. FEATURE EXTRACTION BASED ON LEVANT's DIFFERENTIATOR ALGORITHMS
Raw EMG signals are contaminated with large noise. In order to obtain useful information, a feature extraction technique must be used to transform the raw input signals into a vector of useful data [33]. This stage is one of the most critical steps to decode the motion intention since it emphasizes the most relevant characteristics of the signal [34]. The contribution of this work is the proposal of the use of the Levant's differentiator (LD) and the Levant's filter differentiator (LFD) algorithms as feature extraction methods. Both LD and LFD algorithms are based on high-order sliding mode control algorithms [25]; they represent a valuable approach to estimate the input signal's derivatives in the presence of noise, being exact in the absence of noise. The LFD is an improvement of LD, developed to reject large noises more effectively [24].
The LD is presented as follows [25]: Given a signal f (t) to differentiate, the 2nd differentiator is given by the dynamical system where z 0 estimates the signal to be differentiated without noise, z 1 is the estimate of its first derivative and z 2 is the estimate of its second derivative, λ 1 , λ 2 and λ 3 are parameters to be adjusted, and the initial conditions are set as z 0 (0) = 0, z 1 (0) = 0 and z 2 (0) = 0. The LFD is presented as follows [24]: Given a signal f (t) to differentiate, the 3rd order filtering -2nd order differentiator is given by the dynamical system where z 0 estimates the signal to be differentiated without noise, z 1 is the estimate of its first derivative, z 2 is the estimate of its second derivative, λ 1 , λ 2 , λ 3 , λ 4 , λ 5 and λ 6 are parameters to be adjusted, and the initial conditions are set as In both algorithms, the signal to be differentiated f (t) is the absolute value of the EMG signal provided by the acquisition system (i.e., without pre-processing). The algorithms are implemented in discrete time by using a regular sampling dt that coincides with the sampling of the obtained EMG signals (dt could be any multiple of the sampling of the obtained EMG signals, however, the lower dt the better the performance of the LD and the LFD). For this, the Euler method is used as suggested in [25]. Then, the discretization of the LD is The discretization of the LFD is To achieve the estimation in both cases, an appropriate choice of the parameters λ n is required. The optimal adjustment of the LFD and LD is still an open problem, a non-trivial one. Levant proposes some parameters in his paper [24]. However, it is known in the community that such parameters require adjustments depending on the nature of the signals, noise, and sampling frequency. In our experience, we have found the following patterns: 1) we suggest to fulfill with λ 1 < λ 2 < λ 3 , and for the LFD we also suggest λ 4 > λ 5 > λ 6 ; 2) good parameters are frequently in the range 8 ≤ λ 5 ≤ 21 and 2 ≤ λ 6 ≤ 15. For tuning, we proceed by first adjusting the parameters to visually obtain a good tracking for z 0 (i.e., z 0 must track the average of the absolute value of the EMG signal). Next, we make fine adjustments to visually verify that z 1 represents the first derivative of the absolute value of the EMG signal. The shortcoming of these methods is that they require a proper adjustment of the parameters λ and a high sampling frequency.
For both algorithms, one differentiator is defined for each EMG channel, i.e., each muscle (e.g., biceps, triceps,. . . ). Next, the estimations z 0,k , z 1,k of each channel are arranged to form the feature vector at time k. For instance, given an acquisition setting with m channels, the feature vector at time instant k is given by where z i 0,k and z i 1,k denote the estimates of the absolute value of the EMG signal of the i-th channel and its derivative, provided by either the LD or the LFD, and x k is the 2m-dimensional feature vector.

C. COMMON FEATURE EXTRACTION METHODS
To assess the precision of the proposed methodology, we compare our results with other common time-domain feature extraction methods, such as mean absolute value (MAV), root mean square (RMS), variance (VAR), mean absolute difference (MAD), and zero crossing (ZC). All these features were computed based on a time window. In the following, f j k denotes the EMG signal of channel j (muscle j) at sampling k, and L denotes the number of samplings in the time window.
The MAV of channel j is defined as The RMS of channel j is defined as The VAR of channel j is defined as The MAD of channel j is defined as wheref j k is the mean value in the time window. The ZC is a frequency measurement that can be obtained by counting the number of times the signal crosses zero.
A threshold ε is included to reduce the noise effect. Then, the ZC of channel j is given by In all cases, the feature vector, considering m channels, is then defined as The recognition of movement intention based on robustdifferentiator features computed from the ongoing EMG signals can be achieved by using a supervised classification algorithm [34], [35]. A common and robust classifier, used in diverse applications of bioelectrical signals, is the Support Vector Machine (SVM) model, developed by Vapnik and Chervonekis. Details of the method can be found in the literature [15].
In the SVM algorithm, the input data is a p-dimensional vector, denoted here as x, describing distinctive features (variables). Different data inputs are then represented as points in R p . Given a training data set, each i-th data input is labeled as y i = 1, if it is associated with the first class (e.g., movement intention) or as y i = −1, if it is associated with the second class (e.g., rest or no-movement). A p-dimensional hyperplane is computed in such a way that the points associated to y i = 1 lie on one side of the hyperplane, and the points associated to y i = −1 lie on the other side. Nevertheless, in the general case, the training data set is not entirely linearly separable. In such a case, a transformation strategy is adopted, i.e., a function φ : R p → R r is defined that takes data points from the input space (R p ) and map them into a higher-dimensional space (R r ), next the separation hyperplane is defined in the new space where the transformed data becomes linearly separable. The separating hyperplane is defined as a variety with ω being an r-dimensional row vector called discriminant vector, and b is a scalar called bias term. Note that ω and b are parameters that must be learned (i.e., adjusted) from the training data set. The hyperplane that exhibits the maximum distance from the transformed data points (on the correct sides) is called the optimal hyperplane, which can be computed with the following Quadratic Programming Problem (QPP): where s is the number of data points, α i are Lagrange multipliers, C > 0 is a constant, and K (x i , x j ) is called kernel function that is interpreted as the product φ(x i ) T ·φ(x j ). In this work we use as kernel the Radial Basis Function (RBF), which is defined as where γ = 1 2σ 2 and σ is a free parameter. Once the hyperplane has been trained, a data point can be classified as where y(x) = 1 means that x belongs to class 1 (e.g., movement intention), while y(x) = −1 means that x belongs to class −1 (e.g., rest or no-movement). A measure of the closeness of the data point to the hyperplane is provided by the probability class metric, defined by . P(x) ∈ [0, 1] is interpreted as the probability that the data point x belongs to class 1. This metric is also interpreted as a confidence of the classification of x as class 1. Fig. 3 shows the outputs of the classifier algorithm; the upper plot represents the data given by the encoder, which is positioned at the elbow junction. As mentioned before, the classification y(x) can take one of two possible values {−1, 1}. However, in the forthcoming figs., we will represent this variable as having a value of 1 or 2, indicating that the data instance belongs either to the non-movement class or to the movement class, respectively (see for instance fig. 3, middle plot). On the other hand, the class probability P(x), also called confidence score, is a variable in the interval [0, 1] that represents the probability that the data point belongs to the movement class; in fact, a value below 0.5 indicates that it belongs to the non-movement class, while above 0.5 indicates that it belongs to the movement class (see for instance fig. 3, lower plot).

E. EXPERIMENTS
To evaluate the performance of the proposed methods, a series of experiments were performed. The following subsections describe the experimental setting.

1) DESCRIPTION
The experiment consisted of a set of flexion-extension movements with the right arm while simultaneously recording the arm EMG signals and the elbow joint angle. Each executed movement comprised the following consecutive five phases: (i) the arm is relaxed and fully extended, pointing towards the floor, lasting 4 seconds; (ii) the elbow flexion movement is executed until reaching the maximum possible flexion, with a duration between 2 to 6 seconds; (iii) the arm is kept flexed at the maximum possible flexion position, lasting 4 seconds; (iv) the elbow extension movement is executed to return to the starting point, with a duration between 2 to 6 seconds; (v) the arm is again relaxed and fully extended while pointing towards the floor, lasting 4 seconds. The upper plot in fig. 4(a) illustrates the execution of a complete movement (i.e., a trial) with its five phases. Note that phases one and five do not contain muscle activation; thus they are defined as no-movement phases, while phases two, three, and four do contain muscle activation; thus they are defined as movement phases. The lower plot in fig. 4(a) illustrates the elbow's flexion angle as computed from the encoder during the execution of an entire movement trial.
During the experiments, the participants wore in the right arm a commercial active orthosis commonly used for rehabilitation tasks. The device purpose in the experiment was to measure the elbow position to determine the actual movement initiation (i.e., the transition time from phase 1 to phase 2) and the end movement (i.e., the transition time from phase 4 to phase 5). Fig. 4(b) shows the commercial orthosis, which consists of two links, straps, and a mechanical component to resist the elbow movement. The orthosis was modified with an encoder adapted at the orthosis elbow position to measure the elbow flexion angle (the straps and any other unnecessary mechanical components were removed). The encoder used in this work was a YUMO E6B2-CWZ3E, a rotary encoder with a 1024 resolution. The orthosis neither boosted nor offered any resistance in carrying out the flexion and extension movement of the arm, and it only weighed 0.520 kg.
For the execution of the experiments, participants were seated in a chair in front of a computer screen with the left arm resting on the left lap and the right arm relaxed and extended, pointing towards the floor (phase one). They were instructed to look at the screen and follow the instructions presented, which indicated the movement to execute according to the five sequential phases described above. The presentation of these visual stimuli was controlled by the BCI2000 software application, which was configured in the stimulus presentation mode [36]. Fig. 4(c) shows a snapshot of the experimental setup with a participant in front of the computer screen, the EMG recording system, electrodes, and the orthosis attached to the right arm.
The experiment was executed in three blocks, with three trials in each block, yielding a total of nine trials per participant. Participants were allowed to rest between blocks as long as necessary. For each block, the participant performed the three trials at three different speeds during the flexion and extension movement of the arm. The first trial was performed at a fast speed (average angular velocity of ∼1.30 rad/s), the second trial was performed at a moderate speed (average angular velocity of ∼0.65 rad/s), and the third trial was performed at a slow speed (average angular velocity of ∼0.43 rad/s), one after the other. Therefore, the total duration of fast, moderate, and slow trials, including the five phases, were ∼16 seconds, ∼20 seconds, and ∼24 seconds, respectively. The images on the computer screen controlled each participant's movements, guiding them to perform the movements at a specific time and speed. Prior to the initiation of the experiments, participants were instructed to execute the flexion and extension movement at fast, moderate, and slow speeds so they could get used to them.

2) EMG SIGNALS
The EMG signals from the right arm were recorded from the biceps brachii and the triceps brachii muscles as they are involved in the flexion and extension arm movements [37]. These two pairs of muscle are called antagonistic pairs, since one muscle (called the agonist) contracts to produce the action (e.g., biceps brachii), while the other muscle (called antagonist) stretches (e.g., triceps brachii), and thus EMG signals from both muscles are necessary to decode the movement intention. These two EMG signals were recorded using a bipolar montage with surface disposable foam electrodes (Covidien Kendall 200 series) and with the ground located at the internal part of the elbow. EMG signals were acquired, amplified, and digitalized at a sampling rate of 4800 Hz with an 8th order bandpass Butterworth filter with a frequency range of 5 − 500 Hz, and a 58 − 62 Hz notch filter using a g.USBamp amplifier from g.tec medical engineering GmbH, Austria. In addition, a g.STIMbox device (also from g.tec medical engineering) was used to obtain the digital encoder signals. The acquisition of the EMG and the encoder signals, along with the synchronization, was managed by the BCI2000 software [36]. After the execution of the experiments, recorded data was exported to MATLAB to investigate the EMG-based early movement onset detection.

3) PARTICIPANTS
To ensure the experiments are unbiased, sixteen right-handed participants of different ages (eight females and eight males; age range 18-64 years; mean 39) were recruited for this study. None of the participants presented with known neurological or motor disease. Enrolment in the experiments was voluntary, and they were informed that they could leave the session whenever they wanted. All participants provided written informed consent in accordance with the Declaration of Helsinki and were duly informed about the research goals.

4) DATA PREPARATION
The flexion angle of each trial was converted from the 8-bit binary input from the g.STIMbox device to decimal angle in MATLAB. Then, the instant time of the actual flexion movement initiation and the actual extension movement finalization were computed from the flexion angle signal as the change of slope, as shown in fig. 4(a). Consequently, we have a set of nine trials with two EMG signals and the flexion angle signal for each participant. In addition, each trial contains the two times instants of flexion movement initiation and extension movement finalization, along with a label indicating slow, moderate, or fast movement execution. No extra processing was applied to the EMG signals.

F. EVALUATION PROCEDURE
The detection of movement intention from EMG signals was carried out for each participant independently, using the VOLUME 10, 2022 Levant's differentiators (LD and LFD), mean absolute value (MAV), root mean square (RMS), variance (VAR), mean absolute difference (MAD), and zero crossing (ZC) as feature extraction methods, and Support Vector Machine (SVM) as classifier in all the cases. The complete set of nine trials from each participant was used to train and test the detection of movement intention using a 3-fold cross-validation technique. In detail, the set of trials was split into three groups of three trials each. Next, two groups (6 trials) were taken as a training data set to compute features and to tune the classification model, while the remaining group (3 trials) was used as a test data set to compute the performance metrics. This procedure was repeated three times, taking a different group as a test data set each time; thus, all trials were eventually used for testing. Note that train and test sets are always mutually exclusive.
The following steps were performed for each trial in the training set to compute and extract features. First, the feature vector x k was computed in all time instants k along the trial. However, the features corresponding to the first two seconds were discarded to avoid using noisy samples, due to the time required for the Levant's differentiator algorithms to converge. Finally, we selected the feature vectors along the trial in consecutive steps of 0.01s to construct the training data set. Here, features in time instants within phases 1 and 5 are labeled as non-movement (class 1), while features in time instants from movement initiation to movement finalization (identified with the encoder signal) were labeled as movement (class 2). For LD and LFD, the feature vector is a 4-dimensional vector, since two estimates of the Levant's differentiators (i.e., z 0 and z 1 ) are computed for each EMG channel, while the feature vector is 2-dimensional for MAV, RMS, VAR, MAD, and ZC, since one variable is computed for each EMG channel in these cases. As a result, the training data set obtained from all trials is {x i , y i }, i = 1, . . . , s, where y i ∈ {1, 2} and s is the total number of feature vectors in the dataset. To tune the classifier, the number of samples was balanced to avoid over-fitting to one of the classes. In addition, each feature in the training set was z-score normalized according to x i = (x i − µ i )/σ i , (i = 1, 2, · · · , p) where µ i and σ i are the mean and standard deviation of the i-th feature, and p is the total number of features. Note that, for each time instant k, the classifier provided the predicted class and the class probability.
To assess the effectiveness of the proposed method, the following metrics were computed: (i) accuracy of the classification (ACC), defined as the number of correct predictions divided by the total number of predictions; (ii) true negative rate (TNR), defined as the fraction of correct classifications of non-movement class; (iii) true positive rate (TPR), defined as the fraction of correct classification of the movement class; (iv) movement time delay (TD), which is defined as the time elapsed between the start of the movement, identified by the encoder, and the movement detection, i.e., the time instant at which the probability of the movement class given by the classifier is greater than 0.5; (v) receiver operating characteristic (ROC) curve, which shows the TPR as a function of the false positive rate (FPR); and (vi) area under the ROC curve (AUC), which measures the model probability to distinguishing between classes (i.e., the higher the AUC, the greater the probability that the model can distinguish between classes). All these metrics were computed for each participant and across all participants. The metric TD is essential in our work, since we are interested on developing fast detection methods for EMG-based real-time control.
To examine statistically significant differences between the classification accuracy (ACC) and the movement time delay (TD), a one-way analysis of variance (ANOVA) statistical test was carried out [38]. All significance differences were declared at a p-value < 0.05.

III. RESULTS
Here, we compare the proposed EMG-based motion detection scheme, using the Levant's differentiators, with classical schemes that use the MAV, RMS, VAR, MAD, and ZC as feature extraction algorithms. The length of the time window is a relevant parameter for computing the MAV, RMS, VAR, MAD, and ZC: a short window will allow noise to be present in the feature vector, and thus the classification performance will decrease; on the contrary, a large window will produce a significant latency. To determine the best window length, we first compare the classification ACC, TPR, and TNR metrics for the MAV method with different window lengths. Fig. 5 shows that a window of 1 second is the lowest that provides an accurate enough result.
To examine the difference between the accuracy of the classification metrics, we carried out an analysis of variance (ANOVA) test. Fig. 6(a) shows the distribution of the classification accuracy across all individuals for each method. The results showed a p-value of 1.37 × 10 −08 (F = 8.12), which indicates that there is a significant difference between the accuracy means. Indeed, the lower median accuracy was 0.82, obtained with the ZC method, while the higher median accuracy was 0.90, obtained with the RMS and LD methods.  indicating that the ZC method mean accuracy is significantly different (and lower) from the other methods. Therefore, we will discard the ZC algorithm for further analysis.
A. ACCURACY Tables 1, 2 and 3 show the average of the ACC, TNR and TPR metrics, respectively, for each participant for the six methods described in Sections II-B and II-C. Table 1 shows that the ACC of the models with the MAV, RMS, VAR and MAD algorithms is 85%, 87%, 85% and 85%, respectively. For the case of the proposed methods (LD and LFD), the overall ACC for both is 87%, which is a good value compared to the existing results in the literature [10], [34]. In more detail, the TNR metric, shown in table 2, indicates that the MAV, RMS, VAR and MAD algorithms can identify on average 83%, 85%, 85% and 83% of the data points pertaining to  no-movement. In addition, the TPR metric, shown in table 3, indicates that when the movements occur, 87%, 88%, 85%, and 87% of the data points are correctly identified as such. For the LD method, the results of TNR and TPR indicate that 84% of no-movement data points are correctly identified as no-movement, and 89% of the movement data points are correctly identified as movements. For the LFD method, the results of TNR and TPR indicate a correct identification of 85% of no-movement data points and 90% of the movement data points. As a conclusion, we can observe that the averages of the ACC, TNR, and TPR metrics are comparable to those of LD and LFD, being the LFD method slightly superior.
Moreover, fig. 7(a) shows the box plot of the ACC for the six models; as we can see, the ACC median for the LD method is 90%, and 89% for the LFD. Likewise, for the MAV, RMS, VAR and MAV methods, the ACC median is 87%, 90%, 88%, and 87%, respectively. Considering the highest ACC median value of the common feature extraction methods (i.e., the RMS method), we see no difference between the LD method, and 1% difference between the LFD model. However, if we take the lowest median ACC value among the common feature extraction methods (i.e., MAV and MAD), we observe a negative difference of 3% and 2% with respect to the LD and LFD methods, respectively. Fig. 7(b) shows the TNR metric comparison between methods; it can be observed that the highest median values are 96% pertaining to the RMS and VAR models, followed by MAV and MAD with 93% for both methods, then the LD method with 92% and finally the LFD method with 89%. In addition, fig. 7(c) shows the comparison between the six models for the TPR metric; the highest median value pertains to the LFD method with 95%, followed by LD and RMS with 93% for both; the lowest median values correspond to MAV, VAR and MAD with a median of 92% for the three methods, a negative difference of 1% and 3% with respect to the LD and LFD methods. Fig. 8 shows the area under the ROC curve of the six models, showing minor differences between them. Therefore, we observe that the medians of the ACC, TNR, and TPR metrics for the MAV, RMS, VAR and MAV methods are comparable to those of LD and LFD.

B. TIME DELAY
Regarding the time delay (TD) metric, an ANOVA test was performed on this, obtaining a p-value of 0.0003 (F = 4.72), which indicates significant differences of the TD means among the methods. Table 4 shows the obtained TD in seconds of the movement start detection for the six methods for each user. Negative values indicate that the algorithm detects the movement start before the occurrence of the actual movement, positive values indicate that the algorithm detects the movement start after the occurrence of the movement. In most of the cases, the proposed Levant's differentiator methods allow a detection before the real movements. From the box plots in fig. 9, it is evident that the LD and LFD methods are faster than the other methods. In detail, on average, the  MAV, RMS, VAR and MAD methods detect the movement start at 0.1888, 0.1446, 0.1842 and 0.1904 seconds after the real movement, respectively, whereas the LD and the LFD methods detect the movement start at 0.0068 and 0.0512 seconds before the occurrence of real movement, respectively. In fact, considering the best average TD values among the common feature extraction methods, which is provided by the RMS method, the LD and LFD methods detect the movement start 0.1514 seconds and 0.1958 seconds before the RMS method, respectively; this latency difference is huge for control applications. Therefore, these results indicate that it is possible to benefit from the electromechanical muscle delay by using robust differentiator algorithms as feature extraction methods, which is a crucial aspect for real-time controllers that use EMG signals to detect the user's movement intention.
To illustrate the performance of the feature extraction methods along the execution time, fig. 10 shows the  classification results obtained with MAV, RMS, VAR, MAD, LD and LFD methods for the same trial. The vertical dashed line represents the starting of the movement. As mentioned above, the movement detection probability with LD and LFD is faster, predicting the movement start before the actual movement. More precisely, the real movement in this particular case occurs at 5.66 seconds; LD and LFD methods detects the initial movement at 5.60 and 5.51 seconds, respectively. On the contrary, the MAV, RMS, VAR and MAD methods detect the movement start at 5.87, 5.88, 6 and 5.87 seconds, respectively.

IV. CONCLUSION AND FUTURE WORK
This work introduced a new methodology for detecting movement intention through EMG signals by using the Levant's robust differentiators (Levant's differentiator LD and Levant's filter-differentiator LFD) as feature extraction methods. VOLUME 10, 2022 Experiments were carried out in a pseudo-online manner to evaluate the accuracy and latency of these methods. Moreover, a comparison was provided against classical time-domain feature extraction algorithms, such as MAV, RMS, VAR and ZC. It was found that there is statistical mean difference between the ZC method and the other six methods (i.e., MAV, RMS, VAR, MAD, LD, and LFD). Furthermore, it was found that the accuracy of the proposed LD and LFD methods was similar to that obtained using the classical MAV, RMS, VAR, and MAD methods. However, when comparing the time elapsed between the motion detection and the occurrence of the actual movement, the proposed LD and LFD methods were significantly faster that the classical methods; in particular, the detection of the movement intention occurred about 270 ms and 360 ms before that with the MAV method. In fact, the LD and LFD algorithms allowed to detect and accurately classify the movement intention before the actual limb movement, being a crucial aspect for real-time control of robotic devices based on EMG signals.
The present results open new doors to propose new methods for detecting motion intention from biological signals. We left as future work the development of an automatic method for finding the optimal parameters for the Levant's algorithms in this application.
MAYUMI HORI URIBE (Member, IEEE) received the graduate degree in mechatronics engineering and the M.Sc. degree in electronic systems from Tecnologico de Monterrey Campus Guadalajara, where she is currently pursuing the Ph.D. degree in engineering science. Her research interests include bio-robotics, control of biological systems, and sport movements.
CARLOS RENATO VÁZQUEZ (Member, IEEE) received the M.Sc. degree in automatic control from CINVESTAV Unidad Guadalajara, Zapopan, Mexico, and the Ph.D. degree in systems engineering from the Universidad de Zaragoza, Zaragoza, Spain. He is a Professor of mechatronics with the Tecnologico de Monterrey Campus Guadalajara, Zapopan. His research interests include the analysis and control of Petri nets and hybrid dynamical systems.
JAVIER M. ANTELIS (Member, IEEE) received the graduate degree in electronics engineering from Francisco de Paula Santander University, Cucuta, Colombia, the M.Sc. degree in electronic systems from Tecnologico de Monterrey, Mexico, and the M.Sc. and Ph.D. degrees in biomedical engineering from the University of Zaragoza, Spain. He is a member of the Robotics Research Group, Technologico of Monterrey, and he leads the Neurotechnology and Brain-Computer Interface Research Laboratory (NTLab), where he has been involved in the field of quality of life technologies (QoL), brain-machine interfaces (BMI), bioelectrical signal processing, brain imaging, decoding of cognitive states from electrophysiological recordings, and instrumentation, data acquisition and embedded systems. In his research, he aims to study and to understand the electrophysiological responses and the brain electrical activity acquired with the non-invasive electroencephalogram (EEG) technique in order to develop novel solutions for people with reduced mobility and communication. Thus, he focuses on EEG-based brain-computer interfaces for movement recovery and rehabilitation. VOLUME 10, 2022