Triggering Optimal Control of Air Conditioning Systems by Event-Driven Mechanism: Comparing Direct and Indirect Approaches

Real-time optimal control of air conditioning (AC) is important, and should respond to the condition changes for an energy efficient operation. The traditional optimal control triggering mechanism is based on the “time clock” (called time-driven), and has certain drawbacks (e.g., delayed or unnecessary actions). Thus, an event-driven optimal control (EDOC) was proposed. In previous studies, the part-load ratio (PLR) of chiller plants was used as events to trigger optimal control actions. However, PLR is an indirect indicator of operation efficiency, which could misrepresent the system coefficient of performance (SCOP). This study thus proposes to directly monitor the SCOP deviations from the desired SCOP values. Two events are defined based on transient and cumulative SCOP deviations, which are systematically investigated in terms of energy performance and robustness. The PLR-based and SCOP-based EDOC are compared, in which energy saving and optimal control triggering time are analyzed. Results suggest that SCOP-based EDOC has better energy performance compared with PLR-based EDOC, but the frequent event triggering might happen due to the parameter uncertainty. For actual applications, the SCOP-based EDOC can be recommended when the ideal SCOP model is available with the properly-handled uncertainty. Nevertheless, the PLR-based EDOC could still be a more practical option to replace the traditional TDOC considering its acceptable energy performance and better robustness.


Introduction
If the air conditioning (AC) system experiences identical operation condition all of the time, the engineer can set up the optimal settings and maintain the system energy efficiency easily. However, the fact is that the operation condition of AC systems involves many random variables over time, e.g., weather and occupancy. This makes real-time optimal control important. Each time the AC system experiences significant changes, the control system should respond and reset the previous optimal settings. Thus, the optimal control of the AC system should be repeated over the operation period.
Central AC systems contribute towards a large portion of a building's energy consumption [1,2]. Optimal control has been considered as a powerful measure to improve the operating efficiency of AC systems [3][4][5][6][7], where an objective function is optimized through optimizing the control set-points or operation modes (e.g., chiller sequence). Although many advanced optimization algorithms for AC systems, and systematically compares SCOP-based and PLR-based EDOC, regarding their merits and demerits. Since the ideal SCOP varies with the working condition [22,23], an artificial neural network (ANN) is developed to predict the ideal SCOP under various conditions. The methodology of SCOP-based EDOC is firstly illustrated, including events definitions and a SCOP prediction model. Then, the EDOC approaches are evaluated by testing in a case AC system. The control performance and applicability of different EDOC approaches are compared. Discussions and concluding remarks are given at the end.

Overview
The real-time optimal control mainly consists of two steps (see Figure 1): (1) Triggering optimal control; (2) solving the optimal control problem using a certain search algorithm subject to operation constraints. Finally, optimal control settings will be sent to the AC system to supervise the operation. In this study, the triggering of optimal control will be studied, and three triggering approaches will be discussed, i.e., The time-driven approach, part-load ratio (PLR)-based event-driven, optimal control (EDOC) approach and the system coefficient of performance (SCOP)-based EDOC approach.
A case commercial AC system is simulated in the Transient System Simulation Tool (TRNSYS) with validated component models. The optimal control codes and basic local control codes are programmed in MATLAB. Actual weather and cooling load data are used as the simulation inputs. The actual system operation is simulated through co-simulation between TRNSYS and MATLAB ( Figure 2). Typical weather and load profiles are tested with each case in 24 h. The typical load profiles are identified using a PPA-based K-means clustering approach (see Appendix D). At last, the simulation results are compared to evaluate the performance. SCOP-based EDOC for AC systems, and systematically compares SCOP-based and PLR-based EDOC, regarding their merits and demerits. Since the ideal SCOP varies with the working condition [22,23], an artificial neural network (ANN) is developed to predict the ideal SCOP under various conditions. The methodology of SCOP-based EDOC is firstly illustrated, including events definitions and a SCOP prediction model. Then, the EDOC approaches are evaluated by testing in a case AC system. The control performance and applicability of different EDOC approaches are compared. Discussions and concluding remarks are given at the end.

Overview
The real-time optimal control mainly consists of two steps (see Figure 1): (1) Triggering optimal control; (2) solving the optimal control problem using a certain search algorithm subject to operation constraints. Finally, optimal control settings will be sent to the AC system to supervise the operation. In this study, the triggering of optimal control will be studied, and three triggering approaches will be discussed, i.e., The time-driven approach, part-load ratio (PLR)-based event-driven, optimal control (EDOC) approach and the system coefficient of performance (SCOP)-based EDOC approach.
A case commercial AC system is simulated in the Transient System Simulation Tool (TRNSYS) with validated component models. The optimal control codes and basic local control codes are programmed in MATLAB. Actual weather and cooling load data are used as the simulation inputs. The actual system operation is simulated through co-simulation between TRNSYS and MATLAB ( Figure 2). Typical weather and load profiles are tested with each case in 24 h. The typical load profiles are identified using a PPA-based K-means clustering approach (see Appendix D). At last, the simulation results are compared to evaluate the performance.

PLR-based EDOC Approach
For PLR-based EDOC, "PLR significant change" and "chiller operating number change" are used as the events. The PLR is a continuous variable, and a threshold is critical for the event definition [11]. Till now, there is no selection or calculation method on this PLR variation threshold. The American Society of Heating, Refrigerating and Air-Conditioning Engineers (ASHRAE) handbook's heating, ventilation, and air conditioning (HVAC) applications (in Section 3.2 of Chapter 42) suggests an example of 10% for the threshold of chilled-water load change. For a certain system, [10] suggested that the threshold of PLR variation can be customized for a better energy performance. This study will choose a suitable threshold from 5% to 10%.

SCOP-based EDOC Approach
The basic idea of the SCOP-based EDOC is to control the deviation between the current SCOP and its ideal SCOP within an acceptable range. The SCOP is defined by where Qsys,tot is the system total cooling capacity (kW), and Psys,tot is the system total power of all the major equipment (kW).
Two events are defined to capture the transient and cumulative SCOP deviations. Event 1: The transient SCOP deviation (which deviates from its desired value) is larger than .
where is a time index; is the reference of SCOP; and is a predefined threshold.

PLR-based EDOC Approach
For PLR-based EDOC, "PLR significant change" and "chiller operating number change" are used as the events. The PLR is a continuous variable, and a threshold is critical for the event definition [11]. Till now, there is no selection or calculation method on this PLR variation threshold. The American Society of Heating, Refrigerating and Air-Conditioning Engineers (ASHRAE) handbook's heating, ventilation, and air conditioning (HVAC) applications (in Section 3.2 of Chapter 42) suggests an example of 10% for the threshold of chilled-water load change. For a certain system, [10] suggested that the threshold of PLR variation can be customized for a better energy performance. This study will choose a suitable threshold from 5% to 10%.

SCOP-based EDOC Approach
The basic idea of the SCOP-based EDOC is to control the deviation between the current SCOP and its ideal SCOP within an acceptable range. The SCOP is defined by where Q sys,tot is the system total cooling capacity (kW), and P sys,tot is the system total power of all the major equipment (kW). Two events are defined to capture the transient and cumulative SCOP deviations. Event 1: The transient SCOP deviation (which deviates from its desired value) is larger than σ tra .
where τ is a time index; SCOP idl is the reference of SCOP; and σ tra is a predefined threshold. Event 1 actually defines an unacceptable SCOP curve, denoted by the curve SCOP 2 in Figure 3, the value of which is calculated by SCOP 2 (τ) = SCOP idl (τ) − σ tra . Event 1 occurs at every moment when the SCOP curve crosses the SCOP 2 curve downward, which indicates the SCOP becoming unacceptable, and thus the optimization should be taken immediately to improve the SCOP. Event 1 actually defines an unacceptable SCOP curve, denoted by the curve in Figure 3, the value of which is calculated by . Event 1 occurs at every moment when the SCOP curve crosses the curve downward, which indicates the SCOP becoming unacceptable, and thus the optimization should be taken immediately to improve the SCOP.
It is possible that the SCOP is lower than a certain value in a long period, but does not cross down the unacceptable curve ( ). In this situation, if no optimal control is taken, the operation efficiency cannot be guaranteed in the long run. Therefore, an event dedicated for the cumulative SCOP deviation is defined as below: Event 2: The cumulative SCOP deviation is larger than .
where and are start and end time of a continuous period; is a bound to define the acceptable SCOP range; and is a predefined threshold. Note that in Event 2, to exclude the model uncertainty in the calculation of the cumulative SCOP deviation, is used instead of in the integration. The curves and , as shown in Figure (2b), define a range in which the SCOP is acceptable. The calculation of the cumulative deviation should start only when the SCOP goes into the range , . The calculation will stop, and the cumulative deviation value will be reset to zero when Event 2 or Event 1 occurs.
In the event detection, the SCOP deviation is calculated based on the measured data that are collected at each sampling time [10]. Considering the discrete-time sampling, "SCOP•mins" is used to approximate the integration in Equation (3). One minute is used as the discretization time interval to approximate the integration, as one minute is small enough for sampling time intervals in buildings. The cumulative SCOP deviation is represented by SCOP mins in Equation (4), where the integration is approximated by a summation.

Ideal SCOP Model
To develop the Artificial Neural Network (ANN)-based SCOP ideal (SCOPidl) model, important variables affecting the SCOP should firstly be identified. A crucial step is to select the input variables, since the inclusion of unimportant variables may bring in redundant information and decrease the ANN model accuracy [25]. It is possible that the SCOP is lower than a certain value in a long period, but does not cross down the unacceptable curve (SCOP 2 ). In this situation, if no optimal control is taken, the operation efficiency cannot be guaranteed in the long run. Therefore, an event dedicated for the cumulative SCOP deviation is defined as below: Event 2: The cumulative SCOP deviation is larger than σ cum .
where τ i and τ j are start and end time of a continuous period; SCOP 1 is a bound to define the acceptable SCOP range; and σ cum is a predefined threshold. Note that in Event 2, to exclude the model uncertainty in the calculation of the cumulative SCOP deviation, SCOP 1 is used instead of SCOP idl in the integration. The curves SCOP 1 and SCOP idl , as shown in Figure 3b, define a range in which the SCOP is acceptable. The calculation of the cumulative deviation should start only when the SCOP goes into the range [SCOP 2 , SCOP 1 ]. The calculation will stop, and the cumulative deviation value will be reset to zero when Event 2 or Event 1 occurs.
In the event detection, the SCOP deviation is calculated based on the measured data that are collected at each sampling time [10]. Considering the discrete-time sampling, "SCOP·mins" is used to approximate the integration in Equation (3). One minute is used as the discretization time interval to approximate the integration, as one minute is small enough for sampling time intervals in buildings. The cumulative SCOP deviation is represented by SCOP·mins in Equation (4), where the integration is approximated by a summation.

Ideal SCOP Model
To develop the Artificial Neural Network (ANN)-based SCOP ideal (SCOP idl ) model, important variables affecting the SCOP should firstly be identified. A crucial step is to select the input variables, since the inclusion of unimportant variables may bring in redundant information and decrease the ANN model accuracy [25].
Traditional techniques, e.g., correlation coefficient, standard regression coefficient and the products of these two coefficients, are inadequate to handle correlated data [26]. Thus, advanced techniques are required, such as variance-decomposition-based, variable-transformation-based and machine-learning-based techniques [26,27]. The random forest (RF) algorithm is selected because RF can handle highly correlated variables, avoid overfitting and improve the prediction accuracy. Moreover, the variable importance can be represented by "%IncMSE" from RF [28]. The calculation details of "%IncMSE" are shown in Appendix A.
To develop the prediction model of SCOP idl , the ANN algorithm is used since ANN has demonstrated its capability in handling complex relationships in building energy fields [29,30]. A typical three-layer feed-forward ANN (including the input layer, the hidden layer and the output layer) is used in this study (see Figure 4). The identified important variables are used as the ANN model inputs, while the SCOP idl is the ANN output. The ANN toolbox in MATLAB is used, and the Levenberg-Marquardt algorithm (see "trainlm" of MATLAB) is adopted in the training. A different number of hidden neurons are tested to select a suitable number, where the mean squared error (MSE) is used for the model evaluation. Traditional techniques, e.g., correlation coefficient, standard regression coefficient and the products of these two coefficients, are inadequate to handle correlated data [26]. Thus, advanced techniques are required, such as variance-decomposition-based, variable-transformation-based and machine-learning-based techniques [26,27]. The random forest (RF) algorithm is selected because RF can handle highly correlated variables, avoid overfitting and improve the prediction accuracy. Moreover, the variable importance can be represented by "%IncMSE" from RF [28]. The calculation details of "%IncMSE" are shown in Appendix A. To develop the prediction model of SCOPidl, the ANN algorithm is used since ANN has demonstrated its capability in handling complex relationships in building energy fields [29,30]. A typical three-layer feed-forward ANN (including the input layer, the hidden layer and the output layer) is used in this study (see Figure 4). The identified important variables are used as the ANN model inputs, while the SCOPidl is the ANN output. The ANN toolbox in MATLAB is used, and the Levenberg-Marquardt algorithm (see "trainlm" of MATLAB) is adopted in the training. A different number of hidden neurons are tested to select a suitable number, where the mean squared error (MSE) is used for the model evaluation.

Case Study: System, Problem Formulation and Simulation
The selected case air-conditioning system serves a super-tall office building in Hong Kong. As Hong Kong is a subtropical region, only cooling is considered in the case study. The schematic diagram is shown in Figure 5, which is a typical primary-constant and secondary-variable chilled water system. The specifications of its main components are presented in Table 1. Four critical temperatures are controlled by PI controllers, namely the supply cooling water temperature ( ), the supply chilled water temperature at the primary ( , ) and secondary loops ( , ), and the supply air temperature ( ).
is controlled through varying the cooling tower fan frequency; , is controlled by modulating the refrigerant flow rate; , is controlled by modulating the water flow rate; is controlled by AHUs. The set-points of the above four critical temperatures are optimized and reset in real-time to achieve the best energy efficiency.

Case Study: System, Problem Formulation and Simulation
The selected case air-conditioning system serves a super-tall office building in Hong Kong. As Hong Kong is a subtropical region, only cooling is considered in the case study.

System Description
The schematic diagram is shown in Figure 5, which is a typical primary-constant and secondary-variable chilled water system. The specifications of its main components are presented in Table 1. Four critical temperatures are controlled by PI controllers, namely the supply cooling water temperature (T scw ), the supply chilled water temperature at the primary (T schw,prm ) and secondary loops (T schw,sec ), and the supply air temperature (T sa ). T scw is controlled through varying the cooling tower fan frequency; T schw,prm is controlled by modulating the refrigerant flow rate; T schw,sec is controlled by modulating the water flow rate; T sa is controlled by AHUs. The set-points of the above four critical temperatures are optimized and reset in real-time to achieve the best energy efficiency.

Optimal Control Problem Formulation
For all-electric AC systems without thermal storage, the minimization of the energy use can be simplified as the minimization of the system total power at each time instance [16]. In this case study, the decision variables that significantly affect the energy efficiency of the system operation are , where , , , , , The system total power can be written as a function of these four decision variables , , , where • is always a nonlinear function. The decision variables are limited in their feasible ranges, which are treated as operational constraints (shown in Equations. (7-10)). Table 2 shows the values of the operational constraints.
, , , , , , , , , , , ,   Note: M a is the air flow rate; M w is the water flow rate; ev and cd stand for evaporator and condenser respectively.

Optimal Control Problem Formulation
For all-electric AC systems without thermal storage, the minimization of the energy use can be simplified as the minimization of the system total power at each time instance [16]. In this case study, the decision variables that significantly affect the energy efficiency of the system operation are T scw , T schw,prm , T schw,sec and T sa . Thus, the real-time optimal control problem is formulated as where P sys,tot = P ch,tot + P ct,tot + P pump,tot + P AHU,tot . The system total power can be written as a function of these four decision variables where f (·) is always a nonlinear function. The decision variables are limited in their feasible ranges, which are treated as operational constraints (shown in Equations (7)-(10)). Table 2 shows the values of the operational constraints.

Simulation Platform
A dynamic simulation platform integrating TRNSYS and MATLAB was constructed to test the performance of the proposed optimal control approaches. The platform layout was shown in Figure 6. The used TRNSYS models were verified by measured data with acceptable model accuracies. The model details are presented in Table 3. The control logics presented in Section 2 were coded in MATLAB. The simulation duration for each run was 24 h, with a simulation time step of 30 s. Several typical loads and weather data are simulated. The computer used to perform the simulation has a six-core processor (3.60 GHz) with 16 GB RAM. Since cooling load and weather data are crucial for the AC optimal control, actual load and weather data were input to the TRNSYS simulation to mimic the actual operations. The airflow rate was calculated based on the cooling load and the enthalpy difference between the supply air (the temperature set-point with 95% relative humidity) and the room air (set as 25 • C with 50% relative humidity).

Ideal SCOP Model
To develop an ANN model for predicting the ideal SCOP, important variables that have significant influence on the SCOP were firstly identified. Basically, important variables that affect the SCOP are similar in typical AC systems that contain chillers, cooling towers, pumps and AHUs/Coils [16,32]. The variables include the outdoor dry/wet-bulb temperature (T db /T wb ), the chilled water supply temperature (T schw ), the condensing water return temperature (T scw ), the chilled water mass flow rate at the primary/secondary loop (M w,prm,pump /M w,sec,pump ), the PLR, the cooling tower fan frequency (Freq ct, f an ) and the enthalpy driving force in the operation of cooling towers "∆h" [33].
To evaluate the variable importance, the RF algorithm was implemented in the software R using the package of "randomForest" [34] and the results were plotted in Figure 7. The variable PLR has the highest importance, while the M w,sec,pump has the lowest importance. As discussed in [35], less important variables (e.g., % IncMSE lower than 10%) can be omitted. Therefore, M w,sec,pump was not used in the ideal SCOP model, and totally eight variables were used as the ANN model inputs.
In the ANN model, 70% of the data set was used for training, 15% of the data set was used for validation and the additional 15% of the data set was used to test whether the model can perform well. Since the optimal number of the hidden layer neurons depends upon the specific problem, this study tested a different number of hidden neurons (from 2 to 20). The MSEs of different numbers of hidden neurons were plotted in Figure 8. Figure 8. shows that when the number of neurons increased, the MSE decreased. However, the reduction in MSE became insignificant as the number of neurons was greater than 15. Thus, "15" was selected as the optimal number of hidden neurons. The R-value of the ANN model with 15 hidden neurons was 0.96052 (see Figure 9), with R values of training, validation and test are 0.96007, 0,95783 and 0.9656 respectively, which showed a good prediction accuracy.  In the ANN model, 70% of the data set was used for training, 15% of the data set was used for validation and the additional 15% of the data set was used to test whether the model can perform well. Since the optimal number of the hidden layer neurons depends upon the specific problem, this study tested a different number of hidden neurons (from 2 to 20). The MSEs of different numbers of hidden neurons were plotted in Figure 8.  In the ANN model, 70% of the data set was used for training, 15% of the data set was used for validation and the additional 15% of the data set was used to test whether the model can perform well. Since the optimal number of the hidden layer neurons depends upon the specific problem, this study tested a different number of hidden neurons (from 2 to 20). The MSEs of different numbers of hidden neurons were plotted in Figure 8. validation and test are 0.96007, 0,95783 and 0.9656 respectively, which showed a good prediction accuracy.

Event Threshold
For the event "PLR significant change", 7% was selected as the PLR change threshold based on a previous study on the same AC system [11]. The threshold of SCOP deviation can be calculated based on the value of SCOPidl and an expected energy saving percentage (as shown in Appendix C Equation (C.1)). For instance, an expected energy saving percentage can be specified by users (e.g., 10%), and the SCOPidl can be obtained from the developed ANN model. After the threshold is calculated, it should be checked that whether the calculated threshold is feasible or not based on the SCOP deviations in historical data. The threshold selection should also consider the uncertainties in the SCOPidl model and SCOP measurement in terms of the application concerns. The thresholds of the SCOP deviation are set as 0.2057 (transient) and 2.057 (cumulative). The selection details are presented as follows: The targeted energy saving is set as 10%, based on handbook [16] and a previous study [10]. To help the threshold selection, the histogram of SCOPidl and SCOP deviation are plotted in Figure 10. The base case keeps all the four temperature set-points as constant. The SCOP deviation is the difference between SCOP of the base case and SCOPidl.

Event Threshold
For the event "PLR significant change", 7% was selected as the PLR change threshold based on a previous study on the same AC system [11]. The threshold of SCOP deviation can be calculated based on the value of SCOP idl and an expected energy saving percentage (as shown in Appendix C Equation (A8)). For instance, an expected energy saving percentage can be specified by users (e.g., 10%), and the SCOP idl can be obtained from the developed ANN model. After the threshold is calculated, it should be checked that whether the calculated threshold is feasible or not based on the SCOP deviations in historical data. The threshold selection should also consider the uncertainties in the SCOP idl model and SCOP measurement in terms of the application concerns.
The thresholds of the SCOP deviation are set as 0.2057 (transient) and 2.057 (cumulative). The selection details are presented as follows: The targeted energy saving is set as 10%, based on handbook [16] and a previous study [10]. To help the threshold selection, the histogram of SCOP idl and SCOP deviation are plotted in Figure 10. The base case keeps all the four temperature set-points as constant. The SCOP deviation is the difference between SCOP of the base case and SCOP idl . From Figure 10, the mean of SCOP idl is 2.0544. Using a SCOP idl of 2.0544 and an expected energy saving of 10.0%, the threshold of SCOP deviation is 0.2057, based on Equation (A8) (Appendix C).

Event Threshold
For the event "PLR significant change", 7% was selected as the PLR change threshold based on a previous study on the same AC system [11]. The threshold of SCOP deviation can be calculated based on the value of SCOPidl and an expected energy saving percentage (as shown in Appendix C Equation (C.1)). For instance, an expected energy saving percentage can be specified by users (e.g., 10%), and the SCOPidl can be obtained from the developed ANN model. After the threshold is calculated, it should be checked that whether the calculated threshold is feasible or not based on the SCOP deviations in historical data. The threshold selection should also consider the uncertainties in the SCOPidl model and SCOP measurement in terms of the application concerns. The thresholds of the SCOP deviation are set as 0.2057 (transient) and 2.057 (cumulative). The selection details are presented as follows: The targeted energy saving is set as 10%, based on handbook [16] and a previous study [10]. To help the threshold selection, the histogram of SCOPidl and SCOP deviation are plotted in Figure 10. The base case keeps all the four temperature set-points as constant. The SCOP deviation is the difference between SCOP of the base case and SCOPidl. Since "0.2057" is within the range of SCOP deviation and the most frequent case (Figure 10b), it is a feasible threshold value.
For uncertainties, the value 0.01 was used for as the model uncertainty of SCOP idl , which was the averaged value over the training and validation Mean Squared Error (MSE) of the ANN model. The measurement uncertainty for the case study was calculated in Appendix B, where sensor uncertainties were added to the simulation-generated operation data. As a negative value is considered, "-0.0694" was used for measurement uncertainty. Thus, the combined uncertainty is "-0.0794" ("-0.01"+"-0.0694"), and SCOP 1 can be set as "SCOP idl − 0.0794".
In comparison, the threshold 0.2057 is nearly three times greater the combined uncertainty, which can largely prevent the uncertainty-caused event triggering. Thus, 0.2057 is used as the threshold of transient SCOP deviation. The cumulative SCOP deviation depends on both the time duration and the SCOP deviation. The deviation for cumulative SCOP was considered as half of the transient SCOP deviation threshold (i.e., 0.2057/2), or a 5% energy saving equivalently. The time duration was selected as 20 minutes for a demonstration. Thus, the threshold of cumulative SCOP deviation is 2.057.

Energy Performance
The optimal control performance is evaluated by the energy saving percentage. The energy saving percentage is computed based on the base case (i.e., constant control settings without optimal control). The energy saving percentages of EDOC range from 5.83% to 12.06% for ten different load clusters. In general, as can be seen from Figure 11, SCOP-based EDOC outperforms PLR-based EDOC, and EDOC outperforms TDOC (1 h per optimal control).
The biggest energy performance difference can be 3%, as shown in load cluster no. 3. The possible reason of such superior performance is that the SCOP-based events can directly represent the system operation efficiency without mismatch compared with the PLR-based events. By continuous monitoring and tracking of the transient and cumulative SCOP deviations, a better timing of optimal control can be achieved. As a result, the system operation efficiency is always maintained at or near the ideal level. The next section will discuss the triggering time of optimal control in details. From Figure 10, the mean of SCOPidl is 2.0544. Using a SCOPidl of 2.0544 and an expected energy saving of 10.0%, the threshold of SCOP deviation is 0.2057, based on Equation.
(C.1) (Appendix C). Since "0.2057" is within the range of SCOP deviation and the most frequent case (Figure 10 (b)), it is a feasible threshold value.
For uncertainties, the value 0.01 was used for as the model uncertainty of SCOPidl, which was the averaged value over the training and validation Mean Squared Error (MSE) of the ANN model. The measurement uncertainty for the case study was calculated in Appendix B, where sensor uncertainties were added to the simulation-generated operation data. As a negative value is considered, "-0.0694" was used for measurement uncertainty. Thus, the combined uncertainty is "-0.0794" ("-0.01"+"-0.0694"), and can be set as " 0.0794".
In comparison, the threshold 0.2057 is nearly three times greater the combined uncertainty, which can largely prevent the uncertainty-caused event triggering. Thus, 0.2057 is used as the threshold of transient SCOP deviation. The cumulative SCOP deviation depends on both the time duration and the SCOP deviation. The deviation for cumulative SCOP was considered as half of the transient SCOP deviation threshold (i.e., 0.2057/2), or a 5% energy saving equivalently. The time duration was selected as 20 minutes for a demonstration. Thus, the threshold of cumulative SCOP deviation is 2.057.

Energy Performance
The optimal control performance is evaluated by the energy saving percentage. The energy saving percentage is computed based on the base case (i.e., constant control settings without optimal control). The energy saving percentages of EDOC range from 5.83% to 12.06% for ten different load clusters. In general, as can be seen from Figure 11, SCOP-based EDOC outperforms PLR-based EDOC, and EDOC outperforms TDOC (1 h per optimal control).
The biggest energy performance difference can be 3%, as shown in load cluster no. 3. The possible reason of such superior performance is that the SCOP-based events can directly represent the system operation efficiency without mismatch compared with the PLR-based events. By continuous monitoring and tracking of the transient and cumulative SCOP deviations, a better timing of optimal control can be achieved. As a result, the system operation efficiency is always maintained at or near the ideal level. The next section will discuss the triggering time of optimal control in details.  Figure 11. Energy saving percentages.

Triggering Time of Optimal Control
It was observed that (see Table 4), in load cluster 1, both TDOC and EDOC approaches triggered seven times control actions. Thus, load cluster 1 is the best for analyzing the effect of different optimal control triggering times.
In Figure 12, the optimal control time of EDOC is plotted. The Y axis refers to the time of the optimal control action, and the Y axis is updated each time when this optimal control is triggered. The X axis is the simulation time step in minutes. From Figure 12 (see dashed circles), SCOP-based EDOC tends to react in advance compared to the PLR-based EDOC. The possible reason is because SCOP is a more comprehensive energy efficiency index than the PLR index. SCOP-based EDOC can capture the operation variation earlier than the PLR-based EDOC, leading to a better energy performance. Moreover, inside the solid circles of Figure 12, the SCOP-based EDOC did not take response, while this PLR-based EDOC triggered optimal control. In such circumstances, the PLR varies, but the SCOP still remains at the ideal level, which is unnecessary to trigger optimal control. The SCOP-based EDOC could avoid such unnecessary actions, while the PLR-based EDOC cannot (which is a demerit).  It was observed that (see Table 4), in load cluster 1, both TDOC and EDOC approaches triggered seven times control actions. Thus, load cluster 1 is the best for analyzing the effect of different optimal control triggering times.

Triggering Time of Optimal Control
In Figure 12, the optimal control time of EDOC is plotted. The Y axis refers to the time of the optimal control action, and the Y axis is updated each time when this optimal control is triggered. The X axis is the simulation time step in minutes. From Figure 12 (see dashed circles), SCOP-based EDOC tends to react in advance compared to the PLR-based EDOC. The possible reason is because SCOP is a more comprehensive energy efficiency index than the PLR index. SCOP-based EDOC can capture the operation variation earlier than the PLR-based EDOC, leading to a better energy performance. Moreover, inside the solid circles of Figure 12, the SCOP-based EDOC did not take response, while this PLR-based EDOC triggered optimal control. In such circumstances, the PLR varies, but the SCOP still remains at the ideal level, which is unnecessary to trigger optimal control. The SCOP-based EDOC could avoid such unnecessary actions, while the PLR-based EDOC cannot (which is a demerit).
The total optimal control times of EDOC are shown in Table 4, which reflects the frequency of optimal control. Based on literatures [15,36,37], it can be found that 1 h per optimal control is the most common optimal control frequency used for TDOC. Thus, this study uses 1 h as the benchmark. Then, less than 24 times can be regarded as an acceptable triggering frequency for one day. On average, PLR-based EDOC (22.7 times per day) satisfies the condition, while SCOP-based EDOC (26.4 times per day) triggers more actions than the benchmark. It should be noted that, in load cluster no. 8, the SCOP-based EDOC performed 61 times of optimal control. The reason for such frequent triggering is possibly due to the uncertainty in "SCOP". As the parameter, SCOP is calculated based on the power meter and the load measurement, the combined uncertainty of power and load could be significant. Besides, the model of ideal SCOP also has model uncertainty. When the SCOP value fluctuated at the pre-defined threshold value, the optimal control action can be triggered frequently. From this, a demerit of SCOP-based EDOC is that frequent optimal control may be triggered compared with PLR-

SCOP-based EDOC reacts in advance
PLR-based EDOC reacts The total optimal control times of EDOC are shown in Table 4, which reflects the frequency of optimal control. Based on literatures [15,36,37], it can be found that 1 h per optimal control is the most common optimal control frequency used for TDOC. Thus, this study uses 1 h as the benchmark. Then, less than 24 times can be regarded as an acceptable triggering frequency for one day. On average, PLR-based EDOC (22.7 times per day) satisfies the condition, while SCOP-based EDOC (26.4 times per day) triggers more actions than the benchmark. It should be noted that, in load cluster no. 8, the SCOP-based EDOC performed 61 times of optimal control. The reason for such frequent triggering is possibly due to the uncertainty in "SCOP". As the parameter, SCOP is calculated based on the power meter and the load measurement, the combined uncertainty of power and load could be significant. Besides, the model of ideal SCOP also has model uncertainty. When the SCOP value fluctuated at the pre-defined threshold value, the optimal control action can be triggered frequently. From this, a demerit of SCOP-based EDOC is that frequent optimal control may be triggered compared with PLR-based EDOC. This problem could be mitigated by adding an additional time interval constraint between two adjacent optimal control actions (e.g., at least 10 mins between two control actions). Although SCOP-based EDOC obtains the highest energy saving, in terms of the energy saving performance, triggering frequency and robustness of optimal control, PLR-based EDOC can still be recommended to replace traditional TDOC for practical applications.  1  7  7  2  16  21  3  31  19  4  13  37  5  32  25  6  29  27  7  28  11  8  15  61  9  29  36  10 27 20 Average optimal control triggering frequency 22.7 26.4

Analyses of SCOP-based Events
As both transient and cumulative SCOP deviations are used (Section 2.2.2), the event triggering times of the two events are analyzed in this section. From Figure 13, e 1 and e 2 were triggered differently under different load clusters, e 1 sometimes dominates, and e 2 sometimes reacts more. For example, in load cluster C1 and C2, only e 2 was triggered. In load cluster C3-C10, e 1 and e 2 both appeared. If only using e 1 in load cluster C1 and C2, the SCOP-based EDOC may not work. This validates the idea of combing e 1 and e 2 to accommodate broader operation conditions, since one event may fail sometimes.
Regarding the individual energy performance of the single event (e 1 and e 2 ), load cluster C7 was used as an illustration, where two events are triggered almost equally. Simulation results show: Using only e 1 gives 9.84% of energy saving, and using only e 2 gives 9.97% of energy saving. In Figure 11, combining e 1 and e 2 outputs 10.38% of energy saving. It can be seen that combining e 1 and e 2 will be beneficial for improving the energy performance of EDOC. The reason is because the single event may not capture the critical operation variations in a comprehensive manner.

Analyses of SCOP-based Events
As both transient and cumulative SCOP deviations are used (section 2.2.2), the event triggering times of the two events are analyzed in this section. From Figure 13, and were triggered differently under different load clusters, sometimes dominates, and sometimes reacts more. For example, in load cluster C1 and C2, only was triggered. In load cluster C3-C10, and both appeared. If only using in load cluster C1 and C2, the SCOP-based EDOC may not work. This validates the idea of combing and to accommodate broader operation conditions, since one event may fail sometimes.
Regarding the individual energy performance of the single event ( and ), load cluster C7 was used as an illustration, where two events are triggered almost equally. Simulation results show: Using only gives 9.84% of energy saving, and using only gives 9.97% of energy saving. In Figure 11, combining and outputs 10.38% of energy saving. It can be seen that combining and will be beneficial for improving the energy performance of EDOC. The reason is because the single event may not capture the critical operation variations in a comprehensive manner.

Conclusions
This study investigates the optimal control triggering of EDOC in AC systems. Optimal control triggering approaches are classified into direct and indirect approaches based on the used triggering indicator. In the direct SCOP-based EDOC, two events have been defined to capture both the transient and cumulative SCOP deviations, which maintains the SCOP at the ideal level in a closed-loop manner. Simulated case studies suggest that direct SCOP-based EDOC achieved a higher energy saving than indirect PLR-based EDOC in all the typical load scenarios. The main reason is due to a more direct performance indicator, i.e., SCOP, that can reflect the system performance precisely and timely. However, the development of an accurate ideal SCOP model requires sufficient operation data and extensive work, which could restrict its implementation [8]. The robustness issues caused by the uncertainty of SCOP should also be paid attention to. Thus, in terms of actual applications, the SCOP-based EDOC can be recommended when the ideal SCOP model is available with a properly-handled uncertainty issue. However, the PLR-based EDOC could still be a more practical option to replace traditional TDOC, which features an easy development process, better robustness and acceptable energy performance.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix B. SCOP Measurement Uncertainty
This part is to calculate the measurement uncertainty of SCOP. The equations for SCOP are shown in (A2)-(A4), where Q sys is the system cooling capacity, c w and m w are the water specific heat capacity and water flow rate (others please see the nomenclature). Assuming the sensors/meters are well-calibrated, the reported accuracies of sensors/meters from a chiller design guide [38] can be used to quantify the measurement uncertainty of SCOP. SCOP = Q sys /P sys (A2) Considering the measurement uncertainties in the cooling capacity and power, the Equation (A2) can be re-written as Equation (A5), where the subscript mea means the measured value, ∆P sys,mea , ∆Q sys,mea and ∆SCOP mea are the measurement uncertainties for the power, cooling capacity and SCOP.
where P sys,mea = P sys + ∆P sys,mea ; Q sys,mea = Q sys + ∆Q sys,mea ; SCOP mea = SCOP + ∆SCOP mea ; Since multiple uncertainties are involved in the SCOP calculation, uncertainty shift can be used to integrate the variable uncertainties for easy analyses [39]. The measurement uncertainty of power consumption can be easily quantified by the power meter uncertainty. For the measurement uncertainty of the cooling capacity, the measured cooling capacity is represented by Equation (A6), and the measurement uncertainty can be calculated by Equation (A7), as demonstrated by [39].
Based on measurement accuracies in Table A1, the measurement uncertainties of cooling capacity and power can be calculated. The simulated operation data is considered as the measured value. As presented in Table A2, the maximum positive and negative relative uncertainties for ∆SCOP mea are +3.73% and -3.95%, with the absolute uncertainties of "0.0708" and "-0.0694" respectively. Table A1. Typical measurement accuracy [38].

Measured Variable Reported Accuracy
Water

Appendix C. Energy Saving Estimation
The energy saving percentage at a time instant can be estimated using Equation (A8) by substituting the value of SCOP(τ) and SCOP idl (τ).

∆P(τ)
SCOP idl (τ) , P is power, idl is the ideal value, τ is the time instant.

Appendix D. Load Clustering
A K-means clustering method is proposed to generate typical load profiles (TLPs) in this study. Figure A1a shows a general procedure of the K-means clustering with a Piecewise Aggregate Approximation (PAA) transformation. To cluster the load profile (a time-series data), the distance between two profiles should be computed for measuring the similarity. However, computing the distance on raw time-series data is difficult and slow. Therefore, the approximation is normally carried out to reduce the computational difficulties [40]. Many representation techniques can be used to transform the raw time-series data, such as Discrete Fourier Transformation [41], Discrete Wavelet Transformation [42], Single Value Decomposition [43], PAA [44], etc. The PAA was used in this paper due to its simplicity and fast calculation speed [44].
In the PAA method, the original load profile is firstly segmented into equal-distance pieces ( Figure A1b). Then, the mean of each piece is used to approximate the original segment ( Figure A1c). This approximation greatly reduces the data dimension, while the fundamental characteristics in the original time-series data are still captured. After the PAA transformation, the Euclidean distance between two load profiles is calculated, and the standard K-means clustering algorithm is applied. The initialization of the K-means is important as it affects the final result [45]. A different K value will be tested to find a suitable one. A realistic testing range for the K value is between 2 and √ n [46], where "n" is the number of data samples. Then, the "furthest first initialization" is used, which starts at a random point as the first cluster center, and adding more cluster centers which are furthest from the existing ones [47]. Based on the clustering result, one representative profile from each cluster will be selected to form the TLPs.
The measured cooling load data of the case building in year 2013 was used. In total 214 daily load profiles from spring season to autumn season were used, which covered typical cooling seasons for sub-tropical regions like Hong Kong. The clustered loads were given in Figure A2a, where the similar load profiles were grouped together as a load cluster. In each cluster, the load profile closest to the cluster centroid was selected to constitute the TLPs (see Figure A2b). These TLPs and their associated weather data (from Hong Kong Observatory) were used as the simulation inputs. between two profiles should be computed for measuring the similarity. However, computing the distance on raw time-series data is difficult and slow. Therefore, the approximation is normally carried out to reduce the computational difficulties [40]. Many representation techniques can be used to transform the raw time-series data, such as Discrete Fourier Transformation [41], Discrete Wavelet Transformation [42], Single Value Decomposition [43], PAA [44], etc. The PAA was used in this paper due to its simplicity and fast calculation speed [44].
In the PAA method, the original load profile is firstly segmented into equal-distance pieces (Figure 14 (b)). Then, the mean of each piece is used to approximate the original segment ( Figure 14 (c)). This approximation greatly reduces the data dimension, while the fundamental characteristics in the original time-series data are still captured. After the PAA transformation, the Euclidean distance between two load profiles is calculated, and the standard K-means clustering algorithm is applied. The initialization of the K-means is important as it affects the final result [45]. A different K value will be tested to find a suitable one. A realistic testing range for the K value is between 2 and √n [46], where "n" is the number of data samples. Then, the "furthest first initialization" is used, which starts at a random point as the first cluster center, and adding more cluster centers which are furthest from the existing ones [47]. Based on the clustering result, one representative profile from each cluster will be selected to form the TLPs.
The measured cooling load data of the case building in year 2013 was used. In total 214 daily load profiles from spring season to autumn season were used, which covered typical cooling seasons for sub-tropical regions like Hong Kong. The clustered loads were given in Figure 15 (a), where the similar load profiles were grouped together as a load cluster. In each cluster, the load profile closest to the cluster centroid was selected to constitute the TLPs (see Figure 15 (b)). These TLPs and their associated weather data (from Hong Kong Observatory) were used as the simulation inputs.