PID Control Explained Simply: Why a Valve Overshoots, Hunts or Settles
PID control explained simply: how proportional, integral and derivative decide how hard a BMS pushes a valve, and why sloppy tuning makes a room keep swinging.

The knob nobody sees turning
Picture driving on a highway and drifting toward the lane line. You don't yank the wheel — you nudge it, a little or a lot depending on how far you've wandered, then ease back as you re-centre. You do this without thinking. A building's control system has to do the exact same thing, except its "steering wheel" is a valve feeding chilled water into a cooling coil, and its "lane" is a room held at, say, 24 °C.
The question is: how hard should the controller push that valve? Open it too far and the room overshoots — it gets too cold, then the controller slams the valve shut and the room drifts warm again. Open it too timidly and the room never quite cools to setpoint. Getting this right is the job of a small piece of maths called PID control, and it runs quietly inside almost every loop in a modern building.
This part opens that black box. You won't need any calculus — just three plain ideas.
First, what is the controller actually deciding?
Every control loop we've met so far in this course works the same way: a sensor measures something (temperature, pressure, humidity), the controller compares that measurement to the setpoint (the target you want), and the difference between them is the error.
$$\text{error} = \text{setpoint} - \text{measured value}$$
If the room is at 26 °C and you want 24 °C, the error is 2 degrees "too warm." The controller's only job is to turn that error into a command: open the chilled-water valve this much. PID is simply the recipe for turning error into that command. Its three letters — P, I and D — are three different questions the controller asks about the error, and it blends the answers together.
If you'd like the electrical-engineering companion view of this same idea, the CORE Electricity Fundamentals course covers it in feedback control and PID explained. Here we stay firmly on the building side.
P — Proportional: push harder the further you've drifted
Proportional control is the most intuitive of the three. It says: the bigger the error, the harder I push.
Back to the highway. If you've drifted a hair from centre, you barely move the wheel. If you're halfway into the next lane, you steer firmly. Proportional control does exactly this with the valve: 2 degrees too warm gets a bigger valve opening than 0.5 degrees too warm. As the room cools and the error shrinks, the valve automatically eases closed. Simple, smooth, and it reacts instantly to how bad things are right now.
But proportional control has one stubborn flaw. On its own, it always leaves a small permanent gap. Here's why. To hold the valve even slightly open — which the room needs, because heat is always leaking in through walls, windows and people — there must be some error for the controller to react to. If the error ever reached exactly zero, the valve would close completely and the room would immediately start warming again. So a purely proportional loop settles at a point that is almost right but never spot-on: maybe it holds 24.6 °C when you asked for 24 °C. Controls engineers call this leftover gap offset (or "droop").
For a lot of comfort cooling, an offset of half a degree is harmless and you could stop here. But when you need the room on setpoint, you need something to erase that stubborn gap.
I — Integral: the longer you've been off, the more you nudge
Integral control is the patient one. It watches not just how big the error is, but how long it has persisted, and it keeps accumulating. The longer the room sits above setpoint, the more the integral term winds up and quietly pushes the valve further open — until the offset is gone and the measurement finally sits exactly on target.
A kitchen analogy. Proportional is glancing at the room and reacting to what you see this instant. Integral is the running tally in your head: "it's been slightly too warm in here for ten minutes now — clearly I need to open that valve a bit more than I first thought." That accumulated memory is what closes the last fraction of a degree that proportional alone can't.
This is why the everyday workhorse of building controls is PI control — proportional and integral together. Proportional gives a fast, sensible reaction to the size of the error; integral grinds away the residual offset so the room lands precisely on setpoint. The vast majority of temperature, pressure and flow loops in a building run perfectly well on PI alone.
Integral does have a temper, though. If it winds up too eagerly, it keeps pushing past the point where the error hit zero — because all that accumulated "we've been too warm" memory takes time to unwind — and now the room overshoots and goes too cold. Which brings us to the third letter.
D — Derivative: ease off as you approach
Derivative control reacts to how fast the error is changing — the rate, not the size. Its instinct is to anticipate.
You already do this when parking a car. You don't hold the same speed until the bumper touches the wall; you lift off the accelerator and brake as you approach, because you can see the gap closing fast. Derivative control does the same for a loop: if the room temperature is plunging toward setpoint quickly, the derivative term says "ease off the valve now, we're about to arrive" — heading off the overshoot before it happens.
That sounds ideal, so why isn't it everywhere? Two reasons. First, derivative reacts to change, and the noisiest thing in any loop is a slightly jittery sensor reading. Feed that jitter to a derivative term and it amplifies every little wobble into nervous valve twitching. Second — and this is the big one for buildings — derivative only earns its keep on fast systems. A room full of air and concrete changes temperature over many minutes; there's little sudden motion for derivative to anticipate. So on slow thermal loops, the D term is often more trouble than it's worth and is simply left switched off.
The honest, practical picture:
- P alone — simple, fast, but leaves a small permanent offset. Fine for loose comfort control.
- PI — the standard for almost all building HVAC loops. Erases the offset; lands on setpoint.
- Full PID — reserved for the minority of fast loops (some pressure or flow control) where anticipating overshoot genuinely pays. Uncommon on slow thermal systems.
If you remember one thing: in real buildings, most loops are P or PI, and full PID is the exception, not the rule.
What "hunting" actually is — and why it wears things out
Now the failure mode the title promised. Hunting is when a loop can't settle: the valve (or a damper, or a fan) swings open and shut, open and shut, in a steady oscillation that never dies down. The room temperature rides up and down around setpoint like a slow wave instead of holding a flat line.
Hunting almost always means the loop is tuned too aggressively. Think of an over-eager driver who over-corrects at every lane line — swerving left, then over-swerving right, weaving down the road instead of tracking straight. A too-aggressive controller does the same: it over-reacts to the error, blows past setpoint, over-reacts the other way, and repeats. Push the proportional response too high, or let the integral term wind up too fast, and a stable loop tips into this endless swing.
Hunting is not just a comfort nuisance. Every one of those swings drives the valve actuator — the small, low-voltage device that physically strokes the valve open and closed — back and forth. (Remember from earlier in this course that the actuator is a modest positioning device, not the big three-phase compressor or pump motor it ultimately influences.) An actuator built to reposition occasionally is instead cycling constantly, and that relentless motion wears out its gears, linkages and the valve seat far sooner than it should. A hunting loop quietly converts good tuning into a maintenance ticket. Multiply that across hundreds of loops in a large building and sloppy tuning becomes real money in premature replacements.
Why tuning is a balancing act
By now the trade-off should be clear. Tuning a loop means choosing how strongly each term reacts, and you're balancing two opposite failures:
- Too aggressive — the loop overshoots the setpoint and then hunts, swinging back and forth and cycling the actuator. Comfort is jittery; equipment wears.
- Too gentle — the loop is sluggish. It creeps toward setpoint so slowly that on a hot afternoon the room never quite gets there, and occupants complain it's stuffy even though the "controller is working."
Good tuning threads between the two: brisk enough to reach setpoint promptly, calm enough to stay there without swinging. There's no universal setting, because every loop drives a different physical system — a small terminal box responds in a way a giant chilled-water plant never will. This is why loop tuning is done during commissioning, loop by loop, by someone watching how each one actually behaves and adjusting until it settles cleanly.
It's also why "the temperature keeps swinging" and "the room never cools down" are so often tuning problems, not broken-hardware problems. The valve, sensor and controller can all be perfectly healthy while the numbers driving them are simply wrong. Diagnosing and correcting that — retuning loops so they settle instead of hunt, and integrating controllers so they behave as a coordinated system rather than fighting each other — is squarely hands-on Automation Services work, the practical craft of making a building's control loops behave.
RealPars walks through what proportional, integral and derivative each do in plain terms, using a valve-and-setpoint control loop as the example.
The takeaway
PID is just three plain questions a controller asks about the gap between where a room is and where you want it: how big is the error (proportional), how long has it lingered (integral), and how fast is it changing (derivative)? Proportional pushes in proportion to the error but leaves a small permanent offset; integral erases that offset over time; derivative eases off to avoid overshooting. Most building loops need only P or PI — full PID is the exception, kept for the fast loops that truly need it. And when a loop is tuned too hard, it hunts: a valve or damper cycling endlessly, wearing out hardware while the room never settles. Tuning is the quiet difference between a building that holds steady and one that fidgets.
Next, we move from a single loop to the choreography of many working together — how a BMS runs a whole sequence of operations, deciding what starts, what stops and in what order to keep a building cool and efficient.


