ROBOTICS 101Concept explainer

Bang-Bang Control

The simplest feedback controller has two settings: full on or full off, or full forward and full reverse. A thermostat works this way. It is easy to build, but it never settles exactly, it keeps switching around the goal.

The rule

With error \(e\), maximum command \(u_{\max}\), and a hysteresis band \(\pm h\), the command only flips when the error leaves the band:

$$u = \begin{cases} +u_{\max} & e > h \\ -u_{\max} & e < -h \\ \text{previous } u & \text{otherwise} \end{cases}$$

What to notice

With no hysteresis, the command chatters back and forth very fast near the goal. Add a little sensor delay and the robot overshoots each time, making a steady oscillation called a limit cycle. Widening the hysteresis band makes the switching slower and calmer, at the cost of a wider wobble. Bang-bang control is fine for heaters and simple valves, but robots that need smooth, precise motion use proportional control instead.