A Self-selected Movement Classification Method for Forearm Via sEMG and Attitude Sensor

- Objective : The use of surface electromyography (sEMG) to realize the recognition of the movement intention can realize the control of the artificial hand or the robot, and can help the rehabilitation training for hemiplegia or muscle weakness. However, the sEMG are weak and susceptible to exter-nal interference, so the current research fo-cuses on identifying certain types of movements. But once the subjects are changed, the recognition accuracy will greatly reduce. This study proposes a classification method which the subject could choose optional movements of forearm. Methods : Two sEMG sensors were used, and a 9-axis attitude sensor was added to the wrist. 8 different subjects participated in and everyone selected 5 movements. The sEMG sensors were attached to the extensor pollicis and the digitorum. The sEMG features were: Standard Deviation (SD), Power Spectrum Density (PSD); attitude sensor features were: angle and angular acceleration in three dimensional space, and integral of angular acceleration. The results were classified and identified using Linear Discriminant Analysis (LDA), K-Nearest Neighbor (KNN), Decision Tree (DT) and Ensembles (En) algorithms. The results of using the sEMG, using the attitude sensor signals and combining the two were compared. Analysis of variance was conducted on the average accuracy. Features were reduced the dimension by the Principal Component Analysis (PCA), and the results of using PCA and not were compared. the


I. INTRODUCTION
The sEMG are bioelectrical signals produced by muscle activity that contains information about various muscle activity [1][2][3] . The placement of electrodes on the muscle to extract signals from the user's muscle activity can be used to control the robot or prosthesis and can be used to assist muscle weakness and hemiplegia to control the exoskeleton for rehabilitation. In order to achieve the accuracy of the control, it is necessary to improve the recognition accuracy of the movements. For some fixed movements, through long-term training, more than 99% of the accuracy can be achieved [4,5] . However, this method is mainly for the fixed movements, once the 2 subjects are replaced, the accuracy will drop significantly.
Takamitsu et al. [6] used Bilinear modeling to control the prosthetic hand. By experimenting between different individuals, the recognition accuracy could reach 73.0%. Orabona et al. [7] proposed adaptation model with least-square Support Vector Machine (SVM), and results showed that, when pre-trained models were used, and the number of training samples needed to reach a certain performance was reduced. These researches were only a process of reducing the number of trainings and improving the accuracy for newly-joined subjects, but still couldn't solve the problem that subjects chose their own movements according to need. Md et al. [8] used the MYO sensor to acquire the eight-channel signals of the arm, and realized the recognition of three kinds of movements. The recognition accuracy reached 99.5%, however, this method had too few types of movements.
The electromyography signals include internal and surface electromyography signals, which are obtained by needle and surface electrodes, respectively. The needle electrode gets clear electromyography signals because it is inserted deep into the muscle, but it can cause trauma to the human body. The non-invasive nature of the surface electrode makes it widely used as control signals source for intelligent robotic arms. The sEMG are suitable for the recognition of fine movements and small-scale gestures; the Attitude Sensor (AS) can effectively capture the spatial position state and trajectory information of the gesture movement, and is suitable for the recognition of large-scale and visible movements. Kiwon et al. [9] placed a four-channel sEMG sensor and an accelerometer on the wrist to recognize the five hand movements, and the recognition accuracy was 85%. Michael et al. [10] used an eight-channel sEMG sensor MYO to place the upper forearm. The sensor had an accelerometer built in. It tested four types of movements commonly used in life, and the recognition accuracy could reach 89%. Many studies had added angle and acceleration signals in the process of recognition [11][12][13] . Inspired by the above papers, I combined sEMG sensors and attitude sensors to realize the recognition of forearm movements.
The sEMG are electrical signals accompanying muscle contraction and have characteristic of non-stationary. The research on sEMG had been primarily focused on features extraction and classification. In order to improve the classification accuracy for such non-stationary signals, different mechanisms adopted different methods for features extraction. The methods of features extraction are time domain, frequency domain and time-frequency domain. Derya et al. [3] used Root Mean Square (RMS) to obtain features from the sEMG. Oluwarotimi et al. [14] made use of a given Analysis Window and its Mean (ASM) to get features with accuracy of 92%. Julian et al. [4] put to use wavelet transform to extract features. There are also many extraction methods, including: Standard Deviation (SD), Waveform Length (WL), Median Frequency (MDF), Slope Sign Change (SSC), Power Spectrum density (PSD), and so on. In addition to the traditional approach, some had introduced new ways to extract features. For example, Amit et al. [15] introduced Hilbert-Huang Transform (HHT) and Nagineni et al. [16] brought in Variational Model Decomposition (VMD) to extract feature. This paper introduced a classification method that used the sEMG and attitude sensor to achieve the classification of subjects' self-selected movements. Existing research was mainly to identify specific movements, but subjects could not choose the movements they want to use according to their needs. Par-3 ticipants could choose from 5 types of forearm movements according to their own ideas. SD and PSD of sEMG were as two features extraction methods. The integral of the angle acceleration, angular acceleration, and angular acceleration of the attitude sensor were taken as features. The zero-mean was used to normalization features, and the incorrect points were eliminated. The results were identified by four algorithms: Linear Discriminant Analysis (LDA) [15,16] , K-Nearest Neighbor (KNN) [17,18] , Decision Tree(DT) [19,20] and Ensembles (En) [21,22] algorithms. The results showed that KNN performs best in recognition.

A. User training
Participants in this trial were 8 independent individuals (9 males, 1 female), aged 23-32 years, and 8 right-hands, 2 left-hands. Participants were washed with water before the experiment at the position where the electrodes were placed. In addition, subjects needed to remove the hair from the experimental site. Participants were informed of the content of the experiment, clearly told that this experiment would not cause any harm to the body. In addition, the subjects were told to only select forearm movements. And I did not tell them the principle of the sensor, or if they knew the principle of the sensor, and in order to obtain a higher accuracy, they maybe deliberately choose the larger different movements for the sensor.
The movements selected by one of the subjects are shown in Figure 1. The extensor pollicis brevis is mainly related to thumb movement and helps the hand abduction; the extensor digitorum is related to the movement of the five fingers, and participates in the rotation of the arm, so in this test, the electrode placement position was the extensor pollicis brevis and the extensor digitorum, as shown in Figure 2(a). The attitude sensor was placed on the back of the hand, as shown in Figure 2(b). The placement of the electrodes was done by the tester and the subjects only needed to obey the arrangement.

B. Data collection and feature extraction
The 2-channel sEMG sensor was used. The sensor had its own filtering and amplification function. The magnification was 1000 times. The acquisition card adopts Advantech USB-4704, and the acquisition frequency was 1000Hz. The 9-axis attitude sensor was Shenzhen Weite Intelligent Companys module, and the sampling frequency was 100Hz, the sampling accuracy was 0.1 degree, and the sensor had Kalman filter function. The data points for the 9 axes were 3 angular accelerations, 3 angular velocities and 3 angles. This paper selected the angular acceleration and angles in three directions (x-y-z axis). The feature extraction and classification program ran on a Lenovo PC (CPU: Intel i5-6500, RAM: 20G, ssd: 128G, win7 operating system) and MATLAB2017B. Every movements collected 5 seconds of data. In order to extract features from the collected data, they are needed to be preprocessed. According to the literatures [23][24][25][26][27][28][29], the bandpass filtering used was 20-200 Hz. Figure 3 Signals obtained from a subject. Ax, Ay, Az were the angles of the x, y, and z axis, respectively; ax, ay, az were the angular accelerations of the x, y, and z axis; sEMG was the acquired sEMG. To maintain scale consistency, we take a point every 8 points for the sEMG. Each 500 points corresponds to one movement.
For improving the recognition accuracy, it was also very important to choose the appropriate features. The extracted sEMG features included SD and PSD in this paper. The way to extract features of the attitude sensor was to take of the angle, angular acceleration as well as the integral of the angular acceleration.
(1) Standard Deviation (SD) where,  is the mean, xi is the signals value,  is the variance, N is the number of sample.
Further obtaining the power spectrum of the signals was (3) Signals Magnitude Area of Angle Acceleration (SMAA) The signals magnitude area of acceleration was computed by dividing the numerically-integrated area under the curve by the duration of the signals (1) [10] .
In pattern recognition, the range of data varies greatly. If the data was directly imported into the classification model, satisfactory results were often not obtained. Therefore, the features of all columns were normalized, with average of 0 and standard deviation of 1.
The obtained features often had abnormal points due to various disturbances. The existence of abnormal points had a great influence on the accuracy of pattern recognition. So the standard deviation was calculated for every column of features, and the abnormal points were eliminated by three standard deviations.

A. Classification accuracy
During the test, signals obtained from some subject were selected as samples and classified using KNN model to obtain the confusion matrix of classification results of 5 movements, as shown in Figure 4. It can be seen from Figure 4 that features extraction method adopted can obtain better classification effect. The fifth movements is 75%, and the others can reach 100%.

B. Recognition accuracy
Every individual has 20 trials. The average accuracy of 8 subjects using both sensors while normalizing and deleting abnormal features is shown in Figure 5. The KNN had a good classification result. Compared with other classification algorithms, KNN can obtain a larger accuracy. The average accuracy of the algorithm KNN is 95%, which is higher than the other four algorithms, as shown in Table 1.   Table 1 is the recognition of the average of 20 trials of 8 subjects. As can be seen from the 2~3 rows of Table 1, the combination of sEMG and attitude sensor's accuracy is superior to any single sensor used alone for all algorithms. Analysis of variance is conducted on the row 2~4's results of Table 1 by SPSS. The selection of sensors has a significant impact on the accuracy of pattern recognition (p<0.001), and different algorithms also have a significant impact on the accuracy (p <0.001). Therefore, it is a reasonable choice to combine the two sensors for pattern recognition.

D. The error rate changes with the number of tests
Average the error rate of the corresponding times of all subjects, as shown in Figure 6.
It can be seen from Figure 6 that the error rate does not change greatly with the increase of the number of experiments, which indicates that the method used in this experiment could adapt well to different subjects and has good stability. Compared to the other three algorithms, KNN's error rate is minimal.

IV. DISCUSSION
Using sEMG for pattern recognition, many research groups could get accuracy more than 90% [5,14] . However, these studies could not replace subjects, otherwise the ac-curacy would be greatly reduced, and subjects would not be allowed to choose their own movements according to needs. For example, subjects from [30] were replaced, the accuracy dropped below 80%. Md et al. [8] used MYO to achieve subjects independent movements recognition, and the accuracy could reach 99.5%. But the research's movement type was too small, and there was no real realization of the subject self-selected movements. Subjects could only do three types of movements. Cheng et al. [31] built the bridge link between the training set and the testing set with Canonical Correlation Analysis (CCA), and hence, the recognition accuracy could be improved in both user-dependent and user-independent manners. However, this method still didn't solve the problem of the subjects' self-selected movements. This paper combined the sEMG sensor and the attitude sensor to get the subjects' self-selected movements' signals, and the average accuracy could reach 95%. It could improve the applicability of sEMG classification and identification, allowing subjects to choose their own movements according to needs.

A. Using normalization and deleting errors or not
If features are not normalized, average the error rate of the corresponding times of all subjects, as shown in Figure 7. Comparing Figure 6 and Figure 7, the error rate using normalization and deleting abnormal features was significantly lower than in the case of no use. For the 20 trials of the KNN algorithm, the average error rate for all subjects is 3.9%, and the average error rate is 14.5% when not used. There is also a significant reduction in error rates for other algorithms. It can be seen from 4~5 rows of Table 1, for the algorithm KNN, the accuracy of normalizing and deleting the abnormal features is 95.0%, otherwise the accuracy is 63.7%, and the overall accuracy can be improved by 49.1%. There were also significant improvements to other algorithms.

B. Using PCA or not
The PCA algorithm plays an important role in the feature extraction of sEMG. It can reduce features dimension, speed up the calculation, and improve the overall accuracy [32][33][34] . The overall weight was set to 0.99, and the PCA automatically selects five features columns. Five movements recognition results was shown Figure 8. Comparing Figure 5 and Figure 8, after PCA, the overall accuracy of subjects don't change much. The accuracy of subject 1 is greatly improved in LDA and DT, En algorithm. It can be seen from 5~6 rows Table 1 that the use of PCA has little effect on the average accuracy of KNN and LDA algorithms, and the DT algorithm will be reduced by 3.2%, and the En algorithm can be increased by 2.6%. 8 subjects average accuracy is shown in Figure 9. It can be seen from Figure 9 that the KNN algorithm which is excellent. The overall accuracy of the 8 participants does not change much, but the SD is small, so the stability can be improved. Therefore, using PCA algorithm can speed up the operation and improve the stability of the experiment. At the same time, it shows that features extraction method selected has good rationality.

C. Future work
The experiment only tested 5 movements, and the next step is to increase the number of movements. The current movements are limited to the forearm, and the next work can extend the movements to the entire arm. The test was performed only on normal people, but the electromyogram signals are difference between the normal people and patients. Therefore, the next step is to test patients with muscle weakness or hemiplegia and disabled people.

V. Conclusion
This paper used the sEMG sensor and attitude sensor to classify the forearm move-ments. Features extraction methods of the sEMG sensor were RMS and PSD, and features of the attitude sensor were the integrals of the angular acceleration, angle and angular acceleration. Comparing the results of sEMG sensor, attitude sensor and the combination of the two, the results showed that the combination of the two could obtain a higher accuracy. Features were normalized and the abnormal features were eliminated. The results suggest that normalization and eliminating of abnormal features can improve the recognition accuracy. The PCA was used to reduce the dimension of features. The results showed that the PCA could make the experimental results less error and the results were more stable. Twenty experiments with 8 subjects showed that the method of combining sEMG and attitude sensors could achieve the requirements of subjects' self-selected movements, and the average accuracy could reach 95.0%. Analysis Window and its Mean (ASM)

Declarations
Ethics approval and consent to participate It was approved by the Medical and Experimental Animal Ethics Committee of Northwestern Polytechnical University.

Consent for publication
Not applicable