Angle Estimation for Knee Joint Movement Based on PCA-RELM Algorithm

: Surface electromyogram (sEMG) signals are easy to record and offer valuable motion information, such as symmetric and periodic motion in human gait. Due to these characteristics, sEMG is widely used in human-computer interaction, clinical diagnosis and rehabilitation medicine, sports medicine and other fields. This paper aims to improve the estimation accuracy and real-time performance, in the case of the knee joint angle in the lower limb, using a sEMG signal, in a proposed estimation algorithm of the continuous motion, based on the principal component analysis (PCA) and the regularized extreme learning machine (RELM). First, the sEMG signals, collected during the lower limb motion, are preprocessed, while feature samples are extracted from the acquired and preconditioned sEMG signals. Next, the feature samples dimensions are reduced by the PCA, as well as the knee joint angle system is measured by the three-dimensional motion capture system, are followed by the normalization of the feature variable value. The normalized sEMG feature is used as the input layer, in the RELM model, while the joint angle is used as the output layer. After training, the RELM model estimates the knee joint angle of the lower limbs, while it uses the root mean square error (RMSE), Pearson correlation coefficient and model training time as key performance indicators (KPIs), to be further discussed. The RELM, the traditional BP neural network and the support vector machine (SVM) estimation results are compared. The conclusions prove that the RELM method, not only has ensured the validity of results, but also has greatly reduced the learning train time. The presented work is a valuable point of reference for further study of the motion estimation in lower limb.


Introduction
The surface electromyogram (sEMG) signal is a physiological signal, formed by the superposition of a potential difference, generated by muscle contraction or relaxation on the skin [1][2][3]. It is widely used in human-computer interaction, medical rehabilitation and other fields, because it can reflect the active strength of muscles, it is easy to acquire and offers valuable information [4][5][6][7][8]. The kinetic model, as established by the Hill model in biomechanics, can describe the motion mechanism and process, but there are still problems, such as complicated calculations and human parameters measurement of increased difficulty [9]. Combining the human body's own bioelectrical information, such as myoelectric signals, with a machine learning method, as represented by the neural network approach, has achieved good results in muscle force and motion modeling, parameter identification and joint torque estimation [10][11][12]. The use of sEMG signals to estimate the continuous motion of human body has attracted high research interest.
For the estimation of motion, using the sEMG, the effectiveness of the method and the accuracy of the results need first to be considered. Neural networks, offering simple and direct model, are widely used in continuous motion estimation. A back propagation (BP) neural network is a kind of multi-layer feedforward neural network [13], which is derived from the adjustment rules of network weights by using a backward propagation learning algorithm. Zhang et al. used a BP neural network to estimate the joint angle of lower limbs, in normal people and patients with spinal cord injury [14]. Dai et al. estimated the ankle joint angle, through a general regression neural network (GRNN) [15]. In addition, the combination of principal component analysis (PCA), independent component analysis (ICA) and neural networks can be used to estimate the joint angle of the upper limbs [16]. Ding et al. performed continuous motion estimation, on multiple joints of upper limbs, using PCA and a high-order polynomial [17].
An important application of continuous joints motion estimation is in the motion control field of intelligent prosthetics and rehabilitation robots. Therefore, in addition to the accuracy of motion estimation, the real-time performance of the estimation algorithm is particularly important. On the one hand, during the feature extraction process of myoelectric signals, the high dimension of the data set is likely to lead to high complexity of the training model and a long training time. Therefore, it is important to find the low-dimensional data that best represents the characteristics of myoelectricity. The high correlation between the electromyographic features justifies that, some redundant sEMG features, with high correlation, be appropriately subtracted, thus improving the model training efficiency without affecting the accuracy. Practice has proved that PCA is a more practical dimension reduction method [18]. On the other hand, the learning algorithm, as represented by a BP neural network, reduces the error by gradient descent method, improving the accuracy, but falling into the local optimal solution is easy, while there is the problem of relatively long learning time. Therefore, while ensuring the validity of the method, reducing the training time of the model and avoiding falling into the local optimal solution, has become an issue of high research interest, in the field of neural networks and machine learning.
The extreme learning machine (ELM) is a new neural network algorithm, proposed by Huang, in 2004 [19]. ELM is a single hidden layer feedforward neural network. It analyzes only the output weight of the learning network, through one-step calculation. Compared to the classical BP neural network and support vector machine (SVM) [20], the ELM has significant improvement in learning speed and generalization ability, and is widely used in many fields such as face recognition [21][22][23][24]. For the complex problem of the online data collection and model training process, Liang et al. proposed online sequential extreme learning machine(OS-ELM) [25], which can effectively link the old and new training samples, while avoiding repeated training of old data. In the case of ELM, more hidden layer nodes are required, to compensate for the defects caused by random selection of hidden layer node parameters. Yang et al. proposed a two-way bidirectional extreme learning machine(B-ELM) [26], where the simulation results show that the convergence speed is high, the generalization ability is good and the structure is simple. Considering that, the traditional ELM is prone to over-fitting and affects generalization performance, some scholars have proposed a regularized extreme learning machine (RELM), which is more regular than the traditional ELM and more stable [27,28]. Abdu et al. proposed a hybrid feature extraction method with a RELM [29], which is used for accurate classification of brain tumors. The results show that this method is more efficient than the most advanced methods available. Zaineb et al. improved the ELM model via defining a recursive form [30]. Compared to the existing model, it is evident that the RELM model requires the least time in the learning phase and exhibits better performance.
Considering the requirements for effectiveness, accuracy and real-time continuous motion estimation, in terms of control, such as intelligent prosthesis and rehabilitation robot, this paper proposes a motion joint estimation method, based on sEMG information and PCA-RELM, taking the knee joint angle estimation as an example. The sEMG, collected during the movement of the lower limbs, is first dimensionally reduced by the principal component analysis method, while then the knee joint angle is estimated and verified by the RELM method.

sEMG Feature Extraction
The feature extraction of sEMG is usually divided into time domain analysis, frequency domain analysis, time-frequency domain analysis and nonlinear dynamics [31,32]. In the continuous motion estimation, the time domain analysis method is widely used, because of its simple calculation process. Therefore, the time domain features are used as the input features. The widely used time-domain analysis methods include mean absolute value (MAV), variance (VAR), zero crossings (ZC), logarithmic feature (Log), and waveform length (WL), etc. The equations for the EMG signal sequence x are shown as follows: (1) Mean absolute value: (2) Variance: As the mean of the EMG signal is close to zero, the above equations can be simplified as: (3) Zero crossings: In Equation (4), 1, 0; sgn( )= 0, 0 (4) Logarithmic feature: (5) Waveform length: In Equations (1)-(6), the sEMG sequence { } x is a sequence of collected samples that changes with time, where the window method is often used in actual analysis. Where, i x is the i-th sample point of the signal in each channel, x is the average of the signals in each channel and N is the time window length for each feature extraction. In this study, in order to accurately estimate the joint angle, the sEMG of multiple muscles, related to knee joint motion, was collected, while was simultaneously pretreated.

Principal Component Analysis
Principal component analysis is a widely used mathematical dimension reduction method [18]. The main steps are as follows: Step 1. Calculate the covariance and covariance matrix between each sample. Let the samples be 1 2 3 , , ..... , q T T T T q , where q is the number of samples. a T and b T are any of these samples (may be the same), while the covariance is defined as: where, T represents the mean value and n represents the length of the data, while their covariance matrices can be expressed as: Step 2. Calculate the eigenvectors and eigenvalues of the covariance matrix.
Then, the eigenvalues that are solved, are sorted according to the size from large to small.
The unit eigenvectors, corresponding to the eigenvalues, are respectively: Step 3. Calculate the principal component contribution rate and the cumulative contribution rate.
The variance contribution rate i a of the principal component can reflect the amount of information, described as: The number of principal components can be determined by the cumulative contribution rate, as: In practice, the eigenvalues, with cumulative contribution rates of 85%-95%, are generally selected.
Step 4. Calculate the main components and new features after dimensionality reduction. The selected feature vector i e is integrated with the original data set, while the new data set i x is obtained as the i-th principal component: The first n principal components are selected as the new features, after dimensionality reduction, which will be used as the input layer variables to the regularization overrun learning machine.

Regularized Extreme Learning Machine
The regularized extreme learning machine (RELM) has been widely used, due to its simple structure and fast training [19]. However, when the number of nodes in the hidden layer is too large, over-fitting is easy to occur, reducing its generalization performance. To this end, the improved RELM model [27] is adopted in this paper. The RELM structure, as illustrated in Figure 1, comprises an input layer, a hidden layer and an output layer, wherein all neurons between the layers are fully connected. , , n l m each represent the number of neurons in the input layer, the hidden layer, and the output layer, respectively.
represent the input and output samples of the RELM training, while the output function can be expressed as: where, i ω is the weight vector of the input layer and the i-th hidden layer neuron, i β is the weight vector of the i-th hidden layer neuron and the output layer, while i b is the threshold of the i-th hidden layer neuron. Abbreviating Equation (16) into a matrix form expression, leads to: where, is represented as the hidden layer output matrix.
According to Bartlett's theory [33], when the norm of training error and output weight are lower, the generalization is better. For this reason, the solution objective function of the network is: where, C is the regularization coefficient, β ω is sum of the training error, where, α is a Lagrangian operator. Deriving partial derivatives of the Equation (19): The output weight matrix can be solved by Equation (20), while the fitted regression model of RELM is obtained, as: Introducing T HH in 1/C will lead to better generalization performance.

Experiment Process
The surface electromyography (sEMG) is used to estimate the knee joint angle. The experimental and analytical procedures are shown in Figure 2. The main steps are: acquisition of myoelectric and knee joint angle signals, pretreatment and feature extraction of myoelectric signal, PCA reduction of electromyographic feature. Dimensional, electromyographic and knee angle normalization, regularized extreme learning machine model training and testing and error analysis.

sEMG Signal Acquisition
In the experiments, 8 healthy men (age range: 24 ± 1.6 years old, height range: 173.4 ± 3.5 cm, body weight range: 68.0 ± 6.4 kg, no physical and mental diseases) were selected for the experiment. The external environment was kept relatively quiet, to eliminate the influence of external interference factors on the experimental results. In the subsequent data collection and analysis discussion, taking into account the individual differences between different people, when grouping experimental data, the data are grouped per participant, while the groups are sequentially recorded as G1 to G8 for eight subjects.
During the experiment, the subject sat quietly in a 0.8 m high chair with the thigh parallel to the horizontal plane and fixed. The knee joint flexed and stretched at a certain frequency, including lifting the leg and closing the leg. The whole action cycle is 2 s and each group is collected for 30 s, while each experiment is performed 5 times. At the beginning of the experiment, after the subjects were stabilized, the data was recorded again. In this paper, the sEMG signal is collected by Trigno (Delsys Inc,USA), while the sampling frequency is 2000 Hz.
The muscles of the knee joint are composed of the knee extension muscles and the knee flexion-rotating muscles, which play the roles of extension and flexion rotations, respectively [34]. During the exercise of the knee joint, the knee extensors, which are mainly involved, include the medial femoral muscle, the rectus femoris muscle and the lateral femoral muscle. The knee flexion-rotating muscles include the biceps femoris, the semitendinosus and the gastrocnemius muscle. The position of the myoelectric sensor is shown in Figure 3. The sensor number and the position of the muscle are listed in Table 1. To prevent muscle fatigue from affecting the accuracy of the experiment, the participants rest for 2 min after each test.  In the experiments, raw sEMG signal from six muscles (M1 to M6) is illustrated in Figure 4. It can be seen that in the acquisition process, the collected signal is mixed with noise, which is mainly caused by sensors, environment and other factors. In order to improve the signal-to-noise ratio of the sEMG signals and reduce the effect of noise on the experimental results, a Butterworth filter is used for noise elimination [17,35], that is, firstly the acquired sEMG signal is filtered by high pass filter, then the average value is processed, and finally the low-pass filter is used.    In this context, the obtained joint angle signal θ will be the output signal Y of the RELM model.

EMG Signal Feature Dimension Reduction
A time domain feature extraction is performed on the acquired and denoised sEMG. The time window, in the calculation, is set to 100 ms, that is, the number of sample points in the time window is 200, while the time windows do not overlap each other. In order to select the most suitable myoelectric characteristics, the first five-time domain features are extracted, namely MAV, VAR, ZC, Log, WL. Then, using the PCA method, each sEMG feature is dimensionally reduced, while the aim of accurately estimating the knee joint angle, using less data amount, is achieved.
As an example in Figure 6, the mean absolute value (MAV) of the myoelectric signal is calculated after PCA dimension reduction percentage proportion of each branch, the composition of the first four groups are 85.88%, 10.45%, 2.52%, 0.82%, which covers 99.97% of the whole data set, so the front four principal component is enough on behalf of the entire data sets, and has reached to replace the original characteristics of the corresponding requirements [18,36]. In the same way, VAR, ZC, Log and WL are dimensionally reduced, while the first four groups are taken as the new eigenvalues.

Regularization Overrun Learning Machine Model Training
When the myoelectric characteristics, after PCA dimensionality reduction, as well as the knee joint angle, as measured by the three-dimensional motion capture system, are normalized, the myoelectric characteristics were used as the input layer of the RELM model, while the knee joint angle was used as the output layer. The number of hidden layers was set to 100. In order to maintain the reliability and stability of the results, this paper used the cross-validation method. According to the method presented in [37] and the characteristics of sEMG, the electromyographic feature of 30 s was divided into 3 sets with knee angle of each 10 s in experiment, among which 2 of them were selected as training data in turn, and the remaining 1 set was used as test data. The estimated angle of the knee joint was inversely normalized, compared to the real angle, while the average error was also calculated and compared with results of SVM [38] and BP neural network [14]. The data were calculated on a HP notebook computer with CPU of i5-2410 M, 2.30 GHz and memory RAM of 6 GB.

Results and Discussion
In order to compare the differences between different features and methods, this paper used root mean square error (RMSE) and the Pearson correlation coefficient ρ as key performance indicators (KPIs). Wherein, the RMSE indicates the square root of the deviation, between the estimated value and the true value, while the square root of the observation No n, which can well reflect the precision of the estimation, is calculated as follows: In addition, the Pearson correlation coefficient ρ reflects the strength of the relationship between the two distance variables, while its value range is (−1, 1). When The angle, as measured by the three-dimensional motion capture system, is called the real angle. The angle, as estimated by the algorithm, is called the estimated angle. i ′ θ is the knee joint angle, as estimated by the i time algorithm, while ′ θ is the mean value of the knee joint estimated angle. i θ is the true value, measured by the three-dimensional motion capture system, at time i, while θ is the mean value of the true angle of the knee joint.
Next, the error analysis of different features is carried out, to compare the influence of different features on the estimation accuracy. Taking the G1 group as an example, Figure 7 shows the results of different feature prediction models in one of the experiments. The model is uniformly trained, using the same RELM. Figure 7a-e use the MAV, VAR, ZC, Log and WL, respectively, as features to train the model. The blue colored segmented lines represent the curves predicted by the RELM model, along with their respective characteristics. The solid red lines represent the curve of the true knee joint angle, during the motion. The horizontal axis is the test time and the vertical axis is the joint angle.  Figure 7 shows that the curve, as predicted by the model of the absolute value and the logarithm, is closer to the true value, while the curve, as predicted by the variance and the zero-crossing point, is larger, while the effect of the waveform length feature is general.
The corresponding RMSE and correlation coefficient are shown in Figure 8, where it is evident that the RMSE of MAV, VAR, ZC, Log and WL are 7.113, 12.840, 13.354, 9.708 and 12.600, respectively, while the correlation coefficients are 0.9637, 0.9128, 0.8842, 0.9417 and 0.8928, respectively. Based on a comprehensive comparison of the above results, the absolute value of the mean was finally selected as the characteristic of the model. Next, the analysis results of the PCA-RELM method were compared to the traditional BP neural network and SVM estimation results. Figure 9 illustrates the data of G1, under knee flexion and extension, where the horizontal axis represents the test time and the vertical axis represents the angle of the knee joint, during the exercise. The solid red line indicates the true angle value, the blue segmented line indicates the knee joint angle, estimated by the BP neural network, the brown dotted line indicates the KVM estimated knee joint angle, while the green dot line indicates the RELM estimated knee joint angle. By comparison, it was derived that the estimated values of RELM and SVM were closer to the true value, while the model appeared more stable. The error analysis of the knee joint angle estimation is shown in Table 2, as it represents the average of five experiments per person. In this paper, RMSE and correlation coefficient were used as the indicators of error analysis. This index is similar to the one described in literature [4,14]. When the root mean square value is lower and the correlation coefficient is closer to 1, it indicates that the tightness of the two sets of data is higher. Table 2 shows that the RMSE of the RELM and SVM prediction data was smaller than predicted by the BP neural network, while the correlation coefficient of the RELM and SVM prediction data was closer to one and the RELM was similar to the SVM, in accuracy. Furthermore, regarding the model training time, the RELM training time was the shortest, the SVM was the second shortest, while the BP required the longest. By comparison, it can be found that the training time of the RELM was about 1% of the BP neural network. This is so, because RELM is a single hidden layer feedforward neural network. As such, it only analyzes the output weight of the learning network, through one-step calculation, without iteration, while it has the advantage of short learning time and high generalization performance. At the same time, the traditional BP neural network requires multiple iterations, to correct the weight and threshold, because of the gradient descent method, which makes the training speed slow. In practical applications, the BP neural network is easy to fall into the local minimum point and produce suboptimal solution of learning. Therefore, RELM is more suitable for knee joint angle estimation, during exercise.

Conclusions
Accuracy and real-time performance are important prerequisites for continuous motion estimation. This paper proposes a PCA-RELM algorithm that uses sEMG signals to continuously estimate the knee joint angle, while it uses RMSE, correlation coefficient and model training time as indicators. Compared to traditional BP neural network and SVM, the experimental results show that the RMSE and correlation coefficient of RELM and SVM have certain similarities. The BP neural network is slightly different from the other two. Regarding training time, the RELM model requires the shortest training time, about 2-3 times faster than SVM, while two orders of magnitude higher than the requirement of the BP neural network. The presented results have certain application value for real-time identification and control of lower limb movement.