Two-wheeled balancing robot
Photo by rawpixel on UnsplashThe internal and external PID dual control loops of the motor, of which the internal control loop: the PID position loop calculated by the AB phase of the Hall encoder; External control loop: the deviation steering loop of the Gyro angle.