2.2.2. 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

$$\text{SCOP} = \text{Q}\_{\text{sys,tot}} / P\_{\text{sys,tot}} \tag{1}$$

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 σ*tra*.

$$\mathcal{e}\_1 := \{ [SCOP\_{\text{id}l}(\pi) - SCOP(\pi)] > \sigma\_{tm} \} \tag{2}$$

where τ is a time index; *SCOPidl* 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(τ) = *SCOPidl*(τ) − σ*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.

**Figure 3.** Two events of SCOP deviations.

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*.

$$\begin{aligned} \sigma\_2 &:= \left| \int\_{\tau\_i}^{\tau\_j} [\text{SCOP}\_1(\tau) - \text{SCOP}(\tau)] d\tau > \sigma\_{\text{cum}} \\ \text{and } \text{SCOP}(\tau) &\in \left[ \text{SCOP}\_2(\tau), \text{SCOP}\_1(\tau) \right] \; \forall \tau \in \left( \tau\_i, \tau\_j \right) \right| \end{aligned} \tag{3}$$

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 *SCOPidl* in the integration. The curves *SCOP*1 and *SCOPidl*, 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.

$$\text{SCOP-min}(\tau\_{i\prime}, \tau\_{j}) = \int\_{\tau\_{i}}^{\tau\_{j}} [\text{SCOP}\_{1}(\tau) - \text{SCOP}(\tau)] d\tau \approx \sum\_{\tau\_{i}}^{\tau\_{j}} [\text{SCOP}\_{1}(\tau) - \text{SCOP}(\tau)] \tag{4}$$

## *2.3. 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].

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.

**Figure 4.** The structure of the Artificial Neural Network (ANN).

#### **3. 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.
