## 1 Introduction
For example, the genetic algorithm requires more computing resources and time, while the particle swarm optimization algorithm is easy to fall into the local optimal solution when the search space is large. Therefore, in this paper, the Sequential Quadratic Programming (SQP) algorithm is selected to optimize the robot's redundant DOF [26]. SQP is an iterative algorithm based on optimization theory, which can find the global optimal solution in complex nonlinear optimization problems. Compared with other optimization algorithms, the SQP algorithm has efficient and reliable optimization performance, and it is suitable for the optimization model in this paper. Therefore, the Redundancy Optimization for Minimum Joint trajectory method (ROMJ) and Redundancy Optimization for Minimum Joint trajectory considering the joint Load method (ROMJ-L), which are the global optimal robot joint trajectory planning methods, are proposed in this paper. The ROMJ method combines with the feature that the tool's tip should strictly follow the planned trajectory, but the tool axis vector only needs to be limited to a certain range when processing surface by a ball end milling cutter. The robot joint trajectory is taken as the optimization objective. The optimization model is established by combining the tool pose and joint limit constraints with the optimization objective. ROMJ-L method is based on the ROMJ method, which considers different joint loads. Load coefficients are introduced to redesign the optimization objective of the ROMJ method. Before optimization, parametric curves are discretized according to the error between chord length and arc length to reduce the amount of data and shorten the processing time. Finally, SQP in the MATLAB toolbox is used to search for the optimal trajectory, and the given tool axis vector is optimized to meet the requirements of processing technology. Compared with the traditional methods to optimize the redundant DOF of 6-DOF robots, the innovation of these methods is that the traditional method to optimize the redundant DOF of 6-axis robots mainly focuses on the posture of the end of the robot so as to achieve better motion trajectory and precision control. The methods proposed in this paper take the trajectory of robot joints as the optimization objective and realizes smoother and more efficient robot motion control by optimizing the motion of each joint. In addition, the load of each joint is also taken as a reference factor for optimization. The trajectory of each joint is weighted so as to achieve a more stable and reliable robot motion control. The structure of this paper is as follows: Section 2 introduces a method for selecting trajectory points based on the error between linear and curvilinear distances is developed. In Section 3, the kinematics model of the robot is established. Section 4 provides the definition and expression of optimization variables, optimization objectives, and constraints of ROMJ and ROMJ-L models. Section 5 introduces how to choose initial value optimization, build the optimization model and explain the principle of SQP. In Section 6, the butterfly curve is used to verify that the methods(ROMJ and ROMJ-L) are feasible. Finally, the conclusion is drawn in Section 7.