Jinming Yao, Jiahang Yang, Chunxu Li
Robust trajectory tracking is a fundamental requirement for underwater robotic manipulators operating in disturbed marine environments. However, hydrodynamic damping, added mass, buoyancy effects, multi-joint coupling, and external ocean-current disturbances can significantly degrade joint tracking accuracy and control stability. To address this problem, this paper proposes an improved particle swarm optimization-based PID (IPSO-PID) control framework for robust trajectory tracking of a 6-DOF underwater manipulator. A UR5-type underwater manipulator is modeled using the D-H parameter method, while its dynamic behavior is formulated based on the Lagrange method. To represent underwater environmental effects, the Morison equation is introduced to describe fluid drag and added-mass forces, and a compound ocean-current disturbance model consisting of a constant bias load and a low-frequency periodic component is further constructed. In the control framework, the standard PSO algorithm is improved by incorporating a linearly decreasing inertia weight and adaptive learning factors, thereby enhancing global exploration in the early optimization stage and local convergence in the later stage. A comprehensive fitness function is designed by jointly considering trajectory tracking error, error convergence behavior, and control effort, enabling coordinated optimization of the PID parameters for all six joints. Comparative simulations are conducted in MATLAB/Simulink using conventional PID, fuzzy PID, standard PSO-PID, and the proposed IPSO-PID controller. The results show that the proposed controller achieves better tracking accuracy and stronger disturbance rejection capability than the comparison methods. Under compound ocean-current disturbance, the overall mean absolute error across all six joints is reduced from approximately 0.0044 rad with the conventional PID controller to approximately 0.0014 rad with the IPSO-PID controller, corresponding to a reduction of about 68.2%. These results indicate that the proposed control framework can effectively improve the stability and robustness of underwater manipulator trajectory tracking, providing a feasible solution for underwater robotic tasks such as inspection, grasping, maintenance, and marine intervention.