Field fix / guideDesign DocumentVendor-agnostic (IEC 61131-3)BMSindustrial-automation

HVAC Control — AHU and Chiller Plant — Control Design

Shared by TSIMEREZIVO Team · 4 Oct 2026 · 44 views

# BMS Template: HVAC Control — AHU and Chiller Plant ## 1. Overview **Purpose:** Building Management System (BMS) control of an Air Handling Unit (AHU) and chilled water plant serving a commercial or industrial facility. Covers supply air temperature, mixed-air economizer, variable-volume supply air, and chiller plant sequencing. **Industry Standards:** - ASHRAE 90.1 (Energy Standard for Buildings) - ASHRAE 135 (BACnet Communication Protocol) - ASHRAE 62.1 (Ventilation for Acceptable Indoor Air Quality — minimum OA requirements) - ASHRAE Guideline 36 (High-Performance Sequences of Operation for HVAC Systems) - EN 15232 (Energy Performance of Buildings — BACS) - ISO 7730 (Ergonomics of the Thermal Environment — PMV/PPD) **Critical Constraints:** - **Freeze protection:** Preheat coil MUST fire when OA temperature < 2°C — coil freeze-up is catastrophic - **Minimum OA:** AHU minimum OA damper position per ASHRAE 62.1 (typically 20–30%) at all times when occupied - **Chiller minimum run time:** 15 minutes ON, 5 minutes OFF (compressor thermal and oil cycling) - **Discharge air temperature (DAT):** Minimum 13°C — risk of condensation and drip on ceiling - **Fan interlock:** AHU fans MUST be proven ON before any heating or cooling is activated - **CO₂ demand ventilation:** Increase OA when CO₂ > 800 ppm (ASHRAE 62.1 Appendix C) - **Economizer lockout:** Economizer disabled when OA > RA dew point (enthalpy or temperature comparison) - **VFD minimum:** AHU supply fan minimum 15% Hz (motor stall protection) **Relevant Physics:** - Cooling load: **Q = ṁ_air × c_p_air × (T_return − T_supply)** - c_p_air ≈ 1.006 kJ/(kg·K) at atmospheric pressure - ṁ_air = ρ_air × volumetric_flow = 1.2 kg/m³ × m³/s - Economizer savings: **ΔP_chiller_saved = Q_econ / COP_chiller** - PMV comfort: **PMV = f(T_air, T_radiant, v_air, humidity, metabolic rate, clothing)** - Chiller efficiency: **COP = Q_cooling / P_compressor** (good chiller: COP 4–6) - Enthalpy: **h = c_p × T + ω × (2501 + 1.86 × T)** kJ/kg dry air (ω = humidity ratio) --- ## 2. Control Philosophy **ASHRAE Guideline 36 Sequences of Operation** ``` AHU Operating Modes: 0: UNOCCUPIED_NIGHT — Fan off; heating setback (18°C); no cooling 1: WARM_UP — Fan ON; heating to occupied setpoint; no cooling 2: OCCUPIED — Normal operation (see below) 3: ECONOMIZER — Free cooling from outside air (OA enthalpy < RA) 4: SETBACK — Weekend/holiday reduced heating 5: FREEZE_PROTECT — OA < 2°C; preheat coil ON regardless of occupancy Supply Air Temperature Reset (SAT Reset): - Optimal start: Raise DAT setpoint when zone loads are low (14→18°C) - Zone with highest cooling demand drives DAT down (trim-and-respond) - Floor: 13°C (condensation limit); Ceiling: 20°C (comfort limit) VFD Fan Speed Control: - Primary: Static pressure setpoint at duct (e.g., 125 Pa) - Zone VAV boxes feedback drives duct pressure - Minimum: 15% (motor stall limit) - Maximum: 100% Chiller Sequencing: Chiller 1 (lead): Starts when cooling demand > 30% capacity Chiller 2 (lag): Starts when Chiller 1 runs > 15 min and demand still > 90% Staging down: Lag chiller stops when total demand < 50% for > 10 min CHW Supply Temp: 6°C setpoint; reset to 8°C when OAT < 15°C (energy saving) ``` --- ## 3. Control Logic ```pascal { === AHU AND CHILLER PLANT BMS CONTROL === } { ASHRAE Guideline 36 compliant sequences } PROGRAM AHU_Chiller_Control CONSTANTS OAT_FREEZE_C = 2.0 { °C — freeze protection activation } OAT_ECON_LOCK_C = 22.0 { °C — economizer lockout outdoor temperature } CO2_OA_BOOST_PPM = 800 { ppm — CO₂ demand ventilation threshold } CO2_MAX_PPM = 1000 { ppm — ASHRAE 62.1 maximum acceptable } DAT_MIN_C = 13.0 { °C — minimum discharge air temp (condensation) } DAT_MAX_C = 20.0 { °C — maximum discharge air temp (comfort) } DAT_SETPOINT_NOM = 14.0 { °C — nominal discharge air setpoint } RAT_SETPOINT_C = 22.0 { °C — return air / zone temp setpoint } CHW_SP_NOM_C = 6.0 { °C — chilled water supply temp nominal } CHW_SP_WARM_C = 8.0 { °C — CHW supply temp when OAT < 15°C } CHILLER_MIN_RUN_S = 900 { s — minimum chiller ON time } CHILLER_MIN_OFF_S = 300 { s — minimum chiller OFF time } FAN_MIN_PCT = 15.0 { % — VFD fan minimum speed } DUCT_PRESS_SP_PA = 125.0 { Pa — duct static pressure setpoint } OA_MIN_PCT = 25.0 { % — minimum OA damper (ASHRAE 62.1) } KP_FAN = 0.8 { Fan speed PI controller Kp } KI_FAN = 0.15 { Fan speed PI controller Ki } KP_CHW = 1.2 { Chiller plant valve Kp } KI_CHW = 0.05 { Chiller plant valve Ki } VARIABLES { Inputs } oat_c : REAL { °C — Outdoor air temperature } oat_rh_pct : REAL { % — Outdoor air relative humidity } rat_c : REAL { °C — Return air temperature } rat_rh_pct : REAL { % — Return air RH } dat_c : REAL { °C — Discharge air temperature (after coils) } duct_press_pa : REAL { Pa — Supply duct static pressure } zone_co2_ppm : REAL { ppm — representative zone CO₂ } zone_temp_avg_c : REAL { °C — average zone temperature } chw_supply_c : REAL { °C — chilled water supply temperature } chw_return_c : REAL { °C — chilled water return temperature } chw_flow_lpm : REAL { L/min — CHW flow } ch1_status : BOOL { Chiller 1 healthy / available } ch2_status : BOOL { Chiller 2 healthy / available } supply_fan_fb : BOOL { Supply fan proven status } return_fan_fb : BOOL { Return fan proven status } occupancy_signal : BOOL { BMS occupancy input (BACnet / PIR) } { Outputs } supply_fan_cmd : BOOL return_fan_cmd : BOOL supply_fan_spd : REAL { % VFD speed } oa_damper_pos : REAL { % open — outdoor air } ra_damper_pos : REAL { % open — return air } ea_damper_pos : REAL { % open — exhaust air } preheat_valve : REAL { % — hot water preheat valve } cooling_valve : REAL { % — CHW cooling coil valve } ch1_start_cmd : BOOL ch2_start_cmd : BOOL chw_pump_cmd : BOOL alarm_freeze : BOOL alarm_co2 : BOOL alarm_fan_fail : BOOL { Internals } ahu_mode : INT { 0=unoccupied 2=occupied 3=economizer 5=freeze } dat_setpoint : REAL { °C — active DAT setpoint } fan_integral : REAL chw_integral : REAL ch1_on_timer : TON ch2_on_timer : TON ch1_off_timer : TOF ch2_off_timer : TOF econ_eligible : BOOL cooling_demand_pct: REAL CONST MODE_UNOCCUPIED = 0 MODE_OCCUPIED = 2 MODE_ECONOMIZER = 3 MODE_FREEZE = 5 BEGIN { --- Freeze Protection (highest priority) --- } alarm_freeze := oat_c < OAT_FREEZE_C IF alarm_freeze THEN ahu_mode := MODE_FREEZE preheat_valve := 100.0 ELSIF NOT occupancy_signal THEN ahu_mode := MODE_UNOCCUPIED ELSE { Default occupied } ahu_mode := MODE_OCCUPIED END_IF { --- Economizer Eligibility --- } { Simple OA temperature comparison; use enthalpy comparison if sensors available } econ_eligible := oat_c < OAT_ECON_LOCK_C AND oat_c < rat_c - 2.0 AND { OA cooler than return } oat_rh_pct < 85.0 { Not excessively humid } IF econ_eligible AND ahu_mode = MODE_OCCUPIED THEN ahu_mode := MODE_ECONOMIZER END_IF { --- AHU Mode Execution --- } CASE ahu_mode OF MODE_UNOCCUPIED: supply_fan_cmd := FALSE; return_fan_cmd := FALSE supply_fan_spd := 0.0 oa_damper_pos := 0.0; ra_damper_pos := 100.0; ea_damper_pos := 0.0 cooling_valve := 0.0 preheat_valve := MAX(0.0, (18.0 - rat_c) * 20.0) { Setback heating to 18°C } MODE_OCCUPIED, MODE_ECONOMIZER: supply_fan_cmd := TRUE; return_fan_cmd := TRUE { Fan speed PI — static pressure control } IF supply_fan_fb THEN fan_integral := fan_integral + (DUCT_PRESS_SP_PA - duct_press_pa) * SCAN_TIME_S supply_fan_spd := FAN_MIN_PCT + KP_FAN * (DUCT_PRESS_SP_PA - duct_press_pa) + KI_FAN * fan_integral supply_fan_spd := MAX(FAN_MIN_PCT, MIN(100.0, supply_fan_spd)) ELSE supply_fan_spd := 0.0 alarm_fan_fail := TRUE END_IF { OA Damper Position } IF ahu_mode = MODE_ECONOMIZER THEN oa_damper_pos := 100.0 { Full outside air for free cooling } ra_damper_pos := 0.0 ea_damper_pos := 100.0 ELSE { Minimum OA + CO₂ demand boost } IF zone_co2_ppm > CO2_OA_BOOST_PPM THEN oa_damper_pos := MIN(100.0, OA_MIN_PCT + (zone_co2_ppm - CO2_OA_BOOST_PPM) / 5.0) ELSE oa_damper_pos := OA_MIN_PCT END_IF ra_damper_pos := 100.0 - oa_damper_pos ea_damper_pos := oa_damper_pos END_IF { CO₂ Alarm } alarm_co2 := zone_co2_ppm > CO2_MAX_PPM { DAT Reset: Zone trim-and-respond (simplified) } dat_setpoint := DAT_SETPOINT_NOM + MAX(-3.0, MIN(4.0, (zone_temp_avg_c - RAT_SETPOINT_C) * 1.5)) dat_setpoint := MAX(DAT_MIN_C, MIN(DAT_MAX_C, dat_setpoint)) { Cooling Coil Valve (PI) — only if fan proven } IF supply_fan_fb AND dat_c > dat_setpoint + 0.2 THEN chw_integral := chw_integral + (dat_c - dat_setpoint) * SCAN_TIME_S cooling_valve := KP_CHW * (dat_c - dat_setpoint) + KI_CHW * chw_integral cooling_valve := MAX(0.0, MIN(100.0, cooling_valve)) preheat_valve := 0.0 ELSIF dat_c < dat_setpoint - 0.2 THEN cooling_valve := MAX(0.0, cooling_valve - 1.0) { Ramp closed } preheat_valve := MAX(0.0, (dat_setpoint - dat_c - 0.5) * 15.0) preheat_valve := MIN(100.0, preheat_valve) END_IF MODE_FREEZE: supply_fan_cmd := TRUE; return_fan_cmd := TRUE supply_fan_spd := 30.0 { Minimum circulation } oa_damper_pos := 0.0 { Close OA — freeze protection } ra_damper_pos := 100.0 preheat_valve := 100.0 { Full preheat } cooling_valve := 0.0 END_CASE { --- Chiller Plant Sequencing --- } { CHW supply temp setpoint — reset when warm outside } { chw_setpoint := CHW_SP_WARM_C if oat_c < 15°C else CHW_SP_NOM_C (handled in chiller PLC) } { Cooling demand estimate from cooling valve position (proxy) } cooling_demand_pct := cooling_valve { Chiller 1 (lead) — start when demand > 30%, stop when < 20% } IF cooling_demand_pct > 30.0 AND NOT ch1_start_cmd AND ch1_status THEN ch1_off_timer(IN := FALSE) IF ch1_off_timer.Q OR NOT ch1_start_cmd THEN ch1_start_cmd := TRUE chw_pump_cmd := TRUE END_IF ELSIF cooling_demand_pct < 20.0 AND ch1_start_cmd THEN ch1_on_timer(IN := ch1_start_cmd, PT := T#900s) IF ch1_on_timer.Q THEN ch1_start_cmd := FALSE END_IF END_IF { Chiller 2 (lag) — start when demand > 90% for sustained period } IF cooling_demand_pct > 90.0 AND ch1_start_cmd AND NOT ch2_start_cmd AND ch2_status THEN ch1_on_timer(IN := ch1_start_cmd, PT := T#900s) { Chiller 1 must be running 15 min } IF ch1_on_timer.Q THEN ch2_start_cmd := TRUE END_IF END_IF { Stage off lag: demand < 50% for 10 min } IF cooling_demand_pct < 50.0 AND ch2_start_cmd THEN ch2_on_timer(IN := TRUE, PT := T#600s) IF ch2_on_timer.Q THEN ch2_start_cmd := FALSE END_IF ELSE ch2_on_timer(IN := FALSE) END_IF { Stop all if no AHU cooling demand } IF ahu_mode = MODE_UNOCCUPIED THEN ch1_start_cmd := FALSE; ch2_start_cmd := FALSE; chw_pump_cmd := FALSE END_IF alarm_fan_fail := supply_fan_cmd AND NOT supply_fan_fb END_PROGRAM ``` --- ## 4. Tag List (ISA-5.1 Naming — BACnet Object Reference) | Tag Name | BACnet Object | Description | EGU | Lo | Hi | |---|---|---|---|---|---| | `AHU01_OAT_PV` | AI-1 | Outdoor air temperature | °C | −20 | 50 | | `AHU01_OAT_RH_PV` | AI-2 | Outdoor air relative humidity | % | 0 | 100 | | `AHU01_RAT_PV` | AI-3 | Return air temperature | °C | 10 | 35 | | `AHU01_DAT_PV` | AI-4 | Discharge air temperature | °C | 5 | 30 | | `AHU01_DUCT_PR_PV` | AI-5 | Supply duct static pressure | Pa | 0 | 500 | | `AHU01_CO2_PV` | AI-6 | Zone CO₂ concentration | ppm | 300 | 2000 | | `AHU01_CHW_SUP_PV` | AI-7 | CHW supply temperature | °C | 4 | 15 | | `AHU01_SF_RUN_FB` | BI-1 | Supply fan run feedback | — | — | — | | `AHU01_RF_RUN_FB` | BI-2 | Return fan run feedback | — | — | — | | `AHU01_OCC_IN` | BI-3 | Occupancy signal | — | — | — | | `AHU01_SF_CMD` | BO-1 | Supply fan start command | — | — | — | | `AHU01_RF_CMD` | BO-2 | Return fan start command | — | — | — | | `AHU01_SF_SPD_CV` | AO-1 | Supply fan VFD speed | % | 15 | 100 | | `AHU01_OA_DPR_CV` | AO-2 | OA damper position | % | 0 | 100 | | `AHU01_COOL_VLV_CV` | AO-3 | CHW cooling coil valve | % | 0 | 100 | | `AHU01_PREHEAT_CV` | AO-4 | Preheat coil valve | % | 0 | 100 | | `CH01_START_CMD` | BO-3 | Chiller 1 start command | — | — | — | | `CH02_START_CMD` | BO-4 | Chiller 2 start command | — | — | — | | `CHW_PUMP_CMD` | BO-5 | CHW primary pump | — | — | — | | `AHU01_MODE` | AV-1 | AHU operating mode | — | 0 | 5 | --- ## 5. Alarm Configuration | Alarm | Priority | Setpoint | Action | |---|---|---|---| | `AHU01_FREEZE_ALM` | Critical | OAT < 2°C | Preheat 100%; close OA damper | | `AHU01_FAN_FAIL_ALM` | Critical | Fan commanded but no proof | Inhibit coils; alert maintenance | | `AHU01_CO2_HIGH_ALM` | High | CO₂ > 1000 ppm | Increase OA damper; alert | | `AHU01_DAT_LOW_ALM` | High | DAT < 13°C | Close cooling valve; check setpoint | | `AHU01_CHW_HI_TEMP_ALM` | High | CHW supply > 9°C | Check chiller status; reduce load | | `CH01_FAULT_ALM` | High | Chiller 1 fault | Switch to Chiller 2; alert maintenance | | `CH02_FAULT_ALM` | High | Chiller 2 fault | Operate on Chiller 1 only |

More like this

Rate, comment, and get full access

Members can download files, rate contributions, and discuss fixes with the engineers who posted them — free.

Join the library