kitControl-LoopPoint

 The LoopPoint implements a simple PID control loop, and is available in the HVAC folder of the kitControl palette. Loop objects provide closed-loop PID control (proportional, integral, derivative) at the station level. Independent gain constants allow the loop to be configured as P-only, PI, or PID.

ResetIntegral is an available action on a LoopPoint. If invoked, this clears the current integral component of the loop’s output calculation. If needed, this slot can be linked to another object to provide a quick purge of the integral effect. Typically, the latter would provide more of a “debug” utility, and should not be necessary if the LoopPoint’s configuration properties are correctly defined.

The following sections provide more LoopPoint details:

See also Alphabetical list of kitControl components

LoopPoint setup

Setup of the LoopPoint component involves setting the following properties:

  • Facets

    Used to set the units and display number precision of the output slot.

  • Loop Enable

    Setting this input to true will enable the PID loop algorithm to execute at the rate selected by the Execute Time property. Setting this input to false will force the PID loop output to a value dependent on the selection in the Disable Action property.

  • Input Facets

    Used to set the units and number precision of the input slot (control variable and setpoint).

  • Control Variable

    Input for the controlled parameter (for example, space temperature). This input must be valid for this object to function.

  • Setpoint

    Input for the setpoint value (for example, space temperature setpoint). This input must be valid for this object to function. The object does not provide an integral command function for the setpoint value when entered on the property sheet. If a commandable setpoint is required, link from a NumericWritable control point to the setpoint slot.

  • Execute Time

    Controls the execution frequency for the PID algorithm, where the default value is 0.5 seconds.

  • Loop Action

    Determines whether the control algorithm is direct or reverse acting.

    • Loops setup for direct acting mode increase the loop output as the value of the controlled variable becomes greater than the setpoint value. In a temperature loop, this is typically considered to be a cooling application.

    • Loops setup for reverse acting mode increase the loop output as the value of the controlled variable becomes less than the setpoint value. In a temperature loop, this is typically considered to be a heating application.

  • Disable Action

    The value that the loop output will be set to when the loop is disabled by setting the Loop Enable property to false.

    • Max Value sets the loop output value to the Max Output property value.

    • Min Value sets the loop output value to the Min Output property value.

    • Hold maintains the loop output at the last calculated value.

    • Zero sets the loop output value to a zero (0.0) value.

  • Proportional Constant

    Defines the value of the proportional gain parameter used by the loop algorithm. Used to set the overall gain for the loop. A starting point for this value is found by output range/throttling range.

  • Integral Constant

    Defines the integral gain parameter, in repeats per minute, used by the loop algorithm. Also called reset rate. Acts on magnitude of the setpoint error. A typical starting point is 0.5.

  • Derivative Constant

    Defines the derivative gain parameter, in seconds, used by the loop algorithm. Acts on the rate of change of the setpoint error.

  • Bias

    Defines the amount of output bias added to the output to correct offset error, normally used only used with proportional control.

  • Maximum Output

    Defines the maximum output value that the loop algorithm can produce.

  • Minimum Output

    Defines the minimum output value that the loop algorithm can produce.

  • Ramp Time

    Defines the minimum time that the output can ramp completely from Minimum Output to Maximum Output, effectively establishing a “rate of change” slope. This rate of change is enforced upon station startup, or whenever the LoopPoint transitions from disabled to enabled.

    Once the Ramp Time has expired, it has no effect on the output. Intended use is to prevent the loop from “slamming” a valve or other controlled device to a limit during startup.

    NoteThe default Ramp Time is 0:00:00, or disabled. To constrain loop output rate of change when the loop starts or is enabled, enter a reasonable Ramp Time value.

Loop terms

The following terms are used when describing the operation of the LoopPoint component:

  • Process variable

    The controlled process, meaning the value at the setpoint input. (“What you’ve got.”) Abbreviated here as “PV.”

  • Setpoint

    The target for the process variable, meaning the value at the setpoint input. (“What you want.”) Abbreviated here as “setpt.”

  • Setpoint error

    The difference between the process variable and the setpoint, acted upon by the loop algorithm. Abbreviated as “ES.”

  • Loop output

    The correction signal produced by the loop algorithm. The output should be linked (directly or indirectly) to a NumericWritable component used to position a proportionally-modulated device (such as a valve or damper) that controls the process variable.

  • Proportional gain

    The value of the property Proportional Constant. Abbreviated here as “KP”. Sets the overall gain of the loop, as in the following ratio:

      KP = Output range / effected process range (sometimes called throttling range)

  • Throttling range

    The amount of process variable change expected as a result of throttling the system between the minOutput and maxOutput.

  • Bias

    A value added to the output to correct offset error. It is typically used in proportional-only control as a “pivot” output value, for when the PV = setpt.

  • Action

    Defines the “direction” of the output relative to setpoint error, where:

    • Direct — Loop output increases when PV increases.

    • Reverse — Loop output increases when PV decreases.

  • Integral gain

    The value of the property integralConstant. Abbreviated as “KI”. Sets the integral or “reset” gain of the loop, expressed in repeats per minute. The KI component of the loop output reacts to the duration of the setpoint error.

  • Derivative gain

    The value of the property derivativeConstant. Abbreviated as KD. Sets the derivative or “rate” gain of the loop, expressed in repeats per minute. The KD component of the loop output reacts to the “rate of change” of the setpoint error, and provides a “dampening” effect.

Proportional-only control

P-only control is just reset action, where loop output is directly proportional to the magnitude of the setpoint error (ES) and the size of the proportional gain (KP).

The following topics apply to PI loop control with a LoopPoint:

Output calculation

P-only loop output is linear, and is calculated as follows:

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

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

    where:

  ES = [PV - setpt]

P-only configuration guidelines

If using proportional-only loop control, follow these guidelines:

Output limits

  Define the maxOutput and minOutput properties for the loop output, noting that the maximum value must be greater than the minimum.

Proportional Gain

  Calculate and enter a proportionalConstant (KP) property value starting with this formula:

   [output range (maxOutput - minOutput)] / 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 the loop, you can try increasing this value (effectively using only a portion of the throttling range) to eliminate the amount of setpoint error. However, if you increase the KP too much, this typically results in a constant oscillation of the process variable (above and below the setpoint).

Bias

  Assign the bias property an “output-midpoint” value (for example, 50.0). This allows for equal corrections for a process variable above or below setpoint.

Integral and Derivative Gain

  Set the properties integralConstant and derivativeConstant to 0.0 (the defaults).

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.

The following topics apply to PI loop control with a LoopPoint:

Output calculation

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

The integralConstant property specifies the integral gain (KI) in “Repeats per minute,” sometimes called a “reset rate.”

Repeats per minute

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 integralConstant (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 integralConstant 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 “2 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 overshoot

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 proportionalConstant (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 proportionalConstant 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 integralConstant) 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 will make the loop respond more slowly.

Derivative Gain

  Disable derivative by setting the derivativeConstant property at 0.0 (the default).

Proportional with Integral and Derivative (PID) control

PID loop control can be difficult to tune and (often for this reason) is seldom used. However, in certain cases, PID control may be needed. An example is the control of a process with a long “reaction time,” such as temperature control of a large mass. For such a lag-oriented system, the derivative component of the PID loop output can help prevent “overshoot” that might otherwise result from PI control.

The derivative gain (KD) exerts an anticipating “braking” effect on the loop output, based on the rate-of-change of the process.

The following topics apply to PID loop control with a LoopPoint:

Output calculation

PID loop output is calculated as follows:

  Output = KP x (ES + KI x ErrorSum + KD x ((ES - LastES) / deltaT))     (if action = direct),  or

  Output = -(KP x [ES + KI x ErrorSum) + KD x ((ES - LastES) / deltaT)))      (if action = reverse)

    where:

  ES = [PV - setpt]

  ErrorSum = Sum of ES over time

  LastEs = last error

  deltaT = time between samples

In the LoopPoint, the derivativeConstant property specifies the derivative gain (KD) directly in seconds (note this differs from some systems using derivative in minutes).

PID configuration guidelines

If using PID control, follow the PI configuration guidelines, with the addition of defining a positive value as the derivativeConstant.

In general, a derivativeConstant less than 10 seconds should be tried first, and only then increased (if necessary), providing that the loop output remains stable at steady-state conditions.

LoopPoint Examples

Figure 27 shows an example of a LoopPoint property sheet.

Figure 27. Example LoopPoint property sheet


Example LoopPoint property sheet


Figure 28 shows an example of a direct-acting LoopPoint with a commandable setpoint.

Figure 28. Example LoopPoint in wire sheet, linked to other components.


Example LoopPoint in wire sheet, linked to other components.