44
Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept.

Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

Scalable Tracking & Querying for Wireless Sensor Networks

Murat Demirbas

SUNY Buffalo

CSE Dept.

Page 2: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

2

Sensor networks

A sensor node (mote)

4Mhz processor, 128K flash memory magnetism, light, heat, sound, and vibration sensors wireless communication up to 100m costs “in bulk” ~$5 (now $80~$150)

Applications include

ecology monitoring, precision agriculture, civil engineering traffic monitoring, industrial automation, military and surveillance

In OSU, we developed a surveillance service for DARPA-NEST

classify trespassers as car, soldier, civilian LiteS: 100 nodes in 2003, ExScal: 1000 nodes in Dec 2004

A. Arora, et al. A Line in the Sand: A Wireless Sensor Network for Target Detection, Classification, and Tracking. Computer Networks (Elsevier), 2004.

Page 3: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

3

Desiderata for sensor networks

• Scalability :

Large-scale deployment: 10K nodes

Communication-efficient (local) distributed programs are needed

• Fault-tolerance :

Message corruptions, nodes fail in complex ways

Self-healing programs are needed

Page 4: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

4

Overview of my research

• Distributed & local WSN algorithms

Tracking: local and fault-locally healing Querying: local and lightweight routing Spatial clustering, etc.

• Reliable communication in WSN

Consensus in WSN: Dependable applications Reliable broadcast at MAC layer: Solving hidden terminal problem

Reliable transactions for WSN: A programming framework for concurrency-safe real-time control applications

• Specification-based design of self-healing

Scalability wrt code size: dependability preserving refinement of code

Page 5: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

Tracking in WSN

Page 6: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

6

Tracking problem

• Evader strategy is unknown

• Pursuer can only talk to nearby sensor nodes, pursuer moves faster than evader

• Design a program for sensor nodes to enable the pursuer to catch the evader (despite the occurrence of faults)

Applications: battlefield scenarios, border patrol, personnel tracking, routing messages to mobile processes

M. Demirbas, A. Arora, and M. Gouda. Pursuer-Evader Tracking in Sensor Networks. Sensor Network Operations, 2005.

Page 7: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

7

Evader-centric program

Tracking involves two operations– Move: update the tracking structure after evader relocates– Find: direct pursuer to reach evader using the tracking structure

Evader

Pursuer

Page 8: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

8

STALK: Scalable tracking

• Maintain tracking structure

over fewer number of nodes

with accuracy inversely proportional to the distance from evader

communication cost of msgj,k= distance(j,k), delay= δ*distance(j,k)

nearby nodes (cheap to update) have recent & accurate info

distant nodes (expensive to update) have stale & rough info

• Local operations :

— Cost of move proportional to the distance the evader moves

— Cost of find proportional to the distance from the evader

— Cost of healing proportional to the size of the initial perturbation

• To this end we employ a hierarchical partitioning of the network

M. Demirbas, A. Arora, T. Nolte, and N. Lynch. A Hierarchy-based Fault-local Stabilizing Algorithm for Tracking in Sensor Networks. OPODIS, 2004.

Page 9: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

9

Hierarchical clustering

R: dilation factor of clustering to determine size at higher levelsRadius at level L is ≈ RL

M. Demirbas, A. Arora, V. Mittal, and V. Kulathumani. Design and Analysis of a Fast Local Clustering Service for Wireless Sensor Networks. IEEE Trans. Par.&Dist.Sys. 2006.

Page 10: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

10

evader

Hierarchical tracking path

evaderevader

Grow action for building a tracking pathShrink action for cleaning unrooted paths

Page 11: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

11

Local find

• Searching phase:

A find operation at j queries j’s neighbors & j’s clusterhead at increasingly

higher levels to find the tracking path

• Tracing phase:

Once path is found, operation follows the path to its root

Page 12: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

12

evader find find find

Examples of find

A find for an evader d away incurs O(d) work/time cost guaranteed to hit the tracking path at level logRd of hierarchy

Page 13: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

13

A problem for move

evader dithering between cluster boundaries may lead to nonlocal updates

evader evaderevader

Page 14: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

14

Local move

• Lateral links to avoid nonlocal updates

• When evader moves to new location j:

a new path is started from j

the new path checks neighbors at each level to see whether insertion of a lateral link is possible

• Restricts lateral links to 1 per level in order not to deteriorate the tracking path

otherwise find would not be local since it could not hit the path at level logRd for an evader d away

Page 15: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

15

evader evader evader evaderevader evader evader

Examples of move

A move to distance d away incurs O(d*logRd) work/time cost

a level L pointer is updated at every iL-1

Ri distance; level L is updated d/iL-1

Ri times

update at L incurs O(RL) cost

Page 16: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

16

Local healing

Local healing means work/time for recovery proportional to perturbation size & not the network size

In the presence of faults

• a grow can be mistakenly initiated; shrink should contain grow

• a shrink can be mistakenly initiated; grow should contain shrink

Page 17: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

17

Fault-containment

• Give more priority to the action that has more recent info regarding the validity of the path

• A shrink or grow action is delayed for longer periods as the level of the node executing the action gets higher

j.grow-timer = g * R lvl(j)

j.shrink-timer = s * R lvl(j)

• Catching occurs within a constant number of levels

For g=5δ, s=11δ, b=11δR

grow catches shrink in 2 levels:

logR ((bR–b+sR2–gR-δR)/(sR-gR-3δ))

shrink catches grow in 4 levels:

logR ((bR–b+sR+gR-2s+3δR)/(gR-s-δ))

Page 18: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

18

Seamless tracking

• Fault-containment does not affect responsiveness

Total delaying up to l is a constant factor of communication delay up to l, δR l

• Concurrent move operations

move occurs before tracking path is updated a complete path is no longer possible; discontinuity in the path give a bound on evader speed to maintain a reachable path

• Concurrent find operations

when find reaches a dead-end, search phase is re-executed reachability condition guarantees that new path is nearby

• Cost of find & move unaffected

find

Page 19: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

Querying in WSN

Page 20: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

20

Querying

• A.k.a “information brokerage”, or “data-centric routing”

• Static event (rather than dynamic event in tracking)

• Two operations:

Publish: invoked by the nodes that detect an event

Aims to inform any potential nodes interested in the event

Query: invoked by any node in the network

aims to inform the querying node about a matching event and construct a path from the querying node to the event

• Centralized solutions are not acceptable due to high communication cost

Locality (distance-sensitivity) should be maintained

Page 21: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

21

Glance

• Distance-sensitive (local) and tunable

ensures that a query operation invoked within d hops of an event intercepts the event’s publish information within d*s hops

s is a “stretch-factor” tunable by the user

• Easily implemented without localization or hier.-clustering

Lightweight, applicable to a wider range of WSN

• Unifies both modes of operation in WSN monitoring app.

Centralized logging & monitoring In-network querying (location-dependent querying)

M. Demirbas, A. Arora, and V. Kulathumani. Glance: A Lightweight Querying Service for Wireless Sensor Networks. In submis. 2006.

Page 22: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

22

Model

• Multihop dense WSN

Cost of communication over d hops is O(d)

• Geometric network

triangle inequality is satisfied

• Distinguished basestation C

de : dist(e,C), e denotes an event

dq : dist(q,C), q denotes a querying node

d : dist(e,q) z : angle eCq

Page 23: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

23

Two cases

• Case1: z’> threshold angle– dq’ is relatively small compared to d’

– dq’ < d’*s

– OK for q’ to learn about e from C

• Case2: z’’< threshold angle– dq’’ is relatively large compared to d’’

– dq’’ > d’’*s

– NOT-OK for q’’ to learn about e from C

eq’’

q’

de

dq’’

dq’

d’

d’’

z’’

z’

C

Page 24: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

24

Outline of the solution

• The publish operation advertises the event on a cone boundary for some distance. Then goes straight to C.

• The query operation goes straight to C.

eq’’

q’

z’’

z’

C

Page 25: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

25

Areas where s is satisfied

• For s=1, take successively larger circles centered at e and C and intersect them.

• A2 is the region where stretch-factor is readily satisfied.

• For a querying node in A1 stretch-factor may be violated, publish should do local advertisement to ensure stretch-factor.

e C

Page 26: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

26

Areas where s is satisfied

• For s=2, similarly, we let a circle with radius r centered at e intersect with a circle with radius s*r centered at C

• Stretch-factor is readily satisfied for A2, A3, and A4.

• For A1, s may be violated. A1 is a bounded area, since all the circles centered at e are subsumed by circles with radius 2*r centered at C, for r>de

e C

d2d

H

30

• From HCe right-triangle, z is calculated as arcsin(1/s)=arcsin(0.5)=30

Page 27: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

27

Local advertisement

• The angle for the cone is taken as z. The event is advertised on the cone boundary for some distance. These account for any querying node in A1.

• The lateral advertisements inside the cone are to account for the querying nodes in area A1 that also fall within the cone boundaries.

e C

d2d

H

30d d

Page 28: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

28

Proof

≡ |QK| < s|QE|≡ |QL|+|LE|cot(x+x’)<s|QE|≡ |QE|cos(w)+|QE|sin(w)cot(x+x’)<s|QE|≡ sin(x)cos(w)+sin(x)sin(w)cot(x+x’)<1≡ sin(x+w+x’)<sin(x+x’)/sin(x)≡ True (for x+x’<90 and x+x’<180)

EC

Q

LK

x xx’

x+x’

w

x=arcsin(1/s)sin(x)=1/s

Page 29: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

29

Avoiding the need for localization

• Glance requires only an approximation for the direction to C

• After deployment, C starts a one-time flood that annotates each node with its hopcount from C and creates a spanning tree rooted at C

• To send the query or publish as a straight line, nodes route the message to the parent node along a branch in this tree.

• Cone boundary is approximated by occasional lateral advertisement

Page 30: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

30

Spanning tree construction

• Flooding protocols result in a large number of anomalous situations– Stragglers– Backward links– Highly clustered nodes

• These are due to collisions, nondeterministic non-isotropic nature of radio broadcasts, and earliest-first parent selection in the tree

Page 31: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

31

Optimized spanning tree

• Snooping to deal with stragglers/backward links– Reactive repairing– When a node with hopcount x

hears a message with hopcount x+2, it detects a straggler, to correct it decides randomly to rebroadcast

• Randomized adoption to deal with highly-clustered nodes– A node with hopcount x may

randomly select a node with hopcount x-1 as new parent

Page 32: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

32

Query costs

• Scalability of average # of hops for query operation is very good for Glance– ideally query hops depends only on

the distance between query and

events

– however, since event and query

locations are selected uniformly, for

larger network the average distance

between the two increases

• Glance does not involve any

lateral advertisement but it

performs very well!

Page 33: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

33

Publish costs

• The publish hops for Glance is equal to de, the cost of going to C, and is proportional to the depth of the MST constructed by C.

– the depth of MST scales nicely

wrt the network size.

Page 34: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

34

Stretch-factors

• Stretch-factors are independent of the network size– Both Glance and GlanceP satisfy

very low stretch-factors (less than 1.2)

• The reason Glance performs well is that MST performs significant aggregation– Using MST, the information from

two points e, q close to each other are bound to intermingle

– The probability that ancestors of e and q are always >1-hop away rapidly drops to zero due to aggregation in MST

Page 35: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

35

Stretch-factors

• Stretch-factor wrt increasing distance for 30x30 network

• For “300 > eCq > 60” dq is always less than d and stretch-factor is less than or equal to 1

• For small distances between e and q, aggregation in MST ensures that query-hops remain low

Page 36: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

36

Open research directions in WSN

• Distributed data structures for nearest-neighbor queries, range queries, especially for geometric networks

• Mobile WSN

MAC layer issues Adaptive networking algorithms (geometric networks)

• WSN-Internet integration

Genie project from NSF

• Programming frameworks for WSN

Page 37: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

37

Questions ?

• Distributed & local WSN algorithms

Tracking: local and fault-locally healing Querying: local and lightweight routing Spatial clustering, etc.

• Reliable communication in WSN

Consensus in WSN: Dependable applications Reliable broadcast at MAC layer: Solving hidden terminal problem Reliable transactions for mobile WSN: A programming framework for

concurrency-safe real-time control applications

• Specification-based design of self-healing

Scalability wrt code size: dependability preserving refinement of code

Page 38: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

www.cse.buffalo.edu/~demirbas iComp

Page 39: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

39

Overview of my research

• Distributed & local WSN algorithms

Tracking: local and fault-locally healing Querying: local and lightweight routing Spatial clustering, etc.

• Reliable communication in WSN

Consensus in WSN: Dependable applications Reliable broadcast at MAC layer: Solving hidden terminal problem Reliable transactions for mobile WSN: A programming framework for

concurrency-safe real-time control applications

• Specification-based design of self-healing

Scalability wrt code size: dependability preserving refinement of code

Page 40: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

40

Coordinated attack problem

• Two armies waiting to attack the city; they need to attack together to win

Each army coordinates with a messenger Messenger may be captured by the city

• Can generals reach agreement?

Agreement is impossible in the presence of unreliable channel

• Wireless communication is unreliable due to collisions !

Page 41: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

41

Collision awareness

Necessary for coping with undetectable message loss Receiver side monitoring and notification of collisions No info wrt # of lost messages or identities of senders

• Completeness: Ability to detect collisions

Majority-complete: a collision is detected if a majority of messages in a round is lost

0-complete: collision is detected if all messages in a round is lost

• Accuracy: No false positives Always and eventually accurate CD

• Receiver side collision detection is easily implementable in mote and 802.11 platforms

Page 42: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

42

Vote-Veto algorithm

• Two phases: vote and veto

• The algorithm is adaptive, employs active-passive service

• Vote phase:

Every active node sends out its vote If a node hears no collision, the node updates its vote to min of received votes If a node hears collision or different votes, it decides to veto

• Veto phase:

If no veto messages are received or collisions detected, then a node can decide, else nodes continue to next round

• Intuition: By having a dedicated veto phase, effects of collision is detectable

Chockler, Demirbas, Gilbert, Newport PODC 2005

Page 43: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

43

Proof (for majority-complete CD)

Let r be the first round any node decides

Since no node vetoed in r, every node heard only a single vote and no collision during vote phase in r

Since maj-◊AC detects when ≥ half the messages are lost, each node received a majority of messages broadcasted in vote phase in r

Since every majority set intersects, every node received the same unique vote

Page 44: Scalable Tracking & Querying for Wireless Sensor Networks Murat Demirbas SUNY Buffalo CSE Dept

44

Rumor routing

• Deliver packets to events

query/configure/command No global coordinate system

• Algorithm:

Event sends out agents which leave trails for routing info

Agents do random walk If an agent crosses a path to

another event, a path is established Agent also optimizes paths if they

find shorter ones

Braginsky, Estrin WSNA 2002