# Advanced Control and Fault Detection Strategies for District Heating and Cooling Systems--A Review
## 3 Overview of Fault Detection and Diagnosis (FDD) in DHC Systems
### Fault Detection in Substations and Customer Facilities
#### 3.2.1 Heat Load Patterns-Based Methods  
The heat load in a DH/DC system is the sum of individual heat loads from all customer-sited substations connected to the network and the distribution heat losses. DH/DC heat generation plants might be affected by malfunctions in customer substations and building HVAC systems, which are propagated through the network. The operation of the HVAC system varies depending on the building's end use, so the resulting profile of the heating/cooling load will vary among the different types of buildings. [PERSON] and [PERSON] [115] made a study of 141 different buildings where they first defined two indicators (annual relative daily variation and annual relative seasonal variation) and then used them to detect failures in the DH substations based on high or low variations of these parameters depending on the type of building. Irregularities of the heat load pattern or no correlation between outdoor temperature and heat demand can also be used to detect that the substation is not working properly.  
The main challenge related to heat load patterns-based methods is how to deal with such different profiles for various types of buildings or how to create reliable predictions of them. Concerning the first point, a data-driven algorithm enabling large-scale automatic analysis of district heating load patterns was developed by [PERSON] et al. (2019) [116] using an initial dataset of 19.6 million hourly measurements. The algorithm applies clustering techniques to aggregate profiles of customers into different groups and extracts their representative behavioral patterns in terms of heat load. In this way, it is capable of detecting unusual customers whose profiles deviate significantly from the rest of their group. These outliers can be analyzed in depth in order to find problems in the corresponding substations or customer facilities. The application of the algorithm allowed to detect abnormal heat load profiles due to, for instance, a mismatch between the real and designed use of the buildings, problems in the HVAC system that resulted in sharp and irregular afternoon peaks, and summer loads higher than mid-seasons' ones due to substation faults.  
In the framework of the H2020 project RELATED [49], two tools have been developed for automatic fault detection in DH substations based on ML algorithms: DH doctor and DH Autotune [48]. The first one exploits clustering, and it is based on daily averaged readings. Anomalies can be detected by measuring the distance among the clusters and following the evolution of the centroids related to a particular variable over time. Moreover, it exploits an ensemble of decision tree (DT) algorithms to make predictions that allow assessing deviations of a monitored variable. The second tool is based on hourly averaged readings and allows the prediction of the load as mentioned in Section 2.3, but also a fast reaction is triggered if abnormal behavior occurs. Alarms are activated if some KPIs, such as MAPE, exceed a threshold. Further applications concerning the prediction of substation heat demand patterns through ML algorithms using the usual metering variables such as flows and temperatures can be found in [117, 118, 119].