You are on page 1of 5

Basics of PID Control (Proportional+Integral+Derivative)

The PID features found in the control loops of todays controllers have enabled us to achieve much
greater accuracy in our commercial control systems at an attractive price compared to that available only
a few years ago.

When setting up PID loop control, achieving proper operation can be difficult because of the complex
setup parameters and the need to understand the sequence of implementing them. Proper operating
control may be defined as the ability to control a variable at a given setpoint within an acceptable degree
of accuracy. This is not an easy feat, because of the dynamics of a control system. If not properly set
up, abrupt changes in setpoint or system loading can cause system controls to oscillate or control with
excessive error between setpoint and actual control point.

The period of the loop (oscillation) is the time from peak to peak. All control loops have a tendency
to oscillate because of the built-in timing constants of the control system components and the dynamically
changing variables such as setpoint shifts or load changes. Typical period values encountered in control
system loops would be in the range of 30 seconds to twenty minutes. All loops can be made to oscillate
by setting the throttling range too low (loop gain too high). Loop oscillation is undesirable in control
systems and is easily eliminated by increasing the proportional band of the loop.

Commonly referred to as the throttling range (TR), proportional band is defined as the amount of
change in the controlled variable required to drive the loop output from 0 to 100%. Systems
subjected to abrupt changes in load or setpoint will typically require a wider proportional band to achieve
stability in control during these system upsets. Very quick system response times, such as those found in
static pressure control, will require much wider proportional bands to prevent overshoot, the most
common cause of oscillation. The gain of the loop is inversely proportional to the throttling range or
proportional band. In general, decreasing the throttling range will increase the amount of over
shoot. Conversely, the larger the throttling range, the slower the loop will respond.

Gain is the ratio of output change (%) over the measured variable change (%) that caused it.

Where PB is the proportional band.

Example: If the PB is 20%, then the gain is 5. A 3% change in the error signal (setpoint- process
variable) will result in a 15% change in a controllers output, due to the proportional action. If gain is 2,
then the PB is 50%.

A common characteristic of proportional control is an error between the setpoint and control point,
which is referred to as offset or droop. As the system load and/or proportional band increases, so does
throttling range. For instance, with 10 degree throttling range and 100% loop output, the actual control
point will be offset 5 degrees from setpoint. Offset is an undesirable characteristic of proportional only
control loops and is easily eliminated by adding Integral Action.
The integral component of a control loop has the effect of continuing to increase or decrease
the output as long as any offset or droop continues to exist. This action drives the controller in the
direction necessary to eliminate the error caused by the offset.

Integral, or reset, adjusts a controllers output in accordance with both the size of the deviation from
setpoint and the time it lasts.

A controller accomplishes this correction by determining the amount of error that exists between the
actual value of the controlled variable and the value of the loop setpoint, then acting as though it were
automatically resetting the setpoint by this error amount over a specified time interval. Integral action is
sometimes defined as repeats per minute of rest toward setpoint. The range or adjustment is typically in
the area of .01 to 2.0 repeats per minute. Integral works by causing the controller output to move in the
direction of setpoint by an amount equal to the difference between the loop output when setpoint is equal
to control point (assume 50%) and the actual loop output caused by offset.

Consider a loop that is at setpoint when its output is at 50%. If offset or error causes the loop output
to be at 20% (a proportional term of 30%), an integral value of one repeat per minute will change the loop
output 30% per minute in a direction to bring the control point back to setpoint. Note the loop output
change occurs in increments throughout the minute. (The size of these increments depends on the
controller.) If a loop block has an update time of five seconds, the 30% change resulting from integral
action of one repeat per minute will occur in 12 steps of approximately 2.5% each.

Remember that the systems dynamics will change with each increment of integral action. The loop
may reach setpoint well before the full 30% integral change is achieved. This is what the term repeats
per minute relates to when used in the context of integral action.

Derivative action adds the effect of the errors differential or rate of change. This means when
an error changes by more than a given percentage during a specified time period, a portion of the error is
added to the calculated output to boost the output response. Typically, using derivative action is effective
only if the loop can respond to a surge in the output very quickly.

Derivative action observes how fast the actual condition approaches the desired condition and
produces a control action based on this rate. This additional action anticipates the convergence of actual
and desired conditions. In effect, it counteracts the control signal produced by the proportional and
integral terms. The intended result is a reduction in overshoot.

As a general practice, the loop control we encounter in HVAC control does not require the use of
derivative control. It is difficult to determine exactly how to set it up; an improper setup can cause more
harm than good. Derivative action is more commonly used in the process control industry, which typically
involves equipment with extremely rapid response times and large overshoots.

To review, proportional only controls cannot hold a process at the exact setpoint. A proportional
offset is always present because the control output is 0% at setpoint. Any load on the system will cause
the control point to be offset from the setpoint. The greater the load on the system, the further the control
point will be offset from the setpoint and under maximum load, this error will approach the throttling
range. See Figure 1.
Figure 1. Adding integration results in much less error than proportional only. See Figure 2.

Figure 2.

On proportional plus integral controls, the amount of correction may become too large if the system
load exceeds the capacity of the equipment. When the actuated device (valve or damper) is fully open or
closed, and the setpoint still cannot be reached, the integration error continues to grow. The result is
called integral windup. Properly sized equipment is extremely important to avoid integral windup.

When properly set up, PID features in the control loops of todays controllers enable you to achieve
high accuracy at a very affordable price. The following guidelines will help you overcome the complexity
of PID setup parameters to achieve proper operation.
Step 1. Before stabilizing the loop by increasing the throttling range (TR), measure the period
of oscillation-the time (in minutes) from one peak to the next (one complete cycle).
Step 2. Next, achieve loop stability using proportional control only. Do this by increasing the
TR attribute value until the loop control is stable with no oscillation, and then add
an additional 10% to avoid future oscillation. Do not hesitate to increase TR if
necessary, because some loops, such as mixed air, may require a TR of 25
degrees or more to achieve stability. If stability cannot be achieved by increasing
the TR, the mechanical system installation and design should be reviewed because
the addition of integral and/or derivative action to an unstable control loop can only
cause further instability.
Step 3. Once stable loop operation is achieved using proportional only control, widen the TR
attribute value by 20 to 30% in preparation for adding integral.
Step 4. Use the following formula to calculate the integral value to be used. It will provide a
good starting point for integral action:

Step 5. Monitor loop control to evaluate response. If response is slow with integral action,
increase the I value slightly. It may be necessary to upset the loop to get a good
test of loop response. Changing the setpoint to simulate a sudden change in load,
then observing the time required to reach the new setpoint can do this. It is
generally not recommended to exceed 1.0 for integral, so it is better to start too
small than too large. Experience shows that numbers between 0.1 and 0.5 are
usually effective in providing close control.
Step 6. Typically, the control loops used in the HVAC industry do not require derivative
action. Derivative action is generally not recommended because an improper
derivative value will produce worse control than none at all. Experience proves
that proportional and integral control can achieve precision. If derivative is
required, use the following formula to determine the derivative value:

Many DDC systems offer an automatic self-tuning loop feature that eliminates the need to time the
loop period, calculate the proper integral value, and select the correct proportional band. While self-
tuning loops appear to offer the ideal solution to achieving good control and saving time, caution must be
exercised when using the self-tuning loop feature, especially in more complex control strategies.

For instance, the use of self-tuning loops in systems requiring the sequencing of two or more control
valves and/or dampers can inadvertently cause an overlap that turns on the heating and cooling at the
same time. This can happen when the self-tuning loop results in an excessively wide throttling range,
effectively reducing or eliminating the amount of intended separation between the heating and cooling
devices. Another word of caution is never to use the self-tuning loop feature to tune a loop used to
control two, two-position heating or cooling devices in sequence. Such a control strategy is usually
dependent on a specific throttling range value necessary to obtain the desired sequencing results.

Self-tuning loops tend to ratchet PID parameters (throttling range, integral, and derivative) upward at
a relatively quick rate in an attempt to achieve stable operation. If any of these values overshoot for any
reason, it will generally take much longer for the algorithm to bring them back to more realistic values.
When using the self-tuning loop feature, be sure to monitor system performance long enough to be
certain the entire control system operates properly and functions as a system. Once the self-tuning PID
values have stabilized and system operation has been monitored for proper and stable control, the self-
tuning feature may be turned off to prevent unexpected system disturbances from changing the PID
parameters in the future.

The basic principles of PID control and self-tuning PID loops are the same among all DDC control
systems. However, specific details and algorithm design may vary from one manufacturer to the next.

PID control represents a significant advancement in the controls industry. It is a very effective
technique for providing precise control. Although PID control is a relatively complex feature, control
engineers and technicians will find that well-designed products also make it user friendly.

It is important to understand what PID control can do for your operation and to learn how to set up
an effective PID control loop. While an improper setup is likely to result in unnecessary callbacks, a
properly tuned PID control loop will deliver satisfaction.

You might also like