nilmtk - nipun batra · –combinatorial optimization (co) [proposed by hart] ... [more recent,...

57
NILMTK An Open Source Toolkit for Non-intrusive Load Monitoring 1

Upload: others

Post on 21-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

NILMTK An Open Source Toolkit for

Non-intrusive Load Monitoring

1

Page 2: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

NILMTK team

Nipun Batra

Amarjeet Singh Mani Srivastava

Jack Kelly William

Knottenbelt

Haimonti

Dutta

Oliver

Parson

Alex Rogers

2

Page 3: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Non-intrusive load monitoring

(Energy disaggregation)

“Process of estimating the energy consumed by

individual appliances given just a whole-house

power meter reading”

3

Page 4: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Wait a minute! This

sounds complicated

Would it help?

4

Page 5: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Jane goes to the

market

5

Page 6: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Jane spends 200

pounds on her

purchases

6

Page 7: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Jane’s husband John

is worried with the

expenses

7

Page 8: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

He spends some time

and looks at the

purchase list

8

Page 9: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Do you think the

itemized billing

helped him?

NILM is the same, but for energy!

9

Page 10: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Quiz time! Identify this famous CS scientist

10

Page 11: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Quiz time! Identify this famous CS scientist

11

That ain’t any great scientist. That’s me on my first birthday in 1990… This is not too far from the time when NILM was first discussed

Page 12: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Giving credit where

it is due

12

Page 13: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

NILM interest explosion

1. National smart meter rollouts

2. Reduced hardware costs

3. International meetings

– NILM workshop 2012, 2014; EPRI NILM

2013

4. Public datasets

5. Startups

13

Page 14: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

“Data is the new oil” • 9 NILM datasets and counting (few not

specific to NILM)

• Across 6 countries (India, UK, US,

Canada, EU)

• Measure aggregate and appliance level

data

• Across 3 colors

– REDD

– BLUED

– GREEND

14

Page 15: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

The industry is

interested!

15

Page 16: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

So, is everything so

rosy?

Not quite! Else we

won’t be here

16

Page 17: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

The scientific method “The scientific method is a body of techniques for investigating phenomena, acquiring new knowledge, or correcting and integrating previous knowledge” as per wiki

17

Page 18: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

3 core obstacles

preventing comparison of

state-of-the-art

18

Page 19: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

1. Hard to assess generality

• Subtle differences in aims of

different data sets

• Previous contributions evaluated only

on single dataset.

• Non-trivial to set up similar

experimental conditions for direct

comparison.

19

Page 20: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

2. Lack of comparison against

same benchmarks

• Newly proposed algorithms rarely

compared against same benchmarks.

• Lack of “open source” reference

algorithms often lead to

reimplementation.

20

Page 21: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

3. “Inconsistent”

disaggregation performance

metrics

• Different performance metrics proposed

in the past.

• Different formulae for same metric, eg.

4+ versions of “energy assigned”

21

Page 22: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

What is NILMTK?

Open source NILM toolkit

22

Page 23: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

What does it do?

Enable easy comparative analysis of

NILM algorithms across data sets.

23

Page 24: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

How does it do that?

Provides a pipeline from data sets

to metrics to lower the entry

barrier for researchers.

24

Page 25: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

NILMTK pipeline

REDD

BLUED

UK-

DALE

Statistics

NILMTK-

DF

Training

Preprocessing

Model

Disaggregation

Metrics

Data interface

25

Page 26: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Data Format

REDD

BLUED

UK-

DALE

Statistics

NILMTK-

DF

Training

Preprocessing

Model

Disaggregation

Metrics

Data interface

26

Page 27: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Data Format

• We propose NILMTK-DF: a common data

format.

• Provide importers for 6 datasets: REDD,

SMART*, Pecan street, iAWE, AMPds, UK-DALE

• Both flat file and efficient binary storage

format

27

Page 28: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

The fun of data!

28

Page 29: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Standardizing

nomenclature

Fridge

Refrigerator

FGE

29

Page 30: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Metadata

• Geographic coordinates

• Type of appliance- hot, cold, dry?

• Metering hierarchy

• Parameters measured

30

Page 31: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Standard nomenclature +

Metadata + Datasets =

Comparing power draw of washing machines

across US (REDD) and UK (UK-DALE)

31

Page 32: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Standard nomenclature +

Metadata + Datasets = Top 5 appliance according to energy

consumption across geographies

32

US UK INDIA

Page 33: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

NILMTK pipeline

REDD

BLUED

UK-

DALE

Statistics

NILMTK-

DF

Training

Preprocessing

Model

Disaggregation

Metrics

Data interface

33

Page 34: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Statistics

0

10

20

30

40

50

60

70

80

90

100

REDD Smart* Pecan AMPds iAWE UK_DALE

% energy submetered

• Energy submetered: Sum of energy of all

appliance/Energy at mains level

• More energy submetered More ground truth

34

Page 35: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Statistics

• Appliance usage patterns

• Correlations with weather

• Appliance power demands

35

Page 36: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Diagnostics

• Every data set has problems NILMTK provides diagnostic functions for common problems.

• %Lost samples (per interval and whole), uptime

% lost

samples in

house 1 of

REDD

dataset

36

Page 37: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Preprocessing

REDD

BLUED

UK-

DALE

Statistics

NILMTK-

DF

Training

Preprocessing

Model

Disaggregation

Metrics

Data interface

37

Page 38: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Preprocessing

• Correct common problems (as per

diagnosis).

• Other standard NILM preprocessors:

– Interpolating, filtering implausible

– Downsample to lower frequency

– Select Top-k-appliances by energy

consumption

38

Page 39: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Heart of NILMTK

REDD

BLUED

UK-

DALE

Statistics

NILMTK-

DF

Training

Preprocessing

Model

Disaggregation

Metrics

Data interface

39

Page 40: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Training

• NILMTK provides two benchmark

algorithms

–Combinatorial optimization (CO)

[Proposed by Hart]

–Factorial hidden Markov model (FHMM)

[More recent, more complex]

40

Page 41: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Model

• Beyond the usual train and disaggregate,

NILMTK allows importing and exporting

learnt models

• Allows NILM to be deployed in “real world

settings”

• Action speaks louder than words!! Demo

follows!

41

Page 42: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Disaggregate!

• Quite a bit of work before we

disaggregate

• We performed

– CO and FHMM based disaggregation

across first home of each dataset

– Detailed disaggregation analysis

across the home in iAWE (dataset

from India)

42

Page 43: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Disaggregation across

multiple datasets • CO as good as FHMM across iAWE,

UKPD, Pecan datasets

– Space heating contributes 60% in Pecan

and 35% in iAWE. Both approaches able

to detect with fair ease

43

And I thought

that CO was

really

outdated…

Page 44: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Disaggregation across

multiple datasets

44

• FHMM outperforms CO across REDD,

Smart*, AMPds

• This is expected as FHMM models time

variations.

• CO exponentially quicker than FHMM

Page 45: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Detailed disaggregation in

iAWE dataset (India)

• CO and FHMM perform similar

• Appliances such as air conditioners

way easier to disaggregate

• Complex appliances (laptops and

washing machines) – not so good

45

Page 46: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

NILMTK pipeline

REDD

BLUED

UK-

DALE

Statistics

NILMTK-

DF

Training

Preprocessing

Model

Disaggregation

Metrics

Data interface

46

Page 47: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Metrics

• NILMTK provides:

–General machine learning metrics

• Precision, Recall, F-score

– Specialized metrics for NILM

• Error in total energy assigned, RMS error in

assigned power,..

–Both event based and total power

based NILM metrics.

47

Page 48: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Demo time!!

48

Page 49: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Conclusions

Three core challenges in NILM research 1. Hard to address generality

2. Lack of comparison against same benchmarks

3. Inconsistent disaggregation performance metrics

How NILMTK addresses these challenges 1. Standard input and output formats (Addresses #1)

2. Parsers for 6 NILM data sets (Addresses #1, #2)

3. Two benchmark NILM algorithms (Addresses #1, #2)

4. Statistics, diagnostics and preprocessing (Addresses #1,

#2)

5. Metrics for different NILM use cases (Addresses #1)

49

Page 50: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Backup

50

Page 51: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Combinatorial optimization

• Seeks to find the optimal combination of

appliances’ power draw to minimize

residual energy.

• Similar to subset-sum problem and thus

NP-complete

• Power draw is not related in time

51

Page 52: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Combinatorial optimization Appliance Off power On power

Air conditioner

(AC)

0 2000

Refrigerator 0 200

If total power observed = 210 AC

is OFF and Refrigerator is ON

52

Page 53: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Combinatorial optimization Appliance Off power On power

Air conditioner

(AC)

0 2000

Refrigerator 0 200

If total power observed = 2000 AC

is ON and Refrigerator is OFF

53

Page 54: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Combinatorial optimization Appliance Off power On power

Air conditioner

(AC)

0 2000

Refrigerator 0 200

If total power observed = 2230 AC

is ON and Refrigerator is ON

54

Page 55: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

FHMM

• Each appliance modeled as HMM

– Power draw related in time If TV is on right now,

likely to be on next second.

• Exact inference scales worse than CO

55

Page 56: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

A bit of history Seminal work on NILM done at MIT dates back to

early 1980s – A good 6-7 years before I was born!

56

Page 57: NILMTK - Nipun Batra · –Combinatorial optimization (CO) [Proposed by Hart] ... [More recent, more complex] 40 . Model •Beyond the usual train and disaggregate, NILMTK allows

Field progress

0

10

20

30

40

50

60

70

1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004

# Papers citing the seminal work per year

What happened here?

57