Blog
How Control Loops Work: Setpoints, Feedback and Closing the Loop
Learn how an HVAC control loop setpoint works: sense the value, compare it to a target, then act. Open-loop vs closed-loop, feedback and deadband explained.

Part 4 of 16 in Cobler's Building Automation and BMS Fundamentals course. New here? See the course page.
Think about the last time you got into a shower. You turn the tap and feel the water. It's too cold, so you turn the tap a little further and feel it again.
You keep doing that until the temperature is right. You're measuring with your skin, deciding in your head and acting with your hand, then checking again.
A building management system (BMS) does the same thing with a sensor, a controller and a valve. In Part 3 we wired AHU-12A's controller to its seven I/O points, but we never looked at what its program does with them.
Well, it runs a control loop. It measures, compares with a target, acts to shrink the difference, and repeats.
Setpoint, process variable and error
To talk about a control loop, we need names for its parts. We'll keep the simple version from Part 1, where AHU-12A's valve holds the return air from the level 12 offices at a target.
Worth knowing: in Part 5 we'll switch to the loop AHU-12A really uses, which holds the supply air at 14 °C. The ideas here are the same for both.
- The setpoint is the target, the value we want. For AHU-12A it's 24 °C.
- The process variable is the value being measured right now. For AHU-12A it's the return air temperature, the air coming back from the offices. Say it reads 26 °C, because the offices have filled with people and the afternoon sun is on the windows.
- The error is the gap between the two.
There are two ways to write the error, and they differ only in sign. In this course we use error = setpoint − process variable.
For AHU-12A that's 24 − 26 = −2 °C. So with this convention, a negative error on a cooling loop means the air is warmer than the target. The controller then opens the chilled water valve further.
Worth knowing: some controllers and textbooks use process variable − setpoint instead, which gives +2 °C for the same situation. The size of the gap is the same, and only the sign flips. So when you work on a real controller, check which convention it uses.
Now, what should the controller do as the gap closes? Its job is to bring the error towards zero. As the offices cool from 26 °C towards 24 °C, the error shrinks from −2 °C towards zero. So the controller opens the valve less eagerly.
When the error reaches zero, it stops changing the valve and holds it at about the opening that keeps the air at 24 °C. You might expect it to close the valve at that point. But the offices still need that much cooling, so the valve stays where it is.
Open-loop control
That word "loop" matters more than it looks. To see why, let's look at a system that never checks its own result.
Imagine a fan wired to a simple timer that runs it for one hour and then stops. The timer has no idea whether the room is cool or hot. It runs the fan whether the room is empty, full, sunny or shaded.
A system like this follows a fixed instruction and never checks whether it's working, and we call that open-loop control.
Open-loop control is cheap and simple, and it works when the result is predictable. A toaster runs on a timer, and so does a basic garden sprinkler.
But conditions in a building keep changing. The room fills with people, or the sun moves round the building, and an open-loop system can't notice or correct.
Closed-loop control
So what if we replace the timer with a thermostat? A thermostat measures the room, compares it with the setpoint and adjusts the cooling. Then it measures again to see whether that worked, and it keeps adjusting until the room reaches the setpoint.
Measuring the result of your own action and using it to decide the next action is called feedback. A system that uses it is under closed-loop control.
The loop is "closed" because the output, the cooler air, comes back round to the input, the sensor, which completes a circle.

AHU-12A's closed loop. The controller compares the 24 °C setpoint with the measured 26 °C, acts on the valve, and the sensor measures the result.
This is why people call a BMS "smart". Nobody means it thinks like a person. They mean it responds to what a sensor measures, instead of to an assumption.
If the offices warm up faster than expected, the loop cools harder, and if they're already cool, it backs off. Almost everything a BMS does, from one room to a whole chiller plant, is a version of this closed loop.
Sensor noise
Now here's a snag with feedback. Real sensor readings are never perfectly steady. AHU-12A's return air sensor might read 24.0, then 24.1, then 23.9, then 24.05 °C.
Those small, fast wobbles come from little eddies in the airflow and tiny changes in the sensor's electrical signal. We call them noise, and they don't mean the offices are really getting warmer or cooler.
So what happens if the controller reacts hard to every wobble? It keeps moving the chilled water valve a little open, a little closed, and open again, and the valve never settles. All that extra movement wears out the valve actuator and does nothing for comfort.
A modulating loop like AHU-12A's valve, which can sit at any position, deals with noise in two ways:
- Filtering. The controller smooths the reading, for example by averaging it over a short time, so small fast wobbles have little effect.
- Tuning. The controller is set to respond gently to small errors and more firmly to large or lasting ones. Part 5 explains how.
Worth knowing: noise is a different problem from hunting, when the whole loop swings steadily back and forth because it's tuned too aggressively. Part 5 explains hunting and how to fix it.
Deadband
But some equipment can't sit halfway. It's either on or off, so it can't be tuned gently. For these, the usual tool is a deadband, a small band around the setpoint where the controller leaves things as they are.
Say one of the fan coil units in the office tower's lobby has a simple on/off chilled water valve. Its setpoint is 24 °C, with a deadband of one degree, from 23.5 to 24.5 °C. Here's how it behaves:
- When the lobby warms to 24.5 °C, the valve opens and the fan coil unit cools.
- The valve stays open while the temperature falls through the band.
- When the lobby cools to 23.5 °C, the valve closes.
- The valve stays closed while the temperature rises back through the band, until it reaches 24.5 °C again.

With a one-degree deadband, the on/off valve opens at 24.5 °C and closes at 23.5 °C. It no longer clicks on and off around exactly 24 °C.
Without the deadband, the valve would switch every time the reading crossed 24 °C. With noise on the sensor, that could mean switching many times a minute, which wears out the valve and any equipment it starts.
Both ends of this band sit inside the 23 to 26 °C comfort range from ICOP IAQ 2010, the air quality code in Part 2.
We'll meet deadbands in two more places later in the course:
- Staging. A chiller plant shouldn't start another chiller for a small, brief rise in load and then stop it a minute later. Part 12 shows how staging uses a band.
- Alarms. An alarm that clears the moment the value dips below its limit will flicker on and off. Part 8 covers alarm settings like this.
One loop, thousands of times
So let's put the whole loop in order:
- A sensor measures the process variable, what's actually happening.
- The controller compares it with the setpoint to find the error.
- The controller moves an actuator (a valve or damper), or switches equipment on or off, to shrink the error.
- The action changes the air or water, the sensor measures the new value, and the loop runs again.
One loop holds the level 12 offices at 24 °C. Another holds the chilled water leaving the plant at its setpoint, and another holds the air pressure in a duct steady. A large BMS runs thousands of these simple loops, each one measuring, comparing and adjusting.
And notice what the controller doesn't need to know. It knows nothing about sunshine, people or the weather forecast.
It only needs two numbers, where the air is and where it should be, and it keeps adjusting until they match. So the same simple loop works on a sunny afternoon, a rainy morning and a crowded meeting day.
How hard to push
So the controller now knows the size and the sign of the error. But knowing the air is 2 °C too warm doesn't tell it how far to move the valve.
Open it too far and the air overshoots, then swings back. Open it too little and the floor never quite gets there.
So for a given error, how far should the controller move the valve? That's the job of a calculation called PID, in Part 5: PID Control Explained Simply.
Check your understanding
1. AHU-12A's setpoint is 24 °C and its return air reads 25 °C. Using this course's convention, what's the error, and what should the controller do?
Show the answer
Error = setpoint − process variable = 24 − 25 = −1 °C. On a cooling loop, a negative error means the air is too warm, so the controller opens the chilled water valve further.
2. Why does AHU-12A's modulating valve loop use filtering and tuning, while the lobby fan coil unit's on/off valve uses a deadband?
Show the answer
A modulating valve can move by small amounts, so the controller smooths the noisy reading and responds gently to small errors.
An on/off valve can only open or close, so without a band it would switch every time the temperature crossed 24 °C. The deadband (23.5 to 24.5 °C) stops it switching until the temperature has really moved.
Recap
- A control loop measures the process variable, compares it with the setpoint to find the error, acts to shrink the error, and repeats.
- In this course, error = setpoint − process variable, so a negative error on a cooling loop means too warm.
- Open-loop control follows a fixed instruction without checking. Closed-loop control uses feedback to correct itself.
- Modulating loops deal with sensor noise through filtering and tuning.
- Deadbands give on/off equipment, staging and alarms a small "close enough" zone, so they don't switch back and forth.
Go deeper on video (optional)
This animated video shows the same loop: measuring the process variable, comparing it with the setpoint and acting on the error. It's optional, and you don't need it for the next part.
This is Part 4 of 16 in Cobler's Building Automation and BMS Fundamentals course. Previous: Controllers, DDC and I/O Points: The Brain Behind the BMS. Next: PID Control Explained Simply: Why a Valve Overshoots, Hunts or Settles.
Cobler builds CobiNeural, a platform that shows a facility team its building's energy, water and indoor air data as live numbers across the whole site. To see how your building performs, talk to us.
FAQ
Frequently asked questions
The setpoint is the target value you want the system to hold, for example 24 °C for the air returning from an office floor. The control loop measures the actual value (the process variable) and compares it with the setpoint to find the error. It then moves a valve or damper to reduce that error. In this course, error = setpoint − process variable. So a return air reading of 26 °C against a 24 °C setpoint gives an error of −2 °C. The air is too warm, so the controller opens the chilled water valve further.
Open-loop control follows a fixed instruction without checking the result. An example is a timer that runs a fan for one hour whether the room is hot or cool. Closed-loop control measures the result of its own action and keeps correcting until the target is met. An example is a thermostat that adjusts cooling until the room actually reaches 24 °C. Most of what a BMS does is closed-loop control.
A deadband is a small band around the setpoint where the controller leaves things as they are. It is used for on/off equipment, for staging equipment such as chillers, and for alarms. For example, take an on/off fan coil valve with a 24 °C setpoint and a one-degree deadband. It opens at 24.5 °C and closes at 23.5 °C, instead of switching every time the reading crosses 24 °C. Modulating loops, such as a valve that can sit at any position, usually handle sensor noise with filtering and gentle tuning rather than a deadband.
Ask us about this topic
Something in this article you want to dig into — or a situation in your own building it doesn't quite cover? Send us your question. We don't run public comments; the team replies to you directly by email.


