Heating, Ventilation, and Air Conditioning (HVAC) Temperature and Humidity Control Optimization Based on Large Language Models (LLMs)
Abstract
1. Introduction
- Traditional HVAC control methods, such as on–off control, fail to account for the thermal dynamics of the building, resulting in frequent switching, increased energy consumption, and difficulty in meeting control objectives. PID control, while effective in minimizing error, lacks predictive decision-making capabilities and struggles to manage multiple optimization targets simultaneously.
- Model Predictive Control (MPC) has its own limitations, as current studies primarily focus on optimizing objective functions and solving algorithms, neglecting mechanisms for learning from previous control actions. Additionally, MPC’s reliance on complex calculations for real-time optimization imposes a heavy computational burden, which reduces its practical applicability. While designing constraints and cost functions for different operating conditions can mitigate the computational load, it increases development costs and implementation complexity. Furthermore, the current reliance on expert knowledge for high-level control decision-making requires extensive historical data and domain-specific expertise.
- Artificial intelligence approaches can be applied to HVAC optimization; however, the training data often fail to cover the entire operational range, leading to poor generalization, particularly in rare weather conditions. The lack of interpretability in reinforcement learning (RL) decision-making processes remains a major barrier to widespread industrial application. Moreover, the deployment of RL in real-world buildings is limited, with only 23% of studies addressing real-world environments, indicating that issues of safety and reliability still need to be addressed.
2. Methodology
2.1. The HVAC System
2.2. MPC Controllers
2.3. The MPC Framework Integrated with the Large Language Model (LLM)
- Environmental Information Parsing: The LLM extracts current operating conditions from sensor data, including outdoor and indoor temperature and humidity, supply air temperature, and the operational status of the pre-cooling air handling unit.
- State Evaluation and Pattern Recognition: Based on the input environmental data and utilizing the HVAC domain knowledge base and historical interaction data, the LLM identifies the current operational mode (e.g., cooling and dehumidifying, heating and humidifying, etc.).
- Control Strategy Generation: Based on the state evaluation, the LLM generates targeted optimization strategies through chain-of-thought reasoning. This primarily involves adjusting the weights of the MPC objective function to accommodate the control demands of different operating conditions (e.g., in high-humidity situations, even if the temperature has reached the control target, the system will still prioritize using the AHU’s cooling coil for humidity control, while guiding the PAU unit to reduce the supply air temperature to enhance dehumidification).
- Decision Conversion and Execution: The textual decisions generated by the LLM are parsed into numerical control instructions through function analysis and transmitted to the MPC for execution.
3. Case Study
3.1. Simulation Arrangement
3.2. Discussion
4. Conclusions
- The study focuses on a specific operating room environment, where modeling parameters, control objectives, control methods, and system operation modes are standardized. Therefore, the proposed method may not be directly applicable to HVAC systems in other types of buildings. Traditional HVAC systems typically operate based on predefined control logic, and integrating the LLM-optimized MPC method with existing control frameworks presents a significant challenge for practical implementation.
- In terms of computational complexity and real-time performance, generating complex control decisions requires a certain processing time for LLM inference and response. Optimizing the execution process to enhance the real-time performance of the control system is another critical challenge for practical applications.
- For broader and more complex control scenarios, the capability of LLMs to generate reasonable control decisions requires further research and validation. Challenges remain regarding the adaptability, generalization ability, and handling of uncertainties in more complex HVAC systems, necessitating further experimental and theoretical investigations.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
Symbols | Subscripts | ||
ρ | Density, kg/m3 | w | Water |
c | Specific heat capacity, J/kg·°C | L | Outlet side |
A | Area, m2 | E | Inlet side |
l | Heat exchanger coil length, m | gw | Between the water and the outer surface of the finned heat exchanger |
t | Temperature, °C | i | Inner surface of the heat exchanger tube |
G | Mass flow rate, kg/s | g | Shell-and-tube heat exchanger tube wall |
a | Heat transfer coefficient, W/(m2·°C) | a | Air |
h | Enthalpy, J/kg | ga | Between the air and the outer surface of the finned heat exchanger |
ε | Heat exchanger air rate | o | Outer surface of the heat exchanger tube |
b | Width, m | m | Heat exchanger fins |
qr | Latent heat of condensation, J/kg | gb | Air near the wet-condition fin surface of the heat exchanger |
λ | Mass transfer coefficient, kg/(m2·s) | n | Operating room |
W | Humidity ratio, kg/kg | s | Air supply outlet of the circulation unit |
References
- Wang, X.; Cai, W.; Lu, J. Model-based optimization strategy of chiller driven liquid desiccant dehumidifier with genetic algorithm. Energy 2015, 82, 39–48. [Google Scholar]
- Energy Statistics—An Overview. Available online: https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Energy_statistics_-_an_overview (accessed on 18 June 2024).
- Mandel, T.; Worrell, E.; Alibaş, Ş. Balancing heat saving and supply in local energy planning: Insights from 1970–1989 buildings in three European countries. Smart Energy 2023, 12, 100121. [Google Scholar] [CrossRef]
- Shen, C.; Zhao, K.; Ge, J. Analysis of building energy consumption in a hospital in the hot summer and cold winter area. Energy Procedia 2019, 158, 3735–3740. [Google Scholar]
- Dobosi, I.S.; Tanasa, C.; Kaba, N.-E. Building energy modelling for the energy performance analysis of a hospital building in various locations. E3S Web Conf. 2019, 111, 06073. [Google Scholar] [CrossRef]
- Silva, B.V.F.; Holm-Nielsen, J.B.; Sadrizadeh, S. Sustainable, green, or smart? Pathways for energy-efficient healthcare buildings. Sustain. Cities Soc. 2024, 100, 105013. [Google Scholar]
- Teke, A.; Timur, O. Assessing the energy efficiency improvement potentials of HVAC systems considering economic and environmental aspects at the hospitals. Renew. Sustain. Energy Rev. 2014, 33, 224–235. [Google Scholar]
- Stockwell, R.E.; Ballard, E.L.; O’Rourke, P. Indoor hospital air and the impact of ventilation on bioaerosols: A systematic review. J. Hosp. Infect. 2019, 103, 175–184. [Google Scholar]
- Papadopoulos, S.; Kontokosta, C.E.; Vlachokostas, A. Rethinking HVAC temperature setpoints in commercial buildings: The potential for zero-cost energy savings and comfort improvement in different climates. Build. Environ. 2019, 155, 350–359. [Google Scholar] [CrossRef]
- Fernstrom, A.; Goldblatt, M. Aerobiology and its role in the transmission of infectious diseases. J. Pathog. 2013, 13, 493960. [Google Scholar]
- Paul, N.; Richard, H. Ventilation Standard for Health Care Facilities. ASHRAE J. 2008, 50, 52–58. [Google Scholar]
- Izadi, M.; Afsharpanah, F.; Mohadjer, A. Performance enhancement of a shell-and-coil ice storage enclosure for air conditioning using spiral longitudinal fins: A numerical approach. Heliyon 2025, 11, e42786. [Google Scholar] [CrossRef] [PubMed]
- Al Sayed, K.; Boodi, A.; Broujeny, R.S.; Beddiar, K. Reinforcement learning for HVAC control in intelligent buildings: A technical and conceptual review. J. Build. Eng. 2024, 95, 110085. [Google Scholar] [CrossRef]
- Afram, A.; Janabi-Sharifi, F. Theory and applications of HVAC control systems—A review of model predictive control (MPC). Build. Environ. 2014, 72, 343–355. [Google Scholar]
- Wang, Y.; Shao, Y.; Kargel, C. Demand controlled ventilation strategies for high indoor air quality and low heating energy demand. In Proceedings of the 2012 IEEE International Instrumentation and Measurement Technology Conference, Graz, Austria, 13 May 2012. [Google Scholar]
- Esrafilian-Najafabadi, M.; Haghighat, F. Occupancy-based HVAC control systems in buildings: A state-of-the-art review. Build. Environ. 2021, 197, 107810. [Google Scholar] [CrossRef]
- Yu, L.; Sun, Y.; Xu, Z. Multi-agent deep reinforcement learning for HVAC control in commercial buildings. IEEE Trans. Smart Grid 2020, 12, 407–419. [Google Scholar]
- Song, L.; Zhang, C.; Zhao, L. Pre-trained large language models for industrial control. arXiv 2023, arXiv:2308.03028. [Google Scholar] [CrossRef]
- Huang, G. Model predictive control of VAV zone thermal systems concerning bi-linearity and gain nonlinearity. Control Eng. Pract. 2011, 19, 700–710. [Google Scholar]
- Balan, R.; Cooper, J.; Chao, K.M. Parameter identification and model based predictive control of temperature inside a house. Energy Build. 2011, 43, 748–758. [Google Scholar] [CrossRef]
- Siroky, J.; Oldewurtel, F.; Cigler, J. Experimental analysis of model predictive control for an energy efficient building heating system. Apply Energy 2011, 88, 3079–3087. [Google Scholar] [CrossRef]
- Candanedo, J.A.; Athienitis, A.K. Predictive control of radiant floor heating and solar-source heat pump operation in a solar house. HVACR Res. 2011, 17, 235–256. [Google Scholar]
- Henze, G.P.; Dodier, R.H.; Krarti, M. Development of a predictive optimal controller for thermal energy storage systems. HVACR Res. 1997, 3, 233–264. [Google Scholar]
- Ma, Y.; Borrelli, F.; Hencey, B.; Coffey, B.; Bengea, S.; Haves, P. Model predictive control for the operation of building cooling systems. IEEE Trans. Control Syst. Technol. 2012, 20, 796–803. [Google Scholar]
- Xi, X.; Poo, A.-N.; Chou, S.-K. Support vector regression model predictive control on a HVAC plant. Control Eng. Pract. 2007, 15, 897–908. [Google Scholar]
- Xu, M.; Li, S. Practical generalized predictive control with decentralized identification approach to HVAC systems. Energy Convers. Manag. 2007, 48, 292–299. [Google Scholar]
- Yuan, S.; Perez, R. Multiple-zone ventilation and temperature control of a single-duct VAV system using model predictive strategy. Energy Build. 2006, 38, 1248–1261. [Google Scholar]
- Lu, J.; Tian, X.; Zhang, C. Evaluation of large language models on the mastery of knowledge and skills in the heating, ventilation and air conditioning (HVAC) industry. Energy Built Environ. 2024, 5, 6–14. [Google Scholar]
- Park, J.; Choi, H.; Kim, D. Development of novel PMV-based HVAC control strategies using a mean radiant temperature prediction model by machine learning in Kuwaiti climate. Build. Environ. 2021, 206, 108357. [Google Scholar] [CrossRef]
- Zhao, W.X.; Zhou, K.; Li, J.; Tang, T.; Wang, X.; Hou, Y.; Min, Y.; Zhang, B.; Zhang, J.; Dong, Z.; et al. A survey of large language models. arXiv 2024, arXiv:2303.18223v12. [Google Scholar] [CrossRef]
- Cai, Y.; Zhang, C.; Shen, W. Imitation learning to outperform demonstrators by directly extrapolating demonstrations. In Proceedings of the 31st ACM International Conference on Information & Knowledge Management, Atlanta, GA, USA, 17–21 October 2022; pp. 128–137. [Google Scholar]
- Ahn, M.; Brohan, A.; Brown, N.; Chebotar, Y.; Cortes, O.; David, B.; Finn, C.; Fu, C.; Gopalakrishnan, K.; Hausman, K.; et al. Do as I can, not as I say: Grounding language in robotic affordances. arXiv 2022, arXiv:2204.01691. [Google Scholar] [CrossRef]
- Carta, T.; Romac, C.; Wolf, T.; Lamprier, S.; Sigaud, O.; Oudeyer, P.-Y. Grounding large language models in interactive environments with online reinforcement learning. arXiv 2024, arXiv:2302.02662. [Google Scholar] [CrossRef]
- Chen, L.; Lu, K.; Rajeswaran, A. Decision transformer: Reinforcement learning via sequence modeling. Adv. Neural Inf. Process. Syst. 2021, 34, 84–97. [Google Scholar]
- Chung, W.; Hou, L.; Shayne, L. Scaling instruction-finetuned language models. arXiv 2022, arXiv:2210.11416. [Google Scholar] [CrossRef]
- Yang, S.; Wana, M.; Bing, F. Experimental study of model predictive control for an air-conditioning system with dedicated outdoor air system. Appl. Energy 2020, 257, 113–128. [Google Scholar] [CrossRef]
- Dai, S.; Mo, J.; Yao, Y. Dynamic modeling for surface heat-exchanger based on state-space. J. Refrig. 2012, 33, 11–17. [Google Scholar]
- Yao, Y.; Yang, K.; Huang, M. A state-space model for dynamic response of indoor air temperature and humidity. Build. Environ. 2013, 64, 26–37. [Google Scholar] [CrossRef]
- Zhuang, J. Study on Optimal Control Strategy for HVAC System Based on Model Predictive Method. Master’s Thesis, Beijing Institute of Technology, Beijing, China, 2021. [Google Scholar]
- Sha, H.; Mu, Y.; Jiang, Y. LanguageMpc: Large language models as decision makers for autonomous driving. arXiv 2023, arXiv:2310.03026v2. [Google Scholar] [CrossRef]
- Yao, S.; Yu, D.; Zhao, J. Tree of thoughts: Deliberate problem solving with large language models. arXiv 2023, arXiv:2305.10601. [Google Scholar] [CrossRef]
Location | Sensor | Variables | Specifications | Range | Accuracy |
---|---|---|---|---|---|
Operating room | THPL | Temperature and RH | MN-ENV-THPL | −20 to 85 °C | ±0.25 °C |
0 to 99.99% | ±3% | ||||
HVAC | Combined temp. and RH | Temperature and RH | FG | −10 to 70 °C | ±0.25 °C |
0 to 99.99% | ±3% | ||||
Pressure sensor | Differential pressure | HALO-FY-WG | 0 to 1500 Pa | ±0.5 Pa | |
Pressure sensor | Water pressure | RL-132 | 0 to 500 kPa | ±0.5 kPa | |
Temperature sensor | Water temperature | RL-131 | −10 to 60 °C | ±0.5 °C | |
Outdoor | Combined temp. and RH | Temperature and RH | MN-ENV-THPL | −20 to 85 °C | ±0.25 °C |
0 to 99.99% | ±3% |
Parameter | Value | Parameter | Value |
---|---|---|---|
Operating room volume V, m3 | 114 | Air supply outlet area Aas-an, m2 | 20 |
Specific heat capacity of room wall criw,n, J/(kg·°C) | 1250 | Air convective heat transfer coefficient aas-an, W/(m2·°C) | 5 |
Density of room wall ρriw,n, kg/m3 | 1800 | Pulmonary ventilation rate constant Cres, kg/J | 1.43 × 10−6 |
Specific heat capacity of air ca, J/(kg·°C) | 1005 | Air density ρa, kg/m3 | 1.18 |
Parameter | Value | Parameter | Value |
---|---|---|---|
Coil Length l, m | 15 | Windward Area Aa, m2 | 1.75 |
Inner Radius of the Evaporator Coil Finned Tube ri, m | 0.004 | Finned Tube Pitch of the Evaporator Coil agw, W/(m2·°C) | 0.0024 |
Inner Surface Area of the Evaporator Coil Finned Tube Ai, m2 | 0.5287 | Thickness of the Fins on the Evaporator Coil Finned Tube δc, m | 0.0002 |
Outer Surface Area of the Evaporator Coil Finned Tube Ao, m2 | 8.8065 | Mass of the shell wall of a surface-type heat exchanger Mg, kg | 7.52 |
Dimension along the Air Flow Direction b, m | 0.66 | Specific Heat Capacity of the Evaporator Coil Heat Exchanger Material Cg, J/(kg·°C) | 475 |
States | Description | Inputs | Description |
---|---|---|---|
LΔtw,L | The cooling coil outlet water temperature | LΔGw,E | The cooling coil outlet water flow rate |
LΔta,L | The cooling coil outlet air temperature | HΔGw,E | The heating coil outlet water flow rate |
LΔWa,L | The cooling coil outlet air humidity | ΔGa,E | The coil outlet air flow rate |
HΔtw,L | The heating coil outlet water temperature | ΔGa,s | The operating room intake air flow rate |
HΔta,L | The heating coil outlet air temperature | ||
HΔWa,L | The heating coil outlet air humidity | ||
Δta,n | The operating room temperature | ||
ΔWa,n | The operating room humidity |
Disturbances | Description | Outputs | Description |
---|---|---|---|
LΔtw,E | Cooling coil inlet chilled water temperature | Δta,n | The operating room temperature |
LΔta,E | Cooling coil inlet air temperature | ΔWa,n | The operating room humidity |
LΔWa,E | Cooling coil inlet air humidity | ||
HΔtw,E | Heating coil inlet air temperature |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhu, X.; Li, H. Heating, Ventilation, and Air Conditioning (HVAC) Temperature and Humidity Control Optimization Based on Large Language Models (LLMs). Energies 2025, 18, 1813. https://doi.org/10.3390/en18071813
Zhu X, Li H. Heating, Ventilation, and Air Conditioning (HVAC) Temperature and Humidity Control Optimization Based on Large Language Models (LLMs). Energies. 2025; 18(7):1813. https://doi.org/10.3390/en18071813
Chicago/Turabian StyleZhu, Xuanrong, and Hui Li. 2025. "Heating, Ventilation, and Air Conditioning (HVAC) Temperature and Humidity Control Optimization Based on Large Language Models (LLMs)" Energies 18, no. 7: 1813. https://doi.org/10.3390/en18071813
APA StyleZhu, X., & Li, H. (2025). Heating, Ventilation, and Air Conditioning (HVAC) Temperature and Humidity Control Optimization Based on Large Language Models (LLMs). Energies, 18(7), 1813. https://doi.org/10.3390/en18071813