Online Energy Management Framework for Smart Buildings With Low-Complexity Estimators

This letter proposes an online energy management framework for smart buildings. Two low-complexity estimators for thermal comfort and electrical load are investigated and integrated into an optimization framework. The proposed framework optimizes operations of a battery system and multiple heating, ventilation, and air conditioning (HVAC) systems to minimize energy consumption and power peak while maximizing occupants’ thermal comfort. The effectiveness of the proposed framework is demonstrated using data measured in actual campus buildings in terms of system costs, thermal comfort, and computational complexity. The results show that the proposed framework can reduce electricity costs by 5.7% compared to the baseline.

computational cost and storage requirements are very high.Lightweight estimation models that can be implemented on low-performance computers are required to reduce investment costs.
A model predictive control (MPC) approach is attractive due to its feedback mechanism.MPC-based EMS works well in buildings where the occupancy and environment dynamically change.Despite many studies on MPC in buildings, research on developing specific estimators and quantitative analysis is lacking.Carli et al. [3] proposed an MPC-based thermostat combining a simple setpoint estimator.Yang et al. [4] proposed an NN and simulation-based HVAC scheduling.Both works do not consider renewable energy and battery scheduling.Bianchini et al. [5] formulated a co-optimization of the HVAC and a battery considering weather forecast errors, but they did not build a concrete estimator for unknown input.Vedullapalli et al. [6] also proposed a holistic EMS with an electrical load estimator; however, the effect of the estimator under realistic parameters has not been investigated.
This letter analyses the effect of low-complexity estimators for thermal comfort and electrical load on a building EMS.We use an MPC-based online EMS from the previous works [7], [8], and the objective is to minimize electricity costs based on energy consumption and power peak and maximize thermal comfort.The main contribution of this letter is to introduce a low-cost electrical load estimator into EMS and to verify the impact of its forecast errors.In addition, we analyze system performance through computer experiments in a real-life context using actual campus building profiles.This letter provides a holistic way for EMS with low computational cost.The findings should contribute to the field of EMS implementation in low-performance computers in actual buildings.
The remainder of this letter is organized as follows.Section II explains the system model and the proposed framework.Section III shows the results of the simulation experiments.Finally, Section IV concludes this letter.

II. PROPOSED ENERGY MANAGEMENT FRAMEWORK A. Smart Buildings Model
As shown in Fig. 1, our target system is smart buildings composed of a PV panel, a Li-ion battery system, base loads, and multiple HVACs.The control devices are the battery system and HVACs, and HVAC affects the thermal zone.Let t (1 ≤ t ≤ T) and z (1 ≤ z ≤ Z) be a time step and a zone index.For the electrical part, the power balance in the where V bat t denotes terminal voltage, f (•) is a voltage function given by the literature, and t is length of time steps.
For the thermal part, the indoor climate is also modeled as an equivalent circuit.The indoor temperature of zone z for the next time step T in t+1,z is calculated as follows: where T out t,z is outdoor temperature, Q AC t,z is thermal loads of HVAC, and Q gain t,z is thermal gain, such as solar irradiation and internal heat.Regarding the building parameters, τ z and R z are a time constant and thermal resistance of the zone z, and these values can be extracted from past data.The relationship between HVAC's thermal load and electrical power is given in the following: where C cop z is a coefficient of performance (COP) and P AC,rated z is rated power of HVAC.The manipulated variable u t,z controls the HVAC output continuously from 0% to 100%.In a typical building, electricity costs J cost are determined based on energy consumption and power peak where ξ t is electricity prices and κ is the unit cost of power peak.Constraint (9) identifies the maximum power of the period P peak .Note that we assume the power peak cost is computed based on the maximum monthly power peak.Once the constraint ( 9) is violated, the upper bound P peak is immediately updated.The power peak cost also increases and cannot be reduced anymore in that month.

B. Overview of Proposed Framework
Fig. 2 shows the control flow of the proposed framework based on an MPC approach.The proposed framework consists of an optimization-based controller proposed in [7] and two estimators for thermal comfort and electrical load.Due to the following feedback mechanism, the MPC approach can improve solution quality and compensate for system errors.First, historical data (electrical load and building environment), weather forecasts, and electricity prices are acquired from a database, sensors, and the Web.Each estimator is trained with the historical data and predicts the optimal temperature set point and electrical load for the next T period.Building energy management is performed with input data to optimize battery and HVAC schedules.Finally, the obtained solution is applied to the system, and the system states are updated.Note that the latency of thermal load may be problematic in such an energy system.Building thermal dynamics generally show a high latency of more than 15 min, and there is no need to have HVACs switched on/off so fast.To incorporate this latency, the formulated MPC has a maximum planning period of 24 h with a resolution of 15 min.

C. Low-Complexity Estimators With Efficient Data Selection
The main contribution of this letter is to implement two estimators in EMS to predict optimal temperature setpoints and electrical load.The idea of these estimators is to combine machine learning and efficient data management to achieve low complexity.An intuitive way of training is to use all historical data, leading to increased storage and long process time.Our approach extracts only data subsets based on a specific time window [9].The data for only the past x days are stored, and each estimation model is refined with data of the same period (±y h) in the past x days, as indicated in Fig. 3.This data management can reduce storage requirements.
For the thermal-comfort estimator, optimal temperature setpoints for each time step t in zone z are computed with a least squares regression.We use the predicted mean vote (PMV) and the predicted percentage of dissatisfied (PPD) as a widely used comfort index [10].PMV = 0 (PPD = 5%) means that the zone is the most comfortable.In the ASHRAE standards, the allowed range of PMV is from -0.5 to 0.5 (PPD = 10%).The PMV is originally estimated by a nonlinear function of Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.environmental and human factors.Our framework only considers indoor temperature with HVAC control; thus, the following equation is fitted with the extracted data subset of the PMV and indoor temperature: Substituting 0, -0.5, and 0.5 in PMV t,z of (10), the optimal setpoint T set t,z and the lower and upper bounds, T lower t,z and T upper t,z , can be derived.These estimated values are used as reference setpoints for HVAC scheduling.
For the electrical load estimator, we use a decision tree (DT) regressor in machine learning approaches.The input includes time index (day and hour), temperature, humidity, current load, and past load profiles.The outputs are the estimated energy at the next step.Future profiles for the planning period are obtained by iterating this estimate with the weather forecast and the estimated energy.Different from the work [9], we employ the DT instead of linear regression (LR) to accurately estimate the electrical load of entire buildings rather than only the HVAC power.Unlike LR, DT can interpret a nonlinearity in electrical load.Meanwhile, NN-based methods can also interpret nonlinearity; however, they require expensive GPU machines, and the expected improvements are not worth much (2%-4.5% improvement) [11].

D. Mathematical Formulation
At every time step t, the following problem is solved: Find : P grid t , P peak , u t,z , s t,z , I bat t ∀t Minimize: Subject to: (1)−( 9), where ω is a weight coefficient to balance the objective terms.O t,z is the occupied information: O t,z = 1 if the room is occupied, otherwise 0. The objective for thermal comfort J comfort is calculated by (12).We set a quadratic penalty function for thermal comfort, assuming that more deviations from a comfortable temperature will lead to further less comfort.P e is a penalty constant for a temperature violation.s t,z is a non-negative slack variable representing the amount of indoor temperature violation for bounds, T upper t,z and T lower t,z , as calculated by ( 13) and ( 14).Finally, the objective function (11) minimizes electricity costs and maximizes thermal comfort,  3), which can be solved with a nonlinear programming solver.The effectiveness of using the nonlinear battery equations has been discussed in [8].The case study will show that the complexity of this problem is low enough to allow implementation on a low-performance computer.

III. SIMULATION EXPERIMENTS
This section demonstrates the effectiveness of the proposed framework with realistic simulation experiments.The mathematical model and estimators are implemented in Python, and the optimization problem is solved by IPOPT v3.14.The proposed framework is run every 15 min, i.e., t = 1/4 [h].For the thermal-comfort estimator, the time windows are 15 days (x = 15) and 3 h (y = 3).The electrical load estimator has a size of ten days (x = 15) and 2 h (y = 2) window, and a maximum depth of DT is set to five to reduce computational costs.Assuming that the building owner desires first to maximize thermal comfort and second to minimize costs, the objective weight ω is set to 0.9.The experiments were conducted on a micro server OpenBlocks IoT VX2 with an Intel Atom E3805 (1.33 GHz, 2 cores) and 2-GB RAM.
The simulation period is 31 days in August (summer) 2019.All data and parameters are measured in actual campus buildings located at Osaka University in Japan.We assume three realistic campus buildings with ten different controllable rooms (Z = 10), and the mean value of the electrical load on weekdays is 300 kW.These buildings are typical commercial buildings with periodic electrical load patterns consisting of HVAC systems, lighting, water heaters, plug loads, etc.The thermal zone parameters are extracted from these buildings, and the time constants τ z range from 3 to 7 h.The occupancy profiles are randomly generated for each room.The rated power and COP of HVACs average 12.6 and 3.38 kW.The PV size is 100 kW depending on the site area.The battery capacity is 300 kWh with a maximum 0.5 C-rate, and the SOC range is 20%-90%.The weather data are downloaded from the Japan Meteorological Agency (JMA), and the PV generation profiles are generated based on this data.The electricity prices are provided by the Japan Electric Power Exchange (JEPX).
Fig. 4 shows the accuracy of two electrical load estimators, the proposed DT method and the LR model [9].First, since the LR model cannot capture the nonlinearity and daily cycle of the electrical load, the accuracy drops rapidly up to halfday ahead.Meanwhile, the best case of DT is 96.5% when the estimator predicts the next step.Although the DT's error increases for future steps, the 23-h ahead estimation still has an accuracy of 91.6%, which is sufficient for practical purposes.
To validate the effect of the load estimation error, we compared five methods.The baseline is based on the previous work [9], which optimizes only HVAC once a day with a periodical battery schedule.Other methods are the proposed framework with different electrical load estimators: Ideal (0% Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.error), Proposed (7% error), Error made by adding the noises on the measured values (20% error), and LR based on LR (23% error).Fig. 5 shows the costs for energy consumption and power peak for different planning periods.The proposed MPC approach can update and compensate for the system state change, while the baseline does not reflect the latest states.As a result, the proposed framework can reduce the power peak costs by 18.6% and the total costs by 5.7%, compared to the baselines.Also, comparing the different estimation methods, the curve of energy costs in Fig. 5 is almost the same.However, the power peak cost greatly differs between the estimation methods.To stay within the power peak limit by the constraint (9), it is required to keep a safe margin for the upper bounds P peak .The high errors in load estimation cause misinterpreting the margin, and the power peak constraint will be violated.Since the proposed framework has the most accurate load estimation, the power peak costs are drastically improved.Besides, in the case of LR, the power peak cost significantly increases when the planning period is 10 h or more.As shown in Fig. 4, the LR model has high errors around 10-15 h ahead.It also leads to violating the power peak constraint and increases that cost.Fig. 6 shows the average PPD and the mean absolute error (MAE) between the indoor temperature and the most comfortable temperature calculated after simulation.We compare with a rule-based thermostat, e.g., "Fix24" means the setpoint is always set to 24 • C, and the battery part is the same as the proposed framework.The results show that the proposed framework and the ideal method achieve the highest comfort level.Comfort temperature dynamically changes according to other conditions, such as humidity, clothing insulation, and activity rates.The baseline, which calculates the schedule once a day, and the fixed setpoint method did not meet the dynamic change of the occupant's preference for thermal comfort.Meanwhile, the proposed framework achieves this by using the state-of-the-art comfort estimation technique [9].
In the winter case (31 days in January 2020), we also confirmed that the proposed framework can reduce the total costs by 8.1% and achieves a higher comfort level than the baseline.Due to space limitations, detailed figures are omitted.
The average execution time was 1.37 × 10 −2 s for the thermal-comfort estimator and 1.91 × 10 −1 s for the electrical load estimator.Note that the LR model for electrical load takes 2.48 × 10 −1 s, and the overhead of DT is less than LR due to the DT parameter (a maximum depth is five).Fig. 7 shows that the average execution time to solve the optimization with the most extended periods (24 h) is 17.6 s.Since the control interval is 15 min, the proposed framework can be clearly performed on low-performance computers.
IV. CONCLUSION AND OUTLOOK This letter proposed an online energy management framework combined with low-complexity thermal comfort and electrical load estimators.Using measured data from actual campus buildings, the results show the impact of the electrical load estimation errors.Furthermore, the computational cost of the proposed framework is low enough to be implemented on low-performance computers.The future direction is to develop a robust optimization method to address various uncertainties, such as estimation errors and environmental factors.

Fig. 2 .
Fig. 2. Block diagram of the proposed energy management framework.

Fig. 4 .
Fig. 4. Accuracy of electrical load estimator for future time steps.andthis tradeoff is controlled by the weight ω.The problem includes the nonlinear equation (3), which can be solved with a nonlinear programming solver.The effectiveness of using the nonlinear battery equations has been discussed in[8].The case study will show that the complexity of this problem is low enough to allow implementation on a low-performance computer.

Fig. 5 .
Fig. 5. Costs for energy consumption and power peak.

Fig. 6 .
Fig.6.Average PPD values and MAE between indoor temperature and most comfortable temperature.