Coordinated Optimal Control of Household Air-Conditioning and Battery Energy Storage Systems

Under the increasing pressure of maintaining a tight power balance between supply and demand in modern power grids, improving energy efficiency on the user side has become a critical strategy. Building heating, ventilation, and air conditioning (HVAC) systems represent a significant portion of global energy consumption, accounting for over 45% of carbon emissions in the building operational phase. The inherent flexibility of air conditioning loads, coupled with the thermal storage capacity of building structures, presents a substantial opportunity for demand-side management. Meanwhile, the prevalence of residential battery energy storage systems, initially deployed for photovoltaic self-consumption or uninterrupted power supply, has increased. However, the utilization rate of these battery energy storage systems often remains low. This creates a synergistic opportunity: by coordinating the operation of household air conditioners with battery energy storage systems, we can significantly enhance energy flexibility, reduce household electricity costs under time-of-use tariffs, and contribute to grid stability.

Existing research has extensively explored model predictive control for building HVAC systems. Nevertheless, most of these studies focus on large commercial buildings or are based purely on simulation platforms. There is a notable gap in the literature regarding the practical implementation and empirical validation of integrated control strategies for residential HVAC systems and battery energy storage systems. This study aims to bridge this gap by proposing a coordinated optimization control model, deploying it on a real-world Internet of Things hardware platform, and evaluating its performance under actual laboratory conditions.

Problem Formulation and Optimization Model

We focus on the optimal energy management of a household air conditioning system combined with battery energy storage systems under a time-of-use tariff structure. The core of our approach is a rolling time-domain control framework based on model predictive control. This framework allows us to proactively manage energy consumption by leveraging the thermal inertia of the building and the energy shifting capability of the battery.

Objective Function

The objective function is designed to minimize total household electricity costs over a finite prediction horizon W. It incorporates the cost of power purchased from the grid, the operational and maintenance costs of the battery energy storage systems, and critically, an economic penalty for battery degradation. This comprehensive formulation ensures that the optimization does not sacrifice battery lifespan for short-term energy savings.

$$ \min \sum_{k = 0}^{W – 1} \left[ U_k^{TOU} \cdot C_k^{C} + U_k^{Opx} \left( P_k^{C} + P_k^{D} \right) + U_k^{Deg} \left( P_k^{C} + P_k^{D} \right) + \rho \left( St_{k+1} + Se_{k+1} \right) \right] $$

Here, \( C_k^{C} \) represents the power purchased from the grid at time step k, subject to the time-of-use price \( U_k^{TOU} \). The term \( U_k^{Opx} \) represents the unit operational cost of the battery. The battery degradation cost coefficient \( U_k^{Deg} \) is a crucial component for the long-term economic analysis of battery energy storage systems. We calculate this coefficient based on the total life cycle cost \( R^N \) and the total cycle life \( L^N \), distributing the cost across the usable energy throughput of the battery.

$$ U_k^{Deg} = \frac{R^N}{L^N \cdot (E_{\max} – E_{\min})} \cdot \Delta t $$

Where \( E_{\max} \) and \( E_{\min} \) are the maximum and minimum allowable energy levels of the battery. The grid power consumption \( C_k^{C} \) is defined as the net power drawn from the grid.

$$ C_k^{C} = \max\left( P_k^{Sh} + P_k^{Sc} + P_k^{C} – P_k^{D}, 0 \right) $$

Air Conditioning System Model

To model the indoor temperature dynamics, we employ an equivalent thermal parameter model, specifically a first-order Resistance-Capacitance (RC) model. This model captures the thermal storage capacity of the building envelope and its resistance to heat transfer.

$$ T_{k+1}^{r} = \left( 1 – \frac{\Delta t}{RC} \right) T_k^{r} + \frac{\Delta t}{RC} T_k^{out} + \frac{\Delta t}{C} \left( S_k^{ht} – S_k^{cl} \right) \frac{P_k}{COP} $$

In this equation, \( R \) and \( C \) represent the building’s thermal resistance and capacitance, \( T_k^{r} \) and \( T_k^{out} \) are the indoor and outdoor temperatures, \( COP \) is the coefficient of performance, and \( P_k \) is the electrical power consumption of the AC. The binary variables \( S_k^{ht} \) and \( S_k^{cl} \) denote the heating and cooling states of the AC unit, respectively. For a fixed-speed air conditioner, the power \( P_k \) is a constant value. For a variable-frequency unit, the power is a function of the compressor frequency.

To prevent short-cycling and reduce mechanical wear on the compressor, we enforce minimum on/off time constraints for the air conditioning system. For instance, the constraint limiting the minimum cooling duration is:

$$ S_{[k – M_d + 1, k]}^{cl} \geq S_{k – M_d – 1}^{cl} – S_{k – M_d}^{cl} $$

This logical constraint ensures that once the AC is switched on (or off), it must remain in that state for a minimum number of consecutive time steps \( M_c \) or \( M_d \).

Battery Energy Storage System Model

The dynamics of the battery energy storage systems are modeled by tracking its state of charge. The energy level \( E_k \) evolves based on the charging and discharging powers, \( P_k^{C} \) and \( P_k^{D} \), with respective efficiency factors \( \eta^C \) and \( \eta^D \).

$$ E_{k+1} = E_k + \eta^C P_k^{C} \Delta t – \frac{P_k^{D} \Delta t}{\eta^D} $$

The operation of the battery energy storage systems is subject to several constraints. First, the system cannot charge and discharge simultaneously, which is enforced by a complementary constraint using binary variables \( S_k^{C} \) and \( S_k^{D} \). Second, the power and energy must remain within safe operating limits:

$$ 0 \leq P_k^{C} \leq S_k^{C} P_{max} $$
$$ 0 \leq P_k^{D} \leq S_k^{D} P_{max} $$
$$ S_{OC}^{min} – Se_k \leq SOC_k \leq S_{OC}^{max} + Se_k $$

Similar to the AC system, we also impose minimum charging and discharging duration constraints on the battery energy storage systems to preserve battery health and prevent excessive cycling.

$$ S_{[k – M_C + 1, k]}^{C} \geq S_{k – M_C}^{C} – S_{k – M_C – 1}^{C} $$

This entire optimization model is embedded within a Model Predictive Control framework. At each control interval, the current system state (indoor temperature, battery SOC, etc.) is obtained. The optimization problem is solved over a prediction horizon, and only the first control steps for the AC and battery are applied. This process is repeated at the next time step, naturally incorporating feedback.

Implementation of the IoT-based Energy Management System

To validate our proposed model, we developed a real-world hardware test platform in our laboratory. The architecture is centered on an IoT communication network using Modbus-RTU and TCP/IP protocols, integrating an energy management monitoring platform, battery energy storage systems, the HVAC system, and various sensors.

The core components of our experimental system are as follows:
Air Conditioning System: A fixed-speed split-type air conditioner was used. A smart power meter monitored its real-time consumption. To achieve digital control, we employed an infrared remote controller, which converts digital commands from our control platform into infrared signals.
Battery Energy Storage System: We utilized a low-voltage battery energy storage systems solution consisting of battery modules and a hybrid inverter. The system has a nominal capacity of 5.4 kWh and a rated power of 2.3 kW.
Temperature Sensors: Two temperature sensors were placed at different indoor locations to measure the ambient temperature. The average of these measurements was used as feedback for the control system.
Weather Forecast Service: The MPC requires a multi-step prediction of outdoor temperature. We integrated an API service to fetch hourly weather forecasts, which are then interpolated to match our 5-minute control interval.

The energy management monitoring platform, deployed on a standard PC, serves as the central coordinator. It collects data from sensors and the battery management system, executes the MPC-based optimization algorithm, and sends control commands back to the AC controller and battery inverter. The control model was implemented in MATLAB using YALMIP to interface with the CPLEX solver.

Experimental Validation and Performance Analysis

Parameter Identification and Setup

The accuracy of the RC thermal model is crucial for the performance of the MPC. We performed a system identification process using measured indoor and outdoor temperature data over a week in July. The parameters R and C were fitted by minimizing the mean squared error between the model prediction and the actual measured temperature.

$$ \min_{R,C} \sum_{n=1}^{N} \left( T_{n+1}^{r,m} – T_{n+1}^{r} \right)^2 $$

The key parameters identified and used in our experiments are summarized in the following table:

Parameter Symbol Value Unit
Thermal Resistance \( R \) 0.0034 °C/h/kW
Thermal Capacitance \( C \) 3.5456 × 10^6 J/°C
Battery Capacity \( E_{rated} \) 5.3 kWh
Battery Power Limit \( P_{max} \) 2.3 kW
Initial SOC \( SOC_0 \) 70 %
SOC Limits \( S_{OC}^{min/max} \) 20 / 80 %
Efficiency \( \eta^C / \eta^D \) 90 / 90 %
Sampling Time \( \Delta t \) 5 min
Prediction Horizon \( W \) 90 min

Case Study 1: Simulation Results

We first conducted simulations using historical outdoor temperature data to compare the performance of different control strategies under identical conditions. The scenarios compared were:
1. Independent AC operation with traditional on/off control.
2. Independent AC operation with MPC.
3. Integrated fixed-frequency AC and battery energy storage systems with MPC.
4. Integrated variable-frequency AC and battery energy storage systems with MPC.

The simulation results demonstrate clear benefits of the coordinated approach. The integrated system exhibited distinct “pre-cooling” and “pre-charging” behavior before the onset of peak electricity prices. By intelligently charging the battery energy storage systems during low-price periods and discharging to power the AC during high-price periods, the overall electricity cost was significantly reduced.

A summary of the economic performance is shown in the table below.

Control Scenario Daily Electricity Cost (Yuan) Cost Reduction vs. Basic On/Off
Independent AC (Basic On/Off) 48.0 Baseline
Independent AC (MPC) 40.2 16.25%
Fixed AC + BESS (MPC) 34.9 27.29%
VFD AC + BESS (MPC) 31.5 34.38%

When comparing the fixed-frequency AC + battery energy storage systems against the independent AC operation, the coordinated approach reduced the peak-time grid purchase by over 40%, shifting consumption to off-peak hours. Furthermore, the introduction of the battery degradation cost in our model prevented unnecessary cycling, leading to a calculated payback period of approximately 9.8 years for the battery investment in this scenario. The variable-frequency AC scenario further improved efficiency and comfort due to its smoother control capabilities.

Case Study 2: Hardware-in-the-Loop Experiment

Building on the simulation success, we deployed the control strategy on our physical test platform during a typical winter day. The results confirmed the effectiveness of our model in a real-world environment.

The MPC controller successfully maintained the indoor temperature within the desired comfort range despite fluctuations in outdoor temperature. A clear pre-heating behavior was observed just before the high-electricity-price period began. During the peak price window, the AC system operated significantly less frequently, relying instead on the thermal energy stored in the building structure and the power drawn from the battery energy storage systems.

The battery energy storage systems operated precisely as intended by the optimization. The state of charge decreased steadily during the peak hours to provide energy for the AC and other loads. Conversely, the battery recharged during the subsequent off-peak low-price period, ready for the next cycle. This behavior validates that our optimization model can effectively guide the real-time operation of battery energy storage systems to achieve significant cost savings.

Comparative Analysis: Simulation vs. Experiment

While the experimental results largely mirrored the simulation findings, some discrepancies were observed. In the practical experiments, the indoor temperature exhibited slightly more oscillation. This is primarily due to unmeasured disturbances inherent in a physical lab environment, such as heat gain from electronic equipment, human occupancy, or minor inaccuracies in the weather forecast service. The control frequency of the AC unit was also slightly higher in the experiments compared to the simulation, although both strictly adhered to the minimum on/off time constraints.

Despite these minor practical challenges, the core economic benefit was preserved. The integration of the AC system with battery energy storage systems under our coordinated MPC strategy resulted in a measured electricity cost reduction of approximately 13% compared to an independent AC system operating under traditional control. This empirical validation provides strong evidence for the viability of our proposed integrated energy management solution for residential applications.

Conclusion

We have presented a comprehensive study on the coordinated optimal control of household air-conditioning and battery energy storage systems. Our key contributions include the development of an MPC-based optimization model that explicitly accounts for battery degradation costs and equipment lifespan constraints, and its successful implementation and validation on a real IoT-based hardware platform.

The experimental and simulation results consistently demonstrate that the synergistic operation of AC and battery energy storage systems can effectively shift energy consumption away from high-price peak periods through pre-cooling/pre-heating and strategic battery charging/discharging. This leads to substantial reductions in household electricity costs, with our experiments showing savings exceeding 13%. The work provides a practical and effective pathway for deploying battery energy storage systems in residential settings, not just as backup power sources, but as active and intelligent energy management assets that contribute to both user economic benefit and overall grid stability. Our findings underscore the significant potential of integrating battery energy storage systems with flexible loads like air conditioners to create more resilient and efficient energy systems at the grid edge.

Scroll to Top