Robotics: Control


Control theory provides a variety of techniques for getting a robot to accomplish a goal without oscillations. For this assignment, you will explore a variety of these techniques to see how they work.

Wall Follower

First, build a robot that makes use of the simple proximity detector described at the beginning of Chapter 9 in Bagnall's book. This hack combines the IR port on the robot with a light sensor in order to make a crude range detector. This is not especially adequate, but it should be good enough for our purposes.

Make a robot to follow along a wall at roughly a constant distance without touching it. Feel free to experiment with different walls and different lighting to find the best wall that you can. According to Bagnall, white surfaces work well, so you might find that the outside edge of the maze or hexagon arena that we have in CMC 307 might work well. Include proportional, derivative, and integral control. In order to simulate derivative and integral control, you'll need to accumulate data over a period of time so that you can work out rate of change and error accumulation.

Using the three forms of control alone and simultaneously, try to get your robot both to follow the wall in a stable fashion as well as in an oscillatory manner. Can you get your robot to oscillate in a controlled fashion, or does it fly out of control? Can you achieve damped oscillation?

In addition to submitting your code and planning a demo, you should submit a lab report-like writeup that indicates what you learned about the various forms of control (P, I, D)? Were some sufficient on their own for stable behavior? None of them? Different combinations? Were some more amenable to oscillation? Was the performance really sensitive to proportionality constants, or did you have a lot of flexibility here?

For your demo, you should pick out some interesting cases to show off.

Bonus For Fun: LEGO Segway

Create a Segway, like the example we saw in class. Your goal is to have it roll along in a straight line while keeping balanced (don't even worry about following a line) This web page says it can't be done with the standard light sensors, but George Kachergis managed to at least get a prototype working that kind of did the trick: it didn't work perfectly, but it had some of the ideas and was lots of fun. I'd be curious to know more about how PID controlling would affect the problem.

Good luck, and have fun!


Authored by Dave Musicant. Inspired by Jennifer Kay.