Understand PI and PID control, explore loop response and learn how automatic tuning can assist BMS commissioning.
Interactive
Interactive PI loop simulator
Adjust the PI settings for an illustrative AHU heating coil. The chart replays a simulated 20-minute trend in two seconds when you change the settings.
━ Setpoint (°C)━ Actual temperature (°C)━ Valve demand (%)
How to use the simulator
Increase gain to make the output respond more strongly to an error. Reduce integral time to correct persistent error more quickly. Compare the three presets, then adjust one parameter at a time.
The heating coil response is fixed so you can compare tuning settings fairly. The valve demand is limited to 0–100%. Integral is expressed as time in seconds in this simulator: a smaller positive value gives faster integral action. Enter 0 to disable integral action. The permitted integral range is 0–600 seconds. Niagara commonly expresses integral as repeats per minute instead; use the Trend / Niagara integral converter on this page to compare the conventions. This is an educational model, not a prediction of actual plant performance or recommended live settings.
What does a control loop do?
A closed-loop controller continuously compares a measured value (PV) with a target (SP) and adjusts an output to reduce the difference. For an AHU heating coil, the measured value is supply air temperature, the setpoint is the required temperature and the output is the heating valve demand.
Setpoint (SP) → PI controller → Valve / coil → Temperature (PV)
Feedback: the measured temperature returns to the controller, which recalculates the error. For heating, falling temperature normally increases valve demand; for cooling, rising temperature increases demand. Check the controller's direct/reverse action convention.
Error = SP − PV (heating example)
Proportional (P) — gain
Proportional action changes the output in proportion to the current error. A larger gain produces a larger output change for the same error. Too little gain gives a sluggish response; too much can cause overshoot and hunting.
P contribution = Kp × error
Example: a 2°C error with gain of 10 percentage points per °C contributes 20 percentage points to the output. This is a contribution, not necessarily the total valve demand.
Some controllers use proportional band instead of gain. A smaller proportional band means stronger action. Check the manufacturer's units and scaling.
Integral (I) — accumulated error
Integral action adds or removes output while an error persists, helping eliminate the steady-state offset that proportional-only control may leave. If the temperature remains below setpoint, the integral contribution continues to build until the error is removed or the output reaches a limit.
I contribution = (Kp / Ti) × accumulated error over time
In this common PI convention, a shorter integral time (Ti) means stronger integral action. Some controllers instead express integral action as reset rate in repeats per minute, where a larger number means faster action. For an equivalent reset-rate convention, reset rate = 60 / Ti in seconds. Other implementations use independent integral gain; do not assume the values are interchangeable.
Excessive integral action may cause overshoot and oscillation. Anti-windup prevents continued accumulation when output is limited.
Derivative (D) — rate of change
Derivative action responds to how quickly the error or measured value changes. It can add damping when the process approaches the setpoint rapidly, but it is sensitive to measurement noise. In many HVAC applications PI is sufficient and derivative is left at zero.
D contribution = Kp × Td × rate of change of error
Some controllers apply derivative to the measured value rather than error to avoid a sudden output kick on setpoint changes. Derivative does not predict the future; it responds to the measured rate of change.
Reading PI settings from a trend graph
When a loop hunts around its setpoint, look at two features of the PV trend: how far it travels above and below SP (amplitude), and how long each oscillation takes (period).
Proportional gain — think height of the peaks and troughs
Higher gain makes the output react more strongly to each unit of error. On a plant with response delay, excessive gain can drive the PV too far above or below SP, producing larger peaks and troughs. Reducing gain can help reduce hunting; too little gain can make recovery slow.
Conceptual trend showing height of oscillations; not measured data or an isolated parameter test.
Integral time — think width of the peaks and troughs
Integral time determines how quickly accumulated error changes the output. A shorter time gives faster correction and can contribute to rapid cycling or excessive overshoot; a longer time slows correction and can produce broader, slower excursions. On Niagara-style reset-rate settings the direction is reversed: increasing repeats per minute speeds up integral action.
Conceptual trend showing width of oscillations; not measured data or an isolated parameter test.
Why the two settings work together
Height and width are useful visual clues, not independent tuning controls. Both settings influence the amplitude, period and damping of the actual response. In a common PI algorithm the integral contribution is proportional to Kp/Ti, so changing gain also changes the strength of integral action. Valve travel, sensor delay, plant gain and thermal inertia affect the trend as well.
Commissioning example: If an AHU supply air temperature oscillates around 22°C with large excursions, try a small reduction in gain and observe the trend. If the integral correction is too aggressive for the coil response, lengthen integral time (or reduce reset rate). Change one setting at a time, allow several response cycles, and aim for a stable PV close to SP with smooth valve demand.
Further reading:CIBSE Guide H: Building control systems (2009), sections 2.2.3–2.2.5 and 2.5.2. The guide discusses integral action, stability and practical tuning; these original diagrams and the height/width analogy are teaching aids, not reproduced CIBSE figures or universal rules.
What a well-tuned loop looks like
Illustrative curves, not measured plant data. A well-tuned loop reaches the setpoint in a reasonable time, with acceptable overshoot and without sustained hunting. Stability, actuator wear and energy use matter as much as speed.
Before tuning, verify sensor accuracy, actuator direction, output limits and plant availability. Tune one interacting stage at a time where practicable; observe real plant trends before accepting settings.
Loop tuning cheat sheet
Balance response speed and stability. Pressure loops often need to react quickly; space and return temperature loops need time for the plant to affect the controlled environment.
Important: These are illustrative commissioning trial settings, not manufacturer recommendations or universal values. Gain assumes a 0–100% output and is expressed in output percentage points per PV engineering unit. Trend IQ integral time is shown in minutes; Niagara kitControl LoopPoint integral reset rate is shown in repeats per minute. For equivalent dependent PI algorithms, reset rate = 1 / integral time in minutes. Check the particular controller implementation, output scaling and execution interval before applying values. Derivative starts at zero. A higher gain gives a stronger immediate response; a longer integral time slows accumulated correction. Pressure loops require quicker response than space temperature loops, subject to actual plant dynamics.
Suggested commissioning starting points
Fast
Fan speed – duct static pressure
PV units: Pa
Gain: 0.1 % output/Pa Trend integral time: 0.5 min Niagara integral reset rate: 2 r/min Derivative: 0
VAV dampers opening and closing change pressure quickly. Begin conservatively; increase reset rate if recovery is too slow and plant response permits.
Fast / medium
Pump speed – system differential pressure
PV units: kPa
Gain: 1 % output/kPa Trend integral time: 1 min Niagara integral reset rate: 1 r/min Derivative: 0
Respond to two-port valves opening and closing. Check minimum speed, flow and pump limits.
Medium
AHU supply air temperature
PV units: °C
Gain: 5 % output/°C Trend integral time: 2 min Niagara integral reset rate: 0.5 r/min Derivative: 0
Allow for valve stroke, coil response and sensor delay. Tune individual heating/cooling stages.
Slow
Return air temperature
PV units: °C
Gain: 10 % output/°C Trend integral time: 10 min Niagara integral reset rate: 0.1 r/min Derivative: 0
Allow time for supply air changes to affect the occupied zone and return air. Gain 10 and a 10-minute integral time are a practical trial example; confirm the immediate response is not excessive.
Very slow
Space temperature
PV units: °C
Gain: 10 % output/°C Trend integral time: 10 min Niagara integral reset rate: 0.1 r/min Derivative: 0
Building thermal mass and occupancy create long delays. Gain 10 and a 10-minute integral time are a practical trial example; avoid chasing short-term fluctuations.
Slow
CO₂ demand-controlled ventilation
PV units: ppm
Gain: 0.03 % output/ppm Trend integral time: 10 min Niagara integral reset rate: 0.1 r/min Derivative: 0
Allow for air mixing and occupancy changes; maintain required minimum ventilation.
Slow
Humidity control
PV units: % RH
Gain: 1 % output/% RH Trend integral time: 10 min Niagara integral reset rate: 0.1 r/min Derivative: 0
Allow moisture transport and sensor lag; maintain independent humidity limits.
Medium / slow
LTHW / CHW flow temperature
PV units: °C
Gain: 5 % output/°C Trend integral time: 3 min Niagara integral reset rate: 0.333 r/min Derivative: 0
Allow for water volume, transport delay and mixing. Boiler/chiller protections remain independent.
Fast
VAV airflow control
PV units: l/s
Gain: 0.1 % output/l/s Trend integral time: 0.5 min Niagara integral reset rate: 2 r/min Derivative: 0
Illustrative only; use the terminal manufacturer's tuning procedure and avoid competing with its internal controller.
Pressure sensor scaling: bar to kPa
Use kPa for pump pressure PV and SP where practical: 0.30 bar = 30 kPa. Multiply bar by 100. This improves numerical readability, not sensor resolution or control performance. For equivalent proportional action, divide a gain expressed per bar by 100: 100 %/bar becomes 1 %/kPa. Convert all related limits, setpoints and alarm thresholds. Reset rate remains unchanged in the dependent PI convention; independent integral gain needs corresponding rescaling.
Trend / Niagara integral converter
Convert between integral time and reset rate for equivalent dependent PI algorithms. Zero reset rate disables integral action; it does not correspond to zero integral time.
Reset rate = 1 ÷ integral time (minutes)
What happens when you change the settings?
Increase gain
Stronger immediate response to error. May improve sluggish control but can increase overshoot and rapid hunting.
Decrease gain
Gentler immediate response, usually smoother output; too little gain can cause sluggish recovery.
Make integral action faster
Trend: decrease integral time. Niagara: increase reset rate. Corrects persistent error faster; excessive action may cause slow oscillation and windup.
Make integral action slower
Trend: increase integral time. Niagara: decrease reset rate. Slower accumulated correction may reduce overshoot but prolong offset.
Recognising poor control on a trend
Illustrative schematic trends, not measured data or simulated tuning results. PV and SP use the left axis; plant output uses the right 0–100% axis. Pattern alone does not establish the cause.
Sluggish response
Possible cause: Low proportional gain or weak integral action; also check actuator speed and plant capacity.
Adjustment: Increase gain slightly if the initial output response is too weak. Increase reset rate only if persistent error remains.
Fast hunting
Possible cause: Excessive gain is one possible cause; noise, dead time and interacting loops can look similar.
Adjustment: Reduce gain in small steps and observe the response before changing integral.
Persistent offset
Possible cause: Integral disabled or too weak, provided output is not saturated and the plant can achieve setpoint.
Adjustment: Increase reset rate slightly (or reduce integral time). Check limits and plant availability first.
Slow rolling oscillation
Possible cause: Excessive integral action or long process dead time may cause repeated overshoot.
Adjustment: Reduce reset rate (or increase integral time). Allow a complete settling period before reassessment.
Output saturation / windup
Possible cause: Output remains at a limit while error persists. Plant may be undersized or unavailable.
Adjustment: Check capacity, interlocks, actuator response and anti-windup. Do not simply increase gain or integral.
Well-damped response
Possible cause: PV approaches setpoint without sustained hunting; output settles smoothly.
Adjustment: Retain settings if response is suitable for the application; verify under normal load changes.
Trend PV, SP and effective plant output. Check for saturation and competing loops.
Record original settings and change one parameter at a time in small increments.
Allow adequate settling time for the application; stop or restore settings if control deteriorates.
Verify response under normal load variations and document final settings.
Trend SET and Niagara may use different gain units, output scales, integral conventions and execution intervals. Do not copy numeric settings between platforms without checking the implementation.
A BMS Logic Academy commissioning utility designed to assist engineers in identifying PI settings for an existing Niagara control loop using measured plant response. It is not a replacement for engineering judgement or a plant safety system.
Installation and setup
Install the blaLoopTuner module in the compatible Niagara installation. Ensure it is available on the host running the target station and in Workbench as required. Follow the module installation and certificate trust instructions.
In Niagara Workbench, open the Palette sidebar and select the blaLoopTuner palette.
Drag the LoopTuner component from the palette onto a wire sheet in the target station.
Open the component property sheet and configure the required links and test parameters.
How it works
Connect the existing process value, setpoint and control demand to the tuning component on the wire sheet.
Establish a stable operating condition with the relevant plant stage available.
Configure safe process and output limits, step size and test timeout.
Run a controlled step or multi-step test. The tuner temporarily controls the selected output while coordinating the existing loop's enable state.
Monitor the measured response and calculate candidate proportional and integral settings. Review the result and quality indication.
Restore normal control and validate the recommended settings on the real plant before accepting them.
Typical applications
AHU heating and cooling coil valves, pressure control and other suitable modulating plant. The exact suitability depends on the process, interlocks, operating conditions and module version.
Important commissioning precautions
Use only on authorised plant with appropriate supervision, independent safeties and verified output limits. Confirm the abort and restoration behaviour before a live test. Avoid tuning interacting stages simultaneously. Never bypass safety interlocks.
Module screenshots
Workbench property sheet, wiring example and tuning trend screenshots will be added following review.
Demonstration video
A practical commissioning demonstration will be added here when available. No download or purchase is currently offered on this page.