摘要:In this article was presented an auto calibration algorithm based on a two-step regulator and gyroscope readings. Unable to use PID, as the PWM signal causes the motors to overheat, it was decided to introduce a two-step algorithm. This type of controller reaches the setpoint much faster, though an error is present. Gyroscope is used to sample angular speed and then integrate these values to get the angle. To calibrate the offsets the robot performs a calibration run during which it measures and averages the error on each gyroscope axis while no movement is present. Afterwards it makes a characteristics of braking angle and angular speed. Interpolated polynomial from 13 samples allows to designate the point in time where the braking has to start to achieve the desired angle. The calibration aims for adjusting the parameters of movement depending on the surface it runs on. Additional check is made using encoders to estimate the accuracy of gyroscope output.