Learn about bang-bang controllers and proportional controllers. Build a basic controller to move the robot to a specific position as quickly as possible.
This project was designed to introduce various ways of using sensors to control motors. There are many techniques to controlling the motors and making your program run effectively. It is important to know the advantages and limitations of these techniques so you can choose one that fits the application you are designing.
For this activity, we are going to see what happens when we apply both a bang-bang controller and a proportional controller to a LEGO robot, and see how it changes the behavior.
Bang-bang controllers check if you are "above" or "below" target. This is how the heater in your house controls the temperature. When the thermostat says it is below the desired temperature, the heater turns on. Otherwise, the heater is off. It does not turn on half-power because it's not that cold; it doesn't need that much precision for this application. The heater works fine with just this very simple control.
Proportional controllers adjust the speed based on how far you are from the target. Think about driving a car: If you see a stop sign down the road, do you drive full speed until you get there, and then slam on the breaks? This would not be a very effective way to control your car. You would more likely drive faster when you are far away from the stop sign, and then slow down as you begin to approach the sign. This is what a proportional controller does--the input is proportional to the distance to the target value.
LabVIEW for LEGO MINDSTORMS
LEGO MINDSTORMS NXT kit
This lesson is part of the ROBOT CONTROL ACTIVITY SEQUENCE. See recommended lessons below for the other activities in the sequence, or visit the Activity Sequences page on the Tufts CEEO project site.