## 2 Estimation of Joint Motion Intention Based on sEMG
### Joint Angle Prediction Based on LSSVM  
This study proposed using machine learning to build a mapping model to complete the continuous motion regression estimation. The least-squares support vector machine (LSSVM) replaces the traditional support vector machine and maps the original data to a high-dimensional feature space to achieve linear regression [25; 26]. The data set is transformed from the current space to the high-dimensional feature space through the nonlinear function \(\varphi(x)\), that is  
\[\varphi(x_{i})=(\phi(x_{1}),\phi(x_{2}),\ldots,\phi(x_{n})) \tag{10}\]  
where \(\varphi(\times_{i})\) is the ith group of eigenvalues of the input joint angle prediction model and \(\phi(\times_{1})\), \(\phi(\times_{2}),\cdots\phi(\times_{n})\) are the n elements that constitute the input.  
The loss function of the optimal problem (calculation formula for structural risk) is  
\[\min J(U,e)=\min(\frac{1}{2}U^{T}U+C{\sum\limits_{i=1}^{n}{e_{i}}^{2}}) \tag{11}\]  
where \(U\) is the support vector machine weight space; \(e_{i}\) is the allowable error between the predicted value and the actual value; and \(C\) is the penalty term coefficient (normalization parameter), which is used to adjust the model structure.  
The loss function of the optimization problem used to construct the regression model of the least square method is  
\[y_{i}=U^{T}\varphi(x_{i})+b+e_{i}i=1,2,\ldots,n \tag{12}\]  
where \(y_{i}\) is the output label corresponding to the ith group of eigenvalues and b is the intercept term coefficient.  
The Lagrange multiplier method was used to transforms (11) and (12) into  
\[L(U,b,e_{i},\alpha)=J(U,e)-\sum\limits_{i=1}^{n}{\alpha_{i}(U^{T}\varphi(x_{ i})+b-y_{i})} \tag{13}\]  
where \(\alpha=[\alpha_{1},\alpha_{2},\ldots\alpha_{n}]\) is Lagrange multiplier coefficient.  
Taking the partial derivatives of \(U,\ \varphi,\ e_{i},\ and\ b\) based on Karush-Kuhn-Tucker (KKT) rules gave  
\[\left\{\begin{array}{l}\frac{\delta L}{\delta L}=0\\ \frac{\delta L}{\delta L}=0\\ \frac{\delta L}{\delta a}=0\\ \frac{\delta L}{\delta c_{i}}=0\end{array}\right.\rightarrow\left\{\begin{array} []{l}U=\sum\limits_{i=1}^{n}\alpha_{i}\varphi(x)\\ \sum\limits_{i=1}^{n}\alpha_{i}=0\\ y_{i}=U^{T}\varphi(x_{i})+b+e_{i}\\ \alpha_{i}=Ce_{i}\end{array}\right. \tag{14}\]  
The model parameters could be obtained by converting the above formula into a linear equation system:  
\[\left[\begin{array}{cccc}0&1&1&1&1\\ 1&K(x_{1},x_{1})+\frac{1}{2\mathcal{C}}&K(x_{1},x_{2})&\cdots&K(x_{1},x_{n})\\ 1&K(x_{2},x_{1})&K(x_{2},x_{1})+\frac{1}{2\mathcal{C}}&\cdots&K(x_{2},x_{n})\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ 1&K(x_{n},x_{1})&K(x_{n},x_{2})&\cdots&K(x_{n},x_{n})+\frac{1}{2\mathcal{C}} \end{array}\right]\left[\begin{array}{c}b\\ \alpha_{1}\\ \alpha_{2}\\ \vdots\\ \alpha_{n}\end{array}\right]=\left[\begin{array}{c}0\\ y_{1}\\ y_{2}\\ \vdots\\ y_{n}\end{array}\right] \tag{15}\]  
Equation (15) could be simplified to  
\[\delta_{N}=\left[\begin{array}{cc}0&H^{T}\\ H&\Omega+C^{-1}I\end{array}\right]Y_{N} \tag{16}\]  
where \(\delta_{N}=\left[b,\alpha_{1},..,\alpha_{N}\right]^{T}\) are the model parameters, \(H=\left[1,1,\ldots,1\right]^{T}\), and \(Y_{N}=\left[0,y_{1},y_{2},\ldots,y_{n}\right]^{T}\).  
The kernel function of the LSSVM algorithm satisfies the Mercer condition, which is  
\[\Omega_{i,j}=\varphi(x_{i})\varphi(x_{j})=K(x_{i},x_{j})\ i,j=1,2,\ldots,N \tag{17}\]  
where \(K\) is the kernel function, which represents the inner product between each element in the high-dimensional feature space.  
The Gaussian kernel function selected in this study was  
\[K(x,x_{i})=\exp\left(\frac{-\|x-x_{i}\|^{2}}{2\sigma^{2}}\right) \tag{18}\]  
Thus, the estimated angle \(y\) for the new output vector \(x\) was  
\[\hat{y}=\sum\limits_{i=1}^{N}\alpha_{i}K(x,x_{i})+b \tag{19}\]