The News Room The News Room The News Room
HVAC/R Nov 29, 2022

Building automation control loops: The theory

Imagine keeping warm and roasting marshmallows over the flames of a camp fire on a cool evening. Or perhaps a fiery barbecue cooking a meal with family and friends. In your mind, envision the dancing, flickering fingers of fire. Hear the snap, crackle, and pop. Smell the wood smoke on the breeze. Eventually these flames will burn low, people and marshmallows will grow uncomfortably cool and hungry. No need to worry, the fire can be reinvigorated and the heat it radiates can be refueled by simply throwing another log on the fire and stoking the embers.

This is a simple example of process control. The fire represents a system. Combustion is a dynamic, ever-changing process. As fire consumes the wood, less fuel is available; which in turn leads to the release of less heat and light. When the amount of heat released falls below the comfort level, or control point, some corrective action must be taken to bring the process back to a desirable state. Adding fuel to the fire is a control response intended to restore the process to a controlled condition.

Maintaining a camp fire or barbecue is a demonstration of manual process control. While little consideration is given to the discipline of process management in the moment, it does exhibit the basic principles of control loop theory; the same principles used by facility automation systems to perform automatic control every day. The control loop is the means used to maintain stable control of a process.

 

Control Loop

A control loop is a method designed to maintain a process in a desired state, or to maintain a process variable within control points or at a desired setpoint. Control loops are primarily concerned with three basic tasks:

  • Measuring the process variable.
  • Determining the process error or deviation.
  • Acting to correct the process.

A basic understanding of how a control works hinges on just a few basic concepts.

 

Process Variable (Input)

The process variable is a dynamic value or condition that is measured and ultimately controlled as a part of the process. The process variable is the input to a control loop. In the example of a camp fire, the input to the control loop was temperature. In facility automation control loops, common process variables (inputs) include: temperature, pressure, and flow. In a typical comfort control application, space temperature is often a control loop input; space temperature is the value that is measured and controlled.

 

Control Point (Setpoint)

The control point is the desired value of the process variable; or, the setpoint. In the example of a camp fire, a desirable comfort level represents the setpoint. An automatic control loop manipulates a process to maintain the process variable (input) within control limits (minimum and maximum), or at a desired control point, or setpoint. In a typical comfort control application, space temperature is often maintained between heating (minimum) and cooling (maximum) control limits or at a space temperature setpoint.

 

Error (Deviation)

The error of a control loop is the difference between the measured process variable and the control point; or, the deviation between the input and the setpoint. In a typical comfort control application, if the space temperature was 74°F and the setpoint was 72°F the error would be +2°F (74 - 72 = +2). This represents positive error, or a positive deviation. If the space temperature was 21°C with a setpoint of 22°C the error would be -1°C (21 - 22 = -1); resulting in a negative error.

 

Control Response (Output)

The ultimate objective of a control loop is to eliminate error. This is achieved by manipulating the process in some way through a control response, or through some corrective action. In application, this control response is the output of the control loop. In a typical comfort control application, the space temperature might be manipulated through the introduction of warm or cool air.

Control loops are generally categorized as open-loop or closed-loop. These terms are used to describe their execution methodology.

 

Open-Loop Control

In open-loop control, the control response is independent of the process value. Open-loop control is described as a process without feedback. The value of the input is not considered in the control response. For example, cooking using a kitchen timer ensures only that heat is applied for a prescribed amount of time and gives no consideration to the temperature of the food. For many years, in some traditional comfort control applications, heating hot water and chilled water temperatures were manipulated (reset) based on the ambient temperature outside with no consideration to the actual temperature inside a building. The oven effects the food, just as the boilers and chillers effect the occupants; but, using open-loop control, neither the food nor the occupants influence the output.

Closed-Loop Control

Proper control loop theory is primarily concerned with closed-loops. In closed-loop control, sometimes referred to as feedback control, the process variable (input) provides continuous feedback to the process, empowering the process to respond. This is referred to as a closed-loop because each step in the process is connected the next until the final step influences the first; in this way, all the steps interrelate in a continuous cycle, or loop:

1. The input is measured.

2. The input is subtracted from the setpoint.

3. The resulting error is evaluated.

4. An appropriate output is determined.

5. The output influences the input.

The camp fire referenced earlier is an example of closed-loop control. When proximity to the fire feels cool, more fuel is added. If too much wood is added, and the fire becomes uncomfortably warm, fuel can be removed. The comfort level, or input to the process, is constantly monitored and used to determine an appropriate control response, or output. The control response influences the input; which, is used to determine an appropriate response. Round-and-round goes the process.

In a typical comfort control application, the space temperature is continuously monitored, and the space temperature deviation from the setpoint is used to determine an appropriate response, perhaps modulating a valve or damper open or closed; which, influences the space temperature, and subsequent correction.

Control loop theory is a fundamental building block to industrial and facility control systems. Today, control loops are often embedded systems executed continuously by microprocessor-based controllers.

In the MACH-System™, this process is achieved using a Proportional Integral Derivative (PID) mathematical algorithm encapsulated in standard BACnet Loop (Control Loop) object.

 

MACH-System Control Loops

A MACH-System control loop evaluates several parameters to resolve a control response between 0–100 percent. Each parameter is configured independently to manage, and automatically evaluated to determine, the output value. Please consider the concepts and terms that comprise the MACH-System control loop.

 

Action

The action of a control loop is used to define how it responds to error.

Direct-Acting (DA) control loops provide positive correction in response to positive deviation, and negative correction in response to negative deviation. As the value of the input increases, the output increases; when the value of the input decreases, the output decreases. Cooling applications are common examples of direct-acting control loops. As the temperature increases, more cooling must be provided; and, as the temperature decreases, less cooling must be provided.

Reverse-Acting (RA) control loops provide negative correction in response to positive deviation, and positive correction in response to negative deviation. As the value of the input increases, the output decreases; when the value of the input decreases, the output increases. Heating applications are common examples of reverse-acting control loops. As the temperature increases, less heating must be provided; and, as the temperature decreases, more heating must be provided.

 

Proportional

A proportional control loop term is used to determine a control response based upon error. The output is calculated in direct proportion to the deviation of the input from setpoint; greater deviation results in greater correction; less deviation results in less correction. A proportional term can be used as a stand-alone control loop (P loop) when it is often referred to as proportional control. It is also one corrective term of Proportional Integral (PI), and Proportional Integral Derivative (PID) control loops.

Figure 1: Direct-Acting (DA) and Reverse-Acting (RA) control loop action relative to error.

 

A Proportional Band is the proportional controller constant that defines the amount of deviation required to drive the corrective element through its entire operational range (modulate a valve from 0–100 percent).

In MACH-System control loops the proportional band is expressed in the units of the input (°C, °F), and defines the amount of deviation that results in 100 percent correction.

The proportional corrective action (Op) is calculated as:

Op = A * 100/Pb * (I - S)

Where:

  • A = Action (DA = 1/RA = -1);
  • Pb = Proportional band (deviation that results in 100 percent correction);
  • I = input;
  • S = Setpoint.

The total corrective action is automatically limited between 0–100 percent.

If a direct-acting proportional control loop is configured with a proportional band of 4°, the output will linearly modulate from 0–100 percent in direct proportion to a deviation from setpoint of 0–4°.

Consider an example with a space temperature setpoint of 72°F. When the room temperature is 72°F, the deviation is 0°F, and the proportional output is 0 percent. When the room temperature is 74°F, the deviation is 2°F, and the proportional output is 50 percent. When the room temperature is ≥76°F, the deviation is ≥4°F, the proportional output is 100 percent.

Figure 2: Proportional output example with a 4° proportional band.

 

A proportional control response requires a deviation; remember 0 deviation results in 0 proportional correction. When the deviation is stable, the correction remains constant. For example, imagine that a process has a chilled water valve open 50 percent, and this corrective action is sufficient to maintain a 2° error, or deviation. If the input does not change, the deviation will not change, which means the proportional output will not change. While this is stable control, it also represents a persistent 2° offset, or error over time. Proportional control will not attempt to eliminate this offset. In some applications, minor sustained offset is acceptable. In applications where a persistent offset is unacceptable, an additional corrective term such as integral, is added to the control loop.

 

Integral

An integral control loop term determines corrective action based on offset, or error over time. If the duration and magnitude of the offset is short, the integral correction is small. As the duration or magnitude of the offset increases, so too does the accumulated integral correction. Integral correction is accumulated until there is no deviation. Integral can be used as a stand-alone control loop (I loop) when it is sometimes referred to as reset control or used in floating control applications. It is also one corrective term of Proportional Integral (PI), and Proportional Integral Derivative (PID) control loops.

The response of an integral controller is adjusted by changing the integral action time, or reset time.

In MACH-System control loops the integral reset is configured by specifying the number times per minute (M) or per hour (H) corrective action is accumulated.

The integral corrective action (Oi) is calculated as:

Oi = Oi + A * R * t 60 * (I - S)

Where:

  • A = Action (DA = 1/RA = -1);
  • R = Reset Constant (repeats per minute/hour);
  • t = Time since last scan;
  • I = input; and
  • S = Setpoint.

The Oi is then adjusted such that the total corrective action is limited between 0─100 percent.

In this way, a corrective action equal to the magnitude of the error is added-to or subtracted-from the accumulated integral correction over time. This means that a 2˚ error will result in a correction of 2 percent, a 20˚ error will result in a correction of 20 percent, and 0.2˚ error will result in a correction of 0.2 percent. This correction is added to the accumulated integral correction based on the integral reset term. If the integral reset term is configured for 5 times per minute, the integral correction will accumulate at a rate of once every 12 seconds (60 seconds in a minute / 5 times per minute = 12 seconds).

With a stable error of 2˚, and an integral reset term of 5 times per minute (5/M) an integral correction of 2 percent is accumulated every 12 seconds:

  • After 12 seconds, the total accumulated integral correction equals 2 percent.
  • After 24 seconds, the total accumulated integral correction equals 4 percent.
  • After 36 seconds, the total accumulated integral correction equals 6 percent.
  • After 48 seconds, the total accumulated integral correction equals 8 percent.
  • After 60 seconds, the total accumulated integral correction equals 10 percent.

Figure 3: Integral correction as a product of time over 60 seconds (2˚ error; 5/M integral term).

 

Integral correction accumulates until there is no deviation. The accumulated integral correction is not reset to zero when the input reaches the setpoint. Some overshoot, correcting the process variable beyond the setpoint, is required to step-down the accumulated integral correction. For example, in a direct-acting cooling application, the room temperature will likely spend some time below the setpoint, resulting in negative offset, in order for the integral correction to be subtracted incrementally until it reaches zero.

For this reason, integral and proportional control are complementary. When used cooperatively (in a PI loop) the integral correction can overcome the persistent offset common in proportional-only control, and the proportional correction can buffer the overshoot that an integral-only control loop could create.

A risk of improper integral control is integral wind-up. This is an undesirable situation where a large accumulation of integral correction occurs due to excessive offset (error over time). Due to this excessive offset, an integral term could continue to correct, drastically overshooting the requisite corrective action until the error is unwound; which is to say, a commensurate amount of time must pass for the corrective action to return to normal. For example, a direct-acting cooling loop could accumulate integral correction for an entire weekend while the space is unoccupied, and the mechanical equipment is idle. Integral correction that was allowed to accumulate for 48 hours might take 48 hours to unwind as it were, or for the integral term to return to zero. To prevent drastic and unwanted integral wind-up, the integral term of all MACH-System control loops is limited between 0–100 percent.

 

Derivative

Derivative is a control loop term that determines corrective action based on the rate of change of the error. If the process variable (input) is changing, the derivative control loop term provides corrective action. When the input stops changing, regardless of the error or offset, the derivative corrective action is zero. A derivative term can be used as an anticipator to counteract change when very little error is acceptable and the corrective action (output) may have an immediate and substantive effect on the process variable (input). When used, derivative is often combined with another control loop method and is one term of Proportional Integral Derivative (PID) control loops.

In MACH-System control loops the derivative is expressed in units of minutes from 0.00–2.00 minutes; with a higher value resulting in a larger output to oppose the changing input.

The derivative corrective action (Od) is calculated as:

Od = A * D((I – S) – (It – 1 – St – 1)) / t

Where:

  • A = Action (DA = 1 / RA = -1);
  • D = Rate Constant (minutes);
  • I = input;
  • S = Setpoint;
  • It-1 = Input last scan;
  • St-1 = Setpoint last scan; and
  • t = Time since last scan.

The nature of the derivative term can make it difficult to properly tune and inappropriate for many comfort control applications where control responses seldom have an immediate and substantive effect on the process variable.

 

Lead the Way

Control loops are fundamental building blocks to facility automation and the MACH-Systems we design, deploy, and maintain every day. It can be easy to take the underlying theory for granted. But beware, complacency, ignorance of proper process control technique, or the perception that control loops are black magic, are all equally likely to result in cold fires and poorly performing buildings. To provide solutions that are better by design requires the best effort of control professionals throughout the Reliable Controls Authorized Dealer Network.

The following installments of insight will complement the discussion of MACH-System control loop terms and summarize best practices for proper control loop deployment and fine tuning.