New Algorithm Optimizes Building Energy Use Like a Giant Battery
In the relentless pursuit of grid stability and cost efficiency, a groundbreaking approach is turning the very walls and windows of our buildings into a powerful, invisible energy asset. Forget massive lithium-ion installations; the next frontier in flexible power management might be the office building down the street. A team of researchers from State Grid Tianjin Electric Power Company and Tianjin University has unveiled a sophisticated multi-time-scale optimization method that treats buildings not just as energy consumers, but as dynamic, thermal batteries—dubbed “virtual energy storage.” This innovation, detailed in a recent study, promises to slash operational costs for building microgrids and dramatically smooth out the unpredictable surges and dips caused by renewable energy sources like solar power.
The concept hinges on a simple, yet profoundly underutilized, physical reality: buildings have mass. The concrete, brick, glass, and insulation that form a building’s envelope don’t just keep the weather out; they absorb, store, and slowly release heat. This inherent thermal inertia means that a building’s indoor temperature doesn’t change instantly when the air conditioner is turned up or down. There’s a lag, a buffer. This buffer, previously seen as a passive characteristic, is now being actively engineered into a controllable resource. By strategically allowing the indoor temperature to drift slightly within a pre-defined comfort band—say, between 22 and 25 degrees Celsius during office hours—the building’s cooling system can be intelligently throttled. When the grid is under stress or electricity prices are high, the system can “discharge” its stored coolness by slightly reducing the air conditioner’s power, letting the building’s thermal mass absorb some of the heat gain. Conversely, when there’s an abundance of cheap, clean solar power, the system can “charge” by over-cooling the space slightly, storing that cool energy in the structure itself for later use. This is the essence of virtual energy storage: transforming the building’s physical structure into a giant, slow-moving battery.
The brilliance of the Tianjin team’s work lies not just in identifying this potential, but in creating a practical, two-stage operational framework to exploit it fully. Their system operates on two distinct time scales: day-ahead planning and intra-day correction. This dual-layered approach is crucial for dealing with the inherent uncertainty of modern energy systems, particularly the volatility of solar and wind power. In the day-ahead stage, the system acts like a strategic planner. Using forecasted data for the next 24 hours—including predicted outdoor temperatures, solar irradiance, and building occupancy patterns—it calculates an optimal schedule. The primary goal here is economic: minimize the total cost of purchasing electricity from the grid. By pre-cooling the building during periods of low electricity prices or high solar generation, the system can avoid buying expensive power during peak hours. The virtual storage model allows the algorithm to see beyond the immediate need for cooling; it sees the building as a reservoir of thermal energy that can be managed for financial gain. The results are compelling. In their case study, a typical office building microgrid incorporating this virtual storage saw its daily operating costs drop by nearly 4% compared to a system that simply maintained a constant temperature. This isn’t a marginal improvement; it’s a significant, bankable efficiency that can scale across entire districts.
However, forecasts are never perfect. The sun might be obscured by unexpected clouds, or an office might be more crowded than anticipated, generating more body heat. This is where the second stage, intra-day correction, becomes indispensable. Operating on a much finer, 15-minute time scale, this phase is the tactical operator. It takes the day-ahead plan not as a rigid command, but as a target to be tracked. Real-time sensors feed data on actual solar output, real-time electricity prices, and precise indoor and outdoor temperatures into the system. The algorithm then makes minute-by-minute adjustments to the cooling system’s power, effectively managing the “charge” and “discharge” cycles of the virtual battery to ensure that the building’s power draw from the grid precisely matches the day-ahead target. The objective shifts from cost minimization to precision tracking. The goal is to eliminate the “noise” and volatility on the grid connection point caused by forecasting errors. The study’s results demonstrate this vividly. In a comparison scenario where the building temperature was rigidly fixed at 22.5°C, the power drawn from the grid exhibited significant, erratic fluctuations whenever real conditions deviated from the forecast. In contrast, the virtual storage system, by allowing controlled temperature drifts, acted like a shock absorber, smoothing out these fluctuations and delivering a remarkably stable power profile. This stability is not just a technical nicety; it’s a critical service for grid operators who must constantly balance supply and demand to prevent blackouts.
The implications of this technology extend far beyond a single building’s utility bill. For grid operators managing distribution stations—local substations that serve neighborhoods and commercial districts—the proliferation of distributed energy resources like rooftop solar has created a complex, two-way flow of electricity that is difficult to manage. Buildings equipped with virtual storage become intelligent, flexible loads that can be orchestrated to support grid stability. During a sudden drop in solar output, a cluster of such buildings can be signaled to “discharge” their stored coolness, reducing their collective power draw and preventing a local voltage dip. Conversely, during a period of excess solar generation that threatens to overload local lines, these buildings can be instructed to “charge,” absorbing the surplus power by over-cooling. This transforms passive consumers into active grid participants, providing a form of demand response that is both powerful and largely invisible to the occupants. The study’s authors note that as photovoltaic (PV) capacity increases, so does the challenge of managing its inherent variability. Their analysis showed that with higher PV penetration (from 100 kW up to 300 kW on the same building), the intra-day power fluctuations became more severe. However, the virtual storage system scaled with the challenge; while the absolute deviation increased, the system’s ability to mitigate it remained effective, albeit requiring more aggressive (but still comfort-compliant) temperature adjustments. This suggests that virtual storage is not just a solution for today’s grids but a scalable tool for the high-renewables future.
The human factor is, of course, paramount. No energy-saving scheme will succeed if it makes people uncomfortable. The researchers are acutely aware of this and have built user comfort into the very core of their model. The virtual storage system only operates within strictly defined temperature bands that are deemed acceptable by occupants. In the study, the 20-25°C range during working hours was chosen as a standard comfort zone. The algorithm never pushes the temperature beyond these limits; it simply exploits the flexibility within them. The paper’s figures show that while the temperature does fluctuate more in the virtual storage scenario compared to a fixed-temperature control, it always stays within the prescribed comfort band. This is a crucial point: the system is not about making people sweat or shiver; it’s about intelligently using the existing, acceptable range of thermal comfort as a control variable. Furthermore, the model is adaptable. In a real-world deployment, the temperature band could be customized. A data center with sensitive equipment might have a very narrow band, while a warehouse might tolerate a much wider one. The potential for user engagement is also highlighted. As economic incentives and demand-response programs mature, users could be given the option to opt into wider temperature bands in exchange for lower energy bills or direct payments, further unlocking the potential of this virtual resource.
The technical execution of this system is equally impressive. The researchers developed a hierarchical control architecture for the intra-day correction phase, featuring an “upper-level scheduler” and a “lower-level manager.” This structure ensures robust and efficient operation. The upper-level scheduler receives the high-level target from the day-ahead plan and the real-time data from the field. Its job is to solve the complex optimization problem every 15 minutes to determine the optimal cooling power and the corresponding indoor temperature setpoint. It then sends these high-level commands down to the lower-level manager. The lower-level manager, which is closer to the physical hardware, takes these commands and translates them into specific control signals for the building’s chillers, fans, and other HVAC equipment. It also continuously monitors the actual conditions and feeds this information back up to the scheduler. This division of labor is essential for handling the computational complexity and ensuring real-time responsiveness. The entire system was modeled and solved using industry-standard tools (MATLAB/YALMIP with the CPLEX solver), demonstrating its readiness for real-world implementation.
This research represents a significant leap forward in the field of building energy management and grid flexibility. While previous studies have explored the concept of building thermal mass as a storage medium, most have been confined to the day-ahead time scale. The true innovation here is the integration of a real-time, intra-day correction mechanism that actively manages the virtual battery to counteract forecast errors. This closes the loop, transforming a theoretical concept into a practical, operational tool. It moves beyond simply shifting load to actively stabilizing the grid connection point, a service of immense value in an era of increasing renewable penetration.
Looking ahead, the authors themselves point to several exciting avenues for future research. The current model focuses on a single, office-type building. The next step is to scale up and explore clusters of diverse building types—residential, commercial, industrial—each with its own unique thermal characteristics and occupancy patterns. Coordinating a “fleet” of these virtual batteries could create a massive, distributed energy resource capable of providing grid services on a regional scale. Another critical area is expanding the model to handle more extreme and variable weather conditions. The current study used a “typical” summer day with relatively stable solar output. Future work will need to test the system’s resilience under rapidly changing cloud cover or during heatwaves, where the dynamics of heat gain and loss become far more complex and critical. Finally, the model currently focuses on cooling in summer. A comprehensive energy management system must also address heating in winter. Many large buildings use district heating and cooling systems, which involve complex interactions between electrical, thermal, and sometimes even gas networks. Integrating virtual storage into these multi-energy systems, where decisions in one domain affect the others, is a formidable but essential challenge for the future.
In conclusion, the work by Huang Xu, Zu Guoqiang, Si Wei, Ding Qi, Liu Mingyang, Tang Wanxin, and Jin Xiaolong offers a visionary and highly practical solution to the dual challenges of rising energy costs and grid instability. By reimagining the humble office building as a sophisticated, thermal battery, they have unlocked a vast, previously untapped reservoir of flexibility. Their multi-time-scale optimization method, operating seamlessly between strategic day-ahead planning and tactical intra-day correction, provides a blueprint for a more resilient, efficient, and cost-effective energy future. It’s a powerful reminder that sometimes, the most revolutionary energy storage technology isn’t something we need to build, but something we already have—hidden in plain sight, within the very walls that surround us.
By Huang Xu, Zu Guoqiang, Si Wei, Ding Qi, Liu Mingyang, Tang Wanxin, and Jin Xiaolong. Published in Energy Storage Science and Technology, 2024, 13(2): 568-577. doi: 10.19799/j.cnki.2095-4239.2023.0677.