^{1}

^{*}

^{1}

The EMG signal which is generated by the muscles activity diffuses to the skin surface of human body. This paper presents a pattern recognition system based on Linear Discriminant Analysis (LDA) algorithm for the classification of upper arm motions; where this algorithm was mainly used in face recognition and voice recognition. Also a comparison between the Linear Discriminant Analysis (LDA) and k-Nearest Neighbor (k-NN) algorithm is made for the classification of upper arm motions. The obtained results demonstrate superior performance of LDA to k-NN. The classification results give very accurate classification with very small classification errors. This paper is organized as follows: Muscle Anatomy, Data Classification Methods, Theory of Linear Discriminant Analysis, k-Nearest Neighbor (kNN) Algorithm, Modeling of EMG Pattern Recognition, EMG Data Generator, Electromyography Feature Extraction, Implemented System Results and Discussions, and finally, Conclusions. The proposed structure is simulated using MATLAB.

EMG signals, which are measured at the skin surface, are the electrical manifestations of the activity of muscles. It provides an important access to the human neuromuscular system. EMG has been well recognized as an effective tool to generate control commands for prosthetic devices and human-assisting manipulators. Information extracted from EMG signals, represented in a feature vector, is chosen to minimize the control error. In order to achieve this, a feature set must be chosen which maximally separates the desired output classes. The extraction of accurate features from the EMG signals is the main kernel of classification systems and is essential to the motion command identification [

Early attempts using pattern matching algorithms for prosthesis control have been proposed by Finely [

In today’s literature on EMG classification the signal processing chain is often broken down to three algorithmic components: the feature extraction, the dimensionality reduction and the pattern classification. In the feature extraction step attributes are extracted omitting redundancy. In the second step the amount of data is further reduced by selecting or projecting features for more robust and accurate classification. In the last step pattern matching algorithms are applied to detect the category of the input data. The complete processing queue has to be carefully balanced-especially the combination of the pattern matching algorithm and the selected feature contributes significantly to the classification accuracy.

EMG classification is one of the most difficult pattern recognition problems because there are large variations in EMG features. Especially, it is difficult to extract useful features from the residual muscle of an amputee. So far, many researches proposed many kinds of EMG feature to classify posture and they showed good performance. However, how to select a feature subset with the best discrimination ability from those features is still an issue for classifying EMG signals [

The muscles that are responsible for the movement of the arm, wrist, and hand abduction are performed by the deltoid. Human elbow is mainly actuated by two antagonist muscles: biceps and triceps, although it consists of more muscles. Consequently, biceps and a part triceps are biarticular muscles. Many studies have been performed to investigate the effects of biarticular muscles. By adjusting the amount of force generated by these muscles, the elbow angle and impedance can be arbitrary controlled [

The most commonly used techniques for data classification is the Linear Discriminant Analysis. This method maximizes the ratio of between-class variance to the within-class variance in any particular data set thereby guaranteeing maximal separability. The use of Linear Discriminant Analysis for data classification is applied to classification problems and recognition. This method also helps to better understand the distribution of the feature data [

The Linear discriminant analysis (LDA) is a classical statistical approach for supervised classification. LDA computes an optimal transformation (projection) by minimizing the within-class distance and maximizing the between-class distance simultaneously, thus achieving maximum class discrimination. Hence LDA will be used in this paper as the classification method due its ability in class discrimination. In the case of the classification of the upper arm motion; these motions are similar to each other in signal shape. Therefore, the obtained results in this paper demonstrated that this method of classification can provide accurate classification result with minimum classification error in the classification of the upper arm motions.

Consider a data set that consists of n samples, where denotes the d-dimensional input, the corresponding class label, n is the sample size, and k is the number of classes. Let

be the data matrix and be the data matrix of the j-th class, where n_{j} is the sample size of the j-th class, and that maps x_{i} in the d-dimensional space to a vector in the -dimentional space as follows:

In LDA, three scatter matrices, called the within-class, between-class and total scatter matrices are defined as follows:

where is the centroid of the j-th class, and c is the global centroid. It can be verified from the definitions that S_{t}= S_{b} + S_{w}. Define three matrices H_{w}, H_{b}, and H_{t} as follows:

where and e are vectors of all ones of length n_{j} and n, respectively. Then the above three scatter matrices can be expressed as

It follows from the properties of the matrix trace that

Thus trace (S_{w}) measures the distance between the data points and their corresponding class centroid, and trace (S_{b}) captures the distance between the class centroids and the global centroid.

In the lower-dimensional space resulting from the linear transformation G, the scatter matrices become

An optimal transformation G would maximize trace and minimize trace simultaneously, which is equivalent to maximizing trace and minimizing trace simultaneously, since. The optimal transformation, , of LDA is computed by solving the following optimization

It is known that the optimal solution to the optimization problem in above equation can be obtained by solving the following generalized eigenvalue problem:

More specifically, the eigenvectors corresponding to the k − 1 largest eigenvalues form columns of G^{LDA}. When S_{t} is nonsingular, it reduces to the following regular eigenvalue problem:

When S_{t} is singular, this is known as the singularity or undersampled problem in LDA. When S_{t} is singular, the classical LDA formulation discussed above cannot be applied directly.

The unified framework consists of four steps described below:

1) Compute the eigenvalues, of S_{t} and the corresponding eigenvectors, with. Then.

2) Given a transfer function, let

for all i. Construct.

3) Compute the eigenvectors, of corresponding to the nonzero eigenvalues, where q = rank (S_{b}), denotes the pseudo-inverse of. Construct the matrix G as.

The k-nearest neighbor (kNN) classification rule is wellknown and widely used nonparametric pattern classification method. It was originally suggested by Cover and Hart [

The structure of the implemented system is shown in

The process of pattern recognition can be broken down into two main phases: feature extraction and classification.

Feature extraction refers to the transformation of the input signal into a set of representative signal features. Number of features that are now commonly used for EMG classification; in this paper features that are used are the root mean square and autoregressive coefficients.

Classification maps feature vectors into specific classes, with the mapping function determined using training data. This classification procedure is implemented using LDA classifier, and kNN classifier.

The data used in this paper are generated using EMG Simulator [

Signals are generated using a model constructed to closely resemble the physiology and morphology of skeletal muscle, combined with line source models of commonly used needle electrodes positioned in a way consistent with clinical studies. The validity of the simulation routines is demonstrated by comparing values of statistics calculated from simulated signals with those from clinical EMG studies of normal subjects. The simulated EMG signals are used to explore the relationships between muscle structure and activation and clinically acquired EMG signals.

EMG data were simulated as the subject underwent seven distinct limb motions: hand open, hand close, supination, pronation, wrist flexion, wrist extension, and rest, as shown in

ing set and training set.

The first four autoregressive coefficients and the root mean square value were used as the feature vector. The analysis window size was 256 ms, which were spaced 128 ms apart for training data and 32 ms apart for testing data. Data that were 256 ms before or after a change in limb motion were removed from the training set to avoid transitional data.

Features are computed from the EMG signals using a sliding analysis window. In this paper the sliding window is depicted in

The classification error from the testing data was 2.9329% (with no feature reduction). To improve classification accuracy, majority vote post-processing can be employed. The majority vote uses the current classification result, along with the previous classification results (with an analysis window spacing of 32 ms, this corresponds to the classification results within the last 256 ms) and makes a classification decision based on the class that appears most often (

The resulting effect is a smooth operation that removes spurious misclassification. The classification error reduces to 2.3316% after majority vote post processing.

The errors that are present occur during transitional periods, which are expected as the system is in an undetermined state between contractions.

If we removed the analysis windows that are 256 ms before and after the transition, the classification error is 0.85402% (i.e. no transitions).

If we combine majority vote post processing with no transition error; the classification error will be 0.84067%. The classification errors from the testing data (with Linear Discriminant Classifier and ULDA Feature Reduction) are shown in

Also the classification errors from the testing data (with Linear Discriminant Classifier and PCA Feature Reduction) are shown in

While the classification errors from the testing data (with k-Nearest Neighbor Classifier and PCA Feature Reduction) are shown in

The classification errors from the testing data are summarized in

Results in this paper demonstrate that a relatively simple pattern classification system can achieve high classifica-

tion accuracy. One can improve classification accuracy by changing the pattern recognition components in the system. For example, different features and classifiers may yield an improved system. The system presented in this paper establishes a good baseline to which other systems can be compared. This includes comparisons in system complexity. This is of particular importance for EMG control systems, where the computational requirements are important in an embedded system implementa-

tion (e.g. computation load, power requirements, system robustness).