This benchmarks aims at developing a computer program that controls a wheeled robot to keep a pendulum in equilibrium as long as possible. The programming language is Python and the robot model is an e-puck robot. During the simulation some random perturbation force is applied to the pendulum.
The benchmark metric t is the elapsed time since the start of the simulation, the highest value being the best. The time measurement will stop as soon as the pendulum falls down. The F value displays the last amount of perturbation force in newtons that was applied to the pendulum. This force value will linearly increase with time.
The sample Python program controlling the e-puck robot, uses a PID controller to set the speed of the wheels:
# PID control integral = integral + (position + previous_position) * 0.5 / timestep derivative = (position - previous_position) / timestep speed = KP * position + KI * integral + KD * derivative
The values of the PID coefficients KP, KI, and KD can be tuned to improve the pendulum stability and achieve a better result.
Alternatively, it is also possible to improve the result by using more complex algorithm for example based on the derived equations of the motion of the inverted pendulum.
Configuration of the system: