Proportional with Integral (PI) control

PI configuration is recommended for most control loops, because the integral term eliminates the setpoint offset inherent in P-only loops. PI control uses proportional gain to adjust the output, and then incrementally continues to add (or subtract, if appropriate) from the output value for as long as a setpoint error continues to exist.

PI loop output is calculated as follows:

Output = KP x (ES + KI x ErrorSum)  (if action = direct), or

Output = - (KP x (ES + KI x ErrorSum)) (if action = reverse)

where: ES = [PV - setpt]

ErrorSum = Sum of ES over time

Repeats per minute

The Integral Constant property specifies the integral gain (KI) in repeats per minute. This is sometimes called a reset rate. To understand repeats per minute, consider the scenario where a loop is controlling at setpoint. If a certain setpoint error occurs, say from a sudden setpoint change, the loop output immediately changes by a level corresponding to its proportional constant (acting on the P-term). During this hypothetical example, assume the controlled process does not react from any loop output change, but stays at the original value (setpoint error stays constant).

The loop’s integral term immediately begins increasing the output (or decreasing the output, depending on the direction of setpoint error) at specific rate determined by the integral term. Over the period of one minute, the amount of output change that would occur is defined by the Integral Constant (repeats per minute). A repeat equals the amount of output change initially generated by the P-term. For example, if this loop was configured with an Integral Constant value of 2.0, and the original output change was +7%, over a period of one minute the integral term would linearly ramp up the output value an additional +14%, or two repeats.

In a real-world PI loop, of course, the process variable does respond to an output change, and this continuously-linear ramping of the output would not occur. Instead, the process variable would start moving towards setpoint and the setpoint error would change (changing the proportional and integral terms, thus the loop output).

Integral overshot

The integral term of a PI loop can cause an “overshoot” of setpoint, meaning that the increased loop output may result in a new setpoint error in the opposite direction. In some cases, it is possible for this overshoot to continuously repeat (oscillation), which is typically undesired. However, a small amount of overshoot for an initial correction is not uncommon.

To minimize overshoot, the PI loop’s integralConstant is typically kept small, and sized appropriately for the assigned proportionalConstant.

Integral windup prevention

Integral windup is prevented by limiting the ErrorSum value based on the LoopPoint’s Maximum Output and Minimum Output values.

Pi configuration guidelines

If using PI loop control, follow these guidelines:

  • Output limits: Define the Maximum Output and Minimum Output properties for the loop output, noting that the maximum value must be greater than the minimum.
  • Proportional gain: Calculate and enter a Proportional Constant (KP) property value starting with this formula:

    [output range (minOutput - maxOutput)] / throttling range

    where throttling range is the corresponding result in the process variable.

    For example, for a temperature loop where a 0-to-100% loop output results in a 20 degree swing in the process variable, a starting point KP is:

    [(100% - 0%)/ 20deg.] = [(100% / 20deg.] = 5

    When tuning a PI loop, you typically reduce the Proportional lConstant value, because the integral effect on the output will correct setpoint error over time.

  • Bias: Assign a value of 0.0 (no output bias). A fixed bias is not desired, because the integral term of the loop effectively creates an adjustable bias, as needed.
  • Integral Gain: Set the integral gain (property Integral Constant) to a nominal value, typically less than one (1.0). A value of 0.5 is a good starting point for many loops. Decreasing the integral constant makes the loop respond more slowly.
  • Deravitive Gain: Disable derivative by setting the Derivative Constant property at 0.0 (the default).