Quantifying HVAC electrical flexibility from building thermal mass: a case study of the DOE reference building

. As a means to adjust the temperature of the thermal zones in buildings, building thermal mass is regarded as one of the essential sources of energy flexibility. It is still challenging to quantify the energy flexibility of passive thermal mass, making it oppugning to use thermal mass for buildings’ demand response (DR). A method to accurately quantify the energy flexibility from heating, ventilation, and air conditioning systems (HVAC) is important for buildings to participate in DR projects. This paper proposes a novel data-driven model to quantify HVAC’s electrical demand under dynamic global temperature adjustment. The Markov chain is first used to implement an effective sampling method to produce a global temperature resetting schedule representing different temperature resetting. Next, EnergyPlus evaluates the HVAC electrical demand under the various temperature reset scenarios. In the end, the LightGBM algorithm is used to develop the data-driven model. Having validated the proposed model, the case study was conducted in a DOE reference office building for EnergyPlus. Results demonstrate that the Markov chain outperforms the probabilistic method when sampling temperature setpoint schedules. In the future, the proposed data-driven model can be used to evaluate the flexibility capacity of an energy management system in grid-integrated buildings.


Introduction
The high penetration of renewable energies such as solar and wind energy has been causing an unbalanced problem in the power grid. To alleviate this problem, various grid-interactive building technologies have been proposed [1]. These technologies, such as building demand response (DR), enable the grid operator, building owner, and electrical facilities to connect for better supply-demand coordinated load management. There are many measures for turning a grid-interactive building off-load during an extremely high peak load and up-load during the grid's valley time [2].
To balance the power grid, however, the energy flexibility capacity of the building itself is the decisive factor. Thus, how quantifying a building's electricity energy flexibility has become an important topic in this field. Buildings' energy flexibility is from different flexibility resources, such as HVAC systems, lights, appliances, and occupant behaviors [3]. The HVAC system is the main flexibility resource while it is the hardest resource to quantify in buildings. The use of thermal mass for potential flexibility has been identified as a promising and cost-effective solution [4,5]. With the heat inertia in building thermal mass, zone temperature can be reset within the thermal comfort range of occupants, and HVAC loads can be shifted or reduced. Xu et al. [6] presented an experimental study of the precooling strategy for a commercial building. Within the comfort temperature range, the occupants * Corresponding author: chenyongbao@usst.edu.cn could reset the room temperature to change the building's electrical demand. In the cooling case, a maximum load reduction of 25% and a continuous time of 20 min can be achieved by resetting 2 °C higher than the normal thermostat setting [7]. This zone temperature resetting method used to reduce HVAC loads can also be found in other works [8,9].
Through the literature study, the energy flexibility of a building is an important factor for DR programs. However, traditional flexibility quantification methods are widely based on experimental tests or simulation results on a specific building case, which means that it is difficult to generate and integrate into the building energy management system. To this end, this paper proposes a data-driven model based on DOE reference office buildings to evaluate the energy flexibility capacity of HVAC systems.

Methodology
In this section, the methodology for quantifying and forecasting the HVAC electricity load of a building is explained in detail, as shown in Fig. 1. First, three approaches are used to generate temperature setpoint schedules. Markov Chain method and probability-based method are used to train the flexibility forecasting models, respectively, while the rule-based method is used to validate the two obtained trained models. Second, the HVAC electrical load of a DOE reference building under the generated temperature schedules is calculated using the EnergyPlus engine. Last, forecasting models are trained using LightGBM algorithm under two training sets (load output from two sampling methods), and the robustness of the model is validated through the validation set.

Setpoint schedule sampling
Markov chain method Let ܺ ଵ , . . . , ܺ ் be a timerelated sequence. The sequence can be called a Markov chain if it meets Eq. (1) [10], which means the current state of the sequence is only dependent on its previous state. In this study, the sequence is a set of temperature setpoints within a day. When sampling using Markov chain method, we assume the transition function is independent so that the Markov chain is time-invariant.
Probability-based method: Compared with Markov chain method, steps in the probability-based method are independent. In other words, the distribution of each step remains the same, regardless of the previous steps.

Rule-based enumeration:
The above two sampling methods are able to generate various temperature schedules that vary over time. However, both of them cannot fully represent the schedule that can be used in daily usage. Two rules are used, and the enumeration process is presented in Algorithm 1. Rule 1 resets the daily setpoint to a constant value within the available temperature setpoint range, i.e., global temperature adjustment (GTA) is adopted throughout the AC time. In rule 2 the daily setpoint is reset using various GTA duration and temperature reset values.

Flexibility forecasting
In recent years, LightGBM has been proposed as a novel and promising gradient boosting framework in the field of load forecasting [11]; it is similar to XGBoost. XGBoost was first released in 2014 and has become a powerful algorithm; most Kaggle competitions have reported it as the final winner [12]. Thus, LightGBM is selected as the forecasting algorithm in this paper.

Flexibility and forecasting evaluation
To evaluate the flexibility of the HVAC system under the GTA strategy, the baseline setpoint is 26°C throughout the day. The start time of the GTA strategy is 7:00 am, and the end time is 6:00 pm. Two types of flexibility are evaluated, i.e., positive flexibility and negative flexibility, shown in Eq.

Case study
To make the result more convincing and repeatable, prototype building models developed by DOE are used [13], shown in Fig. 2. The prototype suite comprises the commercial building part and residential building part. Commercial buildings are more convenient for applying the GTA strategy, so they are chosen as the target buildings in this study.  Fig. 3 shows the positive flexibility value at different times. It can be seen that the average positive flexibility increases with time and reaches its peak at 11:00. The increment from 7:00 to 11:00 is because of the increasing internal heat gain. After 11:00, the flexibility doesn't increase anymore because the HVAC system reaches its maximum output to reach the flexibility as high as possible by changing the temperature setpoint to the upper limit (28.0 °C). Fig. 4 shows the percentage of positive flexibility. By comparing Fig. 3 and Fig. 4, it can be concluded that the peak flexibility percentage occurs at 10:00 and 18:00, while the peak flexibility value occurs from 10:00 to 18:00. From 11:00 to 17:00, the average positive flexibility values remain stable.  As for the negative flexibility, the result is quite different. In Fig. 5, the average negative flexibility increases from 7:00 and drops after 8:00 until 10:00. Compared with Fig. 3, there is a drop owing to the thermal inertia. From 7:00, a part of negative flexibility is provided by internal thermal mass. The percentage of negative flexibility is shown in Fig. 6. The overall distributions and trends are similar to the negative flexibility value, which is different from the positive flexibility. Fig. 7 and Fig. 8 show the positive and negative flexibility on different days.

Flexibility forecasting
The forecasting performance on four test sets/validation sets is shown in Fig. 9. With the increase of samples, both the MAPE and CV-RMSE decrease gradually. When the samples increase from 300 to 2400, the CV-RMSE and MAPE can be decreased by 40-60% and 52-58%, respectively. Therefore, it can be concluded that more samples improve the forecasting performance on both the test set and validation set, and therefore an appropriate number of samples should be determined to balance the calculation cost and forecasting accuracy.

Conclusion
For the grid-integrated buildings, it is important to accurately quantify the building's energy demand flexibility character when implementing building demand response projects. HVAC system's energy flexibility could be largely influenced by the building's thermal mass and occupants' behaviors. Therefore, a data-driven model forecasting energy flexibility makes it possible for optimal load coordinated control. This paper proposes a data-driven model considering the HVAC system's energy flexibility from global temperature adjustment. The main conclusions of this research are as follows. 1) Compared with the probability-based and rulebased enumeration methods, Markov chain is the best method to generate the temperature setting schedule samples.
2) Buildings can provide positive and negative flexibility. The higher the positive flexibility of the HVAC system can provide in a day, the lower the negative flexibility is, and vice versa.
3) A well-developed data-driven model's forecasting performance of CV-RMSE and MAPE of approximately 2.0% and 1.0%, respectively, can be achieved.