AutoControl-MPC: An automated model predictive control development framework based on large language models for HVAC systems

Published in Energy and Buildings, 2026

Paper (Energy and Buildings, 2026)

📌 Overview

HVAC systems account for a large share of global energy use. Model Predictive Control (MPC) handles their dynamics and uncertainty well, but building an MPC controller is labor-intensive and needs specialist knowledge. Each building needs its own model identification and code, which limits MPC adoption at scale.

AutoControl-MPC automates every stage of MPC development with large language models (LLMs). It extends our earlier AutoControl workflow from rule-based control design to model predictive control.

AutoControl-MPC workflow Overview of the AutoControl-MPC workflow: semantic information extraction, LLM-based model fitting, MPC generation and self-verification.

🚀 Key Contributions

  • End-to-end automation: Each step of MPC development, from understanding the system to generating controller code, runs without manual intervention.
  • Template-driven pipeline: LLMs follow deterministic decision rules to parse semantic building information (e.g., Brick models), identify system models and generate control code.
  • Automatic RC model selection: The LLM generates fitting scripts for candidate RC models (1R1C to 5R4C), tests each one in closed loop and picks the best model from KPIs and user requirements.
  • Self-reflective verification: An LLM agent reads the simulation logs, locates the faulty module and sends revision instructions back to it until the controller passes.

LLM-based RC model auto-selection LLM-based auto-selection of the RC thermal model.

Self-reflective verification workflow Self-reflective verification: simulation outputs are summarized to JSON, checked by the verification agent, and errors are routed back to the responsible module.

📊 Results

The framework was evaluated on two BOPTest virtual test cases: a residential building with a hydronic heat pump (BESTEST_hydronic_heat_pump) and a single-zone commercial building with a hydronic system.

Test caseControllerThermal discomfort (Kh/zone)Energy cost ($/m²)
Hydronic heat pumpBaseline2.960.41
 Manual-MPC0.110.31
 AutoControl-MPC0.000.38
Commercial hydronicBaseline0.120.14
 Manual-MPC0.160.13
 AutoControl-MPC0.110.13

Control results in the heat pump case Control results in the BESTEST_hydronic_heat_pump case: indoor temperature, thermal discomfort, energy cost and control signal.

Self-verification raised the success rate of generating a working controller from 58% to 82% in the heat pump case, and from 40% to 66% in the commercial case.

Success rate with and without self-verification Success rate with and without self-verification.

AutoControl-MPC achieves control performance comparable to, and in some cases better than, an expert-developed MPC controller. The results show that LLMs can automate control development for complex building energy systems.

Figures reproduced from Hu et al., Energy and Buildings, 2026.