← The Smart Buildings Control Suite

PI-ModNN: a physics-informed modular building model

The suite's third component is a physics-informed modularized neural network (PI-ModNN) that learns a building's thermal dynamics from data while respecting physical laws, so it can serve as a safe training environment for reinforcement learning agents. This page summarizes the model, how it is evaluated, and what we found. It builds on Jiang & Dong, Patterns 2024, which has the full method.

Key findings

Framework

Measured data (HVAC operation, indoor conditions, weather and occupancy) are used to train the PI-ModNN. The model is checked for accuracy and physical consistency, then used as a virtual environment for offline training of a deep RL agent (soft actor-critic). The trained agent is deployed in the real building through the building management system.

Framework: testbed data feeds the PI-ModNN, which trains a soft actor-critic agent offline before online deployment
Overall PI-ModNN–DRL learning framework.

Testbed and data

The testbed is a student office (maximum occupancy 10) served by a dedicated AHU–VAV system. HVAC data were collected over BACnet, and space temperature, solar radiation, outdoor temperature and occupancy counts through an API, at 15-minute intervals from September 2022 onward. After the office was vacated in 2024, heat lamps (150 W per simulated occupant) were used to reproduce internal heat gains.

Testbed photos: office, people-counting sensor, heat lamp, data collection
Testbed setup: (A) testbed, (B) people-counting sensor, (C) heat lamp, (D) data collection.

Model

The model is a state-space time stepper that predicts space air temperature for multiple steps ahead from outdoor temperature, solar radiation, time features, HVAC thermal load and past temperatures. Following the discretized heat balance, separate modules estimate each heat-flow term, and a residual connection adds the learned heat input to the previous state:

ModuleNetworkRole
External heat transferRNNEnvelope heat exchange; the hidden state captures thermal inertia
Internal heat gainsMLPSchedule-like gains from occupants, lighting and equipment
HVACMLPMaps control inputs to HVAC heat transfer
Thermal dynamicsMLPLearns the unknown thermal capacity and integrates heat flow over time
Encoder-decoder structure of the PI-ModNN with external, internal and HVAC modules
PI-ModNN structure (encoder–decoder).

Physics enters the model in three ways:

Evaluation

Each model is evaluated on three axes:

Five configurations were compared (an LSTM baseline and PI-ModNN with and without the loss and the constraints), each trained 30 times on 7, 30, 90, 180 and 300 days of data and tested on August 2024.

Results

Box plots of MAE and temperature-response violations versus training days for five models
Model comparison across training-set sizes: (A) accuracy (MAE), (B) physical consistency (TRV).

All models are accurate, but they differ sharply in consistency. Models with hard constraints have zero violations at every training-set size. The LSTM's violations grow as training data become more diverse (both seasons, varied occupancy), because it learns statistical correlations rather than the underlying heat transfer.

Predicted temperature under HVAC inputs from -4 to +4 kW for PI-ModNN and LSTM
Temperature response to HVAC inputs from −4 kW (cooling) to +4 kW (heating): (A) PI-ModNN responds correctly; (B) the LSTM's prediction barely changes.
Value of prior knowledge for accuracy and consistency across training days
Value of each physics prior for (A) accuracy and (B) consistency.

Physics priors mattered most for consistency. Structural priors needed enough data to pay off, the hard constraint helped consistently, and the knowledge-guided loss was mostly neutral or negative. Priors therefore need to be chosen and validated, not assumed beneficial.

In the benchmark

In the paper, the PI-ModNN is trained on SB4 data (January 2023 to August 2024). Its modular design makes it easy to adapt to new buildings: modules can be swapped (for example, an RNN HVAC module for hydronic systems with thermal lag) or driven by alternative inputs when sensors are missing.