Exploring Mobile Robot Kinematics, Dynamics, and Controls
Here we will explore the field of kinematics, dynamics, and controls with the BeetleBot, a mobile robot developed for an autonomous vehicle competition. Topics include dynamic orientation control during aerial jumps, “segway” two-wheel balancing control, and implementation of these concepts on the mobile robot hardware.
As we were playing with the robot and seeing its capabilities as a platform, we started thinking about what other interesting dynamic behaviors we could accomplish. When searching through the literature to see what recent research people had done with dynamic mobile robots, we were inspired by work out of the kodLab at UPenn. They used a tail as an inertial reaction wheel to re-orient a mobile robot to a desired orientation during flight, as seen in the following video:
We thought this was really cool, but that maybe the tail itself was unnecessary. We decided to try to accomplish the same thing, but instead of using a tail we would using the driving wheels themselves as the inertial reaction wheel. We were initially unsure if our motors could output the torque necessary to actually do this in a reasonable amount of time, even through simulation showed that it would, so we ran a quick drop test, shown here:
These initial tests looked promising, so we derived and implemented a full state feedback controller to regulate the robot’s orientation around a nominal position.
No Orientation Control
Orientation Control Enabled – Regulating around Horizontal
Following the successful implementation of orientation control for aerial dynamics, the goal shifted to deriving a controller to navigate the Beetlebot as a “Segway” or two-wheeled, self-balancing vehicle. Initially, a cart-pole model was assumed to derive the dynamics model and subsequent LQR controller.
The dynamics of the cart pole system is determined by evaluating the system using Lagrangian Mechanics. The Lagrangian of the cart pole system uses the general energy equation L = T – V where L is the Lagrangian term generalizing the total energy in the system, T is the kinetic energy of the system, and V is the potential energy of the system. The kinetic energy of the system is represented by:
The following values for the masses and length were taken from a detailed Solidworks model of the Beetlebot with:
Mass Cart = Mass of Powered Wheels
Mass Pole = Mass Beetlebot – Mass of Powered Wheels
Length Pole = Length from Powered Wheel Axis to Center of Mass of Robot
The potential energy of the system is represented by the potential energy of the pole.
These dynamics need to be linearized in order to implement a linear controller. Linearization is achieved by computing the Jacobian in MATLAB and then inserting the resulting equations into state space form:
After finding these linearized dynamics around the nominal operating point (X=0), it was straightforward to derive an full state feedback LQR controller in Matlab.
Here is a video of the LQR controller implemented on the actual BeetleBot hardware. This LQR controller was tuned with high costs on the theta state, but low costs on robot position. The behavior is as expected with this cost function, where the the robot is very stable to theta disturbances such as kicking, but does not track its position very well.
In contrast, when we put a high penalty on the robot’s pose (x,y, yaw), the robot is less robust to theta disturbances, but can track pose commands relatively well. In this video we are giving forward/backward and left/right commands to the robot from a laptop keyboard, and it can be seen that BeetleBot is following these commands correctly.
Now that we had developed controller for aerial re-orientation and 3DOF segway balancing, we wanted to combine all of these dynamic motions into one demonstration. Unfortunately we were unable to implement this on the BeetleBot hardware due to time constraints, but we were able to prove the feasibility of such a combination in simulation. In the following video it can be seen that Beetlebot is balancing as a segway off a ramp, then using orientation control in the air to keep itself vertical, and then landing and balancing again as a segway.
In reality our hardware was not designed to take these kinds of impact loads on only two wheels. During testing of this controller we started breaking parts, and thus halted further testing to save the robot from destruction. Here is a video demonstrating the harsh impact loads the robot was experiencing during these tests:
We hope that future iterations of the BeetleBot will be more mechanically robust, permitting us to fully implement more dynamic controllers. In the meantime, here is a video of BeetleBot doing some celebratory donuts:
Here is a link to a github repository with arduino code used, all matlab simulation files, and matlab kalman filter derivation code.