Sie sind auf Seite 1von 109

DCSP-Lab

Digital Communication & Signal Processing Lab


Prof. Dr.-Ing. Dirk Benyoucef

Master Thesis

Smart Metering: Data Acquisition and


Characteristic Extraction

Submitted by:
Mithilesh Kumar
Matrikelnumber: 234338
in Winter Semester 2010-11

Duration of Thesis:
15.10.10 - 15.04.11

First Advisior: Prof. Dr.-Ing. D. Benyoucef


Second Advisior: Prof. Dr. Robert Hönl
Contents

List of Figures v

List of Tables vii

1 Introduction 1
1.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Scope of Smart Meters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Scope of Thesis Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 State of Art 7
2.1 Intrusive Appliance Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 Non-Intrusive Appliance Load Monitoring . . . . . . . . . . . . . . . . . . . . . . 9
2.2.1 Steady State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.2 Transient State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3 Approach 15
3.1 Complete System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2 Measurement System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3 Data Conversion, processing & storage . . . . . . . . . . . . . . . . . . . . . . . . 18
3.4 Data Acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5 Data Processing with Matlab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4 Characteristics Extraction 25
4.1 Steady State Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.1.1 Instantaneous Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.1.2 Active-Reactive Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.1.3 Direct Current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.2 Absolute and Relative Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.3 V-I Trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.4 Transient state characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.4.1 Transient duration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5 Appliance behavior 33
5.1 Individual appliances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.1.1 Appliances with two switching levels . . . . . . . . . . . . . . . . . . . . . 34
5.1.2 Automatic appliances with two states . . . . . . . . . . . . . . . . . . . . 40
5.1.3 Appliances with multiple power level . . . . . . . . . . . . . . . . . . . . . 40
5.2 Pattern Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

iii
Contents

6 Appliance Detection 45
6.1 Information Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1.1 Two-Dimensional Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1.2 Array or Matrix data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.2 Alogorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.3 System Models for Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

7 Conclusion 63

8 Future Aspect 65

A Appendix 67
A.1 Appendix-List of appliances measured . . . . . . . . . . . . . . . . . . . . . . . . 67
A.2 Appendix Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
A.3 Appendix Programes & scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
A.3.1 ConvertDataMain: Main Function to Convert Measured Data to Format
Compatible for Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
A.3.2 DataInitialize: Initializes Variables and Structure . . . . . . . . . . . . . . 73
A.3.3 ConvertData: Body of Data Conversion . . . . . . . . . . . . . . . . . . . 74
A.3.4 ReadDataBase: From DataBase Measured file is read and Porcessed and
Data is stored back . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
A.3.5 Normalized Data: From DataBase Measured file is read and Porcessed and
Data is stored back as in ReadDataBase.m function with only difference
it saves additinal two fields of Voltage and Current in the saved structure
that could help to analyse VI-Trajectory . . . . . . . . . . . . . . . . . . . 80
A.3.6 Algorithms: Appliance Detection . . . . . . . . . . . . . . . . . . . . . . . 84
A.3.7 Edgedetection: Function is used to find or detect rising and falling edges
of the signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
A.3.8 FilterTransient 1: Function is used to filter and suppress transients to
differentiate it from Instantaneous power step change. This function is
used for further algorithms development. . . . . . . . . . . . . . . . . . . . 88
A.3.9 FilterTransient 2: Function is used to filter and suppress transients to
differentiate it from Instantaneous power step change. This function is not
used for further algorithms development as this approach was able to give
satifactory result only for individual appliances measurement or group of
very small appliances. In case of normal pattern measurement this method
was not found suitable and satisfactory. . . . . . . . . . . . . . . . . . . . 89
A.3.10 StepMatch: Function is used to match step change in signal to that of
corresponding step change of Individual Appliance measuerd in the group 92

B Bibliography 95

C Declaration 97

iv
List of Figures

1.1 Traditional meter & Smart meter . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


1.2 Energy consumption breakdown, source [EU] . . . . . . . . . . . . . . . . . . . . 2
1.3 Trend in Energy Consumption[EU] . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Electrical Appliances consumption breakups, source[EU] . . . . . . . . . . . . . . 4

2.1 State of Art . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7


2.2 Intrusive Load Appliance Monitoring . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Non-Intrusive Load Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.4 Instantaneous Power multiple loads . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.5 Slow transition from Transient State to Steady State . . . . . . . . . . . . . . . . 13

3.1 Various Phases of work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16


3.2 Measuring System block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3 Measuring card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.4 Functions Implemented . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.1 Instantaneous Power of multiple appliances activity . . . . . . . . . . . . . . . . . 26


4.2 Power components in P-Q plane [Bie] . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3 PQ Power of multiple appliances activity . . . . . . . . . . . . . . . . . . . . . . . 28
4.4 Model representation of real voltage source . . . . . . . . . . . . . . . . . . . . . 29
4.5 Example for features of VI-Trajectory . . . . . . . . . . . . . . . . . . . . . . . . 30
4.6 Transient delay in case of toaster . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.1 CTC Refrigerator Power Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35


5.2 Water Heater Power consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.3 Water Heater Power consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.4 Toaster Power Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.5 Other smaller Appliances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.6 AEG Coffee Power Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.7 Hairdryer Power consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.8 Ironbox Power consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.9 Total load replica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

6.1 Edge detection using Matlab inbuilt function ’edge’ with ’sobel’ algorithm . . . . 47
6.2 Instantaneous behavior of Appliances used simultaneously . . . . . . . . . . . . . 48
6.3 Architecture of Matlab functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.4 Architecture of Matlab functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
6.5 Flow Chart of Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
6.6 Parallel Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
6.7 Parallel Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.8 Serial Model Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

v
List of Figures

6.9 Original Vs. Reduced Transient in plot of PM22 . . . . . . . . . . . . . . . . . . . 62

A.1 Go back to Result Section 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68


A.2 Go back to Result Section 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
A.3 Go back to Result Section 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
A.4 Go back to Result Section 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
A.5 Go back to Result Section 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
A.6 Go back to Result Section 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
A.7 Go back to Result Section 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
A.8 Go back to Result Section 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
A.9 Go back to Result Section 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
A.10 Go back to Result Section 6.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

vi
List of Tables

2.1 Classification of Transients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.1 Classification Locations, [Bie] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21


3.2 Classification Usage Timings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3 Classification Usage Timings, [HGW] . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.1 Transients features for different consumers . . . . . . . . . . . . . . . . . . . . . . 31

5.1 Classification Power-Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6.1 List of appliances used in the measurement of Figure 6.2 . . . . . . . . . . . . . . 49


6.2 Sequence in which the measurement of Figure 6.2 was recorded . . . . . . . . . . 49
6.3 Result Of Edge Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

vii
Acknowledgement

To all people and well wishers who have contributed to finish my thesis work well within time that
lasted for six months. Throughout this tenure, all round support and advices from several people
helped me to finish the work comfortably. Hence, I would like to acknowledge my gratitude to
all of them related to me and my work directly or indirectly.
To mention, important of all, I would like pay gratitude to Prof. Benyoucef to let me work on
this exciting upcoming Research project work. This work exposed me to new area of interest
and research motivation to the next level, which might not have been possible without this
opportunity. To make me part of his team with outstanding colleagues and staffs, I dedicate full
honor of thanks to Prof. Dr.-Ing. Dirk Benyoucef. I would also like to give my special thanks
to Prof. Dr. Robert Heonl for his great assistance. Even though he was not directly associated
with work, in maintaining time and document helped a lot during the work. I thank him and
grateful to him for his accordance to be my advisor.
I pay my sincere thank with respect to the person who was most near to me in this work.
Discussion with him and his advices on the matter has always a satisfactory and closing end. His
idea and suggestion has always proved a great support to me and my work. In all way possible,
his contribution has been a key for the work consistently going in great shape. My hard work
and effort came to an acme with the his motivation. In short, he helped me to a great extent to
finish this work effortlessly. Mr. Thomas Bier who assisted me in all way possible wherever &
whenever I needed. His guidance made me to finish all complex task with great simplicity. For
his extraordinary effort and support, I give my honor and great thanks to Mr. Thomas Bier.
Apart for mentioned name, special thanks to my friend Anurag, Anup and Nico Konop who
helped me in last moment to organize the document. Concluding at last, I like to thank all staff
members in here and all my family and friends who have always stand by me with full support.
Thanks all of you.

i
List of Tables

ii
Abstract

Thesis work is the contribution in the direction towards one of the major research project in our
department of DCSP in Fach-Hochschule Furtwantgen, "Smart-Meters". Non-Intrusive Appli-
ance Load Monitoring approach in this area is one point system installation to detect Appliances
switch ON or OFF events from the total Power Signal measured at single point. The approach
for this includes detailed passive analysis for the behavior of several appliances. For which, total
power consumption from individual & group of appliances are stored by creating a database
system. Going through which it is found that total power signal behaves additively with the
behavior of individual appliances combined together. Different appliances has a unique finger-
print or feature to identify them from the group. These unique signatures set the base for the
development of detection algorithms further.
Complete work including data collection, data analyzing, algorithms development, advantages
and disadvantages observed during the complete course is discussed here. Due to insufficient
time, discussion could be led out only in one direction of complete approach. Hence, assumptions
& restrictions were made throughout algorithm development, however possibility and ways for
improvement is outlined for future aspect of work.

iii
List of Tables

iv
1 Introduction

1.1 Definition

Smart meters are next generation meters with advancement over todays traditional(Ferraris)
meters. The term ’Smart’ refers to advancement or additional features for easy and efficient
monitoring of power consumption. It involves advance infrastructure consisting computing and
communication technology, power & information theory. It attracted much attention in recent
years across the globe for several aspects mentioned in next section. Main issues are the actual
value of the benefits, the cost involved and the distribution of cost and benefits of smart me-
tering and market parties involved. Advance infrastructure deployment offers services such as
demand side management and realization of virtual power plants. In Broadway every sectors
that consume any form of Energy can be benefited by it. However, Smart meters discussed in
this document are for Electricity meters in household sector. It ensures both consumers and sup-
pliers, a better service in terms of power distribution, curbing cost and reducing carbon emission
to the atmosphere[E.G]. It measures electricity used or generated in the building or houses. An
advancement in system will ensure facilities to remotely switch off the appliances and thus con-
trol the maximum electricity consumption. Features of Smart meters makes it possible for real
and near time registration as often as demanded or required. Possibility to read meter locally
and remotely ubiquitously assures money and time savings. Interconnection to premise-based
networks and devices can be thought to implement into advanced stem for better infrastruc-
ture. Smart meters communicates by means of a modem and access two-way communication
with central body. It is one of the major topic attracted much attention in recent years for
its aspects. Many countries within EU and outside are already involved in projects with smart
metering on demonstration or on larger scale and it is estimated to record 2%-3% of energy save
per house[EU].

(a) Ferraris Meter (b) Smart Meter

Figure 1.1: Traditional meter & Smart meter

1
1 Introduction

1.2 Motivation

Energy demand is ever-increasing and will be ever-increasing in our society. Most of todays
energy needs are satisfied by non-renewable source of energy like coal and oil that are on the
verge of extinction. In addition increasing CO2 emission from usage of these resources is another
major concern to global environment. This leads to a cycle of High Energy demands followed
up by scarcity of resources which in further follows efficient utilization of Energy. EU-27 final
energy consumption grew by 8.4% between 1990 to 2007 and by 4.37% between 1999 to 2007 [EU].
The Current consumption of energy and electricity in different sector in EU-27 according to JRC
survey in year 2009 is shown in figure 1.2[EU]. Clearly consumption of energy in residential sector
is ahead of all only next to transport sector. Out of which Electricity consumption in Residential
sector is again highest consumer only next to industrial sector. It means conservation of energy
will have an major impact on global energy rising index.

Figure 1.2: Energy consumption breakdown, source [EU]

Electricity consumption in household is ever-increasing with the development, advancement of


living style and hence addition of home appliances on daily basis. These consumer in turn
also getting advance with latest technology in terms of power consumption but is negligible
when compared to increment in consumption. Deployment of smart meter helps more accurate
measurement of Active and Reactive power of consumers which helps in accurate measurement
and predictions of total load profiles. Demand side management(DMS) helps to generate variable
tariff profiles for consumers. Hence, smart meters will not only contribute to global energy
conservation but also saving individual money from electricity bill payments.
Electricity demand rose at the rate of 10.8% during 1999 to 2004 which were restricted around
4.46% from 2004-2007 and it is expected & estimated to deepen it further in recent years[EU].
Following trends over almost two decades it is observed that final electricity consumption of
the residential sector increased by 13.17% in period 1990-2007. Data says this growth has been
progressive every year except year 2007, when electricity consumption went down by almost
7.5% in compared to that in 2006, shown in figure 1.3. Similar trend is found in Japan too,

2
1.3 Scope of Smart Meters

where japanese home owners too reduce Electricity consumption by almost 18%[K.]. Most of the
credit for which goes to the Government effort, public awareness, efficient appliances and smart
metering deployment, for which countries like Italy, Sweden, Netherland played a vital role. By
the end of 2007, 27 million Smart Meters were installed by ENEL (state owned Energy Utility
monopolist) in Italy out of which 24 million meters are successfully being managed and read
bimonthly remotely [Har]

Figure 1.3: Trend in Energy Consumption[EU]

1.3 Scope of Smart Meters

Smart Meters can be implemented for monitoring various sources of Energy consumption like
gas, electricity & water. Hence, its application is also widened up in all the possible sector
where any form of energy is used. This definition therefore does not leave any sector untouched
where Smart Meters cannot be implemented. Figure 1.2 shows possibility and contribution in
all sectors where features of smart meters can be used to reduce consumption of total energy
and electricity which is not just demand but the need of today. Smart Meters discussed here are
only for Electricity consumption in house hold sector. Major household energy consumers with
their consumption are represented in chart below:

3
1 Introduction

Figure 1.4: Electrical Appliances consumption breakups, source[EU]

Here, individual and group of appliances can be classified based on their contribution to total
power load. Many small appliances are put together in Others group as their individual contri-
bution and usage is not considerable. According to JRC report, published in 2009, mentioned
above states that largest electricity consumers in EU-27 households are the electrical heating
systems (18,8%), cold appliances (15.3%), lighting (10,8%) and water heating systems(8,6%).
Complete set of appliances with their margin of contributions is outlined here in figure 1.4. Elec-
tricity consumption by home appliances in stand-by mode accounts for 5,9%, being the eight
main consumer with almost the same share as home computers and dishwashers together. These
home appliance are reported to grow at an approximate rate of 6-10% in Europe.

Smart Metering broad potential benefits appears to makes it indispensable for current and fu-
ture market. Companies started to foresee benefits in terms to decrease meter reading costs,
prepare grid for future, introduce new customer made services like reduce call center cost. It
involves major Government investments to reach energy saving & efficiency targets and to im-
prove free market processes. Above all, end user customer satisfaction with energy awareness,
reduction in energy use and cost is achieved. Overall summing up the benefits it helps suppliers

4
1.4 Scope of Thesis Work

to closely monitor the energy (or power) consumption, reduce energy thefts, billing accuracy &
tighter billings and collection, segregation of billings for various sources, energy consumed by
different appliance and all on real time basis both locally and remotely [Rob]. Similar satisfac-
tion achieved by consumers to cross-check their appliance health, power consumption, billings,
appliance monitoring and reporting to suppliers on time.
In spite of several efforts acceptance of smart meters among consumers is not high, which is
mostly because of high installation cost. But considering its advantages, whole cost of smart
meters and installation can be recovered in 2-3 years from the total bill payment[EU]. More-
over, an advanced metering infrastructure offers more than just reading and controlling smart
meters but to a dedicated gateway to a customer home, offering additionally energy related ser-
vices, local generation of electricity (micro CHIP) and possibility to realize virtual power plants.
However, investment in Smart metering could also become a risk for factors like competitions
among different parties involved and uncertainty of practical experience and historical data lack-
ing. In addition future of smart meters heavily depends on Energy policy and decisiveness of
Governmental bodies involved despite of Energy savings and secure supply makes Smart Meters
indispensable.

1.4 Scope of Thesis Work

As mentioned before scope of Smart meters is vast and huge. Hence, for its implementation,
ample amount of time and resources are needed. But under the tenure of my Thesis work, I
would be responsible for collecting data, analysis & developing part of the system discussed
further and to present my conclusion and proposal of my work.
Smart meters are implemented using interesting research aspect in the direction of power and
communication theory. It is broadly classified into two main Section Intrusive Appliance Load
Monitoring (IALM) and Non Intrusive Appliance Load Monitoring (NIALM). Brief detail about
IALM will be followed up in chapter ahead but main objective of this paper will in direction
of NIALM. NIALM concept is implemented by analyzing signals characteristics which is further
used in Appliance detection. Signal characteristics can again be extracted for different Appliances
from their different mode of operation, i.e Transient state and Steady state. Out of these state
of operation Transient state characteristics will be just over viewed whereas major discussion of
my work is for Steady state characteristics extraction and implementation.
In order to verify algorithms and extract characteristics significant amount of Data were needed.
Hence under my thesis scope I would also be responsible for Data Acquisition from different
appliances and various combination of appliances used in House-hold sector. The combination
of appliances are refered as ’Pattern measurement’ through out the document. Since appli-
ances available today are also vast and versatile, main work is concentrated taking just 2 events
(ON/OFF) appliances. At last taking appropriate characteristic, approach to classify and detect
appliance will be discussed. This classification and scope will become more clear in followed up
chapters. But the main focus of work is limited to data acquisition, characteristics extraction
and algorithm development to detect individual appliances from the total load in household.

5
1 Introduction

6
2 State of Art

Smart Meters are implemented using two approaches since the concept was proposed by Hart
in 1984[Har]. Both approaches has their own process of steps to implement the system. Block
diagram below gives an overview of possible approaches proposed for the system implementa-
tion. One is tiresome and need lot of manual effort whereas other one is easy and with almost no
or minimum manual intervention. In this classification, earlier one is called IALM, multi-point
installation and later one called NIALM, one point installation, to achieve the same objective of
Smart Meters. Both of these prototypes are discussed below and represented in Block diagram
2.1.

Smart Meter system

NIALM approach IALM approach

Steady State Transient State


Physical Intrusion Electrical Intrusion
Signatures Signatures

Size

Fundamental Harmonic
Direct Current Shape
Frequency Current

Duration
Power

Current

Spectrum

Figure 2.1: State of Art

7
2 State of Art

2.1 Intrusive Appliance Monitoring

Intrusive Appliance load Monitoring (IALM) technique is the idea to lead the foundation of
Advance and possible implementation of smart metering with Nonintrusiveness. IALM provides
promising and accurate results for appliance segregation and monitoring which is the basic goal
of smart meters. But in order to achieve this goal several other factors were trade offs in IALM
implementation. Even though process is too expensive and tiresome, it has an advantage of signif-
icant result in measurement and processing. The term tiresome is included majorly for the effort
required in its deployment. As the name suggests, process needs some sort of Intrusion¨(derived
from the word Intrusive) as it require "Submetering" and interior wiring. Intrusion could either
be physically or electrically into the house (or vicinity) where it is needed to be installed. In
this process, an individual sensor is connected to all the appliances, which is communicated with
local database system in the house 2.2. An Organization ETH from zurich has successfully de-
veloped a chip that can be installed in individual appliances to track their events and behavior.
Then central body collects data from all the sensors across the house and send them to grid
central system for further processing. Data processing for billing generation, registration and all
other purposes can be done locally or remotely by the means of various communication protocols
available.

Figure 2.2: Intrusive Load Appliance Monitoring

In case of physical intrusion, signatures for various devices are generated using Instantaneous

8
2.2 Non-Intrusive Appliance Load Monitoring

power phenomena and recorded by the process of tagging each appliances. Thus respective power
consumption is measured based on their usage, which is processed further for various applications.
This process is useful in case of two or more identical appliances are operated simultaneously.
In case of electrical intrusion an electrical signal is injected to device interface which changes
the behavior of appliance when it is being used with respect to injected signal. This change in
signal behavior is used then to generate signature for the device. Noting this change in behavior
of waveform or harmonics, information is processed to classify the appliances. In most cases
sonar like signal is sent and echo signal comes as output is examined for further processing.
This process is considered better over physical intrusion for no human invasion into any personal
privacy but complexity in installation make it fail to win edge over NIALM. However, because
of its advantage in result accuracy Intrusive appliance Monitoring technique can be considered
together with Non-Intrusive technique for better outcome[Har].

2.2 Non-Intrusive Appliance Load Monitoring

Non-Intrusive appliance load monitoring (NIALM) in contrast to Intrusive appliance needs no


intrusion of any kind. Signatures here are generated passively by observing normal operation of
the load and its characteristics e.g. step change in power signal, harmonics, frequency domain be-
havior etc. Using these signatures NIALM estimates number and nature of individual load, their
individual energy consumption and other relevant statistics such as time of day variation with
sophisticated analysis & algorithms. Hence avoiding any need of access to individual appliances
for installing sensors or making measurements represented in block diagram2.3. In addition, it
permits installation, removal, maintenance far easier than traditional IALM because it is one
point installation and automatic setup process. This One point installation is mostly done where
Utility power connection is connected to whole house electrical system. Moreover, as described
in [Har], NIALM Smart meters can be implemented by two system setup i.e. Manual Setup
(MS) or Automatic Setup (AS). AS the name suggested one needs manual intervention in case
of MS-setup, but this is only for the first time to observe the signatures and tag the appliances.
It differs from IALM, as no hardware ever enters the premises. On the other hand this is not
the case with AS-setup, where using loaded prior information about characteristics, AS-setup
should be able to provide all services automatically even without one time intrusion. However,
signatory outcomes from MS-setup is the backbone in order to implement AS-setup system.

9
2 State of Art

Figure 2.3: Non-Intrusive Load Monitoring

Signature generated for NIALM is from the total load signals which are observed to have different
signal behavior in Steady-state & transient-state mode of operation for any appliance.

2.2.1 Steady State

Since the introduction by George W. Hart from Massachusetts Institute of Technology (MIT)in
1984, Steady State analysis has been the focus of discussion for NIALM prototype of Smart
Meters. While observing household signals in 1980, he recognized visually the step change
behavior in load signal, which was proportional to the usage of appliances power consumption.
Since then idea and research work in following area has been introduced. On Power Vs Time
plot, power level found to jump to next level of values equal to the one consumed by respective
appliance responsible for jump. Hence step change is found to be directly proportional and
additive with respect to appliance usage. Every step change is followed by some transient events
due to switching behavior of appliances. However, steady state behavior is recorded before and
after the transient events. Because of the complexity and of minimal significance, transient
state behavior was ignored in algorithm development by Hart. But it was taken into account
by several other works followed up since then in this direction. Following example present the
behavior recorded for Steady state and Transient state from our sample measurement.

10
2.2 Non-Intrusive Appliance Load Monitoring

Figure 2.4: Instantaneous Power multiple loads

It is easier to detect and record the Steady state behavior for appliances for a continuous period
of time than momentarily transient events as transient events lasts only for small fraction of
time. Also, processing requirements and sampling rates required for recording transient events
is far different and complex than that required in case of steady state signatures. In this mode,
appliances are observed to show event change more often than that in transient mode e.g. event at
turn OFF’s mode. This contributes better in Signal analysis as it follows the additive property
for total power consumption Signal. Basically Steady state behavior is observed differently
in different operating conditions, which further serves the purpose of generating signatures.
Even Signatures here can be classified into two categories Fundamental frequency and harmonic
frequency signatures.

In case of operational Fundamental Frequency, power, current or admittance can be measured


from the total load in which step change can be observed. Since it follows successive additive
property, appliance switch ON or OFF events proportionally reflects in 2-D total power con-
sumption plot of power Vs time. Here, appliances behave in a similar fashion throughout over
recursive cycle. It means same pattern of plots or step behavior is found to repeat after certain
period. After analyzing individual consumer behavior cycles on instantaneous power plane, it
is further classified into imaginary components. Reactive power components caused by capaci-
tive and inductive elements in hardware consists of useful information. However in case of only
resistive hardware components, it coincides with Active power components as there is no phase
difference between voltage and current signal. Now, real and reactive power components form
cluster on PQ power plane, which are further analyses using cluster analysis algorithms. How-

11
2 State of Art

ever, switching operations of linear and non-linear loads are not detected using this approach.
Apart from this consumer consuming similar power cannot differentiated efficiently using this
approach. In addition, correct switching frequency is not recognized using by the coarse of sam-
pling frequency. Advantage in this state is possibility to analyze significant information in Time
domain &, Frequency domain. Combining information from two domains to generate significant
signatures helps over coming issues from one another.For example 3rd, 5th or other low order
odd harmonics contains significant behavior for current waveforms. Combination of two domain
generate a current spectrum rich in spectrogram for very high frequency electronic devices. Spec-
trogram results for low frequencies device are also followed up in subsequent chapters but is not
significant enough as in case of high frequency devices. Since Steady state has so many different
aspects of analyzing & processing, it has been a major point for research focus.

Therefore, various work in this field have been concentrating on steady State analysis. In other
approach individual consumer load profile is generated and used as a prior information for com-
plete system. In later chapters this idea has been approached in this work. Issue with this
procedure is to collect signature from individual consumers which are different and huge in num-
ber and then integrate to the total load profile data. In case of appliance with short switching
cycle outcome is inaccurate. In another approach, using optical measuring device, a system is
developed to monitor traditional Ferrari Meters. Here rotational speed of disc wheel in Ferrari
Meter is scanned and then instantaneous power is calculated from the data collected. Issues with
this system is resolution and later on similar system as proposed by Hart with more complex
system. In another approach load profile is created from statistical usage of consumer. It pro-
poses to detect simultaneous switching of load with reactive power components. It is done using
higher harmonics of current by means of Fast-Fourier-Transform (FFT) in frequency domain. It
involves only harmonic frequency in the algorithms.

2.2.2 Transient State

Analyzing Transient state is a difficult task but sometimes worth observing as it might provide
little but very useful information. It is the edges or peaks created momentarily during switching
events 2.4. Here shows an example of transient that lasted for almost 3 to 5 sample or a very
small fraction of time. This example is taken from Hair Dryer from Company Nethaus. Its clear
that transient rose to peak in just 1 or 2 sample but took some time to settle. In other words,
in this case Transient dies slowly taking time which is very small fraction of time 2.5.

12
2.2 Non-Intrusive Appliance Load Monitoring

Figure 2.5: Slow transition from Transient State to Steady State

Signatures from Transient state are difficult to capture as it is generated in different shapes and
lasts for a very small fraction of time, depending on to mechanism applied. Resistive appliances
typically have no or very minimal switching transients, however pump or motor appliances gen-
erate significants transients. It is also observed that most of appliances that generate transient at
turn ON events does not generate transient at turn OFF events and vice-versa. Parameters for
classifying transients are their size, durations and time constants. Hence, two identical devices
consuming same amount of power having identical steady state behavior might have different
transient characteristics. For example observing transient behavior could identify and differen-
tiate the the behavior of two similar devices having same or nearly same power rating from the
total load signal. In against to it if turn ON & turn OFF events occurs simultaneously then,
it would not be able to distinguish the devices by transient state signatures. Some classified
transients are listed below which could serve better for Appliance classification:

These features helps to overcome detection problems like events overlapping, smaller power con-
sumers in Steady State. It plays a vital role in case of Reactive power, when appliance with
capacitive or inductive components were introduced. Previous work in this direction proposed
an important role of transient peaks are considerable for detection algorithms. Once such al-
gorithm is presented in [S.S]. He observed some very important characteristics to develop an
algorithm. Several other approaches presented combination of Steady and Transient State for
better accuracy. However, a small accuracy in overall output will be achieved on the cost of
heavy computation. In our work measurement is taken at the sampling frequency of 8 KHz,
which is a major factor to determine duration of transients and thus deciding factor for amount
of computation needed to analyze transients. Little observation about transients from different
appliances are recorded and presented in section 4.4.1.

13
2 State of Art

S.No Classification of Appli- Feature of Transients Example


ance
1. Resistive No or very short (<50 Toaster
Hz) period transient
2. Pump-operated Appli- long ON transient Refrigerator, Washing
ance (electric motor) Machines
3. Other motor appliances less substantial that Fans, washing mach,
previous one mixers
4. Electronically fed appli- short, very high ampli- Television, PC
ances tude switch ON tran-
sients
5. Fluorescent lights long 2 step switch ON Bulbs, lamps
transients

Table 2.1: Classification of Transients

14
3 Approach

Basics of Smart metering has already been implemented in many countries by several utility
companies. But advance metering or intelligent smart meters are still part of great research
work, for which approach presented in our university is discussed here. Our implementation
includes mainly 3-phase. Collection of data from individual and group of appliances measurement
for first phase called Data Acquisition. Then comes characteristic extraction where analysis of
their behavior is recorded. After which finally in last phase Algorithm is developed to detect
individual appliances from the group of appliances measured together. Once convincing result
is obtained, system can be implemented in field for Testing. All three phases are discussed in
detail in following chapters mentioned in brief here.

In order to detect appliances from total power measurement, we needed to analyses signal be-
havior of each appliances in detail. For which we listed whole set of appliances used in household
and consumes considerable amount of power. In our first step we took individual measurement
of all these appliances. For measurement whole measuring system is used for which complete
design and development was taken out in our laboratory. This system was used extensively on
whole bunch of measurement. List of appliances measured in this work are listed in Appendix
A with respective measured power consumption. A huge database with these individual power
measurement is created. In addition to it several pattern measurement (measurement from set
of combinations of different appliances) are also recorded in this database. Hence to analyses
and track the appliance behavior our database can be considered sufficient enough as a replica
of a real field scenario. Pattern measurement is the replica of total power measurement similar
to their their daily usage in a normal household. Pattern used for measurements are created
from the combination of appliances in such a fashion that turn ON and turn OFF events of
different appliances are separated by some small interval. Because its very rare in our home
scenario too that all or many appliances are turned on or off simultaneously. Some coincidences
are however ignored considering starting phase complexity of the development. But some other
coincidences where two or more appliances creates an event simultaneously resulting change in
some pre-defined threshold power level are presented in our discussion.

Once database is created with pool of measured data, we proceeded with characteristic analysis
in our second step. Tracking and analyzing signal characteristics are the backbone for detection,
and hence needed a detailed time and description. Signal characteristics are observed for indi-
vidual appliances and matched with their behavior in replica of total power measurement. Most
of the time characteristics are found to follow additive property whereas few times it behaves
slightly different in combined appliance measurement with that from individual appliance mea-
surement. This slight different behavior are also recorded as it could be important phenomena
to differentiate between two similar appliances in extreme cases. As it is observed two similar
behaving individual appliance could trigger few unique characteristics when used under different
conditions.(Refer section 5.1.2).

15
3 Approach

After unique signature is generated from observing signal characteristics for all appliances, last
phase of development remain, Appliance detection.̈ Hence, various algorithm is into developing
phase on the basis of observed feature in second phase of work. Algorithms are meant to take
total measured power data as input, and after processing list out the appliances with their event
changing time record. Considering the system complexities more than one algorithms are used to
detect and list out the appliance tracking. The number of Algorithms are directly proportional
to the number of characteristics observed before and amount of efficiency required. Again in
order to apply detection algorithms two possible models are proposed in my work (Refer section
6.3 for detail). Both these models uses the same algorithms but in different fashion to increase
the processing speed and efficiency against the trade offs on for each other.

3.1 Complete System

From the point where measurement is taken data filters through different processes till they are
applied to actual appliance detection. Block diagram below represents different phases of data
processing involved during the coarse of our work.

1. Data Measurement

2. Data Conversion

3. Data Processing &Storage

4. Data Input to Algorithms

5. Detection & Recording


output

Figure 3.1: Various Phases of work

It involves 5 main phase as mentioned which are discussed in subsequent sections and following
chapters. Phase 1 through 3 is mentioned here in this chapter and rest are followed up in

16
3.2 Measurement System

subsequent chapters.

3.2 Measurement System

First phase in block diagram in previous section in figure 3.1 talks about data measurement. This
is the most initial part in the process of Data Acquisition that involves a development of mea-
suring system. Here, Current and Voltage for all consumer or load is measured using measuring
card 3.3. Block diagram of complete system is shown below in 3.2. Complete measuring system
consists of Ḿeasuring cardánd D́ata Acquisition card,́ which measures input from consumer and
records output in a system in a text file format.

Figure 3.2: Measuring System block diagram

Detail discussion about measuring card however is not the part of my work, a brief introduction
is mentioned here (Refer [Bie] for detail design and development of measuring card). Since
the beginning single phase appliances in household are measured. Measuring card therefore,
designed & developed in our laboratory was also meant for single phase measurement. It is used
throughout and during all measurement taken place in regard to our work. Output of measuring
card goes to the input of Data acquisition card (DAC) from Agilent. This converter samples 50
Hz analog signal data at the rate of 8KHz frequency. Slightly slower rate can be used, but this
leads to more errors in identifying appliances. Whereas, a slightly faster rate need an expensive
recording devices with almost no apparent advantage than little better precision. In order to
verify this information few appliances were measured at different possible frequency and findings
justifies the above mentioned information. These data are recorded in a ASCII text file on a
laptop. Software designed to log the measurement facilitates user to record data on other file
format too, however in all our measurement ASCII text file is considered. These raw data are
converted and processed for further analyses on different system using software ’Signal Processing
toolbox’ from MATLAB.

In order to generate and analyses signature for appliance detection first individual appliances are
measured. Complete list is listed in Appendix. During the course of signature generation and
algorithm development, all results are mentioned based on pattern measurement replica created
by us and hence it is expected but does not grant or promise similar exact results as in my
work on all pattern measurement in different scenarios. This also applies to real time scenarios
and other measuring conditions could be different in the field. Another restriction on pattern
measurement was that number of appliances combined together were taken so that total current

17
3 Approach

consumption does not crosses 16 Amps. This restriction is only based on multi extension device
present in our laboratory, however it will not be a matter of concern in normal scenario.

Figure 3.3: Measuring card

The Measuring box is directly connected to consumer and measures the current and voltage
signal. Measuring system at a time designed for signal phase enviroment. It is also true for
most of the appliances measured in the beginning was for single phase usage. In single phase
two signals are evaluated and are integrated into the test box. Voltage is tapped via voltage
divider and a coupled differential amplifier. The resistors used in voltage divider are very precise
which can easily be drifted to a little change from its nominal value. While designing, a power
supply of 230V was used. Since the sinusoidal signals were measured, peak value was calculated
by a multiplication of effective factor of (root 2). At 230V rms value, a peak value is therefore
obtained as 325V. Power tolerance of +/-5V in the calculation is included. The voltage divider
has a ratio of 1:143rd of the designed value. The maximum value takes signal from the differential
amplifier 2.27V. For future layout of circuit reduction in ratio should be considered to lay an
adjustment of +/-10V. This would result in low signal to noise ratio(SNR). All measurements
were taken at the sampling rate of 8kHz for 2 channels. Signals therefore could be analyzed
upto respective cutoff frequency of 4kHz. The threshold is enough as per evaluations, as signal
does not found to have any significant information above this value. Resolution of signal is kept
16 bit enough for detecting large appliances. Below this value appliances behavior are lost in
the noise level range. Taking voltage supply in our electrical network 230V and a maximum
effective current of 16Amps limitation in our lab as mentioned in previous section, the result
is a maximum instantaneous power of 3680W. Even if this level does not represent exact field
scenario, this can be refered as similar replica on smaller scale normal household[Bie].

3.3 Data Conversion, processing & storage

Second and third block in figure 3.2 are 2 steps process where data is taken from a location
processed and stored back in same or other location mentioned. The measured data is written
via USB to a PC in *.txt files for later processing. This data file contains a continuous index,
the number of readings and the current and voltage measurements. Using a conversion file
created in Matlab scripting tool, data files were formatted in the proper manner for further
processing. This formatting is mainly for data recognition by their unique header Id in a complete

18
3.3 Data Conversion, processing & storage

database with pool of data. Script named DataConversion is used for this purpose listed in
Appendix. It creates a header file of very small with only the information like unique id, location,
size etc. needed to locate the original huge data file in database. Information contains name
of the person who carried out the measurement, place where it is taken out and with some
additional information, the name of the consumer measured. Guidance information in the file
helps other person to understand the measuring scenario than the one who took the measurement.
Later on this comma-separated values from ASCII file format are processed in Matlab and
hence data is converted into Matlab compatible data format called binary values in the form of
structure. Values in structure format are stored in different fields naming various power values
with corresponding time values.

As mentioned earlier Signal is sampled at 8KHz frequency which gives total of 8K data per second
which is a huge number. Since all measurements were taken from few seconds to several hours, it
results data size ranged from few megabytes to several gigabytes. Normally measurement need
to be recorded and saved and processed for few days data, hence disk storage and processing
requirements are vital factors to be looked into for optimization. To process any form of data,
Matlab converts it into binary data format ’.mat’ hence various file format options to store the
data on disk were also explored. It was found that Matlab data format binary file ’.mat’saves
more than 75% of disk space to store the same amount of data in compare to size that is required
by ASCII data file ’.txt’. But not to be ignored data saved in binary ’.mat’ format are prone
to errors more often than that saved in ASCII ’.txt’ format file. For examples several editors or
software can be used to read data saved in ’.txt’ file whereas, ’.mat’ file data gets often corrupted
if tried so which then cannot be used even in Matlb software. Addition to it Processing enormous
data together in MATLAB is impossible, as at a time, Matlab can process approximately 1e+6
number of bytes, hence complete data was needed to break into chunks of data of equal or smaller
to that size.

Even after processing these data need to be written in file and store back on the disk, which are
smaller data than the original one by the sampling factor of 160 in our case. Though processed
data upto 4 hrs of measurement is saved on disk in ’.mat’ format, it cannot assure to save a day
long measurement or more. In which case ’.txt’ file format and segmenting block of data will be
an optimized solution.

Data Acquisition card (DAC) shown in 3.2 used throughout in our measurement. It is 16 channel
U2353 card from company Agilent. As mentioned before about one phase measurement, evalua-
tion of measurement card is turned as expensive and not the most optimal solution for designed
and complete Research system. The conversion of A/D conversion in the block is based on the
Texas Instruments ADS1278. In this family of devices several other types were examined too.
They differ in number of its parallel converter channels from 4 to 8 and the resolution it provides.
The output format of SPI mode and the supported frame sync differ in clock rates. For example,
if frame is sync at 37MHz, so its corresponding SPI sync frequency is around 27MHz. However,
card is capable for three-phase measurement. The verification process for the card was is also
carried out in by Thomas in [Bie]. This states, system was investigated for the phase offset of the
measurement board, with Agilent card being not the simultaneous measuring card. It contains
only an A/D converter to which individual channels were multiplexed. Accordingly phase shift
equivalence 2 microsecond between the signals from the measuring card. The maximum sampling
rate makes the card black. This was verified by Thomas in his work as well as by myself in my
work. For this verification signal sampling rate was verified starting from 100Hz to 500kHz.

19
3 Approach

Since, continuous phase shift has the same value, this could be quite easy in the development of
algorithms, just to consider one value. Error, however would be the adapting of phase difference
of one signal to another. Time-dependent variables, voltage and current in this case are harmonic
variables like sinusoidal, hence can be represented by complex pointer. The Harmonic voltage
could be explained by

u(t) = U0 cos(ω + φ)

Here,u(t) represents instantaneous values of voltage to time duration t. U0 is the amplitude of


voltage and u is the zero phase shift angle equal to zero, means both signals are in phase.

i(t) = I0 cos(ω + φ)

The phase shift of the two signals is the difference between two zero phase angle. If this phase
shift angle equals to zero, both signals are in phase ie.

φ = φu − φi

Measurement noise (mainly from IC), that performs current-voltage conversion has an influence
on the data measurement. IC is divided into areas of current 40mA (At the supply voltage of
5V). For the development of complete system it is necessary to have properties of individual
components are accurate and reliable. As a part of measurement and algorithm development it
always results some or minimal error as a part of research project outcome[Bie].

3.4 Data Acquisition

After the construction of the measuring Data is collected int two phase. First for the individual
appliances and then for the group of appliances together. In order to develop the algorithm for
consumer disaggregation, it was necessary to create data base. As mentioned before it should
be exact replica of appliances used in home enviroment as close as possible. Hence while taking
measurement care was taken to create an turn ON/OFF event as it happens in household at
different point of time. An effort in this regard ended with a huge data collection from the
diversity of measurement. This data base intended as a reference database for the comparison of
algorithms from past and serve the future. In advance classification of consumer was conducted
[BKB] [BBK]. After which, few consumer when left out and does not fall into any classification
then later separate conclusion has been drawn based on their switching cycles. For that following
depositions were made.

t Classification of Appliances based on switching states:


Depending on the complexity of the consumer, they are classified into group of switching
states. Simple resistive loads like lamps, toaster, kettle etc. have two switching states and
can therefore be detected easier than complex machines. This complex group of machines
includes list of autonomous machines like dish washers, washing machines etc. and list of

20
3.4 Data Acquisition

automatic with manual setup like TV, Radio, computer etc. Complete list of consumers in
this class is listed below in table 5.1.
t Classification of appliances based on power consumption:
As mentioned in section 2.2.1, all the listed algorithms are aimed to detect mostly the large
consumers. However, for which some trade offs in efficiency to detect smaller consumer
can be afforded. Hence, it completely justifies the future aspect of consumer classification
based on the power consumption.
t Classification of consumers based on their location:
For later approach a division of appliances based on their local situation can also be con-
sidered. It will help to formulate the algorithms based on probabilistic and deterministic
theory, which can later serve to automate the process of its own by making self estimation.
Common lamps does not belong to this criteria as it is installed in almost every rooms.
Complete list is mentioned in table 3.1. Example for this would be if light is turned ON
in living room at night, then probability of TV being turned On would be high.
t Classification of consumers based on daily usage:
Lastly, one of the most important classification can be done based on their daily usage.
Then similar to the one mentioned in previous section, probabilistic theory and estimation
can be used in the algorithms development to detect appliances. for example most of the
high powered light lamps are switched ON in night. It is very useful in case of DSM man-
agement or variable tariffs [M.L]. List of some common appliances are mention in 3.2

Location Appliances
1. Kitchen Mixer, Microwave, Refrigerator, dishwashers, stove, oven
2. Living room TV, VCR, telephone
3. Bedroom Computer, Monitor, Printer
4. Bathroom Hairdryer
5. Basement Washing Machine, Freezer
6. Central place Heating and cooling appliances

Table 3.1: Classification Locations, [Bie]

Timings Appliances
1. Early Morning Coffee Machine, Radio
2. Morning Microwave, Toaster, Juice Maker, TV
3. Afternoon Computer, Monitor
4. Evening Music Player, TV, computer
5. Late evening Oven, Microwave, Mixer, Juice Maker, Stove
6. Night TV, Computer

Table 3.2: Classification Usage Timings

In the work of Lam and his colleague [HGW] another view of classification is mentioned in the
same direction of the one presented in section 2.2.2. They the pattern observed in V-I trajectories
affected by various factors like Asymmetry, Self-intersection, Loop direction, curvature mean line

21
3 Approach

& area and peak formation in different part of plots. Classification based on his work is presented
below: in 3.3. Brief detail on this approach is mentioned in section 4.3 with an example 4.5

Classes Appliances
1. Resistive Electric kettle, Water
heater, Hair dryer,
Toaster
2. Motor-driven Mixer, Juice Maker,
Blender, Vacuum-
Pump, fan, Grinder
3. Pump-Operated Refrigerator, Freezer
4. Electronic based Music Player, TV,
Computer, Video-
Recorder, Energy-
saving lights
5. Others Oven, Microwave, Stove

Table 3.3: Classification Usage Timings, [HGW]

Among all the classification presented, it was made sure to observe behavior of consumers from
each classes. In chapter 5, examples from appliances are shown following at least one appliance
from each group. This is done to assure to replica generated in our lab to fit for any classification
mentioned here and pass these criteria. There is possibility to classify with different other
approaches. Since high power appliance are the main focus first 2 are now concentrated more in
this work. Other points could be the backbone to serve the future aspect application.

3.5 Data Processing with Matlab

After the construction was carried out for measuring system and data collection using Agilent
DAC card, later comes processing and analysis of data. The complete function and scripts found
in this work are written in MATLAB. Following this section, a brief representation of hierarchy of
all functions used are shown. The source code of functions and scripts can be refered in Appendix
A.3. The complete design and development till the phase today is implemented in Matlab.
However, since in real time scenario Matlab functions cannot be implemented, they must be
converted to C programs. But this would be part of later phase of implementation. First phase
of data processing including conversion and storage in different formats are already finished. Part
of next phase consisting of algorithms development is done and presented here. But considering
efficiency, result outcome and improvement, this phase can further be improved in future. In
my work mainly Edge detection and Event detection is being presented. An implementation of
proposed model has been also presented here. Rest of algorithms and approach could be done
in the limited tenure of period(refer chapter 6).

An elementary function of all the scripts is to read and write the data (refer Appendix). It
reads raw data from original measured output file and makes it available for further processing.
Most important concern here is to deal with the memory issues in data processing. It is already

22
3.5 Data Processing with Matlab

mentioned that sampling data with 8kHz frequency results in data size of GB range for the mea-
surement for hours. For example approximately one hour measurement results into txt file of size
around 1.2 GB. Now this value equals around 1.2 times of 109 bytes. Now a normal computer
with 4 GB RAM with 32 bit processor installed Matlab has a capacity of processing an array
utmost of the length of 106 to 107 . It means, data for just one hour cannot be processed together
in just one go. Hence, it was needed to break data into small blocks of data within limited range
and process in more than one run. This is of very high concern, as measurement from real time
scenario will last for more than a day, means many hours and data in several GB. This overview
is presented here just to give an idea, but in fact in real calculation data is also reduced by the
factor of 160 as 50Hz signal is sampled with 8kHz signal. This factor reduces large amount of
data but not enough to process whole data in just once or few runs. Hence, running and process-
ing data in chunks of data is mandatory and after every run memory is cleared before next run.
In function convertData.m block size is kept 50000 for one run where while further processing
this block is increased upto 106 . In function ConvertData.m various information is provided like
Person Name, Place, Appliance details and some important notes if there is any. Based on these
information this function gives unique ID to each file. As mentioned before original data file is
processed by ConvertData.m which creates two resulting files. Firstly a header file only with
important information about data file. Other one is real data file containing real data. Storage
of these two files in database is stored with distinction in their file name as mentioned:

Header File:
Year-month-day-hour-minute-Head-Art-Place-Person Name-Appliance Name-Important Note.txt

Data File:
Year-month-day-hour-minute-Art-Place-Person Name-Appliance Name-Important Note.txt

The second group of functions evaluates results. All functions implemented are now classified
into sub functions as mentioned below in block diagram.

Figure 3.4: Functions Implemented

The first function in the direction of Algorithm development mentioned in figure 3.4 was the
function edge detection. Since all events, whether a steady state or transient state event, it
changes the step difference between consecutive samples and hence leads to an edge creation.
Hence edge detection was the first major step to start algorithm development. Once edge is

23
3 Approach

detected second step includes filter of transient peaks. Criteria of which is mainly a respective
high values lasts for fraction of second. It is already mentioned in detail in section 2.2.2 and are
further explained in detail in further chapters and sections. Once Transient peaks are filtered,
next aim is to detect an event. It includes all Switching ON and switching OFF from detected
event. Comparing their step levels, differentiating them from tolerance value and hence name
the appliance events are the function of this part. It is expected to detect major appliances in
here but not all, considering factors we have been discussing. After this is achieved, according to
proposed new model of application, amplitude of signals must be reduced between an appliance
turning ON and before it turns OFF. It means signal value between turning ON and turning
OFF of one appliance is reduced to the previous signal level which was there before it turns ON
and which should be there after it turns OFF, if there are no other events created in between. It
helps in improving processing speed for the next algorithms as next algorithms need not check for
behavior of appliances already detected. These functions are tested alone but once proper result
is achieved, it is all combined in one function. These all functions are as a result of processing
only one Instantaneous Power value. Detail glance of this Model is given in section 6.3. Rest
blocks of block diagram 3.1 is presented in followed up chapters ahead.

24
4 Characteristics Extraction

This chapter discusses about individual characteristics of Signal behavior in detail. From previous
section it is clear that, in order to detect Appliances, signatures need to be generated and
recorded. These Signatures are then used as a prior information for detection algorithm discussed
in chapter 6. Signature or the signal behavior pattern are unique feature of each appliance or the
group of appliances to differentiate that from other appliance or the group of appliances (chapter
3 should be refered for different approach to classify appliances into different group).

On the basis of specific feature of appliance, its pattern of cycle is created which is later defined as
unique signature for detection algorithm as mentioned in chapter 2 for classification of appliance
behavior into Transient and Steady state. Major feature under our consideration is distinguished
by their cycle or period. Since steady state behavior lasts for quite long time before and after
transients, not many changes are observed in the range of these periods which is normally few
seconds. Hence, it is sufficient to work with few sample values for a second or more and can be
extended for longer period with the similar cycle of pattern. It is hence, worth and sufficient
enough in most of the cases because most of the household appliances are small and fits in this
criteria. For the few consumer which does not fit into this range, their individual characteristics
are analyzed. Since such number is small, it can be affordable to have few individual with many
pattern of signatures. With all these, few consumer does not belong to any category as they are
too small to be detected and thus lost in tolerance level range. That keeps always the system
away from high efficiency.

Even though most of our concentration is on steady state behavior, small description for tran-
sient characteristics are mentioned because of their often encounter while analyzing steady state
behavior. As mentioned before, because of signal tolerance, steady state characteristics are
limited to detection algorithms above some predefined threshold power level. This threshold
level and tolerance details are covered in detail in chapter 6. Below are discussed few common
characteristics analyzed during the course of work.

4.1 Steady State Characteristics

4.1.1 Instantaneous Power

Most common and effective feature of steady state behavior is instantaneous[HAR][SHA]. The
Instantaneous power is the product of voltage and current. Calculation undertaken for this:

pk (t) = u(t) ∗ i(t) (4.1)

25
4 Characteristics Extraction

Since, Instantaneous power follows additive property. The total consumption of N devices in the
the load is equal to the consumption of individual instantaneous power from individual appliances
i.e:

N
X
p(t) = pk (t) (4.2)
k=1

Example below show the simplest instantaneous power measurement of few appliances put to-
gether in figure4.1. Here, all individual events of appliances turning ON/OFF are mentioned in
the figure. Symbol RC is the abbreviation for ’Refrigerator CTC’ measured in our lab.

Figure 4.1: Instantaneous Power of multiple appliances activity

Considering normal household situation where Refrigerator is ON for almost every time, in this
replica too refrigerator is kept ON for whole measuring cycle. Other consumers are being turned
ON/OFF as field test replica as mentioned in the figure.

4.1.2 Active-Reactive Power

Active and Reactive power are real and imaginary components of calculated power often rep-
resented by P and Q components respectively. For consumers, ohmic power is purely real, i.e,

26
4.1 Steady State Characteristics

they have only one power component P or real power. It occurs when AC current and voltage
flow at the same rate without any time lag. But when consumer switching power supply contain
inductive and capacitive components, it make a difference of phase angle between the flow of
current and voltage offset. Difference is clear from below Figure 4.2.

Figure 4.2: Power components in P-Q plane [Bie]

The reactive power component (Q) also contains useful information to detect appliances. In case
of AC power signal we have Reactive power related to Real Power as shown in figure 4.2 with
the phase diff φ between them. It is calculated as:

Q = S · sin(φ)

Since phase difference need not be constant between the signal, change in phase difference makes
the differece in both components by δ by folwwing relation:

∆Q = Qk − Qk−1 = Sk · sin(φk ) − Sk−1 · sin(φK − 1)

Similary, change in Real power is as follows:

∆p = pk − pk−1 = Sk · sin(φk ) − Sk−1 · sin(φk − 1)

where k is instantaneous value index.

Hence, Consumers behavior are distributed into clusters on Real-imaginary or P-Q plane. [Unk]
present several cluster analysis algorithms like K-means, DBSCAN and Agglomerative Hierar-
chical clustering. Example for PQ cluster distribution for the consumers in figure 4.1 is shown
below in figure 4.3. As mentioned in [Unk], for cluster in example figure 4.3 Agglomerative
Hierarchical clustering method need to be implemented. Significance of this approach is found
in many research papers and found effective in case of consumer detection.

27
4 Characteristics Extraction

Figure 4.3: PQ Power of multiple appliances activity

4.1.3 Direct Current

In case of instantaneous power, the investigation of spectrum of the signal could be helpful.
Most of the today household appliances comes with Switch mode power supply (SMPS) that
generate harmonics with different amplitude[F.S]. For the investigation of spectrum, signals are
transformed in frequency domain by Fourier transformation [SRJ+ ] [S.G]. Harmonics are found
at the multiple of fundamental frequency which in case of Germany is 50Hz. Hart in his work also
explained generating signatures from the Direct current consumption of an appliance. Behavior
of which is found to be non-linear. However, since then, no further work has been done by
any researchers in this area. This is mainly due to minimal significant information found while
exploring direct current signatures, which was also mentioned by Hart.

28
4.2 Absolute and Relative Power

4.2 Absolute and Relative Power

Elaborating discussion from previous section, here is an effort to extend the cause of fall in
Instantaneous Power level. Figure below 4.4 shows real voltage source with 230V. Ri is the
internal resistance of the source. RL is the load resistance in the interior of household and is
composed of parallel resistances of individual consumers. The line voltage results from the sum
of voltages over the load resistances and the one drops to inner resistances of the source.

Ui n = ua + ui (4.3)

When consumer is switched OFF, it changes the resistance RL

N

X 1
RL 1= (4.4)
Rk
k=1

Line Voltage is assumed to be constant and resistance RL is expected to change the voltage
which follows across

Ri , thus ui = Ui n − ua (f all)

Instantaneous power of a consumer k is the product of voltage and current. With large consumer
hence, there is a voltage drop. Since for Ohmic consumers, current and voltage are proportional,
there is decrease in power consumption hence in Instantaneous power.

Figure 4.4: Model representation of real voltage source

This then results in a variable instantaneous power which is connected to a total number of
consumers.

29
4 Characteristics Extraction

4.3 V-I Trajectory

This section presents an overview of the work presented in [HGW] by LAM and his colleague. A
brief introduction of that is already discussed in section 3.4 about their approach of classification
of appliances based on their Voltage-Current plots. From the total load current and voltage
reading are recorded and plotted in on 2-axis plot. It was observed that VI-trajectory then
plotted has an unique feature to classify group of appliances. An example is shown below in 4.5.
It is an Example having 6 appliances measured together.

(a) Loop Orientation (b) Self-Intersection

Figure 4.5: Example for features of VI-Trajectory

Calculation for this is done by Normalizing Voltage and Current. Example presented here is
a plot of normalized Voltage and Current of measurement PM16. Code for the same is given
in Appendix in PowerNorm.m function. It shows features of Loop direction, area and self In-
tersection using which clustering are studied. Figure shows a loop between VI plot, area and
orientation of which gives description of phase shift and shows self Intersection feature gives
current harmonics signature present in the load. Various other features could also be observed
in such trajectories. [HGW] pretenses to extract Asymmetry, Loop Orientation, Area, Mean of
Curvature, Self-Intersection, Slope and Peak, as their signatures to classify group of appliances.
Once group is classified, an approach of hierarchical clustering using dendrogram is presented
for their identification in algorithms. Dendrogram calculates the distance between two clusters
of appliances. Horizontal axis lists the alliances needed to be classified and Vertical axis is the
distance between pair of cluster. The weight of cluster is calculated using the parameters of
signature extracted. Distance between them are the Euclidean vectors of clusters[HGW].

4.4 Transient state characteristics

Since the first work on this topic by G. Hart in year 1984, most of the discussion kept limited
to Steady state characteristics in details. However, in every work it is mentioned that analyzing
transient characteristics could give little but very important information. Since, Transient char-
acteristics is not sufficient enough to work alone, it is observed to increase efficiency of steady
state characteristics when used together. Results are mentioned in section 6.4.
Transient state characteristics lasts for fraction of second and its behavior totally differs from each
other as it is function of switching behavior in Hardware and electronics inside the appliances.
Even though recording and analyzing transients was not the part of thesis work, few important

30
4.4 Transient state characteristics

S.No. Consumer Total time Event Length of Tran-


of measure- sients (approx.)
ment(approx)
1. Refrigerator (CTC) 4hrs Switch ON [in- 100-150 [1-2] sam-
between Steady ple
State, Switch
OFF]
2. Foehn (Phillips) 2min Switch OFF 4-5 samples
3. Foehn (WK) 1min State transition 4 samples
4. Peurierstab (Phillips) 1min Switch ON 8 samples
5. Handreuhgereat (WK) 1.2min Switch ON & 4 samples
OFF
6. Kaffe Maschine (AEG) 5min No peaks NA
7. Wasser 2.5 No peaks NA
Kocher(FIF,Morphy
Richards)
8. Toaster(FIF,Siemens) 2min No peaks NA
9. IronBox (Maharaja) 2min No peaks NA

Table 4.1: Transients features for different consumers

observations while dealing with Steady-State analysis have been found and mentioned here. As a
part of algorithm development several peaks needed to be filtered in order to avoid any confusion
with original events. To perform this activity, transitions from several appliances were recorded
as mentioned below:

Different transitions were the result of different switching frequency in all other appliances. This
makes one appliances slower than other when they switch On or OFF. clearly, from the table
above smaller appliances like Hair dryer and hand mixer switches On and OFF faster than
that inbuilt switches Refrigerator. Example of transients can be seen in figure 4.1 where three
transient are pointed out, other largest transient is not pointed out because its randomly and
rarely generated. A very small transient is also seen when Mixer is turned on but its too small
to be noted and its dissolved into tolerance range. Hence,noteworthy is also that, in most cases
peaks are created only in one switching event but in another event most often its not at all created
or its within tolerance limit. However as It also observed that difference between consecutive
samples in case of transients are out of range of tolerance with that observed in case of steady
state analysis. Another important point is most of the transients last from 1 to 3 samples
means very small fraction of second. In case it lasts for more than this number, then there is
consecutive but slow fall in the values. In most of the cases transients lasts from 8-10 samples
which is equivalent to 160 to 200 ms. Not the exact but similar range of value is proposed in
[M.H]. This condition is also contrary to the one observed in steady state where values are found
to oscillate with positive or negative change within tolerance value. This criteria was used to
filter transitions in algorithms. These studies are concluded only from few measurement listed
above, but for confirmation it should be tested over more number of appliances and cycle of
measurement.

31
4 Characteristics Extraction

4.4.1 Transient duration

Simple resistive loads can be identified by the duration taken by it before settle down for steady
state characteristic. Point to be observed here is the number of sample it takes to reach and
settle within threshold range of Steady state value. Variation in number of sample depends
on transient behavior of consumer and makes useful to identify the appliances in critical cases.
Figure below shows an example for Siemens toaster taking 2-3 samples before settling down for
steady state. Depending on sampling rate it can be converter into time unit for delay. On heavier
resistive load this delay can be upto few minutes, which then could be most important for their
identification.

Figure 4.6: Transient delay in case of toaster

Figure 2.5 in section 2.2.2 showed most common transient behavior in appliance except different
rate of transient dies at different rate. However, another major factor of classifying transient
to algorithm development is the pattern found in transient from some appliances. Sometimes,
particular patterns are noticed in them as shown in 4.6. This example is from Refrigerator
from CTC company for which every transient occurs at switch ON event follows similar pattern
shown above. In addition some transient are also found at switch OFF event and inbetween
steady state behavior Fig:refrictc. But patterns are found only in case of Switch ON event,
in other cases the just rose to peak point and fell back to steady state power level within just
one sample. The study and result of appliance detection based on pattern recognition using
spectral envelop is detailed out by shaw and fellows in in [SSLR] & [S.S]. In addition sometime,
Transient effect as in 2.5 affects steady state behavior of resistive load, there is a consideration
of slight quantitative decrease in instantaneous power value with the effect of heating material
that changes the resistance[Bie]4.2.

32
5 Appliance behavior

Till now we have been talking about way of data analyzing or processing to characterize the
behavior or to generate the signatures for various appliances. Before that data was gathered
so that it could be processed and this process termed as D̈ata Acquisitionẅhich was discussed
in section 3.3. As we know by now scope of Smart Meters are extended to all sectors and
every vicinities where any possible form of energy is consumed by any appliances from a small
lighting bulbs in households sector to heavy machineries in Industrial and Transport Sector. Since
covering all of them was not possible and also main aim is to focus on heavy power consuming
appliances, hence classification of consumer was carried out as mentioned before in chapter 3.
Hence Data Acquisition for the current work are taken from only for household Appliances used in
common. As mentioned measurement is taken in two phase, individual and pattern of appliances.
Here we will see few examples from both the sections.

5.1 Individual appliances

NIALM approach proposed by G.W.Hart, has shown field test in his work consisting large con-
sumers with two state appliances. Algorithms and approach however can be enhanced to multi-
state appliances. Hence, considering efficiency and complexities at early phase of research work,
inclusion of multi state appliance is left for the future work. Since, house hold sector appliances
available today covers a broad range of technical versatility and variable amount of usage and are
very vast in number, it would be a lengthy task to observe behavior of all of them. In addition, in
today’s in this competitive market everyday some new product is launched for which Collection,
analyzing and processing data from all these appliances are nearly as impossible. Therefore a
new concept of Appliance and Data classification or classes of signatures being thought of, which
not only reduces the huge work of keeping track of every appliances & their behavior (mentioned
in chapter 3) [HGW]. It also increases data processing speed and reduces the complexity of the
system. Classification of data is done based on their switching levels, power consumption, usage,
timings location etc. To keep the work within tenure, whole set of home Appliances are classified
into different classes based on operating power modes and others. But work is mainly focused
on two state operation appliances and multi-state operation appliances(section 3.3). Possible
classification of consumers based on their operating levels is presented in 5.1.

33
5 Appliance behavior

Class User functioning Complete Automatic


1. Appliances with 2
Toaster, Monitor, Mixer Refrigerator, Washing
states
machine, dishwasher
2. Appliances with mul- Hair dryer, Toaster,
Microwave, electric
tiple states Iron-box
heating
3. Automatic appli- Coffee Machine, Oven,
Answering machine
ances VCR

Table 5.1: Classification Power-Levels

Here, examples from appliances are shown taking at least one appliance from each group. Appli-
ances taken in this chapter pass classification done in chapter 3 with each group. Since, Algorithm
development further is possible following any or many different classification. In representation
it is made sure that it can be tested for all of them.

5.1.1 Appliances with two switching levels

Here, discussion and analysis are constrained for only two-switching (ON/OFF) events class of
Appliances. These Appliances work only in Operating states, ’ON’ & ’OFF’. Hence, steady-
state characteristics behavior for these appliances will show an event of Switch ON/OFF as step
changes between two power levels. These change in steps represent amount of power consumed at
different operating levels, which obviously it differs in different operating modes. Signal measured
for these appliances are not ideal but always with some noise. Hence, step change at every sample
points can be seen and recorded, which does not serve our purpose. Small change in power value
is there because of noise and Alternating power behavior which should be within small tolerance
range. Step change for our purpose is considered only if it is between two different modes which
must be above some considerable threshold power level defined by examining various appliances.
Other wise it it will be considered as part of In addition, interesting information is observed
here is that all appliances changes their power levels at different speed based on their switching
frequency. It means time taken by all appliances in their switching events need not be same as
some appliances switches ON or OFF slower than others (Refer section 2.2.2 Transient State for
examples with details). Example for this category includes appliances like light bulbs, Water
heater, Vacuum cleaner etc.

Refrigerator

The Refrigerator is the major need of todays household and one of the main appliance to be
present in almost all the houses. It is also one of the major power consumer and contribute
very high percentage of electricity bill. On observing behavior here it is seen that, it has an
autonomous behavior and therefore has a periodic repetition in its cycle of behavior. Internally,
it consists of automatic switch which turns ON and OFF automatically of its own. Since, Usage
of refrigerator is in such a way that, it remains ON for whole day & night for months and months.
Power consumption is also very high in this case. Hence it is designed such that it turns ON
the switch, consumes power to cool inside the body and once it achieve required Temperature,
switch is then turned OFF. Body of refrigerator is made capable enough to maintain the cooling

34
5.1 Individual appliances

temperature for good amount of time and decrease in temperature occurs at very small rate.
Till temperature does not come down some value, switch inside refrigerator is kept OFF and it
automatically turns ON once it reaches this value. Hence with this cyclic behavior switch is kept
OFF, when it does not consume any power, for almost the half time it functioning period based
on its duty cycle. This cycle and hence power consumption of refrigerator is very much affected
by user intervention. for example when door is opened, switch needs to turn ON and restart the
cycle. This observation is made after observing their Instantaneous power signal measured for
several hours. On observing various refrigerator, it was found that rate of their complete cycle is
approximately 2.5 to 3.5 cycle per hour. Figure 5.1 shows power cycle of refrigerator. It can be
seen that there is decrease in Instantaneous power level with increase in cooling time. In case of
Refrigerator, repetition of many patters were observed in their transient behavior. As mentioned
in 4.1, in case of Refrigerator transient can be occurred anywhere. But when it occurs anywhere
other than Switch ON event like while Switch OFF events or while in Steady state behavior, it
creates very high peak that last only for 1-2 sample. It is seen that there is similar pattern of
cycle being repeated with high signal variance. Hence, detection of such appliances could better
be detected by observing pattern of their cycle.

Figure 5.1: CTC Refrigerator Power Cycle

WaterHeater

Water heater has found their place in most of the kitchen now a days and it consumes very high
amount of power. Many Water heaters were measured in my work but here presented are only
two example from two very different companies and with two different volumes. Smaller one is
of capacity 0.5 liter and other is of 1.5 liter of capacity. They belong to Ohm’s consumer where
resistance increases from the heating element. Both of them shows change in resistance in terms
of small peak shown below in the figures. Hence, in order to detect Water heater Instantaneous
power step change algorithms will be most suitable.

35
5 Appliance behavior

Figure 5.2: Water Heater Power consumption

36
5.1 Individual appliances

Figure 5.3: Water Heater Power consumption

Toaster with 2 switch levels

Toaster is another important alliance, variety of which is measured by me. Time of its use is
very short and limited. Power consumption is not so high hence step change algorithms might
not be suitable. But normally its usage are mostly defined in particular period of time and falls
into classification criteria based on usage. Hence, in future if such algorithms will be developed,
it best suited for such criteria. Example of it is as shown below:

37
5 Appliance behavior

Figure 5.4: Toaster Power Consumption

Others

Various simple consumer with two states switching are used in kitchen. As in previous cases,
appliances power consumption are considerable enough to be detected. But there are many cases
where appliances used does not consume enough power to cross the threshold value and thus
lost in noise level ie, bread cutter and mixer. Such appliances can not be detected with high
efficiency by the means presented in this work. In future, it might be possible to investigate
more into this based on if there detection are needed by some application.

38
5.1 Individual appliances

(a) Bread Cutter

(b) Mixer

Figure 5.5: Other smaller Appliances

39
5 Appliance behavior

5.1.2 Automatic appliances with two states

As mentioned in chapter 3 different possible classification is mentioned, consumer can also be


kept in automatic two states switching appliances. Coffee machines are such example. Below is
one example shown from the company AEG 5.6. In such appliances there is sometime automatic
variation in power consumption hence, a unique threshold in case of step change of them cannot
be selected for detection. In such cases other characteristics from Instantaneous power can be
helpful.

Figure 5.6: AEG Coffee Power Consumption

5.1.3 Appliances with multiple power level

Apart from the above mentioned class of Appliances, there exists the pool of Appliances with
more switching levels and thus Variable power range. It means here appliances have multiple
power consumption level which could vary from smaller to a very wider range. Hence, here even
by ignoring tolerance levels we must have more than just one considerable power change that
can be regarded as step change for our development. Sometimes there are appliances seems to
have only two switching events externally, but internally they are designed to consume more
than just one or variable power level. For example, refrigerator having just one turn ON switch
consumes power in cycle and at different levels, Advance regulators used for fans or dimming
lights also consumes various power level having only one physical switch. Few more examples for
this class of appliances includes T.V, Hair dryer, Dishwasher, Washing Machine etc. Sometimes

40
5.1 Individual appliances

the various factors are responsible for Appliances consuming different power ranges or behave
abnormally in terms of power consumption. Most of which is by human interaction or by the
way it is operated. These factors includes keeping appliances in stand-by mode, opening door of
Refrigerator or other interaction while it is functioning, faulty electronic components or wear &
Tear of Appliances over long usage. These factors and abnormal behavior and upcoming concept
are kept out of discussion throughout the work.

Hair Dryer

An appliance small in size but consumes very high amount of power. Its usage is also variable
and used extensively on large scale. It is mostly three state appliance: State 0, when dryer is
OFF State 1, when dryer is operated at half power mode State 2, when dryer is operated at full
power mode Several appliance of this kind was measured to see the behavior and one common
point is noticed that tolerance level must be high in order to detect them. Algorithms based on
step level will be suitable for their detection.

Figure 5.7: Hairdryer Power consumption

Iron-box

This is an example of variable power consumer. It can have two or more operating modes.
But in all modes it consumes some amount of power to heat the appliance, once it is heated

41
5 Appliance behavior

power consumption goes down for sometime and regain back. Example below shows the similar
behavior:

Figure 5.8: Ironbox Power consumption

5.2 Pattern Measurement

Previous section mentioned observation about individual appliances to characterize their be-
havior. Once they are characterized, they need to match their behavior in total load power
consumption to detect their respective appliances. As seen in figure 5.9 many steps increase and
decrease are there. It is from the resulting behavior of different appliances mentioned in previous
section, put together. These data are given input to algorithms for detection and are discussed
in next chapter.

42
5.2 Pattern Measurement

Figure 5.9: Total load replica

43
5 Appliance behavior

44
6 Appliance Detection

As discussed earlier, different algorithms are needed to extract useful information to segregate
Appliance usage. Filtering, Edgedetection, Pattern-Recognition, Pattern-Matching and Cluster-
Analysis are few of the theories to name, are used for the purpose. Sections followed up presents
further discussions on these algorithms and their implementations in my work.

6.1 Information Data

From previous discussion we came to know that from original signals, characteristics are extracted
and saved for further processing. Further processing refers to extraction of useful information
from the pre-processed data. Aim of the work is to detect steps following corresponding events
caused by appliances switch ON or OFF upon their usage. In order to do that, data was saved
in two different modes using MATLAB1 implementation, one in the form of two Dimensional
Picture data format(i.e JPG, PNG, TIFF etc) and other in the form of MATLAB Array or
Matrix format(i.e binary mat files). Both modes of saving has their own advantages over each
other, but work here is implemented using later mode than the earlier option.

6.1.1 Two-Dimensional Image

Two dimensional pictures saves data in their pixels resolution to form an image. All the algo-
rithms mentioned to detect appliances are taken from image processing theory that works on
pixels resolution value. Giving brief introduction about image processing, change in pixel value
throughout the image resolution defines the complete image. Since we are concerned more about
sudden step change in sampled values to detect appliance behavior, we need to follow the edges
in the image and find size or physical amplitude of it. In terms of Image processing, edges are
defined as sudden sharp change in pixels resolution value, for some continuous pixels in X or Y
direction (since image is 2-Dimensional). Many algorithms listed below are already developed
and provided in Matlab as an inbuilt function2 to detect these sharp changes in pixel values.
These algorithms can be called using Matlab function edge with input and output parameters.
List below gives a brief introduction of edge detection algorithms associated with this function
in MATLAB:

t Sobel: The Sobel method finds edges using the Sobel approximation to the derivative. It
returns edges at those points where the gradient of I is maximum.
1
In all our analyzing and processing Matlab tool was used. Other signal processing tools like Labview can also
be used for Signal analyzing and programming tools like system C for implementation.
2
Detail discussion of these algorithms is out of scope of my work and mentioned just for definitive introduction.
No scripts or functions are developed in this regard. Results of all of them were just verified on Matlab
command window.

45
6 Appliance Detection

t Prewitt: The Prewitt method finds edges using the Prewitt approximation to the derivative.
It returns edges at those points where the gradient of I is maximum.

t Roberts: The Roberts method finds edges using the Roberts approximation to the deriva-
tive. It returns edges at those points where the gradient of I is maximum.

t Gaussian Laplace: The Laplacian of Gaussian method finds edges by looking for zero
crossings after filtering I with a Laplacian of Gaussian filter.

t Zero Cross Method: The zero-cross method finds edges by looking for zero crossings after
filtering I with a filter you specify.

t Canny:The Canny method finds edges by looking for local maxima of the gradient of I.
The gradient is calculated using the derivative of a Gaussian filter. The method uses two
thresholds, to detect strong and weak edges, and includes the weak edges in the output
only if they are connected to strong edges. This method is therefore less likely than the
others to be fooled by noise, and more likely to detect true weak edges

Since these are Matlab inbuilt functions, study for self implementation was not approached in
my work. Results from these algorithms were only observed on Matlab command window. Their
implementation was done in binary C-coding and are sophisticated algorithms. Hence, it is easy
to detect sharp switching events, filter edges in case of transitions and then follow the step change
caused by appliance events in two dimensional images using these algorithms with an effective
outcome. But the major concern, while following this approach with all the above mentioned
algorithms was to find out exact or approximated value of step change. Therefore, we do not
have any values of amplitude of steps in two dimensional images except numbers printed on their
axis6.1.

46
6.1 Information Data

Figure 6.1: Edge detection using Matlab inbuilt function ’edge’ with ’sobel’ algorithm

Here the task involved in extracting value of step change need another algorithms to Recognize
Numbers from the image files as they are infarct not the number but the curvature carved
out from sharp changes in values of pixels around. Hence, Implementing Numbers-recognition
algorithms then would add further complexity to overall system by many folds which makes the
system more cumbersome and abnormally slow. Another possibility can be seen to combine image
file data with array (or Matrix) data stored in another file. With this, edges could be detected
from 2-D image data and step change could be calculated from array data easily. This rises
another problem to combine information from pixel data to actual Array number data values.
There is no defined mapping or transformation relation between image file with corresponding
values of the plot on the image file. Hence, it would be difficult task to track edges on image
file following values from corresponding array values (array values refers here to original signal
characteristics value). Since this approach has not been discussed before, it can be an interesting
research aspect for future work. Considering difficulty and problem that lies from this mode of
data processing for the initial and limited period of work, later mode of array or Matrix data is
approached in actual implementation.

6.1.2 Array or Matrix data

In the case of Array or Matrix data, since all characteristics are extracted from the original mea-
sured signal, data here represents numbers which are easy to handle than the case before. Even

47
6 Appliance Detection

though programming and mathematical calculation, has an edge over handling direct image file
data, in terms of processing, they have their own measurable challenges discussed in the Algo-
rithms in section 6.2 ahead. However, data processing using Array or Matrix data is considered
for further development throughout the work. Data in this case are arranged in an array or 1xN
Matrix, where N is the length of data. Basically, here edge is detected by sudden change in
value of an array in consecutive samples. This approach is followed up by Instantaneous power
characteristics of Signal behavior. Figure 4.1 in section 4.1.1 shows one example of Instantaneous
behavior of appliances when they are put to an use simultaneously. Explanation of algorithms
in this chapter will be done with simpler example 6.2.

Figure 6.2: Instantaneous behavior of Appliances used simultaneously

In example 6.2, small group of appliances were measured together as an Pattern Measurement.
List of appliances grouped together in this measurement are listed in Table 6.1 with their respec-
tive Power consumption when they are ON. The sequence in which they were turned ON/OFF
to generate an event is mentioned in table 6.2. As in daily home scenario Refrigerator is kept
ON throughout and other appliances were turned ON/OFF.

In table 6.1 first and last row entry means when measurement was started and stopped. For
the whole duration between after starting and before stopping measurement, Refrigerator was
kept ON externally. But power consumption for it was switched ON and OFF internally as

48
6.1 Information Data

SNo. Appliance Power consump-


tion
1. CTC Refrigerator 80W
2. Light bulb 60W
3. Phillips Mixer 35W
4. FIF Toaster 660W
5. Siemens Toaster 750W

Table 6.1: List of appliances used in the measurement of Figure 6.2

Time(min) Events
Start Refrigerator cycle
ON
19.22 Bulb(60W) ON
20 Phillips Mixer ON
20.18 FIF Toaster ON
20.33 Phillips Mixer
OFF
21.83 Siemens Toaster
ON
22.3 FIF Toaster OFF
23.87 Siemens Toaster
OFF
41.33 Bulb(60W) OFF
End3 Refrigerator cycle
OFF

Table 6.2: Sequence in which the measurement of Figure 6.2 was recorded

49
6 Appliance Detection

from section 5.1.1. Switching ON/OFF of Refrigerator power consumption cycle should not be
confused with Switching ON/OFF of Refrigerator itself.

6.2 Alogorithms

This section details the complete approach and architecture of algorithm development in my
work. To achieve main objective of Appliance detection whole idea was divided into functions
and subfunctions. After measurement, starting from Data preprocessing to final development
original data have undergone many processing steps through different functions listed in 6.3.
Whole set of data processing starts only after measurement is finished completely and is divided
into 3 steps mentioned below in sequence in which it is applied:

1. Data Conversion

2. Read Data Base

3. Appliance Detection

These steps were accomplished by different functions. Figure 6.3 shows all functions used in
the sequence. All functions and their subfunctions are mentioned here by their original Matlab
file names 4 . Throughout architecture in figure 6.3, sequential steps are divided into two path
marked by orange and black color line. Path followed in black color line follows the main idea
and so the main functions which are ConvertDataMain.m, ReadDataBase.m, ApplianceDetec-
tion.m and SaveDisplay.m. Path followed up by orange color line follows subsequent subfunctions
of the corresponding main function. Here, first main function ConvertDataMain.m is divided
into 2 subfunctions DataInitialize.m and ConvertData.m. Second main function that is divided
into subsections is ApplianceDtection.m which is divided into 3 subfunctions EdgeDetection.m,
FilterTransient.m and StepMatch.m.

4
Matlab function files has an extension *.m

50
6.2 Alogorithms

START

Data
Acquisition

DataInitialize.m
ConvertDataMain.m

ConvertData.m

ReadDataBase.m

EdgeDetection.m

ApplianceDetection.m
FilterTransient.m

StepMatch.m

SaveDisplay.m

STOP

Figure 6.3: Architecture of Matlab functions

51
6 Appliance Detection

As seen in figure 6.3, right after Data Acquisition or Data Measurement, step of Data Conversion
is followed up. In this step the main function ConvertDataMain.m is divided into 2 subfunctions
DataInitialize.m and ConvertData.m. As mentioned in earlier section after data measurement,
they are stored in a data base. Storing data in database should be done in subsequent folders
hierarchy. The top foldername is the Data Base Name passed as an argument to ConvertData-
Main.m function. Subsequent foldername should be the Name of Appliance. The third and last
folder in hierarchy should be named with any Important Note about Measurement or the Ap-
pliances. Figure 6.4 shows representation of folder hierarchy, needed to follow in order to work
with this function.

Figure 6.4: Architecture of Matlab functions

From figure 6.4, path of data base is given input to the main function ConvertDataMain.m. It
then calls sub function DataInitialize.m to initialize important variables and structure. This
function initialize structure docu with information of Person who took the measurement and
place where measurement was taken. Once common information in structure is initialized, Con-
vertDataMain reads Total number of files in data base and pass one file at a time for processing.
For further processing one file at a time is passed to second sub function ConvertData.m which
called from the main function ConvertDataMain.m. This sub function is the main body of this
section which reads two channel of Voltage and Current from the output *.text file and write to
another *.text file followed up by file and measurement details. Since *.text file to be read are
huge most of the time several GB in range, reading and writing all of them is not possible in one
run. Hence, ConvertData.m reads and writes a block of only 50000 data at a time. The final
output file from this function is written to the same path where input file was taken from. Name
of this output file serves as an unique ID during the whole process and it is combination of all
information in and about the file and measurement as mentioned in section 3.5. The original
function ConvertData.m is developed by Thomas Bier during his Master Thesis work, for more
details [Bie] should be referred. File developed by Thomas was able to process one file at time
with little manual interaction, but complete automatic batch processing for bunch of files are
developed by for thesis work with some modification in the previous file.

Once output file is saved, all are collected in new data base path and passed to second main
function for further processing named ReadDataBase.m. This function first read the directory

52
6.2 Alogorithms

or folder of database to collect name and index of all files present in the folder. Out of many files
one file read at a time. Size of one file is too large to be read hence, whole data in file is broken
into chunk of data. With the available memory in computer, Matlab is capable to read 1e+7
data at a time, beyond which Matlab crashes because of memory issue. So, in this function 1e+6
data is read and processed in one run, leaving some space for other variables in workspace. Data
to be read here is voltage and current from 2 channels which are read and respective power is
calculated as per 4.1.1. In the same file, then Active and Reactive power component is calculated
as explained in 4.1.2. In order to measure and analyze VI-Trajectory current and voltage is also
saved. All the data to analyze signal are saved in different field of Structure which is in Matlab
structure format. In terms of analyzing and processing Matlab data and structure values are
easy and efficient to process.
1 eval([str ’.ActPwr=ActPower;’])
2 eval([str ’.RctPwr=RctPower;’])
3 eval([str ’.InsPwr=InstPower;’])
4 eval([str ’.DnSmlCurr=DnSmlCurr;’])
5 eval([str ’.Time=TimePlot;’])
6 eval([str ’.Volt=VoltData;’])
7 eval([str ’.Curr=CurrData;’])

Considering disk space, Matlab files and structures saves more than 70% of disk space when
compared to *.txt file for the same amount of data. Once structure is created it is saved in
the particular database folder. In order to save this structure name of structure file need to
be created. Since Matlab variable names cannot be more than 64 characters original file name
cannot be used here. To find unique and informative name of ID for file Appliance Name with
important notes are concatenated with the time of measurement keeping file name less than 64
under all circumstances. To trim original file name to just appliance and important note last
few character of person was used as constant to measure, hence this variable need to be updated
every time it is used. Thus, at last unique structure file name is generated which is a static path
address at current and need to be changed later on in different computer and different database
before start processing. Once data are saved in Matlab structure format it is easy to analyze
data on command window or to write scripts to automate the process for more number of files.
Along with Structure data, this files also saves the JPG plot in the same directory.
Last and most prominent part of algorithm development is Appliance Detection. Function as-
sociated with this is ApplianceDetection.m. There are many possibilities of detecting appliance
from the total load using different characteristics. But, here and in my whole work only Instanta-
neous Power Characteristics was studied for analyzing and development. As shown in figure 3.4
and figure 6.3, there are mainly three components or sub function of ApplianceDetection.m:

1. Edge Detection
2. Filter Transients
3. Step Match

Function to implement Edge Detection is EdgeDetection.m. It was mentioned earlier that step
change for array or matrix data means sudden change in consecutive sample values. In other
words it refers to sudden high values change in the difference of two consecutive sample values.
To measure sudden change we need to differentiate usual or normal change from this sudden

53
6 Appliance Detection

change. Now, for [Har] Power consumption varies approximately ±20% around the value as a
result of time dependency behavior of Voltage & current which varies approximately 10% each
from their ratings. It means out of for 100W appliance 20W of its signal may lost in noise or
can not be utilized by detection algorithms. This value was used in my algorithm to set the
tolerance level. This value works with individual appliances but in case of Load signal where
many heavy appliances are also present, tolerance value of 20W gives unwanted erroneous edges
to the output. This value was checked with few higher values and result with 45W tolerance
was found satisfactory. Hence, tolerance value of 45W was decided as a boundary value to
differentiate usual signal flow from the sudden change in value.
It is mentioned before in section 4.4.1 and 2.2.2 that transient time for different appliances
are different. It means some appliances switches faster that other or number of samples taken
by an appliance to reach the maximum of peak in case of rising edge or minimum of peak
in case of falling edge are different for different appliances. Hence, actual Transient peaks or
concerned sudden change in sample value can be found out by observing continuous rising value
or continuous falling value for continuous samples. Hence, in my algorithms Edges or Transient
peaks are filtered by taking starting point of a change more than tolerance of 45W until the last
point where it changes to rising or falling values again respectively. With this corresponding
index of start of rising edge and end of rising (or start of falling) edge is recorded. Result found
from this are very promising.
Once rising and falling edge is detected, the work of filtering transients are done in function
FilterTransient.m. This can be done by two approach presented in my work. First, is to keep
finding maximum value in an array through recursive function. In every run of recursive function
starting from the peak point reach to the point where Signal values are within tolerance range
for some time in both the direction. Duration of Transient peaks are the number or samples
between the two side of maximum point. This approach provided very close to accurate result
in finding transient in case of individual appliances. But failed completely in case of Pattern
or Load measurement signal. This is obvious because transient peaks values for most of the
appliances are much more than in their normal operating state values. But in case of Load
signal it is more likely to happen very often that operating level value of few appliances goes at
higher values that transient peak of some other appliances. Since recursive function stops the
moment it stops finding transient, in later case it stops working in the first run itself resulting
no transient which wrong. This approach is not used but still mentioned in Appendix by name
transientfinder.m.
Issues in Transient filter is overcome by next approach where again duration of transient was
found out by successive sample values between starting index of rising edge to the last index
of falling edge. Once this duraion crosses some pre-threshold value, it is considered as an edge
and is recorded or is discarded otherwise considering it as transients. Result obtained has been
effective but not as efficient as the previous one for individual appliances. This is because if pre-
defined threshold size could vary from 3-100 sample as mentioned in Table 4.1. But since long
lasting transients occurred very rarely and mostly at falling edge, factors could be implemented
to increase the further efficiency.
By now after all process we have index of concerned edges and their values. So, the final Appliance
detection can be done just checking step values in an array corresponding to indexes to the pre-
defined steps for individual appliances. With which, Appliance name and approximated time
can be recorded and displayed as an output. This function is implemented in last phase of
implementation StepMatch.m. Complete process is shown below in flow chart 6.5.

54
6.2 Alogorithms

Start

Read Volta and


Current Data

Calculate Instantaneous
Power

Initialize : Tolerance

If Snext – Scurrent > Increase


Tolerance Count
No

No Yes
Negative Edge Positive Edge
If Snext – Scurrent > 0
Recorded Recorded

Filter Transient

Match
Appliance Steps

Save & Display

Start

Figure 6.5: Flow Chart of Implementation

55
6 Appliance Detection

Hence, it is needed to reduce this dependency and thus to reduce scattering within clusters
[Pih]. It is achieved by Normalizing the measured Power to fixed benchmark voltage Ur ef which
is equal to the rated phase voltage of network and is equal to 230 Volts in German Network
according to the following formulas mentioned in [Pih]:

 2  2
Uref 230
Snorm (t) = · S(t) = · S(t) (6.1)
U (t) U (t)

These normalized power are used as input to all the detection algorithms, to determine time and
sizes of all step change in case of Instantaneous power and unique pattern of clusters in case of
PQ-Power clusters.

In case of Instantaneous power, detection is done by considering instantaneous value of measured


power against each instant. In order to do that, all irrelevant all switching transitions peak need
to be filtered.
Transition peaks are filtered using their characteristics detail studied for various appliances.
Section 4.4 should be refered for detail discussion on Transient characteristics. After these peak
reduction when step change is found to be more than threshold value say dSthresh then it is
considered as switching ON and switching OFF event for an appliance. However for further noise
reduction instead of consecutive sampled values mean average value is considered for step change
as in formula:



Si+3 − Si + Si+1
> ∆thresh (6.2)
2

Now, since some appliances switch ON or OFF slowly than other successive samples, it cannot
be compared to threshold values and steady period is found as:

|Si+5 − Si+4 | < ∆tol (6.3)

then to detect an event the difference between after event and before event is summed as follows:

Si+3 + Si+4 Si + Si+1


∆step = − (6.4)
2 2

Values mentioned here are theoretical, but in real code, in function EdgeDetectin.m and Fil-
terTransion.m, in every run these values were modified to get a better output. Step change is
detected when dsstep is found greater than dsthresh, which is selected as minimum step among
all appliances. Once change is detected it is classified into Transition peak or Power step change.
Power step change is the level within tolerance error range for step change detection. Step change
is differentiated from Transition peak on the assumption that Appliances are switched on more
that just fraction of second. It means one level need to sustain for at least few samples within

56
6.3 System Models for Implementation

tolerance error range, otherwise it is classified as Transition peak. Differentiating peak from
concerned step change based on this criteria is found very effective in filtering peaks for which,
prior information need to be known.
Continuing the process recursively for the complete set of data is expected to list out the switching
events of appliances consuming power more than tolerance power level, which is 45W in this case.
NIALM system is meant to detect appliances from total power output using unique signatures
from individual appliances. These signatures are generated by analyzing appliances characteristic
behavior using mathematical and Signal processing algorithms under careful consideration. Most
common characteristics under research for their efficient result are discussed below.
The main goal of NIALM systems are to detect appliances, which is accomplished by observ-
ing step change in case of instantaneous power characteristics. Here, individual appliances are
measured and their instantaneous power characteristics were observed. Increase in step change
when the appliances are turned ON and decrease in step change when they are turned OFF are
tabulated to create the list of appliances behavior. As mentioned earlier instantaneous power
characteristics of signal behavior is additive in nature, hence all the increase and decrease in step
change of individual appliances would sum up and reflect in total instantaneous power behav-
ior when all appliances are put together. Now tracing the total power plot and mapping with
list of appliances tabulated before at every rise and fall of steps detects when the appliances
were being turned ON or OFF respectively. The basic idea discussed above came from theory
that went through various manipulations, calibrations and assumptions when comes to practice.
Elimination of transient peaks, smoothening plot over recursive cycle, assuming threshold values
for noise to differentiate from significant step change and number of samples required by signal
to switch states between ON and OFF are factors considered in my implementation.

6.3 System Models for Implementation

After analyzing characteristics behavior, algorithms are developed and applied to the input
data. These algorithms can be applied in different fashions to filter switching events. Different
fashions are observed to affect the processing time with little additional mathematical effort.
Hence, considering Memory & time constraint issues in data processing two approach has been
proposed. These two models has been discussed here which is termed as sequential and parallel
mode of techniques.
As shown in earlier case, data is processed parallely or same amount of data is processed for
detection by different algorithms. In other words, if we have more than one Algorithms to be
used for detection, its possible to apply same amount of data exactly with original value to all
these algorithms. Taking an example, if number of data to be processed by 5 algorithms to detect
10 Applinaces is say 100. Then with this model all 100 datas are passed to all 5 algorithms in the
same fashion without any changes or modification. Now, if lets say, all algorithms are detecting
2 appliances each, then data for detection of other 8 appliances are unnecessarily passed to other
4 algorithms (ignoring dependecies of algorithms and appliances behaviour on each other). On
contrary to which, advantage of this model is that in order to get more precised and accurate
result it checks the previous results and increase the accuracy in each run.
Concluding the summary, since a large amount of data is processed at every steps by all algo-
rithms time and memory needed for calculation is much more than that needed by later model

57
6 Appliance Detection

proposed. But it also brings a point of strong confirmation or cross check the result of previous
algorithms i.e. appliances detected by initial algorithms are confirmed and cross checked by all
further algorithms ahead and possibility to detect fault detection too.

Original Power data


to be processed

Algorithm 1

Algorithm 2

Algorithm 3

Algorithm N

Figure 6.6: Parallel Model

However, On contrary to previous model, another model is presented here, where data is applied
to all algorithms sequentially. Considering the same scenario presented above for this so called
sequential or serial model, data can be applied to another algorithms only after processing of
previous algorithms. So at a time Data is processed by only one algorithm. However, in each
run, in addtion to algorithmic calculation and processing data is made simpler for next upcoming
algorithms by the reduction process. A reduction process possibility is proposed in figure 6.8
for Instantaneous Power data. Here, once a particular appliance’s switch ON and switch OFF is
detected then whole data between these two events are reduced by the particular level already
detected. Its made clear in figure 6.8, where 3 appliances are turned ON and OFF. Now when
appliance 3 is detected the data between the point when it is turned ON to the point at which
it is turned OFF are reduced by the power level respective to appliance 3. Now, as can be seen
from plot switch OFF event for appliance 2 has not been affected and it corresponds to the same
Time-axis as well as same step change in Power-axis as it was before.

Applying this concept to the scenario presented before, with 5 algorithms, 10 appliances and
100 number of data, if in each run 2 appliances are being detected then after reduction we can

58
6.3 System Models for Implementation

skip data processing to 20 data for each next run. Hence, at the end instead of processing 100
data as in previous model case, we need to precess only 20 data. Advantage for this model is
fast processing and less calculation, but disadvantage would be, if any wrong detection occured
in first few algorithms, then it would not be verified further. Moreover, as stated before, simple
case to follow this suite is very rarely found. In most of the cases, it is possible that same data
has information about more than one appliances behaviour. In that case reduction process after
one detection will make data loss for other appliances. This case was tested by small self test
scenario and tremendous outcome was found concernig processing time. But in order to verify
this, more tests need to be performed.

Original Power data


to be processed

Algorithm 1

Algorithm 2

Algorithm 3

Algorithm N

Figure 6.7: Parallel Model

59
6 Appliance Detection

App. 2 OFF
App. 3 ON

App. 3 OFF
App. 2 ON
Power

App. 1 OFF
App. 1 ON

App. 2 ON Time

App. 2 OFF
Power

App. 1 ON

App. 1 OFF
Time

Figure 6.8: Serial Model Plot

6.4 Results

The main objective throughout the work was to detect appliances from the total load signal.
To accomplish that, many assumption were made and result presented here is completely based
on the few measurement listed below in table 6.3. With the tolerance or noise in the signal
value of 20W, many false events were detected hence, value was increased to through small steps
upto 45W to 50W. Satisfactory result was obtained only from 45W. For example in case of CTC
Refrigerator more than 2 switching events detected instead of just one actual event present with
smaller tolerance value. But when tolerance value was increased to 45W, and it is found to work
on most often occuring noise to separate them from the real Instantaneous power step change.
Table below present list of result for finding Appliances turn ON and OFF events.

60
6.4 Results

Measurement Turn ON Events(found/actual) Turn OFF Events(found/actual)


PM16 A.1(a) 11/12 12/14
PM22 A.1(b) 13/13 14/14
PM23 A.2(a) 11/12 14/13
PM24 A.2(b) 18/15 14/19
PM25 A.3(a) 18/14 19/23
PM26 A.3(b) 7/7 8/9
PM27 A.4(a) 13/12 16/18
PM28 A.4(b) 16/16 18/17
PM29 A.5(a) 10/10 13/14
PM30 A.5(b) 11/10 11/11
PM31 A.6(a) 12/12 14/14
PM32 A.6(b) 16/18 18/19
PM33 A.7(a) 18/18 16/20
PM34 A.7(b) 12/12 15/15
PM35 A.8(a) 10/10 12/14
PM36 A.8(b) 8/8 8/11
PM37 A.9(a) 9/9 13/12
PM38 A.9(b) 13/13 15/18
PM39 A.10(a) 12/12 16/14
PM40 A.10(b) 16/17 16/18

Table 6.3: Result Of Edge Detection

Once Edges are found, second task was to find and differntiate Transient peaks from Steady state
step change. As mentioned in Table 4.1 that all transients other than switching ON transients of
Refrigerator, lasts for very small time or very small number of sample. But in case of switching
ON transients for Refrigerator, it lasts for as long as 150 number of samples or equivalent 3 sec
as shown in figure 4.6. This huge difference in number of samples of transients makes it difficult
to fix one threshold value to filter and differentiate it from steady state step change. But in order
to reach to a conclusion 150 sample is taken in my work. It means it is assumed that appliances
remained turned ON or OFF at steady state at least for 3 sec. In other words, appliances are
not expected to make any events of step change under assumption for my alorithms. Until this
number, FilterTransient.m function was leaving a small transient behind processing, which could
have been confused with step change for our concern.
Taking 150 filtering smaples in FilterTransient.m function, 4 transients out of 5 transients or 11
Positive or Rising Edges (found from EdgeDetection.m function) could be successfully filtered
out from PM22 A.1(b) shown in table 6.3. This leaves further option of having 7 possible Positive
edges or switching ON event in the measurement PM22 A.1(b). Figure below shows suppressed
transient for PM22 ??. However, this number is not cosistent. For example in case of PM16
A.1(a) 2 out of 6 transient. Out of number of transients calculated in FilterTransient.m, only one
Appliance is able to be matched out and getting repeated. Combination of different appliances in
different sequence is unable to recognise with the StepMatch function. Hence, even though result
of EdgeDetection and FilteTransients function have a very good result, StepMatch function result
is not good. One or Two applinaces whose prior information of power consumption is known can
be filtered out using static value of their power level, for pattern of many appliances together,
more sophisticated algorithms need to be implemented.

61
6 Appliance Detection

(a) Original plot of PM22

(b) Transient found and reduced in PM22

Figure 6.9: Original Vs. Reduced Transient in plot of PM22

62
7 Conclusion

Non intrusive Appliance load monitoring is a sophisticated system for load disaggregation. Since
beginning, it has been approached majorly using steady state Instantaneous power. Same ap-
proach presented here based on data collected in laboratory. Even though data collected represent
closely the normal household condition, still its a replica and hence should be tested on more
data. Hence, classification and characterization of appliances based on various factors resemble
exactly the one in real field and so are the results.
Signal analysis depends on various features. Even though all are not covered here in detail,
different features provides different results and efficiencies. Step change gives promising result
in consumer disaggregation, still efficiency could be improved with other features. Appliance
classification presents an entirely different view for consumer disaggregation. New theory and
estimation not only improves the system but also includes new features in the systems and hence
enhancing its application. Detection algorithms too are diverse in terms of implementation.
Efficiency and processing speed are always trade off against each other and hence better models
need to be worked on for the need of application. Many such concerns will not carry ahead in
real time implementation when Hardware and System programing will come into effect.
Once complete system is implemented, its application can be extended to many fields including
many sectors. Its advantages makes it indispensable for Utility and End-User. Unfortunately
with a wide range of services NIALM also suggests issues of privacy and surveillance that can
be abused.

63
7 Conclusion

64
8 Future Aspect

NIALM approach presented here is in the very beginning and just a part of complete system
proposed in our university is implemented. In the process of data processing, data loss is always
there. But amount and quality of data could be an important factor. Future work need to look
into better and optimized design for measuring card and the system. Different approach of signal
analyzing based on different characteristics will be major part of work. In extreme cases when
current algorithms fail or does not give expected results, new characteristics could be used.
Discussion here are tested and meant effective only for ON/OFF two operating states appliances,
hence other appliances, Multi state and continuously variable power consumption under cannot
be detected by the same. Exclusive systems and algorithms must be designed and developed to
their detection. In course of algorithm development as inbuilt functions are optimized for half the
job to detect and filter edges and another half job for exact step values is better archived by Array
approach. May be in future these two approaches could be combined to get optimized and fast
processing systems. Many approaches alone is not capable of providing sufficient result, as in this
case combination of two different approach could provide a better outcome. Similar combination
in Steady and Transient state behavior could be the aspect of future for appliance detection and
segregation. Model shown in last chapter 6 where data is input serially rather than parallel also
share trade offs with each other, is expected to improve the system on combination.
Classification of appliances based on different criteria opened a new direction of research. It
does not only provide in ease of current implementation but also enhance the system with
new functionality. Various other techniques for learning and tracking behavior of continuously
variable appliances remain an important topic for future work. It is needed for more efficient
algorithms and high processing speed. Precision for tolerance in present systems is considered
about 45%, hence appliances consuming power less than approximately 45W level are not consider
d for detection. It implies major work need to be explored to detect appliances of low power
consumption level in dealing noise & power level differently. Considering the complexities in the
’would be’ system find another aspect of the application of their usage in "VLSI technology".
Therefore, in future it has a vast and broader aspect in different applications.
Talk in this work is only in the direction of Electrical power segregation. But similar effort has
been approached, proposed and worked on in past and being great part of present research in
the direction of other source of power. Smart metering has vast future in water consumption
disaggregation, gas consumers, locally generated sources like biogas power, solar energy etc.
Hence, a global implementation would be a key factor for our better of our enviroment. For
government saving money and energy has always been the major criteria and so their interest
and effort will be a deciding factor for the future of Smart Metering.

65
8 Future Aspect

66
A Appendix

A.1 Appendix-List of appliances measured

Name of the appliances Company Power-Rating Note


Refrigerator with freezer Liebherr-Premium 230W 195l
Refrigerator with freezer Privileg 230W 195l
Refrigerator Liebherr-Glassline 230W 165l
Coffee Maschine AEG 900W 500ml
Coffee Maschine Phillips 1450W 1 Pack
Waterheater FIF 2200W 150ml
Waterheater Morphy Richards 1000W 150ml
Waterheater Bifinett 2000W 150ml
Waterheater Stella 900W 150ml
Waterheater AFTK-WK 2300W 150ml
Microwave Ciatronic 1150W Multi-Time-level
Microwave Sharp 560W;800W Multi-Power-level
Microwave EFF SS 1150W Multi-Temp-level
Toaster FIF 1000W 3-State
Toaster Ciatronic 640W 2-State
Monitor Unknown Unknown 17 inch; TFT
Television Philips 230W CRT
Hairdryer BaByliss 1300W 3-State
Hairdryer Shahmet 1400W 3-State
Hairdryer NetHaus 1200W 3-State
Hairdryer Philips 1200W 3-State
Ironbox Maharaja 1000W 3-State; > 5 years

In addition to these individual appliances 40 measurement was taken for Pattern or combination
of Appliances in different sequences with different timings. Their normal and odd usage in house
hold sector for DMS are kept in mind while making different combination.

A.2 Appendix Plots

Plots mentioned in this section corresponds to measurement of all group or pattern of measure-
ment for which Algortihms are tested and presented results and observation in table 6.3 in Result
section 6.4.

67
A Appendix

(a) Plot: PM16 (b) Plot: PM22

Figure A.1: Go back to Result Section 6.3

(a) Plot: PM23 (b) Plot: PM24

Figure A.2: Go back to Result Section 6.3

(a) Plot: PM25 (b) Plot: PM26

Figure A.3: Go back to Result Section 6.3

68
A.2 Appendix Plots

(a) Plot: PM27 (b) Plot: PM28

Figure A.4: Go back to Result Section 6.3

(a) Plot: PM29 (b) Plot: PM30

Figure A.5: Go back to Result Section 6.3

(a) Plot: PM31 (b) Plot: PM32

Figure A.6: Go back to Result Section 6.3

69
A Appendix

(a) Plot: PM33 (b) Plot: PM34

Figure A.7: Go back to Result Section 6.3

(a) Plot: PM35 (b) Plot: PM36

Figure A.8: Go back to Result Section 6.3

(a) Plot: PM37 (b) Plot: PM38

Figure A.9: Go back to Result Section 6.3

70
A.3 Appendix Programes & scripts

(a) Plot: PM39 (b) Plot: PM40

Figure A.10: Go back to Result Section 6.3

A.3 Appendix Programes & scripts

A.3.1 ConvertDataMain: Main Function to Convert Measured Data to Format


Compatible for Processing

1 function [result, varargout] = ConvertDataMain(varargin)


2 %% ConvertDataMain.m Script File
3 %
4 % DCSP−Lab
5 % University of Furtwangen
6 % Prof.Dr−Ing. Dirk Benyoucef
7 %
8 % Description:
9 % Main Function to intialize Batch Processing to Raw Data
10 % convertion. Calls function DataInitialize.m to initalize
11 % FileName Structure and DataBase detail structure. Then
12 % function ConvertData.m is called process on the RawData.
13 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
14 % Prerequisite:
15 % DataBase Folder should be arranged as Follows:
16 % −DataBase Folder(the one given as input upon asked)
17 % −MessObjekt Name Folder
18 % −Hinweise Folder for MessObjekt
19 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
20 % Author: Mithilesh Kumar (Miku), MTM3 Masterthesis WS 2010
21 %
22 % Version control: − V1.0
23 % − V1.1 − Added Comments and Description
24 % Current Date: 01.12.2010
25 %
26 %%For Privathaushalt Messung

71
A Appendix

27 % [docu, db_data] = DataInitialize(’Privathaushalt’, ’Mithilesh Kumar’);


28 %%For Labor Messung
29 [docu, db_data] = DataInitialize(’Labor’, ’Mithilesh␣Kumar’);
30

31 docu{1}
32 docu{2}
33 docu{3}
34 db_data.content
35 db_data.path
36

37

38 db_MessObjekt_number = length (db_data.content);


39

40 for idx = 3 : db_MessObjekt_number


41 if isequal(db_data.content(idx).isdir,1)
42 %%−−−folder having MessObjekt Name−−−−
43 MessObjekt_name = db_data.content(idx).name;
44 % docu{4} = MessObjekt_name;%%For Individual Messungen
45 docu{4} = ’’;%% For patter messung
46 db_MessObjekt_path = fullfile(db_data.path,MessObjekt_name);
47 %%−−−Folder having Hineweise for the MessObjekt−−−−
48 Hinweise_MessObjekt= dir(db_MessObjekt_path);
49 for cnt = 3:length(Hinweise_MessObjekt)
50 if isequal(Hinweise_MessObjekt(cnt).isdir,1)
51 docu{5} = Hinweise_MessObjekt(cnt).name;
52 %%−−−file selection in the folder−−−−
53 data_file_path = fullfile(db_MessObjekt_path,Hinweise_MessObjekt(cnt).name);
54 data_file = dir(data_file_path);
55 number_files = length(data_file);
56 if ge(number_files,2)&& isequal(data_file(3).isdir,0)&& ...
57 isequal(data_file(number_files).name(length(data_file(number_files).name)−2:end) ...
58 ,’txt’)
59 for count = 3 : number_files
60 if ~isequal(data_file(count).isdir,1)
61 mess_file.path = data_file_path;
62 mess_file.name = data_file(count).name;
63 [cnt, Res] = ConvertData(docu, mess_file)
64 end
65

66 end
67 else
68 h = errordlg([’File␣not␣found␣in␣’, data_file],’MessObjekt␣Folder␣Error’)
69 file_error_log = data_file;
70 continue;
71 end
72 else
73 h = errordlg([’File␣not␣found␣in␣’, data_file],’Hineweise␣Folder␣Error’)
74 file_error_log = data_file;

72
A.3 Appendix Programes & scripts

75 continue;
76 end
77 end
78 end
79 end
80

81 result = ’success␣all␣files’

A.3.2 DataInitialize: Initializes Variables and Structure

1 function [docu, db_data] = DataInitialize(place, person)


2 %% DataInitialize.m Script File
3 %
4 % DCSP−Lab
5 % University of Furtwangen
6 % Prof.Dr−Ing. Dirk Benyoucef
7 %
8 % Description:
9 % Initialize Structure with constatnts and variables
10 % for the File Name taken as input to the file/function.
11 % Variable are passed as inut and intiaalized File Name
12 % and DataBase details Structure docu and db_data are passed as the Output.
13 %
14 % Author: Mithilesh Kumar (Miku), MTM3 Masterthesis WS 2010
15 %
16 % Version control: − V1.0
17 % − V1.1 − Added Comments and Description
18 % Current Date: 01.12.2010
19 %
20

21

22 % Art = ’Messungen’;%%For Individual Messung


23 Art = ’Pattern’; %%For Pattern Messung
24 %Ort:’Privathaushalt’;
25 Ort = place;
26 %Messperson:’Mithilesh Kumar’;
27 Messperson = person;
28

29 %%DataBase Structure db_Path


30 db_path = uigetdir(pwd,’Bitte␣MessDataBase␣Ordner␣auswählen’);
31 db_contents = dir(db_path); %DataBase Path
32

33 %%Structure for File Name


34 docu{1} = Art;
35 docu{2} = Ort;
36 docu{3} = Messperson;

73
A Appendix

37

38 db_data.content= db_contents;%No.Of Files and Folders in DataBase


39 db_data.path= db_path;

A.3.3 ConvertData: Body of Data Conversion

1 function [cnt, Res] = ConvertData(docu, data_file)


2 %% ConvertData.m Script File
3 %
4 % DCSP−Lab
5 % University of Furtwangen
6 % Prof.Dr−Ing. Dirk Benyoucef
7 %
8 % Description:
9 % Open an input dialog for documentation the measuring.
10 % Open a measurefile (∗.txt) and convert the measuring values to values
11 % with dots (for calculation in MatLab). Also delete the column index (to
12 % preserve memory space). Include in the file a value named NumOfValue.
13 % NumOfValue gives the number of measuring values.
14 % Create a header file and a new measuring file.
15 %
16 % Author: Thomas Bier, MTM2 Masterthesis SS10
17 %
18 % Version control: − V1.0
19 % − V1.1 extended to packet−conversion
20 % − V1.2 inserted input dialog for documentation the measuring
21 % −−−−miku−−−
22 % − V1.3 Commented line 33−40 to process Batchexecution
23 % Current Date: 09.06.2010
24 %
25

26 %clear all
27 close all
28 tic
29

30 NumOfValues = 0;
31

32 %% Documentation of measuring
33 % Input dialog for documentation the measuring
34 %−−−−−miku−−−−−Commented for Batch Processing−−−
35 % prompt = {’Art:’,’Ort:’,’Messperson:’,’Messobjekt:’,’Hinweise:’,};
36 % dlg_title = ’Dokumentation’;
37 % num_lines = 1;
38 % docu = inputdlg(prompt,dlg_title,num_lines);
39 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
40 %% Open Measuring File

74
A.3 Appendix Programes & scripts

41 % [File, path2txt]= uigetfile(’∗.txt’,’Bitte Messdatei auswählen’);


42 File = data_file.name;
43 path2txt = data_file.path;
44

45 fid = fopen(fullfile(path2txt,File),’r’); % File open, only read


46

47 %% Copy Header
48 for n=1:34
49 Header{n} = fgetl(fid);
50 end
51

52 %% Create header file


53 ab = 0;
54 k=10;
55 % Read the day of measuring from measuring file
56 while ab == 0
57 if (Header{4}(k) == ’␣’)
58 if (Header{4}(k+2) == ’.’)
59 Day = [’0’,Header{4}(k+1)];
60 ab=1;
61 else
62 Day = [Header{4}(k+1),Header{4}(k+2)];
63 ab=1;
64 end
65 end
66 k = k + 1;
67 end
68

69 % Create name for the header file


70 % example:
71 % 2010−05−13−14−47−Kopf−Messung−Privathaushalt−Thomas Bier−Fernseher
72 % Grundig Sedance 3J−Schatzyklen Fernseher1.txt
73 File_conv2 = [’2010−12−’, ... % year and month
74 Day,’−’, ... % day
75 Header{5}(6:7),’−’, ... % time hour
76 Header{5}(9:10), ... % time minute
77 ’−Kopf−’, ... % hint for header file
78 docu{1},’−’, ... % Art
79 docu{2},’−’, ... % Ort
80 docu{3},’−’, ... % Messperson
81 docu{4},’−’, ... % Messobjekt
82 docu{5},’.txt’]; % Hinweise
83

84 fid2 = fopen(fullfile(path2txt,File_conv2),’wt+’); % File open, write


85

86 % Wirte documentation in the header file


87 fprintf(fid2,’Art;%s\n’,docu{1});
88 fprintf(fid2,’Ort;%s\n’,docu{2});

75
A Appendix

89 fprintf(fid2,’Messperson;%s\n’,docu{3});
90 fprintf(fid2,’Messobjekt;%s\n’,docu{4});
91 fprintf(fid2,’Hinweise;%s\n’,docu{5});
92

93 % Write header in the header file


94 fprintf(fid2,’\n’);
95 fprintf(fid2,’%s\n’,Header{:});
96 fclose(fid2);
97

98 %% Create the file with the measuring values


99 % Create name for the header file
100 % example:
101 % 2010−05−13−14−47−Messung−Privathaushalt−Thomas Bier−Fernseher
102 % Grundig Sedance 3J−Schatzyklen Fernseher1.txt
103 File_conv = [’2010−12−’, ... % year and month
104 Day,’−’, ... % day
105 Header{5}(6:7),’−’, ... % time hour
106 Header{5}(9:10),’−’, ... % time minute
107 docu{1},’−’, ... % Art
108 docu{2},’−’, ... % Ort
109 docu{3},’−’, ... % Messperson
110 docu{4},’−’, ... % Messobjekt
111 docu{5},’.txt’]; % Hinweise
112

113 fid1 = fopen(fullfile(path2txt,File_conv),’wt+’); % File open, write


114

115 % Wirte documentation in the measuring file


116 fprintf(fid1,’Art;%s\n’,docu{1});
117 fprintf(fid1,’Ort;%s\n’,docu{2});
118 fprintf(fid1,’Messperson;%s\n’,docu{3});
119 fprintf(fid1,’Messobjekt;%s\n’,docu{4});
120 fprintf(fid1,’Hinweise;%s\n’,docu{5});
121

122 % Write header in the measuring file


123 fprintf(fid1,’\n’);
124 fprintf(fid1,’%s\n’,Header{:});
125 position = ftell(fid1);
126 fprintf(fid1,’\n\n\n\n\n\n\n\n\n\n\n\n\n\n’);
127

128 %% get measuring values


129 while ~feof(fid)
130 tchannel = textscan(fid, ’%∗d␣%s␣%s’,50000,’delimiter’, ’;’);
131

132 % Convert ’,’ into ’.’


133 channel(:,1) = str2double(strrep(tchannel{1,1},’,’,’.’));
134 channel(:,2) = str2double(strrep(tchannel{1,2},’,’,’.’));
135

136 fprintf(fid1,’%.14f;%.14f\n’,channel’);

76
A.3 Appendix Programes & scripts

137

138 NumOfValues = NumOfValues + length(channel(:,1));


139

140 clear channel;


141 clear tchannel;
142

143 end
144

145 fseek(fid1, position, ’bof’);


146 fprintf(fid1,’NumOfValues;%012d’,NumOfValues);
147

148 %% Close files


149 fclose(fid);
150 fclose(fid1);
151

152 toc
153 % delete File
154 delete(fullfile(path2txt,File));
155

156 cnt = 1;
157 Res = ’Succ’;
158 % ### EOF ###

A.3.4 ReadDataBase: From DataBase Measured file is read and Porcessed and
Data is stored back

1 function ReadDataBase (varargin)


2 %% ReadDataBase.m Script File
3 %
4 % DCSP−Lab
5 % University of Furtwangen
6 % Prof.Dr−Ing. Dirk Benyoucef
7 %
8 % Description:
9 % ReadDataBase Function is to read processed measured data file
10 % from the DataBase folder. Data stored here should be in the format of
11 % TEXT file. Files in this folder should only be data files, not the header
12 % files with files, generated after processing measured raw file by
13 % function ConvertData.m. In destination Folder Data with Matlab structure
14 % format file ∗.mat and plots in JPG format is saved.
15 %
16 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
17 % Important Points:
18 % 1. Path of Data Base folder should be selected here when asked by browser
19 % window.
20 % 2. Name of the person who took the measurement should be updated in line

77
A Appendix

21 % number 119 or 121.


22 % 3. Name of the Files in data base folder are not allowed to contain any
23 % other alphabets than English Alphabets.
24 % 4. Path of Destination Folder should be updated in line number 141.
25 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
26 % Author: Mithilesh Kumar (Miku), MTM3 Masterthesis WS 2010
27 %
28 % Version control: − V1.0
29 % − V1.1 − Modified
30 % − V1.2 − Added Comments and Description
31 % − V1.3 − Modified
32 % Current Date: 10.02.2011
33 %
34 DataBaseAddress = uigetdir(’’,’Set␣Data␣Base’);
35 % end
36 %DataBase directory is expected to have only and all possible ’∗.txt’ files
37 DataBaseContents = dir(fullfile(DataBaseAddress,’∗.txt’));
38 NrOfFiles = length(DataBaseContents);
39 Index=1
40 % for Index=1:1:NrOfFiles
41 FileName = DataBaseContents(Index).name;
42 FullFileName = fullfile(DataBaseAddress, FileName); %’.txt’ is there in FileName
43 fid = fopen(FullFileName,’r’);
44 HeaderData = textscan(fid,’%s’,42,’delimiter’,’\n’);
45 NrOfData = str2num(HeaderData{1}{41}(13:end));
46 BlockSize = NrOfData;
47

48 % BlockSize = 6;
49 BlockSize = 1e+6;
50 if (NrOfData > BlockSize)
51 InstRealPower = zeros(1,BlockSize);
52 end
53 NoDnSampledData = 1;
54 InstPower=0;
55

56 % FilePart = 1;
57 Total_data_idx = 1;
58 InstRealPower = 0;CurrData = 0;
59 DnSmlCurr=0;
60

61 while ~feof(fid)
62 if gt(NrOfData,BlockSize)
63 Data = textscan(fid,’%s␣%s’,BlockSize,’delimiter’,’;’);
64 else
65 Data = textscan(fid,’%s␣%s’,NrOfData,’delimiter’,’;’);
66 end
67 %−−Average Instantaneous Power
68 count = 0;

78
A.3 Appendix Programes & scripts

69 PowerData = 0; CurrNorm = 0;
70 RPowerData = 0; APowerData = 0;
71 DataSize = length(Data{1,2});
72 % NoOfSamples = 4;
73 NoOfSamples = 160;
74

75 if ge(DataSize,1)
76 %−−−−Phase calculation direct from Power−−−−−
77 for Idx=1:1:DataSize
78 Idx
79 VoltData(Idx)=str2num(Data{1,1}{Idx});
80 CurrData(Idx)=str2num(Data{1,2}{Idx});
81 InstRealPower(Idx)=str2num(Data{1,1}{Idx}) ∗ str2num(Data{1,2}{Idx});
82 end
83 InstPwr_fft = fft(InstRealPower);
84 InstPwr_phase = unwrap(angle(InstPwr_fft));
85

86 for idx=1:1:DataSize
87 %−−−−−−PQ Power−−−−−−−−−−−−−−−−
88 RPowerData = RPowerData + InstPwr_fft(idx)∗sin(InstPwr_phase(idx));
89 APowerData = APowerData + InstPwr_fft(idx)∗cos(InstPwr_phase(idx));
90 %−−−−−−InstPower−−−−−−−−−−−−−−−−
91 PowerData = PowerData + InstRealPower(idx);
92 %−−−−−−Spectrum−−−−−−−−−−−−−−−−−
93 CurrNorm = CurrNorm + CurrData(idx);
94

95 if isequal(rem(idx,NoOfSamples),0) && ~isequal(count,0)


96 idx/NoOfSamples
97 RctPower(floor(NoDnSampledData/NoOfSamples)) = RPowerData / NoOfSamples;
98 ActPower(floor(NoDnSampledData/NoOfSamples)) = APowerData / NoOfSamples;
99 InstPower(floor(NoDnSampledData/NoOfSamples)) = PowerData / NoOfSamples;
100 DnSmlCurr(floor(NoDnSampledData/NoOfSamples)) = CurrNorm / NoOfSamples;
101

102 count=0;APowerData=0;RPowerData=0;PowerData = 0; CurrNorm = 0;


103 else
104 count = count + 1;
105 end
106 NoDnSampledData = NoDnSampledData + 1;
107 end
108 end
109 end
110 fclose(fid);
111 %%−−−−−−−−−−Plots−−−−−−−−−−−−−−−−−−
112 %%−−−−−−−−−InstPower−−−−−−−−−−−−
113 TimeSec = [1:length(InstPower)]∗0.02/60;
114 TimePlot = TimeSec;
115 %%−−−−−−−Save Processed Data to Data Base−−−−−
116 file = regexprep(FileName,’␣’,’’);

79
A Appendix

117 file = regexprep(file,’−’,’’);


118 k = findstr(file,’umar’);%% last portion of my name Mithilesh Kumar
119 sz=4;
120 if isempty(k)
121 k = findstr(file,’ier’);%% last portion of my name Thomas Bier
122 sz=3;
123 end
124 str = file(k+sz:end−4);
125 eval([str ’.ActPwr␣=␣ActPower;’])
126 eval([str ’.RctPwr␣=␣RctPower;’])
127 eval([str ’.InsPwr␣=␣InstPower;’])
128 eval([str ’.DnSmlCurr␣=␣DnSmlCurr;’])
129 eval([str ’.Time␣=␣TimePlot;’])
130 eval([str ’.Volt␣=␣VoltData;’])
131 eval([str ’.Curr␣=␣CurrData;’])
132

133 filepath=fullfile(’C:\Users\kumar\Documents\DataBase_SimulatedData’,...
134 str);
135 eval([’save(’ ’’’’ filepath ’’’’ ’,’ ’’’’ str ’’’’ ’);’])
136 %%−−−−−−−−−−−−−−−−−−− For JPG Picx−−−−−−−
137 picpath=fullfile(’C:\Users\kumar\Documents\DataBase_SimulatedData’,...
138 FileName(1:end−4));
139 %%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
140 figure;stairs( TimePlot,InstPower∗5000);xlabel(’Time(min)’);ylabel(’Power(W)’);
141 saveas(gcf,[picpath,’−InstPwr’],’jpg’);close(gcf);
142 %%−−−−−−−−−Active Power−−−−−−−−−−−−
143 figure;plot(abs(ActPower),abs(RctPower),’∗black’);xlabel(’P’);ylabel(’Q’);
144 saveas(gcf,[picpath,’−PQPwr’],’jpg’);close(gcf);
145 close all;

A.3.5 Normalized Data: From DataBase Measured file is read and Porcessed
and Data is stored back as in ReadDataBase.m function with only
difference it saves additinal two fields of Voltage and Current in the saved
structure that could help to analyse VI-Trajectory

1 function PowerNorm (varargin)


2 %% PowerNorm.m Script File
3 %
4 % DCSP−Lab
5 % University of Furtwangen
6 % Prof.Dr−Ing. Dirk Benyoucef
7 %
8 % Description:
9 % PowerNorm Function is to read processed measured data file
10 % from the DataBase folder. Data stored here should be in the format of
11 % TEXT file. Files in this folder should only be data files, not the header

80
A.3 Appendix Programes & scripts

12 % files with files, generated after processing measured raw file by


13 % function ConvertData.m. In destination Folder Data with Matlab structure
14 % format file ∗.mat and plots in JPG format is saved.
15 %−−−−−−−−−−−−IMPORTANT−−−−−−−−−
16 % The difference between PowerNorm and ReadDataBase function is that
17 % this function was modified to work on normalized power signal. since not
18 % extra information was extracted by this method it is no longer in use and
19 % commented.
20 % In addition this file is meant to save last block of Voltage and Current
21 % Data to analyse VI−Trajectory mentioned in Document. Since it depends a
22 % lot on appliance and usage pattern, only data from PM16 presented
23 % in document are found worth mentioning.
24 %
25 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
26 % Important Points:
27 % 1. Path of Data Base folder should be selected here when asked by browser
28 % window.
29 % 2. Name of the person who took the measurement should be updated in line
30 % number 133 or 151.
31 % 3. Name of the Files in data base folder are not allowed to contain any
32 % other alphabets than English Alphabets.
33 % 4. Path of Destination Folder should be updated in line number 149.
34 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
35 % Author: Mithilesh Kumar (Miku), MTM3 Masterthesis WS 2010
36 %
37 % Version control: − V1.0
38 % − V1.1 − Modified
39 % − V1.2 − Added Comments and Description
40 % − V1.3 − Modified
41 % Current Date: 20.03.2011
42 clc
43 close all;
44

45 DataBaseAddress = uigetdir(’’,’Set␣Data␣Base’);
46 if isequal(DataBaseAddress,0)
47 disp(’No␣Files␣or␣Folders␣are␣selected’);
48 end
49 % end
50 %DataBase directory is expected to have only and all possible ’∗.txt’ files
51 DataBaseContents = dir(fullfile(DataBaseAddress,’∗.txt’));
52 NrOfFiles = length(DataBaseContents);
53 % Index=1
54 for Index=1:1:NrOfFiles
55 FileName = DataBaseContents(Index).name;
56 FullFileName = fullfile(DataBaseAddress, FileName); %’.txt’ is there in FileName
57 fid = fopen(FullFileName,’r’);
58 HeaderData = textscan(fid,’%s’,42,’delimiter’,’\n’);
59 NrOfData = str2num(HeaderData{1}{41}(13:end));

81
A Appendix

60 BlockSize = NrOfData;
61

62 % BlockSize = 6;
63 BlockSize = 1e+6;
64 if (NrOfData > BlockSize)
65 InstRealPower = zeros(1,BlockSize);
66 end
67 NoDnSampledData = 1;
68 InstPower=0;
69

70 % FilePart = 1;
71 Total_data_idx = 1;
72 InstRealPower = 0;CurrData = 0;
73 DnSmlCurr=0;
74

75 while ~feof(fid)
76 if gt(NrOfData,BlockSize)
77 Data = textscan(fid,’%s␣%s’,BlockSize,’delimiter’,’;’);
78 else
79 Data = textscan(fid,’%s␣%s’,NrOfData,’delimiter’,’;’);
80 end
81 %−−Average Instantaneous Power
82 count = 0;
83 PowerData = 0; CurrNorm = 0; VoltNorm = 0;
84 RPowerData = 0; APowerData = 0;
85 DataSize = length(Data{1,2});
86 % NoOfSamples = 4;
87 NoOfSamples = 160;
88

89 if ge(DataSize,1)
90 %−−−−Phase calculation direct from Power−−−−−
91 for Idx=1:1:DataSize
92 disp([Index, Idx]);
93 VoltData(Idx)=str2num(Data{1,1}{Idx});
94 CurrData(Idx)=str2num(Data{1,2}{Idx});
95 %−−−−−−−−−Power Normalization−−−−−−
96 % InstRealPowerNorm(Idx)=str2num(Data{1,1}{Idx}) ∗ str2num(Data{1,2}{Idx});
97 % InstRealPower(Idx)=(230/VoltData(Idx))∗(230/VoltData(Idx))∗InstRealPowerNorm(Idx);
98 %−−−−−−−−−Power Normalization−−−−−−
99 InstRealPower(Idx)=str2num(Data{1,1}{Idx}) ∗ str2num(Data{1,2}{Idx});
100 end
101 InstPwr_fft = fft(InstRealPower);
102 InstPwr_phase = unwrap(angle(InstPwr_fft));
103

104 for idx=1:1:DataSize


105 % idx
106 % CurrData(idx)=str2num(Data{1,2}{idx});
107 % InstRealPower(Idx)=str2num(Data{1,1}{idx}) ∗ str2num(Data{1,2}{idx});

82
A.3 Appendix Programes & scripts

108 %−−−−−−PQ Power−−−−−−−−−−−−−−−−


109 RPowerData = RPowerData + InstPwr_fft(idx)∗sin(InstPwr_phase(idx));
110 APowerData = APowerData + InstPwr_fft(idx)∗cos(InstPwr_phase(idx));
111 %−−−−−−InstPower−−−−−−−−−−−−−−−−
112 PowerData = PowerData + InstRealPower(idx);
113 %−−−−−−Spectrum−−−−−−−−−−−−−−−−−
114 CurrNorm = CurrNorm + CurrData(idx);
115 %−−−−−−−−−−VI−Trajectory−−−−−−−−−−−−−−−−
116 VoltNorm = VoltNorm + VoltData(idx);
117

118 if isequal(rem(idx,NoOfSamples),0) && ~isequal(count,0)


119 idx/NoOfSamples
120 RctPower(floor(NoDnSampledData/NoOfSamples)) = RPowerData / NoOfSamples;
121 ActPower(floor(NoDnSampledData/NoOfSamples)) = APowerData / NoOfSamples;
122 InstPower(floor(NoDnSampledData/NoOfSamples)) = PowerData / NoOfSamples;
123 DnSmlCurr(floor(NoDnSampledData/NoOfSamples)) = CurrNorm / NoOfSamples;
124 DnSmlVolt(floor(NoDnSampledData/NoOfSamples)) = VoltNorm / NoOfSamples;
125

126 count=0;APowerData=0;RPowerData=0;PowerData = 0; CurrNorm = 0; VoltNorm = 0;


127 else
128 count = count + 1;
129 end
130 NoDnSampledData = NoDnSampledData + 1;
131 end
132 end
133 end
134 fclose(fid);
135 %%−−−−−−−−−−Plots−−−−−−−−−−−−−−−−−−
136 %%−−−−−−−−−InstPower−−−−−−−−−−−−
137 TimeSec = [1:length(InstPower)]∗0.02/60;
138 TimePlot = TimeSec;
139 %%−−−−−−−Save Processed Data to Data Base−−−−−
140 file = regexprep(FileName,’␣’,’’);
141 file = regexprep(file,’−’,’’);
142 k = findstr(file,’umar’);%% last portion of my name Mithilesh Kumar
143 sz=length(’umar’)−1;
144 if isempty(k)
145 % k = findstr(file,’ier’);%% last portion of my name Thomas Bier
146 k = findstr(file,’ier’)
147 sz=length(’ier’)−1;
148 end
149 if isempty(k)
150 % k = findstr(file,’chultze’);%% last portion of my name Thomas Schultz
151 k = findstr(file,’chultze’)
152 sz=length(’chultze’)−1;
153 end
154 str = file(k+sz:end−4);
155 if ge(length(str),55)

83
A Appendix

156 str=str(1:55)
157 end
158 filepath=fullfile(’C:\Users\kumar\Documents\DataBase_SimulatedData’,...
159 str);
160 A = exist([filepath ’.mat’],’file’)
161 if ne(A,0)
162 filepath=[filepath file(9:12)];
163 end
164

165 eval([str ’.ActPwr␣=␣ActPower;’])


166 eval([str ’.RctPwr␣=␣RctPower;’])
167 eval([str ’.InsPwr␣=␣InstPower;’])
168 eval([str ’.DnSmlCurr␣=␣DnSmlCurr;’])
169 eval([str ’.DnSmlVolt␣=␣DnSmlVolt;’])
170 eval([str ’.Time␣=␣TimePlot;’])
171 eval([str ’.Volt␣=␣VoltData;’])
172 eval([str ’.Curr␣=␣CurrData;’])
173

174

175 eval([’save(’ ’’’’ filepath ’’’’ ’,’ ’’’’ str ’’’’ ’);’])
176 %%−−−−−−−−−−−−−−−−−−− For JPG Picx−−−−−−−−−−−−−−−−−−−−
177 picpath=fullfile(’C:\Users\kumar\Documents\DataBase_SimulatedData’,...
178 FileName(1:end−4));
179 %%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
180 figure;stairs( TimePlot,InstPower);xlabel(’Time(min)’);ylabel(’Power’);
181 saveas(gcf,[picpath,’−InstPwr’],’jpg’);close(gcf);
182 %%−−−−−−−−−Active Power−−−−−−−−−−−−
183 figure;plot(ActPower,RctPower,’∗black’);xlabel(’P’);ylabel(’Q’);
184 saveas(gcf,[picpath,’−PQPwr’],’jpg’);close(gcf);
185

186 close all;

A.3.6 Algorithms: Appliance Detection

1 function ApplianceDetection(varargin)
2 %% EdgeDetection.m Script File
3 %
4 % DCSP−Lab
5 % University of Furtwangen
6 % Prof.Dr−Ing. Dirk Benyoucef
7 %
8 % Description:
9 % EdgeDetection function is used in ApplianceDetection to find edges.
10 % It is used tested with more than 10 files and different combination of
11 % Threshold and Tolerance values. The Best values for detection is left
12 % uncommented and rest are commented.

84
A.3 Appendix Programes & scripts

13 %
14 % This function takes 3 input argument to give 3 output argument.
15 % Input argument should contain Data value which is Instantaneous power
16 % value in ∗.mat file format. Other Input arguments are optional. If all
17 % 3 arguments are given then it should be in the order of:
18 % 1. BlockSize to skip number of run, which by default is 1.
19 % 2. DataIn as an array of Instantaneou power value.
20 % 3. Trasient threshold to define edge, which by default is 50.
21 %
22 % Output arguments are diff, pos and neg. ’diff’ will have a difference of
23 % step value that result an edge. ’pos’ has a index value of Instantaneous
24 % Power arra where ’positive’ or rising edges are found, and ’neg’ has index for
25 % ’negative’ or falling edges.
26 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
27 % Author: Mithilesh Kumar (Miku), MTM3 Masterthesis WS 2010
28 %
29 % Version control: − V1.0
30 % − V1.1 − Modified and added comments
31

32 % Current Date: 01.04.2011


33 %
34 clc;close all;
35

36 [FileName,PathName,FilterIndex] = uigetfile(’∗.mat’);
37

38 var=eval([’load(’ ’’’’ PathName ’\’ FileName ’’’’ ’)’])


39 eval([’DataIn=var.’ FileName(1:length(FileName)−4) ’.InsPwr’]);
40

41 % TOLERANCE = 0.009;%45W
42 %%−−−−−−−Edge Detection−−−−−−−−−−
43 [Dif,RiseEdge,FallEdge] = EdgeDetection(1,DataIn,50)
44 %%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
45

46 %%−−Filter and suppress transient−−


47 [EventON,EventOFF] = FilterTransient(DataIn,RiseEdge,FallEdge)
48 %%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
49

50 %%−−Step Match with Priori Information−−


51 %% Data only with Steps whose rising and falling indexes are known
52 [Appliance] = StepMatch(DataIn,EventON,EventOFF,RiseEdge,FallEdge)
53 %%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
54 disp(Appliance);

A.3.7 Edgedetection: Function is used to find or detect rising and falling edges
of the signal.

85
A Appendix

1 function [diff,pos,neg] = EdgeDetection(blocksize,DataIn,trans_thres)


2 %% EdgeDetection.m Script File
3 %
4 % DCSP−Lab
5 % University of Furtwangen
6 % Prof.Dr−Ing. Dirk Benyoucef
7 %
8 % Description:
9 % EdgeDetection function is used in ApplianceDetection to find edges.
10 % It is used tested with more than 10 files and different combination of
11 % Threshold and Tolerance values. The Best values for detection is left
12 % uncommented and rest are commented. This function is called from the main
13 % function Appliance Detection, but it can be used or called directly from
14 % the Matlab command window.
15 %
16 % This function takes 3 input argument to give 3 output argument.
17 % Input argument should contain Data value which is Instantaneous power
18 % value in ∗.mat file format. Other Input arguments are optional. If all
19 % 3 arguments are given then it should be in the order of:
20 % 1. BlockSize to skip number of run, which by default is 1.
21 % 2. DataIn as an array of Instantaneou power value.
22 % 3. Trasient threshold to define edge, which by default is 50.
23 %
24 % Output arguments are diff, pos and neg. ’diff’ will have a difference of
25 % step value that result an edge. ’pos’ has a index value of Instantaneous
26 % Power arra where ’positive’ or rising edges are found, and ’neg’ has index for
27 % ’negative’ or falling edges.
28 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
29 % Author: Mithilesh Kumar (Miku), MTM3 Masterthesis WS 2010
30 %
31 % Version control: − V1.0
32 % − V1.1 − Modified and added comments
33

34 % Current Date: 01.04.2011


35 %
36

37 %−−−Array based Detection−−−−−−


38 if isequal(nargin,0)
39 blocksize = 1;
40 transient_thres = 50;
41 end
42 len=length(DataIn);%%size of input Data
43 steps=1;%%block of data processed at a time
44 Positiveedge = zeros(1,len);%Stack for ON event
45 Negativeedge = zeros(1,len);%Stack for OFF event
46

47 dif = zeros(1,len);
48 count_ON = 0;

86
A.3 Appendix Programes & scripts

49 count_OFF =0;
50 evntdetc = DataIn;
51 % TOLERANCE = 0.010 %%50W edges were lost 0.008 with step 1 blk 1
52 %pos 14, neg 80 with blk 3 step1
53 % TOLERANCE = 0.006 %%30W too many edges were found with step 2 blk 1
54 TOLERANCE = 0.009;%45W
55 i=1;
56 while lt(i,len−blocksize)
57 % for(i=1:steps:len−blocksize)
58 i
59 dif(i)= DataIn(i+blocksize)−DataIn(i);
60 cnt=0;
61 if (abs(dif(i)) > TOLERANCE)
62 %%Step Change more than noise level,
63 %%Check For Edeges or transient
64 if gt(dif(i),0)%% Find rising edges
65 count_ON = count_ON + 1;
66 % Positiveedge(count_ON) = dif(i);
67 Edge_start(count_ON) = i;%App switched On i
68 while gt(DataIn(i+blocksize),DataIn(i))
69 i=i+1;
70 cnt=1;
71 end
72 elseif lt(dif(i),0)%%Find immediate falling edges
73 count_OFF = count_OFF + 1;
74 % Negativeedge(count_OFF) = dif(i);
75 Edge_end(count_OFF)= i;
76 while le(DataIn(i+blocksize),DataIn(i))
77 i=i+1;
78 cnt=1;
79 end
80

81 end
82 end
83 if ~gt((len−i),blocksize)
84 blocksize =blocksize −1;
85 end
86 if isequal(cnt,0)
87 i=i+steps;
88 end
89 end
90 % evnt = evntdetc;
91 pos = Edge_start;
92 neg = Edge_end;
93 diff = dif;

87
A Appendix

A.3.8 FilterTransient 1: Function is used to filter and suppress transients to


differentiate it from Instantaneous power step change. This function is
used for further algorithms development.

1 function [EventON,EventOFF] = FilterTransient(DataIn,RiseEdge,FallEdge)


2 %% FilterTransient.m Script File
3 %
4 % DCSP−Lab
5 % University of Furtwangen
6 % Prof.Dr−Ing. Dirk Benyoucef
7 %
8 % Description:
9 % FilterTransient function is used in ApplianceDetection to filter
10 % transient peaks from found edges. This function is called from the main
11 % function Appliance Detection, but it can be used or called directly from
12 % the Matlab command window. It must be called with 3 imput arguments
13 % and Two ouptput arguments. 3−input arguments should be as follows:
14 % 1. First argument should be variable DataIn for Array value of
15 % Instantaneous power.
16 % 2. Second value is variable RiseEdge for the array of index values where
17 % edges are found to increase in function Edgedetection as an ouput
18 % argument.
19 % 3. Third value is variable FallEdge for the array of index values where
20 % edges are found to fall in function Edgedetection as an ouput
21 % argument.
22 %%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
23 % Author: Mithilesh Kumar (Miku), MTM3 Masterthesis WS 2010
24 %
25 % Version control: − V1.0
26 % − V1.1 − Modified and added comments
27

28 % Current Date: 15.04.2011


29 %
30

31

32 if gt(length(RiseEdge),length(FallEdge))
33 RiseEdge = RiseEdge(1:length(FallEdge))
34 end
35 Trans_Thresh = 10;Trans_Time=150;
36 Transient_found = 0;
37 cnt_ON = 1; cnt_OFF = 1;
38 EventON = zeros(1,length(RiseEdge));
39 EventOFF = zeros(1,length(FallEdge));
40

41 for idx =1 : min(length(RiseEdge),length(FallEdge))−1


42 strt_pt = min(RiseEdge(idx),FallEdge(idx));
43 if isequal(strt_pt,RiseEdge(idx))
44 % Edge rising

88
A.3 Appendix Programes & scripts

45 end_pt = min(RiseEdge(idx+1),FallEdge(idx));
46 if isequal(end_pt,FallEdge(idx))
47 % Immediate after rising there is falling edge
48 if le(abs(end_pt − strt_pt),Trans_Thresh)
49 % Transient Found
50 Transient_found = Transient_found + 1;
51 DataIn(strt_pt:end_pt+Trans_Time)= ...
52 (DataIn(strt_pt−12)+DataIn(strt_pt−11))/2;
53 EventON(cnt_ON)=strt_pt;
54 cnt_ON = cnt_ON + 1;
55 % end_pt = strt_pt;
56 end
57 end
58 else
59 % Edge Falling
60 end_pt = min(RiseEdge(idx),FallEdge(idx+1));
61 if isequal(end_pt,RiseEdge(idx))
62 % Immediate after Falling there is rising edge
63 if le(abs(end_pt − strt_pt),Trans_Thresh)
64 % Transient Found
65 Transient_found = Transient_found + 1;
66 DataIn(strt_pt:end_pt+Trans_Time)= ...
67 (DataIn(strt_pt−12)+DataIn(strt_pt−11))/2;
68 EventOFF(cnt_OFF)=strt_pt;
69 cnt_OFF = cnt_OFF + 1;
70 % end_pt = strt_pt;
71 end
72 end
73 end
74 end
75 disp(’End’);

A.3.9 FilterTransient 2: Function is used to filter and suppress transients to


differentiate it from Instantaneous power step change. This function is
not used for further algorithms development as this approach was able to
give satifactory result only for individual appliances measurement or group
of very small appliances. In case of normal pattern measurement this
method was not found suitable and satisfactory.

1 function transientfinder(PathDataBase)
2 %% trnasientfinder.m Script File
3 %
4 % DCSP−Lab
5 % University of Furtwangen
6 % Prof.Dr−Ing. Dirk Benyoucef
7 %

89
A Appendix

8 % Description:
9 % trnasientfinder Function was written to load the Matlab structure file
10 % save from function ReadDataBase.m and process to find the transient.
11 % Approach used in this function was very effective to find transients
12 % in Individual or oly small appliances measured, as it uses the concept
13 % of maxima considering all transients levels must be the higher than
14 % all steady state power consumption level. Since this is not true for
15 % normal scenario, this function was discarded from further implementation
16 % but because of its accurate results it is mentioned in the document.
17 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
18 %Input arguments used for this function is:
19 % − Folder in which processed Matlab structure files
20 % are saved. Structure should have filed ’.InsPwr’, the same format
21 % it is used in function ReadDataBase.m to save the file.
22 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
23 % Author: Mithilesh Kumar (Miku), MTM3 Masterthesis WS 2010
24 %
25 % Version control: − V1.0
26 % − V1.1 − Added Comments and Description
27 % Current Date: 21.03.2011
28 %
29 %−−−−−Important Note−−−−−−−−−−
30 %Input path of folder having ∗.mat files generated after data processing
31 %−−−−−Important Note−−−−−−−−−−
32

33 close all;
34 clc;
35

36 if ne(nargin,0)
37 path = PathDataBase;
38 else
39 path = uigetdir(’’,’Select␣DataBase␣Path’);
40 end
41

42 DataBaseContents = dir(fullfile(path,’∗.mat’));
43 NrOfFiles = length(DataBaseContents);
44

45 for Index=1:1:NrOfFiles
46 StructName = DataBaseContents(Index).name;
47 StructName = StructName(1:length(StructName)−4);
48

49 var=eval([’load(’ ’’’’ path ’\’ StructName ’’’’ ’)’])


50 eval([’k=var.’ StructName ’.InsPwr’]);
51 [TransientNum, Data] = filtertrans(k,0)
52

53 TransDet = [StructName ’TransDet’];


54 eval([TransDet ’.AppName␣=␣StructName␣;’])
55 eval([TransDet ’.TransNO␣=␣TransientNum;’])

90
A.3 Appendix Programes & scripts

56 eval([TransDet ’.InsPwr␣=␣Data;’])
57 filepath=fullfile(path,TransDet);
58 eval([’save(’ ’’’’ filepath ’’’’ ’,’ ’’’’ TransDet ’’’’ ’);’])
59 clear k var;
60 eval([’clear␣’ TransDet])
61 end
62

63

64 %%−−−−−−−−−−−SUBFUNCTION−−−−−−−−−−−−−−−
65 function [TransNum,PrData] = filtertrans(k,t)
66

67 TransDet = 0;
68 TOLERANCE = 0.010;
69

70 [val,index]=max(k);
71 if gt(abs(k(index)−k(index−2)),TOLERANCE)
72 % Transient or edge detected
73 cnt = 1;
74 for i=1:10
75 i
76 %Appliance need to be switched ON for at least for 20ms
77 if gt(abs(k(index+i)−k(index+i−1)),TOLERANCE)
78 cnt = cnt +1;
79 else
80 continue;
81 end
82 end
83 if gt(cnt,1)
84 %Transient Detected
85 t = t + 1;
86 k(index−2 : index) = mean(k(index−4:index−3));
87 k(index+1 : index+10) = mean(k(index+4:index+10));
88 TransDet = 1;
89 end
90 end
91 if isequal(TransDet,1)
92 [TransNum,PrData] = filtertrans(k,t);
93 if isequal(TransDet,0)
94 TransNum = t;
95 PrData = k;
96 return
97 end
98 else
99 TransNum = t;
100 PrData = k;
101 return
102 end

91
A Appendix

A.3.10 StepMatch: Function is used to match step change in signal to that of


corresponding step change of Individual Appliance measuerd in the
group

1 function [Appliance] = StepMatch(DataIn,RiseEdge,FallEdge)


2 %−−−−−−−−−−−−−−−−−−−−−−−−−−
3 %% StepMatch.m Script File
4 %
5 % DCSP−Lab
6 % University of Furtwangen
7 % Prof.Dr−Ing. Dirk Benyoucef
8 %
9 % Description:
10 % StepMatch function is used in ApplianceDetection to filter
11 % or detect appliances after transient peaks were filtered
12 % and indiex of rising and falling edges were found out with
13 % good accuracy. This function is called from the main
14 % function Appliance Detection, but it can be used or called directly from
15 % the Matlab command window by passing the input argument to it.
16 % It must be called with 3 imput arguments
17 % and one ouptput argument. 3−input arguments should be as follows:
18 % 1. First argument should be variable DataIn for Array value of
19 % Instantaneous power.
20 % 2. Second value is variable RiseEdge for the array of index values where
21 % edges are found to increase in function Edgedetection as an ouput
22 % argument.
23 % 3. Third value is variable FallEdge for the array of index values where
24 % edges are found to fall in function Edgedetection as an ouput
25 % argument.
26 %%−−−−−−−−−−−−−−−−−−−−−−−
27 % Author: Mithilesh Kumar (Miku), MTM3 Masterthesis WS 2010
28 %
29 % Version control: − V1.0
30 % − V1.1 − Modified and added comments
31

32 % Current Date: 15.04.2011


33 %
34 %−−−−−−−−−−−−−−−−−−−−−
35

36 %%−−−−Appliance−List−−
37 KUELSCHRANK = 0.016;
38 TOASTER = 0.125;
39 WasserKocher_FIF = 0.285;
40 WasserKocher_MORPHYRICH = 0.175;
41 %%−−−−−−−−−−−−−−−−−−−
42 App_array = sort([KUELSCHRANK TOASTER WasserKocher_FIF WasserKocher_MORPHYRICH]);
43

44 Trans_Time = 150;

92
A.3 Appendix Programes & scripts

45 TOLERANCE = 0.009∗1000;%0.009=%45W rounded to integer just for comparison


46 TurnedON =0;
47 TurnedOFF =0;
48 Res = [];
49 for idx = 1: min(length(RiseEdge),length(FallEdge))
50 if le(RiseEdge(idx),FallEdge(idx))
51 %%Data starts with switchON event
52 start_pt = RiseEdge(idx); TurnedON =1;
53 else
54 %%Data starts with switchOFF event
55 start_pt = FallEdge(idx);TurnedOFF =1;
56 end
57

58 StepDif = abs(DataIn(start_pt)−DataIn(start_pt+Trans_Time));
59

60 % for i = 1:length(App_array)
61 if le(floor(abs(StepDif − KUELSCHRANK)∗1000),TOLERANCE)
62 if isequal(TurnedON,1)
63 AppTime = [’KUELSCHRANK␣ON␣at’ num2str(RiseEdge(idx)∗0.02/60) ’min’];
64 Res = [Res AppTime];TurnedON=0;
65 else isequal(TurnedOFF,1)
66 AppTime = [’KUELSCHRANK␣OFF␣at’ num2str(FallEdge(idx)∗0.02/60) ’min’];
67 Res = [Res AppTime];TurnedOFF=0;
68 end
69 elseif le(floor(abs(StepDif − WasserKocher_MORPHYRICH)∗1000),TOLERANCE)
70 if isequal(TurnedON,1)
71 AppTime = [’WasserKocher_MORPHYRICH␣ON␣at’ num2str(RiseEdge(idx)∗0.02/60) ’min;␣’];
72 Res = [Res AppTime];TurnedON=0;
73 else isequal(TurnedOFF,1)
74 AppTime = [’WasserKocher_MORPHYRICH␣OFF␣at’ num2str(FallEdge(idx)∗0.02/60) ’min;␣’];
75 Res = [Res AppTime];TurnedOFF=0;
76 end
77 elseif le(floor(abs(StepDif − WasserKocher_FIF)∗1000),TOLERANCE)
78 if isequal(TurnedON,1)
79 AppTime = [’WasserKocher_FIF␣ON␣at’ num2str(RiseEdge(idx)∗0.02/60) ’min;␣’];
80 Res = [Res AppTime];TurnedON=0;
81 else isequal(TurnedOFF,1)
82 AppTime = [’WasserKocher_FIF␣OFF␣at’ num2str(FallEdge(idx)∗0.02/60) ’min;␣’];
83 Res = [Res AppTime];TurnedOFF=0;
84 end
85 elseif le(floor(abs(StepDif − TOASTER)∗1000),TOLERANCE)
86 if isequal(TurnedON,1)
87 AppTime = [’TOASTER␣ON␣at’ num2str(RiseEdge(idx)∗0.02/60) ’min;␣’];
88 Res = [Res AppTime];TurnedON=0;
89 else isequal(TurnedOFF,1)
90 AppTime = [’TOASTER␣OFF␣at’ num2str(FallEdge(idx)∗0.02/60) ’min;␣’];
91 Res = [Res AppTime];TurnedOFF=0;
92 end

93
A Appendix

93 end
94 % end
95 end
96

97 Appliance = Res;

94
B Bibliography

[BBK] Benyoucef, D. ; Bier, T. ; Klein, P.:


Planning of energy production and management of Energy Resources with Smart Meters.

Int.conference on advances in Energy Engineering, Beijing 2010
[Bie] Bier, Thomas:
Smart Metering: Datenerhebung und Merkmalsextraktion. –
Master Thesis, SS-2010, HFU
[BKB] Benyoucef, D. ; Klein, P. ; Bier, T.:
Smart Meter non-intrusive load monitoring for use in smart homes. –
Ist IEEE energy conference and exhibition, Bahrain 2010
[E.G] E.Goldman, Lucio S.: H.Scot: M.:
Automatic Disaggregation of Total electrical load from NIALM. –
Carneige Mellon
[EU] EU:
Electricity Consumption and Efficiency Trends In EU. –
JRCTechnicalReport 2009
[F.S] F.Sultanem:
Using Appliance Signatures for Monitoring Residential Load at Meter Panel Level. –
IEEE transactions on power delivery, Vol. 6, No. 4, October 1991
[Har] Hart, Goerge W.:
Non-Intrusive Load Monitoring. –
IEEE, 1992
[HGW] H.Y.Lam ; G.S.K.Fung ; W.K.Lee.
A Novel Method to construct Taxonomy of Electrical Appliances Based on Load Signau-
res
[K.] K., Morien W.R.: H.:
Towards Bridging the Gap Between the Smart Grid and Smart Energy Consumption. –
Desert Research Institute, Division of Atmospheric Sciences
[M.H] M.Hahn, H.S.Cho: T.:
Determining Location of appliances from Multi-hop Tree Structure of Power Strip Type
Smart Meters. –
IEEE memebers
[M.L] M.L.Marceau, R.Zmeureanu:
NonIntrusive load disaggregation computer program to estimate the energy consumption
of major end usage in residential buildings. –
Montreal, Cannada, 1999
[Pih] Pihala, H:
Non-Intrusive appliance load monitoring system based on modern kwh-meter. –
Research center, Finland, 1998
[Rob] Rob, G.: Jaarsma S.: Rob W.:

95
B Bibliography

Smart Metering. –
July 2006, KEMA, Netherlands
[S.G] S.Gupta, M.S.Reynolds: S.:
ElectriSense: Single-Point Sensing Using EMI for Electrical Event Detection and Clas-
sification in the Home. –
UbiCompLab, University of Washington, Duke University
[SRJ+ ] S.N.Patel ; R, Thomas ; J.A.Kientz ; M.S.Reynolds ; G.D.Abowd:
At the flick of a switch: Detecting and classifying unique electrical events on the Resi-
dential power line. –
GVU centre, Georgia Institute of technology
[S.S] S.Shaw:
System identification and modeling for nonintrusive load diagnostics. –
PhD. disseratation, MIT, MA-2000
[SSLR] S.R.Shaw ; S.B.Leeb ; L.K.Norford ; R.W.Cox:
NonIntrusive Load monitoring and Diagnostics in Power Systems. –
IEEE, Vol-57, No-7, July-2008
[Unk] Unknown:
Cluster Analysis: Basic Concepts and Algorithms. –
Chapter 8,

96
C Declaration

All the information present in this document is based on the technical reference mentioned in
Bibliography. All measurement and data under discussion, presented and discussed in the work
are collected by me & the working colleagues in respective houses and our laboratory. All Pro-
grams and scripts are written and verified by myself. Plots documented are truly generated
from the scripts written and tested based on Technical reference by myself. During the course
of signature generation and algorithm development, all results are mentioned based on pattern
measurement replica created by us in lab and hence it is expected but does not grant or promise
exactly similar results with same efficiency as in my work on other pattern measurements taken
in different scenarios. This also applies to real time scenarios and other measuring conditions
that is different in household than in lab. All these data are correct and true to the best of my
knowledge and it is based on my work done during Thesis tenure.

Name : Signature:

Place: Date :

97

Das könnte Ihnen auch gefallen