An operational strategy for district heating networks: application of data-driven heat load forecasts

*Correspondence: armin.golla@kit.edu Karlsruhe Institute of Technology, Kaiserstraße 12, 76131 Karlsruhe, Germany Abstract To face the challenges of climate change, the integration of renewable energy sources in the energy-intensive heating sector is a crucial aspect of emission reduction. For an efficient operation of coupling devices such as heat pumps with intermittent sources of renewable energy, accurate heat load forecasts need to be developed and embedded into an operation strategy to enable further decarbonisation of heat generation. Data analysis driven forecasts based on weather data hold the potential of identifying consumption patterns to forecast day-ahead heat demand and have been studied extensively for electricity demand forecasts. However, it remains to be shown how such forecasts can be applied in district heating systems. In this study, we propose a control strategy that utilizes hourly heat load forecasts with a 24-hours rolling horizon. First, we investigate supervised forecasting techniques on three different heat load data sets. The application of convolutional neural networks on data of the district heating network in Flensburg, Germany delivers the most promising outcome. Elaborating further on this example, we then develop a control strategy and demonstrate how a heat load forecast can be used to improve the utilization of offshore wind generation or reduce energy costs through a heat pump and a heat storage system. Thus, we contribute to the electrification of the heat sector and thereby enable a reduction of carbon emissions.


Introduction
The reality of climate change creates new challenges for our society. To cope with these challenges and to limit global warming to 1.5°C, the European Union implements policies to reduce greenhouse gas emission. While the worldwide share of renewable electricity is constantly increasing and has reached 23.9% in 2018, electricity only accounts for one fifth of the worldwide energy consumption. With 10.3% in 2018, the share of renewables in the heat sector continues to remain at a low level (IEA 2018). To further decarbonize the energy system, an electrification of the heat sector is required. District heating systems are a promising approach to replace individual residential gas and oil heating systems.
With accurate forecasts, the share of renewable energy within the heat sector can be increased, e.g. through the optimal use of a heat pump or the use of excess energy generation from industrial plants. In this paper, we show that accurate forecasts can improve the operation of a heat pump in a district heating network (DHN). Such an operation strategy can be implemented with regards to various objective functions, e.g. with financial or environmental objectives.
The operation of a DHN presents an energy-efficient way to provide heat for residential and industrial buildings. The concept of a DHN is subject to ongoing research in various aspects. Only recently, (Buffa et al. 2019) introduced the 5th generation of DHNs which incorporates low temperature heating and cooling systems. The authors argue that such systems can utilize renewable energy by using excess heat and enhance sector coupling through the use of hybrid substations. According to (Lund et al. 2014), an increase in the share of renewable energy and in the overall energy efficiency of DHNs can be achieved through the extension of an integrated thermal network by inclusion of multiple thermal energy producers. To reach this goal, DHNs have to be integrated in smart energy systems (i.e. electric, gas and thermal grids). This can be enabled by the electrification of the heat supply with electric boilers, heat pumps and heat storages. A crucial component to the efficient operation of a DHN is the provision of the optimal heat generation quantity at any time with a comprehensive heat control management. This includes the analysis and forecast of heat consumption patterns. Such forecasts are important for the general planning of DHNs (Idowu et al. 2016). Heat load forecasts enable the inclusion of volatile renewable energy generation such as solar and wind (Benonysson et al. 1995). By implementing demand-side balancing solutions based on heat forecasts, the share of renewable energy within a DHN can be increased (do Carmo and Christensen 2016). The thermal energy storage in the DHN is a key component to enable a more efficient use of renewable energy in the system. In contrast to battery technologies, heat storage does not typically experience cycle-induced degradation (Alva et al. 2018). For an overview on thermal energy storage systems, please refer to (Zhang et al. 2016).

Related literature
Accurate heat load forecasting has gained momentum within the scientific community over the past few years, with both statistical and machine learning driven methods. Dahl et al. (2017) use an autoregressive forecast model with predicted weather features. The authors introduce ensemble weather forecasts in the operation of district heating systems to create heat load forecasts with dynamic uncertainties. The model is then used to implement an operational strategy for heat exchanger stations. For the applied case study of three area substations, their findings show that systems with smaller capacities benefit most from the use of dynamic uncertainties. In contrast to this paper, the authors do not consider a heat storage system in their control strategy, which adds an important component for the integration of intermittent renewable generation. Hietaharju et al. apply (Hietaharju et al. 2019) a feed-forward artificial neural network (ANN) based on the heat load in the previous period, the outdoor temperature, the hour of the day and a weekend-dummy to produce a 48 hours forecast. The model is tested on data of the DHN in Jyväskylä, Finland, during the heating months of 2013. Both models achieve similar results on the forecast of the overall heat load for 4061 buildings, with slightly better performance of the dynamic implementation. Johansson et al. (2017) test a feed-forward ANN with one hidden layer against a model with randomised decision trees. Both forecast models are trained with historical heat load data and weather forecasts. The models are implemented as online, real-time predictors on the DHN in Rottne, Sweden. They are run once a day at 2 p.m., using all real-time data that is available until then, to predict the next 24 hours. The results on the evaluation from January to March 2016 indicate that on average the decision tree model slightly outperforms the ANN model.
There are more studies on the use of ANNs in the area of short-term heat load forecasting, which do not consider the city level but are rather developed for individual consumption profiles. For example, see Ciulla et al. (2019) for short term load forecasting of non-residential buildings, (Jovanović et al. 2015) for the forecast of heat load of a university campus, (Saloux and Candanedo 2018) for heat load forecast of 52 residential houses and (Idowu et al. 2016) for the analysis of ten residential and commercial buildings. To the best of our knowledge, there is no research in the area of heat load forecasting on city level that also integrates heat storage systems.

Contributions and organization
As presented in "Related literature" section, some research has already been conducted on the topic of heat load forecasts. However, only few authors address the challenge of embedding the heat load forecasts in an operational strategy. Aside from that, most papers either consider only one forecast model or only test it on the dataset of one case study application. Therefore, we propose an evaluation of multiple forecasting methods and use the best suited method in our operation strategy. It is an important subject of future work to develop and compare heat demand forecasting methods, which are benchmarked and validated on a broad range of data sets to demonstrate the potential generalizability of the approach and avoid overfitting (vom Scheidt et al. 2020). This work thus fills the following research gaps: 1. We apply, evaluate and compare supervised data analysis techniques to forecast hourly heat demand with a 24-hours rolling horizon on three datasets. 2. We propose, implement and evaluate a control strategy for a DHN with a heat pump and a heat storage system that utilizes the forecast results in an online optimization and can be applied using varying objective functions. The control strategy is evaluated with regards to grid integration and economic benefits. It is benchmarked against a naive approach without storage and the global optimum.

Forecasting heat load
To effectively evaluate the effects on the operation of a DHN, this work investigates forecasts with different forms of artificial neural networks (ANN). The ANNs are trained based on heat load and weather input data from three use cases. For the weather data, outdoor temperature at hourly resolution is considered. The heat load data follows certain patterns that allow for conclusions about consumer behavior. For instance, there is a higher level of load on working days than there is on non-working days and the daily load follows a characteristic pattern (Gao et al. 2018). In a large network with different types of customers, the daily pattern can be observed more clearly due to balancing effects (Fang 2016).

Artificial neural network forecasts
This study employs different ANN structures. The selected models have recently attracted attention in research on load forecasting as presented in "Related literature" section. Convolutional neural networks (CNNs) have the ability to process time series data and achieve good performances in studies on pattern recognition and forecasting in the context of electricity systems (vom Scheidt et al. 2020). Above that we use an implementation of a feed-forward neural network (FFN) for heat load forecast. We also compare our results to recurrent neural network structures that are used to forecast heat load in other studies, namely gated recurrent units (GRUs) and long-short-term neural networks (LSTMs).

Network structure
The size of the feature set determines the number of neurons in the input layer. We use a multiple output strategy to predict the next 24 hours, thus there are 24 neurons in the output layer. The basic structures of the FFN, LSTM and GRU are evaluated by testing all combinations of the number of hidden neurons and hidden layers dispalyed in Table 1.
The architecture of the CNN is evaluated by testing the combinations of one to four convolutional layers and pooling layers, with the convolutional layers containing 20, 40, 60 or 80 filters and four, eight and twelve kernels. An overview of the tested hyperparameters is given in Table 1.
For the hyperparameter optimization, we use random search, which has shown to find better models and to require less computational time than manual or grid search (Bergstra and Bengio 2012;Larochelle et al. 2007).

Forecast comparison
To increase the validity of the study, the methods are applied to three different datasets. All ANNs are tested on data of the Flensburg DHN. The two most promosing structures, CNN and FFN are then further evaluated on data U.S. National Renewable Energy Laboratory (NREL) and the Sønderborg DHN.
Flensburg DHN Flensburg is a city in Northern Gemany. Its DHN supplies 98% of the households with approximately 600 km of transport pipes. The obtained consumption data is aggregated over all district heating consumers for the years 2014 to 2016 in hourly   Fig. 1 for a week in the heating period. CNN and FFN achieve the best results with one hidden layer, whereas the LSTM and GRU network achieve the best results for network structures with two and three hidden layers.

NREL and Sønderborg DHN
The dataset of the NREL provides heat demand for the research and support facility in Golden, Colorado for 2011 in hourly resolution (U.S. Department of Energy 2011). The facility is a large building complex with 21,000 square feet. The Sønderborg dataset from Denmark contains data from 32 industrial and residential buildings. Individual missing data points of the features or the heat demand are filled with linear interpolation. Table 3 shows the 24 hours forecast performances. Again, CNN and FFN produce nearly the same results, for the NREL, the FFN performs slightly better. As both datasets contain periods with very small or zero heat demand, the MAPE is not suited as a performance measure in this section.

A control strategy for district heating networks
As discussed in "Introduction" section, the key for an increased share of renewable energy in the heat sector lies in the utilization of renewable electricity generation through sector coupling technologies. Integrating intermittent renewable electricity generation into the heat sector requires accurate forecasts and an according heat system operation strategy. This way, heat generated from electricity in times of low heat demand and excess electricity supply can be stored and consumed when consumption of both heat and electricity increase or the availability of renewable electricity generation decreases. This requires us to develop operational strategies that exploit forecasting ability and deal with the uncertainty of forecasting errors. In this section, we propose a strategy for the operation of a heat pump and a connected heat storage within a DHN. We use an online algorithm with a rolling horizon that is able to forecast the next 24 hours with the presented algorithms. Subsequently, the optimal operational decisions for these 24 hours are calculated based on the forecasted demand. The decisions for the present hour t are executed and the process is started again for t + 1 with an adjusted 24 hours forecast and a changed system state. In every time step, the control strategy is used to satisfy the given heat demand. The required heat is either supplied by a heat generator or from the heat storage system. The heat generator can also be used to charge the heat storage. The objective of the control strategy can be adjusted according to individual preferences. We demonstrate the maximization of the integration of renewable energy generation and the minimization of generation costs as two possible objective functions in "Demonstration of the control strategy" section. All variables of the control strategy are explained in Table 4. The objective for the control strategy is to maximize (or minimize) the objective function F that is subject to optimization. The demand within the DHN has to be satisfied in any time step. The constraint for demand and supply balance is given by: The heat storage level in each time step is determined by: ( 2 ) Further constraints are added regarding the maximum capacities and loads for the heat generator and heat storage. Those capacity restrictions are given by: The proposed control strategy can be applied on a DHN structure with a given set of heat generators and operated with forecast heat demand values as derived in "Forecasting heat load" section.

Demonstration of the control strategy
To achieve our second research objective, the control strategy is evaluated on the example of the Flensburg DHN for the year 2016 with regard to grid integration in "Offshore wind generation" and economic benefits in "Cost minimization" sections.
In the given scenario, the entire heat demand of the Flensburg DHN is covered by a heat pump and a heat storage system. The heat pump is able to cover the entire heat demand, while the heat storage has restrictions with regard to size and load capacity. The maximum storage capacity is 1000MWh, the maximum load is 200MW and it is the same for charging and discharging. Thus, it is possible to completely fill or empty the heat storage within 5 hours. Larger and smaller ratios of energy to capacity are possible for the heat storage system. However, a heat storage system that could store more heat than is required for 24 hours would require larger forecast horizons. The hourly efficiency of the heat storage is given by = 0.996 resulting in a 24 hour storage efficiency of around 90%, which is in line with efficiency values for daily heat storage (Sarbu and Sebarchievici 2018). To benchmark the online control strategy, it is compared to a naive algorithm and a global optimization. The naive algorithm does not use the heat storage system and instead generates the heat that is required in every hour using the heat pump. The global optimization assumes perfect foresight and optimizes the use of heat pump and heat storage for the entire operation time horizon at once. For the online operation, we use the 24 hour rolling horizon forecasts generated by the CNN as presented in "Forecast comparison" section.

Offshore wind generation
In the first demonstration, the control strategy is used to improve the grid integration of renewable energy. The objective is to maximize the share of offshore wind energy that is used by the heat pump. In times of peak offshore generation in the German North Sea, the German network is often not able to transmit all generated wind power to the South, where much of the industry is located (Staudt et al. 2018). Thus, encouraging a use of the offshore wind close to its origin can contribute to both an increased share of renewables in the heat system and grid integration of wind power. The objective function is then given by: A high t indicates that a larger portion of the electricity used by the heat pump is consumed in times when the system is served by offshore wind generation. The wind share is determined by the ratio of offshore wind generation and the electric load of the respective transmission system: The data for offshore wind electricity generation g el,w and amount of electric load in the system l el is acquired from the German network operator Tennet and represents generation and load within the network area covered by TenneT TSO BV (2020). The results displayed in Table 5 show that the online control strategy is able to achieve a share of offshore wind utilization in heat generation of 10.90%, which is nearly 20.5% higher than with a naive approach and only 0.3% worse than the global optimization with perfect foresight.
An exemplary three-day operation period in January 2016 for the control strategy is depicted in Fig. 2. The heat storage system is used very regularly to maximize the share of wind generation in the energy mix. A comparison of the heat pump operation is shown in Fig. 3 for the same time period. The global optimization shows only slight deviations from the online operation using a 24-hour rolling forecast. It indicates that for such a system, a 24 hours forecast with a reasonably good accuracy as presented in this paper can achieve nearly optimal operation results.

Cost minimization
In a second evaluation of the control strategy, we examine the online operation of a DHN with regard to hourly day-ahead prices of the German electricity market (German Federal Network Agency 2020). The objective function is then given by: The results show that the proposed online control strategy achieves results similar to the global optimization. An overview is given in Table 6. With a 24 hours rolling horizon forecast, our model is able to achieve results that are within 0.1% of the global optimum with perfect foresight and outperforms the naive approach by around 15%.

Discussion
To evaluate the methodology and discuss the results we first review the presented heat load forecasts and then discuss the proposed control strategy. renewable integration in this study. In the use cases, the objective is set to maximize the use of electricity when the share of offshore wind in the system is high to utilize renewable generation in close proximity to the Flensburg DHN in order to reduce grid congestion and to minimize the price for the electricity used by the heat pump. A combination of heat pump and heat storage is used to satisfy the entire heat demand of the DHN. We do not consider investment and maintenance costs for the DHN, which are subject to further analysis in the course of implementing the proposed system, for example as part of a local energy network (Golla et al. 2020). For the given objectives and dataset, the proposed control strategy clearly outperforms the naive strategy and is only slightly inferior to a global optimization with perfect foresight. The offshore wind generation is based on given data to isolate effects of the heat load forecast. For a real-world application, the model would need to be provided with wind forecasts instead of actual generation. However, this is only an issue of setting the right objectives. Beyond the scope of this study, the proposed control strategy offers potential for further connection of energy sectors. For example, the model could be used to develop a supply strategy for cooling load as presented in (Golla et al. 2019).

Conclusion
This paper introduces an online operation strategy for district heating networks (DHN) that utilizes hourly heat forecasts with a 24 hours rolling horizon, achieving two research objectives: (1) The heat load is forecasted with supervised machine learning algorithms. In a comparison of the results on three different datasets that include one large facility, a community of buildings and one large DHN, convolutional neural networks and feed forward networks return the overall best results.
(2) The proposed control strategy for the DHN utilizes heat forecasts for the operation of electric heat coupling devices, i.e. a heat pump and a heat storage system. Thereby, we offer a methodology to include forecasts for the operation of a DHN with a focus on the integration of renewable generation or cost minimization. The application of such strategies can lead to a smart electrification and thereby decarbonisation of a DHN. Thus, with our work, we contribute to a sustainable energy system and a successful energy transition.