Sensors in smart meters on the consumer side in district heating systems (DHSs) produce a plethora of data. Having the data validated is therefore critical for applications utilizing them.
As it is now, the data from smart meters are not used for many purposes [
1]. They are mainly used for billing [
1,
2]. However, for billing, robust data collection is critical. Having smart meters that are calibrated and maintained properly is therefore key. In Denmark, the DH company has a direct vested interest in meters operating properly, as they are the owners of the meters and responsible for them operating properly [
3]. This includes self-control of the meters [
3] to make sure they stay within tolerances. Furthermore, for individual consumers, wrong measurements in their system can potentially affect the operation and therefore comfort in the building, given that the measurements are used for control locally [
2]. Improvements in the identification of issues with smart meters can therefore help the DH company uphold its obligation to maintain the smart meters. This can also help them reduce the number of complaints received through the independent Danish “Energy Supplies Complaint Board” or general complaints sent directly to them. Identification of errors in sensors is currently performed using alarms; however, quicker notification about issues is preferred, as it could increase the reliability of the smart meters. A significant improvement in that current setup could be achieved through predicting when faults are bound to happen in the sensors. Achieving this can help fix problems arising in the sensors earlier, removing the risk of erroneous bills being issued and avoiding having to perform data reconstruction to the same extent. This is a use case of fault prediction that can benefit the DH company today.
However, in the future, if the flexibility of buildings that have district heating is to be leveraged or other data-driven smart solutions are to be implemented using smart meter data, robust readings are necessary [
1]. These solutions will rely on historical data and also on real-time (recent historical) data being dependable. Real-time data are needed to know the current operation of consumers to allow proper prediction of, e.g., how much and when to bid into a flexibility market, which can change in real time. Trusting current data is therefore essential. Work on leveraging the flexibility of DHSs on the grid side has been investigated in [
4], where increasing and decreasing temperatures throughout the grid can provide flexibility to the electricity system. To illustrate another potential issue that can occur today, consider the following scenario (although not all district heating companies engage in this practice): When conducting a day-ahead simulation using inaccurate historical heat consumption data, including very recent figures, it can lead to suboptimal set point determinations in the system’s operation. This could result in energy wastage and, in certain cases, failure to meet the heat demand due to, for instance, excessively low forward temperatures caused by the discrepancy between the data and actual conditions.
As mentioned, detection of these faults in sensors already happens in smart meters via the use of alarms, but these alarms are not utilized properly or tended to. Additionally, all of the data from the smart meter for a given day are transmitted after the day ends. Furthermore, even the current proactive real-time detection of faults (when utilized properly) is not sufficient for future applications that rely on real-time data being trustworthy. Moving towards predicting sensor faults is therefore necessary to unlock such applications.
1.1. Related Works
Work within fault or event prediction in general and for energy systems specifically has seen an increase in interest due to the increased available data. This can be attributed to more sensors in the systems [
5] (which also measure more frequently) and developments in machine learning. In industry, work with fault prediction can be seen in examples such as [
6], in which they utilize alarm logs to predict hardware faults in telecommunication, and for power systems. Betti et al. [
7] perform fault prediction in large photovoltaic plants using self-organizing maps. Zhang et al. [
8] perform line trip fault prediction using long short-term memory networks and support vector machines using real-world data. Alqudah et al. [
9] develop a methodology for fault prediction in power systems using multimodal data and multi-instance learning.
While the electricity system field has seen considerable advancements, fault prediction within the district heating (DH) field remains significantly underrepresented in research. An illustrative case of this research gap can be found in Mortensen et al.’s work [
10], where machine learning techniques are applied to predict the relative fault vulnerability of pipes—a rare exploration in DH research.
In contrast, DH research has extensively delved into predictive models for other aspects, such as heat load prediction, as evidenced by studies like [
11,
12,
13,
14]. These load predictions can be used to understand the nature of future heat loads for better day-ahead planning in the system from both a production and a grid standpoint to avoid faults due to misconfiguration of set points, which could lead to not enough supply to consumers. In a sense, the outputs of these methods can help avoid future faults in the system. However, the limited attention given to fault prediction, despite its critical relevance in ensuring system reliability and minimizing downtime, underscores the pressing need for further dedicated research in this specific area of DH.
The step down in maintenance functionality from fault prediction (predictive maintenance) is fault detection (proactive maintenance), which does not look into the future and only detects faults when they occur (or when they develop, i.e., early fault detection due to symptoms of a fault developing being detected as the fault). The field of fault/anomaly detection and diagnosis in DHSs has seen much attention in works such as [
15], which focuses on fault detection in district heating substations using a gradient boosting regressor. Zhang and Fleyeh [
16] also perform fault detection at the substation but apply long short-term memory. Gadd and Werner [
17] introduce various thresholds to substations and find that 74% displayed faults. Guelpa and Verda [
18] detect fouling in heat exchanges in substations. Yliniemi et al. [
2] detect sensor faults in district heating substations, improving the billing using threshold-based detection. Examples of improving the operation of the heating supply of a building that uses an HVAC system instead of DH using fault detection can be seen in works such as [
19,
20].
The papers presented above for DH fault detection mostly focus on detecting faults in the system and not errors in the data themselves. It can be difficult to distinguish between faults in the sensors themselves and faults in the system. However, there are some edge cases in which some measurements are an impossibility for the system. This could be, in the case of DH consumers, forward temperatures above what the supplying pump substation (i.e., substation between the transmission system and distribution system) supplies (assuming that measurement is correct). Work concerning data validation (faults in data and thereby the sensor) for DH data can be seen in papers such as [
21], in which they transform the consumption data from district heating and apply k-means clustering for analysis of patterns. Leiria et al. [
22] propose a framework that, in essence, detects outliers and errors in data and imputes those outliers and errors using, e.g., linear imputation. Schaffer et al. [
1] develop a framework for detecting errors and outliers in data, which then carries out linear interpolation to match the temporal resolutions and finally applies imputation. Pedersen et al. [
23] detect errors in data using, e.g., a frozen test, ranged test, Shewhart chart, sliding window, and principal component analysis. For wireless networks, in general, refs. [
24,
25] are good examples of both detection of errors in data and then of imputation. One example of prediction can be found in [
26] for wireless sensor networks. These methodologies are the preprocessing steps carried out before applying other methods. If errors in the data are identified, reconstruction is needed, which can be carried out with imputation. Moving towards predicting that future errors will happen in the data can reduce the need for reconstructing data. The increased reliability of smart meter readings will in turn also increase the usefulness of fault detection methods for consumer installations. Another area of interest in the field of smart meters is communication errors, which can affect the data recorded. Not all of the data errors may be due to faults in smart meters but due to data transmission. The paper [
27] develops a decision support system to identify bad transmission of data in electric smart meters based on various quality parameters.
If a fault prediction framework is to be created for district heating smart meters, it is critical to discuss the various types of prediction approaches that are available in the field. The following paragraph, therefore, describes the overall thinking behind how fault, or specifically event, prediction is categorized based on research problems. The identification of which category our specific problem belongs to is a function of the data available and the end goal of the prediction. The identified category determines which types of techniques are appropriate for the problem. Event prediction problems can be categorized into several categories according to the taxonomy by Zhao et al. [
28]. The first main category is time prediction, in which you predict when or if an event will occur in the future. This category can be subdivided as follows:
Occurrence-time prediction: does an event happen or not in a future period?
Discrete-time prediction: in which among several time slots does an event occur?
Continuous-time prediction: at which exact time does an event occur in the future?
The second main type is location prediction, in which you predict where an event will occur and which is separated into raster-based, where the space is divided into cells, or point-based, where each location is an abstract point. The third category is semantic prediction, in which future topics, descriptions, or general metadata are on top of the usual time and/or event locations. The last category comprises ways to jointly combine the other categories such as predicting time and semantics at the same time. A more thorough description of each of the problems is available in [
28].
As observed in the descriptions above, most of the focus has been on describing time prediction. That is because for this work, given the available time series data from smart meters and the overall goal, the use of occurrence-time prediction is the most fitting. For this, the appropriate techniques used for solving the problem that align with our goal and the data available are machine learning methods that can perform (binary) classification [
28]. This is because the data contain labels from the alarms generated, and supervised methods are therefore very appropriate as they can leverage that aspect. By using classification, you also explicitly tell the model what to learn and can be certain the model has the same goal as you. You provide it with the solutions in training. Other techniques are anomaly detection and regression. They could be utilized as well, but given the available labels, it would be illogical to use them. For these two types of methods, you also assume that the models have the same goals as you and will try to predict what you want, and more thorough testing is needed to validate that. The methods used for the chosen technique, with example applications in parentheses, include support vector machines (prediction of solar flares [
29]), decision trees (customer churn prediction [
30]), and neural networks (crime prediction [
31]).
1.2. Contributions
A gap has been identified within predictive maintenance in the Related Works subsection in DHSs for sensor faults as well as system faults. This paper tackles one of those areas by proposing a predictive sensor fault a maintenance framework for alarms in customer installations in the DHS that utilizes the alarms and data from sensors in training and then the sensor data for future event prediction of alarms in a given period. The use of classification machine learning methods was identified to allow for the prediction of the problem at hand [
28], based on the available data and the problem at hand. The work within this paper will be able to distinguish between the system faults and sensor faults (wrong data), as it will utilize alarms that are meant to detect implausible measurements in sensors. The methodology in this work, therefore, detects faults in sensors and therefore also performs predictive data validation. Again, by performing predictive maintenance (compared to proactive, which is currently performed with the alarms), the goal is to avoid having to perform a comprehensive reconstruction of the incorrect data, help the DH company uphold its obligation to have proper readings for their billing, and enable smart solutions in the future that rely on the data being error-free in real time. This work also acts as a guideline for implementation in smart meters for other fields. The novel scientific contributions are as follows:
A sensor fault prediction framework based on alarms generated in smart meters and operational data from the smart meters.
First application of fault prediction in smart meter sensors in the DH domain, to the best of our knowledge.
The application of the framework to a case study with real-world data.
To summarize the above, the contributions of this paper are not new alterations to machine learning methods, how they predict, or how they are tuned. Instead, contributions lie in what is specifically predicted (the application itself) and also the use of real-world data.
This paper is structured in the following manner.
Section 2 presents the data available for performing fault prediction in sensors and determines an alarm candidate for prediction and changes to the definition of the alarms. It closes off with a description of how to structure the data for use in machine learning methods (e.g., prediction horizon).
Section 3 presents the framework for the development of the fault prediction, which includes which machine learning methods will be used, how the methods will be tuned, and which key performance indicators (KPIs) to use. Additionally, a framework for real-world online application of the trained model is proposed. The results from the application of the framework on the prepared data are in
Section 4, along with tuning of the various parameters in the framework. This includes the selection of the best machine learning algorithm and its hyperparameters and further investigation into how changing the various horizon length parameters affects the KPIs.