EngiSphere icone
EngiSphere

Smarter HVAC Systems with AI 🔥

: ; ; ;

How Decision-Focused Learning is Revolutionizing Energy-Efficient Building Control 🏢⚡

Published June 28, 2025 By EngiSphere Research Editors
A Modern Office Building With Visible HVAC Units © AI Illustration
A Modern Office Building With Visible HVAC Units © AI Illustration

The Main Idea

A recent research presents a novel HVAC management system that embeds neural network-based thermal models into optimization using decision-focused learning with stochastic smoothing, enabling smarter, more cost-effective, and comfort-aware building energy control.


The R&D

Controlling the temperature in buildings is no small task—especially when you want to keep everyone comfy while saving money and supporting the electrical grid. Could Artificial Intelligence (AI) help? 🤖 That's exactly what a team of researchers explored in their latest study, and the results are 🔥 (literally and figuratively).

Welcome to the future of Heating, Ventilation, and Air Conditioning (HVAC) management, where Neural Networks (NNs) and Decision-Focused Learning (DFL) join forces to cut costs, reduce energy use, and keep buildings cozy. Let’s dive into the tech behind this next-gen HVAC solution and what it means for smart energy systems! 🧠❄️🌡️

🏠 Why HVAC Systems Matter for Energy Grids

Buildings are energy-hungry giants, consuming over 30% of global electricity, with HVAC systems gobbling up the lion’s share—about 65% of residential usage in Europe alone. 😱

Because buildings heat up and cool down slowly, there's a golden opportunity: if we intelligently control HVAC timing, we can shift energy use to off-peak hours. This helps:

  • Reduce electricity bills 💰
  • Avoid grid overload ⚡
  • Increase renewable energy usage 🌞

But to do this, we need models that can predict how buildings behave thermally—and that's where things get tricky…

🧠 Modeling Thermal Behavior: Physics vs. Data

There are two main ways to model how a building heats and cools:

  1. Physics-based models (white-box) 🏗️ – These simulate walls, insulation, windows, etc., but they require tons of details and are often inaccurate due to aging and installation quirks.
  2. Data-driven models (black-box) 📈 – These use historical data and machine learning to "learn" the patterns. Neural Networks (NNs) shine here because they can learn complex relationships with less manual effort.

This research uses a data-driven approach: NNs trained on real building data to model how temperature changes over time based on HVAC usage and outdoor conditions.

💡 The Big Innovation: Decision-Focused Learning (DFL)

Usually, NNs are trained to predict temperature accurately. But here's the catch: even a small prediction error can lead to bad decisions, like cranking up heating at the wrong time. 😓

Enter Decision-Focused Learning (DFL)! 🎯

Instead of just training the model to be accurate, DFL trains it to make better decisions. The focus is on outcomes—like comfort and cost—not just predictions.

🔍 How it works
  • The neural network becomes part of an optimization model that schedules HVAC usage.
  • The whole system is trained using feedback from real-world simulations, like actual energy usage and comfort levels.
  • A smart technique called Stochastic Smoothing (SS) is used to help the model learn, even though HVAC decisions involve tricky math with on/off switches (which are not easy to optimize).
🧮 Formulating the HVAC Brain: Optimization + AI

The authors turned HVAC control into a Mixed Integer Quadratic Program (MIQP)—a fancy math problem that can decide:

  • When to heat or cool 🕒
  • How much power to use 🔌
  • What temperature to target 🌡️

But the secret sauce is this: they embedded a Neural Network as a constraint in the optimization problem. It acts as a thermal behavior predictor, telling the optimizer how the building will react.

Since ReLU-based NNs (those using the Rectified Linear Unit function) can be exactly written with mixed-integer equations, they can be plugged right into the MIQP model. 🧠➡️📊

🌪️ Tackling the Hard Stuff with Stochastic Smoothing

Usually, optimization models can't “talk back” to machine learning models because of discontinuities (those on/off binary switches we mentioned).

To fix that, the team used Stochastic Smoothing (SS):

  • They added a bit of randomness to NN parameters 🎲
  • This smoothed out the optimization landscape 🌄
  • Then, using a technique from Reinforcement Learning (called REINFORCE), they learned which parameters led to better decisions

This meant the neural network could get better at making cost-saving, comfort-friendly decisions—even if the math under the hood was complex.

🧪 Real-World Test: A 5-Zone Office in Denver, USA

To prove their method works, the team tested it on a realistic building model:

🏢 A 5-zone office floor (511 m²)
🌀 Each zone had its own heat pump
🌤️ Simulated weather data from Denver
⚡ Simulated electricity prices that vary by time-of-day

They used the EnergyPlus simulator (an industry-standard tool) to test their strategies. Instead of training on all 365 days (which is a lot!), they used clustering to pick the most diverse weather days—smart move! 😎

📊 The Results Are In: SS-DFL Beats the Rest!

They compared several training methods:

MethodTotal Cost (incl. Comfort)Comfort ScoreTraining Time
Traditional ML (MSE only)❌ High😞 Poor⏱️ Fast
QP Relaxation (easy math)⚠️ Medium🤷‍♂️ OK⏱️ Medium
Fixed Binary (no randomness)✅ Good🙂 Decent⏱️ Slow
Stochastic Smoothing (SS)🏆 Lowest😎 Best⏱️ Worth it!

SS-trained models outperformed everything else. They had the:

💸 Lowest electricity costs
😌 Best occupant comfort
📉 Smallest prediction error

Surprisingly, smaller neural networks trained with SS beat larger ones trained with traditional methods. That means you get better results without huge computing costs!

🔮 What’s Next? Future Prospects

This research opens up exciting doors for energy efficiency and smart buildings:

  1. Smarter Grid Participation 🏗️⚡ Buildings could automatically shift their HVAC usage to help stabilize the grid—especially when renewables fluctuate.
  2. Scalable HVAC AI 🤖📈 The method works even with non-differentiable simulations or real buildings. That means real-world deployment is possible without needing perfect models.
  3. Handling Uncertainty 🌦️💭 Future versions might include chance constraints to manage uncertainty in weather forecasts and electricity prices.
  4. Faster Training with Parallelization 🧵🧵 The authors suggest speeding things up using parallel computing—great for big buildings or cities!
🧠 Final Thoughts

This study is a perfect example of what happens when engineering meets AI in the real world. By focusing not just on predictions, but on decisions, this method creates practical, cost-saving, and sustainable building control systems.

💬 Imagine a future where every building learns from its environment, optimizes its energy use, and even supports the grid—all thanks to smart algorithms and data-driven thinking. That future is already here, and it looks bright (and well-air-conditioned). 😄🌞❄️


Concepts to Know

🧠 Neural Network (NN) - A computer model that mimics the way our brains learn patterns—used here to predict how building temperatures change over time. - More about this concept in the article "Smarter Grids with Brains 💡🤖 How AI Is Supercharging Renewable Energy Microgrids".

❄️ HVAC (Heating, Ventilation, and Air Conditioning) - The system that controls indoor climate—heating in winter, cooling in summer, and keeping air fresh all year round. - More about this concept in the article "🌿 Vertical Greening Systems: The Green Revolution in Sustainable Buildings 🏢".

⚙️ Optimization - A smart way to choose the best possible settings (like thermostat schedules) to reach a goal—like minimizing energy bills or maximizing comfort. - More about this concept in the article "Building Smarter, Greener 🧱 Optimizing Modular Construction Supply Chains with AI & Multi-Agent Systems".

🧩 Mixed-Integer Program (MIP) / Mixed-Integer Linear Program (MILP) / Mixed-Integer Quadratic Program (MIQP) - A math problem used in decision-making that includes both continuous (smooth) and discrete (on/off) choices—think of turning HVAC on/off and setting temperatures. - More about this concept in the article "Charging Ahead ⚡ Smarter Storage Systems for Electric Trucks!".

🎯 Decision-Focused Learning (DFL) - An AI training method that focuses on improving real-world decisions (like energy savings), not just making accurate predictions.

🌪️ Stochastic Smoothing (SS) - A trick to help AI learn better by adding randomness during training, making it easier to figure out which decisions work best—even when the math gets messy.

🔁 ReLU (Rectified Linear Unit) - A simple mathematical function used in neural networks that says: "output zero if the input is negative, or pass it through if it's positive"—helps models learn faster.

🧊 Thermal Dynamics (of Buildings) - The way temperatures change inside a building based on heating, cooling, weather, and insulation—like how your room stays warm even after the heater turns off.

📉 Mean Squared Error (MSE) - A measure of how far off predictions are from the real thing; smaller MSE means more accurate predictions.

⚡ Demand Response - A strategy where buildings adjust energy use (like shifting heating or cooling) to support the power grid and save money—especially during peak demand hours.

🛠️ Simulator (e.g., EnergyPlus) - A virtual lab that mimics how a building behaves in real life—used to safely test HVAC strategies before applying them to actual buildings.


Source: Pietro Favaro, Jean-François Toubeau, François Vallée, Yury Dvorkin. Decision-Focused Learning for Neural Network-Constrained Optimization: Application to HVAC Management System. https://doi.org/10.48550/arXiv.2506.19717

From: University of Mons; Johns Hopkins University; IEEE.

© 2025 EngiSphere.com