This paper proposes a solution based on the particle swarm optimization algorithm to address the issue of Proportional Integral Derivative parameter selection in the motion control of a two-wheel differential car. The mathematical motion model is established based on the driving principle of a two-wheel differential car. The transfer function of the DC motor is derived in detail, based on Kirchhoff’s law and the Laplace transform. The pose renewal equation and error renewal equation of the car are based on the mathematical motion model. Finally, a numerical simulation and experimental analysis were conducted using MATLAB R2022a, Simulink 9.1 (part of R2018a), VOFA 1.3.10 software, an STM32 microcontroller, an L298N driver chip, and other hardware components. The results indicate that the particle swarm optimization algorithm enables the rapid acquisition of optimal Proportional Integral Derivative parameters. The optimized parameter of the motor speed convergence time is set to 10 ms, with an overshoot of 1 r/min and an enhanced anti-interference ability. The optimized parameters effectively regulate the car’s motion, ensuring a maximum error control of approximately 0.003 m.
Read full abstract