Electronics 13 01420
Electronics 13 01420
Article
Comparative Analysis of Machine Learning Techniques
for Non-Intrusive Load Monitoring
Noman Shabbir 1,2 , Kristina Vassiljeva 3 , Hossein Nourollahi Hokmabad 2,4 , Oleksandr Husev 2, *,
Eduard Petlenkov 3 and Juri Belikov 4
1 FinEst Centre for Smart Cities, Tallinn University of Technology, 19086 Tallinn, Estonia;
[email protected]
2 Department of Electrical Power Engineering & Mechatronics, Tallinn University of Technology,
19086 Tallinn, Estonia; [email protected]
3 Department of Computer Systems, Tallinn University of Technology, 11712 Tallinn, Estonia;
[email protected] (K.V.); [email protected] (E.P.)
4 Department of Software Science, Tallinn University of Technology, 11712 Tallinn, Estonia;
[email protected]
* Correspondence: [email protected]
Abstract: Non-intrusive load monitoring (NILM) has emerged as a pivotal technology in energy man-
agement applications by enabling precise monitoring of individual appliance energy consumption
without the requirements of intrusive sensors or smart meters. In this technique, the load disaggre-
gation for the individual device is accrued by the recognition of their current signals by employing
machine learning (ML) methods. This research paper conducts a comprehensive comparative analysis
of various ML techniques applied to NILM, aiming to identify the most effective methodologies
for accurate load disaggregation. The study employs a diverse dataset comprising high-resolution
electricity consumption data collected from an Estonian household. The ML algorithms, including
deep neural networks based on long short-term memory networks (LSTM), extreme gradient boost
(XgBoost), logistic regression (LR), and dynamic time warping with K-nearest neighbor (DTW-KNN)
are implemented and evaluated for their performance in load disaggregation. Key evaluation met-
Citation: Shabbir, N.; Vassiljeva, K.; rics such as accuracy, precision, recall, and F1 score are utilized to assess the effectiveness of each
Nourollahi Hokmabad, H.; Husev, O.;
technique in capturing the nuanced energy consumption patterns of diverse appliances. Results
Petlenkov, E.; Belikov, J. Comparative
indicate that the XgBoost-based model demonstrates superior performance in accurately identifying
Analysis of Machine Learning
and disaggregating individual loads from aggregated energy consumption data. Insights derived
Techniques for Non-Intrusive Load
from this research contribute to the optimization of NILM techniques for real-world applications,
Monitoring. Electronics 2024, 13, 1420.
https://doi.org/10.3390/ facilitating enhanced energy efficiency and informed decision-making in smart grid environments.
electronics13081420
Keywords: non-intrusive load monitoring; load disaggregation; pattern recognition; machine learning;
Academic Editors: Di Wu, Jing Li,
deep learning
Xianmin Wang and Mingliang Zhou
self-reliance but also augments the penetration of renewable energy [4]. Referred to as
energy flexibility (EF), this adaptability is essential for transitioning towards eco-friendly
and efficient energy grids. A noteworthy development in this context is the emergence of
demand-side energy aggregators, which contribute to balancing demand and supply by
minimizing peak loads during periods of high demand, thereby ensuring stability in power
systems, and facilitating EF [5].
The EF is generally referred to as the customer’s capacity to adjust or modify behavior
based on energy demand, production variations, weather conditions, and user or grid
requirements [6,7]. Several devices in the household are known as shiftable loads such
as EVs, washing machines, dishwashers, etc. These devices are not essential and could
be used at a later time, therefore, referred to as shiftable/movable devices. Another
prevalent definition focuses on the earliest start time and ending time of shiftable devices.
Traditional EF characterization involved installing smart meters on residential devices and
continuously monitoring data, which, although straightforward, could be costly and slow
it also raised concerns about data privacy [8].
A new approach, non-intrusive load monitoring (NILM), has been proposed as an
alternative. NILM observes the usage patterns of devices based on their current signals,
eliminating the necessity for smart meters [9]. The total energy consumption of the user
is given to the NILM model as an input and then the device usage times are extracted,
this method is known as load disaggregation. This makes NILM an essential tool for
demand-side management (DSM) and EF applications. Although the most precise method
to measure device usage is through energy meters on individual devices, this approach
is not the most practical [10]. The integration of data-driven technologies, such as ma-
chine learning (ML), into NILM has enhanced its efficiency. A detailed review of the
NILM method is given in [11]. NILM solutions can be categorized into supervised and
unsupervised learning [12]. In supervised learning, the model is trained using a dataset,
followed by testing and verification. On the other hand, unsupervised learning involves
the model extracting information from data and forming clusters without prior training
sets [13]. While unsupervised learning is faster and more convenient, it lacks the accuracy
of supervised learning [14]. Several ML-based methods, including K-nearest neighbor
(kNN), neural networks, support vector machine (SVM), deep learning (DL), and event
matching classification, have been proposed in supervised NILM. There are many studies
that have also incorporated statistical methods such as particle swarm and Markov chain
models. In Table 1, a comparison of previous studies with this study has been presented.
Study Year Place Method Used for NILM Dataset Avg. Efficiency (%)
[15] 2019 China Particle swarm 1 year 94.2
[16] 2023 Indonesia Random Forests 1 year 99
[17] 2020 India Markov Chain 31 days 94
[5] 2021 Estonia Extreme Gradient Boost (XgBoost) 3 years 97.2
[18] 2022 Malaysia K-NN, SVM, Ensemble 30 days 98.8
[19] 2020 Iran SVM 1 week 98.2
[20] 2021 Indonesia Convolutional Neural Networks (CNN) 1 month 98
[21] 2023 Italy Random Forests 27 months 96.3
[22] 2024 Spain Long Short-Term Memory Networks (LSTM) 7 months 98
[23] 2023 Greece Recurrent Neural network (RNN) 10 days 97
[24] 2023 Canada LSTM 2 days 98
Current Waveform Features with Rule-Based
[25] 2023 UAE 1 month 96
Set Theory (CRuST)
DTW-KNN, Logistic Regression (LR), XgBoost,
This Study 2024 Estonia 1 year 98
RNN-LSTM
The NILM method has been used for anomaly detection at the appliance level by
incorporating machine learning [26]. In another study [8], NILM is utilized for the event
Electronics 2024, 13, 1420 3 of 21
matching of devices. This study was based on the Pecan Street dataset, and it used a deep
learning algorithm for this event matching. In [27], the NILM technique is used to identify
the load patterns, and then later, these patterns are used to improve the accuracy of the
load forecasting. A NILM-based solution has been proposed for energy management in
microgrids [28]. Furthermore, the solution also provides input for the electricity market
based on the load characterization by NILM. The results indicated that using this technique
the energy costs and load curtailment can be reduced. In [29], a NILM-based algorithm
has been proposed for the monitoring of loads in the power distribution network. This
technique consists of a neural network and improves accuracy by 5%.
In most of the literature presented above, there are several methods used in NILM
modeling. However, the accuracy of these NILM models is challenging as there are many
device variations, different manufacturers with different power ratings and device operat-
ing modes. The inclusion of ML and DL methods improves this performance significantly
but still, these methods require larger datasets of reference device signals which is prob-
lematic. Therefore, there is a gap in the research studies about the comparison of different
ML and DL algorithms on the accuracy of the NILM technique. Moreover, the impact of
the size of the dataset on the performance of NILM is also of interest. This paper tries to
fill this gap by evaluating the performance of several ML and DL algorithms employed
in NILM. These models are designed based on a real-life dataset measured in an Estonian
household for the whole year. These are the main contributions of this work:
• Thorough comparative analysis of ML Techniques for NILM, revealing optimal method-
ologies for load disaggregation.
• Utilization of diverse dataset from an Estonian household for comprehensive evalua-
tion of ML algorithms.
• Implementation and Evaluation of LSTM, XgBoost, LR, and DTW-KNN models, high-
lighting XgBoost’s superior performance.
• Insightful evaluation metrics application includes accuracy, precision, recall, and F1
score for nuanced assessment.
• Identification of XgBoost as the most effective model for load disaggregation, offering
practical implications for enhancing energy efficiency.
The rest of the article is structured as follows: Section 2 provides detailed background
information about NILM and the ML and DL methods used in this research. The case study
of the Estonian household and the development of these NILM models are presented in
Section 3. The results and discussion are given in Section 4. Finally, the conclusion and
future works are summarized in Section 5.
where
Ptotal (t) is the power consumed by all appliances,
pk (t)—power consumed by the kth appliance,
e(t)—error or difference between aggregate meter reading and the sum of actual
power consumption.
The examination relies on the measurement of voltage and current waveforms taken
at the electrical service entrance (ESE). These data serve as the basis for deducing the
operational conditions and power consumption of each individual load. Load signatures,
also known as load features, are derived from these waveforms, providing measurable
𝑝𝑝𝑘𝑘 (t)—power consumed by the kth appliance,
𝑒𝑒(𝑡𝑡) —error or difference between aggregate meter reading and the sum of actual
power consumption.
The examination relies on the measurement of voltage and current waveforms taken
Electronics 2024, 13, 1420 at the electrical service entrance (ESE). These data serve as the basis for deducing the op-
4 of 21
erational conditions and power consumption of each individual load. Load signatures,
also known as load features, are derived from these waveforms, providing measurable
parameters that
parameters that reveal
reveal information
information about
about the
the nature
nature and
and operating
operating status
status of
of individual
individual
appliances. Appliances can be categorized into distinct types based on their load signa-
appliances. Appliances can be categorized into distinct types based on their load signatures,
tures, shaping the approach to disaggregation:
shaping the approach to disaggregation:
•• Type-I appliances,
Type-I appliances, such
such as as toasters
toasters and
andboilers,
boilers,exhibit
exhibitaastraightforward
straightforwardON/OFF
ON/OFF
state.
state.
•• Type-IIdevices
Type-II deviceslike
likewashing
washingmachines
machinesand andovens
ovens operate
operate with
with multiple
multiple (finite)
(finite) num-
number
beroperating
of of operating states
states withwith recognizable
recognizable patterns.
patterns.
•• Type-III devices,
Type-III devices, presented
presented by by dimmer
dimmer lights,
lights, belong
belong to
to continuously
continuously variable
variable de-
de-
vices (CVD), presenting a challenge in disaggregation due to their constantly
vices (CVD), presenting a challenge in disaggregation due to their constantly varying varying
consumption.
consumption.
•• Type-IV,devices
Type-IV, devicesthat
that are
are constantly
constantly inin operation
operation and
and have
have different
different energy
energy consump-
consump-
tion modes
tion modes like
like smoke
smoke detectors
detectors and
and refrigerators.
refrigerators.
Given the
Given the diversity
diversity outlined
outlined above,
above, developing
developing anan accurate
accurate yet
yet broadly
broadly applicable
applicable
NILM system
NILM system isis aa challenging
challenging task.
task. Consequently, many algorithms
Consequently, many algorithms are
are designed
designed to to focus
focus
on identifying
on identifying only
only the
the most
most significant appliances. This
significant appliances. This strategic
strategic approach
approach acknowledges
acknowledges
the complexity
the complexity of of capturing
capturing thethe varied
varied operational
operational signatures
signatures across
across different
different appliance
appliance
types while aiming to provide targeted and effective load disaggregation. The
types while aiming to provide targeted and effective load disaggregation. The goal
goal is
is to
to
strike a balance
balancebetween
betweenaccuracy
accuracyandandgeneralization, ensuring
generalization, ensuringthat thethe
that NILM
NILM system can
system
reliably
can identify
reliably and and
identify monitor key appliances
monitor without
key appliances becoming
without overly
becoming intricate
overly and chal-
intricate and
lenging to implement
challenging to implement [30,31]. A general
[30,31]. NILM
A general NILM process
processcan
canbebepresented
presentedin in four phases
four phases
and observed
and observed inin Figure
Figure 1.
1.
Figure 1.
Figure 1. The
The general
general flow
flow of
of the
the NILM
NILM technique.
technique.
2.1. Data Collection
2.1. Data Collection
The initial step in any NILM algorithm involves data acquisition, typically obtained
The initial step in any NILM algorithm involves data acquisition, typically obtained
from smart meters. The crucial question in load disaggregation is determining the opti-
from smart meters. The crucial question in load disaggregation is determining the optimal
mal data collection frequency for smart meters to ensure accurate appliance identification
datapower
and collection frequency
estimation. fortrade-off
The smart meters
betweento ensure accurate
high and appliance
low data identification
frequencies and
significantly
power estimation.
impacts The trade-off
NILM algorithm betweenHigh-resolution
effectiveness. high and low data frequencies significantly
measurements, often exceeding im-
pacts NILM algorithm effectiveness. High-resolution measurements, often exceeding
1 Hz, can extract transient features crucial for identifying appliances with similar power con- 1
Hz, can extract transient features crucial for identifying appliances with similar
sumptions, particularly during state transitions. On the other hand, excessively small data power
consumptions,
frequencies limitparticularly duringto
feature extraction state transitions.
steady-state On the otherproving
characteristics, hand, excessively small
it insufficient for
data frequencies limit feature extraction to steady-state
differentiating appliances with comparable power usage. characteristics, proving it insuffi-
cientThe
for differentiating appliances
sampling frequency, with comparable
an essential power
factor in data usage.
pre-processing, varies based on
the appliance signature of interest, with researchers recognizing the utility of both low-
frequency and high-frequency signatures. High-frequency data, however, require high-end
hardware, additional data storage, and have transmission problems, and thereby increasing
costs. Recent NILM solutions strategically balance algorithmic efficiency and performance
across a diverse range of appliances, often favoring low-frequency signals to achieve
satisfactory results [32].
The algorithms differ significantly in their approach to handling data at the collection
stage. The below-mentioned algorithms have the following differences: DTW-KNN excels
Electronics 2024, 13, 1420 5 of 21
in time series classification, accommodating speed variations but lacks explicit handling
of missing data or noise. XgBoost robustly handles tabular data, automatically adapting
to missing data and outliers, despite needing careful tuning and pre-processing. Logistic
Regression, suitable for binary classification, demands meticulous pre-processing, espe-
cially for categorical data, and lacks inherent handling of missing values and noise. LSTM
networks, an expert at processing sequential data, are robust to noise but may struggle with
lengthy sequences, necessitating truncation or summarization and requiring numerical
input. Based on the above mentioned each algorithm offers unique strengths, and optimal
performance relies on meticulous data pre-processing and tuning tailored to the task and
data characteristics.
its efficiency, the challenge lies in the time complexity of DTW, especially for large datasets
with lengthy sequences [41]. However, understanding the nuances of DTW allows for
necessary adjustments to enhance the algorithm’s speed, ensuring practical and efficient
time series classification in the context of NILM.
For one-dimensional time series denoted as f (x(i)) and f (y(j)), where i and j represent
time points in series, and x and y are vectors, characterized by their Euclidian distances [42].
The DTW algorithm involves creating a local cost matrix D storing pairwise distances
between x and y. The algorithm seeks an optimal warping path under certain constraints
using dynamic programming, determining the DTW distance as the minimum accumulated
distance normalized by the length of the optimal warping path. This alignment process
minimizes the “distance” between the two-time series is presented in Equation (2):
Di−1,j−1 (match)
Di,j = d xi , y j + min Di−1,j (insertion), (2)
Di,j−1 (deletion)
where d xi , y j = xi − y j .
The k-nearest neighbors (K-NN) nonparametric statistical algorithm relies on k training
samples in proximity to the feature space as input. The classification of an object is based
on the most frequently occurring class among the identified k nearest points. The parameter
k denotes the number of nearest neighbors influencing the classification process, and the
selection of an appropriate k is a nuanced yet crucial step for optimizing the model’s
performance [43].
The integration of DTW and K-NN in a combined approach is motivated by the
distinctive strengths of each method. This integration yields a more robust and accurate
predictive model, specially tailored for applications in time series analysis. Essentially, the
synergy between DTW and K-NN capitalizes on DTW’s efficacy in capturing temporal
nuances and K-NN’s proficiency in pattern classification based on similarity. This combined
approach facilitates a more comprehensive analysis of time series data, proving particularly
beneficial when dealing with complex and dynamic patterns [43].
where
Fk−1 ( xi ) is the prediction result of previous k − 1 trees,
f k ( xi )—k-th decision tree.
The algorithm’s objective function involves a cost function, assessing the error between
predicted and actual values.
n k
∑i=1 L(yi , ŷi ) + ∑ j=1 Ω
Fobj = fj (4)
Figure2.2. Structure
Figure Structureof
ofthe
theLSTM
LSTMNetwork.
Network.
seasonal patterns. They enable neural networks, especially LSTM models, to better capture
recurring patterns in tasks like time series forecasting and energy consumption model-
ing [52]. When using circular timestamps with LSTMs, it is crucial to encode timestamps as
angles on a unit circle and design networks to handle circular sequences effectively. This
approach enhances LSTM models’ ability to accurately learn cyclic patterns across diverse
domains, offering a compact yet powerful representation of time-related data [53].
Figure3.3.The
Figure Theresidential
residentialload
loadthroughout
throughoutthe
theyear.
year.
Figure 3. The residential load throughout the year.
The hourly energy consumption data is presented in Figure 5 indicating the highest
energy utilization during the evening hours around 7 and 8 p.m., coinciding with most
occupants being at home. While there isn’t a specific hour of lowest energy consumption
evident in the analysis, energy usage tends to be lower in the early morning hours between
2 to 6 a.m. In Figure 6, the individual load patterns of devices like stoves, rainwater
drainers, sauna, sockets, water pumps, washing machines, lights and heating are shown
during a single day. The sauna, washing machine, electric stove, heater, and water pump
are the most energy-consuming loads when they are being utilized.
occupants
occupants being
being at
at home.
home. While
While there
there isn’t
isn’t aa specific
specific hour
hour of
of lowest
lowest energy
energy consumption
consumption
evident
evident in the analysis, energy usage tends to be lower in the early morning hours
in the analysis, energy usage tends to be lower in the early morning hours between
between
22 to
to 66 AM.
AM. In
In Figure
Figure 6,
6, the
the individual
individual load
load patterns
patterns of of devices
devices like
like stoves,
stoves, rainwater
rainwater drain-
drain-
ers,
ers, sauna,
sauna, sockets,
sockets, water
water pumps,
pumps, washing
washing machines,
machines, lights
lights and
and heating
heating are
are shown
shown during
during
Electronics 2024, 13, 1420 aa single
single day.
day. The
The sauna,
sauna, washing
washing machine,
machine, electric
electric stove,
stove, heater,
heater, and
and water
water pump
pump are
are the
the
11 of 21
most energy-consuming loads when they are being
most energy-consuming loads when they are being utilized. utilized.
Logistic Regression Solver: “lbfgs”, Penalty: “L2”, Class Weighted: “balanced”, Max_Iteration: 150, Data Shuffle: Yes.
DTW_KNN Number of Neighbors: 5, Window Size: 150 min (10 samples), Sample Signal Length: 360, Data Shuffle: No.
Booster: “dart”, Device: “GPU”, eta: 0.5, Max Depth: 4, Min_Child_Depth: 1, Max_Delta_Step: 1, Sub
XgBoost Sample: 0.9, Sampling Method: “Subsample”, Objective: “Binary Logistic”, Evaluation Metrics: “log loss”,
Early Stopping: 10, Data Shuffle: Yes.
Layer 1: Units: 50, Number of Features: 11
Layer 2: Dense:1, Activation: “Sigmoid”
LSTM
Optimizer: “Adam”, Learning Rate: 0.0005, Epochs: 60, Batch size: 32, Early Stopping: 10, metrics:
“Accuracy”, Loss: “Binary Cross Entropy”, Validation Split: 0.1, Class Weight: “Balanced”, Data Shuffle = No
Time-related features play a significant role in modeling. Extracting the hour of the
day, time interval number (with 15 min resolution), day of the week, and month provides
valuable context. Generating cosine and sine values for these above-mentioned features
encodes cyclic behavior and enhances models’ ability to learn from data. Additionally labeling
weekends and holidays provides further insights for predictive modeling. Manual labeling
on/off state of appliances based on specific thresholds ensures that the model can learn the
underlying patterns as these labels serve as our target variable for supervised learning.
Handling power consumption patterns, particularly for devices with consistent steady
consumption, requires a method that effectively identifies meaningful deviations in power
usage, filtering out noise and focusing on relevant changes. The approach involves estab-
lishing a baseline consumption level for devices such as sockets and lights, representing the
minimal power draw when inactive. Significant increases in power consumption beyond
this baseline are then interpreted as the device being turned on. Additionally, recognizing
that certain devices may exhibit consistent consumption patterns, such as modems, allows
for their exclusion to prevent false positives. Overall, this approach balances sensitivity in
detecting genuine “on” states with specificity in avoiding false positives, offering a practical
means to enhance energy consumption prediction models.
To avoid overfitting in our LSTM and XgBoost networks, we employ early stopping.
This method halts the training when the model fails to improve on the validation data after
several attempts. It monitors metrics such as loss or accuracy and terminates the training
prematurely. This ensures that the model performs well with new data by stopping at the
optimal moment. However, we acknowledge that including the training behavior of the
models under investigation can offer additional insights into the design process. To this end,
we have provided some examples related to the training procedures of LSTM and XgBoost
networks below. Note that some of the training sessions ended before reaching the maximum
epoch number due to the early stopping callback. Figure 7 shows the logarithmic loss curves
related to XgBoost. In Figure 8, the LSTM training and validation losses are depicted.
LSTM and XgBoost networks below. Note that some of the training sessions ended before
reaching the maximum epoch number due to the early stopping callback. Figure 7 shows
Electronics 2024, 13, 1420
the logarithmic loss curves related to XgBoost. In Figure 8, the LSTM training and valida-
13 of 21
tion losses are depicted.
Figure
Figure 7. 7. Logarithmic
Logarithmic loss
loss curves
curves related
related to to XgBoost
XgBoost training
training procedure.
procedure.
Electronics 2024, 13, x FOR PEER REVIEW 14 of 21
Electronics 2024, 13, 1420 14 of 21
Figure
Figure 8. LSTM
8. LSTM networks
networks training
training and
and validation
validation loss
loss errors
errors forfor some
some of the
of the appliances.
appliances.
5. 5. Results
Results andand Discussion
Discussion
AsAs previously
previously mentioned,
mentioned, our
our data
data comprise
comprise a 1-year
a 1-year aggregated
aggregated record
record of of electricity
electricity
demand,
demand, including
including both
both thethe overall
overall demand
demand andandthethe demands
demands and and consumption
consumption patterns
patterns
of of each
each appliance,
appliance, with
with a resolution
a resolution of of15 15 min.
min. Consequently,
Consequently, thethe dataset
dataset encompasses
encompasses
approximately
approximately 35,000
35,000 data
data measurements
measurements forfor
eacheach sample.
sample. WeWehave have allocated
allocated 80% 80%of of
thethe
data for training and validation, and 20% for testing purposes. It is critical to highlight
data for training and validation, and 20% for testing purposes. It is critical to highlight that
wethat
selected a 1-yearaperiod
we selected 1-yeartoperiod
capturetoall fluctuations
capture related to seasonality.
all fluctuations For example,
related to seasonality. theex-
For
sauna is mostly used during the colder seasons, while during summer,
ample, the sauna is mostly used during the colder seasons, while during summer, the the dataset records
very few instances
dataset of sauna
records very usage. This
few instances ofpattern holds true
sauna usage. Thisfor heating
pattern systems
holds as well.
true for heating sys-
As you
tems as well. truly mentioned a training time and resource usage investigation is also very
important As you truly mentioned a training time and resource usage investigation istraining
to make a fair comparison among proposed methods. To this end, the also very
time and
important RAM to resource
make a fairusage for all theamong
comparison modelsproposed
have been provided
methods. Tointhis
Table
end,3. the training
The XgBoost algorithm stands out with exceptional performance across most cases,
time and RAM resource usage for all the models have been provided in Table 3.
except for the “other” labeled group, which likely encompasses aggregated power con-
sumption or unknown
Table 3. Comparison loads. Given
of computation costitstraining
consistent
times.performance, XgBoost emerges as a
robust choice for the given task. The logistic regression demonstrates varying success rates,
Appliance
achieving Name
optimal Method
results in detecting sauna status RAMand Usage
rainwaterTraining
drainersTime Duration
but faltering in
other cases. LSTM 652 MB 104.62 s
Stove
Dynamic time warping XgBoostwith K-nearest neighbors 13.27 MB segments consumption 2.58 s curves
into 400-length samples, Logistic Regression
employing a warping 17 MB
window size of 10 0.156 s to deter-
samples
mine appliance classesLSTM based on the five nearest neighbors.
456 MB While generally
228.74 seffective,
misidentifications between appliances like washing machines and stoves indicate room
Sockets_2nd XgBoost 4.6 MB 8.07 s
for improvement—perhaps through refined feature engineering. Additionally, mislabeling
Logistic Regression 0.87 MB 0.027 s
lights_1st and lights_2nd as “others” due to their similar patterns underscores the method’s
susceptibility to mixingLSTM closely related patterns. 381 MB 141.05 s
Heating_2nd XgBoost 5.65 MB 3.97 s
Logistic Regression 1.12 MB 0.053 s
LSTM 506 MB 288.38 s
Washing Machine
XgBoost 43 MB 7.84 s
Electronics 2024, 13, 1420 15 of 21
appliance usage, ensuring efficient energy usage and potentially identifying malfunctioning
devices. Conversely, in commercial settings like smart buildings, reducing false positives
is essential to avoid unnecessary interventions and maintain occupants’ comfort16while
Electronics 2024, 13, x FOR PEER REVIEW of 21
optimizing energy consumption.
In the provided Figure 9 the confusion matrices indicate that the LSTM method
performed less effectively compared to other techniques. One possible reason for this
discrepancy
discrepancy could
could be
be the
the suboptimal
suboptimal sampling
sampling rate
rate of 15 min.
of 15 min. Previous
Previous studies
studies have
have
shown
shown that
that increasing
increasing the
the measurement
measurement frequency
frequency can
can significantly
significantly enhance
enhance prediction
prediction
accuracy
accuracy in
inNILM
NILMapplications.
applications.Additionally, fine-tuning
Additionally, fine-tuningthethe
LSTM method
LSTM methodthrough ar-
through
chitectural adjustments or hyperparameter tuning may further improve its performance.
architectural adjustments or hyperparameter tuning may further improve its performance.
Therefore,
Therefore, future
future research
research should
should explore
explore optimizing
optimizing the
the sampling
sampling frequency
frequency alongside
alongside
other
other methodological enhancements to maximize the effectiveness of LSTM-based
methodological enhancements to maximize the effectiveness of LSTM-based NILMNILM
approaches.
approaches.
XGBoost LSTM
Sockets_1st heating_2nd Sockets_1st heating_2nd
off
off
off
Actual Status
Actual Status
on
on
on
off on off on off on off on
Predicted Status Predicted Status Predicted Status Predicted Status
off
off
Actual Status
Actual Status
on
on
off on off on
off on off on Predicted Status Predicted Status
Predicted Status Predicted Status
Figure
Figure 9.
9. Confusion
Confusion matrices
matrices obtained
obtained for
for specific
specific threshold
threshold value.
value.
However,
However, comparative
comparativeanalyses
analyses(see
(seeTable
Table 4)
4) reveal
reveal that
that alternative
alternative models
models such
such as
as
XgBoost and DTW with KNN outperform LSTM in the specific scenario under investiga-
XgBoost and DTW with KNN outperform LSTM in the specific scenario under investigation,
tion, emphasizing
emphasizing the importance
the importance of exploring
of exploring diverse
diverse modelmodel architectures
architectures and method-
and methodologies.
ologies. Considerations
Considerations of interpretability,
of interpretability, computational
computational efficiency,
efficiency, and easeand ease of imple-
of implementation
mentation will be
will be pivotal pivotal in inappropriate
in inappropriate modelfor
model selection selection
a givenfor a given task.
task.
On the other hand, LSTM can be significantly influenced by the sampling rate. Additionally,
the amount of training data has a substantial impact on the performance of neural networks
due to their long-term memory capability. Sampling rates matter in Logistic Regression as
well. Secondly, XgBoost, as a representative of the family of gradient boosting algorithms,
is more robust to overfitting compared to deep learning models like LSTM. This could
be particularly beneficial if the data set is not very large, as in our case. XgBoost has
many parameters, which gives the designer the opportunity to tune the model and prevent
overfitting.
In general, all algorithms have their strengths and weaknesses. For instance, LSTM has
the ability to capture long-term dependencies, but it may require a large amount of data and
computational resources. Logistic Regression is a simple and fast algorithm, but it may not
capture complex patterns in the data. DTW-KNN is good at capturing temporal patterns,
but it may be sensitive to noise and outliers. All of the above leads to the conclusion that it
is reasonable to focus on developing hybrid models that combine the strengths of different
algorithms. Moreover, improving the robustness and efficiency of existing algorithms is
valuable as well. This approach not only enhances the performance of the model but also
makes it more adaptable to various types of data and tasks.
6. Conclusions
As energy consumption monitoring becomes increasingly vital in the transition to-
wards sustainable practices, this research provides valuable guidance for the selection and
deployment of ML techniques in Non-Intrusive Load Monitoring systems. This paper
presents a thorough analysis of machine learning techniques employed by NILM through a
meticulous examination and comparison, we have elucidated the efficacy and adaptability
of various algorithms in disaggregating energy consumption data accurately. Our research
underscores the necessity of tailored approaches, emphasizing the significance of selecting
suitable models aligned with the specific characteristics and objectives of the data at hand.
By providing a nuanced understanding of the strengths and limitations inherent in different
methodologies, our study offers valuable insights that can inform the development and
implementation of more efficient NILM systems. Furthermore, our findings highlight
the multifaceted nature of NILM challenges and the complexity involved in accurately
discerning individual appliance signatures from aggregate energy data. The results of this
study indicate that the LSTM and XgBoost algorithms give the most accurate identification
results, however, XgBoost has the best results on average.
Looking ahead, as the field of NILM continues to evolve, further research and innova-
tion are warranted to address persistent challenges and capitalize on emerging opportuni-
ties. By fostering interdisciplinary collaborations and leveraging advances in data science,
artificial intelligence, and energy engineering, we can unlock new avenues for improving
the accuracy, efficiency, and scalability of NILM solutions. Ultimately, our collective efforts
aim to empower consumers with actionable insights, facilitate informed decision-making,
and promote sustainable energy consumption practices in support of a more resilient and
environmentally conscious future.
Author Contributions: Conceptualization, N.S., K.V. and O.H.; methodology, N.S., K.V. and H.N.H.;
software, K.V. and H.N.H.; validation, O.H. and J.B.; formal analysis, N.S., K.V. and O.H.; investiga-
tion, N.S. and K.V.; resources, N.S., J.B. and E.P.; data curation, K.V. and H.N.; writing—original draft
preparation, N.S., K.V. and H.N.H.; writing—review and editing, O.H., J.B. and E.P.; visualization,
K.V. and H.N.H.; supervision, O.H., J.B. and E.P.; project administration, O.H. and E.P.; funding
acquisition, O.H. All authors have read and agreed to the published version of the manuscript.
Funding: This work was supported by the Estonian Research Council grant PRG 675 and the Euro-
pean Commission through DUT Horizon Europe Partnership project FLEDGE grant No. MOB3PRT1.
Data Availability Statement: Data are contained within the article.
Conflicts of Interest: The authors declare no conflicts of interest.
Electronics 2024, 13, 1420 19 of 21
References
1. Ji, X.; Huang, H.; Chen, D.; Yin, K.; Zuo, Y.; Chen, Z.; Bai, R. A Hybrid Residential Short-Term Load Forecasting Method Using
Attention Mechanism and Deep Learning. Buildings 2023, 13, 72. [CrossRef]
2. Jawad, M.; Asghar, H.; Arshad, J.; Javed, A.; Qureshi, M.B.; Ali, S.M.; Shabbir, N.; Rassõlkin, A. A Novel Renewable Powered
Stand-Alone Electric Vehicle Parking-Lot Model. Sustain. Energy Grids Netw. 2023, 33, 100992. [CrossRef]
3. Mirza, Z.T.; Anderson, T.; Seadon, J.; Brent, A. A thematic analysis of the factors that influence the development of a renewable
energy policy. Renew. Energy Focus 2024, 49, 100562. [CrossRef]
4. Abumohsen, M.; Owda, A.Y.; Owda, M. Electrical Load Forecasting Using LSTM, GRU, and RNN Algorithms. Energies 2023, 16,
2283. [CrossRef]
5. Azizi, E.; Ahmadiahangar, R.; Rosin, A.; Bolouki, S. Characterizing Energy Flexibility of Buildings with Electric Vehicles and
Shiftable Appliances on Single Building Level and Aggregated Level. Sustain. Cities Soc. 2022, 84, 103999. [CrossRef]
6. Azizi, E.; Shotorbani, A.M.; Hamidi-Beheshti, M.T.; Mohammadi-Ivatloo, B.; Bolouki, S. Residential Household Non-Intrusive
Load Monitoring via Smart Event-Based Optimization. IEEE Trans. Consum. Electron. 2020, 66, 233–241. [CrossRef]
7. Opoku, R.; Obeng, G.Y.; Adjei, E.A.; Davis, F.; Akuffo, F.O. Integrated System Efficiency in Reducing Redundancy and Promoting
Residential Renewable Energy in Countries without Net-Metering: A Case Study of a SHS in Ghana. Renew. Energy 2020, 155,
65–78. [CrossRef]
8. Azizi, E.; Beheshti, M.T.H.; Bolouki, S. Event Matching Classification Method for Non-Intrusive Load Monitoring. Sustainability
2021, 13, 693. [CrossRef]
9. Lizana, J.; Friedrich, D.; Renaldi, R.; Chacartegui, R. Energy Flexible Building through Smart Demand-Side Management and
Latent Heat Storage. Appl. Energy 2018, 230, 471–485. [CrossRef]
10. Kaselimi, M.; Protopapadakis, E.; Voulodimos, A.; Doulamis, N.; Doulamis, A. Multi-Channel Recurrent Convolutional Neural
Networks for Energy Disaggregation. IEEE Access 2019, 7, 81047–81056. [CrossRef]
11. Schirmer, P.A.; Mporas, I. Non-Intrusive Load Monitoring: A Review. IEEE Trans. Smart Grid 2023, 14, 769–784. [CrossRef]
12. Angelis, G.F.; Timplalexis, C.; Salamanis, A.I.; Krinidis, S.; Ioannidis, D.; Kehagias, D.; Tzovaras, D. Energformer: A New
Transformer Model for Energy Disaggregation. IEEE Trans. Consum. Electron. 2023, 69, 308–320. [CrossRef]
13. Azizi, E.; Beheshti, M.T.H.; Bolouki, S. Quantification of Disaggregation Difficulty with Respect to the Number of Smart Meters.
IEEE Trans. Smart Grid 2022, 13, 516–525. [CrossRef]
14. Shabbir, N.; Kutt, L.; Jawad, M.; Iqbal, M.N.; Ghahfarokhi, P.S. Forecasting of Energy Consumption and Production Using
Recurrent Neural Networks. Adv. Electr. Electron. Eng. 2020, 18, 190–197. [CrossRef]
15. Ding, G.; Wu, C.; Wang, Y.; Liang, Y.; Jiang, X.; Li, X. A Novel Non-Intrusive Load Monitoring Method Based on Quantum
Particle Swarm Optimization Algorithm. In Proceedings of the 2019 11th International Conference on Measuring Technology and
Mechatronics Automation (ICMTMA), Qiqihar, China, 28–29 April 2019; pp. 230–234. [CrossRef]
16. Nuran, A.S.; Murti, M.A.; Suratman, F.Y. Non-Intrusive Load Monitoring Method for Appliance Identification Using Random
Forest Algorithm. In Proceedings of the 2023 IEEE 13th Annual Computing and Communication Workshop and Conference
(CCWC), Las Vegas, NV, USA, 8–11 March 2023; pp. 754–758. [CrossRef]
17. Raiker, G.A.; Reddy, B.S.; Umanand, L.; Agrawal, S.; Thakur, A.S.; Ashwin, K.; Barton, J.P.; Thomson, M. Internet of Things Based
Demand Side Energy Management System Using Non-Intrusive Load Monitoring. In Proceedings of the 2020 IEEE International
Conference on Power Electronics, Smart Grid and Renewable Energy (PESGRE2020), Cochin, India, 2–4 January 2020; pp. 5–9.
[CrossRef]
18. Al-Khadher, O.; Mukhtaruddin, A.; Hashim, F.R.; Azizan, M.M.; Mamat, H.; Mani, M. Comparison of Non-Intrusive Load
Monitoring Supervised Methods Using Harmonics as Feature. In Proceedings of the 2022 International Conference on Electrical,
Computer and Energy Technologies (ICECET), Prague, Czech Republic, 20–22 July 2022; pp. 1–6. [CrossRef]
19. Moradzadeh, A.; Zeinal-Kheiri, S.; Mohammadi-Ivatloo, B.; Abapour, M.; Anvari-Moghaddam, A. Support Vector Machine-
Assisted Improvement Residential Load Disaggregation. In Proceedings of the 2020 28th Iranian conference on electrical
engineering (ICEE), Tabriz, Iran, 4–6 August 2020; pp. 1–6. [CrossRef]
20. Shiddieqy, H.A.; Hariadi, F.I.; Adijarto, W. Plug-Load Classification Based on CNN from V-I Trajectory Image Using STM32. In
Proceedings of the 2021 International Symposium on Electronics and Smart Devices (ISESD), Bandung, Indonesia, 29–30 June 2021.
[CrossRef]
21. Giannuzzo, L.; Minuto, F.D.; Schiera, D.S.; Lanzini, A. Reconstructing Hourly Residential Electrical Load Profiles for Renewable
Energy Communities Using Non-Intrusive Machine Learning Techniques. Energy AI 2024, 15, 100329. [CrossRef]
22. Hernández, Á.; Nieto, R.; de Diego-Otón, L.; Pérez-Rubio, M.C.; Villadangos-Carrizo, J.M.; Pizarro, D.; Ureña, J. Detection of
Anomalies in Daily Activities Using Data from Smart Meters. Sensors 2024, 24, 515. [CrossRef] [PubMed]
23. Koasidis, K.; Marinakis, V.; Doukas, H.; Karamaneas, A.; Nikas, A.; Doumouras, N. Equipment- and Time-Constrained Data
Acquisition Protocol for Non-Intrusive Appliance Load Monitoring. Energies 2023, 16, 7315. [CrossRef]
24. Hosseini, S.S.; Delcroix, B.; Henao, N.; Agbossou, K.; Kelouwani, S. Towards Feasible Solutions for Load Monitoring in Quebec
Residences. Sensors 2023, 23, 7288. [CrossRef] [PubMed]
25. Shareef, H.; Asna, M.; Errouissi, R.; Prasanthi, A. Rule-Based Non-Intrusive Load Monitoring Using Steady-State Current
Waveform Features. Sensors 2023, 23, 6926. [CrossRef]
Electronics 2024, 13, 1420 20 of 21
26. Azizi, E.; Beheshti, M.T.H.; Bolouki, S. Appliance-Level Anomaly Detection in Nonintrusive Load Monitoring via Power
Consumption-Based Feature Analysis. IEEE Trans. Consum. Electron. 2021, 67, 363–371. [CrossRef]
27. Welikala, S.; Dinesh, C.; Ekanayake, M.P.B.; Godaliyadda, R.I.; Ekanayake, J. Incorporating Appliance Usage Patterns for
Non-Intrusive Load Monitoring and Load Forecasting. IEEE Trans. Smart Grid 2019, 10, 448–461. [CrossRef]
28. Tao, Y.; Qiu, J.; Lai, S.; Wang, Y.; Sun, X. Reserve Evaluation and Energy Management of Micro-Grids in Joint Electricity Markets
Based on Non-Intrusive Load Monitoring. IEEE Trans. Ind. Appl. 2023, 59, 207–219. [CrossRef]
29. Ma, C.; Yin, L. Deep Flexible Transmitter Networks for Non-Intrusive Load Monitoring of Power Distribution Networks. IEEE
Access 2021, 9, 107424–107436. [CrossRef]
30. Garcia, F.D.; Souza, W.A.; Diniz, I.S.; Marafão, F.P. NILM-Based Approach for Energy Efficiency Assessment of Household
Appliances. Energy Inform. 2020, 3, 10. [CrossRef]
31. Liu, H.; Wu, H.; Yu, C. A Hybrid Model for Appliance Classification Based on Time Series Features. Energy Build. 2019, 196,
112–123. [CrossRef]
32. Gopinath, R.; Kumar, M.; Prakash Chandra Joshua, C.; Srinivas, K. Energy Management Using Non-Intrusive Load Monitoring
Techniques—State-of-the-Art and Future Research Directions. Sustain. Cities Soc. 2020, 62, 102411. [CrossRef]
33. Du, Z.; Yin, B.; Zhu, Y.; Huang, X.; Xu, J. A NILM Load Identification Method Based on Structured V-I Mapping. Sci. Rep. 2023,
13, 21276. [CrossRef]
34. Reddy, R.; Garg, V.; Pudi, V. A Feature Fusion Technique for Improved Non-Intrusive Load Monitoring. Energy Inform. 2020, 3, 9.
[CrossRef]
35. Ruano, A.; Hernandez, A.; Ureña, J.; Ruano, M.; Garcia, J. NILM Techniques for Intelligent Home Energy Management and
Ambient Assisted Living: A Review. Energies 2019, 12, 2203. [CrossRef]
36. Chen, T.; Guestrin, C. XGBoost: A Scalable Tree Boosting System. In Proceedings of the 22nd Acm Sigkdd International Conference
on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [CrossRef]
37. He, K.; Stankovic, V.; Stankovic, L. Building a Graph Signal Processing Model Using Dynamic Time Warping for Load Disaggre-
gation. Sensors 2020, 20, 6628. [CrossRef]
38. Shabbir, N.; Ahmadiahangar, R.; Rosin, A.; Astapov, V.; Kilter, J. Short-Term PV Energy Generation Forecasting Using Deep
Learning. Telematique 2022, 21, 5844–5850.
39. Wang, R.; Tao, D. DTW-KNN Implementation for Touch-Based Authentication System. In Proceedings of the 2019 5th International
Conference on Big Data Computing and Communications (BIGCOM), QingDao, China, 9–11 August 2019; pp. 318–322. [CrossRef]
40. Feng, Z.; Wang, M.; He, J.; Xiao, W. Real-Time Equipment State Monitoring and Cycle Time Calculation Method Based on
DTW-KNN. In Proceedings of the 2023 8th International Conference on Intelligent Computing and Signal Processing (ICSP),
Xi’an, China, 21–23 April 2023; pp. 1350–1353. [CrossRef]
41. Angelis, G.F.; Timplalexis, C.; Krinidis, S.; Ioannidis, D.; Tzovaras, D. NILM Applications: Literature Review of Learning
Approaches, Recent Developments and Challenges. Energy Build. 2022, 261, 111951. [CrossRef]
42. Imtiaz, M.A.; Raja, G. Isolated Word Automatic Speech Recognition (ASR) System Using MFCC, DTW & KNN. In Proceedings
of the 2016 Asia Pacific Conference on Multimedia and Broadcasting (APMediaCast), Bali, Indonesia, 17–19 November 2017;
pp. 106–110. [CrossRef]
43. Yang, N.C.; Sung, K.L. Non-Intrusive Load Classification and Recognition Using Soft-Voting Ensemble Learning Algorithm with
Decision Tree, K-Nearest Neighbor Algorithm and Multilayer Perceptron. IEEE Access 2023, 11, 94506–94520. [CrossRef]
44. Shabbir, N.; Ahmadiahangar, R.; Rosin, A.; Jawad, M.; Kilter, J.; Martins, J. XgBoost Based Short-Term Electrical Load Forecasting
Considering Trends & Periodicity in Historical Data. In Proceedings of the 2023 IEEE International Conference on Energy
Technologies for Future Grids (ETFG), Wollongong, Australia, 3–6 December 2023; pp. 1–6. [CrossRef]
45. Chen, Z.; Chen, J.; Xu, X.; Peng, S.; Xiao, J.; Qiao, H. Non-Intrusive Load Monitoring Based on Feature Extraction of Change-Point
and Xgboost Classifier. In Proceedings of the 2020 IEEE 4th Conference on Energy Internet and Energy System Integration (EI2),
Wuhan, China, 30 October–November 2020; pp. 2652–2656. [CrossRef]
46. Semmelmann, L.; Henni, S.; Weinhardt, C. Load Forecasting for Energy Communities: A Novel LSTM-XGBoost Hybrid Model
Based on Smart Meter Data. Energy Inform. 2022, 5, 24. [CrossRef]
47. Mo, H.; Sun, H.; Liu, J.; Wei, S. Developing Window Behavior Models for Residential Buildings Using XGBoost Algorithm. Energy
Build. 2019, 205, 109564. [CrossRef]
48. Bipin Nair, B.J.; Yadhukrishnan, S.; Manish, A. A Comparative Study on Document Images Classification Using Logistic
Regression and Multiple Linear Regressions. In Proceedings of the 2023 Second International Conference on Augmented
Intelligence and Sustainable Systems (ICAISS), Trichy, India, 23–25 August 2023; pp. 1096–1104. [CrossRef]
49. Shabbir, N.; Kütt, L.; Jawad, M.; Husev, O.; Rehman, A.U.; Gardezi, A.A.; Shafiq, M.; Choi, J.G. Short-Term Wind Energy
Forecasting Using Deep Learning-Based Predictive Analytics. Comput. Mater. Contin. 2022, 72, 1017–1033. [CrossRef]
50. Shabbir, N.; Kutt, L.; Raja, H.A.; Ahmadiahangar, R.; Rosin, A.; Husev, O. Machine Learning and Deep Learning Techniques for
Residential Load Forecasting: A Comparative Analysis. In Proceedings of the IEEE 62nd International Scientific Conference on
Power and Electrical Engineering of Riga Technical University, Riga, Latvia, 15–17 November 2021; pp. 1–5.
51. Mellit, A.; Pavan, A.M.; Lughi, V. Deep Learning Neural Networks for Short-Term Photovoltaic Power Forecasting. Renew. Energy
2021, 172, 276–288. [CrossRef]
Electronics 2024, 13, 1420 21 of 21
52. Hossen, T.; Nair, A.S.; Chinnathambi, R.A.; Ranganathan, P. Residential Load Forecasting Using Deep Neural Networks (DNN).
In Proceedings of the 2018 North American Power Symposium (NAPS), Fargo, ND, USA, 9–11 September 2019. [CrossRef]
53. Shabbir, N.; Ahmadiahangar, R.; Rosin, A.; Husev, O.; Jalakas, T.; Martins, J. Residential DC Load Forecasting Using Long
Short-Term Memory Network (LSTM). In Proceedings of the 2023 IEEE 11th International Conference on Smart Energy Grid
Engineering (SEGE), Oshawa, ON, Canada, 13–15 August 2023; pp. 131–136. [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual
author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to
people or property resulting from any ideas, methods, instructions or products referred to in the content.