HOW-TOControls and Sequences of Operation
How to Tune PID Loops on Air Handlers
Tune an air handler loop by first proving the loop is wired and scaled correctly, then measuring how the process responds to a step change in output, and finally calculating PI gains from that response rather than guessing. Supply temperature, duct static, damper and pressure loops behave very differently, so each needs its own test; derivative action is rarely needed.
Step 1: Check the loop before touching gains
Many "tuning problems" are not tuning problems. Before changing any parameter:
- Confirm the sensor reads correctly against a calibrated reference and is located where it represents the controlled variable. See selecting and placing sensors.
- Stroke the actuator from 0 to 100 percent and confirm it moves fully, in the right direction, with no sticking or excessive deadband.
- Check loop action. A cooling valve loop is typically reverse acting (output rises as temperature rises above setpoint); a heating valve loop is direct or reverse depending on the controller convention. Getting this wrong makes the loop run away.
- Check scaling and units of input and output.
- Check the loop execution interval. Fast loops such as duct static need intervals of about a second; slow loops can run less often.
- Check output limits and enable logic. Disabled loops should hold or track a safe value so they do not wind up.
Step 2: Run an open-loop step test
A step test measures the three numbers that define the process: gain, dead time and time constant.
- Put the loop in manual at a steady operating point where the process is stable.
- Step the output by a modest amount, for example 10 percent.
- Record the controlled variable at a fast rate until it settles at a new steady value.
- Calculate:
- Process gain K = change in controlled variable ÷ change in output.
- Dead time θ = time from the step until the variable starts to move.
- Time constant τ = time from the end of the dead time until the variable reaches 63 percent of its total change.
- Repeat in the opposite direction and, if possible, at a different load. HVAC processes are often nonlinear, so results differ.
Step 3: Calculate PI gains
Lambda tuning is a simple, robust method that suits most HVAC loops. Choose a desired closed-loop time constant λ, usually between one and three times the process time constant for a stable, non-oscillating response.
Kc = τ ÷ ( K × (λ + θ) ) Ti = τ
Kc is the proportional gain (in output units per unit of error) and Ti is the integral time. Controllers express integral in different ways: integral time in seconds, repeats per minute (60 ÷ Ti in seconds), or integral gain (Kc ÷ Ti). Convert carefully.
Worked example: supply air temperature on a chilled water valve. Stepping the valve from 40 to 50 percent lowers SAT from 58.0 °F to 55.0 °F. The SAT starts moving 45 seconds after the step and reaches 63 percent of its change (56.1 °F) 180 seconds after it starts moving.
- K = 3.0 °F ÷ 10 % = 0.30 °F per percent.
- θ = 45 s, τ = 180 s.
- Choose λ = τ = 180 s.
- Kc = 180 ÷ (0.30 × (180 + 45)) = 180 ÷ 67.5 = 2.7 percent per °F.
- Ti = 180 s, or about 0.33 repeats per minute.
If the response is sluggish after testing, shorten λ; if it overshoots or oscillates, lengthen it.
Step 4: Apply typical loop characteristics
| Loop | Typical dynamics | Tuning notes |
|---|---|---|
| Supply air temperature (valve) | Slow; dead time and time constant in tens of seconds to minutes; gain varies with load and water temperature | Conservative λ; consider gain scheduling or separate gains for heating and cooling |
| Mixed air / economizer damper | Moderate; strongly nonlinear damper characteristic | Tune near the operating range where the damper spends most time |
| Duct static pressure (fan speed) | Fast; seconds | Short execution interval; filter the input lightly; avoid over-aggressive gain at low setpoints |
| Building pressure (relief) | Fast but noisy from wind and doors | Filter input with tens of seconds time constant; low gain |
| Outdoor airflow | Fast but noisy measurement at low velocity | Filter input; moderate gain |
| Humidity | Slow; long transport delays from humidifier to sensor | Long integral time; check sensor location |
Derivative action amplifies sensor noise and is seldom useful on HVAC loops. Leave it at zero unless a specific slow, smooth process benefits and the signal is clean.
Step 5: Handle sequenced and shared outputs
An AHU SAT loop often drives heating, economizer and cooling in sequence from one output, split into ranges. Each stage has a different process gain, so one set of gains may suit only one stage. Options include separate loops for each stage with deadband between them, or gain scheduling by active stage.
Protect against integral windup: when the output is at a limit, or when the loop is disabled, the integral term must stop accumulating. Most modern controllers include anti-windup, but confirm it is enabled and that disabled loops track a sensible output, so that when they enable they start from a reasonable value rather than a saturated one.
Step 6: Verify under closed loop
- Return to automatic and make a setpoint change of a size typical of normal operation.
- Look for a response that reaches setpoint without sustained oscillation and with modest overshoot.
- Introduce a disturbance, for example by changing a VAV box or an outdoor air damper position, and check recovery.
- Trend the loop over a day or more, across changing loads and weather.
- Record the final gains and the test data in the commissioning record.
If a loop that was tuned well later starts cycling, the cause may be a changed process rather than the gains. Diagnosis in operation is covered in troubleshooting hunting and oscillating control loops, and valve sizing issues that make a loop untunable are covered in sizing coil control valves by Cv and authority.
Common questions
What PID settings should I use for an air handler?
There are no universal settings, because each loop's process gain, dead time and time constant differ. Run a step test, then calculate PI gains with a method such as lambda tuning. Most HVAC loops need little or no derivative action.
What is lambda tuning?
Lambda tuning sets the integral time equal to the process time constant and calculates proportional gain from the process gain, dead time and a chosen closed-loop time constant. It produces stable, non-oscillating responses and is well suited to HVAC.
Why does my supply air temperature loop work in summer but hunt in spring?
The process gain changes with load, water temperature and which stage is active. Gains tuned at high load can be too aggressive at low load. Retune at the problem condition or use gain scheduling.