1. Introduction
Nowadays, the amount of data that is generated almost continuously is enormous. Once analyzed, they can reveal useful information in many different disciplines; economy, healthcare, and e-commerce, to name a few. In this context, the energy sector could not have been an exception. Traditionally, energy data was acquired at a few critical points of the power grid, usually at the transmission level, but the landscape has changed due to the advance in smart-metering technologies. Thousands of internet-of-things (IoT) endpoints are placed within the smart grid, providing energy utilities access to valuable data; thus, new opportunities have been created for energy services and data-driven business models [
1,
2,
3,
4,
5]. Energy disaggregation is an example of such a service.
Energy disaggregation is the process of consumption breakdown at appliance or activity level for residential or commercial-industrial (C&I) users; in other words, it estimates the individual power consumption for all appliances contributing to the total mains power. This process can help energy utilities reveal useful information to support load forecasting and demand-side management programs. Regarding residential consumers, it can be used to provide accurate billing and meaningful feedback regarding their energy consumption as well as to improve the appliance efficiency (e.g., by detecting old devices and replace them with more efficient ones) [
6].
There are two main possible energy disaggregation solutions: (a) Intrusive Load Monitoring (ILM) and (b) Non-Intrusive Load Monitoring (NILM). In ILM, i.e., a hardware-based approach, power meters are attached behind each target appliance. The large number of hardware devices required for ILM makes the installation process difficult and cost-inefficient but results in very accurate power estimates. On the other hand, NILM is a software-based approach. It requires a single meter for the total aggregated power, thus the installation process is simplified and the corresponding cost is reduced. However, since there is no information about the aggregated power appliances, appropriate algorithms should be created to perform energy decomposition.
The utilities should perform a large-scale deployment to support thousands of consumers to benefit as much as possible from energy disaggregation services; only then it is possible to extract useful information for business models. This large-scale deployment makes NILM far more favorable than ILM due to the low cost, installation simplicity and minimum hardware requirements. However, in many cases, NILM algorithms present high computational complexity and significant memory requirements. In this sense, utilities should either use high-end smart meters—or extra hardware attached to them—with powerful central processing units (CPUs) and sufficient memory. Alternatively, energy disaggregation must be performed in cloud services. In the latter case, the cost of cloud services increases with the number of consumers. To this end, utilities must adopt scalable solutions. Scalability can be more critical even than disaggregation accuracy. As it is realized, low computational and memory requirements are necessary to run the service on the edge with conventional microprocessors or minimize the cost of needed cloud services. Furthermore, to improve user experience, minimum feedback must be required; thus, the necessity for pre-trained generic appliance models is of utmost importance.
Several approaches have been proposed to cope with the NILM problem [
7,
8]. It was first introduced by Hart [
9]. Hart’s approach was based on monitoring power changes (corresponding to the appliance turning-on/off events) of both active and reactive power signals. These power changes are grouped into clusters, with each cluster representing a state change of a target appliance. Since then, several works have investigated the NILM problem utilizing different sampling rates and techniques. Earlier approaches employed sampling rates lower than 1 Hz, where event detection (appliances turning-on/off) is impractical and probabilistic models, such as variants of hidden Markov models (HMM) were examined [
10,
11,
12,
13,
14,
15,
16,
17]. HMMs yield promising results but present disadvantages, e.g., high computational complexity when the number of appliances increases and difficulty in classifying appliances that present similar power consumption [
18]. Due to these disadvantages, researchers have turned to alternative methods, including machine learning and deep learning techniques [
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38]. NILM approaches can be generally categorized as event-based and state-based.
Event-based solutions [
33,
34,
35,
36,
37,
38,
39] leverage the information-rich transient response of an appliance turning-on. Specifically, they consist of two modules: (a) an event detection algorithm for discovering power changes corresponding to an appliance turning-on and (b) a classifier for identifying the appliance that caused the power change. This approach is based on the fact that turn-on transient responses contain more information regarding the operating device than steady states. However, in order to obtain this transient state information, high-resolution data is vital [
33,
34,
35,
36,
37,
38]. One widespread event-based method is the V-I trajectory, utilizing high-resolution voltage and current measurements. In [
37,
38], useful features are extracted from the V-I trajectories and neural networks are trained for classification. Other researchers depict the trajectories as binary images [
34,
35,
36]. This visual representation solves the appliance recognition problem by exploiting computer vision techniques. Furthermore, transfer learning techniques have been investigated, as in [
36] where an image classifier has been implemented based on AlexNet [
40]. An important advantage of event-based approaches is the low complexity; only a few time instants corresponding to on/off events are processed. Furthermore, such approaches can detect an appliance turn-on event in real-time since information only from the transient state is required. However, high-resolution data of several kHz is essential, applying mainly to detect appliance turn-on/off events, without calculating power consumption.
On the other hand, state-based approaches [
19,
20,
21,
22,
23,
24,
25,
26,
27] mainly require lower frequency data. These approaches do not detect state transitions. On the contrary, they parse all available data of a time-series, even if no events occur. In such approaches, the appliance must operate for at least some minutes to determine if it is on [
20,
22]. There are even cases where the appliance end-use has to be fully completed to estimate the power consumption [
19,
24]. In [
19], three different neural network architectures were presented, i.e., (a) long short-term memory (LSTM) networks, (b) stacked denoising autoencoders, and (c) a regression algorithm to forecast the start time, stop time and average power demand of devices. In [
21], a bidirectional LSTM cell was used; in [
26] a deep convolutional neural network (CNN) that uses as input a time window of active power consumption and predicts the active power in the center of the window. In [
23], the authors feed their network with active, reactive, and apparent power and current data. Furthermore, they use mainly CNN blocks in order to create a recurrent property similar to LSTMs. Finally, in [
24], an attention-based deep neural network is introduced, inspired by deep learning techniques used in Natural Language Processing (NLP). State-based approaches use low-resolution data and predict the power consumption per appliance. However, they present higher computational complexity since all available data are used, thus cannot detect in real-time an appliance being turned-on/off.
The scope of this paper is to present a real-time event-based NILM methodology to detect an appliance turn-on event and calculate its power consumption in real-time. The proposed NILM design is built on top of three main blocks, i.e., an event detector, a CNN classifier and a power estimation algorithm. The main strengths of the proposed NILM system rely on the following:
The proposed system can identify when an appliance is turned-on in real-time, based on its active power transient response sampled at 100 Hz; processing data of the total appliance operational duration is not required, as in [
19,
24].
The proposed system is delay-free; once the appliance has been turned-on, the system can calculate its power in real-time.
The combination of a machine learning model to detect appliance turning-on and a heuristic algorithm to estimate the power in real-time constitute a system light-weight, presenting less memory and CPU requirements than end-to-end deep learning models [
19,
23,
24].
The proposed NILM algorithm is automatic, thus, no feedback is required by the user.
Data sampling rate of 100 Hz for active power measurements is used, contrary to several kHz in relevant works [
33,
34,
35,
41,
42].
Generally, as it can be suggested from the above analysis, the proposed system constitutes a real-time scalable solution presenting minimum hardware requirements; thus, it can be integrated into low-cost chip-sets and, consequently, run on the edge.
The paper is structured as follows: In
Section 2, the proposed methodology is presented. In
Section 3, the dataset and the metrics used for evaluation are described. In
Section 4, experimental validation results from real-life installations are analyzed and the performance of the system is compared to other state-of-the-art approaches. In
Section 5, an industrial perspective regarding scalable real-time NILM services is discussed. Finally,
Section 6 concludes the paper.
2. Proposed System
The proposed methodology comprises of three main parts: (a) an event-detection system to find active power changes corresponding to turn-on events, (b) a CNN binary classifier to determine if the turn-on event was caused by a specific target appliance or not, and (c) a power estimation algorithm to calculate in real-time the appliance power per second and consequently the energy consumption. An overview of the system in flowchart form is illustrated in
Figure 1.
2.1. Event Detection
The event detection algorithm is used to identify the time instant (trigger time) when a sudden increase of active power occurs, indicating a possible turn-on event. The advantages of the proposed event detection algorithm are its simplicity and the fact that no pre-training is required.
Let us assume that the aggregated active power time-series at 100 Hz is
P. The original signal
P is down-sampled at 1 Hz by means of averaging, resulting into signal
Pd. Down-sampling is applied for two main reasons: (a) the event detection algorithm becomes simpler, presenting less computational burden and (b) most of power changes are still easily identifiable assuming an 1 Hz sampling frequency. However, if two or more events occur almost simultaneously, e.g., in a period of less than a second, the algorithm detects these events as a single one. Considering that the probability of this scenario is very low, the frequency of 1 Hz has been selected. Next, the maximum power difference (
MPD) for each second
n is calculated as:
MPD shows the maximum difference in active power in a region around
n, i.e., the maximum power during the first three seconds after
n, minus the minimum power of the three first seconds before
n. In this sense, the transient onset can be accurately determined since the real power increase may not appear immediately, but some seconds after
n. To determine the trigger time candidates,
MPD is compared with a threshold,
Pth, which is determined in terms of the appliance rating power. This means that, at time instant
n an event occurs if
At this point, it should be mentioned that trigger time candidates close in time are merged. For each trigger time, a 6 s window of the captured transient response,
Ptr, is generated from
P (100 × 6 = 600 samples). The pseudo-code for the process described is presented in Algorithm 1.
Algorithm 1: Event detection. |
|
2.2. CNN Classifier
In the proposed methodology, the transient response generated by an appliance’s turning-on is used as the load signature for appliance classification [
7]. Whenever a target appliance is turned on, a transient response can be detected in the aggregated active power waveform. Besides appliance classification, this load signature presents two additional advantages. Firstly, for a given appliance, the turn-on transient response pattern is unique and relates only to the operational characteristics of the appliance [
43]. Consequently, the identification algorithm’s performance is independent of the simultaneous operation of other types of appliances, even when a large number of devices is considered [
7,
44]. Secondly, the proposed algorithm can successfully treat various types of appliances, even though presenting similar consumption levels at steady-state, since classification is performed based on the unique appliance transient characteristics instead of calculating steady-state features.
The same principle can detect specific operational states by identifying transient responses caused by a state transition regarding multi-state appliances. For example, for a washing machine or a dishwasher, the water heating process’s transient response can be used to identify this specific state, being of primary interest as the most energy-intensive process during an operation cycle.
In order to associate a given transient response, Ptr, with a specific target appliance behavior, a CNN classifier is utilized. In this sense, for each target appliance, a dedicated CNN classifier is used, identifying Ptr as positive when related to the target appliance or negative otherwise.
Different types of appliances generate transient responses with distinct characteristics, primarily when a high sampling frequency, e.g., at 100 Hz, is used. Suppose a user was initially given an example of such a response corresponding to a specific appliance. In that case, he/she could later recognize a new response of the same appliance by simple visual inspection. However, the implementation of such a recognition algorithm is not an easy task.
Inspired from the area of computer vision, where CNN models are used for image recognition, and classification [
45], a similar approach has been adopted in this paper. Convolutional layers can automatically extract useful features from the input data without user supervision [
45]. Thus, there is no need to implement specific algorithms; instead, by training a CNN model, the classification problem can be successfully solved. A block diagram of the proposed CNN architecture is depicted in
Figure 2.
Initially, min-max normalization is applied to
Ptr by means of (
3); the resulting normalized vector,
Pnorm, is forwarded as input to the CNN model.
Since the CNN input model is an one-dimensional signal, one-dimensional convolutional layers are used to extract the useful features from
Pnorm. In particular, three consecutive 1-d convolutional layers are used in combination with an 1-d max-pooling layer. All convolutional layer parameters have been set to 32 filters, kernel size equal to 3, strides equal to 1, ’same’ padding, and rectified linear unit (ReLU) activation function. The ReLU function is defined as
for
. For max-pooling layers, the pool size was set to 2. Generally, at each 1-d convolutional layer, a number of filters is applied to the corresponding input,
xconv. Assuming that the size of
xconv is
and a single filter,
f, is of
, the output of the convolution between
xconv and
f will be a
matrix. The resulting
yconv is calculated as
for
, where
xconv(0, n) and
xconv(M
conv+1, n) are considered zero for any
as a result of zero-padding. In our case, where 32 filters are used in a convolutional layer results
yconv, are stacked as columns, forming a
matrix.
Each layer is followed by a max-pooling layer to down-sample the extracted features of the input signal. In this sense, a summarized version of the extracted features (half the size) is created, maintaining the most important features and is further used as input to the next layer. Assuming
xpool, with size
is the max-pooling layer input matrix, the output,
ypool, has a size of
and is calculated as
for
and
.
Following the three convolutional/pooling pairs, a flattening layer is applied, transforming its input to a single vector by column-wise stacking. Finally, two dense layers are used of 20 and 1 output nodes, respectively. For the first dense layer, the ReLU activation function is applied; for the last layer, the sigmoid activation function defined in (
7) for
is used to compute the probability of the transient response to correspond to the positive class.
Generally speaking, a dense layer with
input nodes and
K output nodes includes two trainable parameters, i.e., a weight matrix,
w, with size
and a bias vector,
b, with size
K. Given an input vector,
xdense, with
elements, the output
ydense of size
K is calculated as
for
, where
F is the corresponding activation function. Before each dense layer, a dropout layer [
46] is used. Its value is set to 0.2 to prevent model over-fitting.
A standard backpropagation algorithm is used during training to optimize the binary cross-entropy loss between the predicted probabilities and the actual labels. Assuming that the predicted probabilities are
for
B samples and the actual labels are
, the binary cross-entropy loss is
The CNN classifier is trained for a maximum of 50 iterations. The Adamax optimizer [
47] was selected assuming an initial learning rate of 0.01 and batch size 32. In order to avoid over-fitting, early stopping with patience is used. The training process stops once the validation accuracy does not improve after five consecutive iterations.
2.3. Consumed Energy Estimation Algorithm
The last module is related to the real-power estimation of the target appliance. The implemented algorithm considers the appliance end-uses as pulses of constant power; this approximation is well-suited for single-state appliances such as microwave oven, kettle or toaster. In the case of appliances with operating cycles comprising of multiple pulses, the algorithm considers each pulse as a new appliance end-use and not as a single end-use event of several pulses. An example is the oven turning-on and off controlled by a thermostat and the dishwasher, where several water heating pulses may occur depending on the selected program. In this sense, the proposed algorithm performance may degrade for multi-state appliances. They are characterized by varying power consumption and cannot be approximated with a constant power pulse. However, such appliances present a predominant energy-intensive process during a full operating cycle while the rest operating states are less critical regarding the total energy consumption. For example, washing machine or dishwasher cycles include energy-intensive water heating processes and low energy-consuming processes, e.g., water pumping. Therefore, regarding multi-state appliances, the proposed power estimation algorithm focuses on the estimation of the energy-intensive processes neglecting the effect of the minor consuming ones.
When the CNN classifies a transient response as positive, it is implied that the appliance has been turned-on. The calculated power increase,
Pinit is considered equal to the appliance power consumption and assumed constant during the total time of operation of the appliance. When a power decrease between two consecutive seconds in
Pd inside the interval [0.8
Pinit, 1.2
Pinit] is detected, the appliance is considered to be turned-off. The pseudo-code of the energy consumption estimation algorithm is shown in Algorithm 2, having as input the time (in seconds), t, when the target appliance is turned-on and
Pd.
Algorithm 2: Energy consumption estimation. |
|
5. Discussion—Towards Scalable Real-Time NILM Services
As already reported, the proposed methodology is implemented as a real-time scalable solution with minimum hardware requirements, thus allowing utilities to perform a large-scale deployment. However, some criteria need to be met from an industry perspective before massively adopting such a service. Coming up with the correct blend of characteristics is not a trivial issue. So, it is no surprise that no real-time NILM solution based on sub-second energy data resolution has been rolled out in scale (>50 K end-users) globally yet. In this section, four necessary criteria are investigated and we examine if the proposed methodology meets them or not.
First of all, as expected, comes the accuracy metric. Accuracy usually refers to a weights-based combination of (i) correctly detected events, (ii) precise energy consumption estimation for the detected appliance events and (iii) minimized FP. Energy companies and electricity consumers usually trust a NILM service when its accuracy exceeds 90% and when they are not receiving reports for appliances/activities never actually occurred.
Second comes the data resolution and as a result the data volumes required for an accurate NILM output. As mentioned above in
Section 3, for real-time appliance identification sub-second data granularity is needed. Note that, most of the solutions presented in literature deal with kHz or even MHz of data. Considering as a rule of thumb that 1-s resolution data from separate phases in a 3-phase installation result in almost 1 GB of data being produced per year, we realize that moving into the kHz resolution areas makes data parsing, storing and analysing a rather complicated, costly and therefore non-scalable option.
Next in the list comes the computational/RAM efficiency of such a service. Although the recent trend was to move everything to the cloud, now NILM vendors and energy companies realise that such a decision is not always the most cost-effective; the opposite actually. Running for example the whole service for ~100 k end users on the cloud can increase cloud operation costs that much, that there is no business case that can be built on top of a NILM layer, no matter how accurate that is. So, the key to unlock scalability opportunities here is to built a system that is so efficient that can run on the edge instead of the cloud.
Strictly connected to the hardware constraints of the previous point comes the hardware cost. Traditionally sub-second data can be acquired only via a din meter hardware installed in the metering cabinet (it’s only recently that a few smart-meter manufacturers make >1 Hz resolutions available through their S1 port [
53]). On the other hand, utilities and energy retail companies see NILM as a great customer engagement tool on top of which they can build value-added services and they usually tend to offer that as a freemium service. As a result, hardware cost has to be as low as possible and ideally within the companies customer retention and acquisition budgets.
In
Figure 7, three of the criteria mentioned above are analyzed for the proposed system, i.e., accuracy, sampling frequency, and computational burden. As we can see, scalability-related criteria #1 and #2 are met; the proposed system presents accuracy higher than 90% in all examined cases by utilizing the sampling frequency of 100 Hz (see results in
Section 4). Although this frequency is high, it is still considerably lower than a resolution of several kHz used in most state-of-the-art real-time implementations [
33,
34,
35,
39]. To that end, it is an excellent “do a lot with a little” decision to take. Regarding criterion #3, i.e., computational and memory efficiency, as demonstrated in
Section 4.5, optimized design can efficiently run on the edge and even on low-cost chip-sets. Specifically, in
Figure 7, it is assumed that the “High” value refers to expensive algorithms, incorporating several parameters that cannot be easily integrated into a low-cost microprocessor. On the other hand, the “Very Low” value refers to low computational complexity algorithms that can be integrated and run in a low-cost microprocessor. The proposed system is between the “Low” and “Very Low” area. Criterion #4 is expected to be met as a consequence of #3. However, such an investigation falls out of the scope of this paper.
6. Conclusions
In this paper, a novel real-time event-based energy disaggregation methodology is introduced. Initially, a simple event-detection algorithm is proposed to find time instants when an appliance is turned-on and extract transient responses at 100 Hz. Next, a convolutional neural network classifier identifies if a transient response was caused by a target appliance. Finally, a power estimation algorithm is implemented considering appliance end-uses as pulses of constant power. Experimental results show a promising performance for specific appliances.
Unlike most relevant papers in the literature, the proposed non-intrusive load monitoring system can identify in real-time when an appliance is turned-on based on its information-rich transient response sampled at 100 Hz. Furthermore, it is delay-free since, once a target appliance has been turned-on, the active power can be directly calculated. Moreover, the system is computational and memory-efficient and can be integrated into smart meters.
The proposed approach can be used for a significant number of appliances with negligible error. However, energy consumption of specific appliances, e.g., heat pump, tumble dryer, including many states of operation, cannot be calculated by the proposed methodology. For such cases, dedicated algorithms should be implemented. As future steps, a more robust power estimation algorithm will be examined for multi-state appliance uses. Additionally, the proposed methodology will be tested on more types of appliances.