18
Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

Embed Size (px)

Citation preview

Page 1: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

Christian Frank, Kay RömerETH Zurich

Algorithms for Generic Role Assignment

in Wireless Sensor Networks

Page 2: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-42

read_sensor()send_msg() get_pos()

read_sensor()send_msg() get_pos()

The Gap

Page 3: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-43

Generic Role Assignment Enables automatic assignment of

– Special functions/roles to nodes in the network– Using programmer-specified rules for assignment

Rules are based on local and neighborhood properties

Coverage

onoff

Clustering

ch slave gw

Aggregation

srcsink agg

Page 4: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-44

Role Specifications

Use Case / Architecture

Property Directory

RA Algorithm

Gateway

App.Network

Sensor Node

battery = 80%pos = (12.3, 3.4)role = ON…

Simulation & Evaluation

Page 5: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-45

Clustering Appl.CLUSTERHEAD :: {

battery >= 60% &&count(1 hop) {

role == CLUSTERHEAD} == 0 }

GATEWAY :: {chs == retrieve(1 hop, 2) {

role == CLUSTERHEAD} &&count(2 hops) {

role == GATEWAY &&chs == super.chs

} == 0 }SLAVE :: else

p == retrieve(scope, num) { pred }– At least num nodes in scope must fulfil pred– Bind p to ids of matching nodes

count(scope) { pred }:– Counts nodes matching pred within scope

Page 6: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-46

Role Specifications

Use Case / Architecture

Property Directory

RA Algorithm

Gateway

App.Network

Sensor Node

Simulation & Evaluation

Page 7: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-47

Local cache table on each node– Contains local and remote properties

Algorithm consists of three procedures:1)Initialize cache table 2) Propagate properties to neighbors3) Choose role according to local table– On change of local table:

• Reschedule 2) and 3)

Iteration through a set of roles Notify applications on stable role

Distributed Algorithm

Page 8: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-48

1) Initialization

2) Property Propagation– broadcast all rows x with

• dist < max and• dirty == true

– set x.dirty to false

3) Local Rule Evaluation

Distributed Algorithm

0

Dist

1

Max

trueundef.roleA

DirtyValueKeySrc

A

B C

ON :: {count(1 hop) {

role == ON} == 0 }

OFF :: else

ON

OFF

undef.

false11ONroleA

0

Dist

1

Max

falseundef.roleB

DirtyValueKeySrc

false11OFFroleC

trueOFF

A

B C

Page 9: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-49

Probabilistic Initialization Improve convergence

– Chose initial role smartly Approach:

– Estimate probability pr for each role– Draw role r with probability pr – Estimation can be done offline using static

information• Specification• Node degree estimate

Extension:– Combine estimate pr and known/certain information

Later on “repair” inconsistent role assignments– Using standard cache table approach

Page 10: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-410

Probabilistic InitializationON:: count(1) {

role == ON } <= lim

Given: – Specification– Estimated n nodes within scope– Initial role probabilities

Compute role probabilities from spec.– Consider above example, probability

that: • k out of n nodes are ON• k nodes less/eq. lim are ON

– Assumption:• Symmetric probabilities

System of equations– solved offline using fixpoint iteration

Page 11: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-411

Additionally given– Est. role probabilities (last slide)– Roles of some nodes in scope

Compute role probability given known roles

Make use of initial specification flood

Wave Initialization

Sink

Y nodes are known and ON

ON:: count(1) { role == ON

} <= lim

X unheard-of nodes yet expected in scope

Page 12: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-412

Role Specifications

Use Case / Architecture

Property Directory

RA Algorithm

Gateway

App.Network

Sensor Node

Simulation & Evaluation

Page 13: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-413

Simulation tool– Discrete event simulator based on JIST/SWANS– Visualization / specification frontend– Specification compiler

Network model– Based on CC1000 parameters– Simple CSMA approach, only broadcast is used– Intentionately, no measures to improve

reliability Initial prototype on real nodes

– Supports subset of specification (count operators)

Implementation

Page 14: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-414

Simulated three specifications– Coverage / clustering / aggregation

Studied algorithms– Basic caching algorithm– Basic + probabilistic initialization– Basic + wave-based initialization

Examined…– Overhead, while varying nodes in same area– Convergence, while varying nodes in same area

• no. of role changes until a stable role is reached– Robustness, while varying an additional ratio of lost

messages– Proportionality, while varying the maximum scope of

the specification

Evaluation

Page 15: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-415

Convergence Metric

– Num. of role changes (except 1stprob. choice)

Coverage results– No further

reconfiguration after wave

Clustering results– Probabilistic does

not improve

Page 16: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-416

Limitations / Discussion Some specifications may not terminate

– Support user to detect non-terminating specifications

– Simulation tool used for testing– Protect deployed network by limiting role

changes Cannot describe every algorithm

– Focus on ease-of-use for application domain experts

– Extensible by using app.-specific procedures Efficiency

– Effort proportional to “difficulty” of specification– Comparable to “specific” implementations

Page 17: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

ACM SenSys 2005, Nov 2-417

Conclusion/Outlook First generic role assignment tool

– System service for WSN configuration problems

– Used to formulate a variety of network configuration heuristics

– Rapid prototyping System properties

– Proportional effort– Efficient probabilistic initialization

Future work– TinyOS implementation– More flexible scope definitions– Adaptation for more heterogeneous networks

Page 18: Christian Frank, Kay Römer ETH Zurich Algorithms for Generic Role Assignment in Wireless Sensor Networks

Thank you!