This manual and the information in it are the property of American Standard Inc. and shall not be used or reproduced in whole or in
part, except as intended, without the written permission of American Standard Inc. Since The Trane Company has a policy of continuous product improvement, it reserves the right to change design and specification without notice.
The Trane Company has tested the system described in this manual. However, Trane does not guarantee that the system contains no
errors.
The Trane Company reserves the right to revise this publication at any time and to make changes to its content without obligation to
notify any person of such revision or change.
The Trane Company may have patents or pending patent applications covering items in this publication. By providing this document,
Trane does not imply giving license to these patents.
The following are trademarks or registered trademarks of The Trane Company: Tracer, Tracer Summit, and Trane.
This guide will help you set up, tune, and troubleshoot proportional, integral, derivative (PID) control loops used in Tracer controllers. These controllers include the Tracer MP580/581, AH540/541, and MP501
controllers. This chapter provides an overview of PID control.
What PID loops do
A PID loop is an automatic control system that calculates how far a measured variable is from its setpoint and, usually, controls an output to
move the measured variable toward the setpoint. The loop performs proportional, integral, and derivative (PID) calculations to determine how
aggressively to change the output.
The goal of PID control is to reach a setpoint as quickly as possible without overshooting the setpoint or destabilizing the system. If the system is
too aggressive, it will overshoot the setpoint as shown in Figure 1. If it is
not aggressive enough, the time to reach the setpoint will be unacceptably
slow.
Figure 1: The effects of PID aggressiveness
Too aggressive (overshoot)
Setpoint
Ideal response
Measured variable
Initial point
In the heating, ventilating, and air-conditioning (HVAC) industry, PID
loops are used to control modulating devices such as valves and dampers.
Some common applications include:
Too slow
Time
•Temperature control
•Humidity control
•Duct static pressure control
•Staging applications
CNT-APG002-EN 1
®
Chapter 1 Overview of PID control
How PID loops work
A PID loop performs proportional, integral, and derivative calculations to
calculate system output. Figure 2 illustrates how a typical PID loop
works. The sigma (Σ) symbol indicates that a sum is being performed. The
plus (+) symbol indicates addition, and the minus (–) symbol indicates
subtraction.
Figure 2: PID loop
+
Setpoint
Error
Σ
–
Measured variable
(process variable)
PID calculation
HVAC equipment
Conversion function
Plant
In an HVAC system, the controller uses a PID calculation to change the
output of mechanical equipment to maintain some setpoint. For example,
if a space is too cold, the PID calculation controls an actuator to open a
hot-water valve some amount, increasing the discharge-air temperature
to heat the space.
In classic PID control systems, the controller reacts to a comparison
between a setpoint and a measured variable (also called the process variable). The setpoint is often a user-defined setting, such as a room temperature setpoint. The measured variable is the controlled element, in this
case the current room temperature.
The difference between the setpoint and the measured variable is called
the error, which is the value used to calculate system output. The error is
defined as:
Error = setpoint – measured variable
For example, if a room temperature setpoint is 75°F (23.9°C) and the
actual temperature is 65°F (18.3°C), then the error is 10°F (5.6°C).
The PID calculation uses the error to calculate an output that moves the
measured variable toward the setpoint as quickly as possible without
overshooting the setpoint. The output typically controls the position of an
actuator over a range of 0% to 100%. In the example above, an actuator
would open a hot-water valve some amount to increase the room temperature by 10°F (5.6°C).
The plant is the physical system, such as a room or a duct, that contains
the controlled element (the measured variable). The conversion function
converts the measured variable to the same units as the setpoint. For
example, a thermistor measures space temperature in terms of resistance, which is then converted to a temperature by the analog input of the
controller.
2CNT-APG002-EN
PID calculations
®
PID calculations
A PID loop performs three calculations: the proportional calculation, the
integral calculation, and the derivative calculation. These calculations
are independent of each other but are combined to determine the
response of the controller to the error.
Proportional calculation
The proportional calculation responds to how far the measured variable is
from the setpoint. The larger the error, the larger the output of the calculation. The proportional calculation has a much stronger effect on the
result of the PID calculation than either the integral or derivative calculations. It determines the responsiveness (or aggressiveness) of a control
system. Though some systems use only proportional control, most Trane
controllers use a combination of proportional and integral control.
Proportional-only control (a method of control that does not use the integral and derivative contributions) is traditionally used in pneumatic controllers. It may be used in staging applications because it can be simpler
to manage than full PID control. The programmable control module
(PCM) and the universal programmable control module (UPCM) assume
proportional-only control when the integral and derivative gains are set
to zero. Tracer MP580/581 controllers have a unique setting for proportional-only control. Figure 3 illustrates proportional-only control.
Figure 3: Proportional-only control
Setpoint
Measured
variable
+
Σ
–
Error(n)
Proportional gain
Proportional bias
Conversion function
System
+
output
Σ
+
One difference between proportional-only control and classic PID control
is the use of proportional bias. The proportional bias becomes the output
when the error is zero. Thus, you can use the proportional bias to calibrate a controller to some known output. Figure 4 on page 4 shows the
effect of proportional bias on PID output. Notice that when the error is
zero, the output is equal to the proportional bias.
Note:
The integral calculation automates the process of setting proportional bias. In proportional-only control, the proportional
bias lets you decide what the output should be when the error is
zero; in PID control, the integral calculation maintains the current output when the error is zero (see “Integral calculation” on
page 4).
CNT-APG002-EN3
®
Chapter 1 Overview of PID control
Figure 4: The effects of proportional bias on system output
Proportional bias = 75
Proportional bias = 50
Controller output (%)
Proportional bias = 25
Error
Integral calculation
The integral calculation responds to the length of time the measured variable is not at setpoint. The longer the measured variable is not at setpoint, the larger the output of the integral calculation.
The integral calculation uses the sum of past errors to maintain an output when the error is zero. Line 1 in Figure 5 on page 5 shows that with
proportional-only control, when the error becomes zero, the PID output
also goes to zero (assuming a proportional bias of zero). Line 2 shows the
integral output added to the proportional output. Because the integral
calculation is the sum of past errors, the output remains steady rather
than dropping to zero when the error is zero. The benefit of this is that
the integral calculation keeps the output at an appropriate level to maintain an error of zero.
4CNT-APG002-EN
®
Figure 5: Integral output added to proportional output
PID calculations
Error ≠ 0
Proportional + integral
output
2
Output
1
Proportional-only
output
Time
Error = 0
Proportional + integral
output when proportional
output has gone to zero
The value of the integral calculation can build up over time (because it is
the sum of all past errors), and this built-up value must be overcome
before the system can change direction. This prevents the controller from
over-reacting to minor changes, but can potentially slow down the
response.
One drawback to integral control is the problem of integral windup. Integral windup occurs when the sum of the past errors is too great to overcome. This can happen when the HVAC equipment does not have enough
power to reach the setpoint; the integral windup only increases as the
equipment struggles to reach the setpoint. To minimize the problem of
integral windup, Trane controllers use a method of PID control known as
the velocity model, which is described in “Ve l o city m o de l” on page 7.
Derivative calculation
The derivative calculation responds to the change in error. In other
words, it responds to how quickly the measured variable is approaching
setpoint. The derivative calculation can be used to smooth an actuator
motion or cause an actuator to react faster.
However, derivative control has several disadvantages:
•It can react to noise in the input signal.
•Setting derivative control requires balancing between two extremes;
too much derivative gain and the system becomes unstable, too little
and the derivative gain has almost no effect.
•The lag in derivative control makes tuning difficult.
•Large error deadbands, common in HVAC applications, render deriv-
ative control ineffective.
CNT-APG002-EN5
®
Chapter 1 Overview of PID control
Because of these disadvantages, derivative control is rarely used in HVAC
applications (with the exception of steam valve controllers and static
pressure control).
Derivative control can affect the output in two ways: it slows the output if
the derivative gain is negative and increases the output if the derivative
gain is positive.
Slowing (or smoothing) the actuator motion, sometimes known as
dynamic braking, can help if there are many quick changes in the input
signal. For example, a robot arm moves quickly in mid-motion, but the
derivative calculation slows it down at the end of the motion.
The opposite effect occurs when the derivative gain is positive. The output reacts faster to a change in error, resulting in a steeper climb or
descent to setpoint. The circled areas in Figure 6 illustrate this effect.
Line 1 shows the error without a derivative gain. Line 2 shows the error
with a positive derivative gain. The circled sections show what happens
during a rapid change in error. Note the spike in line 2 as the system
recovers from the effect of derivative control during a sharp change in
error. The spike indicates a forceful actuator motion, which is useful for
applications such as controlling steam valves.
Figure 6: The effect of positive derivative gain
Proportional gain ≠ 0
2
Derivative gain > 0
Output
Proportional gain
1
Derivative gain = 0
≠0
Time
6CNT-APG002-EN
Velocity model
®
Velocity model
Trane controllers use a type of PID control known as the velocity model.
The velocity model minimizes the problem of integral windup, which
occurs when the sum of past errors in the integral calculation is too great
to allow the controller to change the output at one of the extremes (see
“Integral calculation” on page 4).
The velocity model, illustrated in Figure 7, gets its name from the fact
that the proportional gain affects the change in error (or error velocity)
instead of the error, as in a classic PID model. In the velocity model, the
error is multiplied by the integral gain, and the change in error is multiplied by the proportional gain. When the error gets close to zero, the
change in error gets close to zero as well. So both the integral and proportional gains are multiplied by a number close to zero. This forces the output of the PID calculation to stop changing when the error becomes zero,
minimizing (but not eliminating) integral windup.
Figure 7: Velocity model
Setpoint
+
Measured
variable
Error(n)
Σ
–
+
Error(n-1)
∆error(n-1)
Σ
∆error(n)
–
+
Σ
–
∆2error(n)
Integral gain
Proportional gain
Derivative gain
PID output
PID output(n-1)
+
∆output(n)
Σ
+
+
+
Σ
+
CNT-APG002-EN7
®
Chapter 1 Overview of PID control
8CNT-APG002-EN
®
Chapter 2
PID settings
This chapter describes some of the key variables used to set up and tune
PID loops. The variables discussed here are:
•Throttling range
•Gain
•Sampling frequency
•Action
•Error deadband
Throttling range
The throttling range is the amount of error it takes to move the output of
a system from its minimum to its maximum setting. For example, a throttling range of 4°F (2.2°C) means that a controller fully opens or closes an
actuator when the error is
Figure 8. Note how the controller response (actuator position) lags behind
the space temperature.
±2°F (1.1°C) or greater, as illustrated in
Figure 8: Throttling range
Setpoint = 75°F
Space temperature (°F)
Actuator position
Actuator position (%)
Space temperature
Throttling range = 4°F
Time
CNT-APG002-EN 9
®
Chapter 2 PID settings
The throttling range determines the responsiveness of a control system to
disturbances. The smaller the throttling range, the more responsive the
control. You cannot directly program the throttling range in Tracer controllers; rather, the throttling range is used to calculate the gains.
Figure 9 shows that as the throttling range increases, the potential error
becomes larger. When the output is at 0% or 100%, the error is equal to
one-half of the throttling range. For example, with a 10° throttling range,
the potential error is 5° from the setpoint (though the error could
exceed 5°).
Figure 9: Throttling range and error with proportional bias = 50
Throttling range = 10
Throttling range = 4
Throttling range = 20
Controller output (%)
Error
Gains
Gains, which are calculated from the throttling range, determine how fast
a measured variable moves toward the setpoint. The larger the gains, the
more aggressive the response. The proportional, integral, and derivative
calculations each have an associated gain value. The error, the sum of
past errors, and the change in error are multiplied by their associated
gains to determine the impact that each has on the output.
10CNT-APG002-EN
®
Calculating the gains
Table 1 shows recommended initial values for the proportional and integral gains for several applications. Most applications do not require a
derivative contribution, so the derivative gain is not shown. We recommend using a ratio of 4:1 between the proportional and integral gains, so
the proportional gain should be four times as large as the integral gain.
You may need to modify the values shown in Table 1 when tuning a PID
loop, but try to maintain the 4:1 ratio.
Table 1: Starting gain values for applications
Calculating the gains
ApplicationOutputThrottling range
Discharge-air coolingValve position 0–100%20.0°F (11.1°C)4.0 (8.0)1.0 (2.0)
Discharge-air heatingValve position 0–100%40.0°F (22.2°C)2.0 (4.0)0.5 (1.0)
Space temperatureDischarge setpoint
50–10 0°F (10–37.8°C)
Duct static pressureInlet guide vane or variable-frequency
drive (VFD) position 0–100%
Building static
pressure
Discharge-air coolingElectric/pneumatic
Inlet guide vane or variable-frequency
drive (VFD) position 0–100%
5.0–15.0 psi (34–103 kPa)
2.0°F (1.1°C)20.0 (20.0)5.0 (5.0)
2.0 in. wc (0.5 kPa)40.0 (160)10.0 (40.0)
20.0 in. wc (5.0 kPa)4.0 (8.0)1.0 (2.0)
20.0°F (11.1°C)0.4 (4.0)0.1 (1.0)
Proportional
gain
Integral
gain
You can also calculate proportional and integral gains using the following
calculations:
Proportional gain
Integral gain
0.80output range×
--------------------------------------------------------=
throttling range
0.20output range×
--------------------------------------------------------=
throttling range
The proportional gain is scaled by a factor of 0.80, so it contributes 80% of
the final output. The integral gain contributes 20% of the final output.
Example
In a duct static pressure system, an actuator can move the inlet guide
vanes of an air handler from 0–100%, so the output range is 100. We want
a throttling range of 2.0 in. wc (so a change in pressure of 2.0 in. wc or
more will drive the output from 0–100% or vice versa). The calculations
look like this:
So based on the desired throttling range of 2.0 in. wc, the initial proportional gain is 40 and the integral gain is 10.
CNT-APG002-EN11
®
Chapter 2 PID settings
Figure 10: Sampling too slowly
Sampling frequency
The sampling frequency is the rate at which the input signal is sampled
and the PID calculations are performed. Using the right sampling frequency is vital to achieving a responsive and stable system. Problems can
arise when the sampling frequency is too slow or too fast in comparison to
time lags in the system.
Sampling too slowly can cause an effect called aliasing in which not
enough data is sampled to form an accurate picture of changes in the
measured variable. The system may miss important information and
reach the setpoint slowly or not at all.
Figure 10 and Figure 11 show how aliasing can affect system response.
In Figure 10 the sampling frequency is too slow. Because of this, many of
the changes in duct static pressure are missed. In Figure 11 the sampling
frequency is fast enough that the changes in static pressure are tracked
accurately.
Sampling point
Duct static pressure
Figure 11: Sampling at the correct rate
Changes missed
by system
Time
Duct static pressure
Time
12CNT-APG002-EN
Sampling frequency
®
Problems also arise from sampling too quickly. Some systems have naturally slow response times, such as when measuring room temperature.
Slow response times can also be caused by equipment lags. Since PID
loops respond to error and changes in error over time, if the measured
variable changes slowly, then the error will remain constant for an
extended period of time. If the measured variable is sampled repeatedly
during this time, the proportional output remains about the same, but the
integral output becomes larger (since it is the sum of past errors). When
the control system does respond, the response is out of proportion to the
reality of the situation, which can destabilize the system. The control system should always wait to process the result of a change before making
another change.
Figure 12 shows the measured variable when sampling frequencies are
too fast, acceptable, and barely acceptable. When the sampling frequency
is too fast (2 seconds), the measured variable begins to oscillate and
finally destabilizes because the PID loop output drives the actuator to
extremes. When the sampling frequency is slowed to either 10 or 20 seconds, the system remains stable once setpoint is reached.
Figure 12: System stability with different sampling frequencies
Sampling freq. = 10 s
Sampling freq. = 20 s
Sampling freq. = 2 s
(system destabilizes when
sampling freq. is too fast)
Measured variable
Time
CNT-APG002-EN13
®
Chapter 2 PID settings
Calculating the sampling frequency
PID loops are carried out by programs, such as process control language
(PCL) programs and Tracer graphical programming (TGP) programs.
Since the PID calculation occurs when the program executes, the sampling frequency and the program execution frequency are generally the
same.
Note:
Tracer controllers have different approaches to using the sampling frequency. For Tracer MP580/581 controllers, the sampling frequency can be a multiple of the program frequency. The
Tracer AH540 controller has a pre-determined sampling frequency. The Tracer MP501 controller has a setting for the sampling frequency.
Table 2 shows recommended program execution frequencies for common
applications. These are good initial values, but it may take some trial and
error to find the best frequency.
Table 2: Recommended initial sampling frequencies
ApplicationSuggested execution frequency
Duct static pressure5 seconds
Building static pressure120 seconds
Discharge-air temperature10 seconds
Space temperature (typical comfort zone)60 seconds
Space temperature (high air change zone)30 seconds
Duct humidity10 seconds
Space humidity30–60 seconds
You can also manually calculate the sampling frequency.
To calculate the sampling frequency:
1. Manually control the analog output to 0%.
For example, control a heating valve closed.
2. Record the measured variable when it stabilizes.
The temperature stabilizes at 70°F (21°C).
3. Manually control the analog output to 50% or 100%.
Control the output to 100% (completely opening the heating valve).
4. Record the measured variable when it stabilizes.
The temperature stabilizes at 120°F (49°C)
5. Subtract the measured variable determined in step 2 from the measured variable determined in step 4. This is the change in the measured variable.
120 – 70 = 50°F (49 – 21 = 28°C).
14CNT-APG002-EN
Calculating the sampling frequency
®
6. Calculate two-thirds (66%) of the change in measured variable determined in step 4. Add this value to the initial temperature to determine at what point two-thirds of the total change occurs.
In the example, 0.66 × 50°F = 33°F, so two thirds of the total change
occurs at 70°F + 33°F = 103°F (0.66 × 28°C = 18°C; 21 + 18 = 39°C).
7. Again, set the analog output to 0% and allow the measured variable
to stabilize.
The measured variable stabilizes at 70°F (21°C).
8. Control the output to the value used in step 3 and record the time it
takes to reach the two-thirds point determined in step 6. This is the
system time constant.
The time it takes to reach 103°F (39°C) is 2.5 minutes (150 seconds).
9. Divide the system time constant by 10 to determine the initial sampling frequency.
150 seconds ÷ 10 = 15 seconds.
Note:
The system time constant is the time it takes to reach 63.21% of
the difference between the start point and the end point. However, two-thirds (66%) is accurate enough for most purposes.
Figure 13 illustrates the procedure described above.
Figure 13: Determining the system time constant
Final value (valve open)
2/3 of total change
System time
Space temperature (°F)
constant
Initial value (valve closed)
Time (minutes)
CNT-APG002-EN15
®
Chapter 2 PID settings
Example
In this scenario, we want to find the sampling frequency for a PID loop
controlling a heating application.
1. Fully close the output.
2. The stabilized temperature is 60°F (16°C).
3. Fully open the output.
4. The stabilized temperature is 105°F (41°C).
5. The change in temperature is 105°F – 60°F = 45°F (41 – 16 = 25°C).
6. Two-thirds of the change in measured variable is 0.66 × 45°F = 30°F,
so two-thirds of the total change has occurred when the temperature
is 60°F + 30°F = 90°F (0.66 × 25°C = 17°C; 16 + 17 = 33°C).
7. Close the output. The temperature stabilizes.
8. Fully open the output. The time to reach 90°F (33°C) is 54 seconds (so
the system time constant is 54 seconds).
9. Divide the system time constant by ten, resulting in 54 ÷ 10 = 5.4.
The best initial sampling frequency is 5 seconds.
16CNT-APG002-EN
Loading...
+ 49 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.