You are on page 1of 69

PREDICTION of ELECTRICITY PRICE and UNITS for

HOME APPLIANCES USING RANDOM FOREST


TECHNIQUE

A PROJECT REPORT

Submitted By

SAILESH REDDY.B (310115104077)


SUHAIL ABBAS.A (310115104091)

in partial fulfillment for the award of the degree


of

BACHELOR OF ENGINEERING

in

COMPUTER SCIENCE AND ENGINEERING

ANAND INSTITUTE OF HIGHER TECHNOLOGY

ANNA UNIVERSITY: CHENNAI 600 025


APRIL 2020

i
BONAFIDE CERTIFICATE

Certified that this project report “PREDICTION of ELECTRICITY


PRICE and UNITS for HOME APPLIANCES USING RANDOM
FOREST” is the bonafide Work of “SAILESH REDDY.B (310115104077),
SUHAIL ABBAS.A (310115104091)” who carried out the project
work under my supervision.

SIGNATURE SIGNATURE

Dr. S.Roselin Mary, M.Tech, Ph.D., Mr.Vasudevan.N, M.E.,


HEAD OF THE SUPERVISOR
DEPARTMENT ASSISTANT PROFESSOR

Department of computer Department of Computer


Science and Engineering, Science and Engineering,
Anand Institute of Higher Anand Institute of Higher
Technology, Technology,
Kazhipattur, Kazhipattur,
Chennai – 603103. Chennai – 603103.

Submitted to Project and Viva Voice Examination held on

INTERNAL EXAMINER EXTERNAL EXAMINER

ii
ACKNOWLEDGEMENT

First and foremost, we thank the almighty for showering his abundant
blessings on us to successfully complete the project. Our sincere thanks to,
our beloved “Kalvivallal” Late Thiru T. Kalasalingam, B.Com., Founder
for his keen interest and affection towards us.

Our sincere thanks and gratitude to our SelvaRatna Dr.


K.Sridharan,M.Com, MBA, PhD, Chairman, Dr. S. Arivazhagi,
M.B.B.S., PhD, Secretary for giving us the necessary support during the
project work. We convey our thanks to our Dr.P. Suresh Mohan Kumar,
M.E., PhD, Principal for his support towards the successful completion of
this project.

We pay our grateful acknowledgement and sincere thanks to Professor


Dr. S.Roselin Mary, Ph.D., HOD/CSE, for the good coordinating and
Mr.Vasudevan.N, M.E., Project Coordinator and Guide for better
guidance and constant encouragement in completing this project to make it a
successful one.

We thank entire Staff Members of our department and our friends for
helping us by providing valuable suggestions and timely ideas for successful
completion of the project.

Last but not the least our Family Members and Friends have been a
great source of inspiration and strength to us during the course of this project
work and our sincere thanks to them.

iii
ABSTRACT

Conversation of Electricity is a must and it can be done by start predicting the

electricity consumption. The electricity consumption is higher than the required

amount. Existing system uses mysql data for datasets and mathematical

calculation for the prediction process which takes longer time for processing and

prediction through mathematical calculations takes more time and accuracy is

lesser. The above problem can be resolved by using big data processing for large

collection of data and with that data it is been used for training the machine using

the random forest algorithm for predicting the electricity consumption. Through

that we enter the application’s usage time accordingly in the GUI which takes the

input and checks with the machine and gives the predicted range of the electricity

consumption in units with the price.

iv
TABLE OF CONTENTS

CHAPTER TITLE PAGE


NO NO

ABSTRACT iv

LIST OF FIGURES viii

LIST OF TABLES ix

LIST OF ABBREVIATIONS x

1 INTRODUCTION 1
1.1 OBJECTIVE 1

1.2 SCOPE 2
2 LITERATURE SURVEY 3

3 ANALYSIS 8

3.1 SYSTEM ANALYSIS 8

3.1.1 Problem Definition 8

3.1.2 Existing System 8


3.1.3 Proposed System 9

3.2 REQUIREMENT ANALYSIS 9

3.2.1 Functional Requirements 9


3.2.2 Non-Functional Requirements 10

v
3.2.3 Feasibility Study 11

3.3 SOFTWARE ANALYSIS 12

3.3.1 Hadoop 12
3.3.2 Sqoop 14

3.3.3 Random Forest 14

3.3.4 Hardware Requirements 15

3.3.5 Software Requirements 15

4 DESIGN 16

4.1 OVERALL DESIGN 16

4.2 UML DIAGRAMS 17

4.2.1 Use Case Diagram 17

4.2.2 Class Diagram 19

4.2.3 Collaboration Diagram 20

4.2.4 Activity Diagram 20

5 IMPLEMENTATION 22

5.1 MODULES 22

5.2 MODULE DESCRIPTION 22

5.2.1 Processing of data from the database 22

5.2.2 Migration and Storage 23

5.2.3 Analyze Query 23

5.2.4 Validation and pre-processing data 23

5.2.5 Training and prediction 24

vi
6 TESTING 25

7 RESULTS AND DISCUSSIONS 28

8 USER MANUAL 29

9 CONCLUSION 31

10 FUTURE ENHANCEMENT 32

APPENDICES

APPENDICES 1 BASE PAPER

APPENDICES 2 SCREENSHOTS

APPENDICES 3 PUBLICATION

REFERENCES

vii
LIST OF FIGURES

FIGURE NO FIGURE DESCRIPTION PAGENO

4.1 Overall Architecture Diagram 16

4.2 Use Case Diagram 18

4.3 Class Diagram 19

4.4 Collaboration Diagram 20


4.5 Activity Diagram 21

viii
LIST OF TABLES

TABLE NO TABLE NAME PAGE NO

6.1 Test Case Design 26


6.2 Test Case Log Design 27

ix
LIST OF ABBREVIATIONS

SYMBOLS ABBREVATIONS

GUI Graphical User Interface

UML Unified Modeling Language

x
CHAPTER – 1
INTRODUCTION

Energy conservation is the effort made to reduce the consumption of energy by


using less of an energy service. This can be achieved either by using energy more
efficiently (using less energy for a constant service) or by reducing the amount of
service used (for example, by driving less). Energy conservation is a part of the
concept of Eco-sufficiency. The electricity is also a type of energy which should
be conserved by using low electric consumption application or application that
consumes electricity efficiently by storing the excess power in a battery and use
them for future usage.
Due to increase in global warming everywhere they have
started to adopt renewable energy like solar, wind, where the half of the energy
is been lost while converting the solar or wind energy into electrical
energy/Electricity. The energy can be conserved by reducing wastage and losses,
improving efficiency through technological upgrades and improved operation
and maintenance. Electricity can be conserved by predicting the electricity usage
and check with the application independently so that the application can be used
according to the need and by reducing its usage efficiently. For the prediction the
data are been analysed and processed in a data set format for the machine to use
the data as input for training and testing. The Hadoop tool is been used for pre-
processing and analyse the large set of data. The random forest algorithm is been
used for training the machine, where the random forest algorithm is a supervised
learning method. The supervised learning is a method where the input and the
output is been given to the system for the training and then it is compared to the
test data for checking its accuracy.

1
1.1 OBJECTIVE:

In this paper we are isolating Appliance data by utilizing Hadoop


instrument adjacent some Hadoop common systems like hdfs, map reduce, sqoop,
and hive. By utilizing these devices preparing of information with no confinement
is conceivable, no information lost issue, we can get high throughput, upkeep cost
comparatively incredibly less and it is an open source programming, it is
extraordinary on the majority of the stages. In Appliance data, you’ll be having
an entire list of all appliance and their watts. It is paired with usages per month
for user and their prices. The data set is been utilized for the prediction through
the use of Machine Learning. The Machine Learning part uses the Random Forest
algorithm for the training of data sets for the prediction.

1.2 SCOPE:

The system can be used to predict the household electricity bill, for the
home applications.

2
CHAPTER-2

LITERATURE SURVEY

Title :”Intelligent Modelling and Optimization for Smart Energy


Hub”
Author :Tianhao Liu, Dongdong Zhang, Hang Dai and Thomas Wu
Publication : IEEE 2019 JOURNAL

Concept discussed

At present, the worldwide energy consumption mainly depends on fossil fuels,


which cause significant pollution and at the border of running out.

Work Done

Countries all over the world are trying to promote a revolution in energy industry
by exploring alternative ways of energy supply, consumption and storage.

Problem Identified

It’s complex structure, a unified optimization calculation of MES is difficult to


carry out.

Knowledge Gain

Therefore, fast and accurate formation of the mathematical model and calculating
optimal dispatch of MES become vital issues in the MES study.

3
Title :”Benefits and Limitations of Tapping into Stored Energy for
Datacentres”
Author : SriramGovindan, AnandSivasubramaniam, BhuvanUrgaonkar
Publication: IEEE 2011 Conference
Concept Discussed

Power and energy consumption of datacenters have come under much scrutiny in
recent times due to their contribution to cost, design and reliability constraints,
and environmental concerns. In existing datacenter studies, the two terms - energy
and power - are often used rather interchangeably.

Work Done

However, these have very different connotations- energy is the integral of power
over time - and can have very different implications for datacenter design,
operation , and costs.

Problem Identified

For the same energy consumption, one could have different power draw profiles,
each having a different consequence on the design and reliability issues as well
as on the monthly electricity bill. These solutions can have adverse performance
consequences depending on the workload behaviour.

Knowledge Gain

This paper proposes a complementary solution to this problem of peak power that
does not have any performance consequence, by exploiting already existing
energy storage (UPS) facilities within thedatacenter. It can be combined with
existing throttling andworkload management techniques to further reduce the
peakpower draw and/or the duration of this draw.

4
Title :”Power Provisioning for a Warehouse-sized Computer”
Author : Xiaobo Fan, Wolf-Dietrich Weber,Luiz André Barroso
Publication : IEEE 2017 Conference

Concept Discussed
Large-scale Internet services require a computing infrastructure that can be
appropriately described as a warehouse-sized computing system. The cost of
building datacenter facilities capable of delivering a given power capacity to such
a computer can rival the recurring energy consumption costs themselves.
Work Done
Therefore, there are strong economic incentives to operate facilities as close as
possible to maximum capacity, so that the non-recurring facility costs can be
best amortized.
Problem Identified
That is difficult to achieve in practice because of uncertainties in equipment
power ratings and because power consumption tends to vary significantly with
the actual computing activity.
Knowledge Gain
Effective power provisioning strategies are needed to determine how much
computing equipment can be safely and efficiently hosted within a given power
budget.

5
Title :”Personality and ectoparasitic mites (Hemipteroseiusadleri) in
Firebugs”
Author :Eniko˝ Gyuris, JúliaFruzsinaHankó, OrsolyaFeró, ZoltánBarta
Publication: IEEE 2008 Conference
Concept Discussed
Individuals of the same species often consistently differ in their behaviour across
time and context. These stable differences are usually termed ‘animal
personality’. Parasitism is known to significantly influence the evolution of
animal personality at least in part because more explorative individuals may meet
parasites more frequently than less explorative ones.
Work Done
Previously, we have demonstrated that consistent individual differences (i.e.
boldness, activity, exploration) can be measured in firebugs. As continuation, we
examined here the relationship between firebug personality traits and their
ectoparasitic mite loads in a wild population.
Problem Identified
We showed that bugs that behaved in a more explorative way have more mites
and we also found a marginally significant interaction between sex, boldness and
activity: bolder and more active female firebugs were more infected. In addition,
we experimentally tested whether an artificial infection causes any alteration in
the bug’s behaviour and whether there is any relationship between firebug
personality and immune response.
Knowledge Gain
This treatment did not induce any alteration in bugs’ personality. We found that
bugs become more explorative but less active when repeating the experiment, but
at the same time all personality traits (boldness, activity and exploration) were
repeatable. Furthermore, firebugs with a stronger immune response behaved more
boldly but also less actively.

6
Title :”Providing Green SLAs in High Performance Computing
Clouds”
Author :Md.E.Haque, Kien Le,InigoGoiri, Ricardo Bianchini
Publication: IEEE 2013 Conference

Concept Discussed
Demand for clean products and services is increasing as society is becoming
increasingly aware of climate change. In response, many enterprises are setting
explicit sustainabilitygoals and implementing initiatives to reduce carbon
emissions.
Work Done
Quantification and disclosure of such goals and initiatives have become important
marketing tools. As enterprises and individuals shift their workloads to the cloud,
this drive toward quantification and disclosure will lead to demand for
quantifiable green cloud services.
Problem Identified
Thus, we argue that cloud providers should offer a new class of green services,
in addition to existing (energy-sourceoblivious) services.

Knowledge Gain
This new class would provide clients with explicit service-level agreements
(which we call Green SLAs) for the percentage of renewable energy used to run
their workload.

7
CHAPTER – 3
ANALYSIS

3.1 SYSTEM ANALYSIS

Prediction of the electric bill is an important aspect due to sometimes it


may cause financial burden. This system is capable of predicting the cost by the
large number of data and training provided. This prediction mechanism is based
on the random forest algorithm. The data is been processed by Hadoop tool.

3.1.1 Problem Definition

In the present days the consumptions of the electricity is getting higher and
it must also be conserved for the future. So, by predicting the electric bill we be
cost effective and it may also be helpful to conserve them according to their use.
Therefore, to achieve this the large amount of the data is been used for higher
accuracy in prediction.

3.1.2 EXISTING SYSTEM:

Existing idea supervises giving backend by utilizing MySQL which


contains heap of disadvantages i.e. information prerequisite is that preparing time
is high when the information is tremendous and once information is lost, it can't
recoup. In the prediction part it uses normal mathematical calculations it uses
higher time and also less accuracy for large data.

Disadvantages

• Limitation of data.
• Time consumption is more and maintenance cost is very high.
• Accuracy is lesser.

8
3.1.3 Proposed System
Proposed concept deals with providing database by using Hadoop
tool it can analyse with no limitation of data and simply add number of machines
to the cluster and get the results with less time, high throughput and maintenance
cost is very less and we are using partitions and bucketing techniques in Hadoop.
For the prediction and analyses part uses random forest algorithm it calculates
faster with higher accuracy. The random forest algorithm is a supervised learning
where we could train the machine with desired training data for the desired output.

Advantages

• There won’t be any loss in data


• Efficient in data processing
• Higher accuracy

3.2 REQUIREMENT ANALYSIS

Requirement analysis, also called requirement engineering, is the process


of determining user expectations for a newly modified product. It encompasses
the tasks that determine the need for analyzing, documenting, validating and
managing software or system requirements. The requirements should be
documented, actionable, measurable, testable, traceable, related to identified
business needs or opportunities and defined to a level of detail sufficient for
system design.

3.2.1 Functional Requirements

Usability

It is easy to understand, learn, and operate the software system and is easily
usable and can be deployed in any environment.

9
Efficiency

The system runs in python and provides excellent results in underpowered


hardware.

Security

It is applied to personal assistance and any vulnerable asset cannot be


accessed without authorization.

Reliability

The system runs completely on a separate system and all the functionality
is implemented using custom algorithms, so the system is highly reliable.

Compatibility

The program modules are able to execute without problems or conflict. The
system is also compatible with both 32bit and 64bit architectures.

Flexibility

The design adapts to external changes while implementing them. It is


designed to accept changes in environment.

Safety

Maintains integrity and processed data is not shared outside the system.

3.2.2 Non-Functional Requirements

Portability

The software can be easily deployed to any windows system (32 or 64 bit)
without any dependency issues.

10
Performance

The system provides acceptable results and the performance is scalable and
can be upgraded easily.

Maintainability

Maintaining the software is easy as no changes are required.

3.2.3 Feasibility Study

Feasibility is the study of impact, which happens in the organization by the


development of a system. The impact can be either positive or negative. When
the positive dominates the negatives, then the system is considered feasible. Here
the feasibility study can be performed in three ways such as technical feasibility,
economic feasibility and operational feasibility. Three key considerations
involved in the feasibility analysis are:

• Technical Feasibility
• Economic Feasibility
• Operational Feasibility

Technical Feasibility

It is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a high demand
on the available technical resources. This will lead to high demands on the
available technical resources. This will lead to high demands being placed on the
client. The system that has been proposed to be developed has been analyzed
against several technical criteria and it will have a modest requirement.

Economic Feasibility

It is carried out to check the economic impact that the system will have on
the organization. The amount of fund that the company can pour into the research

11
and development of the system is limited. The expenditures must be justified.
Thus the system to be developed will be well within the budget and this can be
achieved because most of the technologies used are freely available. Only the
customized products will have to be purchased.

Operational Feasibility

Operation feasibility is a measure of how well the solution will work in the
organization. It is also a measure of how people feel about the system project.
The proposed system is operationally feasible because the level of acceptance by
the users solely depends on the methods that are employed to educate the user
about the system and to make him familiar with it. The proposed approach has
been designed with at most user friendliness and this will make the system that
will be developed socially feasible too.

3.2.4 SOFTWARE ANALYSIS

Software analysis includes all activities, which help the transformation of


requirement specification into implementation. It also considers about the
behaviour of the software regarding the property such as correctness, robustness,
safety and liveliness. System analysis in software engineering is, therefore, the
activities that comprise software engineering as a process in the production of
software. It is the software process.

Hadoop

Hadoop is an Apache open source framework written in java that allows


distributed processing of large datasets across clusters of computers using simple
programming models. The Hadoop framework application works in an
environment that provides distributed storage and computation across clusters of

12
computers. Hadoop is designed to scale up from single server to thousands of
machines, each offering local computation and storage.

Hadoop has two major layers namely:

• Processing/Computation layer (MapReduce), and

• Storage layer (Hadoop Distributed File System).

HDFS :

Hadoop File System was developed using distributed file system design.
It is run on commodity hardware. Unlike other distributed systems, HDFS is
highly fault tolerant and designed using low-cost hardware. HDFS holds very
large amount of data and provides easier access. To store such huge data, the
files are stored across multiple machines. These files are stored in redundant
fashion to rescue the system from possible data losses in case of failure. HDFS
also makes applications available to parallel processing.

Map Reduce:

MapReduce is a framework using which we can write applications to


process huge amounts of data, in parallel, on large clusters of commodity
hardware in a reliable manner. It is a processing technique and a program model
for distributed computing based on java. The MapReduce algorithm contains
two important tasks, namely Map and Reduce. Map takes a set of data and
converts it into another set of data, where individual elements are broken down
into tuples (key/value pairs). Secondly, reduce task, which takes the output from
a map as an input and combines those data tuples into a smaller set of tuples. As
the sequence of the name MapReduce implies, the reduce task is always
performed after the map job.

13
Sqoop:

The traditional application management system, that is, the interaction of


applications with relational database using RDBMS, is one of the sources that
generate Big Data. Such Big Data, generated by RDBMS, is stored in Relational
Database Servers in the relational database structure.

When Big Data storages and analyzers such as MapReduce, Hive, HBase,
Cassandra, Pig, etc. of the Hadoop ecosystem came into picture, they required a
tool to interact with the relational database servers for importing and exporting
the Big Data residing in them. Here, Sqoop occupies a place in the Hadoop
ecosystem to provide feasible interaction between relational database server and
Hadoop’s HDFS.Sqoop is a tool designed to transfer data between Hadoop and
relational database servers. It is used to import data from relational databases
such as MySQL, Oracle to Hadoop HDFS, and export from Hadoop file system
to relational databases. It is provided by the Apache Software Foundation.

Random Forest:

Random forests or random decision forests are an ensemble learning


method for classification, regression and other tasks, that operate by constructing
a multitude of decision trees at training time and outputting the class that is the
mode of the classes (classification) or mean prediction (regression) of the
individual trees. Random decision forests correct for decision trees’ habit of over
fitting to their training set. Random forest is a type of supervised machine learning
algorithm based on ensembled learning. Ensemble learning is a type of learning
where you join different types of algorithms or same algorithm multiple times to
form a more powerful prediction model. The random forest algorithm combines
multiple algorithm of the same type i.e. multiple decision trees, resulting in
a forest of trees, hence the name "Random Forest". The random forest algorithm
can be used for both regression and classification tasks.

14
3.3 REQUIREMENTS

HARDWARE REQUIREMENTS
PROCESSOR : PENTIUM IV 2.6 GHz, Intel Core 2 Duo.
RAM : 4GB DD RAM
MONITOR : 15” COLOR
HARD DISK : 40 GB
SOFTWARE REQUIREMENTS
Framework : Hadoop
Database : MYSQL 5.5
Languages : HQL
Data Access Tool : Sqoop
Operating System : Cent Os, Windows
Tool : Anaconda with Jupyter Notebook

15
CHAPTER – 4
DESIGN

4.1 OVERALL DESIGN

This architecture explains the process or flow of the project. First, we


should import csv file into hdfs to processing that huge data in Hadoop open
source framework. And we can process that data with the help of three tools
namely hive and finally we get output what we want result from the dataset, then
these datasets are been taken as input for the random forest algorithm for training
the machine that data set is been split into training set and testing set. Then the
user gives the specified data and machine runs it as a testing set and returns the
predicted results in GUI.

16
4.2 Detailed Design

4.2.1 Use Case Diagram

Use case diagrams are used to model the behavior of the system, a
subsystem or the class. Use cases are applied to capture the intended behavior of
the system developed, without specifying how the behavior is implemented. A
use case diagram contains the components.

• The actors, usually individuals involved with the system defined.

• The use cases, the roles played by the actors in the system.

• The relationships between and among the actors and the use cases.

17
Use case Actors

• System
• user

Use Case Scenarios

• Dataset
• Store in HDFS
• Analyze with Hive
• Bucketing of data
• Training set
• Predicted bill

18
In our use case diagram we analyze data, which will be easy to predict.
Let us see the process of use case diagram in which whatever data analyzation
done is to be stored in hdfs (Hadoop distribution file system) by different type of
tools like sqoop and hive then the data is inserted for training set by the system
then the user send the data for which the system sends to the result of prediction.

4.2.2 Class Diagram


A Class diagram models the static structure of a system. It shows
relationships between classes, objects, attributes, and operations. A class diagram
shows a set of classes, interfaces and collaborations and their relationships.

In our class diagram the user login to his/her own account. In our class diagram
the client can be analysis the dataset, which will be easy to predicate. Let us see
the process of use class diagram in which whatever data analyzation done to be

19
stores in hdfs (hadoop distribution file system) by different type of styles like
hive, then the data is sent through the system for training set then the data is
predicted to user.

4.2.3 Collaboration Diagram

The UML Collaboration diagram is used to model how objects involved in


a scenario interact, with each object instantiating a particular class in the system.
Objects are connected by links, each link representing an instance of an
association between the respective classes

Data set
system
System Hadoop tool
organized large data set
result
Input
data

User Training set

4.2.4 Activity Diagram

Activity diagram is essentially a flowchart, showing flow of control from


activity to activity. Activity diagrams are used to model the dynamic aspects of
the system.

20
The data set is been given as a input in the system to the Hadoop tool where the
data is been sent to the hive system for classification and they are ordered grouped
according to their set values and sent in as a input to the training data set for the
algorithm to train the machine for the desired output.

21
CHAPTER 5

IMPLEMENTATION

5.1 MODULES

The proposed Electric bill prediction system has different modules for working
its efficient functionality. These modules help the system to work efficient and
also well in performance as well as in accuracy. The modules are listed below:

• Processing of Data from the Database


• Migration and Storage
• Analyse Query
• Validation and pre-processing data
• Training and prediction

5.2 MODULE DESCRIPTION

5.2.1 Processing of data from the database

In this module we have to create Data set for Electricity Consumption it


contains set of tables such that customer details, billing details and payment
details for last four years .and this data first provide in MySQL database with help
of this dataset we analysis this project.

22
5.2.2 Migration and Storage

In here the dataset are been transferred into hadoop(HDFS) for storage,
Sqoop is a command-line interface application for transferring data between
relational databases and Hadoop. we fetch the dataset into hadoop (HDFS) using
sqoop Tool. Using sqoop we have to perform lot of the function, such that if we
want to fetch the particular column or if we want to fetch the dataset with specific
condition that will be support by Sqoop Tool and data will be stored in hadoop
(HDFS).

5.2.3 Analyse Query

In here we analysis the dataset using HIVE tool which will be stored in
Hadoop (HDFS). For analysis dataset HIVE using SQL Language. Using hive,
we perform Tables creations, joins, Partition, Bucketing concept. Hive analysis
the only Structure Language. Through this hive the data is been analyzed and they
are been grouped according to their column name by the previous modules Sqoop
technique and been ordered as a dataset.

5.2.4 Validation and pre-processing data

Validation techniques in machine learning are used to get the error rate of
the Machine Learning (ML) model, which can be considered as close to the true
error rate of the dataset. If the data volume is large enough to be representative of
the population, you may not need the validation techniques. However, in real-
world scenarios, to work with samples of data that may not be a true
representative of the population of given dataset. To finding the missing value,
duplicate value and description of data type whether it is float variable or integer.
The sample of data used to provide an unbiased evaluation of a model fit on the

23
training dataset while tuning model hyper parameters. Then the validation set is
used to evaluate the given model, this set used for frequent evaluation. This
validation data set allows us to choose which algorithm can be suitable for build
the model

5.2.5 Training and prediction:

The validation set data is been taken in as input for training the machine
using the Random forest algorithm then the trained set is been checked using test
set of data where the accuracy is been checked after testing the input from the
user is been asked from the GUI, then it is used as input and the machine runs
according to its trained data set and it gives the output in the GUI application.

24
CHAPTER – 6

TESTING

Testing is finding out how well something works and tells what level of
knowledge or skill has been acquired. Software testing is an investigation
conducted to provide stakeholders with information about the quality of the
product or service under the test. Software testing can also provide an objective,
independent view of the software to allow the business to appreciate and
understand the risk of software implementation.

Unit Testing

Unit testing, also known as component testing which verifies the


functionality of a specific section of code, usually at the function level. In an
object-oriented environment, this is usually at the class level and the minimal unit
test includes the constructors and destructor.

Integration Testing

Integration testing is any type of testing that seeks to verify the interface
between components against a software design. Software components may be
integrated in an iterative way or altogether.

System Testing

System testing tests a completely integrated system to verify that it meet


its requirements. In addition, the software testing should ensure that the program
or partially corrupt its operating environment or cause other processes with that
environment to become inoperative.

25
Table 6.1 Test Case Design

S.NO Test Test Test Procedure Test Input Expected Actual


Case Description Result Result
ID
1 T01 Verify the 1. Open the A valid Should File is
input as a page data excel accept accepted
excel file 2. Select the file the file
data file
2 T02 Verify the 1. Open the A Should It is a
output file page Organized be a dataset file
as a dataset 2. Select the file data file dataset
file file

3 T03 Verify the 1. Open the A valid Should The system


system page data set accept is trained
training 2. Select the the data successfully
dataset file

4 T04 Verify the 1. Run the nil Should GUI runs


GUI program show the successfully
application GUI

5 T05 Verify the 1. Enter the data Enter the Should Final output
output 2. Click submit required generate shows the
data the bill amount
output of range
predicted
bill

26
Table 6.2 Test Case Log Design

S.No Test Case Test Objective Test Status


ID

1 T01 Check input as a excel file PASS

2 T02 Check the output file PASS

3 T03 Check system training PASS

4 T04 Check GUI application PASS

5 T05 Check the output result PASS

27
CHAPTER 7

RESULTS AND DISCUSSION

The results obtained by comparing the efficiency of the proposed system with
the existing system. The purpose of the system is to predict the electricity bill to
conserve electrical energy and save money. By using the GUI application, we
made cost efficient system for the community to conserve electricity by
predicting the electricity bill.

28
CHAPTER – 8
USER MANUAL
Installing Python

Step 1: A Python 3.6.4 Setup pop-up window will appear.

Step 2: Ensure that the Install for all user radio button is pressed.

Step 3: Click Next > button.

Step 4: A new Python 3.6.4 Setup pop-up window will appear (Select Destination
Directory).

Step 5: The default directory will appear in the bottom as C:\Python36\

Step 6: Click the Next > button.

Step 7: A new Python 3.6.4 Setup pop-up window will appear.

Step 8: Use the default customization, which selects the Python Interpreter and
all its libraries (about 50 Mb).

Step 9: Click the Next > button.

Step 10: In a few seconds a pop-up window titled User Account Control will
appear, posing the question, “Do you want the following program to install
software on this computer?”

Step 11: Click the Yes button.

Step 12: A new Python 3.6.4 Setup pop-up window will appear.

Step 13: Click the Finish button.

29
Installation Hadoop

Step 1: Check for java software.

Step 2: Download Hadoop from apache

Step 3: Configure the correct version with the system os and jdk.

Step 4: Setup name node for the format

Step 5 : Accessing Hadoop on browser for running.

Step 6: Verify all application for cluster

30
CHAPTER– 9

CONCLUSION

we presented a study on Power Distribution to Datacentre’s data is help to


give awareness to how much power consumption in different datacentres. To run
and analysis on the Power Distribution to Datacentre’s data in Hadoop ecosystem.
Hadoop ecosystem uses hive, pig, map reduce to analysis faster.

Then we use Random forest method for the prediction through machine learning
by using the data from the Hadoop ecosystem as input and analysis for prediction.

31
CHAPTER – 10

FUTURE ENHANCEMENT

In future, the proposed system can add some renewable source of electrical
energy into the system and predict how much the current can be saved, also able
to suggest some less electricity consuming application and also predict when
these applications can be switched off or kept idle to stop the wastage of the
electricity.

32
APPENDICES

33
APPENDIX – 1
BASE PAPER

34
CSEE JOURNAL OF POWER AND ENERGY SYSTEMS, VOL. 5, NO. 2, JUNE 2019 249

Integrated Optimization of Smart Home Appliances


with Cost-effective Energy Management System
Tesfahun Molla, Baseem Khan, Member, IEEE, Bezabih Moges, Hassan Haes Alhelou, Reza Zamani, and
Pierluigi Siano, Senior Member, IEEE

Abstract—Smart grid enables consumers to control and sched- grid, which transfer information between two nodes. This pro-
ule the consumption pattern of their appliances, minimize energy cess is very much crucial to control and manage various smart
cost, peak-to-average ratio (PAR) and peak load demand. In grid components efficiently under variable demand situation.
this paper, a general architecture of home energy management
system (HEMS) is developed in smart grid scenario with novel To reduce the cost of infrastructure, environmental impacts and
restricted and multi-restricted scheduling method for the residen- increase the reliability of the system, distributed generations
tial customers. The optimization problem is developed under the like solar and wind can be integrated with the smart grid [4].
time of use pricing (TOUP) scheme. To optimize the formulated This helps to manage the energy consumption of smart home
problem, a powerful meta-heuristic algorithm called grey wolf appliances by energy management system (EMS), which is
optimizer (GWO) is utilized, which is compared with particle
swarm optimization (PSO) algorithm to show its effectiveness. A also the aspect of smart grid [5].
rooftop photovoltaic (PV) system is integrated with the system In DSM, various techniques and algorithms have been
to show the cost effectiveness of the appliances. For analysis, adopted to minimize the cost of electricity billing based
eight different cases are considered under various time scheduling on TOUP tariffs and incentives. Consumers can generate
algorithms. renewable energy to supply their appliances and if there is
any excess production, they will sell it to the utility grid
Index Terms—Demand side management, GWO, home energy
management system, PSO, peak-to-average ratio. based on the grid codes and TOUP, which varies through the
day [6]. A novel approach of power hubs is presented in [7]
for demand side management in smart homes. These power
hubs control the loads individually. Shah et al. [8] proposed an
energy management system for smart building, integrated with
I. I NTRODUCTION energy storage system by using multi-agent system (MAS).
This research ignored the PAR that controls the horizontal load
E VER increasing electricity demand, rising energy genera-
tion cost and growing renewable energy generation posed
the limit on the production of energy from the conventional
distribution within a day. Mahmood et al. [9] utilized BPSO
based realistic scheduling mechanism (RSM) to schedule the
energy sources [1]. All these challenges motivate the electric home appliances and minimize user frustration and maximize
utilities to focus on demand side management (DSM) tech- utilization of appliance under the given constraints. Huang
niques. Electricity usage report in United States suggested that et al. [10] proposed a hybrid PSO-DE algorithm in order to
at least 30% of electric power is wasted from the 72% of the manage appropriate allocation of energy resources to the end
total power that is consumed by the residential and commercial users.
users [2]. Further, European Union (EU) is also decided to In [11], a cooperative PSO has been used to optimize the
enhance the renewable energy production up to 20% of the energy consumption of both time-shiftable and power-shiftable
total electricity production till 2020. Along with that EU is also home appliances. Yang et al. [12] developed a new interactive
targeted to enhance the generation by improving the energy teaching–learning optimization (ITLO) method for voltage
efficiency up to the level of 20% [3]. High quality and reliable source converter based high voltage direct current (VSC-
power supply is available with the advancement of information HVDC) systems with the offshore wind farm integration.
and communication technology (ICT) in the field of energy Kazemi et al. [13] developed the EMS to manage energy
sector. ICTs are the most important component in the smart usage of appliances, by GWO, which is followed by genetic
algorithm (GA), but the system is not integrated with ESS
Manuscript received February 15, 2019; revised April 1, 2019; accepted and energy-shiftable scheduling. Yang et al. [14] proposed
May 17, 2019. Date of publication June 30, 2019; date of current version a new grouped GWO (GGWO) technique for getting the
May 20, 2019. optimum value of interactive proportional-integral controllers’
T. Molla, B. Khan (corresponding author, e-mail: baseem.khan04@gmail.
com), and B. Moges are with Hawassa University, Hawassa, Southern Nations parameters of doubly-fed induction generator based wind
1530, Ethiopia. turbines. An efficient HEMS has been introduced by Zhao
H. H. Alhelou is with Tishreen University, 2230 Lattakia, Syria. et al. [3] to minimize electricity cost and PAR. In this
R. Zamani is with Tarbiat Modares University, Tehran, Iran.
P. Siano is with The Department of Management & Innovation Systems, research GA is used to solve the formulated minimization
University of Salerno, Fisciano, Campania 84084, Italy. problem and the inclining block rate (IBR) model is adopted to
DOI: 10.17775/CSEEJPES.2019.00340 restrict over energy consumption of home appliances. Rahim
2096-0042 © 2019 CSEE

35
250 CSEE JOURNAL OF POWER AND ENERGY SYSTEMS, VOL. 5, NO. 2, JUNE 2019

et al. [15] introduced the HEMS, which is formulated via be determined experimentally at equal duration of operation
multiple knapsacks and ant colony optimization (ACO). time. It is assumed that all the appliances are working with
However, due to the unpredictable nature of human behavior their maximum power rating specified in their Specification
and variable performance of most of the home appliances Manuel.
with non-linear and complex energy consumption pattern,
Photo voltaic (PV) generation profile
the majority of the techniques listed cannot tackle HEMS 5
problem efficiently. To accomplish energy cost minimization,
4
PAR reduction and peak load minimization sometimes these

Power (kW)
techniques ignored the comfort level of the users. In addition 3
to that, when the number of appliances increased to a certain
2
extent, the stated algorithms converged slowly. Therefore, in
this work the following methods are taken: 1
1) GWO is implemented to minimize the energy billing and 0
PAR, without highly affecting the comfort level of the user. 0 20 40 60 80 100 120
Hours of the day
2) An optimal control model is developed for smart building 1 unit=60 minutes
appliances to schedule the load. Most of the literatures sim-
plified these models as linear models. This work has extended Fig. 1. PV generation profile of Hawassa city.
these models as binary non-linear optimization problem.
3) Different constrained problems are solved simultane-
B. Electricity Tariff Model
ously. The peak demand, PAR and cost of electricity consump-
tion has been monitored without highly affecting the comfort The effectiveness of the proposed system, while solving the
level of the users by scheduling of the appliances to convenient fitness function, is explained by taking Hawassa city, Ethiopia
times within a day. as a case study and implementing the TOUP model.
4) Two novel techniques called ‘restricted’ and ‘multi- In order to promote the production of electricity by the
restricted’ time range scheduling are proposed for scheduling users, the electric utility gives incentives for the customers
the appliances in an efficient way. those are generating power from the renewable energy sources.
Beyond satisfying their energy demand, when they have sur-
plus production, they tend to sell that surplus energy to the
II. LOAD CATEGORIZATION AND E LECTRICITY TARIFF
utility grid and benefit from the net metering.
In EMS of residential building, scheduling of different loads In actual situation, to attract the users and produce energy
can be achieved by specifying the type of loads to be scheduled from renewable sources, the feed in tariff should be higher than
and characteristics of the given loads. These characteristics the grid tariff. But, in this study, to show the effectiveness
include the operation duration and average energy utilization of the proposed system model, the grid tariff (TOUP) and
of each appliance. Generally, home appliances are classified feed in tariff have taken the same value. In addition, to let
into three major groups, i.e. base line (non-shiftable), uninter- the users shift their energy consumption from peak hour to off-
ruptable and interruptable flexible loads [3]. peak hours, the electricity cost in off-peak duration must be
lowered than that in the off peak hours. This can reduce the
A. Home Appliances Used higher energy demand and following stress and instability
In this paper, for the analysis of the proposed problem a problems in the utility grid.
mid-size home is considered and the load profiles of each The cost of the electricity in Ethiopia for residential con-
home appliance are discussed in Table I. A 5 kW roof top sumers for the first 50 kWh is 0.2730 Birr/kWh. By assuming
solar PV on-grid system has integrated into this work. For the electricity cost during peak duration is 50% higher than
that purpose the PV generation profile of Hawassa city is that of off-peak duration then, the TOUP model designed in
presented in Fig. 1. Each of the appliances has a definite this work is shown in Table II.
interval of time for the completion of the operation and thus TABLE II
has a definite power usage vector that has to be developed THE PROPOSED TOUP MODEL
either from the specification of the given appliance or can
Hours Price (TOUP) in Birr/kWh
10:00 PM–7:00 AM 0.2730
TABLE I 7:12 AM–9:48 PM 0.4095
APPLIANCES USED IN THIS STUDY

List of appliances Power rating (kW)


Washing machine with dryer 3
Electric oven (morning hours) 2.15
III. P ROBLEM D EVELOPMENT
Electric oven (evening hours) 2.15 Initially, 24 hours of the day are split into time slots. Each
Refrigerator 0.225
Electric iron 1.5
hour is split into 5 time slots, i.e. each time slot is of 12-
Water heater 1.5 minutes, and the total time slots available in a day are 120.
Table fan 0.025 These time slots are represented by s S ∈ � 1, 2{. . . 120 .The}
Coffee grinder 0.1 time slot is made sufficiently small to conveniently

36
MOLLA et al.: INTEGRATED OPTIMIZATION OF SMART HOME APPLIANCES WITH COST-EFFECTIVE ENERGY MANAGEMENT SYSTEM 251

perform the problem by GWO. Therefore, 12 minutes is the where, gs is the feed-in tariff, ρs ij represents the power
shortest operation time of any appliance. The integer multiples produced by the roof top solars PVs system ins sth time slot.
of the 12-minute time intervals is fixed to the length of By replacing the variable P Y with P and ρs Y s
ak ak sch,ak ak ak
operation time interval (LOT) of each schedulable appliance. with G sschm,ak , the objective function for reduction of con-
The unit of LOT in this study is assumed to be the number sumers’ electricity bill without including the solar PV system
of time slots. It represents very small errors of few seconds, is presented by:
120
which can be ignored. The power consumption scheduling
vector Pa is given by: min ss
sch ) (7)
(C
s=1P
Pa � P , P , . . . , P
1 2 120
(1)
s.t. αa ≤ ta ≤ (βa − la)
where, P as represents the power consumption of ath appliance
With the incorporation of the solar PV system, the objective
for sth time slot in kWh. The power consumption value per
function will be updated as:
hour is assumed to be fixed for all appliances based on their
specifications. For appliance a, the energy consumption per 120

hour is denoted by: min ss


− gs G
s
schm ) (8)
Xa (C
s=1P
sch
Ps= (2)
a
5 s.t. αa ≤ ta ≤ βa − la
where, Xa represents the power consumption value per hour,
The reduction of PAR is:
during the time slot. Equation (2) represents the power rating
of shiftable appliances per slot. In this case, the number of Max (Psch)
min PAR = (9)
slots per hour is 5. For all schedulable appliances, the power Avg (Psch)
consumption scheduling matrix P is defined as: A customer’s dissatisfaction value can be minimized by

 Xa scheduling. In order to model and quantify user dissatisfaction,
P |P as = , ∀a ∈ A s ∈ [t a, t a + l a]
P= 5 (3) a delay time rate function is introduced.
P s = 0, ∀a ∈ A s ∈ S\[t , t + l ]aa
min a ∈ Afsn
a
(10)
The scheduling vector ais given by adding the “Power
Matrix” column wise as shown below: where, fsn represents the discomfort related with the shiftable
appliance. It is calculated by delay time rate (DTR) of shiftable
Psch = {P sch|P sch = P ak, ∀s ∈ S}
s s
(4) appliances, as shown in (11) [16]:
( t −α )
where Psch is a vector representing the total power requirement DTR = ∀ a∈ A
a a
(11)
of shiftable appliances in each time slot s.
βa − la − αa
A. The ON and OFF Decision Variable where, αa and βa represents the start and end time ranges
The decision variable Yaks determines the ‘on’ and ‘off’ to finish the operation of the appliance. la is the length
status of the schedulable appliances. of operation duration, and ta is the actual starting time.
The first objective of the HEMS is to reduce the billing cost Additionally, a delay parameter g > 1 can also be inserted to
by minimizing the PAR of the load. The minimum electricity associate fsn as gDT R. Thus, discomfort related with shiftable
cost is determined based on the TOUP within 24 hours of the appliance is as follows:
day. Let Cs be the electricity price, based on the TOUP in the fsn = gDT R (12)
time slot s. The fitness function, fcost becomes as follows.
a∈A
n m u
Fcost,1 = min P ak
sY s (5)
Cs ak
B. Constraints
s=1 a=1 k=1
The following constraints are considered to solve the for-
s.t. αa ≤ ta ≤ (βa − la)
mulated objective functions.
where Pak s is the load demand in each appliance a in phase k
1) Energy Constraints
at time slot s. Yaks represents the ‘on’ and ‘off’ binary decision The load phases of each appliance must fulfill their energy
variable. The binary decision variableakY ∈s {0, 1} decided the requirements. This constraint is explained as follows:
‘on’ and ‘off’ status of each appliances. ta is a variable, which m
shows the optimal time for the operation of the appliance a. 1
P s = E ak ∀ {a, k} (13)
la is the LOT i.e. the power consumption of each appliance is 5 s=1 ak
valid within the proper scheduling, αa and βa be the start and
For appliance a, load phase k and time slot s, Paks is the load,
end time slots of the operation of each appliance (βa > αa).
Eak is the energy needed. The upper limits of the load for
With the incorporation of stand-alone roof-top solar PV, (5)
becomes: all appliances are restricted by the utility to certain predefined
n m u limit θs.
m
Fcost,2 = min (CsP s Y s
ak ak − gs ρsak Yak
s ) (6) Pak
s
≤ θs (14)
s=1 a=1 k=1 s=1

37
252 CSEE JOURNAL OF POWER AND ENERGY SYSTEMS, VOL. 5, NO. 2, JUNE 2019

2) PV Generation Constraint IV. NOVEL M ULTI- RESTRICTED T IME R ANGE


The power generated by the PV system is in between the S CHEDULING
minimum and maximum power produced by the PV panel Multi-restricted time range scheduling is a type of schedul-
capacity within a day. ing in which one or more constrained, non-overlapping re-
Pg,min ≤ ρ ≤ Pg,max (15) stricted operation cycles and home appliances are allowed to
be scheduled within those operation time ranges. Without vi-
where, Pg,min is the minimum power production and Pg,max is
olating all energy and time constraints, the load scheduler has
the maximum power production using the PV system within a
a freedom to search the best combination of operation cycles
day integrated to the grid system. When the power production in which the appliance tends to operate. The fitness function
from PV is minimum, i.e. ρ < Pg,min, all the power demanded would be calculated at minimum peak load while maintaining
by the appliances will be fed from utility grid. smooth horizontal load distribution within hours of the day as
3) Power Balance Constraint much as possible. Between these non-overlapping, restricted
J + Q=n (16) operation cycles, one cycle is selected at a time stochastically
where, J is the number of controllable appliances, Q is the for each appliance within their length of operation duration
number of uncontrolled appliances and n is the total number and available operation cycles.
of appliances. In multi-restricted time range scheduling, the length of
4) Time Constraint operation duration and operation starting times are expressed
Each scheduled load appliance cannot be interrupted until as follows: 
it has finished its operation of load phases. It is also known la,1 , if ta,1 ∈ [αa,1 , βa,1 − la,1 ]

that the next load phase cannot be started unless the previous la = la,2, if ta,1 ∈ [αa,2, βa,2 − la,2] (21)
load phases finished their operation. 
0, else
Y ak
s
+ γak
s
=1 (17)
s.t.
When the value of binary decision variable Y is binary 1,
s
ak
then the value of the auxiliary decision variable γs ak
is binary αa,1≤ la1 ≤ βa,1 − αa,1 (22)
0 and vice versa. Decision variable γs ak
indicates whether the αa,2≤ la2 ≤ βa,2 − αa,2 (23)
previous task of operation has finished or not.
The operation starting time is in the range of ta,1 and ta,2.
As previously assumed that all the appliances are operated
at their specified ratings during operation periods, different ta,1 ∈ [αa,1, βa,1 − la,1] (24)
constraints are required to satisfy the demand management, ta,2 ∈ [αa,2, βa,2 − la,2] (25)
which are as follows:
where, la,1, la,2 are the LOTs and αa,1, αa,2 are the starting
βa − αa ≥ la (18) time slots. βa,1, βa,2 are the end time slots and ta,1, ta,2 are
The range of the operation start time is in between αa and the possible starting times between starting and end time of
βa − la. slot ranges.
ta ∈ [αa, βa − la] (19)
V. F ORMULATION OF GREY W OLF OPTIMIZATION
The number of cycles for the appliances’ operations is
A LGORITHM FOR SMART H OME A PPLIANCES S CHEDULING
obtained as follows:
The GWO is a recent meta-heuristic technique, which
Θ = St,end − St,st − la + 2 (20) mimics the leadership hierarchy and hunting mechanism of the
where, Θ is the number of cycles available for an appliance to grey wolves (canis lupus). To model the leadership hierarchy,
operate, St,st and St,end are the starting and end times for the four kinds of grey wolves are utilized. Those include the
appliance’s operation in the user defined range, and la is the alpha, beta, delta and omega. The basis of GWO algorithm
LOT of an appliance. Table III presents the various parameters is the democratic behavior and the hunting mechanism of the
of schedulable load appliances. grey wolves [17]. Both the male and female wolves are the

TABLE III
PARAMETERS OF SCHEDULABLE LOAD APPLIANCES

Appliances Power rating Actual OTD Daily Energy Energy Number of slots
(kW) (min) consumption consumption per assigned
(kWh) slot (kWh)
Washing machine with dryer 3 180 9 0.6 15
Electric oven-1 (morning hours) 2.15 45 1.72 0.43 4
Electric oven-2 (evening hours) 2.15 45 1.72 0.43 4
Refrigerator 0.225 1380 5.175 0.045 115
Electric iron 1.5 24 0.6 0.3 2
Water heater 1.5 60 1.5 0.3 5
Table fan 0.025 120 0.05 0.005 10
Coffee grinder 0.1 12 0.02 0.02 1

38
MOLLA et al.: INTEGRATED OPTIMIZATION OF SMART HOME APPLIANCES WITH COST-EFFECTIVE ENERGY MANAGEMENT SYSTEM 253

leaders in the pack and known as alpha (α). The second levels A. Shiftable Load Appliances Scheduled with Fixed Time
of the grey wolves (subordinate wolves) are known as beta Range
(β). The tasks of the beta grey wolves are helping the alpha In this scheduling, the operation time range for each appli-
wolves in the decision making and other activities in the pack. ance is adjusted by the user on the assigned time slots. There
The wolves at third level are known as delta (δ) those have is one or more than one operation cycle available for each
to submit to alphas and betas, but control the lowest rank schedulable appliance in a day. Users always have to schedule
grey wolves i.e. omega (ω) in the hierarchy. These omega (ω) and adjust the parameters of the appliances manually, followed
wolves act as scapegoat in the pack. Fig. 2 shows the flow by the utility electricity pricing (TOUP) signal. In Table IV
chart of GWO for proposed smart home appliances scheduling parameters of residential load appliances for fixed time range
problem. scheduling are provided.
Figure 3 shows the residential daily load demands under
Start fixed time scheduling with TOUP. It also shows the maximum
load demand within 24 hours in a day. Fig. 4 shows the
Initialization of Population size, Coefficients vectors, Maximum
iterations, Number of generations and their limits residential daily load demands in the fixed time range without
scheduling. The maximum peak load in a day is found at time
Define the initial cost function slot 38 up to 39, i.e. 7:24 AM to 7:36 AM, which is not
preferable in terms of cost minimization. For example, rather
Generation of Initial population randomly than using electric iron during this period of time, the user
can shift it to 12:00 AM to 12:48 AM, which is the off-peak
Calculate Xα, Xβ, Xδ duration. But it might not be good in terms of maximizing the
Iter+1
comfort of the user who is not interested in using it early in
Update the position of current search agent X(t+1)
X(t+1)=Xα+Xβ+Xδ/3 the morning. Most of the time, slots from 1 up to 15, which
are off-peak hours during night, are occupied.
Update A and C. Calculate Fitness value
Daily load demand without PV
5
Daily load demand (kW/slot)

For each search agent update Xα, Xβ, Xδ 4.5


Load demand
4
iter<max.iter Toup
3.5
No
3
Yes
2.5
Finish 2
1.5
Fig. 2. GWO flow chart. 1
0.5
0
0 20 40 60 80 100 120
VI. RESULT AND D ISCUSSION Hours of the day

The proposed smart home appliances scheduling problem is Fig. 3. Residential daily load demand pattern in fixed time scheduling (1unit
solved in eight different scenarios by using GWO algorithm. = 12 minutes).
Further, a comparison is presented with PSO [18] technique to
show the effectiveness of the GWO algorithm. The different To measure the PAR during the day, the mean value of the
scenarios for shiftable load appliances are introduced in the scheduled load demand is calculated. For minimizing the peak
following subsections. load demand, the appliances scheduled should be distributed
The maximum load constraint, control the peak load demand to all the time slots within a day, without disturbing the
in home and it is less than or equal to 5.5 kW in the above comfort level of the resident. To simulate the peak load, the
cases. fitness function in (9) is optimized within 24 hours of the day

TABLE IV
PARAMETERS OF SCHEDULABLE APPLIANCES FOR FIXED TIME SCHEDULING

Appliances Power rating Energy Number of Start time End time OTI (time
(kW) consumption per slots assigned (hour) (hour) slot)
slot (kWh)
Washing machine with dryer 3 15 15 12:00 AM 2:48 AM 1–15
Electric oven-1 2.15 4 4 7:00 AM 7:45 AM 36–39
Electric oven-2 2.15 4 4 7:15 PM 8:00 PM 97–100
Refrigerator 0.225 115 115 12:00 AM 10:48 PM 1–115
Electric iron 1.5 2 2 7:15 AM 7:30 AM 37–38
Water heater 1.5 5 5 10:00 AM 11:00 AM 51–55
Table fan 0.025 10 10 2:00 PM 3:00 PM 71–80
Coffee grinder 0.1 1 1 12:15 PM 12:20 PM 62

39
254 CSEE JOURNAL OF POWER AND ENERGY SYSTEMS, VOL. 5, NO. 2, JUNE 2019

Daily load demand without PV for unscheduled load


5 below 5.5 kW, which satisfies the power demand constraint.
4.5 The peak load during the day from time slot 3–15, i.e. 12:24
Daily load demand (kW/slot)

Load demand
4 AM–2:48 AM, is 3.225 kW by GWO; and from time slot 35–
Toup
3.5 36, i.e. 6:48 AM–7:00 AM, is 3.875 kW by PSO schedulers.
3
2.5 Daily load demand without Daily load demand without
PV using PSO PV using GWO
2 10 10
1.5 9 Load demand 9 Load demand

Load demand (kW)


Load demand (kW)
8 PV generation profile 8 PV generation profile
1 7 7
0.5 6 6
0 5 5
0 20 40 60 80 100 120 4 4
Hours of the day 3 3
2 2
Fig. 4. Residential daily load in fixed time range without scheduling. 1 1
0 0
0 20 40 60 80 100 120 0 20 40 60 80 100 120
Hours of the day Hours of the day
irrespective of the TOUP. The PAR calculated during 24 hours’
Fig. 5. The daily load pattern under restricted time scheduling and PV
time horizons is 4.7005. generation profile.
The fitness value in (7) is calculated while minimizing PAR
within a day. The total cost of electricity in fixed time range The PAR obtained with restricted time scheduling using
scheduling with the mean value of 4.7005 is 6.5568 Birr/day. GWO is 3.9121 and using PSO is 4.7005. The cost of electric-
The total energy consumption per day is 19.785 kWh. As seen ity is 6.2988 Birr/day by GWO and 6.4394 Birr/day by PSO
from Table IV, the washing machine is scheduled to operate scheduler. In restricted time range scheduling, using GWO
between 12:00 AM and 2:48 AM during night time. If the scheduler, the electric energy cost and PAR are 3.9% and
operation time of washing machine is shifted to day time 16.8%, lower than that of fixed time scheduling, respectively.
during peak hours, for example from 9:00 AM to11:48 AM, The daily peak power demand from grid without PV inte-
then the cost of electricity will rise to 7.7853 Birr/day and the gration within a day using GWO is 3.225 kW for time slot 13
PAR will be 5.7316. The maximum peak load is 4.725 kW, to 27, i.e. 2:24 AM to 5:12 AM. The net daily peak power
which is between time slots 51 to 55 (i.e. 10:00 AM–10:48 demand from grid without PV integration within a day using
AM). PSO is 5.375 kW for time slot of 44 to 47, i.e. 8:36 AM to 9:12
AM. Due to low pricing time during off-peak hours, time slots
B. Load Appliances Scheduling with Restricted Time Range
from 31 to 50 are occupied in case of PSO load scheduler. With
In this scheduling, the starting and end time slot ranges for GWO scheduler, low peak load has been achieved compared
the appliances’ operation that the user wants the appliance to to PSO scheduler.
operate in between, are specified. Between these time ranges, From Fig. 6, the PAR without PV using GWO is 3.9121
the position of the appliance to operate is determined by the while using PSO is 6.5201. The minimum cost without PV
load scheduler stochastically. using GWO is 6.2988 Birr/day, while using PSO is 6.3397
Then, the proposed algorithm selects the best combination Birr/day. Table VI presents the operation start and end time
of operation with minimum PAR and electricity cost. In this for multi-restricted time scheduling.
scheduling, the appliances are scheduled in the allowed
operation cycle ranges, which minimizes the allocation of C. Load Appliances Scheduled with Variable Time Scheduling
appliances to the inconvenient time slots. Table V presents the In this scheduling, the possible operation starting time slot
operation start and end time for the restricted time scheduling. is 1 and end time slot is 120. But the length of operation
From Fig. 5, the peak load demand per slot of appliances is time duration is greater than or equal to the starting time

TABLE V
OPERATION START AND END TIME FOR RESTRICTED TIME SCHEDULING

Group of Appliance Appliances Power rating Possible operation Number of OTI


(kW) start and end time slots assigned
range (hour)
Non-interruptible Washing machine 3 12:00 AM–5:48 AM 15 1–30
Flexible load with dryer
appliance
Electric oven-1 2.150 6:24 AM−8:36 AM 4 33–44
Electric oven-2 2.150 6:12 PM−9:00 PM 4 92–106
Interruptible flexible Refrigerator 0.225 12:00 AM−10:48 PM 115 1–115
Electric iron 1.5 6:24 AM−8:12 AM 2 33–42
load appliances
Water heater 1.5 9:00 AM−10:48 AM 5 46–55
Table fan 0.025 12:48 PM−3:48 PM 10 65–80
Coffee grinder 0.1 11:36 AM−1:24 PM 1 59–68

40
MOLLA et al.: INTEGRATED OPTIMIZATION OF SMART HOME APPLIANCES WITH COST-EFFECTIVE ENERGY MANAGEMENT SYSTEM 255

TABLE VI
OPERATION START AND END TIME FOR MULTI-RESTRICTED SCHEDULING

Schedulable Appliances Power rating Possible Operation Number of slots OTI


(kW) Start and end time assigned per
range (hour) operation cycle
Washing machine with dryer 3 12:00 AM–3:12 AM 15 1–17 or
or 3:36 AM–6:36 AM 19–34
Electric oven-1 2.15 6:00 AM–6:48AM or 4 31–35 or
8:00 AM–9:36 AM 41–49
Electric oven-2 2.15 5:00 PM–6:12 PM or 4 86–92 or
7:12 PM–8:00 PM 97–101
Refrigerator 0.225 12:12 AM–11:48 PM 115 1–115
Electric iron 1.5 6:00 AM–7:00 AM or 2 31–36 or
7:36 AM–8:24 AM 39–43
Water heater 1.5 8:00 AM–9:24 AM or 5 41–48 or
9:48 AM–11:48 AM 50–60
Table fan 0.025 12:00 PM–1:48 PM 10 61–70 or
or 2:12 PM–4:00 PM 72–81
Coffee grinder 0.1 12:00 PM–1:48 PM 1 46–54 or
61–70

Daily load demand without Daily load demand without Daily load demand without Daily load demand without
PV using PSO PV using GWO PV using PSO PV using GWO
10 10 10 10
9 Load demand 9 Load demand 9 Load demand 9 Load demand
PV generation profile PV generation profile PV generation profile PV generation profile
Load demand (kW)

Load demand (kW)

8 8 8 8

Load demand (kW)


Load demand (kW)
7 7 7 7
6 6
6 6
5 5
4 4 5 5
3 3 4 4
2 2 3 3
1 1 2 2
0 0 1 1
0 20 40 60 80 100 120 0 20 40 60 80 100 120
Hours of the day Hours of the day 0 0
0 20 40 60 80 100 120 0 20 40 60 80 100 120
Hours of the day Hours of the day
Fig. 6. The daily load demand pattern under multi-restricted time scheduling
and showing PV generation profile. Fig. 7. Residential daily load pattern demands under variable time range.

slot and less than or equal to the end time slot minus the
starting time slot. The starting operation time slots are within of the loads are occupied between those time ranges, which
their available operation cycle range for an appliance, which increases the peak demand. Using PSO, the calculated peak
has to be scheduled. Table VII shows parameters used for the load demand within a day is 3.25 kW, which is from the time
simulation of schedulable load appliances under variable time slots 25–39 (i.e. 4:48 AM–7:36 AM). The drawback of this
range scheduling. type of scheduling mechanism is that it assigns some of the
The daily load pattern under variable time scheduling appliances to inconvenient time slots to operate. The main
scheme is shown in Fig. 7. concern in this scheduling is the minimization of peak load
At maximum iteration, which is 500, the load demand while maintaining the load distribution within a day as smooth
pattern during the day is shown in Fig. 7. The peak load as possible. The PAR obtained on variable time scheduling
demand with GWO scheduler is 3.225 kW, which is from at maximum iteration using GWO and PSO are 3.9121 and
time slot 35 to 49 (i.e. from 6:48 AM to 9:36 AM). 3.9424, respectively. The cost of electricity calculated by using
Even if most of the time slots within a day are occupied, few GWO and PSO are 5.8497 and 6.0906 Birr/day, respectively.

TABLE VII
PARAMETERS OF SCHEDULABLE APPLIANCES

Appliances Daily Energy Energy Number of slots OTI (Slot Number of


consumption consumption per assigned No.) available
(kWh) slot (kWh) operation cycles
Washing machine with dryer 9 0.6 15 1–120 106
Electric oven-1 1.72 0.43 4 1–120 117
Electric oven-2 1.72 0.43 4 1–120 117
Refrigerator 5.175 0.045 115 1–120 6
Electric iron 0.6 0.3 2 1–120 119
Water heater 1.5 0.3 5 1–120 116
Table fan 0.05 0.005 10 1–120 111
Coffee grinder 0.02 0.02 1 1–120 120

41
256 CSEE JOURNAL OF POWER AND ENERGY SYSTEMS, VOL. 5, NO. 2, JUNE 2019

Net daily load demand with PV


The peak load in restricted, multi-restricted and variable time 10
range scheduling with the absence of PV generation is similar, 8

Daily load demand (kW/slot)


Load demand
which is 3.225 kW within a day using GWO load scheduler, 6 Energy Export
but 16.8% lower than fixed time range scheduling. 4
2
D. Fixed Time Range Scheduling Integrated with PV 0
In addition to the electric energy from utility grid, a 5 kW −2
−4
roof-top solar PV system is installed and used during day time.
−6
The energy generated from the PV panels is supplied via an
−8
inverter, which is integrated with home area network (HAN). −10
The priority to supply appliances is given primarily to PV 0 20 40 60 80 100 120
Hours of the day
panels under all scheduling scenarios. If the power generated
from the PV panels is not sufficient to supply the load of Fig. 9. The daily load profile pattern of unscheduled load appliances
appliances, the energy demand is fed from the utility grid. integrated with PV energy (1 unit = 12 minutes).
If the energy generated from PV panels has surplus energy,
then it can be exported to the national grid. To optimize the
objective function, the same procedure is used as in case 1 appliances, scheduled by using fixed time scheduling method
and parameters in Table IV are used with the integration of than that of unscheduled load appliances for both the system
the PV system. The simulation result is shown in Fig. 8. integrated and not integrated with PV systems.
For a system not integrated with PV, both the peak load and
Net daily load demand for a system integrated with PV generation
10 PAR in fixed time range scheduling are 17.99% lower than the
8 unscheduled load. The energy cost in a system not integrated
Daily load demand (kW/slot)

Load demand
6 Energy Export with PV generation using fixed time range scheduling is
4 15.78% lower than the energy cost of unscheduled load.
2 Similarly, for a system integrated with PV, by using fixed
0
time range scheduling, the peak load and PAR are higher than
−2
−4
unscheduled load. Most of the load demands in unscheduled
−6 load profile are compensated with PV than that of fixed time
−8 range scheduling.
−10 Rather than compensating the load demand fully, most of the
0 20 40 60 80 100 120
Hours of the day PV generation in fixed time scheduling is exported to utility
grid. The cost of energy that utility should pay the users in a
Fig. 8. The net daily load profile pattern integrated with PV energy under system integrated with PV using fixed time range scheduling
fixed time scheduling (1 unit = 12 minutes). is 2.35% higher than the energy cost in unscheduled load. A
comparative analysis is presented in Table VIII.
As seen from Fig. 9, the net peak load demand during
the day is 3.225 kW, while the net peak PV generation after E. Restricted Time Scheduling Integrated with PV
satisfying the load demand is−4.3566 kW per slot in 24 hours
time horizon. PAR is 3.9121. The total energy demand per day In restricted time range scheduling, the same parameters
of appliance is 19.785 kWh. The energy amount of 8.69852 used in case 2 and Table V is used with the integration of
kWh can be sold to utility grid based on TOUP tariff. The net 5 kW PV generation. Fig. 10 shows the net daily load demand
energy imported from utility grid in kWh is 0. For example, pattern. The upper portion, which is greater than zero, shows
if the shifting of the position of washing machine in day time the import from the utility grid. The lower portion, which is
during peak hours from 9:00 AM to 11:48 AM is done then negative, shows the export to utility grid.
the cost of electricity is rise to−3.82 Birr/day, which is 149% In a system, integrated with PV, energy cost in restricted
higher than the unscheduled load without PV. The PAR is time range scheduling is 4.86% and PAR is 1% lower than
3.7523, which is 34% lower than the unscheduled load without fixed time range scheduling, respectively by GWO scheduler.
integrating with PV energy production. The net daily peak power demand from utility grid with PV
Daily demand pattern for un-scheduled load is shown in integration using GWO is 3.1909 kW and by PSO scheduler is
Fig. 9. Energy cost, peak load and PAR are lower in home 3.225 kW within a day. The minimum PAR with PV using

TABLE VIII
DETAIL SUMMERY AND RESULT COMPARISON BETWEEN FIXED TIME RANGE SCHEDULING AND A SYSTEM WITHOUT SCHEDULING

Type of scheduling mechanism Working Mechanism Peak load PAR Energy cost (Birr/day)
Utility paid for the user User paid to the grid
Unscheduled System without integration of PV 4.725 5.7316 0 7.7853
System integrated with PV 3.0933 3.7523 3.82 0
Fixed time scheduling System without integration of PV 3.875 4.7005 0 6.5568
System integrated with PV 3.225 3.9121 3.9121 0

42
MOLLA et al.: INTEGRATED OPTIMIZATION OF SMART HOME APPLIANCES WITH COST-EFFECTIVE ENERGY MANAGEMENT SYSTEM 257

Daily load demand with Daily load demand with


PV using PSO PV using GWO load scheduler is 7.13% lower than the restricted time range
10 10 scheduling. Compared to fixed time range scheduling, the
8 Net Load demand 8 Net Load demand
Net Energy export Net Energy export energy cost and PAR in variable time range scheduling are
6 6
Load demand (kW)

Load demand (kW)


24.86% and 16.77% lower, respectively. For a system, which
4 4
2 2 is not integrated with PV energy generation, the peak load
0 0 in variable time range scheduling and restricted time range
−2 −2 scheduling are similar, which is 3.225 kW within a day. But,
−4 −4 it is 20.16% lower than the fixed time range load scheduling.
−6 −6
Fig. 12 presents the daily net load pattern of scheduled load
−8 −8
−10 −10
appliances integrated with PV energy under variable time
0 20 40 60 80 100 120 0 20 40 60 80 100 120 scheduling.
Hours of the day Hours of the day
Daily load demand with Daily load demand with
Fig. 10. The net daily load demand pattern integrated with PV generation PV using PSO PV using GWO
for minimization of electricity cost under restricted time range scheduling. 10 10
8 Net Load demand 8 Net Load demand

Load demand (kW)

Load demand (kW)


6 PV generation profile 6 PV generation profile
4 4
GWO is 3.8707 while with PSO is 3.9121. The total energy 2 2
demand per day of the appliances is 19.785 kWh. Net Energy 0 0
−2 −2
imported from the utility grid is 0 while net energy exported −4 −4
to the utility grid is 8.6985 kWh. The minimum energy cost −6 −6
−8 −8
with PV using GWO is −5.3065 Birr/day while using PSO is −10 −10
0 20 40 60 80 100 120 0 20 40 60 80 100 120
−5.2478 Birr/day based on TOUP. Hours of the day Hours of the day
F. Multi-restricted Time Range Scheduling Integrated with PV
Fig. 12. The daily net load profile pattern of scheduled load appliances
All the data used in case 3 and Table VI is used to optimize integrated with PV energy under variable time scheduling.
PAR, energy cost and peak load in multi restricted time range
scheduling. The net daily load demand pattern for a system The net daily peak Power demand from grid with PV
integrated with PV generation is shown in Fig. 11. The net integration using GWO is 0.79773 kW while using PSO is
daily peak power demand from grid with PV integration using 3.875 kW. The minimum PAR with PV integration using GWO
GWO is 2.8543 kW while using PSO is 3.225 kW. The is 1.0026 while using PSO is 2.881. The minimum total energy
minimum PAR with PV integration using GWO is 3.4624, demand per day of appliances is 19.785 kWh. The net energy
while with PSO is 3.8707. The minimum cost with PV imported from utility grid is 0. The minimum cost with PV
integration using GWO is −5.3065 Birr/day while using PSO generation using GWO is −5.7555 Birr/day while using PSO
is −5.2246 Birr/day. is −5.5139 Birr/day based on TOUP.

Daily load demand with Daily load demand with VII. C ONCLUSION
PV using PSO PV using GWO
10 10 In this work, a smart home appliance scheduling problem
8 Net Load demand 8 Net Load demand
Net energy export Net energy export is formulated and optimized using novel restricted and multi-
6 6
Load demand (kW)

Load demand (kW)

restricted time range scheduling techniques, while satisfying


4 4
2 2 all time and energy constraints. The first objective deals with
0 0 the minimization of monthly electricity cost. The second and
−2 −2 third objectives deal with the minimization of the PAR and
−4 −4 maximum peak load demand, respectively. Since the problem
−6 −6
is non-convex type in nature, two powerful binary type meta-
−8 −8
−10 −10 heuristic optimization algorithms, i.e. GWO and PSO are
0 20 40 60 80 100 120 0 20 40 60 80 100 120 utilized in order to effectively solve the problem. The system
Hours of the day Hours of the day
is integrated with a 5 kW roof-top PV panel with eight
Fig. 11. The net daily load demand pattern integrated with PV generation for
shiftable load appliances. To solve the problem, eight case
minimization of electricity cost under multi-restricted time range scheduling. studies are considered with and without PV integration and
detailed comparative analysis is presented. Results show the
effectiveness of the GWO technique over PSO in minimizing
G. Variable Time Scheduling Integrated with PV the cost of electricity, PAR and maximum peak load demand.
Since the scheduled load profile for the each appliance PV integrated system enables users to export surplus energy
is selected stochastically up to the maximum iteration point, to utility grid and benefit from the feed-in tariff. The futuristic
the shape of the load profile can be slightly changed during enhancement of the current work may be to solve the problem
iteration. with modified GWO algorithms such as GGWO or other recent
For the system, which is not integrated with PV generation, meta-heuristic techniques such as ITLO under multi-objective
energy cost in variable time range scheduling using GWO optimization framework for further optimizing the solution.

43
258 CSEE JOURNAL OF POWER AND ENERGY SYSTEMS, VOL. 5, NO. 2, JUNE 2019

REFERENCES Tesfahun Molla received the B.Sc. and M.Sc. de-


grees both from Hawassa University, Ethiopia, in
[1] H. P. Khomami and M. H. Javidi, “An efficient home energy manage- 2013 and 2019, respectively. He is currently working
ment system for automated residential demand response,” in Proceedings as a Lecturer at Hawassa University. His research
of the 13th International Conference on Environment and Electrical interests include smart grid energy management sys-
Engineering, Wroclaw, Poland, 2013, pp. 307–312. tem, optimization and integration of renewable en-
[2] L. J. Geng, Y. Wei, Z. G. Lu, and Y. Yang, “A novel model for home ergy systems, power system operation and intelligent
energy management system based on Internet of Things,” in Proceedings control, and application of artificial intelligence in
of 2016 IEEE International Conference on Power and Renewable Energy power system.
(ICPRE), Shanghai, China, 2016, pp. 474–480.
[3] Z. Zhao, W. C. Lee, Y. Shin, and K. B. Song, “An optimal power
scheduling method for demand response in home energy management
system,” IEEE Transactions on Smart Grid, vol. 4, no. 3, pp. 1391–1400, Baseem Khan (M’16) received his Bachelor de-
Sep. 2013. gree in Electrical Engineering from Rajiv Gandhi
[4] Z. R. Dogaheh and M. R. Dogaheh, “Optimizing the performance of Technological University, Bhopal, India in 2008. He
smart grids in relation with residential energy centers equipping with received his Master of Technology and Doctor of
Solar Power Units (PV),” Sindhological Studies, no. 1, pp. 14–22, 2017. Philosophy degrees in Electrical Engineering from
[5] S. Mohammadi, M. Momtazpour, and E. Sanaei, “Optimization-based the Maulana Azad National Institute of Technol-
home energy management in the presence of solar energy and storage,” ogy, Bhopal, India, in 2010 and 2014, respectively.
in Proceedings of the 21st Iranian Conference on Electrical Engineering Currently, he is working as a Faculty Member at
(ICEE), Mashhad, Iran, 2013, pp. 1–6. Hawassa University, Ethiopia. His research interests
[6] F. A. Qayyum, M. Naeem, A. S. Khwaja, A. Anpalagan, L. Guan, include power system restructuring, power system
and B. Venkatesh, “Appliance scheduling optimization in smart home planning, smart grid technologies, meta-heuristic op-
networks,” IEEE Access, vol. 3, pp. 2176–2190, Oct. 2015. timization techniques, reliability analysis of renewable energy system, power
[7] N. Gayathri, V. V. Vineeth, and N. Radhika, “A novel approach in quality analysis and renewable energy integration.
demand side management for smart home,” Procedia Technology, vol.
21, pp. 526–532, Dec. 2015.
[8] S. Shah, R. Khalid, A. Zafar, S. M. Hussain, H. Rahim, and N. Bezabih Moges is working as a Faculty Member
Javaid, “An optimized priority enabled energy management system for at the Department of Electrical and Computer Engi-
smart homes,” in Proceedings of the 31st International Conference neering, Hawassa University, Ethiopia. His research
on Advanced Information Networking and Applications (AINA), Taipei, interests include power system reliability, power
China, 2017, pp. 1035–1041. system planning, smart grid technologies, electrical
[9] D. Mahmood, N. Javaid, N. Alrajeh, Z. A. Khan, U. Qasim, I. Ahmed, machines, renewable energy sources and their prac-
and M. Ilahi, “Realistic scheduling mechanism for smart homes,” tical implementations.
Energies, vol. 9, no. 3, pp. 202, Mar. 2016.
[10] Y. T. Huang, L. Wang, and Q. D. Wu, “A hybrid PSO-DE algorithm
for smart home energy management,” in Proceedings of the 5th Inter-
national Conference on Swarm Intelligence, Hefei, China, 2014, pp.
292–300.
[11] J. W. Zhu, F. Lauri, A. Koukam, and V. Hilaire, “Scheduling optimiza- Hassan Haes Alhelou (S’15) is a Faculty Member
tion of smart homes based on demand response,” in Proceedings of the at Tisheen University, Lattakia, Syria. He is also
11th IFIP WG 12.5 International Conference on Artificial Intelligence a Ph.D. Researcher at the Isfahan University of
Applications and Innovations, Bayonne, France, 2015, pp. 223–236. Technology (IUT), Isfahan, Iran. His major research
[12] B. Yang, T. Yu, X. S. Zhang, L. N. Huang, H. C. Shu, and L. Jiang, interests are power systems, power system dynamics,
“Interactive teaching–learning optimiser for parameter tuning of VSC- power system operation and control, dynamic state
HVDC systems with offshore wind farm integration,” IET Generation, estimation, frequency control, smart grids, micro-
Transmission & Distribution, vol. 12, no. 3, pp. 678–687, 2018. grids, demand response, load shedding, and power
[13] S. F. Kazemi, S. A. Motamedi, and S. Sharifian, “A home energy system protection.
management system using Gray Wolf Optimizer in smart grids,” in Pro-
ceedings of the 2nd Conference on Swarm Intelligence and Evolutionary
Computation, Kerman, Iran, 2017, pp. 159–164.
[14] B. Yang, X. S. Zhang, T. Yu, H. C. Shu, and Z. H. Fang, “Grouped
Reza Zamani received the B.Sc. degree in Electrical
grey wolf optimizer for maximum power point tracking of doubly-
Engineering from the Sharif University of Technol-
fed induction generator based wind turbine,” Energy Conversion and
ogy in 2015, and M.S. c. degree in Power System
Management, vol. 133, pp. 427–443, Feb. 2017.
from the Isfahan University of Technology in 2017.
[15] S. Rahim, Z. Iqbal, N. Shaheen, Z. A. Khan, U. Qasim, S. A. Khan, and
He is currently pursuing the Ph.D. degree from the
N. Javaid, “Ant colony optimization based energy management controller
Tarbiat Modares University. His research interests
for smart grid,” in Proceedings of the 30th International Conference
include smart grid, power system protection, power
on Advanced Information Networking and Applications (AINA), Crans-
system dynamic and control, renewable energy and
Montana, Switzerland, 2016, pp. 1154–1159.
power plants, power system optimization, HVDC,
[16] K. Paridari, A. Parisio, H. Sandberg, and K. H. Johansson, “Robust energy management, and artificial intelligence.
scheduling of smart appliances in active apartments with user behavior
uncertainty,” IEEE Transactions on Automation Science and Engineer-
ing, vol. 13, no. 1, pp. 247–259, Jan. 2016.
[17] S. Mirjalili, S. M. Mirjalili, and A. Lewis, “Grey wolf optimizer,” Pierluigi Siano (M’09–SM’14) received the M.Sc.
Advances in Engineering Software, vol. 69, pp. 46–61, Mar. 2014. degree in Electronic Engineering and the Ph.D.
[18] J. Kennedy and R. Eberhart, “Particle Swarm Optimization,” Proceed- degree in Information and Electrical Engineering
ings of IEEE International Conference on Neural Networks, vol. 4, 1995, from the University of Salerno, Fisciano, Italy, in
pp. 1942-1948. 2001 and 2006, respectively. He is an Associate
Professor with accreditation for Full Professor of
Electrical Energy Engineering with the Department
of Industrial Engineering, University of Salerno. His
research interests include demand response, integra-
tion of distributed energy resources in smart grids
and planning, and management of power systems.

44
APPENDIX – 2
SCREEN SHOTS

45
Customer Details

46
Bill Details

47
Appliance Details

48
GUI without data entered

49
GUI with predicted result

50
APPENDIX-3

PUBLICATIONS

51
ISSN (Online) 2278-1021
IJARCCE ISSN (Print) 2319-5940

International Journal of Advanced Research in Computer and Communication Engineering


Vol. 9, Issue 08, August 2020

Prediction of Electricity Price and Units for


Home Appliances Using Random Forest
Techniques
Vasudevan N1, Sailesh Reddy B2, Suhail Abbas A3
Assistant professor - CSE, Anand Institute of Higher Technology, Chennai, India1
Student, B.E Computer Science and Engineering, Anand Institute of Higher Technology, Chennai, India2
Student, B.E Computer Science and Engineering, Anand Institute of Higher Technology, Chennai, India3

Abstract:
Conversation of Electricity is a must and it can be done by start predicting the electricity consumption. The electricity
consumption is higher than the required amount. Existing system uses mysql data for datasets and mathematical
calculation for the prediction process which takes longer time for processing and prediction through mathematical
calculations takes more time and accuracy is lesser. The above problem can be resolved by using big data processing for
large collection of data and with that data it is been used for training the machine using the random forest algorithm for
predicting the electricity consumption. Through that we enter the application’s usage time accordingly in the GUI which
takes the input and checks with the machine and gives the predicted range of the electricity consumption in units with
the price.

Keywords: Big Data, Hadoop tool kit, Random forest algorithm, GUI.

I. INTRODUCTION

Energy conservation is the effort made to reduce the consumption of energy by using less of an energy service. This can
be achieved either by using energy more efficiently (using less energy for a constant service) or by reducing the amount
of service used (for example, by driving less). Energy conservation is a part of the concept of Eco-sufficiency. The
electricity is also a type of energy which should be conserved by using low electric consumption application or application
that consumes electricity efficiently by storing the excess power in a battery and use them for future usage. Due to increase
in global warming every where they have started to adopt renewable energy like solar, wind where the half of the energy
is been lost while converting the solar or wind energy into electricity. Electricity can be conserved by predicting the
electricity usage and check with the application independently so that the application can be used according to the need
and by reducing its usage efficiently. For the prediction the data are been analysed and processed in a data set format for
the machine to use the data as input for training and testing. The Hadoop tool is been used for pre-processing and analyse
the large set of data. The random forest algorithm is been used for training the machine, where the random forest algorithm
is a supervised learning method. The supervised learning is a method where the input and the output is been given to the
system for the training and then it is compared to the test data for checking its accuracy.

II. EXISTING SYSTEM

Existing System supervises the given backend by utilizing MySQL which contains heap of disadvantages i.e.
information prerequisite is that preparing time is high when the information is tremendous and once information is lost,
it can't recoup . In the prediction part it uses normal mathematical calculations it causes higher time consumption when
large data is been processed it gives lesser accuracy.
.

III. PROPOSED SYSTEM

Proposed concept deals with providing database by using Hadoop tool it can analyse with no limitation of data
and simply add number of machines to the cluster and get the results with less time, high throughput and maintenance
cost is very less and we are using partitions and bucketing techniques in Hadoop. For the prediction and analyses part
uses random forest algorithm it calculates faster with higher accuracy. The random forest algorithm is a supervised
learning where we could train the machine with desired training data for the desired output.

52
ISSN (Online) 2278-1021
IJARCCE ISSN (Print) 2319-5940

International Journal of Advanced Research in Computer and Communication Engineering


Vol. 9, Issue 08, August 2020

IV. SYSTEM ARCHITECTURE

This system is designed to predict the electricity consumption of home applications. The system creates a table and
loads the data from the csv and the hdfs filesystems through the hive execution engine the data is been ordered and
analysed the true data only then they are been partitioned accordingly to their columns and they are bucketed for
their values and stored as a csv file data. The data set is been analysed and the required dataset is been taken as a input
accordingly to train the system for the required output. The trained dataset is been predicted accordingly to their
trained data then the results are been checked and then it gets as the output in the GUI application.

V. SYSTEM IMPLEMENTATION

• Pre-processing of data in the database: -


In this module we have to create Data set for Electricity Consumption it contains set
of table such that customer details, billing details and payment details for last four years .and this data first
provide in MySQL database with help of this dataset we analysis this project.

• Migration and Storage module:


Now the dataset are been transferred into Hadoop(HDFS) for storage, Sqoop is a command-line
interface application for transferring data between relational databases and Hadoop. we fetch the dataset into
Hadoop (HDFS) using Sqoop Tool. Using Sqoop we have to perform lot of the function, such that if we want to
fetch the particular column or if we want to fetch the dataset with specific condition that will be support by
Sqoop Tool and data will be stored in Hadoop (HDFS).

53
ISSN (Online) 2278-1021
IJARCCE ISSN (Print) 2319-5940

International Journal of Advanced Research in Computer and Communication Engineering


Vol. 9, Issue 08, August 2020

• Analyse data using Hive:


Hive is a data ware house system for Hadoop. It runs SQL like queries called HQL (Hive query language) which
gets internally converted to map reduce jobs. Hive was developed by Facebook. Hive supports Data definition
Language (DDL), Data Manipulation Language (DML) and user defined functions.
In here we analysis the dataset using HIVE tool which will be stored in Hadoop (HDFS).For
analysis dataset HIVE using HQL Language. Using hive, we perform Tables creations, joins, Partition,
Bucketing concept. Hive analysis the only Structure Language

• Validation and pre-processing


Validation techniques in machine learning are used to get the error rate of the Machine Learning (ML) model,
which can be considered as close to the true error rate of the dataset. If the data volume is large enough to be
representative of the population, you may not need the validation techniques. However, in real-world scenarios,
to work with samples of data that may not be a true representative of the population of given dataset. To finding
the missing value, duplicate value and description of data type whether it is float variable or integer. The sample
of data used to provide an unbiased evaluation of a model fit on the training dataset while tuning model hyper
parameters.

• Prediction:
The pre-processed data is been taken in as input for training the machine using the Random forest algorithm
then the trained set is been checked using test set of data where the accuracy is been checked after testing the
input for the user is been used as input and the machine runs according to its trained data set and it gives the
output in the GUI application.

VI. CONCLUSION

Here the Power Distribution to Datacenters data is help to give awareness to how much power consumption in different
datacenters. To run a analysis on the Power Distribution to Datacenters data in hadoop ecosystem. Then the local data
set of electricity consumption is been added into the Hadoop ecosystem for analysis. Hadoop ecosystem uses hive, pig,
map reduce to analysis faster than those data are been organized and been used in for the random forest for the bill
prediction.

VII. FUTURE ENHANCEMENT


In future, the proposed system can add some renewable source of electrical energy into the system and predict how
much the current can be saved, also able to suggest some less electricity consuming application and also predict when
these applications can be switched off or kept idle to stop the wastage of the electricity.

REFERERENCES
[1] H. P. Khomami and M. H. Javidi, “An efficient home energy management system for automated residential demand
response,” in Proceedings of the 13th International Conference on Environment and Electrical Engineering, Wroclaw,
Poland, 2013, pp. 307–312.
[2] S. Shah, R. Khalid, A. Zafar, S. M. Hussain, H. Rahim, and N. Javaid, “An optimized priority enabled energy
management system for smart homes,” in Proceedings of the 31st International Conference on Advanced Information
Networking and Applications (AINA), Taipei, China, 2017, pp. 1035–1041
[3] Z. Zhao, W. C. Lee, Y. Shin, and K. B. Song, “An optimal power scheduling method for demand response in home
energy management system,” IEEE Transactions on Smart Grid, vol. 4, no. 3, pp. 1391–1400, Sep. 2013.
[4] Z. R. Dogaheh and M. R. Dogaheh, “Optimizing the performance of smart grids in relation with residential energy
centers equipping with Solar Power Units (PV),” Sindhological Studies, no. 1, pp. 14–22, 2017.

54
E-Certificates

55
56
57
58
REFERENCES

[1] S. D. Beigvand, H. Abdi, M. La Scala, “A general model for energy hub economic
dispatch,” Appl. Energy, vol. 190, pp. 1090-1111, Mar. 2017.
[2] M. Geidl. Integrated modeling and optimization of multi-carrier energy systems. Ph.D.
Thesis. Austria: TU Graz, Styria; 2007.
[3] M. Geidl and G. Andersson, “Optimal power flow of multiple energy carriers,” IEEE Trans.
Power Syst., vol. 22, no. 1, pp. 145-155, Feb.2007..
[4] R. Lasseter and P. Piagi, “Microgrid: A Conceptual Solution,” in IEEE Annual Power
Electronics Specialists Conference, 2004
[5] Microsoft looking to test grid-independent data center,
http://www.datacenterdynamics.com.
[6] Q. Deng, D. Meisner, A. Bhattacharjee, T. F. Wenisch, and R. Bianchini, “Coscale:
Coordinating cpu and memory system dvfs in server systems,” in Proceedings of the
IEEE/ACM International Symposium on Microarchitecture, December 2012.
[7] R. Teodorescu and J. Torrellas, “Variation-Aware Appli-cation Scheduling and Power
Management for Chip Multi-processors,” in International Symposium on Computer
Architecture, June 2008.
[8] Rangan, G. Wei and D. Brooks, “Thread Motion: Fine-Grained Power Management for
Multi-Core System,” in International Symposium on Computer Architecture, June 2009.
[9] D. J. Sorin, O. Matthews and M. Zhang, “Architecting Dynamic Power Management to be
Formally Verifiable,” in Annual Design Automation Conference, June 2014.
[10] S. Kirkpatrick, “Optimization by Simulated Annealing: Quantitative Studies,” Journal of
Statistical Physics, vol. 34, no. 5, 1984.

59

You might also like