model based event detection in sensor networks

24
Model Based Event Detection in Sensor Networks Jayant Gupchup, Andreas Terzis, Randal Burns, Alex Szalay

Upload: victor-rich

Post on 30-Dec-2015

26 views

Category:

Documents


0 download

DESCRIPTION

Jayant Gupchup, Andreas Terzis, Randal Burns, Alex Szalay. Model Based Event Detection in Sensor Networks. Outline. Motivation Data and Model Experiments and Results Discussion. Data Sampling in WSNs. Most environmental monitoring networks today sample at fixed frequencies - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Model Based Event Detection in Sensor Networks

Model Based Event Detection in Sensor Networks

Jayant Gupchup, Andreas Terzis, Randal Burns, Alex Szalay

Page 2: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 2

Outline

• Motivation

• Data and Model

• Experiments and Results

• Discussion

Page 3: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 3

Event starts

Detect Event

Increase Sampling Frequency/Trigger

Alarms

Event ends

Return to steady behavior

Data Sampling in WSNs- Most environmental monitoring networks

today sample at fixed frequencies

- The failure of fixed frequency sampling- High Frequency: Generates large volumes

of measurements- Low Frequency: Misses temporal transients

- Solution: Adaptive Sampling based on the ability to detect events of interest- Benefits

- Less but more “interesting” data- Conserve energy- Trigger alarms- Event-based querying in the back-end

database

Page 4: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 4

Rain Event Non-Event Days

-5

0

5

10

15

20

0 24 48 72 96

hours

Air

Tem

per

atu

re (

cels

ius)

Sample Event

Page 5: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 5

Solution Outline

• Model observed phenomena using Principal Component Analysis (PCA)

• Project original measurements on to a feature space– Benefit: reduces dimensionality

• Look for measurements deviating from average/expected behavior in the feature space

Page 6: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 6

First Principal Component

Variable #1

Var

iabl

e #2

X : Points in the original spaceO : Projection on PC1

Principal Component Analysis

• PCA : Finds axes of maximum variance in the collected data

• Reduces original dimensionality– Example: 2

variables 1 variable

Page 7: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 7

Motivation for Using PCATypical day: “Fits model well”

-4

-3

-2

-1

0

1

2

3

4

5

0 5 10 15 20 25

hours

Mea

n su

btra

cted

Air

tem

p (C

elsi

us)

observed Temp, PCA reprojection Temp.

residuals (absolute)

Event day: “Large residuals”

-8

-6

-4

-2

0

2

4

6

0 5 10 15 20 25

hours

Me

an

su

btr

act

ed

Air

te

mp

(C

els

ius)

observed Temp. PCA reprojection Temp.

residuals (absolute)

Page 8: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 8

Specific Application• LifeUnderYourFeet:

Environmental Monitoring network for soil moisture

• Deployment details– 10 MICAz Sensors

• Air Temperature (AT)• Soil Temperature (ST)• Soil Moisture• Light intensity

– Deployed for a period of a year

• Goal: Detect significant rain events

Page 9: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 9

Why not Soil Moisture ?

Reaction to event

Reaction to event

Page 10: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 10

Air Temp vs. Soil Temp

-6

-4

-2

0

2

4

6

0 5 10 15 20 25

hour

tem

per

atu

re (

cels

ius)

air temperature profile soil temperature (X20 scaleup)

Notice the phase lag for Soil Temperature

Page 11: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 11

Data Preparation• Build model for Air and Soil temperature

AT1_1 AT1_2 …. … …. AT1_144

AT2_1 AT2_2 …. … …. AT2_144

. . …. … …. .

. . …. … …. .

AT10_1 AT10_2 …. … …. AT10_144

. . …. … …. .

. . …. … …. .

. . …. … …. .

t=10 t=20 … t=1440

1 day,

10 sensors

Size of matrix: [(# of days x 10) 144]

Page 12: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 12

40

50

60

70

80

90

100

110

0 30 60 90 120

Principal Components

% v

aria

nce

co

vere

dair temperature soil temperature

Basis1-4 cover 90.95%

Number of PCA basis required

Page 13: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 13

PCA Bases (AT & ST)Air Temperature Eigenvectors (Basis vectors)

-0.15

-0.1

-0.05

0

0.05

0.1

0.15

0.2

0 5 10 15 20 25

Hour of day

no

rmal

ied

air

te

mp

erat

ure

eigenvector1 eigenvector2

Eigenvector1 Is the

Diurnal cycle

Soil Temperature eigenvectors (basis vectors)

-0.15

-0.1

-0.05

0

0.05

0.1

0.15

0.2

0.25

0 5 10 15 20 25

Hour of day

No

rmal

ized

so

il

tem

per

atu

re

eigenvector1 eigenvector2

similarity eigenvector1 for ST

&eigenvector2 for AT

Page 14: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 14

Event Detection Methods

1. Basic Method – Projections on the first principal component for AT

2. Highpass Method– Removes seasonal drift by looking at sharp changes

in the local neighborhood

3. Delta method– Uses the inertia of the soil and seasonal drift

Page 15: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 15

Method 1 : Basic Method• Considers only Air Temperature

• First Basis Vector covers 55% of variation in the data

AT1_1 AT1_2 …. … …. AT1_144

AT2_1 AT2_2 …. … …. AT2_144

. . …. … …. .

AT10_1 AT10_2 …. … …. AT10_144

V1_1

V1_2

.

V1_144

e1_1

e2_1

.

e10_1

X =

Average

E1 E2 … ….. …………….. En-1 En

Day 1 Day 2 Day n

10 sensors

First Basis Vector (PC1)

1 day

• Apply threshold on E1 seriesTag values below the threshold as events

Page 16: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 16

Method 2 : Highpass Method

• Again, considers only Air Temperature

• Apply highpass filter on E1 series S1 series

• Highpass filter detects sharp changes by focusing on a limited time window removes seasonal drift

• Apply threshold on S1 series– Tag values below the threshold as events

Page 17: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 17

Method 3 : Delta Method• Considers Air Temperature (AT) and Soil Temperature

(ST)

• Create E1 series for AT and ST

• Apply Highpass filter on E1,AT & E1,ST S1,AT & S1,ST

• Compute Delta = S1,AT -S1,ST for all days

• Set a threshold on the Delta series

Page 18: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 18

Evaluation

• Data Set– Test Period : 225 days between September,

2005 – July, 2006– 48 major rain events occurred during this

period• Reported by the BWI weather station

• Evaluation metrics– Precision (true positives)– Recall – Number of false negatives

Page 19: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 19

ResultsMethod Precision Recall False Negatives

Basic 52.459% 64% 18

Highpass 51.28% 80% 10

Delta 54.79% 85.106% 7

• Method shortcomings- Does not consider seasonal drift (Basic)- Does not use the inertia information of the soil (Basic, Highpass)

Page 20: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 20

Event detection for 12/13/2005 – 01/02/2006

Due to the inertia of the soil, ‘Delta method’ shows sharper negative peaks for event days.

-20

-15

-10

-5

0

5

10

15

20

25

0 5 10 15 20 25

days

valu

e

Delta Highpass Known events (BWI weather station)

Page 21: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 21

Future work

• Implement “Online event detection”– Compute Basis vectors from historic data– Load the ‘basis vectors’ and ‘threshold’ values on the motes

• Detect localized events by forming clusters of motes with similar eigen-coefficients

• Apply technique for faulty sensor detection

• Consider variants of PCA (Gappy-PCA, online-PCA)

Page 22: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 22

Acknowledgements• Ching-Wa Yip 1

- PCA C# library and Discussions.

• Katalin Szlavecz 2 & Razvan Musaloui-E 3

– Domain expertise and data collection.

• Jim Gray 4 & Stuart Ozer 4

– Online database

1 : JHU, Dept of Physics & Astronomy2 : JHU, Dept of Earth and Planetary science3 : JHU, Dept of Computer Science.4 : Microsoft Research

Page 23: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 23

Future work

• Online event detection on the motes

• Apply this method for faulty sensor detection

• Detect localized events by forming clusters of motes with similar eigencoefficients.

• Consider incomplete days using Gappy-PCA.

• Explore incremental & robust PCA techniques.

Page 24: Model Based Event Detection in Sensor Networks

The Johns Hopkins University 24

Training Set (Air Temp) • Seasons exhibit “Diurnal

Cycles” around their daily mean (DC component)

• Construct Zero-Mean Vectors for each Sensori for each day (remove DC Component)

0

5

10

15

20

25

30

0 6 12 18 24

Hour of the day

Air

Te

mp

era

ture

Winter Air Temp profile Summer Air Temp profile

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5

0 6 12 18 24

Hour of the day

Mean

sub

tract

ed A

ir

Tem

pera

ture

Mean Profile Air Temperature

• Remove outliers using a

simple median filter to

build the training set X