Date post: | 15-Jan-2016 |
Category: |
Documents |
View: | 213 times |
Download: | 0 times |
Apr 26th, 2006
Solving Generic Role Assignment Exactly
Christian Frank and Kay Römer
ETH Zurich, Switzerland
Apr 26th, 2006 Christian Frank <[email protected]> 2
Programming Abstractions for WSN
Task at hand on a higher level: Retrieve data from network
(TinyDB) Assign different functions to
network nodes (Role Assignment)
read_sensor()send_msg() get_pos()
Wireless Sensor Networks Small sensing devices,
communicating wirelessly Allow unobtrusive monitoring of
physical processes Programmed as a distributed
system
Apr 26th, 2006 Christian Frank <[email protected]> 3
Role Assignment Problems
Coverage Roles ON, OFF ON nodes cover every geographic spot
Clustering Roles: Clusterhead, Gateway, Slave Connected Subgraph
Data Aggregation Roles: Data Source, Aggregator, Forwarder
Many variations and combinations of the above
Apr 26th, 2006 Christian Frank <[email protected]> 4
Role Assignment Abstraction
Programmer defines a list of roles Functions that a node may perform in the network
Annotated with conditions for assigning each role, based on: Local node properties (available sensors, processing
power, battery, position…) Properties of nodes in network neighborhood
Apr 26th, 2006 Christian Frank <[email protected]> 5
x == retrieve(scope) { pred } : store nodes matching pred in property x
Example Specification: Coverage Network consists of more
nodes than needed
Only some nodes need to have sensors ON
Others may save power and sleep with sensors OFF
Conditions of ON role: Temperature sensor Battery above threshold No other ON node in sensing
range
onoff
ON :: {temp-sensor == true &&battery >= threshold &&count(2 meters) {
role == ON} == 0
}OFF :: else
count(scope) { pred }: Counts nodes matching pred within scope
Apr 26th, 2006 Christian Frank <[email protected]> 6
RA Algorithm
Property Directory
App.
Distributed Algorithm
Role Specifications
Elements of a Role-Assignment SystemNode PropertiesNetworkRole
Assignment Problem
RA Algorithm
Role Assignment
battery = 80%pos = (12, 3)role = ON …
Apr 26th, 2006 Christian Frank <[email protected]> 7
Distributed algorithm repeats three basic steps: Send properties to neighbors Wait random interval, receive properties Decide role
Distributed fixpoint iteration Notifies applications on stable role Details in “Algorithms for Generic Role
Assignment…” In Proc. of Sensys 2005
Distributed Algorithm
Does solution exist?How good is the solution?
onoff
Apr 26th, 2006 Christian Frank <[email protected]> 8
Role Specifications
Verification through Integer ProgramNode PropertiesNetworkRole
Assignment Problem
RA Algorithm
Role Assignment
IP Converter
Integer Program
CPLEX Solver
Centralized Algorithm Detect infeasible
specifications Optimize number
of nodes with a certain role(s)
Apr 26th, 2006 Christian Frank <[email protected]> 9
Example Integer Program
Binary result variables For each node i and role r
Constraints (for each node i ): Only one role should be
assigned to a node i Role ON is assigned iff
count operator is true “ “: If role ON,
count must be true “ “ similar
ON :: {count(scope) {
role == ON } <= 0 }
OFF :: else
( ,ON) ( ,OFF) 1x i x i
scope
( , ) 0j
x j ON
( ,ON) 1x i
scope
( , ) 0 (1 ( , ))j
x j ON M x i ON
( , )x i r 1 if node i is assigned role r0 otherwise
M high number, annuls constraint
Apr 26th, 2006 Christian Frank <[email protected]> 10
Additional Variables and Constraints Variables
Output variables indicating computed role
Auxiliary variables at each node- For each atomic predicate - For each and / or- For each role condition (opposed
to assignment)
Constraints formulating And / or Assign first matching role, if
more than one condition matches
Retrieve operators (paper)
ON :: { temp-sensor == true && battery >= threshold && count(2 meters) {
role == ON } == 0 }OFF :: else
1y
2y
3y
ON 1 2 3c y y y
ONc
OFFc
OFF OFF ONx c c
ON 1 2 33c y y y
Apr 26th, 2006 Christian Frank <[email protected]> 11
Results: Feasibility
Some specifications are infeasible, toy example: Condition for Red: At least 1 Green neighbor Condition for Green: No Red neighbor Grey: Else
Infeasibility is not always apparent in the specification Distributed algorithm does not find solution
IP can be used to detect infeasibility Compute feasible topology
Apr 26th, 2006 Christian Frank <[email protected]> 12
IP can be used to compute gap between “distributed” and “optimal” configuration
Generated IPs computable in reasonable time for many nodes
Results: Optimality
IP
Distributed
ON nodes with Coverage Example
Apr 26th, 2006 Christian Frank <[email protected]> 13
IP-based role assignment algorithm Compute feasibility (or feasible topology) Optimize number of nodes with a certain role(s)
Integrated development tool Simulator of distributed algorithms Integer-program based verifier Visualization
Summary
Apr 26th, 2006
Solving Generic Role Assignment Exactly
Christian Frank and Kay Römer
ETH Zurich, Switzerland