Thermostats: Bang-Bang Control
Why is your house either 'Too Hot' or 'Too Cold'? Thermostats use Bang-Bang control. It's simple, but inefficient compared to PID.
Thermostats: Bang-Bang Control
You set the AC to 72°F. The house warms up to 73°. The AC kicks on full blast. The house cools to 71°. The AC turns off. The temperature moves in a sine wave: 71… 73… 71… 73. This is Bang-Bang Control (On-Off Control).
Simple but Jerky
Bang-Bang is the simplest code in the world:
if (Current > Target) { TurnOn(); } else { TurnOff(); }
- Pros: Easy to code.
- Cons: Overshoot. The system is always oscillating. It’s rough on the machinery (turning a compressor on/off rapidly wears it out).
Hysteresis (The Buffer)
To prevent the AC from flickering on/off every second, we add Hysteresis.
- “Turn ON at 74.”
- “Turn OFF at 70.” This 4-degree gap prevents “Short Cycling.”
Robotics: The Claw
We use Bang-Bang for pneumatics or simple motors.
- “If button pressed, Close Claw.”
- “If button released, Open Claw.” We don’t need a PID loop to close a claw. It’s either Grip or No Grip. But for an Arm? Bang-Bang would cause it to smash up and down violently. For that, we need PID. Knowing when to be simple is part of being a good engineer.
Level Up Your Season
Dominate the competition with our other powerful tools.
FTC Secrets
The most comprehensive analytics platform for FTC. Analyze match data, scout teams, and uncover winning strategies with deep insights.
Analyze Now →FTC Coach
Your hyper-personalized assistant for the season. Master your engineering portfolio and ace judging preparation with AI-powered guidance.
Get Coached →