This thesis presents the design and construction of a self-balancing robot. A self-balancing robot is a robot, which actively balances itself on two wheels using a control algorithm and with the use of two actuators, an inertial measurement unit, encoders, and a microcontroller. The thesis discusses the theoretical model of inverted pendulum as a basis for deriving the equations of motion of the robot. The thesis also discusses the theoretical basics of the chosen components and the proportional-integral-derivative (PID) control algorithm used for the balancing of the robot. The algorithm is recieving feedback data of the robots speed from rotary encoders and feedback of the robots angular position from inertial measurement unit. The torque needed for correcting the error is applied by two actuators and uses a pulse-width modulated (PWM) signal calculated by the control algorithm. The communication with peripheral components and the control algorithm were realised using an Arduino microcontroller. The dependency of the different PID coefficients on the balancing was tested when driving in a straight line as well as when adding a disturbance in the form of driving terrain angle change. The tests with the optimal PID coefficients confirmed that the robot is successfully balancing in both tests.
|