# Opportunities for Machine Learning in District Heating
## 5 Gaps between Industrial District Heating Needs and Current Machine Learning Research
### Cost-Benefit Analysis  
The disconnection between the ML demand forecasting research and the business of running a heat network is clearly seen in the choice of metrics used by forecasting papers. Almost all used metrics (the most common being Root Mean Square Error (RMSE) and Mean Absolute Percentage Error (MAPE)) are symmetric, i.e., they penalise overestimations and under-estimations equally. However, from a DH perspective, there is a considerable difference between the two errors. Over-estimation of the demand leads to some amount of energy waste, while under-estimation makes the district heating network fail at its primary function, i.e., to provide sufficient heat to the customers. The latter situation is unacceptable and the forecasting must take this into account. To be able to trim the margins of production, one would need to understand the statistical distribution of demand and how it evolves over time, with some degree of confidence. Hence, there is room for research on facilitating a cost-benefit analysis of provisioning the network, the suitable choice of metrics and forecast methods taking the refined metrics into account. In the review, we have found no study comprehensively addressing this issue. Ultimately, the goal is to minimise the operation costs of the network as a whole, while ensuring heat delivery to all the customers according the contracts. Clearly, while accurate demand forecasting is an important piece in this puzzle, these potential benefits will not be realised without using the forecasts to _control_ the network. In our literature review, few papers have made this connection. From that perspective, the forecasting itself is severely over-researched, often without the exact purpose mentioned, or with it being expressed only vaguely. At the same time, many other important aspects are ignored. At a high level, a DH network control algorithm is supposed to, for a specified time horizon, decide on the optimal values for all relevant parameters. The most important of those are the operation for different heat sources (which ones to start, and which to shutdown). However, it also includes supply water temperature and pressure, as well as possible differential pressures for pumping stations. This guarantees the timely arrival of a sufficient amount of heat to every customer, with reasonable safety margins, both in terms of energy and time. Automatically controlling the complete network would require dedicated hardware on-site, or excellent footing with the company supplying the Building Management Systems (BMS) or substation controllers. Today, doing it at scale is still expensive and complicated, but many different actors in the market, which include the BMS companies, are feeling the pressure to stay relevant and thus might become more approachable. For example, an optimal bottom-up control of an entire DH grid from many independent BMSs is an interesting long-term goal worth pursuing. While it is relatively easy for a research group to negotiate with a heat provider for access to (anonymised) primary side data, gaining access to a large number of indoor temperature readings often requires a considerable effort in the form of negotiating with building owners, mounting adequate sensors and actuators throughout the buildings, connecting everything to the internet, managing privacy consideration, etc. This will hopefully improve with more streamlined IoT solutions, but today, it still presents a serious obstacle. Another aspect is the challenge to decide on an objective function for model predictive control. In simulations, this is often simplified into keeping the indoor temperature at, for example, \(21\pm 1\) \"C, but the indoor temperatures can vary much more depending on time of year, time of day, weather and social behaviours. While there are standards providing guidance on thermal comfort assessment, such as EN ISO 7730 or ANSI/ASHRAE Standard 55, it is unclear how to valuate indoor climate changing over time, and more research is needed.