Large Language Model-Based Method for HVAC System Control Code Automatic Generation

The control code is an essential part of achieving energy-saving control in HVAC systems. Although there are existing methods for automatically generating control code, these methods still largely rely on expert knowledge for intervention. HVAC systems are highly personalized, with varying types of equipment, different quantities of equipment, and diverse data transmission protocols, all of which still require manual processing, resulting in low efficiency and a strong dependence on human input. To address this challenge, a method based on large language models is proposed. The basic idea is to leverage the understanding, reasoning, and coding capabilities of large language models, provide sufficient information to the model using the RAG (Retrieval-Augmented Generation) technique, and validate the accuracy of the code through a simulation model. By iterating repeatedly, the accuracy of the code is improved, ultimately enabling the automatic generation of control code. The evaluation used 173 laboratory rooms from an actual project to verify the efficiency and accuracy of this method. The results show that this method is highly efficient, processing a single room in just 5 min, and performs well under project-specific conditions, with a code generation accuracy of 97.1%.

Authors

Institutions

Publication Details

Journal
Buildings
Published
2026-04-27
DOI
https://doi.org/10.3390/buildings16091722
Primary Topic
Building Energy and Comfort Optimization
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Large Language Model-Based Method for HVAC System Control Code Automatic Generation

Jiahua Huang, Jie Lu, Ke Xia, Ruiqin Jiang
Buildings
Building Energy and Comfort Optimization
article

Large Language Model-Based Method for HVAC System Control Code Automatic Generation

Jiahua Huang, Jie Lu, Ke Xia, Ruiqin Jiang
article en

Abstract

The control code is an essential part of achieving energy-saving control in HVAC systems. Although there are existing methods for automatically generating control code, these methods still largely rely on expert knowledge for intervention. HVAC systems are highly personalized, with varying types of equipment, different quantities of equipment, and diverse data transmission protocols, all of which still require manual processing, resulting in low efficiency and a strong dependence on human input. To address this challenge, a method based on large language models is proposed. The basic idea is to leverage the understanding, reasoning, and coding capabilities of large language models, provide sufficient information to the model using the RAG (Retrieval-Augmented Generation) technique, and validate the accuracy of the code through a simulation model. By iterating repeatedly, the accuracy of the code is improved, ultimately enabling the automatic generation of control code. The evaluation used 173 laboratory rooms from an actual project to verify the efficiency and accuracy of this method. The results show that this method is highly efficient, processing a single room in just 5 min, and performs well under project-specific conditions, with a code generation accuracy of 97.1%.

BuildingsVol. 16(9)
Zhejiang Province Institute of Architectural Design and Research (CN), Community Health Center (US), Institute of Refrigeration (GB)
Affordable and clean energy
Openalex Percentile: Top 6%
Building Energy and Comfort Optimization
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.