# Kinematics Model Optimization Algorithm for Six Degrees of Freedom Parallel Platform
## 2 Materials and Methods
### Kinematics forward Solution Algorithm Based on Multivariate Polynomial Regression  
Through the analysis of the solution process of the [PERSON] iterative algorithm, it is not difficult to find that this method requires multiple iterations, and each iteration needs to complete the 6-order Jacobian matrix inversion operation. Therefore, the [PERSON] iterative algorithm has a huge amount of calculation when solving the forward kinematics solution of the parallel platform. It has a great influence on the real-time performance of the parallel platform control system. In addition, the convergence of [PERSON]'s iterative method is also affected by the selection of initial values. A poor initial value will further increase the number of iterations of the kinematics positive solution of the [PERSON] iterative algorithm and even fail to converge in extreme cases. In order to improve the real-time performance of the control system, this paper proposes a kinematics forward solution algorithm based on MPR [26]. Polynomial regression is a type of regression analysis in statistics. The expression form of a polynomial of degree, n, is shown in Equation (15):  
\[y=a_{0}+a_{1}x+a_{2}x^{2}+a_{3}x^{3}+\cdots\cdots+a_{n}x^{n} \tag{15}\]  
In Equation (15), \(a_{0},a_{1},\cdots\cdots a_{n}\) are all constant values. According to the Weierstrass polynomial approximation theorem, any continuous function, \(f(x)\), on the closed interval \([a,b]\) can be expressed as a uniformly convergent limit of a polynomial sequence \(\{f_{n}(x)\}\)[27]. To have an intuitive understanding of this theoretical thought, in MATLAB, use the cubic polynomial regression curve and the quintic polynomial regression curve to approximate the sin function curve; the effect is shown in Figure 3.  
It can be seen from Figure 3 that the fitting error of the fitted curve to the discrete sin data points decreases significantly as the polynomial degree increases. In line with the theoretical basis of polynomial regression, based on the theoretical basis of polynomial regression, this paper proposes to use the MPR method to complete the approximation of the forward solution operator of parallel platform kinematics. Then we propose using the obtained approximation function to complete the numerical solution of the kinematics forward solution. From the spatial geometric model of the parallel platform, it can be seen that the relationship between the moving platform and each group of manipulators is a continuous change. It meets the requirements of the continuous function in the theorem. After the working range is limited to the closed sub-range reachable by the parallel platform, the establishment condition of the polynomial approximation theorem can be fully satisfied. Take the six-variable cubic polynomial regression algorithm as an example [28]. According to the input-output relationship of the kinematics positive solution of the parallel platform, the six-dimensional cubic polynomial can be expressed as Equation (16):  
\[X=\sum_{i=1}^{6}\sum_{j=1}^{6}\sum_{k=1}^{6}A_{ijk}l_{i}j_{k}+\sum_{m=1}^{6} \sum_{n=1}^{6}B_{mn}l_{m}l_{n}+\sum_{p=1}^{6}C_{p}l_{p}+D \tag{16}\]In Equation (16), \(X\) is the posture to be solved in a certain dimension; \(l_{i}\) represents the length of the input i-th group of robotic arms; \(A_{ijk}\), \(B_{mn}\), \(C_{p}\), and \(D\) are the polynomial coefficients to be solved; \(A_{ijk}\) is the cubic coefficient of \(l_{i}\); \(B_{mn}\) is the quadratic term coefficient of \(l_{i}\); \(C_{p}\) is the coefficient of the linear term of \(l_{i}\); and \(D\) is the constant coefficient. In order to improve the efficiency of the MPR algorithm, the MPR algorithm is completed by offline training + online calculation. The offline training process is the process of solving the polynomial regression coefficients. It can be seen from Equation (16) that, for each degree of freedom of the parallel platform, there are \(6^{3}+6^{2}+6+1=259\) polynomial coefficients to be solved in the hexagram cubic polynomial.