Differentiable Calibration for Automated, Physics Bounded Collection System Models

Mel Meng

ABSTRACT

Calibration remains a primary barrier to the scalable deployment and long-term maintenance of collection-system digital twins. Manual calibration is labor-intensive and inconsistent. While black-box machine learning can automate parameter fitting, engineering adoption remains limited when model behavior becomes opaque or physically inconsistent outside the training dataset conditions.

We present a physics-bounded, differentiable calibration workflow for SWMM5 collectionsystem models using the RTK method for rainfall-derived inflow and infiltration (RDII). Calibration is formulated as a fully automated, gradient-based optimization loop in which difference of predicted and observed flow are used to directly update (i.e., “nudge”) RTK and routing parameters. This replaces trial-and-error tuning with an end-to-end optimization process implemented in PyTorch.

A differentiable pyTorch surrogate simulator is implemented to support this workflow. RDII is generated using as tensor convolution for RTK unit hydrograph, and the resulting inflows are routed using a differentiable, mass-conservative Muskingum–Cunge network solver. The routing solver acts as a surrogate by calibrating effective parameters—Manning’s n and a storage coefficient (x)—to reproduce SWMM5 routing behavior.

The approach is demonstrated on a synthetic, multi-event benchmark (30 events) following standard SWMM calibration practices. Performance is evaluated using RMSE and NSE aggregated across events, with generalization assessed using unseen storm scenarios spanning short-duration, long-duration, and high-intensity events. Results show that gradient-based calibration achieves high fidelity to SWMM5 targets while maintaining physical consistency.

While these results highlight the potential of physics-bounded, differentiable calibration, the development of fully differentiable, physics-based solvers equivalent to SWMM5 engine remains non-trivial. Implementations within general-purpose frameworks require substantial modeling effort, careful treatment of numerical stability, and further research. Accordingly, this work is intended to demonstrate feasibility and potential value rather than to present a production-ready replacement for existing simulation engines.

 Click here to download a static PDF version of the presentation.


Permanent link: