Sunteți pe pagina 1din 5

Med. Eng. Phys.

20 (1998) 211215

Technical Note

An algorithm for detecting the onset of muscle contraction by EMG signal processing
Silvestro Micera, Angelo M. Sabatini*, Paolo Dario
Advanced Robotics Technology and Systems Laboratory (ARTS-Lab), Scuola Superiore SantAnna, Via Carducci, 40 56127 Pisa, Italy Received 7 March 1997; accepted 2 February 1998

Abstract The Generalized Likelihood Ratio (GLR) test is proposed for estimating the time instant of muscle contraction onset via electromyographic (EMG) signal processing. In contrast to commonly used threshold-based estimation methods, the proposed algorithm proves to be reasonably accurate even for low levels of EMG activity; the improved behaviour of the GLR test comes with just a modest increase in the computational complexity. A set of computer simulation experiments are presented, where the proposed algorithm and two different threshold-based estimators are studied; also, we discuss the results of analysing the EMG recordings of selected proximal muscles of the upper limb in a hemiparetic subject. 1998 IPEM. Published by Elsevier Science Ltd
Keywords: EMG signal; Statistical signal processing; Control of assistive devices

1. Introduction In clinical research, EMG signals are often proposed to permit the control of several prosthetic and orthotic devices. [14] Generally, the activation of different muscles is involved in controlling the external device. The device controller is thus engaged in the following tasks based on processing the EMG signals: (a) accurate identication of the time instant when the muscle goes from the relaxed state to the contracted state (onset detection), (b) feature extraction based on the segmented signals, and (c) pattern classication, e.g. understanding the volitional motion of the user and hence the function to be executed by the device. In this paper we address the problem of detecting the contraction onset. A survey of the state-of-the-art of computerized methods for the determination of the onset of EMG activity shows that the basic algorithm involves identication of the point where the mean of a specied number of samples exceeds the baseline activity level (averaged for a given period of time prior to the movement starting) by a specied number of standard deviations. [5] The implicit assumption underlying most methods is that the EMG signal power relative to a contracted mus-

* Corresponding author.
1350-4533/98/$19.00 1998 IPEM. Published by Elsevier Science Ltd PII S 1 3 5 0 - 4 5 3 3 ( 9 8 ) 0 0 0 1 7 4

cle is much greater than the EMG signal power when the same muscle is relaxed. Several variants of the same principle are reported for limb movement analysis. [6,7] In the following, we shall consider two different methods, henceforth referred to as algorithm A, [8] and algorithm B, [9] that have been reported as processing modules of EMG-based controllers for articial limbs. Algorithm A starts with estimating the mean 0 and the standard deviation 0 of the EMG signal when the muscle is relaxed; the onset of contraction is assumed to occur when three consecutive samples are greater than a threshold level depending on 0 and 0. Only when the standard deviation 1 of the contracted muscle is signicantly higher than 0, may the detection latency be kept within acceptable limits. As for algorithm B, the time integral of the rectied EMG signal is computed over a window of samples and then compared to a suitably chosen threshold. The proposed assumption concerning the signal powers may not be valid for subjects with somewhat reduced muscle functionality, or relatively high background activity. In other words, when the signal-to-noise ratio = 1/ 0 is close to unity, the severe performance degradation of either algorithms A or B motivates the search for more sophisticated statistical methods. [5] We cast the detection of contraction onset as a problem of hypothesis testing, and for its solution we propose to use

212

S. Micera et al. / Medical Engineering & Physics 20 (1998) 211215

the GLR test, [10] an algorithm that has been originally introduced to study abrupt changes of time-varying linear systems. [11] In this paper we also refer to this method as algorithm C.

between false alarms and delayed detections, namely the two types of errors occurring with any hypothesis testing procedure. [12] The decision function is easily computed in a recursive fashion as follows: DF(0,1,yn) = max 0,DF 0,1,yn1 + log 0 0 p1(y[n]) p0(y[n]) . (6) In the context of the problem of interest in this paper, the PDFs concerning the null hypothesis H0 and the hypothesis H1 are parameterized in terms of two parameter vectors 0 and 1, respectively. A very useful approach consists of maximizing the log-likelihood ratio over 1 and r, yielding the GRL test: DF(0,1,yn) = 0 max 0 r n max
1 n

2. Theory Suppose that a series of observations y = [y[k],,y[l]] are available; a set of m hypotheses Hj, j = 0, , m 1 provides the statistical description of these observations in terms of corresponding probability density functions (PDF) pj (ylk), j = 0, , m 1. Detecting the contraction onset in our application reects the existence of two hypotheses, namely the null hypothesis H0, with PDF p0(y[t]), and the hypothesis H1, with PDF p1(y[t]); H0 is related to the relaxed state, while the hypothesis H1 is related to the contracted state of a muscle. Initially, assume that the hypothesis H0 is true. Then, for every time instant r from 0 to n, the probability that the observations are generated by the hypothesis H0 from time 0 to r 1, and by the hypothesis H1 from time r to n is:
l k

log
t=r

p1(y[n]) p0(y[n])

(7)

(0,1,r,yn) = p0(yr1)p1(yn). 0 0 r

(1)

On the other hand, the probability that the whole series of observations are generated according to the hypothesis H0 is given by: (0,yn) = p0(yn). 0 0 (2)

If 0 is also partially unknown, the test may include more maximizations. We assume that p0, and hence 0, are known. In the important case that pi(y[t], i) are both Gaussian, and the mean 1 and the variance 2 of p1(y[t], 1) 1 are unknown, applying the GLR test leads to the following estimates for the components of the unknown parameter vector 1: 1(r,n) = and: 2(r,n) = 1 1 nr+1
n

1 nr+1

y[k],
k=r

(8)

It is customary to refer to () as the likelihood function; [12] if the random variables y[t] are independent and identically distributed, the likelihood ratio then becomes: (0,1,r,y ) p0(y )p1(y ) = = (0,yn) p0(yn) 0 0
n 0 r1 0 n r n t=r

(y[k] 1(r,n))2.
k=r

(9)

p1(y[t]) . p0(y[t])

(3) 3. Results 3.1. Computer simulation experiments Several computer simulation experiments are conducted to compare the performances of algorithms A, B and C. The raw EMG signal is synthesized by juxtaposing two signal sequences, lasting T0 = 200 ms and T1 = 400 ms, respectively; the assumed sampling rate is fs = 1 kHz. Both sequences are obtained by applying white Gaussian noise with zero mean, e.g. 0 = 1 = 0, to FIR lters of the fourth order. The lter coefcients are obtained from applying autoregressive parametric modelling techniques to real EMG signals (see next section). For the rst sequence, the modelling is performed when

The decision function (DF) is the maximum of the log-likelihood ratio in Eq. (3) over the possible transition times r: DF(0,1,yn) = 0 max r [0,n] log (0,1,r,yn) 0 , (0,yn) 0 (4)

leading to the following binary rule: H1 DF(0,1,y ) H0 The decision threshold controls the trade-off
n 0

(5)

S. Micera et al. / Medical Engineering & Physics 20 (1998) 211215

213

the muscle is in its relaxed state; the standard deviation is then settled to 0 = 10 mV. The second sequence is intended to simulate the behaviour of a contracted muscle. The standard deviation 1 of the second sequence is varied in steps, so as to cover a quite broad range of signal-to-noise ratios = 1/ 0. The task of the tested algorithms is to detect the abrupt change occurring at time D = 200 ms. The results are reported in terms of the latency = , e.g. the difference between the onset estimates provided by the algorithms and the true onset in ms. The initial time step for all algorithms is Do = 50 ms; the algorithms consume the data samples up to Do for estimating the mean and standard deviation of the EMG signal in the relaxed state of the muscle, e.g, 0 and 0. These estimates are all that algorithm A requires for computing the threshold ( A = 3 0). Conversely, the threshold settings for algorithms B and C depend on the actual value of , which is unknown; however, threshold values B* and C* may be found so that the latency in detecting the hypothesis change is kept within reasonable limits in a broad interval of signal-to-noise ratios. Figures 1 and 2, that are produced by an ensemble averaging of N = 150 simulation runs, report the behaviour of the onset latency as a function of the settled threshold , for different values of (algorithms B and C). The same false alarm rate is obtained for both methods in the case that B* = 550 mV and C* = 8. Finally, Fig. 3 gives the latencies produced by algorithm C as a function of . It should be pointed out that the simulation model described suffers from the possible limitation that the real EMG signal cannot be accurately modelled by Gaussian noise when only a few motor units contribute to the gross EMG signal, e.g. in the important case that the

Fig. 2. Estimated latency as a function of the detection threshold, for different values of (algorithm C). Continuous line: = 1.25; dashed line: = 1.5; dotted line: = 2; dashdot line: = 2.5.

Fig. 3.

Estimated latency as a function of

* = 8).

signal-to-noise ratio is low. On the other hand, the GRL test can be implemented with ease when the underlying distributions are assumed to be Gaussian. We retain henceforth the Gaussian assumption, and compare the performance of the three described methods when applied to real-life EMG signals in conditions of low signal-to-noise ratios. 3.2. An experiment using real EMG signals We illustrate the results of one experiment where the methods are applied to detect the onset of muscle contraction during a frontal grasp of the right upper limb; the movement is performed by three male subjects who are affected by hemiparesis on the right side. The subjects are asked to repeat the same movement ve times. The EMG signals are sampled using the multi-channel

Fig. 1. Estimated latency as a function of the detection threshold, for different values of (algorithm B); the window for computing the rectied EMG signal integral is N = 10 sample wide. Continuous line: = 1.25; dashed line: = 1.5; dotted line: = 2; dashdot line: = 2.5.

214

S. Micera et al. / Medical Engineering & Physics 20 (1998) 211215

Fig. 4. EMG recording of the anterior deltoid muscle and time history of the elbow extension angle (subject MS).

Fig. 6. An example of EMG recording during a frontal grasp (posterior deltoid muscle). Table 1 Performance results for subject MS Muscle Algorithm A 10 1.25 25 24 240 265 Algorithm B 30 10 276 274 Algorithm C 22 11 140 145

myograph incorporated in the motion analysis system ELITE (Bioengineering Technology & Systems, B.T.S., s.r.l., Milan, Italy); the EMG measured signals are bandpass-ltered (10600 Hz) and amplied by 1000 and then sampled at fs = 1 kHz, with twelve digitizing bits; an acquisition period t = 3.5 s is considered. The ELITE system also allows to acquire the arm kinematic trajectories, and to provide the information concerning the time instant when the limb movement effectively starts, [13] (see Fig. 4). The experiment herein described relies on the same protocol we adopt in the context of a currently undergoing research project [14], Figs 5 and 6 report the pattern of activation concerning the anterior deltoid and the posterior deltoid, respectively, for subject MS. We note that, for this particular subject, the state of activation of the anterior deltoid is well above the back-

Anterior deltoid Posterior deltoid

Table 2 Performance results for subject MF Muscle Algorithm A 12 1.5 19 15 160 167 Algorithm B 23 22 142 184 Algorithm C 22 30 70 85

Anterior deltoid Posterior deltoid

Table 3 Performance results for subject MR Muscle Algorithm A 13 1.25 17 13 160 40 Algorithm B 40 20 165 50 Algorithm C 26 25 50 40

Anterior deltoid Posterior deltoid

Fig. 5. An example of EMG recording during a frontal grasp (anterior deltoid muscle).

ground EMG activity of the same muscle in the relaxed state ( 10); on the contrary, the posterior deltoid 1.25). The data activity is much less pronounced ( obtained from subjects MF, and MR exhibit a similar behaviour. Tables 13 report the mean of the estimated latencies for each algorithm and each muscle, with the corresponding -value; the intervals around the averages given in the tables correspond to the standard deviation on either side.

S. Micera et al. / Medical Engineering & Physics 20 (1998) 211215

215

The ANOVA analysis reveals that, for each subject, the differences between the latency produced by algorithm C and the latencies produced by its competitors are statistically signicant when the -value is low; differences are considered important if the condence level is greater than 95% (P 0.05). Conversely, the differences at high -values are never statistically signicant. According to the results of the ANOVA analysis, moreover, the performances of algorithms A and B are not statistically signicant regardless of the actual -value.

References
[1] Graupe D, Cline WK. Functional separation of EMG signals via ARMA identication methods for prothesis control purposes. IEEE Trans. Syst. Man Cybern. 1975;SMC5(2):2529. [2] Graupe D, Salahi J, Kohn KH. Multifunctional prothesis and orthosis control via microcomputer identication of temporal pattern differences in single-site myoelectric signals. J. Biomed. Engng 1982;JBE4:1722. [3] Kelly MF, Parker PA, Scott RN. The application of neural networks to myoelectric signal analysis: a preliminary study. IEEE Trans. Biomed. Engng 1990;BME37(3):22130. [4] Zardoshti-Kermani M, Wheeler BC, Badie K, Hashemi RM. EMG feature evaluation for movement control of upper extremity prostheses. IEEE Trans. Rehab. Engng 1995;RE3(4):32433. [5] Hodges PW, Hui BH. A comparison of computer-based methods for the determination of onset muscle contraction using electromyography. Electroenceph. Clin. Neurophysiol. 1996;ECN 101:5119. [6] Di Fabio RP. Reliability of computerised surface electromyography for determining the onset of muscle activity. Phys. Ther. 1987;PT67:438. [7] Bogey RA, Barnes LA, Perry J. Computer algorithms to characterize individual subject EMG proles during gait. Arch. Phys. Med. Rehab. 1992;APMR73:83541. [8] Latwesen A, Patterson PE. Identication of lower arm motions using the EMG signals of shoulder muscles. Med. Engng Phys. 1994;16(1):11321. [9] Parker P, Hudgins B, Scott RN. A new strategy for multifunctional myoelectric control. IEEE Trans. Biomed. Engng 1993;BME40(1):8294. [10] Van Trees HL. Detection, estimation, and modulation theory-Part I. New York: Wiley, 1968. [11] Willsky AS, Jones HL. A generalized likelihood ratio approach to the detection and estimation of jump in linear systems. IEEE Trans. Auto. Control 1976;AC21(1):10812. [12] Siegmund D. Sequential analysis: tests and condence intervals. New York: Springer, 1985. [13] Cheron G, Draye J-P, Bourgeios M, Libert G. A dynamic neural network identication of electromiography and arm trajectory relationship during complex movements. IEEE Trans. Biomed. Engng 1996;BME43(5):5528. [14] Micera S, Sabatini AM, Dario, P. On automatic identication of upper limb movements using small-sized training sets of EMG signals. Submitted to IEEE Trans. Rehab. Engng.

4. Conclusions The computer simulation experiments together with the results of processing real EMG signals prove that the conventional methods for detecting the muscle contraction onset are reasonably accurate when the difference between EMG signal powers in the relaxed and in the contracted state are relevant. Otherwise, anomalously late detections are to be expected. On the other hand, the proposed GLR test performs well even in the critical conditions where the residual muscle activity is quite poor. Interestingly, the computational complexity of the GLR test is not so high as to preclude the opportunity to operate close to real-time conditions.

Acknowledgements The authors acknowledge the scientic advise provided by Professor Bruno Rossi, Director of the Department of Neurosciences, Faculty of Medicine, University of Pisa; the technical assistance of the clinical staff at the same Department is also deeply acknowledged. This work is supported in part by funds from INAIL (Istituto Nazionale Assistenza Infortunati sul Lavoro), Rome, Italy.

S-ar putea să vă placă și