Building climate controllers trade energy against occupant comfort, and they make that trade well only if their model of the building is accurate. Real buildings are assembled from parts: rooms, walls, valves, air handlers, boilers. Modelling libraries already describe them as nested modules connected at interfaces. When it comes to fitting the unknown physical parameters, though, the usual approach flattens everything into one big system of differential equations. It then fits that system either by repeatedly simulating it ("solve and compare"), which is slow, or by gradient matching. Gradient matching means smoothing the measured signals, reading off their time derivatives, and choosing parameters so the model's predicted rates of change agree with those derivatives. It never runs a simulator. Flattening throws away the modular structure. When one valve is replaced, the whole building has to be refit. And the algebraic conservation laws that connect components (heat-flow balances, mass-flow balances) have to be eliminated by hand before any gradient-matching method can be applied.
We propose to do the gradient matching inside each component and to treat the signals passing between components as shared latent quantities. A light consensus step at each level of the hierarchy forces neighbouring components to agree on the heat and mass they exchange. The result is a nonlinear, modular building model that can be fit without numerical integration, re-fit locally when a part changes, and used inside a predictive controller with an explicit comfort-violation budget. The test that matters is whether this model beats purely data-driven linear predictive control on the energy–comfort curve in regimes where the building behaves nonlinearly, such as strong solar gain, radiative exchange, or valve saturation.
Core Claim
Gradient matching becomes a compositional estimator if three things hold. Each component owns a small regression problem over its own states. Interface signals are given smooth Gaussian-process (GP) priors that both neighbours share. The algebraic coupling equations are enforced as a penalty rather than solved at every step. Under these conditions, parameter estimates match those of a flattened fit when interfaces are well observed. They stay usable when some interfaces are unmeasured, which is exactly where cheap per-component simulation breaks down. And re-fitting after a component swap costs only the swapped module plus one consensus pass.
The four research directions play different roles here. Hierarchical composition is the core mechanism. Avoiding numerical integration is the reason the inner estimator is gradient matching rather than simulation. Nonlinearity is the regime where the payoff should appear. The energy–comfort trade-off is the yardstick.
Concretely, consider a component $c$ with states $x_c$, incoming interface signals $w_c$ (for example, supply-water temperature, or heat flux from an adjacent wall), and parameters $\theta_c$. Its local objective, in the spirit of the ODE-informed regression of ODIN, is
$$ J_c = \mathcal{L}_{\text{GP}}(x_c, w_c) + \mathcal{L}_{\text{data}}(x_c, y_c) + \frac{1}{\gamma_c}\big\| \dot{x}_c - f_c(x_c, w_c, \theta_c) \big\|^2 . $$
Here $\mathcal{L}_{\text{GP}}$ is the GP smoothness penalty on the state and interface trajectories, $\mathcal{L}_{\text{data}}$ is the misfit to that component's sensors $y_c$, $\dot{x}_c$ is the GP-implied derivative, and $\gamma_c$ is ODIN's adaptive slack. The slack tightens when the component's equations fit the data and loosens when they are misspecified. The module one level up minimizes $\sum_c J_c + \rho \sum_{(c,c')} \| g_{cc'}(x_c, w_c, x_{c'}, w_{c'}) \|^2$. The functions $g_{cc'}$ are the algebraic balance equations on each connection, such as "heat leaving the wall equals heat entering the room", and $\rho$ is a penalty weight that increases over iterations. Each module then exposes only its boundary signals to its parent, so the same structure repeats at every level.
Relation to Prior Work
Prior work on gradient matching motivates the inner estimator and constrains how it can be built. Calderhead et al. showed that GP gradient matching avoids the integration bottleneck: 10× faster on FitzHugh–Nagumo and 400× on the Monk delay equation. Wenk et al.'s FGPGM and Macdonald et al. showed that naive product-of-experts formulations are unsound: properly normalized, the parameters decouple from the data. That rules out simply multiplying per-component likelihoods together. We therefore adopt ODIN's optimization formulation, which reports about 13 s on Lotka–Volterra against 3,100 s for FGPGM and scales linearly up to Lorenz '96 with 1,000 states. All three papers assume a single explicit vector field $\dot{x} = f(x,\theta)$. None handles algebraic interface constraints or modular re-fitting, and that is the gap we fill.
Modelling libraries supply the component structure and the testbeds. Cauchi et al.'s modular building-automation library (with its stochastic companion) composes boilers, air handlers, valves and zones into bilinear, mode-switching networks, but identifies their parameters offline from testbench data. OpenBuild turns EnergyPlus inputs into modular linear resistor–capacitor models. It reports 1.12 °C RMSE against EnergyPlus over two winter weeks, and its authors acknowledge that the linearization degrades under strong solar radiation. BondGraphs.jl shows that energy-port interfaces make modules swappable. We reuse that interface discipline, but for estimation rather than simulation.
The controller side constrains our claims. DAD-DPC predicts from Hankel matrices built from past trajectories, a construction justified by Willems' lemma, which assumes linear time-invariant dynamics (Berberich et al.). It adds conformal safety buffers, adapted online to a user-set violation rate. It is the strongest energy–comfort result in the file, and we keep its violation-budget mechanism intact so that only the predictor changes. Li, Xu and Liu handle the nonlinear comfort index with piecewise-affine pieces and distributed ADMM, but assume known, fixed physics in a flat zone network. Köhler et al.'s adaptive economic MPC gives nonlinear performance guarantees only for models that are linear in their parameters. Many building components (conduction, convection, and even radiative exchange $\propto \varepsilon(T_1^4 - T_2^4)$) are linear in their coefficients, which makes it a natural follow-up. We do not claim closed-loop stability guarantees in this proposal. Lavaei et al. compose abstractions of known nonlinear subsystems for verification. Our work is the missing step before theirs: obtaining the subsystem models from data.
Research Program
The first stage builds the estimator. We will extend ODIN to semi-explicit index-1 component models, in which the algebraic variables are interface signals. We will implement the penalty/consensus outer loop with an increasing $\rho$, and define the recursion that collapses a fitted module into an interface-only object for its parent. We will also analyse a simple identifiability condition. A component's parameters are locally identifiable from its own sensors plus its interface priors exactly when they would be identifiable with the interfaces measured, up to the posterior width of the GP on those interfaces. This tells practitioners which interfaces they must instrument.
The second stage quantifies cost. We measure wall-clock time for the initial fit and for re-fitting after a single component is swapped, and how both scale with the number of components.
The third stage closes the loop. The fitted nonlinear composed model replaces the Hankel predictor inside DAD-DPC's conformal violation-budget controller. We solve it with sequential quadratic programming, warm-started from the previous control step, and accept a slower solve than DAD-DPC's 6–11 ms because building control steps are minutes long.
Baselines
The naive reference is the default baseline building controller in BOPTEST, which is the reference against which DAD-DPC's savings are reported. A second simple reference is OpenBuild's linear resistor–capacitor model with nominal MPC under the same violation-budget wrapper. That comparison isolates whether nonlinearity matters at all.
The strongest existing controller is DAD-DPC. At a 5% violation setting it reports energy savings of 30.1% (residential heat pump), 11.2% (single-zone school) and 27.1% (multi-zone office) on BOPTEST, and 20.5% on the EPFL Polydome (Shi et al.). Relative to nominal data-driven predictive control, it also reduces comfort violations by 39.8–79.6% at a 2.8–5.0% energy cost. We will rerun it ourselves on the same BOPTEST cases, weather years and training-data window. It gets the same amount of excitation data our estimator sees, and its Hankel depth and conformal calibration split are tuned over a grid of equal size to our tuning of $\rho$ and GP length-scales. Beating it means one of two things at matched realized violation rate. Either we show higher energy savings in the multi-zone and residential cases, or we show equal savings with the target violation rate reached faster and held during high-solar weeks, where we expect the linear predictor's conformal buffer to inflate.
On the estimation side, the strongest competitor is flattened ODIN, applied after the algebraic variables have been eliminated by hand. A second competitor is solve-and-compare least squares with a stiff integrator. We also run two ablations that isolate the key ingredients. In the first, per-component regression uses finite-difference derivatives instead of GP smoothing. In the second, consensus is replaced by plugging in raw interface measurements. For parameter accuracy on the Cauchi building library and on OpenBuild-derived models, the file contains no reported result for gradient-matching or flattened-ODIN baselines, so those numbers will be produced fresh under identical noise and sampling.
Why not just…?
Why not just flatten the model and run ODIN once? ODIN already scales linearly to 1,000 states (ODIN), so in raw accuracy this is a real threat, and we expect near-parity when the algebraic equations can be eliminated cleanly. The compositional estimator has to earn its place elsewhere. One test is re-fit cost after a component swap, which flattened ODIN pays globally. The other is nonlinear couplings where elimination is not explicit, such as pressure-dependent valve flows. If flattened ODIN matches us on both, the modular contribution reduces to bookkeeping, and we will report it as such.
Why not just fit each component separately by simulating it with its measured boundary signals? Once interfaces are measured, each component is small and cheap to integrate, so the gradient-matching speed advantage largely disappears. We expect this method to tie ours when every interface is instrumented. Our experiments therefore sweep the fraction of interfaces that are measured, from all to about half. The claim is that per-component simulation degrades as interfaces disappear, because the unmeasured inputs it needs must then be inferred jointly, which re-couples the components. Consensus gradient matching should degrade more slowly. If it does not, we drop the gradient-matching claim.
Why not just keep DAD-DPC and collect more data? A Hankel predictor's linear time-invariant foundation does not improve with more data when the dynamics are nonlinear (Berberich et al.). Its conformal buffer can absorb the mismatch, but only by widening and spending energy. Collecting more data also cannot help after a retrofit, since the old trajectories describe a building that no longer exists. The swap experiment below tests this directly.
Proposed Experiments
Estimation is evaluated on the Cauchi library's 4-state two-zone and 7-state thermal-network models, extended with a radiative wall component. It is also evaluated on OpenBuild-generated multi-zone models with nonlinear solar and radiative terms added, using EnergyPlus as ground truth. Lotka–Volterra serves as a sanity check against ODIN's reported runtime. Metrics are parameter RMSE, held-out multi-step prediction RMSE (compared against OpenBuild's 1.12 °C for the linear model), and wall-clock time for the initial fit and for re-fitting. The decisive estimation check is the curve of prediction error against the fraction of measured interfaces, plotted for consensus gradient matching, per-component simulation and flattened ODIN.
Control is evaluated on the BOPTEST residential heat-pump and multi-zone office cases. Metrics are energy, realized comfort-violation rate, and days to converge to the target rate, all compared with DAD-DPC at 5% and 2.5% violation targets. Results are reported separately for high-solar and ordinary weeks.
The decisive control check is a mid-season swap: the heat-pump or valve characteristic is changed partway through the season. Our method re-fits one module from roughly a day of data. DAD-DPC must rebuild its trajectory library. We compare the energy and violations accumulated during recovery. If the nonlinear composed model shows no advantage over DAD-DPC in high-solar weeks or after the swap, then the case that nonlinearity matters for the energy–comfort curve fails. The estimator could still be useful for building models, but not as a route to better control.
References
- ODIN: ODE-Informed Regression for Parameter and State Inference in Time-Continuous Dynamical Systems
- Accelerating Bayesian Inference over Nonlinear Differential Equations with Gaussian Processes
- Fast Gaussian process based gradient matching for parameter identification in systems of nonlinear ODEs
- Controversy in mechanistic modelling with Gaussian processes
- Benchmarks for cyber-physical systems: A modular model library for building automation systems
- Benchmarks for stochastic models from building automation systems
- OpenBuild : An integrated simulation environment for building control
- BondGraphs.jl: composable energy-based modelling in systems biology
- Disturbance-Adaptive Data-Driven Predictive Control: Trading Comfort Violation for Savings in Building Climate Control
- Data-Driven Model Predictive Control with Stability and Robustness Guarantees
- Distributed Model Predictive Control for Energy and Comfort Optimization in Large Buildings Using Piecewise Affine Approximation
- Adaptive Economic Model Predictive Control: Performance Guarantees for Nonlinear Systems
- Compositional construction of infinite abstractions for networks of stochastic control systems