EMG-based Finger Movement Classification using transparent Fuzzy ...

Report 6 Downloads 29 Views
EUSFLAT - LFA 2005

EMG-based Finger Movement Classification Using Transparent Fuzzy System Abdelhafid Zeghbib

Frank Palis

Fathi Ben-Ouezdou

Otto-von-Guericke-Universität Magdeburg Institut für Elektrische Energiesysteme

Liris, CNRS, Versailles, France [email protected]

Postfach 4120 39016 Magdeburg Germany

[email protected] [email protected] Abstract: Myoelectric signal (MES) is the electrical manifestation of muscular contraction. The transient part of the EMG signal, which is recorded at the surface of the skin of the forearm, has been exploited to provide the recognition of three finger movements. The objective of the paper is to describe the identification procedure, based on Transparent (interpretability) Fuzzy System and accuracy, which allow the cooperation between expert rules and induced rules. An initial fuzzy rule system is generated using the statistic’s trimmed mean method [7], rather clustering, which fulfils many criteria for transparency and semantic. Redundant sets (similar fuzzy sets) are removed based on a similarity measure [15,11]. The tuning of premise and consequents of zero-order Takagi Sogeno [14] fuzzy model is obtained with Gradient descent and Least squares Estimator respectively in a combined hybrid algorithm. The obtained results are compared to the subtractive clustering [13] method. The presented method may be used for real time applications control regarding to its low computation costs and transparency.

Keywords: Dynamic systems, Zero-order TakagiSugeno Fuzzy-model, Transparent fuzzy system, Transient EMG signals, Finger classification, Ellipsoids-based input fuzzy sets initialisation, Similarity measure. 1 Introduction MES classification is one of the most difficult pattern recognition problems because there usually exist large variations in Electromyograph (EMG) features. Especially, it is difficult to extract useful features from residual muscles of an amputee [6]. The EMG signal has been used as a tool to provide advanced man-machine interfaces [16], rehabilitation of the handicapped people, functional electrical stimulation devices (FES) [3] and control commands for limb prostheses [5]. The classification problem may be divided into three steps: signal presentation, feature extraction and pattern

816

recognition. It is shown in this paper that classification performance of Finger movements depends upon method of classification. Many researches proposed several method of classification that showed good performance [9], [2], [4], [10].

2 EMG Signals pre-processing Surface muscle activity signals cannot be analysed using classical methods, since they are nonstationary and have complex time-frequency characteristics. It is considered that signals of muscle activity using surface EMG are divided into two types: transient signals EMG and steady-state signals EMG, the transient signals are more important and more favourable for the "on line" classification, although they are more difficult to handle, for this reason we use these transient signals. Transient signals, which are evolving in time in an unpredictable way (like a speech signal or an EMG signal) require the notion of frequency analysis for each local time. Although frequency domain representations, such as the power spectrum of a signal, often show useful information but they don’t show how the frequency content of a signal evolves over time. Time-Frequency Analysis (TFA) can identify not only the frequency content of a signal, but also how that content evolves over time. There are a number of different methods available for Time Frequency Analysis. Each type shows a different time-frequency representation. The Short Time Fourier Transform (STFT), which is used in this work, is the simplest TFA method and the easiest to compute. 3 Experimentation Three types of isometric finger movements to be classified are selected: thumb, pointer, middle. The placement of EMG surface electrodes on muscle

EUSFLAT - LFA 2005

groups is important to have more information about each movement. Two EMG surface electrodes are placed on two muscle groups, palnaris longus (channel_1) and extensor digitorum (channel_2), the locations of electrodes on the subject’s arm is given in Fig 1, from the input feature space, the classifier must be able to classify the three output classes exploiting the EMG signals measurements.

nth moment of the frequency distribution at time t is defined as: M n (t ) = ∑ ω kn STFT (t , k ) (1) k

n: order, t: time, ω : frequency. The 1st moment is used as feature. For the two channels we prepare some EMG training and test data, from filtered raw EMG signal between 20Hz and 250Hz, each class has 17 training and 17 test patterns. The three classes labelled 1, 2 and 3 have 51 train-samples and 51 test-samples. The distribution of the all samples in the twodimensional space Channel-1 and channel-2 is showed in Fig.2.

Figure 1: - EMG training and test patterns recorded using two pairs of electrodes in Max Planck Institute laboratory in Magdeburg, Germany. For each channel the signal was acquired using a single bipolar surface electrode pair. A differential amplifier with an isolated input and signal gain of 2000 was used. The signal was sampled at a rate of 4Khz using A/D board in an IBM PC/AT compatible microcomputer, This algorithm is developed with MATLAB 6 and is performed in a PC-based off-line process. The human subject was asked to produce a number of continuous movements, 34 single contraction periods are separated from the corresponding sets of continuous movements. Initial transient part (400 ms) of each single contraction period is extracted from the raw signal by determined threshold and are analysed with Short time Fourier Transform (STFT), which gives a measure of both time and frequency information for small segments of a signal.

4 EMG feature extraction Extraction of information contained in timefrequency domain need the use of spectrum analysis. Time-frequency analysis based on short-time Fourier transform (STFT) is a form of local Fourier analysis that treats time and frequency simultaneously and shows that the power Spectral Density (PSD) of EMG signals changes with time. This method leads to a better solution to design feature extraction.

Hannaford’s [1] method to analyse EMG signal is used to extract moments of frequency. The

817

Figure 2: Input space distribution of normalised train and test data

5 Ellipsoidal delimitation for fuzzy sets initialisation An initial fuzzy rule base is derived from the n available input-output data pairs ( X nf , Yn ), the input Matrix

X nf = [ X ij ] ,

where

i = 1,..., n : j = 1,..., f :

number of measured samples and number of feature. The fuzzy antecedents are determined in two steps, the first step of this Algorithm, which is described in this chapter (5), is the determination of the membership functions, which can describes each region (class) in the input space. Usually and the most authors use clustering [13] algorithm for this task. In this work the statistical trimmed mean [7] method is used. The second step, which is described in chapter (7), is to get from the similar fuzzy sets one fuzzy set. For the first step we calculate the mean value for each feature vector F j and each class C k ,

F j = X ij (i = 1,...nk ) ,

class

C k , k = 1,..., K ,

EUSFLAT - LFA 2005

here

nk

Ck ,

and K the number of classes. The number of

denotes the number of samples for the class K

samples for all classes is

n = ∑ nk . k =1

The mean of each feature

F j and for each class C k ,

is given as:

V jk =

1 nk

nk

∑X i =1

ij

(2)

Fig. 4, which have the above calculated centres and radius on each axis. The parameters of each ellipsoid will be used to generate the initial fuzzy sets, for this task the generalized bell membership function is chosen. Ellipsoids-based input fuzzy sets initialisation for train data gives us the following partition of our input space, Fig. 5. We use this initial input-space partition with singleton consequents in order to obtain initial zeroorder T.S. model.

This mean has an extreme sensitivity to even single outlier; hence there is a suspect to take the vector of mean V jk as a measure of centres. Outliers are infrequent observations data points, which do not appear to follow the characteristic distribution of the rest of the data. Statisticians have proposed a trimmed mean as solution. Each label for each class in the matrix X nf is ordered from the smallest to largest, deleting a selected number of values from each end of the ordered list, and then averaging the remaining values Fig. 3. For this task we have to choose the trimming percentage β, which denotes the percentage of values deleted from each end of the ordered list, in this work β = 0.9.

Figure 4: Ellipsoidal delimitation of the samples of all trimmed data (train-data and test data).

Figure 5: Input fuzzy sets initialisation using the ellipse’s parameters for train data. Figure 3: The difference between the mean of all data and trimmed data. The number of samples that will be deleted from both ends of the ordered label vector is given as: ndk = 2 × round (nk × (1 − ß ) + 1) (3) round: rounds the elements to the nearest integer. This procedure lets us define the coordinates of centres for the C k classes in f multi-dimensional space. For f = 2, the samples of each class for all train and test data can be delimited with ellipses

818

The output Zn of this model use the following classification rules:

⎧ 1 if Classk = ⎪ ⎨ 2 if ⎪ 3 if ⎩

Z k < 1,5 1,5 ≤ Z k ≤ 2,5

(4)

Z k > 2,5

This initial model contains 3 rules and describes 3 classes for fingers (thumb, pointer and middle).

EUSFLAT - LFA 2005

6 precision and transparency

S ( A1, A2) =

The ellipsoidal delimitation of samples method described above (chapter 5) can find a good starting point in proximity of the global minimum, hence the farther application of a few epochs with GD will

For the gbellmf the following expression to measure the distance d is applied:

not have a big effect on overlap of the membership functions. The initial input-space partition with this method fulfils many criteria for transparency and semantic properties [12], [8]: 1- Coverage: the all entry space is covered. That means the model is able to perform an output for all input samples. 2- Semantic order relation: we have not inversion of fuzzy sets. 3- Prototype: for any rule there is a vector of input data, for which this rule has membership degree bigger than the sum of the rest of all other rules. 4- Optimised number of rules: ellipsoidal input space partition describes the all regions in input data space that should be classified. The initial model Fig.5 with three rules, which describe 3 classes with singleton consequents, has average classification accuracy of 80,39 % giving 10 misclassifications on the test data. The input fuzzy set parameters of the initial model are given (see Table1):

1 , S (.) ∈ [0,1] , 1 + d ( A1, A2)

d(A1, A2) = (a1−a2)2 +(b1−b2)2 +(c1−c2)2

(5)

(6)

The initial model after similarity measure, Fig.6, with 3 rules, which describes 3 classes with singleton consequents, has average classification accuracy of 86,27 % giving 7 misclassifications on the test data. As result of merging of similar fuzzy sets before optimisation, the misclassification is decreased from 10 to 7 samples. We give distribution of train data in Fig.7. After application of optimisation on both antecedents and consequents parameters Fig.8 using GD and LSE respectively, we obtain after 20 epochs the classification accuracy of 92,16 % giving 4 samples misclassification on the data test. The optimised input fuzzy set parameters of the Optimised model with similarity measure are given (see Table 2).

Table1:Initial fuzzy sets with ellipsoidal delimitation -----------------------------------------------------------Input_1: A1 = [0.351 0.702 -0.946] gbellmf A1 A2 = [0.324 0.647 -0.285] gbellmf A2 A3 = [0.960 1.921 1.463] gbellmf A3 Input_2: B1 = [1.51 3.020 0.319] gbellmf B1 B2 = [1.169 2.337 -0.316] gbellmf B2 B3 = [1.122 2.244 0.5289] gbellmf B3

Figure 6: Fuzzy input sets initialisation with ellipsoidal delimitation and similarity measure application.

-----------------------------------------------------------

7 Merging the similar fuzzy sets The goal of this simplification is to get from the similar fuzzy sets one fuzzy set. This method can be introduced in each epoch of learning. In our application in the input 2 of train data there are two similar sets B1 and B3, fig. 6. The similarity measure can be applied to remove such redundant sets. There are several methods for fuzzy similarity measures; one is based on the distance measure defined as:

819

Figure: 7: Train data distribution The obtained fuzzy model has a clear physical meaning and is interpretable since the three consequent parameters: 0.7694, 2.218 and 3.094 corresponding respectively to Rules R1, R2 and R3

EUSFLAT - LFA 2005

are close to the class labels, each rule can be taken to describe the corresponding class.

performance of this method will be compared with the obtained results with our approach.

Table 2: Optimised similarity measure application -----------------------------------------------------------Input_1: A1 = [0.333 0.7441 -1.024] A2 = [0.1261 0.7158 -0.4599] A3 = [0.9608 1.959 1.438 ] Input_2: B2 = [1.109 2.357 -0.4696] B13 = [1.164 2.285 0.143]

gbellmf A1 gbellmf A2 gbellmf A3 gbellmf B2 gbellmf B13

-------------------------------------------------------The corresponding rules to the fuzzy sets of the optimised model are given (see Table 3):

Figure 9: ANFIS Optimisation of fuzzy sets with Subtractive Clustering method. Table 4: 20 epochs optimisation case -------------------------------------------------------------R 1: If x is A1 & y is B1 then z1 = [-1.521 0.6723 2.014] R 2: If x is A2 & y is B2 then z2 = [-1.081 0.3386 -0.215] R 3: If x is A3 & y is B3 then z3 = [-0.0390 0.0102 3.072] R 4: If x is A4 & y is B4 then z = [0.7526 -0.1067 1.76] R 5: If x is A5 & y is B5 then z = [-2.512 1.537 3.805]

Figure 8: Optimised fuzzy sets after similarity measure.

--------------------------------------------------------------

Table 3: -------------------------------------------------------------R 1: If x is A1 & y is B13 then R 2: If x is A2 & y is B2 then R 3: If x is A3 & y is B13 then

z= 0.686 < 1,5 z = 1,5 ≤ 2.305 ≤ 2,5 z = 3.173 > 2,5

-------------------------------------------------------------The performed results obtained with the proposed fuzzy classification method for EMG-based fingermovements classification are obtained with several advantages, which motivate the use of fuzzy systems like: interpretability, transparency, distinguishable fuzzy sets and coverage.

8 Subtractive clustering The subtractive clustering algorithm is proposed by Chiu (1994). It estimates the number of clusters and the cluster centres in a set of data by an iterative procedure. The clusters obtained are used to initialise the fuzzy sets, for model identification method ANFIS. The results and the model

820

The Matlab function “genfis2” in fuzzy logic toolbox to generate the initial model with subtractive clustering use the first order takagi Sugeno (T. S.) model. After application of optimisation with ANFIS method Fig.9, we obtain after 5, 20 and 50 epochs the classification accuracy of 86.2745% 88,2353% and 90.1961% giving 7, 6 and 5 samples misclassification on the data test. The obtained fuzzy model with Subtractive clustering method hasn’t a physical meaning and is not interpretable. The parameters of the five rules in optimised first order T. S. model are given in table 4. In the following table 5, we resume some characteristics of both methods.

EUSFLAT - LFA 2005

Table 5 -------------------------------------------------------------Our approach |

Sub. Clustering

------------------------------------------Mf. Typ. Nb. Fuzzy sets In-1 Nb. Fuzzy sets In-2 Nb Parmtr. In Consequent typ. Nb Parmtr. Out Nb. of rules Interpretability Classification

Gbellmf 3 2 15 Singleton 3 3 yes 5 epochs 92,16 %

Gaussmf 5 5 20 linear 15 5 no 50 epochs 90.19 %

9 Conclusion: The proposed fuzzy identification Approach to perform the EMG-based finger-movements classification has several advantages, which motivate the use of fuzzy systems like: interpretability, transparency, distinguishable fuzzy sets, coverage and simplicity. This approach extract fuzzy rules from data based on ellipsoidal delimitation, which use trimmed mean measure to avoid infrequent observations data points. It gives an optimal model initialisation, which needs only 5 train-epochs to reach the best rate of classification. References: [1] B. Hannaford, S. Lehman, .ShortTime Fourier Analysis of the Electromyogram: Fast Movements and Constant Contraction,. IEEE Transactions on Biomedical Engineering, vol. BME-33, pp. 1173-1181, Dec. 1986. [2] B. Hudgins, P. Parker and R. N. Scott, “New strategy for multi-function myoelectric control ” IEEE Transactions on Biomedical Engineering, vol. 40, no. 1, pp. 82-94, Jan. 1993. [3] C. Bonivento, A. Davalli, C. Fantuzzi, R. Sacchetti, S. Terenzi, “Automatic tuning of myoelectric prostheses” Journal of Rehabilitation Research and Development Vol. 35 No. 3, July 1998, p: 294-304. [4] Chang G-C, Kang W-J, Luh J-J, Cheng C-K, Lai J-S, Chen J-JJ, Kuo T-S, “Real-time implementation of electromyogram pattern recognition as a control command of man–machine interface”. Med Eng Phys. 1996 Oct;18(7):529-37. PMID: 8892237 [PubMed indexed for MEDLINE]. [5] Hefftner G, Jaros G, “The electromyogram (EMG) as a control signal for functional neuromuscular stimulation, part I: Autoregressive modeling as a mean of EMG

821

signature discrimination”. IEEE Trans Biomed Eng 1988;35(6):228–35. [6] H. P. Huang, Y. H. Liu, C. S. Wong. “Automatic EMG feature evaluation for controlling a prosthetic hand Using a supervised Feature Mining Method: An Intelligent Approach.”, Proceeding of the 2003 IEEE International Conference on Robotics & Automation Taiwan, September 14-19, 2003. [7] J. Devor and R. Peck, “Statistics: the exploration and analysis of data,” – 3rd ed. ISBN 0-534-22896-8. [8] J. Valente de Olevirea, “Semantic constraints for membership function optimisation, “ IEEETrans. Systems, Man, Cybern., pt. A, vol. 29, pp. 128-138, Jan. 1999. [9] K.Englehart, B. Hudgin, and P. A. Parker, “A weveletbased continuous classification scheme for multifunction myoelectric control”, IEEE Transactions on Biomedical Engineering, vol. 48, no. 3, pp. 302-311, Mars 2001. [10] Marko Vuskovic, .NEUROMUSCULAR MULTIFUNCTIONAL HAND CONTROL., Summary of research and development done in Robotics Laboratory, SDSU [11] M. Setnes, R. Babuska, U. Kaymak, and H. R. van Nauta Lemke, “Similarity measures in fuzzy rule base simplification,” IEEE Trans. Syst., Man, Cybern. B, vol. 28, no. 3, pp. 376-386, 1998. [12] Pierre Yves Glorennec. Algorithmes d’apprentissage pour systèmes d’inférence flue. Editions Hermès, 1999. [13] S. L. Chiu. “Fuzzy model identification based on cluster estimation.” Journal of Intelligent and fuzzy Systems, 2(3), 1994. [14] Takagi T. Sugeno M. Fuzzy identification of systems and its applications to modeling and control. IEEE Trans. Syst. Man Cybern. 15(1): 116-132, 1985 [15] Y. Jin, “Fuzzy modeling of high-dimensional systems: complexity reduction and interpretability improvement,” IEEE Trans. Fuzzy Syst., vol. 8, no. 2, pp. 212-221, 2000. [16] Zardoshti-Kermani M, Wheeler BC, Badie K, Hashemi RM, “EMG feature evaluation for movement, control of upper extremity prostheses”. IEEE Trans Rehabil Eng 1995;3:324–33.