An LLM-Based Digital Twin for Optimizing Human-in-the Loop Systems

Hanqing Yang, Marie Siew, Carlee Joe-Wong · DOI

Introduction

Heating, Ventilation, and Air-Conditioning (HVAC) systems represent a significant portion of global energy consumption, approximately 36%. Current management strategies often rely on static set-point control—maintaining a constant temperature regardless of occupancy or individual preferences. While Human-in-the-Loop (HITL) systems offer a path toward adaptive, efficient control, they are hindered by the difficulty of collecting high-quality, non-invasive human preference data in real-time.

This paper introduces AitL-RL (Agent-in-the-loop Reinforcement Learning), a framework that leverages Large Language Models (LLMs) to bridge this data gap. By creating "digital twins" of human behavior, the framework simulates realistic population dynamics and thermal preferences, enabling the training of Reinforcement Learning (RL) agents for HVAC optimization without compromising user privacy or requiring extensive real-world data collection.

The AitL-RL Framework

The AitL-RL framework consists of a sophisticated simulation engine and an RL-based controller. The core innovation lies in using LLMs as proxies for human agents within a simulated environment.

Overview of the AitL-RL framework, illustrating the integration of an LLM-based digital twin with a Reinforcement Learning agent to optimize HVAC control.

LLM-Based Digital Twin

The digital twin simulates a complex environment, such as "Happy Mall," designed using GPT-4. Within this environment, GPT-3.5 simulates 14 distinct population groups, including "Teen Shoppers," "Senior Shoppers," and "Remote Workers."

The simulation operates on a 30-minute cycle where the LLM determines:

  1. Movement: The distribution of various groups across different stores based on time-of-day and persona-specific behaviors.
  2. Thermal Feedback: Simulated agents "vote" to increase, decrease, or maintain the current temperature based on their pre-defined comfort profiles and the current indoor climate.

Reinforcement Learning for HVAC Control

A Deep Q-Learning (DQN) agent is trained to manage the HVAC system. The agent's state space includes human votes, occupancy levels, time, and external/internal temperatures. The reward function is a weighted sum of UserComfort (derived from agent votes) and EnergyUsage (calculated via physical heat transfer equations). The framework supports both Centralized Control (a single temperature for the entire facility) and Distributed Control (independent settings for individual zones/stores).

Experimental Results

The AitL-RL policy was evaluated against standard fixed set-point baselines. The results demonstrate that the RL agent consistently outperforms static controls by dynamically adjusting to simulated occupancy and preferences.

Training performance of Centralized vs. Distributed control across different reward weightings (Balanced, Comfort-focused, and Energy-focused).

Key findings include:

  • Distributed Control Superiority: Distributed control yielded significantly better outcomes in both comfort and energy efficiency compared to centralized control. This allows the system to aggressively cool high-traffic areas while saving energy in low-activity zones.
  • Balanced Optimization: Agents trained with balanced weights for energy and comfort achieved the highest overall performance scores.
  • Realistic Behavioral Modeling: Qualitative analysis of the simulation showed that LLMs successfully captured realistic human patterns, such as families peaking in the early afternoon and retail employees maintaining a steady presence.

Conclusion and Future Directions

AitL-RL demonstrates the potential of LLMs to serve as high-fidelity proxies for human behavior in complex cyber-physical systems. This approach provides a privacy-preserving method for training HITL systems. Future work will focus on validating these simulations against real-world datasets to bridge the "sim-to-real" gap and exploring the use of Retrieval-Augmented Generation (RAG) to ground LLM behaviors in empirical sociological data.

Summary updated

BibTeX
@misc{yang2024llm,
  author = {Hanqing Yang and Marie Siew and Carlee Joe-Wong},
  title = {{An LLM-Based Digital Twin for Optimizing Human-in-the Loop Systems}},
  year = {2024},
  eprint = {2403.16809},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.16809},
}
Figure