BAS-130 · Lesson 5 of 12 · 23 min

Integral and derivative action

▶ Video coming soon A video version of this lesson is on the way.

The Friday loop on October 9 began with a trend Prakash had found that week while looking through AHU-1's history. On Tuesday morning, when the unit started at 6:00, the heating valve had gone straight to 100 in 100 and stayed there for nearly ten minutes while the supply air rose past its setpoint and kept climbing. The classrooms on the first floor had been noticeably warm for the first lecture. "The controller wasn't broken," Prakash said, "and the valve wasn't stuck. The loop had been adding up error all night while the fan was off, and it took ten minutes to spend it." The problem had a name, integral windup, and to understand it Callie first needed to understand integral action itself.

Lesson 4 showed that a proportional-only loop leaves an offset whenever the load needs an output different from the bias. This lesson adds the two other actions that make up a PID controller. Integral action removes offset by building up output for as long as an error persists. Derivative action responds to how fast the error is changing. Integral action is used in almost every modulating loop in a building; derivative action hardly ever. The lesson ends with the different ways manufacturers write and name these settings, because that is where much confusion begins.

Integral action: getting rid of offset

Integral action looks at the error over time instead of only at the present moment. As long as there is any error, integral action keeps changing the output, a little at a time, in the direction that reduces the error. A small error that persists for a long time produces as much integral output as a large error for a short time. The only condition in which integral action stops changing the output is zero error. That is why a loop with integral action settles exactly at setpoint: it cannot settle anywhere else.

Another way to see it is that integral action finds the bias for you. In lesson 4, the converter needed the steam valve at 75 in 100 to balance the load, but the proportional controller's bias was 50, so it needed a 2 K offset to make up the difference. Integral action slowly adds the missing 25 in 100 of output itself. Once it has done so, the proportional part has nothing to do and the error falls to zero. When the load changes, integral action finds the new output the same way. This is why integral action is sometimes called automatic reset, in contrast with the manual reset of a fixed bias.

\[u = K_p \Big( e + \frac{1}{T_i} \int e \, dt \Big)\]

In this common form, called the standard or ideal form, Ti is the integral time, also called reset time. It has a useful practical meaning: with a steady error, integral action adds an amount equal to the proportional action once every integral time. A short integral time means fast integral action. A long one means slow integral action. Setting the integral time to zero, or to a very large value, depending on the controller, turns integral action off.

Worked problem

How fast integral action adds output

The converter loop has a gain of 6.94 per °F and an integral time of 5 minutes. The water sits 3.6 °F below setpoint. How much output does the proportional part contribute, and how fast does integral action add to it while the error stays at 3.6 °F?

Show solution
  1. Proportional part: 6.94 × 3.6 = 25 in 100.
  2. Integral action repeats the proportional part once every integral time: 25 every 5 minutes.
  3. Rate: 25 ÷ 5 = 5 in 100 per minute.

Answer: Integral action adds about 5 in 100 per minute. As it opens the valve, the water warms, the error shrinks and integral action slows down, so the valve eases toward the position the load needs instead of jumping there.

A simulated graph of process variable against time after a load increase. A proportional-only curve settles below setpoint with an offset. A proportional-plus-integral curve dips by a similar amount, then climbs back and settles on the setpoint. Below, the two output curves show the PI output continuing to rise until the error is gone.
Simulated response to the same load increase with P-only and PI control. Integral action removes the offset.

Too much integral

Integral action has its own price. Because it keeps pushing for as long as the error lasts, it naturally pushes a little too far. By the time the process variable reaches setpoint, the integral part has built up enough output to carry it past. The loop then overshoots, the error changes sign, and integral action starts unwinding. With a moderate integral time the overshoot is small and dies out quickly. With an integral time that is too short for the process, the loop overshoots repeatedly and swings slowly back and forth, a pattern technicians call integral hunting. It usually has a longer period than hunting caused by too much gain, which helps tell the two apart, as lesson 10 explains.

The right integral time depends on how quickly the process responds. A rough rule used by many technicians is to set the integral time close to the time the process takes to respond to a change in output, its time constant, which lesson 6 shows how to measure. Fast loops such as duct static pressure may want an integral time of tens of seconds. Slow loops such as room temperature may want tens of minutes.

Integral windup

Integral windup happens when a loop keeps integrating an error that it cannot correct. The classic case is the one in Prakash's trend. Overnight, AHU-1's supply fan was off, but the heating loop in the controller kept running. With no air moving across the coil, the supply air sensor read the temperature of the cold casing, well below setpoint. The loop saw a large error, raised its output to 100 in 100, and its integral part kept on adding output long after the output had reached its limit. By morning, the integral had built up a value far beyond 100. When the fan started and warm air reached the sensor, the error disappeared, but the output stayed pinned at 100 until the integral had unwound back below 100. That took ten minutes, during which the supply air overshot badly.

A simulated graph of supply air temperature and heating output after a unit start. One curve, with windup, shows the output stuck at 100 for several minutes and the temperature overshooting well above setpoint. A second curve, with anti-windup, shows the output starting lower and coming off 100 as soon as the temperature reaches setpoint, with only a small overshoot.
Simulated start-up with and without anti-windup. A wound-up integral holds the output at its limit long after the error has gone.

Windup also happens when a valve is too small for the load, when a pump or fan is off on a loop that keeps running, when a setpoint is unreachable, or when a loop's output is overridden by a safety or a manual command. In each case the integral is accumulating output it cannot use, and the loop pays for it when conditions change.

Preventing windup

Modern controllers have several ways to prevent windup, and a good program uses them. Integrator clamping stops the integral part from building up once the output reaches its limit. Conditional integration only integrates when the output is not at a limit or when the equipment the loop serves is running. Output tracking forces the loop's output to a sensible value, often zero or a known start position, when the loop is disabled, and holds the integral at that value so that the loop starts from there when it is enabled. Bumpless transfer means the same thing for a change from manual to automatic: the loop picks up from the present output instead of jumping.

Ways to prevent integral windup. Controllers name them differently.
MethodWhat it doesWhere it helps
Integrator clampingStops integrating once the output reaches 0 or 100 in 100Undersized valves, unreachable setpoints
Disable with fan or pump offTurns the loop off and holds a fixed output when the equipment is not runningAir handlers and pumps that start and stop
Output trackingSets the integral to match a known output when the loop is not in controlStart-up, overrides, safeties
Bumpless transferStarts automatic control from the present outputSwitching from manual to automatic
Start-up positionReleases the loop from a sensible starting outputMorning start of air handlers

For AHU-1, Prakash and Callie changed the program so that the heating loop was disabled whenever the supply fan status was off, with its output held at 0 in 100, and enabled 30 seconds after the fan was proved running. They also confirmed that the loop block's integrator clamp was turned on. The next Tuesday's start-up trend showed the valve opening to about 60 in 100, the air reaching setpoint in four minutes, and an overshoot of a few tenths of a degree.

Derivative action

Derivative action responds to how fast the error is changing. If the process variable is falling quickly, derivative action adds output immediately, before the error has grown large, in an attempt to head off the drop. In principle this helps a loop respond quickly without overshooting. In practice, derivative action amplifies every small, fast wiggle in the measurement, so a noisy sensor makes the output jitter. Building processes are mostly slow and their measurements noisy, so derivative action brings little benefit and real cost in actuator wear.

The great majority of building loops are therefore PI loops, with derivative action set to zero. A few large, slow processes with clean signals, such as some boiler or chiller plant temperature loops, may use a small amount of derivative, and some controllers apply derivative to the process variable rather than the error so that setpoint changes do not cause a kick. Callie's instruction from Prakash was simple: leave derivative at zero unless the sequence of operation or the manufacturer specifically calls for it and you understand why.

\[u = K_p \Big( e + \frac{1}{T_i} \int e \, dt + T_d \frac{de}{dt} \Big)\]

PID forms and vendor names

The equation above is the standard form, where the gain multiplies all three actions. Many controllers instead use the parallel form, with separate gains for each action: a proportional gain, an integral gain and a derivative gain, added together. A third form, the series or interacting form, comes from pneumatic and early electronic controllers. They can all produce the same behavior, but the same numbers entered into different forms do not give the same loop. When moving a loop from one controller to another, convert the settings rather than copying them.

\[K_i = \frac{K_p}{T_i}\]
Vendor names for PID settings. Always read the controller's manual before entering numbers.
What it meansNames you will meetUnits you will meet
Proportional actionGain, proportional gain, throttling range, proportional bandOutput per unit; units; share of span
Integral actionIntegral time, reset time, reset rate, integral gain, repeats per minuteSeconds or minutes; repeats per minute; output per unit per second
Derivative actionDerivative time, rate time, rate, derivative gainSeconds or minutes

Worked problem

Converting integral settings

A loop in one controller has an integral time of 5 minutes. A replacement controller asks for reset rate in repeats per minute. Another loop's integral time of 90 seconds must be entered into a controller that wants repeats per minute too. What values should be entered?

Show solution
  1. Reset rate is 1 divided by the integral time in minutes.
  2. First loop: 1 ÷ 5 = 0.2 repeats per minute.
  3. Second loop: 90 s = 1.5 minutes, so 1 ÷ 1.5 = 0.67 repeats per minute.

Answer: 0.2 and about 0.67 repeats per minute. Note that a larger reset rate means faster integral action, the opposite direction from integral time; entering 5 where 0.2 was meant makes integral action 25 times faster.

That last point catches people out. Integral time and reset rate run in opposite directions: a longer integral time is slower, but a larger reset rate is faster. Callie found a VAV box controller in Ninefield's records whose integral setting had been entered as a time in a field that expected a rate, which explained a long-running complaint about a hunting box on the eighth floor.

How to recognize integral action on a trend

A loop with integral action leaves a distinctive mark on a trend. After a disturbance, the output makes a quick first move, which is the proportional part, followed by a slower, steady drift in the same direction, which is the integral part, until the process variable is back on setpoint. If the output keeps drifting after the process variable has returned, the integral is too fast and an overshoot is coming. If the output drifts so slowly that the process variable takes many time constants to return, the integral is too slow. A loop whose output stays dead flat while an error sits on the trend has no integral action at all, either by design or because it has been turned off, as Prakash had done for his experiment on the converter in lesson 4.

Common mistakes

  • MistakeLeaving a loop running with its equipment off.

    InsteadDisable the loop and hold its output when the fan or pump is off, and enable it after the equipment is proved.

  • MistakeSetting the integral time much shorter than the process response time.

    InsteadToo much integral causes overshoot and slow hunting; start near the process time constant.

  • MistakeAdding derivative to speed up a sluggish loop.

    InsteadDerivative amplifies noise; check gain and integral first, and leave derivative at zero in most building loops.

  • MistakeCopying PID numbers between controllers that use different forms.

    InsteadConvert the settings using the manuals; standard and parallel forms differ.

  • MistakeEntering an integral time where the controller expects a reset rate.

    InsteadCheck the units; time and rate run in opposite directions.

Summary and key terms

  • Integral action changes the output for as long as any error persists, so a PI loop settles exactly at setpoint.
  • Integral time, or reset time, is the time it takes integral action to repeat the proportional action under a steady error.
  • Too much integral action causes overshoot and slow hunting.
  • Integral windup builds up output a loop cannot use; prevent it with clamping, disabling loops when equipment is off, output tracking and bumpless transfer.
  • Derivative action responds to the rate of change of error; it amplifies noise and is rarely used in building loops.
  • PID settings are written in standard, parallel and series forms and given many vendor names; convert, don't copy.
Integral action
Control action that changes the output at a rate proportional to the error, removing offset.
Integral time
The time it takes integral action to add as much output as the proportional action under a steady error; also called reset time.
Reset rate
Integral action expressed as repeats of the proportional action per minute.
Integral windup
The build-up of integral output beyond what the loop can use, causing overshoot when conditions change.
Anti-windup
Any method that prevents integral windup.
Bumpless transfer
Switching a loop between manual and automatic without a jump in output.
Derivative action
Control action proportional to the rate of change of the error or process variable.
PI controller
A controller using proportional and integral action, the usual choice for building loops.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. A loop's integral time is 3 minutes. What is its reset rate in repeats per minute?

    Show answer

    1 ÷ 3 = 0.33 repeats per minute.

  2. Why does a PI loop settle exactly at setpoint?

    Show answer

    Integral action keeps changing the output until the error is zero.

  3. An air handler's heating loop runs all night with the fan off. What is the risk?

    Show answer

    Integral windup, causing the valve to stay open and the supply air to overshoot at start-up.

  4. A loop with a gain of 20 has an integral time of 200 seconds. What is its integral gain in the parallel form?

    Show answer

    20 ÷ 200 = 0.1 per second, in output per unit error per second.

  5. Why is derivative action rarely used in building loops?

    Show answer

    Building processes are slow and measurements noisy, and derivative amplifies noise.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz