bang-bang (on-off) control
Bang-bang control is the simplest way to steer a system: there is no dial, only a switch. The controller looks at the error — are we below the target or above it? — and responds with one of two extremes: full on or full off, push or don't push, heat or don't heat. There is no "a little bit" in between. The name comes from this all-or-nothing slamming back and forth, bang one way, bang the other.
Your home thermostat is the everyday example. When the room drops below the set temperature, the heater turns fully on; when the room climbs above it, the heater turns completely off. Because a real heater cannot react instantly, the temperature always sails a little past the line before the switch flips, so the room actually drifts up and down in a gentle sawtooth around your chosen setting rather than holding perfectly still. To stop the switch from chattering on and off rapidly when the temperature hovers right at the line, designers add a small dead band: the heater waits until the room is, say, a degree too cold before kicking on, and a degree too warm before shutting off.
The appeal of bang-bang control is that it is dirt cheap, dead simple, and surprisingly hard to break — a single relay or transistor can run it, with no delicate tuning of gains. The price is that it can never settle exactly on the target; it forever hunts around it, and the constant slamming can wear out hardware. So it shines where a little wobble is harmless — fridges, water heaters, simple pumps — but gives way to smoother schemes like PID wherever you need a steady, precise hold.
A simple line-following robot reads one sensor: if it sees the line drift to the left, it steers hard right; if the line drifts right, it steers hard left. It never steers gently — it only ever slams one way or the other, weaving along the line in a series of zig-zags.
Two extremes, no middle: the robot follows the line, but in a jagged zig-zag rather than a smooth curve.
Despite sounding crude, bang-bang control is provably the fastest possible strategy for certain problems — if your only goal is to reach a target in minimum time and you have a hard limit on push, slamming full on then full off is mathematically optimal.