← Back to Archive

Why a thermostat is a control system

On-off control, hysteresis, and why the house temperature swings.

A thermostat is a control system because it measures the room's temperature, compares that measurement against a target, and corrects the difference by switching a heater on or off, satisfying every part of the measure, compare and correct definition covered earlier in this set, but it is a particularly crude kind of control system, correcting with a simple on-off switch rather than a smoothly adjustable output, and that crudeness is exactly what makes the house temperature swing gently above and below the target instead of settling on it exactly.

What is really going on

Unlike a controller able to output any amount of correction it likes, a thermostat only has two available actions, heater fully on or heater fully off, with nothing in between. That single restriction shapes everything about how the room actually behaves. Fully proportional control could apply a small trickle of heat once the room got close to target, holding steady there indefinitely, but an on-off thermostat has no small trickle available, so it necessarily overshoots the target slightly while the heater is on, then drifts back down past it slightly while the heater is off, because switching the heater off the instant the target temperature is reached would mean flipping the switch on and off continuously, chattering rapidly right at the boundary rather than settling into any kind of steady, comfortable rhythm.

The fuel-warning-light comparison

A car's low fuel warning light demonstrates the same trick a thermostat relies on to avoid that rapid chattering. The light switches on once the fuel level drops below some low threshold, but it does not switch off again the instant the level creeps back above that same threshold, since fuel sloshing gently in the tank on a bend or a slope would otherwise make the warning light flicker on and off distractingly every few seconds right at the boundary. Instead the light switches off only once the level has risen back up past a second, noticeably higher threshold, after a proper refuelling at a station rather than a token splash of fuel, leaving a deliberate gap between the level that triggers the warning and the level that clears it. A thermostat works the same way, switching the heater on once the room drops below a lower threshold and only switching it off again once the room has risen past a second, slightly higher threshold, a gap called hysteresis that trades a small, tolerable swing in temperature for freedom from a heater clicking on and off every few seconds.

Why the swing is a feature, not a flaw

It is tempting to see the house temperature drifting up and down instead of holding perfectly steady as evidence the thermostat is doing its job poorly, but the swing is the direct, deliberate cost of using a switch that can only be fully on or fully off rather than a valve that can be opened by any amount. Narrowing the hysteresis gap makes the temperature swing smaller at the cost of the heater switching on and off more often, wearing out the mechanism faster and, in some systems, actually wasting more energy through the repeated starting and stopping than a slightly wider, more relaxed swing would ever cost in comfort. Widening the gap saves the heater from unnecessary cycling at the cost of a more noticeable swing in comfort. Neither choice is a failure of control, both are the same trade-off, chosen deliberately rather than an oversight nobody caught.

The one number worth remembering

A typical home thermostat is commonly set with a hysteresis gap of around a degree or so either side of the target temperature, small enough that nobody in the room actually notices the swing, yet large enough that the heater switches on and off only a modest number of times an hour rather than dozens, a balance tuned specifically so the mechanism survives years of continuous use rather than being worn out chasing a precision the room's occupants were never going to feel anyway. Halve that gap and the heater might easily double how often it cycles for a swing in comfort nobody would have noticed at the wider setting in the first place.

Where the analogy to proportional control breaks down

It is worth being precise about how an on-off thermostat relates to the proportional, integral and derivative corrections covered in the previous article, since it is not simply a crude version of the same idea, it is a genuinely different kind of controller. A proportional controller varies the size of its correction continuously with the size of the error, a small error producing a small correction, a large error producing a large one. A thermostat cannot vary its correction at all, it can only choose between two fixed extremes, so all of the graduated responsiveness a proportional, integral or derivative term provides is simply unavailable to it, replaced entirely by the timing trick hysteresis offers instead. This is why a thermostat is usually described separately from PID control in most introductions to the subject, despite satisfying the same measure, compare and correct definition, since the tools available to it for shaping its own behaviour are genuinely narrower.

What follows from this

Recognising the thermostat's swing as hysteresis deliberately built into an on-off controller, rather than as poor tuning, changes how any other on-off system gets evaluated, since the same trade-off appears anywhere a controller only has a simple switch available rather than a continuously adjustable output, a refrigerator compressor, an old-fashioned oven, an aquarium heater. In every one of these cases, a wider gap trades precision for a longer mechanism life, and a narrower gap trades mechanism life back for tighter control, and neither number is correct in any absolute sense, only correct relative to how much the application actually needs one over the other, a judgement call rather than something a formula alone can settle.

More on Feedback