Lego Football

NXT robot diagram In this project, the objective was to enable a Lego NXT robot to stand on two wheels and move to play soccer. The first step taken was to model the dynamics of the robot using a series of differential equations. After linearization around the desired vertical position of the robot, a control loop was implemented to stabilize this position.

Control loop for balancing the robot on two wheels

The innermost loop provides stabilization for the pitch angle of the robot, allowing it to self stabilize. The outer loop provides stabilization for the wheel angles, allowing the robot to move forward or backward depending on a desired location. The yaw angle was also considered in a separate control loop not shown. The gains for the controllers were selected using the root locus method.

Lego robot on the pitch

After deployment of the model on the Lego NXT, values were tweaked to first reduce the amount of oscillation while stationary (caused by having too large of a gain on the pitch angle controller) and then to enable the robot to move faster. Our robot ended up scoring the first goal of the competition and was one of the best seen in the 3 years of the project!