Abstract
A two-wheeled self-balancing vehicle with dual closed-loop PID control was designed.The system uses Arduino Mega2560 single-chip microcomputer as the main control chip and MPU-6050 gyroscope accelerometer sensor to collect vehicle body angle and angular velocity data in real time.The interference is suppressed through complementary filtering algorithm.The upright running control of the car body adopts negative feedback PD control,and the body speed control adopts positive feedback PI control.The main control chip of the balance car changes the motor speed by controlling the motor drive module L298N to adjust the duty cycle of the PWM output.According to the Ziegler-Nichols tuning formula,the initial parameters of PID are obtained,and the PID algorithm model is constructed using simulink and simulated.The simulation results show that the dual closed-loop PID control algorithm used in this paper has good dynamic performance and good anti-interference ability.The results of the physical debugging of the balance car have achieved the goal of the balance car′s upright and balanced operation.
|