Content uploaded by Vibhatha Abeykoon
Author content
All content in this area was uploaded by Vibhatha Abeykoon on Nov 25, 2016
Content may be subject to copyright.
Annual Research Symposium (ARS)-2016
Faculty of Engineering, University of Ruhuna.
Electricity Consumption Pattern Detection
V.L. Abeykoon a , K. D. Nishadi a , R. G. A. Senevirathna a , R.G.A P.S. Ranaveera a ,
M.R. Udawalpola a,*
a Department of Electrical and Information Engineering, University of Ruhuna
* Corresponding Author: rajitha@eie.ruh.ac.lk
Abstract
Increase of the usage of domestic electrical devices causes higher electricity bills. Detecting power consumption
patterns can be used to minimize the electricity bill. This paper discusses how to detect electricity consumption
patterns of domestic power usage via data mining and clustering using machine learning techniques and detect the
device.
A prototype data acquisition device was developed to collect power consumption data and transmit them to a central
database. The analysis is done using neural networks, support vector machines, K-Means, Mean-Shift and Silhouette
classifiers to select a classifier with better performance in real time to detect devices. and record the power
consumption of each device to get a detailed power consumption data set. By analyzing this data set, the device is
indentified and then the classifications are done to detect patterns of device usage, which provide means to optimize
the device handling to minimize the power consumption.
Keywords:
support vector machines, neural networks, K-Means, machine learning, optimization
1. Introduction
Management of energy consumption in domestic environment is very important due to high electrical energy prices
and impact of electricity production on the environment. Current records of power consumption reporting in Sri
Lanka [1] only provides an overall idea about the power consumption of electrical devices. A detailed survey and
analysis of power consumption of households in Sri Lanka haven't being conducted yet. The customers don't get a
clear idea on how the power consumption was carried out by each device and how each device contributes to the
overall power consumption. And also there are no data analysis methods to provide customers a forecasting [9][10]
of power consumption using history of power consumption of a consumer.
With the introduction of digital energy meters different electricity tariff will be applied to different times.
Automatic detecting and profiling electric appliances is necessary for optimizing energy usage. A data acquisition
device is used to extract power composition data for each device. As an intelligent approach, machine learning
techniques can be used to understand the meaning of a data set in a logical way and provide useful outputs from raw
data for different purposes. In this project, a few supervised and unsupervised leaning methods are compared and a
better classifier is chosen for the data clustering and prediction. In considering power consumption patterns, neural
networks and support vector machines are used as supervised learning methods to classify data and predict patterns.
And the advanced clustering algorithms like K-Means, Silhouette were used as unsupervised learning methods for
classifying data. A model will be created to classify electrical devices from each other in order to collect data from
each and every electrical device via the power consumption pattern.
2. Background
A device called smart plug is created to detect the power consumption from each device. And the smart plug
identifies each device using machine learning techniques [14] and classifies data for further analysis [2][3]. There
are many researches done to detect electrical devices in real time and some different researches were done to
optimize and predict the power consumption [4][5][8][9][10]. Here both these scenarios are addressed in order to
provide an advanced overview on power consumption at domestic level in Sri Lanka. There are researches done to
detect electrical devices in real time to collect data with better classification in the earlier stages of data acquisition
[5] to provide a solid foundation for data analysis purposes. And later on neural networks and classification
algorithms are used to detect consumption patterns and forecast power consumption based on the history of power
consumption.
Support Vector Machines (SVM) can be used as a fast classifier [17] which is a supervised learning technique and it
can converge faster and provide classification to a given data set. Artificial Neural Networks or ANN [18] can be
used for classification of data sets based on supervision. Data can be input to the neural network and the network can
be trained. There are hidden layers in the network which do the processing after providing data from an input layer.
The output layer can provide necessary predictions based on a testing data set.
K-Means Classification uses the mean [15] distance between clustering centers of a particular data set and the
algorithm itself adapts and changes the centers based on the new input data and dynamic classification can be done
by this algorithm. This algorithm is useful in unsupervised pattern detection. Silhouette Classification is similar to
the K-Means and the difference is this algorithm provides a graphical output [14] of classification and it learns itself
and provides classification in an unsupervised manner. Mean shift classification [15] provides a classification output
based on calculating mean between the centers of classification and this algorithm is also an unsupervised way of
classifying and predicting.
3. Experimental Analysis
A current transformer is used to measure the current and AC-AC adapter for the measurement of voltage. These
readings are directly fed to the micro-controller and there the real power, apparent power, vrms, irms and power
factor is calculated.
In analyzing the power consumption in domestic level the present method in Sri Lanka only provides an overall
view of the power consumption and cost. On the other hand the separate data extraction from devices provides more
detailed view of consumption. There are main factors that have to be considered, before creating a mathematical
model to analyze the data.
Devices like fans, irons, washing machines, refrigerators possess different modes of action. The complex behaviour
in these devices is being sorted out by recording data for each and every mode of action. So additional data
acquisition is done here. In the usage many devices are used in the same time, so there has to be a way of sorting out
power consumption from each device. This challenge is solved by the data acquisition device which collects data
from devices connected to it. The constraint is there has to be at least one data acquisition device for each and every
device. The data acquisition should not depend on the external factors like temperature, electromagnetic
interference, and communication failures. In some cases the voltage drops can occur due to many reasons and the
effect on the data collected must be verified based on the given scenario.
Electrical devices doesn't consume power in a constant way, the consumption fluctuates around an average value. In
the first few milliseconds of acquiring power it is not in the stabilized condition it takes a short time to get stabilized.
This stabilized data is the useful data to detect devices.
The smart data acquisition system extracts data and by using
clustering and classification algorithms these data is
being categorized. In clustering and classification process a unique signature from each device is being identified. In
classification process, main parameters; active power, apparent power, vrms, irms and phase shift are taken in to
consideration. All the data sets were collected from stabilized mode of operation. So the detection of devices starts
from stabilized mode. And also different mode of actions shows different profiles for the same device. So complex
and accurate analysis methods are important to differentiate these conditions.
Table 1 Data Acquisition Sample
Active Power
Reactive Power
Vrms
Irms
Phase Shift
Id
Device Name
59.13
63.00
232.60
0.27
0.94
1
Bulb
751.33
752.00
210.82
3.57
1.00
2
Toaster
63.66
64.60
228.71
0.28
0.99
3
Fan(Mode I)
211.02
237.00
225.77
1.05
0.89
4
Blender (Mode I)
Fig. 1. Accuracy of Data Acquisition Fig. 2. Multiple mode of a device
Fig. 3. Stabilizing Power Acquisition
Supervised Learning
In this analysis support vector machines (SVM), artificial neural networks are mainly used. In the usage of SVM and
ANN, a data set obtained from the smart data acquisition device was used for the training of these algorithms. In
ANN, the model was designed with 100 hidden layers and single input and output layers were used. And initially
provided a learning rate of 0.001 by testing data for different learning rates and hidden layers. These two values
provided a promising accuracy to the dataset.
Unsupervised Learning
In unsupervised learning the output group is decided by the algorithm itself. The only input to the algorithm is a
training data set and it clusters the inputs by itself. In this K-Means, Mean-Shift and Silhouette algorithms were used
to test the data set and classify data. The K-Means algorithm provides a higher accurate results than other two
algorithms. The mean-shift algorithm deviates from higher accuracy when the number of devices get increased in
the data set. But the Silhouette classifier works with higher accuracy and it provides graphically the nature of the
classification very clearly than other methods. Performance Analysis of supervised and unsupervised learning
methods showed that K-Means provide a far better performance than any other classifier and it doesn't need any
supervision. The following analysis was done for a data set of 100 household electrical devices.
3. Results and Discussion
Performance Analysis
Considering the efficiency of the algorithm and the accuracy of the prediction of SVM, K-Means and Silhouette
classifiers provide acceptable results as shown in Table 02. Considering these algorithms the K-Means classifier
shows an advantage over other classifiers.
Table 2 Data Acquisition and Performance
Device Usage Pattern Detection
Different devices have its own ways of usage depending on the user's behavior and other external factors. Basically
when understanding patterns, the Silhouette and K-Means clustering algorithms were used to detect patterns. The
pattern detection is done under three categories hour based, weekly based and month based pattern detection.
Hour based consumption pattern detects the patterns regarding the 24 hours of a particular day. By using the
clustering algorithms; Silhouette and K-Means these groups can be detected with an accuracy of 99% for a data set
of 50 different devices functioning in within a period of 3 months. Week based patterns demonstrates the week by
usage patterns of devices. Week based pattern detection provides the usage of a particular device in the seven days
of the week. There can be same pattern for couple of devices and there can be unique patterns for devices. These
patterns are detected by K-Means, Silhouette and Support Vector Machines algorithms. The accuracy is over 98% as
an average of the pattern detection and clustering. Month based pattern detection would be significant if a device is
Type
Classifier
Accuracy (%)
Execution (s)
Supervised
SVM
97%
0.010
Supervised
ANN
96%
13.000
Unsupervised
Mean Shift
94%
0.013
Unsupervised
Silhouette
98%
0.012
Unsupervised
K-Means
98%
0.150
used in some special days of the month. It can be a periodic pattern or sometimes it can be one or two occurrences
per month. So there are instances this analysis is useful.
Fig. 4. Hour Based Pattern Recognition Fig. 5. Week Based Pattern Recognition
In pattern detection, the Silhouette and K-Means algorithms provide a better way of clustering patterns. The device
usage pattern is important to get an idea on how the consumers use the devices in order to find a way to minimize
the cost on power consumption.
Fig. 3. Classification Diagram of 15 devices
4. Conclusions
By the data collected and patterns detected, it is clear that there is a unique signature for each electrical device and
these signatures can be used to identify each device uniquely with a promising accuracy. There is no significant
difference in accuracy but performance of some algorithms are better.
Ability to predict the device provides the opportunity to filter power consumption data from overall consumption
data. In addition to that each device has its way of functioning based on human involvement. It gives a pattern to
every device when considering the activation period of all devices. To detect these patterns accurately we need to
train our algorithms for long period of time. Detecting these patterns leads to understand power consumption
patterns and provide better patterns to the consumer to minimize high frequency of usage and provide better
performance with less frequency of usage and less electricity usage.
Algorithms can be developed to suggest tips for consumers for what will improve usage and minimize cost. The
optimization techniques can be used based on user preferences or by detecting patterns of devices and suggesting
optimum devices out of devices performing same function in different ways. In addition to that the research data can
provide users an overview of power consumption of each device in an organized way to get a better understanding
about the way the power is being consumed by each device in domestic level.
5. References
[1] Public Utilities Commision Of Sri Lanka, ‘electricity consumption patterns of consumers in Sri Lanka-2011’,
2013. [Online]. Available: http://www.pucsl.gov.lk/english/wp-content/uploads/2013/01/ELECTRICITY-
CONSUMPTION-PATTERNS-OF-CONSUMERS-IN-SRI-LANKA-2011.pdf. [Accessed: 15- Dec- 2015].
[2] Shekarabi S.M et al. Smart plugs for building energy
managemen
t
s
y
s
t
ems in
Syst.
and Machines Res.
Lab., Univ. of Tehran, Tehran, Iran ,(2015, June, 1),Available:
http://ie
e
explor
e.ie
e
e.org/xpl/articleDetails.jsp?r
elo
ad=true&arnumb
er=6243554
[3] Mihai Sanduleac,(2015, April,12), Smart
Meter, Av
ailable:
http://smartgrid.ie
e
e.or
g/april-2015/1280-
new-smart-meter-design-in-nob
el-grid
[4] Jin Xiao et al (2012, September, 25-27) in Network Operations and Managemen
t
Symposium
(APNOMS), 2012 14th
Asia-P
acifi
Application-centric
Wi-Fi energy
managemen
t
on smart
phone,
Available:
http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6356052
[5] Search Data Center: Smart Power and Data Center. [Online] Available:
http://sear
chdatac
enter.techtar
get.c
om/guides/L
e
arning-Guide-Smart-
p
ower-and-ener
gy-efficiency-in-
the-data-c
enter
[Accessed: 01-Jun-2015
].
[6] Maryam Jamela Ismail, Rosdiazil Ibrahim, Idris Ismail, (2011, January IEEE), Available:
http://www.researchgate.net/publication/251999055
[7 ] Hyojoo Son, Changwan Kim, (2015) , Forecasting Short-Term Electricity Deman in Residential Sector
Based on Support Vector Regression and Fuzzy-rough Feature Selection with Particle Swarm Optimization
Available : http://www.sciencedirect.com/science/article/pii/S1877705815021141
[8] Jacky Kelly and William Knottenblet, UK-DALE: A dataset recording UK Domestic Appliance-Level
Electricity demand and whole-house demand, Available: http://www.nature.com/articles/sdata20157
[9] F.T Romero, J.C.J. Hernandez and W.G Lopez, Predicting Electricity Consumption Using Neural
Networks,Available:http://www.sciencedirect.com/science/article/pii/S0360544206003288
[10] Sunil Mallya, Entracker: Energy Tracker for Homes, (Spring 2011),
Available:https://cs.brown.edu/research/pubs/theses/masters/2011/mallya.pdf
[11] Damien Zufferey,Christophe Gisler, Omar Abou Khaled, Jean Hennebert, Machine Learning Approaches
For Electric Appliance Classification,(2012,IEEE), Available :
http://www.hennebert.org/download/publications/isspa-2012-machine-learning-approaches-for-electrical-
appliance-classification.pdf
[12] Bogdan Oancea, Stefan Cristian Ciucu, Time Series Forecasting Using Neural Networks, Available:
http://arxiv.org/pdf/1401.1333.pdf
[13] R.J Frank, N.Davey, S.P Hunt, Time Series Prediction Neural Networks,
Available:https://uhra.herts.ac.uk/bitstream/handle/2299/593/102081.pdf?sequence=1
[14] Peter J. Rousseeuw, (1986,November,27), Silhouette: a graphical aid to interpretation and validation of
cluster analysis, Available: https://wis.kuleuven.be/stat/robust/papers/publications-1987/rousseeuw-
silhouettes-jcam-sciencedirectopenarchiv.pdf
[15] Tapas Kanungo, David M. Mount, Nathan S. NetanyahuChristine D. Piatko, Ruth Silverman, and Angela Y.
Wu. An Efficient k-Means Clustering Algorithm: Analysis and Implementation, Available :
https://www.cs.umd.edu/~mount/Projects/KMeans/pami02.pdf
[16]Dorin Comaniciu , and Peter Meer, Mean Shift: A Robust Approach Toward Feature Space
Analysis,(2002,May), Available :https://courses.csail.mit.edu/6.869/handouts/PAMIMeanshift.pdf
[17] Christopher J.C Burgers, A Tutorial On Support Vector Machines for Pattern Recognition, Available:
http://research.microsoft.com/pubs/67119/svmtutorial.pdf
[18] Sonali B. Maind, Priyanka Wankar, Research Paper On Basic of Artificial Neural Network,