{'fraction_non_alphanumeric': 0.024152935999608858, 'fraction_numerical': 0.00943626851806581, 'mean_word_length': 4.695906432748538, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Domain Knowledge Aids in Signal Disaggregation; the Example of the Cumulative Water Heater

In this article we present an unsupervised low-frequency method aimed at detecting and disaggregating the power used by Cumulative Water Heaters (CWH) in residential homes. Our model circumvents the inherent difficulty of unsupervised signal disaggregation by using both the shape of a power spike and its time of occurrence to identify the contribution of CWH reliably. Indeed, many CHWs in France are configured to turn on automatically during off-peak hours only, and we are able to use this domain knowledge to aid peak identification despite the low sampling frequency. In order to test our model, we equipped a home with sensors to record the ground-truth consumption of a water heater. We then apply the model to a larger dataset of energy consumption of Hello Watt users consisting of one month of consumption data for 5k homes at 30-minute resolution. In this dataset we successfully identified CWHs in the majority of cases where consumers declared using them. The remaining part is likely due to possible misconfiguration of CWHs, since triggering them during off-peak hours requires specific wiring in the electrical panel of the house. Our model, despite its simplicity, offers promising applications: detection of mis-configured CWHs on off-peak contracts and slow performance degradation.


Introduction
Smart meters in France. In an effort to record and optimize energy consumption of households as well as facilitate billing, starting from the beginning of 21 st century multiple countries around the world, including France, developed programs aiming at the mass deployment of smart meters [1,2]. By the end of 2021 about 34 million smart meters, called Linky, were installed in France [3].
Signal disaggregation. Linky records energy consumption data at intervals of 30 and, in some cases 10 minutes, and uploads it to the data storage infrastructure of Enedis, the French energy distribution company, through power-line communication [4], while technical and contractual data is retrieved from energy providers. Since the characteristic operational time scales of the most appliances are in the order of minutes, disaggregation of the total signal is a difficult task. In addition to that, publicly available ground truth datasets are scarce and often cover only a few specific appliance types, e.g. only refrigerators, or do not provide sufficient samples of appliance instances within a certain class, e.g. only one type of refrigerators, or few refrigerators at all, limiting the applications of supervised methods. Moreover, different classes of appliances, such as, for example, electric vehicles or laundry driers, are distributed unevenly across countries. In France a variety of options are available to individuals for heating water, with most popular modes being cumulative water heaters (CWH), gas heaters and collective heating.
CWHs as targets for disaggregation. Cumulative Water Heaters are good targets for disaggregation due to the following reasons: (a) In the residential sector, water heating is one of the main contributors to electrical consumption (about 12% [5]). (b) Its average "on" time is typically greater than the time resolution of low frequency meters, such as Linky. Typical volume is in the range of 40 to 300 liters, and the average time required to heat a full load of water to operational temperature varies between 1.5 and 5 hours depending on volume and power [6]. (c) Most electrical energy providers for individuals in France offer contracts with split pricing, where the price of energy is about 25 to 30% cheaper during off-peak hours. The off-peak hours are reported from the energy provider to the meter through power-line communication. Then users have the option to synchronize their use of appliances with the off-peak hours, which can be achieved automatically, either via a timer or a signal from a pilot wire connected to a device that detects the activation of off-peak hours using a signal sent through the electrical mains [7].
We therefore expect a CWH, correctly connected to the pilot wire, to reliably switch on at the beginning of each off-peak interval and remain in that state until the full tank is heated to its target temperature. Under normal usage each "on" cycle lasts more than 30 minutes which is the time resolution of Linky data [6].
Hello Watt is an energy consulting firm for individuals, that also provides monitoring and analysis services.
Individuals may opt-in to share their energy consumption data and some of their metadata, such as the type of water heating, through a consent form signed per household as mandated by French and European laws. The insights drawn from the analysis of large representative data samples helps to real-world user problems, reduce energy consumption and bills, improve the quality of life. In this paper we present a novel disaggregation method for CWHs in Section 3 and study its performance on a labeled dataset in Section 4. In Section 5 we present a large anonymized sub-sample of Hello Watt user consumption data (∼ 5k users) (and make it publicly available) and in Section 6 the results of application of our CWH model to this dataset. We conclude with a brief discussion in Section 7.

Related Work
Disaggregation of energy consumption curves is a main component of Non-Intrusive Load Monitoring (NILM), which is an active research area.
When the aggregated load curve is available at a high time resolution, many approaches are possible such as event matching, where device activation edges are identified and matched to appliances [8]. Deep learning has also been used to successfully disaggregate load curves using training data [9,10,11,12]. These approaches use deep recurrent neural networks such as Long Short-Term Memory, but some solutions also exist that use only feed-forward networks [13,14,15]. Other approaches model the behavior of the building as a Hidden Markov Models where combinations of device activations are modeled as states of a Markov chain which is partially observed [16]. The last approach is especially relevant in our case because it has been successfully applied to sampling rates as low as one sample per minute.
However, our use case requires algorithms that can process even lower sampling rates down to one sample per 30 minutes. At this resolution, most approaches are device-specific. For instance, the authors of [17] use the statistical relationship between daily energy consumption and exterior temperature to disaggregate the electrical heating component.

Disaggregation Method for Devices with Regular Time Signatures
Our disaggregation method is based on the observation that CWH consumption signal has regular features: time signature of activations linked to beginning of off-peak hours and sufficiently long active periods. The method consists of two parts. First, we compute the threshold for background consumption and tag data points that exceed this threshold as candidate spikes (spike detection).
In the second step we identify whether there exists a pattern of spikes that matches the expected characteristics of the device of interest (spike filtering).
The input of our model is composed of an evenly spaced times series representing average power consumption, a set of monotonic intervals describing off-peak hour ranges < 24, and a range for the expected power level of the device of interest.
The output of our model is a list of activation times, durations and power usage of the device of interest.
In this publication all power levels are expressed in kW. Time series are given with a frequency of 30 minutes, and off-peak range boundaries are rounded to 30-minute increments.
Spike detection. The first step of our pipeline is to compute a background noise threshold, identify spikes that exceed it and store whether their start coincides with the start of off-peak hours.
1. We split the time series into a list of smaller sections that are handled independently (in our application we split the input into 7-day segments). These sections are later referred to as observations. This step reduces the sensitivity of downstream steps to the amount of input data, and handles consumption drift. 2. We apply a Kernel Density Estimator (KDE) to each observation independently, and use the first local minimum of the estimator as the threshold between background and spike consumption 2 . We used Scott's rule to select the KDE bandwidth [18], and this process is depicted in Figure 1, where the red curve represents the KDE. 3. For each observation, we select sequences of consecutive consumption values that are above the threshold. These are referred to as spikes. For each spike we store the start time of the spike relative to the closest start of off-peak hours as well as the maximum power used during the spike, minus the local background power level. For this last step, we estimate the background power level as the average of two closest data points that are outside the spike. Indeed, as is visible in Figure 1, the computed threshold is well above the background level and only serves as a classification boundary.
Spike filtering. Figure 2 shows a density plot of the characteristics of the spikes identified in the previous step. The filtering step of the algorithm identifies whether a cluster matching the expected characteristics of a CWH exists in this space. Two conditions must be met for a spike to be classified as being caused by a CWH: (a) it starts exactly at the beginning of off-peak hours (this is represented as a red box in Figure 2); (b) the set of all spike power levels that validate criteria (a) form a cluster within the expected range for the target device (in our case 0.8 to 5 kW).
The clustering step in (b) uses KDE again to find a peak in the space of power levels, much like the spike identification step uses KDE to find spikes in time. The second clustering step is depicted in Figure 3.
If such a range is found matching the expected power of the device of interest, then the fit is considered successful and all matching power spikes can be attributed to this device.

Model Validation
We equipped a single home with a custom electrical meter that provides a ground truth by measuring the power of the CWH about once per second. In parallel, the overall consumption of this home is independently reported through its smart meter and collected from the energy provider at a resolution of 30 minutes.
Therefore, we were able to test the disaggregation model against a known baseline. Figure 4 shows the load curve of the home during the testing period, and colors are superimposed to show over and under-estimations of the water heater consumption according to our model. Figure 5 shows activations of the water heater (an activation being defined as a series of consecutive 30-minute intervals where the average power of the CWH is greater than 100 watts). It demonstrates that most of the activations of the water heater were properly detected, the only exceptions being very short activations that occur early in the morning when the water heater re-activates before the end of the off-peak period (for instance when someone takes an early shower). No false positives were identified in terms of activations (all detected activations correspond to a ground-truth one), meaning that when viewed as a test for activations of the CWH, our model has a precision of 100 %. The false negatives amount to a recall of 93.9 % .
Conversely, Figure 6 shows each individual 30-minute period, and we can Bottom: First 7 days of the same load curve. For each 30-minute interval, the portion of consumption that was identified correctly as CWH is green, the portion that was identified correctly as non-CWH is grey, portions that were mistakenly identified as CWH are blue and portions that were mistakenly identified as non-CWH are red.
see both some false positives where CWH consumption was wrongly identified, and some false negatives where an interval was wrongly identified as not being part of a CWH activation. For a given 30-minute interval, we use our model to detect whether the CWH used more than 100 watts on average. The statistics of this test are presented in table 1.
However, these over and under-estimations happen mostly at the trailing edge of CWH activations: the activation itself is recognized with high accuracy, but its predicted duration is not always exact, especially when it ends early in the last half-hour period. In these cases the last 30-minute interval blends into the background and is hard to identify, however this has little effect on the computed energy of the activation as a whole.

Hello Watt Dataset Description
Hello Watt collects power usage data at a resolution of 30 minutes. Among all users approximately 46% of contracts are on the off-peak pricing. Among only users who declared using an electrical water heater, this fraction reaches    66%. The distribution of water heating types, and the fraction of contracts with off-peak pricing is presented in Table 2.
To develop and test our disaggregation method we consider a subsample consisting of power consumption of 5k households with off-peak pricing contracts for one month. The number of households per water heating type in this dataset is presented in Figure 7. This dataset is published through the Open Science Framework 3 . We chose to include in our dataset both homes with and without electrical water heaters to validate the results of the model as presented in Section 4.
In addition to the type of their water heating, some users also provide such metadata as the home surface area, and the number of inhabitants.
Our working subsample consists of electricity consumers interested in their energy consumption, and therefore it may have some have a distributional bias.
Peak / off-peak contracts. For a given house and day, off-peak hours are made of up to three intervals, whose total duration is exactly eight hours. These times are always expressed in local time (timezone Europe/Paris) and for a given house they are usually identical for all days. The distribution of off-peak ranges in our sub-sample is presented in Figure 8. The off-peak hours are split in two intervals in 92% of houses, one continuous interval for 4% of houses, and three intervals for the remaining 4% .

Analysis of Hello Watt Dataset
In this section, we run the model on a subset of houses from our database. These consist of a random sample of houses that meet the following criteria: • Have at least 1440 (48 × 30) energy measures during the month of october 2021 (october has 31 days so this allows up to 3% of missing data).
• The technical and contractual data we retrieve from the energy provider indicates that the user is billed differently for off-peak hours.
• The off-peak hours are known for this house.
Each home can have one or several off-peak hour ranges, either during the night or the afternoon. Figure 8 shows all the off-peak ranges of the houses in the dataset. For each home, we also have self-reported data about the main mode of water heating, surface and number of inhabitants. Figure 7 shows self-reported water heating modes in the dataset.
This allows us to test the ability of our model to distinguish homes with and without CWH by comparing its output with self-reported data.

CWH Detection
The results presented in Figure 9 reveal that in 66.5 % of cases where the user has declared having an electrical water heating we detect a device with on/off cycles compatible with off-peak hour triggering hypothesis. In houses where the user declared water heating is achieved through gas, this fraction drops to 17.7 % . The differences between the self-reported data and the model results can be attributed to both model imperfection and misreporting by users of their devices.  Figure 9: Fraction of homes in which a CWH was found depending on self-reported water heating types.
In Figure 10 we show the power levels of identified devices. Several peaks are visible in this graph despite the noise, and CWH models can be classified as low power (.6 to 1.5 kW), medium power (1.5 to 2.7 kW) and high power (2.7 to 3.3 kW).

CWH Disaggregation Results
In Figures 11 and 12, for each household in our dataset we estimate the daily and overall consumption fraction due to identified CWHs.
The spike at zero in the distribution of daily average corresponds to days when there was no hot water usage. It is possible that tenants are away a  fraction of time, we also note that our current model does not discover all the relevant peaks, especially if local background values are excessive.
The most prominent spike in the overall consumption plot in the range 8%-14%, in agreement with the estimated 15% provided by the energy agency ADEME [5] and the range between 12% and 15% given by France's historical energy provider EDF [19].

Discussion and Perspectives
In this study we presented a simple model, based on domain knowledge, that disaggregates signals that have quasi-regular time signatures and applied it to the dataset that purportedly contains a large fraction of such appliances, namely CWHs.
Overall we find consistent results, with CWH power ranging from 1 to 3.5 kW. The disaggregated fraction of energy used by CWHs is consistent with available estimates. Our model correctly identifies CWHs predominantly where we expect them, i.e. in cases where users declare electrical water heating.
The performance of our model is validated on a ground-truth dataset and is deemed adequate with precision and recall > 0. 9. Although it has been tested for time series with 30 minutes resolution, we expect our model to work in wide range of resolutions from one minute to one hour.
We note the following shortcomings of our approach: • The CWH model is based on spike identification with respect to local background consumption and assumes the CWH activations are far more frequent at the beginning of off-peak hours compared to activations of other devices. In cases where several devices are systematically activated at the beginning of off-peak hours, (the second one could be a washing machine for instance) our model may fail at separating the CWH, if coupled activations are more prevalent.
• Our model works under the assumption that there is only a single offpeak hour triggered device that has only one mode. Multiple spikes may correspond to the modes of the same CWH or to activations of several devices.
• While the performance metrics of our model with respect to ground truth data are very promising, our testing dataset is limited to the consumption load curve of a single household.
• Our model is aimed at detection of CWH peaks for homes that have split off-peak hours pricing. However, nearly one third of owners of electrical water heaters do not use such contracts.

Conclusion
In this project we developed an unsupervised model of CWH disaggregation and validated its performance on a labeled dataset. We compiled and made public a large dataset of power consumption of ∼ 5k households relevant for CWH studies. Our model was applied to this dataset to characterize CWH consumption at scale in a non-intrusive manner. This simple non-intrusive load monitoring model enables identification and characterization of CWHs performance.
On the one hand, it may be used to identify incorrectly installed of CWHs in regard to peak/off-peak contracts: this is the case when a user is on a peak/offpeak hour contract, but our model does not identify a regular consumption signature due to a declared CWH. Such misconfiguration has a direct quantifiable economic impact. On the other hand, our model can be used to track the consumption of a given user and monitor gradual or abrupt changes in the water heating energy consumption and prompt maintenance recommendations.
Large scale analysis of the consumption due to CWHs made possible thanks to our model allows the characterization of the overall power distribution of electrical water heaters as well as consumption patterns and may be used for further policy proposals in the view of governmental energy saving programs.

Acknowledgements
We thank our colleagues Laetitia Leduc and Xavier Coudert for fruitful discussions and support during this project. The energy consumption data of participating households was provided by our partner Enedis.