Abstract:In order to realize the real-time trajectory tracking control of the position and attitude of the robotic fish, a double closed-loop control algorithm is designed by taking the attitude control as the inner loop and the position control as the outer loop. The convergence rate of the inner loop is faster than that of the outer loop by using the sliding mode controller to ensure the overall stability of the closed-loop control system. The Lyapunov stability theorem proves that the position and attitude double closed-loop control system of robotic fish is asymptotically stable. The simulation results show that the method can effectively control the robot fish to track the vertical trajectory in real time; in the experiment, the robot fish takes 12 s to complete the preset movement, and the maximum error and average error of the trajectory are 0.078 m and 0.052 m, respectively, which verifies the effectiveness and efficiency of the double closed-loop algorithm in the trajectory tracking control of robot fish.