Physically Consistent Neural Networks for building thermal modeling: theory and analysis

Loris Di Natale, Bratislav Svetozarevic, Philipp Heer, Colin N. JonesApplied Energy 2021

Abstract

Researchers have developed a novel architecture called Physically Consistent Neural Networks (PCNNs) that blends the expressiveness of deep learning with the reliability of physics-based models. By hard-coding thermodynamic constraints into the network's structure, PCNNs achieve up to 40% better accuracy than traditional models while guaranteeing they won't make "physically impossible" predictions on unseen data.

Introduction

Building energy consumption accounts for nearly 30% of global end-use energy. To optimize heating and cooling via advanced methods like Reinforcement Learning (RL), we need accurate thermal models. Currently, engineers face a trade-off between two extremes:

  1. White-box models (physics-based) are reliable and follow thermodynamic laws but are tedious to calibrate and often lack the "expressiveness" to capture complex, non-linear building dynamics.
  2. Black-box models (Neural Networks) are highly accurate on training data but suffer from generalization issues. For instance, a network trained only on winter data might erroneously predict that cooling increases room temperature because it has never encountered those specific conditions.

This research introduces a model that is as flexible as a neural network but as physically grounded as a textbook equation.

Methodology: The PCNN Architecture

The PCNN is a hybrid architecture that splits temperature prediction ($T$) into two latent components to balance physical constraints with data-driven flexibility.

The PCNN architecture separates unforced dynamics (D) from the energy accumulator (E) to ensure physical consistency.
  • The Energy Accumulator ($E$): A linear, physics-inspired module. It handles "known" physics: controllable inputs (heating/cooling) and heat losses to the outside or neighboring zones. It uses simple scaling parameters ($a, b, c, d$) representing physical properties like thermal resistance.
  • Unforced Dynamics ($D$): A nonlinear black-box module (specifically an encoder-LSTM-decoder). This captures complex building behavior such as solar gains and occupancy patterns that are difficult to model with simple equations.

By structuring the equations this way, the model is physically consistent by design. The authors mathematically prove that the partial derivative of predicted temperature with respect to heating power is always positive. Unlike other "physics-informed" models that merely penalize physical violations in the loss function, PCNNs are architecturally incapable of violating these specific laws.

Experimental Setup

The researchers utilized over three years of operational data from the NEST building in Dübendorf, Switzerland, specifically the UMAR (Urban Mining and Recycling) unit. Features included solar irradiation, ambient temperature, neighboring zone temperatures, and heating/cooling power. Because the unit used a single power meter for multiple rooms, a disaggregation algorithm based on valve opening times was employed to estimate individual room consumption.

Key Results and Discussion

The PCNN demonstrated significant improvements over both traditional physics-based and pure deep learning approaches.

Comparison of temperature predictions across different models. The PCNN (ours) maintains physical reliability across varying power inputs compared to the classical LSTM.
  • Superior Accuracy: Over a 3-day prediction horizon, the PCNN achieved 40% higher accuracy than a baseline physics-based RC (resistance-capacitance) model.
  • Robust Generalization: While standard LSTMs showed lower error on training data (indicating overfitting), the PCNN performed better on validation data. It successfully captured the impact of heating and cooling even in extreme scenarios (e.g., temperatures above 30°C) rarely seen in the training set.
  • End-to-End Training: Despite its physics-based component, the entire PCNN is trained using standard backpropagation. The model learns physical constants directly from data, removing the need for manual engineering of thermal resistances.

Limitations and Future Work

Currently, solar gains are handled by the black-box module ($D$) due to their non-linear relationship with room temperature. Future iterations aim to provide formal physical consistency guarantees for solar inputs as well. Additionally, the authors plan to scale the architecture from single-zone residential settings to multi-zone "Digital Twin" applications for comprehensive building management.

Summary updated

BibTeX
@misc{natale2021physically,
  author = {Loris Di Natale and Bratislav Svetozarevic and Philipp Heer and Colin N. Jones},
  title = {{Physically Consistent Neural Networks for building thermal modeling: theory and analysis}},
  year = {2021},
  eprint = {2112.03212},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.03212},
}
Figure