The integrated energy systems (IESs) offer a practical solution for achieving low-carbon targets in residential buildings. However, IES encounters several challenges related to increased energy consumption and costs due to fluctuations in renewable energy generation. Leveraging building flexibility to address these power fluctuations within IES is a promising strategy, which requires coordinated control between air-conditioning systems and other IES components. This study proposes a cross-time-scale control framework that contains optimal scheduling and on-the-fly flexible control to reduce the cost impacts of a residential IES system equipped with photovoltaic (PV) panels, batteries, a heat pump, and a domestic hot water tank. The method involves three key steps: solar irradiance prediction, day-ahead optimal scheduling of energy storage, and intra-day flexible control of the heat pump. The method is validated through a high-fidelity residential building model with actual weather and energy usage data in Frankfurt, Germany. Results reveal that the proposed method limits the cost increase to just 2.67% compared to the day-ahead schedule, whereas the cost could increase by 7.39% without the flexible control. Additionally, computational efficiency is enhanced by transforming the mixed-integer programming (MIP) into nonlinear programming (NLP) problem via introducing action-exclusive constraints. This approach offers valuable support for residential IES operations.
Ziqing Wei, Xiaoqiang Zhai, Ruzhu Wang.
Optimal Scheduling and On-the-Fly Flexible Control of Integrated Energy Systems for Residential Buildings Considering Photovoltaic Prediction Errors.
Engineering, 2025, 53(10): 104-115 DOI:10.1016/j.eng.2025.04.021
As the most significant contributor to greenhouse gas emissions, China has established a goal to cap carbon emissions and achieve carbon neutrality [1]. Simultaneously, Europe faces an energy crisis, intensified by declining fossil fuel supplies, fluctuating prices, and political conflicts, emphasizing the urgent need for sustainable energy alternatives in all sectors [2]. As a major contributor to energy use and emissions, the building sector is particularly pivotal in the transition to renewable energy and improved energy efficiency.
Residential buildings are central to daily life and are considered a key area for improving energy efficiency and promoting sustainability. Integrated energy systems (IESs) for residential buildings offer a holistic solution to these challenges [3,4]. By integrating heat pumps [5], domestic hot water (DHW) tanks [6], photovoltaic (PV) panels [7], and battery systems, IESs can efficiently manage the energy flows within households [8]. The cooperation of these components facilitates the utilization of renewable energy, reduces dependence on conventional power sources, and diminishes carbon emissions.
To adequately address the heterogeneous energy demands as heating, cooling, hot water, and appliance power while minimizing emissions, it is essential to grasp how energy is produced, managed, and utilized within residential IESs [9]. Implementing advanced control strategies, such as model predictive control (MPC) [10], enables these systems to fulfill the energy requirements and contribute to broader environmental and sustainability objectives.
1.2. Literature review of control approach in IES
A considerable amount of current research is dedicated to improving the operation of IESs, which is typically achieved via MPC [11,12]. Studies in this area primarily emphasize three fundamental areas: PV output prediction, problem modeling, and optimization methods.
Firstly, accurate prediction of PV power generation is vital for effective cross-day planning. In most cases, obtaining local PV output relies on public weather forecasting services specific to each region [13]. Leveraging these forecasts can also account for the uncertainty in PV output prediction through scenario-generation methods. Antoniadou-Plytaria et al. [14] quantified the flexible output of the micro-generator by scenario-based optimization, assuming the probabilities distribution of renewable energy are known. The machine learning approach for PV prediction has been widely used as well. Wang et al. [15] proposed a well-constructed long short-term memory recurrent neural network (LSTM-RNN) that captures the historical dynamics of PV output as model features. Similarly, Ramesh et al. [16] developed an auto-encoder-based neural network for PV generation prediction using restricted Boltzmann machine feature extraction.
Despite these advancements, some studies indicated that significant errors persist in PV output predictions in intra-day scale, even when the models have already involved the cloud cover characteristics [17]. Such inaccuracies can severely disrupt the stable operation of IES, especially in remote areas or when operating in isolation [18]. Prediction research often prioritizes the statistical accuracy of the model while neglecting minute-level fluctuations. However, when predictions are incorporated into MPC methods in household IES, these errors in PV output prediction can be considerable and merit attention.
To manage the power output fluctuations, cross-time-scale scheduling through MPC has been introduced [19]. Pan et al. [20] developed a hierarchical rolling optimization approach for a hybrid energy storage system, considering PV’s different time-scale power fluctuations in day-ahead, intraday, and real-time scales. Wu et al. [21] designed a multi-time scale framework based on subsystem decomposition and corresponding economic model predictive control (EMPC) design to address the time-scale multiplicity and optimal control of IES explicitly. Lin et al. [22] evaluated the minimum strategies update frequency for large-scale IESs and found that a three-minute level update of strategies satisfied the control requirements.
Meanwhile, integrating power and thermal equipment into IES is challenging due to varying response characteristics. Specifically, for the thermal system, the heat pump must simultaneously satisfy the DHW tank heating and space heating requirements. Those requirements exhibit significant thermal lag, contrasting sharply with the transient characteristics of electric power devices [23]. The heat pump bridges the thermal energy and electricity, therefore its operation strongly impacts the optimization results in IES. Zhao et al. [24] addressed the thermal lag of the water tank by incorporating the heat pump’s energy efficiency as a function of outdoor temperature and employing an adaptive control method to optimize charging strategy. Clauss and Georges [25] highlighted the influence of model complexity on heat pump performance and emphasized that the complexity of system control significantly impacts the critical performance indicators.
Given the diverse heating requirements in residential buildings, it’s essential to consider the energy quality of the hot water generated by the heat pump, particularly via its temperature. Consequently, the heat transfer process within the heat exchanger should be an integral part of the optimization model. However, previous studies commonly treated the heating energy as a variable without considering the internal heat transfer process, which may not adequately simulate the heat pump performance.
Growing interest in the flexibility of building highlights its potential to enhance IES performance [[26], [27], [28]]. The inherent thermal inertia and the range of comfort zones present in buildings provide sufficient buffering to enable sub-hourly-level adjustments [29]. By leveraging the thermal flexibility of buildings, it’s possible to fully utilize the heat pump system to rapidly respond to the power demands of IES on an intra-day scale [30]. These heating, ventilation, and air conditioning (HVAC) systems can serve as frequency regulation services for the power grid. Research has demonstrated that fast regulation of HVAC makes it possible to meet both frequency adjustment and thermal comfort demand through feedback [31] or optimal control [32].
Flexible heat pump control can meet diverse heating requirements, delivering effective space heating, optimizing DHW tank operations, and smooth the power output of PV. However, due to the complexity of IES, there is still a lack of research on coordinated control that considers the varying energy quality across devices.
This situation necessitates careful consideration of the differences in the equipment’s thermal characteristics and the implementation of switch control in problem modeling. Currently, optimization control models using genetic algorithms [33] or mixed-integer programming (MIP) [34] methods encounter challenges related to solving time, which hinder the ability to achieve rapid solutions for the entire model at a uniform ultra-fine time granularity. Regarding IES in residential buildings, it may be possible to reformulate the MIP problem as a nonlinear programming (NLP) problem by introducing action-exclusive constraints of the switch actions in IES, thereby expediting the solution process. To the authors’ best knowledge, there remains a scarcity of research on relevant modeling and control methods in residential IES operation.
1.3. Contributions of the research
The prevalence of renewable energy within IESs is rising, while heat pump systems are increasingly supplanting fossil fuel-based heating as the primary option. Achieving effective coordinated control among various energy devices and heat pumps is crucial to enhancing the smoothing effect of renewable energy generation, maintaining comfort zones, and ensuring the economic viability of residential IESs.
This study introduces a novel cross-time-scale control framework for residential IESs, aiming at harmonizing the thermal and electrical energy devices across different time scales while integrating thermal and electricity storage. The control strategy encompasses two phases: day-ahead multi-objective optimization scheduling and intra-day flexible rolling compensation. By actively incorporating building thermal flexibility and heat pump control, the power fluctuations associated with renewable energy can be effectively smoothed out.
The main contributions of this study are outlined below:
• This study introduces a cross-time-scale control framework for a residential IES that harnesses the building’s thermal flexibility. The approach integrates a solar irradiance prediction model with a multi-objective optimization for day-ahead planning, optimizing energy usage for the battery and the DHW tank. During intra-day operations, a one-step greedy search optimizes the heat pump, fully leveraging the building’s thermal adaptability to reduce PV prediction errors from day-ahead planning, enhancing the system’s flexibility and efficiency.
• The optimization model characterizes the heat pump based on the heat exchanger structure rather than relying solely on thermal load variables, providing a more accurate representation of energy flow across different conditions. Additionally, the switching and start-stop states of the devices are considered and reformulated by action-exclusive constraints across different time scales. This reformulation transforms the MIP problem into NLP problem, thereby significantly improving the computational efficiency of solution.
The remainder of this paper is organized as follows: Section 2 outlines the cross-time-scale control framework. Section 3 illustrates the results and discusses the case study. The main conclusions are given in Section 4.
2. Methodology
2.1. Description of the cross-time-scale control framework
The cross-time-scale control framework for residential IES is illustrated in Fig. 1. The framework consists of three key steps: solar irradiance prediction, day-ahead optimal scheduling, and on-the-fly flexible control. Each step is outlined in detail below:
(1) The first step involves predicting local solar irradiance for the following day using a neural network model. The model is trained on extensive historical data, which consists of weather forecasts and carefully selected features.
(2) The second step involves developing a dynamic model of the residential IES and formulating it as a day-ahead planning problem. A specific multi-objective optimization problem that considers thermal comfort and economics is constructed according to the predicted solar irradiance, preset information on DHW usage, time-of-use tariffs, and devices’ operational boundaries. The model considers the action states for two types of energy storage devices: the battery and the DHW tank.
(3) The third step addresses the intra-day power fluctuations using a one-step greedy search control approach, which leverages the building’s thermal flexibility through the heat pump. The optimal actions of the battery and DHW tank from the day-ahead planning serve as inputs for intra-day control problem. Discrepancies between the expected total power and the actual one due to the errors in PV prediction are then monitored.
2.2. PV generation via deep neural network
A convolution-supported LSTM neural network (CNN-LSTM) model derived from previous work [35] is employed to predict the day-ahead solar irradiance. The architecture of the CNN-LSTM model is shown in Fig. 2, with detailed information regarding layers and cells provided in Table S1 in Appendix A.
A real-world dataset supported by the National Solar Radiation Data Base (NSRDB) [36] is employed for model training and validation. This dataset encompasses a range of features, including historical temperature, relative humidity (RH), and solar radiation metrics including clear-sky and measured global horizontal irradiance (GHI), direct normal irradiance (DNI), and diffuse horizontal irradiance (DHI). Additional attributes encompass detailed cloud type classifications (e.g., clear, probably clear, fog, various types of water and ice clouds, cirrus, overlapping, overshooting, unknown, dust, and smoke), solar zenith angle, surface albedo, wind speed, and trigonometric representations of daily time cycles.
To ensure the model is suitable for online predictions, all input data must be easily accessible from online sources. Therefore, only the data that can be obtained from forecast service, theoretical calculation, and measurement are chosen as the model’s input. A summary of the model’s input and output are presented in Table 1, which details the relationship between the various input parameters and the model’s outputs. The term T in Table 1 represents the current moment of a single training sample to determine the length of the forward and backward time series. The single step length of a time series is 1 h. For example, T + 96 is the time 96 h after the current time.
2.3. Mathematical model of the IES
A residential IES is depicted in Fig. 3. The system comprises the following heterogeneous energy equipment: PV panels, lithium battery units, an air-source heat pump system, a DHW tank, and a fan coil unit. The model also accounts for non-heat pump electricity loads derived from actual usage data in Ref. [37]. The IES connects to the building’s main electrical bus and interacts with the power grid.
2.3.1. PV panel
The PV model is constructed using a relationship of outdoor temperature and GHI. The PV power generation model is as follows [38]:
where (W) and (W) represent the actual and theoretical output power of the PV system, respectively. represents the actual efficiency of the PV panel, which is dependent on predicted solar irradiance I (W·m−2) and the environmental temperature tambient (°C) as follows:
where ka, ks, krsh, kv, kd, and ke correspond to the principal resistance coefficients in the PV panel circuit, typically provided by the manufactures. v represents the correction coefficient based on I and tambient compared to standard testing conditions under 25 °C. I0(tambient) is the coefficient determine function of tambient that used in Eq. (4).
2.3.2. Battery
The battery’s state of charge (SOC) model adopts the Coulomb counting method as follows:
where i denotes the time index. (s) refers to the time term. (%) signifies the battery’s state of charge at time index i. (%) and (%) denote the battery’s charging and discharging efficiencies, and (W) and (W) represent the battery’s charging and discharging power at time index i. (W·h) represents the theoretical capacity of the battery.
2.3.3. Domestic hot water tank
A lumped DHW tank model is employed as follows:
where (J·kg−1·K−1) represents the specific heat capacity of the water in the DHW tank. and (°C) signify the water quality and temperature in the DHW tank, respectively. stank is the binary switching action of tank heating, “1” for tank heating and “0” for not. Φhp (W) is the heat flow rate provided by heat pump. (kg·s−1) denotes the mass charge flow rate of water in the DHW tank during the hot water usage. tcold_water (°C) refers the supply water temperature from municipal pipe network. (°C) corresponds the equivalent heat exchange temperature under an assumed temperature difference of 5 °C between the inlet and outlet water of the tank. (K·W−1) refers the thermal resistance of the pipe-type heat exchanger inside the DHW tank. Φloss (W) represents the heat loss rate from the DHW tank as follows:
where Rtank (K·W−1) denotes the thermal resistance of the DHW tank envelope.
2.3.4. Air source heat pump
Regarding the minimum interval limits of solar irradiance prediction, the control interval of the IES system is set to 15 min. Based on the simulation results from Ref. [25], the compressor’s dynamic response is within 5 min. Therefore, it is assumed that the water temperature adjustment of the air-source heat pump is quasi-steady-state. The heat pump system in IES needs to heat up both the living space and hot water in DHW tank. Due to the necessity of operational switching and significant temperature variations, the coefficient of performance (COP) of heat pump must be a function of the setting and outdoor temperature.
Therefore, the heat pump model adopts a coefficient method, utilizing a fitted curve derived from experimentally measured energy efficiency and power data to represent various operating conditions uniformly,
where and (W) are the coefficient of performance and power consumption of the heat pump, respectively. represents the outlet temperature of the heat pump. Coefficient parameters (a1, a3, …, a10 and b1, b3, …, b10) can be obtained through manufacturers.
2.3.5. Residential building
A 3R2C model developed in previous work [39,40] is used for the thermal dynamic simulation of the residential building as follows:
where Cair (J·K−1) and Cwall (J·K−1) are the lumped heat capacity of the air space and building envelope, and troom (°C) and twall (°C) denote the corresponding temperatures. R1–R3 (K·W−1) are the lumped thermal resistances of the building, which can be identified through simulation data derived from EnergyPlus (National Renewable Energy Laboratory (NREL), USA). Φsolar (W) signifies the heat gain rate from the solar through the window, which is assumed to be linear with the solar irradiation I. Φoccup (W) corresponds to the internal heat gain rate derived from human activities, which is assumed to be linear with the power consumption that is not caused by heat pump Pnon,hp (W). sroom is the binary switching action of space heating, “1” for space heating and “0” for not. The fan coil unit is assumed to operate under completely dry conditions. The model is shown as follows [41]:
where denotes the fully dry coefficient of the fan coil unit. Gmin (W·K−1) and Gratio (W·K−1) are the minimum and ratio thermal conductance. is the number of heat transfer units under dry conditions. U (W·m−2·K−1) is the heat transfer coefficient. A (m2) represents the heat transfer area. UA is constructed with the heat transfer characteristics in both air side and water side. (m2) and (m2) correspond to surface areas of the air and water side, respectively. (kg·s−1) and (kg·s−1) are the mass flow rates of air and water from the heat pump, respectively. (J·kg−1·K−1) and (J·kg−1·K−1) are the specific heat capacity of dry air and water, respectively.
2.4. Day-ahead optimal scheduling of IES
Based on the predicted solar irradiation, the battery and the DHW tank charging schedule can thus be determined through optimization method. Here, a bi-objective scheduling problem is formulated, considering both indoor thermal comfort and economic concerns as follows.
Problem 1:
where (EUR) denotes the electricity accumulated cost interacting with the power grid. (W) and (W) represent the buying and selling power of IES at time interval i, respectively. (EUR·(kW·h)−1) and (EUR·(kW·h)−1) are the buying and selling price of electricity interact with the power grid at time interval i, respectively. n is the length of time series in the MPC problem. (°C) is the temperature deviation level of indoor temperature troom from a preset standard of 25 °C, expressed by root mean square errors (RMSE). and are the min–max scaled forms of and , respectively. and are the weights of each object calculated by the entropy weight method [42], as shown in Section S3 in Appendix A. (EUR), (EUR), (°C), and (°C) denote the min and max value of and during the process of entropy weight method, respectively.
In addition, certain equations that describe the energy flows between different devices are involved as the hard constraints. All equations will be reconstructed into discrete forms using a backward time difference scheme. Furthermore, there are also energy balance constraints and action-exclusive constraints of devices to be considered as follows.
Power balance constraints:
where (W) is the power generation of PV panels at time interval i. (W) and (W) refer to the battery’s discharging and charging power, respectively. (W) and (W) refer to power consumption caused with and without the heat pump in the IES at time index i, respectively.
Action-exclusive constraints:
Eq. (27) makes a constraint that the action of charging and discharging in the battery are mutually exclusive, as well as the power purchasing from the grid and power selling to the grid in Eq. (28). Heating action between room space heating and DHW tank heating in Eq. (29) is also action-exclusive. Eq. (28) further ensures that the variables of Eq. (29) can only choose between 0 and 1. By introducing action-exclusive constraints, binary variables representing states can be relaxed to continuous variables. This guarantees that all variables are continuously differentiable, thereby transforming the origin MIP problem into an NLP problem, so the problem can be solved more efficiently.
2.5. Intra-day on-the-fly flexible control
During the intra-day, the system operates following the day-ahead optimal scheduling of the battery storage and DHW tank. However, the fluctuation errors between the prediction and the real-time solar irradiance still need compensation. Therefore, the on-the-fly flexible control scheme is proposed as follows.
Problem 2:
where (W) is the flexible power that the heat pump should compromise, which is the difference between heat pump power consumption of day-ahead optimal scheduling results and that of intraday on-the-fly flexible control at time index i. (W) is the fluctuated power between the PV output of day-ahead solar irradiation prediction and that in intra-day observation at time index i.
The constraints in Problem 2 include Eqs. (10), (11), (12), (13), (14), (15), (16), (17), (18), (19), (20) and Eqs. (25), (26), (27), (28), (29), along with a new binary state variable son–off,hp, as well as its action-exclusive constraints to describe the heat pump’s on–off state. Throughout Problem 2, the optimal state setting and supply water temperature of the heat pump can be obtained. It is necessary to note that Problem 2 is a one-step search problem, meaning there is no need for further prediction regarding the system. The only input signal is the real-time prediction errors of PV output. The control flow chart is illustrated in Fig. 4.
3. Results and discussions
3.1. Case description
The case study focuses on a typical residential building located in Frankfurt, Germany as described in Table 2. The building is modeled via the high-fidelity simulation tool EnergyPlus, with occupancy schedules reflecting regular human behavior. Simulation data is subsequently utilized to train the building model, as given in Section 2.3.5.
For solar irradiance prediction, the training and testing data are derived from the NSRDB, as shown in Fig. 5. The proposed CNN-LSTM model is trained using the data ranging from Jan 1, 2017 to Dec 31, 2018, while the test data is ranging from Jan 1, 2019 to Dec 31, 2020. Temperature and relative humidity data from the database are both used in heat pump and building thermal dynamics modeling. The dataset is divided into training and testing subsets at a ratio of 2:1.
The data in February 4, 2019 is randomly chosen to test the proposed framework. The detailed data, including weather forecast data, time of use tariff data for Frankfurt city, and power consumption caused without the heat pump, are shown in Fig. 6. According to usage habits, DHW is scheduled to be used at 8:30 AM, requiring the water temperature to reach 55 °C beforehand. The initial state of battery’s SOC and water temperature of the DHW tank are set as 0.25 and 20 °C, respectively.
3.2. Day-ahead prediction of solar irradiance
The prediction model was trained for 500 epochs. As illustrated in Fig. 7, the model’s normalized loss shows a rapid decline during the first 50 epochs, followed by a gradual slowing in the rate of loss reduction. By the 400th and 500th epochs, the difference in the model’s normalized training loss is less than 0.001. After 500 epochs, the model’s final normalized loss is 9.5153 × 10−3, demonstrating the model’s high predictive accuracy given the current input data and architecture.
Fig. 8 compares the solar irradiance predictions of the proposed model with convolution neural network (CNN), extreme gradient boosting (XGBoost), and supported vector regression (SVR) models for the training set, test set, and two single days. All models effectively capture the overall trends in measurement data. From Fig. 8(a), the model adeptly tracks the seasonal variations. However, Figs. 8(b) and (c) reveal notable discrepancies between predicted and actual curves during single-day predictions. These observations are consistent with the findings reported in Ref. [43]. Generally, the predicted curve tends to be smoother than the actual curve, resulting in fluctuation errors between the predicted PV outputs and the real ones.
The model’s accuracy in single-day predictions shows more random fluctuations. As seen in Fig. 8(b), the CNN-LSTM model closely aligns with the measurement curve, accurately determining sunrise and sunset times. In contrast, the rest of the models substantially deviate during periods of non-irradiation and peak irradiation. Fig. 8(c) indicates that the predicted curves of CNN-LSTM and XGBoost are more closely aligned with the measured curve on another day. This suggests that while the prediction model trained on extensive data can capture sound statistical trends across numerous data points, they still encounter significant errors in the single-day prediction task.
Table 3 summarizes the performance of the models using RMSE, mean absolute error (MAE), and coefficient of determination (R2). The CNN-LSTM model performs well on the training set, achieving an RMSE of 85.7389 W·m−2 and an R2 of 0.8257. However, its performance experiences a slight decline on the testing set, where it records an RMSE of 93.9642 W·m−2 and an R2 of 0.7943. Remarkably, this model demonstrates some improvement on the single-day test, achieving an RMSE as low as 26.8577 W·m−2 and an R2 of 0.8515 on single Day 2.
The CNN model has a slightly higher RMSE and lower R2 than the CNN-LSTM one on the training set, and its performance decreases on the testing set. It shows the lowest RMSE on single Day 2 but with a high MAE and moderate R2. XGBoost stands out on the training set with the lowest RMSE/MAE and the highest R2, but its performance degrades on the testing set and the single-day datasets, although it still maintains a relatively high R2. It performs well on single Day 2 with the lowest RMSE of 25.6838 W·m−2 and a high R2 of 0.8642. SVR has the highest RMSE across all datasets and shows a moderate to low R2, indicating its poorest performance.
In summary, the CNN-LSTM model excels on the testing set, single Day 1 and single Day 2, while XGBoost performs best on the training set. These prediction disparities in a single day will impact scheduling in IES and deviations in real-world processes, which will be discussed in subsequent sections.
3.3. Day-ahead optimal scheduling
Fig. 9 displays the optimal scheduling for charging the DHW tank. Due to the inherent nature of the switching process constraints involved in tank heating and space heating, simultaneous actions are not feasible. Hence, a certain level of alternation between the two actions is required to effectively satisfy both heating demands. Within the time interval between 0:00 and 2:00 AM, the charging state of the DHW tank ( lasts for one hour, raising its water temperature from 20 to 32.4 °C, while the room temperature drops to 19.6 °C. The heat pump then shifts to room heating, maintaining a stable room temperature of 25 °C until 5:30 AM, with a thp of 38.2 °C.
At 5:30 AM, the thp starts to rise from 38.7 °C to its peak of 75 °C: After two alternative 30 min cycles of space heating and DHW tank heating, the heat pump then processes with a 30 min DHW tank heating session until the desired water temperature is achieved. During this period, the room maintains thermal comfort by slowly decreasing in temperature through effectively utilizing the building’s thermal flexibility.
Fig. 10 presents the optimal power usage of the energy system throughout the day. Fig. 10(a) illustrates the charging and discharging power of the battery, respectively. While Fig. 10(b) depicts the variation of the battery’s SOC. Fig. 10(c) shows the power interaction results between the IES system and the power grid. Combining with electricity prices in Fig. 10(d), the battery operates on a “charging at low price, discharging at high price” strategy. It starts charging when the electricity price reaches a low point between 4:00 AM and 5:00 AM, continuing until it reaches the maximum capacity. As the price begins to rise from 6:00 AM, the battery begins discharging.
Based on the PV prediction results, the battery charges at a low power rate during the daytime. The SOC undergoes two complete charging and discharging cycles in a day. It can be observed from Fig. 10(c) that the overall power purchasing decisions of the energy system avoid significant purchases at peak electricity prices. As shown in Fig. 10(d), the accumulated cost shows a “rise–flat–rise” trend due to the contribution of PV output contributions, with a total scheduled cost of 14.21 EUR for the day.
3.4. On-the-fly flexible control for power compensation
The discrepancy between actual and predicted solar irradiance, as illustrated in Figs. 8(b) and (c), inevitably influences the PV generation. These variations disrupt the system’s balance when following the optimal scheduling outlined in Section 3.3. Hence, it becomes imperative to compensate for these inevitable fluctuations. Employing the dynamic on-the-fly flexible control proposed in Section 2.5 yields an enhancement of the IES. The results of the on-the-fly flexible control are shown in Fig. 11.
3.4.1. Results
Fig. 11(a) shows the IES power fluctuations due to the prediction errors in intra-day. The maximum and minimum errors reach 2424.58 and −1295.27 W, respectively. These deviations prompt adjustments in the operational dynamics of the heat pump, meticulously detailed in Fig. 11(b). Despite efforts to power compensation, it’s clear that the actual power adjustment of the heat pump does not fully match the anticipated variations under such dynamic conditions. This shortfall can be attributed to the inherent operational constraints within the heat pump’s available operating range. Notably, throughout the day’s operation, the heat pump not only recalibrates its power variations but also synchronizes with heating start-stop actions. To better align with the expected power variation, the heat pump pauses for a total of 45 min during daytime operation, showcasing a more aggressive proactive approach to managing the fluctuating of the system.
As depicted in Fig. 11(c), the heat pump adjusts the power use under full consideration of the building’s thermal flexibility without affecting the established day-ahead optimal schedule of battery and DHW. The outlet temperature of the heat pump adjusts to optimize resource utilization—exceeding 70 °C during periods of surplus PV generation and decreasing to its minimum threshold during low output. Consequently, the temperature within the rooms experiences fluctuations, diverging from the anticipated trajectory depicted in Fig. 9. During the flexible control period, it plunges to a relatively low temperature of 20 °C when the solar irradiance falls, and sore back to an upper limit of 30 °C during the peak radiation hours between 12:00 and 14:00. The overall temperature deviation variance throughout the day increased from 0.81 to 4.43 °C compared to day-ahead scheduling.
Fig. 11(d) provides a detailed comparison of all-day operational costs, featuring three distinct cost curves. These curves represent the envisioned optimal scheduled cost from Section 3.3, the actual cost incurred without any flexibility control, and the cost resulting from optimal scheduling and flexible control. The presence of solar irradiance prediction errors renders the optimal scheduled cost Zeconomic of 14.21 EUR unattainable. However, by implementing on-the-fly flexible control of the heat pump, the total purchased electricity reaches 38.734 kW·h, resulting in an actual cost of 14.59 EUR. This represents only a 2.67% cost increase compared to the optimal scheduling. Conversely, the absence of on-the-fly flexible control led to a total purchased electricity of 40.387 kW·h, which resulted in a cost increase of 7.39%. These results highlight the effectiveness of the proposed heat pump-based flexible control strategy.
3.4.2. Performance comparison
Two control methods are employed to compare with the proposed one, as shown in Table 4. Method A is the proposed method. Method B applies a single-stage optimization framework derived from authors’ previous work [44], where the power grid compensates the uncertainties during the intra-day period without flexible control. Method C is a two-stage optimization of the IES using the battery as a flexible source, as define in Problem 3. During the night, the on-the-fly control follows the day-ahead optimal schedule. After the sunrise, the battery control is based on the similar one-step search problem proposed in section 2.5. Three indicators, namely the total cost, total energy purchase, and PV self-consumption rate (PSCR), are employed for evaluation. The PSCR is defined as follows:
where is the time index between sunrise and sunset, defined by the time of the first and last non-zero PV power data. (W) refers to power generation of PV at time index j. (W) is the power that sold to the grid at time index j. J is the time interval between sunrise and sunset.
Problem 3:
where (W) is the flexible source that used to compromise the difference of photovoltaic output (W) at time index i. (W) and (W) are the power use of the flexible source derived from day-ahead optimal scheduling and that of intra-day compensation at time index i. (W) is the predicted photovoltaic output of day-ahead optimal scheduling, while (W) is the observation value of photovoltaic output of intra-day at time index i. (%), (°C), (%), and (°C) are the SOC of battery and temperature of DHW tank of the first and the last time index in day-ahead optimal scheduling. (%), (°C), (%), and (°C) are the SOC of battery and temperature of DHW tank of the first and the last time index in intra-day compensation.
It is worth noting that, to ensure a fair comparison, all three algorithms must operate without affecting the start and end state of the energy storage devices planned in the day-ahead optimal scheduling of IES, so extra constraints must be added. Table 5 shows the comparison results among different methods. The main results are listed as follows:
Total cost: Method A is the most cost-effective, with a total cost of 14.59 EUR. It is followed by Method C at 15.59 EUR, which is slightly more expensive than Method A. This indicates that the two-stage optimization is more efficient than the single-stage method. Method B incurs the highest cost at 16.36 EUR, resulting in a 1.77 EUR gap between the most and least economical methods.
Total energy purchase: The energy purchases among the three methods show minimal variation. Methods B and A have nearly identical energy purchases, with just 0.021 kW·h difference. Method C shows a slightly lower energy purchase at 38.501 kW·h. Compared to method A, higher cost and lower total energy purchase mean that method C has poorer flexibility. This is due to the sufficient PV power in case day, while the battery capacity is limited to use them completely.
PSCR: Method A demonstrates a PSCR of 80.21%, signifying high on-site energy use. Method B, with a PSCR of 74.73%, still indicates a substantial degree of PSCR but is less efficient than Method A. Method C records a PSCR of 100.00%, indicating that all the generated solar energy is consumed on-site and utilized in the battery.
The trading power curve in Fig. 12 indicates that Method B exhibits the most significant fluctuations in total power, while Method C demonstrates the lowest overall power trading. Method A occupies a position between them. It is indicated that the flexible source needs to be power-consumable (electricity–heat) rather than power-transferable (electricity storage and release) under the residential IES. Therefore, for such an optimization problem, Method A emerges as the most suitable solution.
3.5. Discussions and limitations
The optimization problem, initially formulated as an MIP problem due to switching actions, was transformed into an NLP problem to improve computational efficiency. By making action variables mutually exclusive, the NLP problem could be solved using interior point OPTimizer (Ipopt) with interior-point method, reducing computation time to 3.7 s, compared to the MIP solution using branch-and-bound algorithm with solving time of 1542 s. However, this method is limited to binary actions (such as on–off) and cannot accommodate scenarios with more than two options.
Some simplifications need to be highlighted. The model assumes precise data for non-heat pump electricity loads and tariffs, disregarding compounded uncertainties that could amplify deviations between optimal scheduling and actual performance, causing greater fluctuations and reduced efficiency. Additionally, excessive heat generation to meet DHW requirements is avoided to preserve valve lifespan. Furthermore, priority is not given to charging the battery when its SOC still has redundant capacity, as optimal scheduling has already been established.
To further enhance IES’s performance, improvement could consider simultaneously utilizing both the battery in a partially charged state and the heat pump during compensation processes. This approach aims to stabilize the voltage and frequency of the building’s main bus more effectively. Finally, establishing personalized comfort intervals is vital, and adopting data-driven methods for quantification may prove to be an effective way to achieve this.
4. Conclusions
This study proposes a cross-time-scale control framework for IESs in residential buildings, aiming to address the prediction errors caused by the uncertainties in PV output. In the first stage, a CNN-LSTM model is employed for solar irradiation prediction. Subsequently, day-ahead scheduling of optimal battery storage and DHW tank charging is determined through multi-objective optimization via a multi-objective approach weighted by the entropy method. For real-time adjustment, on-the-fly flexible control of heat pump compensates for PV fluctuations via a one-step greedy search approach.
Furthermore, the heat transfer model of the fan coil and DHW tank are considered to improve the model fidelity. The action-exclusive constraints are used in the day-ahead and intra-day optimization problems. A validation test using the real measurement data from a residential building in Frankfurt, Germany demonstrates the method’s effectiveness.
The main conclusions can be summarized as follows:
(1) The cross-time-scale control strategy effectively manages electricity storage, hot water storage, and space heating in residential IES. In day-ahead optimal scheduling, IES is able to use the electricity tariff variations and building flexibility to ensure the optimal utilization of battery and DHW tank charging.
(2) Implementation of on-the-fly flexible control reduces the total purchased electricity to 38.734 kW·h for 14.59 EUR, a 2.67% improvement compared to the day-ahead optimal scheduling alone. Without this control, the costs increase by 7.39%.
(3) Significant solar irradiance prediction errors highlight the need for more accurate intra-day evaluation methods, as current metrics fail to capture these discrepancies adequately.
(4) Transforming the MIP problem into an NLP problem using action-exclusive constraints reduces computation time for day-ahead scheduling from 1542 to 3.7 s, while intra-day flexible control achieves a computation speed of 0.37 s.
This approach offers a practical and computationally efficient method for addressing renewable energy uncertainties, which is meaningful for residential IES energy management.
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgments
This work was supported by the National Key Research and Development Program of China (2022YFB4200902).
WeiYM, ChenK, KangJN, ChenW, WangXY, ZhangX.Policy and management of carbon peaking and carbon neutrality: a literature review.Engineering2022; 14:52-63.
[2]
HalkosGE, GkampouraEC.Evaluating the effect of economic crisis on energy poverty in Europe.Renew Sustain Energy Rev2021; 144:110981.
[3]
YangG, ZhaiX.Optimization and performance analysis of solar hybrid CCHP systems under different operation strategies.Appl Therm Eng2018; 133:327-340.
[4]
YangG, ZhaiX.Optimal design and performance analysis of solar hybrid CCHP system considering influence of building type and climate condition.Energy2019; 174:647-663.
[5]
YanH, ZhangC, ShaoZ, KraftM, WangR.The underestimated role of the heat pump in achieving China’s goal of Carbon Neutrality by 2060.Engineering2023; 23:13-18.
[6]
DaJ, LiM, LiG, WangY, ZhangY.Simulation and experiment of a photovoltaic—air source heat pump system with thermal energy storage for heating and domestic hot water supply.Build Simul2023; 16(10):1897-1913.
[7]
LiH, ChenQ, ZhangT, LiuX, LiuX, DaiY, et al.Can distributed photovoltaic-battery systems power buildings with favorable matching performance and techno-economic feasibility?.Energy Convers Manage2024; 306:118260.
[8]
RenF, WeiZ, ZhaiX.A review on the integration and optimization of distributed energy systems.Renew Sustain Energy Rev2022; 162:112440.
[9]
LiH, WangZ, HongT, PietteMA.Energy flexibility of residential buildings: a systematic review of characterization and quantification methods and applications.Adv Appl Energy2021; 3:100054.
[10]
MayneDQ, RawlingsJB, RaoCV, ScokaertPOM.Constrained model predictive control: stability and optimality.Automatica2000; 36(6):789-814.
[11]
WangD, ChenY, WangW, GaoC, WangZ.Field test of model predictive control in residential buildings for utility cost savings.Energy Build2023; 288:113026.
[12]
DrgoJňa, ArroyoJ, CupeiroI Figueroa, BlumD, ArendtK, KimD, et al.All you need to know about model predictive control for buildings.Annu Rev Contr2020; 50:190-232.
[13]
Rodriguez-DiazE, Palacios-GarciaEJ, Anvari-MoghaddamA, VasquezJC, GuerreroJM.Real-time energy management system for a hybrid AC/DC residential microgrid.In: Proceedings of the 2017 IEEESecondInternationalConference onDC Microgrids (ICDCM); 2017 Jun 27–29; Nuremburg, Germany. NewYorkCity: IEEE; 2017. p. 256–61.
[14]
Antoniadou-PlytariaK, SteenD, TuanLA, CarlsonO, MohandesB, GhazviniMAF.Scenario-based stochastic optimization for energy and flexibility dispatch of a microgrid.IEEE Trans Smart Grid2022; 13(5):3328-3341.
[15]
WangF, XuanZ, ZhenZ, LiK, WangT, ShiM.A day-ahead PV power forecasting method based on LSTM-RNN model and time correlation modification under partial daily pattern prediction framework.Energy Convers Manage2020; 212:112766.
[16]
RameshG, LogeshwaranJ, KiruthigaT, LloretJ.Prediction of energy production level in large PV plants through auto-encoder based neural-network (AUTO-NN) with restricted Boltzmann feature extraction.Future Internet2023; 15(2):46.
[17]
LiuZ, GuoZ, ChenQ, SongC, ShangW, YuanM, et al.A review of data-driven smart building-integrated photovoltaic systems: challenges and objectives.Energy2023; 263:126082.
[18]
BiroonRA, BironZ, HadidiR.Effective frequency regulation via electricity rate: comparison to other frequency control strategies.IEEE Trans Ind Appl2023; 59(2):2305-2313.
[19]
YangM, CuiY, HuangD, SuX, WuG.Multi-time-scale coordinated optimal scheduling of integrated energy system considering frequency out-of-limit interval.Int J Electr Power Energy Syst2022; 141:108268.
[20]
PanC, FanH, ZhangR, SunJ, WangY, SunY.An improved multi-timescale coordinated control strategy for an integrated energy system with a hybrid energy storage system.Appl Energy2023; 343:121137.
[21]
WuL, YinX, PanL, LiuJ.Economic model predictive control of integrated energy systems: a multi-time-scale framework.Appl Energy2022; 328:120187.
[22]
LinX, LinX, ZhongW, ZhouY.Multi-time scale dynamic operation optimization method for industrial park electricity–heat–gas integrated energy system considering demand elasticity.Energy2024; 293:130691.
[23]
ZhangS, OcPłoń, KlemeJJš, MichorczykP, PielichowskaK, PielichowskiK.Renewable energy systems for building heating, cooling and electricity production with thermal energy storage.Renew Sustain Energy Rev2022; 165:112560.
[24]
ZhaoZ, WangC, WangB.Adaptive model predictive control of a heat pump-assisted solar water heating system.Energy Build2023; 300:113682.
[25]
ClaussJ, GeorgesL.Model complexity of heat pump systems to investigate the building energy flexibility and guidelines for model implementation.Appl Energy2019; 255:113847.
[26]
ChenY, XuP, GuJ, SchmidtF, LiW.Measures to improve energy demand flexibility in buildings for demand response (DR): a review.Energy Build2018; 177:125-139.
[27]
AmadehA, LeeZE, ZhangKM.Quantifying demand flexibility of building energy systems under uncertainty.Energy2022; 246:123291.
[28]
DewanganCL, VijayanV, ShuklaD, ChakrabartiS, SinghSN, SharmaA, et al.An improved decentralized scheme for incentive-based demand response from residential customers.Energy2023; 284:128568.
[29]
LuoZ, PengJ, CaoJ, YinR, ZouB, TanY, et al.Demand flexibility of residential buildings: definitions, flexible loads, and quantification methods.Engineering2022; 16:123-140.
[30]
WangJ, WeiZ, ZhuY, ZhengC, LiB, ZhaiX.Demand response via optimal pre-cooling combined with temperature reset strategy for air conditioning system: a case study of office building.Energy2023; 282:128751.
[31]
JiangZ, CaiJ, MosesPS.Smoothing control of solar photovoltaic generation using building thermal loads.Appl Energy2020; 277:115523.
[32]
CaiJ, JiangZ.Primal-dual distributed control of residential thermal loads for voltage regulation of distribution systems with high PV penetration.In: Proceedings of the 2022 AmericanControlConference (ACC); 2022 Jun 8–10; Atlanta, GA, USA. NewYorkCity: IEEE; 2022. p. 4580–6.
[33]
FarzanehH, MalehmircheginiL, BejanA, AfolabiT, MulumbaA, DakaPP.Artificial intelligence evolution in smart buildings for energy efficiency.Appl Sci2021; 11(2):763.
[34]
SenS, KumarM.Distributed-MPC type optimal EMS for renewables and EVs based grid-connected building integrated microgrid.IEEE Trans Ind Appl2024; 60(2):2390-2408.
[35]
WeiZ, RenF, YueB, DingY, ZhengC, LiB, et al.Data-driven application on the optimization of a heat pump system for district heating load supply: a validation based on onsite test.Energy Convers Manage2022; 266:115851.
[36]
SenguptaM, XieY, LopezA, HabteA, MaclaurinG, ShelbyJ.The national solar radiation data base (NSRDB).Renew Sustain Energy Rev2018; 89:51-60.
[37]
SchlemmingerM, OhrdesT, SchneiderE, KnoopM.Dataset on electrical single-family house and heat pump load profiles in Germany.Sci Data2022; 9(1):56.
[38]
DriesseA, TheristisM, SteinJS.A new photovoltaic module efficiency model for energy prediction and rating.IEEE J Photovolt2021; 11(2):527-534.
[39]
WeiZ, RenF, ZhuY, YueB, DingY, ZhengC, et al.Data-driven two-step identification of building thermal characteristics: a case study of office building.Appl Energy2022; 326:119949.
[40]
WeiZ, WangJ, YueB, ZhengC, DingY, LiB, et al.A two-step identification framework for building thermal dynamic based on high fluctuation performance data: a case of office with variable refrigerant flow system.Sustain Cities Soc2024; 108:105495.
[41]
LiW, NurdinH, SwanP.Control-oriented fan coil unit modeling for room dynamics considering dehumidifying cooling conditions and indoor air quality.Energy Convers Manage2023; 20:100476.
[42]
KumarR, SinghS, BilgaPS, JatinSJ, SinghS, et al.Revealing the benefits of entropy weights method for multi-objective optimization in machining operations: a critical review.J Mater Res Technol2021; 10:1471-1492.
[43]
HuangC, YangM.Memory long and short term time series network for ultra-short-term photovoltaic power forecasting.Energy2023; 279:127961.
[44]
WeiZ, ZhaiX, ZhangQ, YangG, DuT, WeiJ.A MINLP model for multi-period optimization considering couple of gas–steam–electricity and time of use electricity price in steel plant.Appl Therm Eng2020; 168:114834.