**2. Fault Auto-Correction Algorithms**

To identify the faults that are auto-correctable, we reviewed the existing literature and discussed the topic with 10 subject matter experts who had years of experience in FDD research and application. These experts included a set of FDD technology and service providers from the industry who were participating in this R&D e ffort as implementation partners. These providers maintained a large footprint in the FDD market and have explicitly included fault correction in their product development roadmaps. It is not possible to automate the correction of mechanical faults such as failed actuators, valve leakage and damper stuck, as they require physical repair or replacement. However, there is nonetheless a compelling set of operational problems that are detectable in today's FDD o fferings, and correctable through a software-based manipulation of the BAS parameters that can be exposed to external applications via BACnet. Considering both the possibility of the automated correction and the feasibility of implementation in an FDD platform, a set of nine HVAC system faults were isolated, as shown in Table 1.


**Table 1.** Summary of the auto-correctable faults of focus in this study.


**Table 1.** *Cont.*

For each of the faults in Table 1, correction algorithms were developed (for faults 1, 3 and 5–9) or adapted from the existing literature (for faults 2 and 4). The auto-correctable faults in Table 1 were divided into two categories: faults 1–5 were in the "Fault" category, which indicated problems that violated the intended operation of the equipment (e.g., sensor bias); faults 6–9 were in the "Opportunity" category, which indicated problems that represented potential to improve the current operation of the equipment (e.g., improve a setpoint reset). This distinction was made to differentiate between the intent of the restoring operation to what it was originally intended to be and that of optimal control.

As the objective of this study was to develop automated fault-correction algorithms that could be integrated with commercial FDD and BAS products, the auto-correction algorithms described in this section were decoupled from the fault detection and diagnostics algorithms embedded in the FDD tools. This permitted the applicability of the developed correction algorithms across a variety of FDD technologies that employed different FDD rules and algorithms. Furthermore, it was assumed that the FDD tools were able to detect the faults of focus, as they represented some of the more commonly encountered faults in commercial buildings.

Figure 2 shows the flow chart of the general auto-correction process. In this process, after the FDD algorithm generates a fault flag of a specific fault, the fault auto-correction algorithm is initiated to correct this fault with the approval from the building operator. Control\_variable\_being\_overwritten is the key element in the auto-correction process. The algorithm overwrites this variable (Control\_variable\_being\_ overwritten\_current) with a new value (Control\_variable\_being\_overwritten \_new). The control\_variable\_being\_overwritten\_current is the one identified in the FDD algorithm to be associated with the problematic value (fault) or potential to improve (opportunity). The control\_variable\_ being\_overwritten\_new is the same variable that has the correct value (fault) or optimized value (opportunity). All of the auto-correction algorithms developed in this work followed this structure, with different control variables overwritten, and different ways to determine the correct or improved value of the variable.

Each auto-correction algorithm is presented and discussed in the following.

**Figure 2.** Flow chart of the general auto-correction process.

## *2.1. Schedules Are Incorrectly Programmed*

In this auto-correction algorithm, the control\_variable\_being\_overridden is Equip\_Schedule, which is the HVAC equipment on/off times that are programmed in the BAS for weekends, weekdays and holidays. The control\_variables\_being\_overwritten\_current are the current schedules read from BAS, which are concluded to be incorrectly programmed (e.g., the AHU starts at 4 a.m. and stops at 8 p.m. on weekdays). The control\_variable\_being\_overwritten\_new is Intended\_Schedule, which is HVAC equipment on/off times as they are supposed to be (e.g., the AHU starts at 6 a.m. and stops at 7 p.m. on weekdays). The auto-correction algorithm overwrites the Equip\_Schedule and replaces it with the Intended\_Schedule to enable the system to start and stop as it is supposed to. The Intended\_Schedule is prior knowledge that is specified by the building operator or another resource.

## *2.2. Override Manual Control*

As documented in [15], the control\_variable\_being\_overwritten in the auto-correction algorithm is Manual\_Override. This variable indicates the equipment (e.g., fan speed, valve control command, damper control command) manual control status or equivalent flag: 1—equipment is in manual control, 0—equipment is in automatic control. When there is the override fault, Manual\_Override = 1 in the faulty case. The correction algorithm changes the manual control variable back to automatic (Manual\_Override = 0).

#### *2.3. AHU Supply Air or Outside Air Temperature Sensor Bias*

Two approaches can be used to correct the AHU supply air or outside air temperature sensor bias fault. In the first approach, the control\_variable\_being\_overwritten is a data point (TempSensorOffset) in the control loop that controls the offset of the controller's temperature input. In the second approach, the control\_variable\_being\_overwritten is the control setpoint associated with the temperature. These two approaches are presented here in detail for the supply air temperature (SAT) sensor bias fault. Figure 3a illustrates the auto-correction workflow for the first method. It is assumed that when the FDD algorithm flags the sensor bias fault it also determines the bias value, which is the difference between the sensor reading value and the actual value. This bias value (SAT\_bias) is fed into the auto-correction algorithm. After judging the bias direction, the bias value is directly written to the TempSensorOffset. The adjusted TempSensorOffset is added from the SAT reading value and the conversion results (SAT+TempSensorOffset) enter the controller as input (e.g., adjust the incorrect SAT value with a new offset to provide the correct reading which is fed into the cooling/heating coil valve controller). Figure 3b illustrates the auto-correction workflow for the second method. In this method, the new SAT setpoint (SAT\_spt) value can be calculated by adding or subtracting the bias value accordingly, and then be written to the BAS. The auto-correction of the outside air temperature uses the similar two approaches as above. The control\_variables\_being\_overwritten in the second approach are the AHU economizer high (low) lockout temperature setpoints, which are the outside air temperatures above (below) which the outside air damper will return to its minimum position.

**Figure 3.** Flowchart of the supply ai temperature (SAT) sensor bias fault auto-correction algorithm. (**a**) Approach 1: overwrite the SAT temperature value, and (**b**) Approach 2: overwrite the SAT setpoint.

#### *2.4. Damper*/*Valve*/*Fan*/*Pump Control Hunting Due to Improper Proportion Gain*

In contrast to the other algorithms, the auto-correction of control hunting due to improper proportion gain employs a trial and error procedure [15]. The control\_variable\_being\_overwritten is the proportional–integral–derivative (PID) controller parameter proportion gain (Kp). In the auto-correction process, the Kp is continually adjusted to find out the appropriate value that eliminates the hunting behavior. When the FDD algorithm flags an improper Kp causing the hunting fault, the auto-correction algorithm is initiated. First, a maximum auto-correction duration threshold (T\_AC\_thresh) is set to avoid an endless auto-correction process. Note that a setting time of an actuator during the control response may be varied due to different actuator control characteristics. For example, for a VAV terminal unit damper, the settling time is typically in the order of one or two minutes, but the settling time for a cooling coil valve may be several minutes. Then, the current value of the Kp is compared to a Kp\_threshold, in this case 0.2. This test is meant to avoid an unacceptably long settling time under pure integral control. If the Kp value is above the Kp\_threshold, the Kp is decreased by 10% [15]. Then, the algorithm starts a proactive test scenario to see if the hunting issue still persists, by changing the setpoint (T\_set) of the damper/valve/fan/pump to trigger the component's movement. If the component is still hunting, the procedure is repeated; otherwise, the procedure is terminated. If the Kp reaches the Kp\_threshold and there is still a hunting fault, then it is flagged as an error and the Kp is reset to the original value (Figure 4).

**Figure 4.** Flowchart of Algorithm 2.4: control hunting due to improper proportion gain (T\_AC\_thresh - a maximum auto-correction duration threshold, Kp - controller parameter proportion gain).
