  Flexible district heating grids form an important part of future, low-carbon
energy systems. We examine probabilistic state estimation in such grids, i.e.,
we aim to estimate the posterior probability distribution over all grid state
variables such as pressures, temperatures, and mass flows conditional on
measurements of a subset of these states. Since the posterior state
distribution does not belong to a standard class of probability distributions,
we use Markov Chain Monte Carlo (MCMC) sampling in the space of network heat
exchanges and evaluate the samples in the grid state space to estimate the
posterior. Converting the heat exchange samples into grid states by solving the
non-linear grid equations makes this approach computationally burdensome.
However, we propose to speed it up by employing a deep neural network that is
trained to approximate the solution of the exact but slow non-linear solver.
This novel approach is shown to deliver highly accurate posterior distributions
both for classic tree-shaped as well as meshed heating grids, at significantly
reduced computational costs that are acceptable for online control. Our state
estimation approach thus enables tightening the safety margins for temperature
and pressure control and thereby a more efficient grid operation.
