# PID Loop - Tuning A PID Loop - How to tune the PID loop in a systematic manner to prevent the system from oscillating in 3 sets of steps (A, B, C).

Tuning a PID Loop

A. Tune the Proportional Band

1Set the integral and derivative times to 0 seconds.

a) If the Input is not oscillating regularly about the setpoint as observed in Figure • 1, divide the proportional band by 2. Repeat this step if the Input is still not oscillating regularly about the setpoint after having stabilized. Once some oscillations are observed, continue to step 2. Figure • 1Proportional – Input not Oscillating about Setpoint

b) If the Input is oscillating regularly about the setpoint as observed in Figure • 2, multiply the proportional band by 2. Repeat this step if the Input is still oscillating regularly about the setpoint after having stabilized. Once no oscillations are observed, continue to step 2. Figure • 2Proportional – Input Oscillating about Setpoint

2Carefully increase or decrease the proportional band by small increments until some oscillations just appear about the setpoint as shown in Figure • 3. Figure • 3Proportional – Near Perfect Tuning

Increase the proportional band by 50%, for example, and multiply the proportional band by 1.5. Initiate a cold start (stop then restart the system) and make sure that the system has minimal overshoot, minimal offset, and is not oscillating as shown in Figure • 4. Figure • 4Proportional – Near Perfect Tuning with No Oscillations

B. Tune the Integral Time

1Set the integral time to a large value which results in a slow system response.

a) If the Input is not oscillating regularly about the setpoint as observed in Figure • 5, multiply the integral time by 2. Repeat this step if the Input is still not oscillating regularly about the setpoint after having stabilized. Once some oscillations are observed, continue to step 2. Figure • 5Input not Oscillating about Setpoint

b) If the Input is oscillating regularly about the setpoint as observed in Figure • 6, divide the integral time by 2. Repeat this step if the Input is still oscillating regularly about the setpoint after having stabilized. Once no oscillations are observed, continue to step 2. Figure • 6Input Oscillating about Setpoint

2Carefully increase or decrease the integral time by small increments until some oscillations just appear about the setpoint as shown in Figure • 7. Figure • 7: Integral – Near Perfect Tuning

C. Tune the Derivative Time

NOTE

HVAC systems have a slow response time due to the nature of the equipment so the derivative time is generally not used, that is, set the derivative time to 0.

INFO:

Proportional (P):  The proportional term makes a change to the output that is proportional to the current error value.  Therefore a large proportional increases the output by that factor causing instability, if only proportional is used.

Integral(I): The integral term is proportional to both the magnitude of the error and duration of the error. Therefore summing the instantaneous error over time gives the accumulated error that should have been corrected previously. This sum of error is multiplied by the integral factor to obtain the output.  It accelerates the input towards the set point.

Derivative (D): The derivative term calculates the rate of change of error and this is multiplied by the derivative factor to the output. The derivative term slows the rate of change of the controller output. It is used to reduce the overshoot caused by the integral component and improve stability of the output.

The goal of control is to tune the PID parameters to correct values to control the dynamic system in a stable manner.

We have a mathematical formula, but why do we keep failing to obtain optimal control parameters?

Trial and Error: Tuning PID parameters is a trial and error procedure. To truly tune a system, the engineer must tune the parameters with minimum, maximum and normal system operation and observe the output over a time period. It is not as simple as entering a value. This process is neglected by many engineers due to time pressures in the project.

Vendor Definition: PID is a generic algorithm for control and the P, I and D factors are just coefficients. Therefore different vendors have different meanings for these factors. Some treat it just as a factor; others treat it in time scale. Therefore if a system is tuned using certain PID parameters in one BAS system, the same parameters most likely fail in another system.  PID parameters used in one BAS system can not used in another system.