# Analysis and Simulation of Polishing Robot Operation Trajectory Planning
## 2 Materials and Methods
### Spiral Arc Trajectory Planning of Quintic Polynomial Interpolation Algorithm  
Polynomial interpolation algorithms are frequently applied in trajectory planning, especially in robotics and other fields requiring smooth and precise path control. As the degree of the polynomial increases, the interpolation curve can approximate given data points more accurately, but this also introduces higher computational complexity and potential numerical instability. The quintic polynomial interpolation algorithm is a commonly used method in robot trajectory planning, as it can maintain trajectory smoothness and accuracy while relatively balancing computational complexity. It is particularly suited for planning robotic joint trajectories with continuous position, velocity, acceleration, and jerk (rate of change in acceleration), ensuring a smoother and more controlled movement. This complex algorithm utilizes the ability of polynomial functions to effectively model the complex relationship between joint displacement and time. By uniquely determining the coefficients of the polynomial based on specified boundary conditions, including the initial and final positions, velocities, and accelerations of the joint, corresponding trajectory plans can be tailored to the specific requirements of the robot and its tasks. In the context of the quintic polynomial approach, the relationship between the joint displacement (which represents the change in position or angle of a particular joint over time) and time is expressed mathematically through a polynomial equation of the fifth degree. This equation encapsulates not just the instantaneous position of the joint at any given time but also its rate of change (i.e., velocity) and acceleration, which is beneficial to understanding the movement of the joint in its entire trajectory. Figure 5: The waveforms of displacement, velocity, and acceleration for each joint. (**a**) Simulation curves of each joint displacement. (**b**) Simulation graphs for the velocity of each joint. (**c**) The acceleration simulation graphs for each joint. In the five-degree polynomial algorithm, the relationship between joint displacement and time is as follows:  
\[\theta(t)=a_{0}+a_{1}t+a_{2}t^{2}+a_{3}t^{3}+a_{4}t^{4}+a_{5}t^{5} \tag{21}\]  
For the motion trajectory of this design, for each node, only the first node, namely the time \(t_{0}\) of the starting point, is zero, and the time \(t_{0}\) of the other nodes is not zero. Therefore, the following equation can be obtained:  
\[\left\{ \begin{array}{l}\theta(0)=\theta_{0}=a_{0}+a_{1}t_{0}+a_{2}t_{0}^{2}+ a_{3}t_{0}^{3}+a_{4}t_{0}^{4}+a_{5}t_{0}^{5}\\ \theta(f)=\theta_{f}=a_{0}+a_{1}t_{f}+a_{2}t_{f}^{2}+a_{3}t_{f}^{3}+a_{4}t_{f}^ {4}+a_{5}t_{f}^{5}\\ \overset{\bullet}{\theta}(0)=\overset{\bullet}{\theta}(0)=a_{1}+2a_{2}t_{0}+3 a_{3}t_{0}^{2}+4a_{4}t_{0}^{3}+5a_{5}t_{0}^{4}\\ \overset{\bullet}{\theta}(f)=\overset{\bullet}{\theta_{f}}=a_{1}+2a_{2}t_{f}+3 a_{3}t_{f}^{2}+a_{4}a_{f}^{3}+5a_{5}t_{f}^{4}\\ \overset{\bullet\bullet}{\theta}(0)=\overset{\bullet\bullet}{\theta_{0}}=2a_{2 }+6a_{3}t_{0}+12a_{4}t_{0}^{2}+20a_{5}t_{0}^{3}\\ \overset{\bullet\bullet}{\theta}(f)=\overset{\bullet\bullet}{\theta_{f}}=2a_{2 }+6a_{3}t_{f}+12a_{4}t_{f}^{2}+20a_{5}t_{f}^{3}\\ \end{array} \right. \tag{22}\]  
In the equations, \(\theta(0),\overset{\bullet}{\theta}(0),\overset{\bullet\bullet}{\theta}(0)\) and \(\theta(f),\overset{\bullet}{\theta}(f),\overset{\bullet\bullet}{\theta}(f)\), respectively, represent the joint angle, angular velocity, and angular acceleration at the starting moment and ending moment. By computational solving, the values of polynomial coefficients \(a_{0}\), \(a_{1}\), \(a_{2}\), \(a_{3}\), \(a_{4}\), and \(a_{5}\) can be obtained. Figure 6 shows the trajectory plots for each joint of the robot, achieved using the quintic polynomial interpolation algorithm.