Self-balancing robot keeps things on the straight and narrow

[James] designed a digital controller in MatLab, but he really wanted to see if it would work in a real-world application. To test out his linear quadratic regulator design, he decided to build a self-balancing robot. His goal was to built a robot that can keep its balance even when external forces are applied, all while staying in the same place.

Balancing on a pair of wheels is not all that simple, so his LQR controller allows him to weight the bot’s priorities towards keeping balance, focusing on returning to its starting position once equilibrium has been achieved. The results are pretty impressive as you can see in the videos below. The robot is easily able to attain its balance once powered on, and it has no problem remaining stable even when pushed or when objects are placed on top of it.

[James] has plans for several enhancements in the near future, including remote control via Xbee modules as well as autonomous navigation utilizing sonar or possibly a camera. We’d totally love to see it sporting a Kinect sensor in a future revision, but that’s just us!

I’ve studied this (self study) of balancing robots using the various IC’s that are currently available and in use by these robots, and I’ve come to the conclusion that there is a ‘cumulative’ error that will eventually cause the robot to loose balance. In other words, I don’t know how they would be stable for long periods of time. Can anyone straighten me out on this? I would like to know if it’s a real problem or not.

mikey: Why would you think this? I can’t tell you why there isn’t something if you can’t precisely explain what that something is. The answer is that these robots can stay balanced for an indefinite amount of time. You also wouldn’t go about learning how these robots work by studying the ICs, you’d study some basic control theory. Really the simplest part of this whole thing is the electronics.