Custom Air EquipmentAn HSM Company

HOW-TOControls and Sequences of Operation

How to Tune PID Loops on Air Handlers

4 min read · Reviewed by the Custom Air Equipment applications team

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:

  1. Confirm the sensor reads correctly against a calibrated reference and is located where it represents the controlled variable. See selecting and placing sensors.
  2. Stroke the actuator from 0 to 100 percent and confirm it moves fully, in the right direction, with no sticking or excessive deadband.
  3. 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.
  4. Check scaling and units of input and output.
  5. Check the loop execution interval. Fast loops such as duct static need intervals of about a second; slow loops can run less often.
  6. 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.

  1. Put the loop in manual at a steady operating point where the process is stable.
  2. Step the output by a modest amount, for example 10 percent.
  3. Record the controlled variable at a fast rate until it settles at a new steady value.
  4. 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.
  5. 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

LoopTypical dynamicsTuning notes
Supply air temperature (valve)Slow; dead time and time constant in tens of seconds to minutes; gain varies with load and water temperatureConservative λ; consider gain scheduling or separate gains for heating and cooling
Mixed air / economizer damperModerate; strongly nonlinear damper characteristicTune near the operating range where the damper spends most time
Duct static pressure (fan speed)Fast; secondsShort execution interval; filter the input lightly; avoid over-aggressive gain at low setpoints
Building pressure (relief)Fast but noisy from wind and doorsFilter input with tens of seconds time constant; low gain
Outdoor airflowFast but noisy measurement at low velocityFilter input; moderate gain
HumiditySlow; long transport delays from humidifier to sensorLong 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

  1. Return to automatic and make a setpoint change of a size typical of normal operation.
  2. Look for a response that reaches setpoint without sustained oscillation and with modest overshoot.
  3. Introduce a disturbance, for example by changing a VAV box or an outdoor air damper position, and check recovery.
  4. Trend the loop over a day or more, across changing loads and weather.
  5. 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.

Ready to build the unit your project actually needs?

Send a schedule, a drawing or a photo of the unit you are replacing. An application engineer calls back within one business day.