1 constraint networks for the synthesis of networked applications lambert meertens cordell green...

34
1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick Yunmei Wei http://consona.kestrel.edu/ NEST PI Meeting Charleston, SC, 28 June–1 July 2004

Upload: alexia-powell

Post on 29-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

1

Constraint Networks for the Synthesis

of Networked Applications

Lambert MeertensCordell GreenKestrel Institute

Lambert MeertensStephen Fitzpatrick

Yunmei Wei

http://consona.kestrel.edu/

NEST PI MeetingCharleston, SC, 28 June–1 July 2004

Page 2: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

7

Summary

• Three localization methods considered for ExScale 2004:I. a fairly sophisticated one, requiring ranging dataII. a fairly simple one, based on ‘possible regions’III. a very simple one: repeated averaging of neighbor

positions• Connectivity issues in proposed ExScale 2004

topology

Page 3: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

8

Localization Methods

• Three localization methods considered for ExScale 2004:I. a fairly sophisticated one, requiring ranging data:

• requires (acoustic) ranging• implemented in nesC• not immediately suitable for proposed ExScale topology (see later)• integration problems with VU ranging component (memory use)• takes up to 15 minutes to collect data• rms error < 1m given accurate anchor positions and ranging data

II. a fairly simple one, based on ‘possible regions’:• requires only radio communication but can work with any ranging• preliminary implementation in nesC• rms error ~ 8m inside convex hull of anchors with 50% radio fuzz• rms error ~ 2m with acoustic ranging

III. a very simple one: repeated averaging of neighbor positions:• requires only radio communication• almost trivial to implement• rms error ~ 8m well inside convex hull of anchors

Page 4: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

9

Common Assumptions of the Methods

• Flat 2D terrain, no obstructions, immobile nodes• Localization means: participating nodes determine their

positions xy in a common coordinate system• Scattered among the nodes are anchors that know their

positions in advance through an extraneous source• Nodes can communicate with (and restrict the

communication range to) say 10 to 20 neighbors • Network is connected• Localization phase is part of network initialization

Page 5: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

10

Proposed ExScal 2004 Topology

• Shown are first 2+ sections of in total 27 sections• Typical inter-node distance is 9m• Not shown: anchors (tier-two nodes)

360 m

‘danglinglegs’

Page 6: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

11

Topology-induced Problems

• Long segments with collinear anchors are hard to localize in the transverse direction:

or ?

• For the simple methods: nodes outside the convex hull of the anchor nodes are hard to localize– ‘dangling legs’ (thin vertical sections near asset) are hard for all

methods.• But . . . may still be useful when mission-relevant

metrics are considered

Page 7: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

12

I. Ranging-based Localization Method

Status• Localization service: common coordinate system

– implemented in nesC– nesC version tested on TinyOS simulator for up to 100 motes

• Major impediment: it seems that in the simulator, transmissions by any two motes interfere, regardless of separation: motes wait forever for clear-to-send

• Makes simulation for large numbers of motes virtually impossible– Java simulation for much larger numbers to obtain controllable

quantitative assessment• Detailed technical description in

Kestrel Institute Technical Report KES.U.04.04, March 2004available from www.kestrel.edu/home/publications.html

Page 8: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

13

Summary of Ranging-based Method

1. Use acoustic ranging service to determine distance from each node to some nearby nodes

2. Exchange distance information with neighbors3. Use ranges to compute a local map for each node

independently (“initial map construction”)4. Repeatedly exchange maps with neighbors to allow

nodes to reconcile and their own maps with their neighbors’ maps and patch them together

Problems:• Does not fit together with VU ranging component on

MICA2 mote (too much RAM required)• Does not work with collinear sets of neighbors (thin

stripes!) – but we have devised modifications to handle this

• Acoustic ranging is slow; several rounds needed

Page 9: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

Example: Thick XS Segment

Page 10: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

19

ExScal Topology Issue: Collinearity

• Problem: Our original algorithm requires– distances to at least three non-collinear nodes on a map

for adding a new node– a “common ground” of at least three non-collinear nodes

for reconciling two maps and patching them together– a “good” triangle of three non-collinear nodes as a

“starter” for map construction• The reason for the restriction is, of course, that in

general three non-collinear points are required to fix a constellation in Euclidean 2D space

• Thus, it cannot deal with a string of nodes on a straight line. With “casual deployment”, this is unlikely to be a problem. For the proposed ExScal 2004 topology, it is.

• Solution: Don’t worry about ambiguities if they aren’t

Page 11: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

20

Node Placement – Ambiguous Case

• Locations of A and B are known, as well as distances dCA and dCB. Where to place C?

• If dCA + dCB dAB there are two solutions: ambiguous!

A

B

?

?

Page 12: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

21

Node Placement – Unambiguous Case

• Locations of A and B are known, as well as distances dCA and dCB. Where to place C?

• If dCA + dCB dAB there is only one solution

A

B

!

Page 13: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

22

Dealing with Collinearity: Niceties

• Triangle inequality: dAC + dBC dAB AND dAB + dBC dAC AND dAB + dAC dBC

• “Good” triangle: dAC + dBC dAB AND dAB + dBC dAC AND dAB + dAC dBC

• “Nice” collinearity: dAC + dBC dAB OR dAB + dBC dAC OR dAB + dAC dBC

AND dAB 0 AND dAC 0 AND dBC 0

Page 14: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

23

Dealing with Collinearity: New Rules

Three new rules:

1. Just two distinct points may be used as map starter if no good triangle can be found

2. A node may be added to a map under construction if it forms a nice collinearity with two nodes already on the map

3. Two maps can be patched together if they have a “common ground” of at least two distinct points AND at least one of the two maps consists solely of a collinear set of points.

Page 15: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

24

Dealing with Collinearity: New Issue

• New issue: how to choose the tolerance for accepting a constellation as collinear

• If tolerance is chosen too small, the new rules are not likely to make much of a difference

• If tolerance is chosen too large, non-collinear constellations will erroneously be considered collinear

– may easily happen if placement errors and ranging errors conspire:

• Experimentation needed to determine best value —which depends on actual placement and ranging errors

Page 16: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

25

• Process: inter-node distance collection through acoustic ranging, with many “beacons” concurrently active

• Issue: two beacon nodes interfere when active at the same time while a third node is in range* of both — even when the beacons are not in range of each other

* In this context the larger of radio and acoustic range

Estimating Ranging Time

2R

R• For the standard disk model with radius R, beacons cannot interfere if they are at least 2R apart

Page 17: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

26

Estimating Ranging Time (ctd.)

• So assign different time slots to conflicting beacons — but to know if two nodes can interfere, we must know their positions, which we don’t (yet)

• Use random back-off method: beacons become active in a given time slot with “activation probability” , so the average time between two activations is 1 time slots

• Using a scale such that the node density equals 1, the average number of nodes that can interfere with a given beacon is R2, and of those the expected number that will activate in any time slot is R2 — which is the expectation of a Poisson process

• The probability of interference-free activation is then freeexpR2

Page 18: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

27

Estimating Ranging Time (ctd. 2)

• Maximize free: if dfreed , R2and

freeeR2 e

• If R 20.25m9m 2.25, we find for the average time between interference-free activations

free172.9 time slots

• The probability of at least one interference-free activation in a period of T time slots is

freeT

• To get this up to 0.99 for R 2.25 requires T to be at least 794.

• If one time slot takes a second, this amounts to

13 min. 14 sec.

Page 19: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

28

II. Localization usingMutually Constrained Regions

• Given estimates of anchors’ positions …–e.g., 3m disc from GPS

• And upper bounds on inter-mote distances …–e.g., if a mote receives a message, it is assumed to be within, say, 30 meters of the transmitter

• Use distributed fixed-point constraint propagation to compute estimates of every mote’s position–position estimate = region in 2- or 3-space–take the center of the region when a point-estimate is required

Page 20: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

29

Distributed Constraint Propagation Algorithm

• Each mote maintains a region containing its possible positions–initially GPS for anchors, infinite for non-anchors

• Each mote periodically broadcasts a message over a chosen distance–message contains the mote’s region and the chosen distance

• Each mote narrows its own region based on messages it receives–new region = old region (transmitter’s region dilated by broadcast range)

Transmitter’s region

Possible locations of recipient

Recipient’s current region

Recipient’s new region

Page 21: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

30

Algorithm Assessment

• Low costs–taking GPS uncertainty to be symmetric, then all regions are contiguous (and convex)•simple representation suffices

–e.g., region = axes-aligned rectangle or octagon – closed under intersection•simple to implement•cheap to communicate

–converges within ~40 rounds of communication–operates with little coordination

• in its theoretical form, the algorithm is confluent

• Status–variants implemented in Java simulation for exploration–simple version implemented in nesC code executing in TinyOS simulator•~100 LoC

Page 22: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

31

Results

• Gray dots = true positions• Black dots = anchors• Red dots = poor estimates

–20m error = max. red• Green dots = good estimates

–0 error = max. green• Red/green shading indicates

possible locations (regions)• A gray line joins an estimate to

the corresponding true position

• GPS uncertainty = 3m• Transmission fuzziness = 50%• Localization error = 8m rms

Page 23: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

32

Using Lower-Bounds on Inter-Mote Distances

• Lower-bounds on inter-mote distances can also be incorporated–a lower bound determines where a mote cannot be located–regions may become disconnected

•represent using sets of rectangles/octagons

• To determine a lower bound between an RF transmitter and a receiver:–transmitter broadcasts using some fixed sequence of increasing distances

–receiver records the lowest transmission distance at which it heard the transmitter

–receiver uses the next lowest distance as the lower bound on its distance to the transmitter

–can somewhat be extended to multi-hop communication

Page 24: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

33

Algorithm Summary

Transmitter’s region

Transmission distanceImpossible locations of recipient

Recipient’s current region

Recipient’s new region

• Lower bounds can be effectively used only when the transmitter’s region can be made small using other information (e.g., upper bounds)–if a transmitter’s region is large compared with the broadcast range then nothing can be inferred from the fact that the transmitter is not heard

Page 25: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

34

Assessment of Lower Bounds

• Using lower bounds significantly increases the costs–regions become non-contiguous–rectangles/octagons are not closed under exclusion: each mote needs to represent its region as a set of rectangles/octagons

–message lengths grow with the size of the set to be transmitted• For RF, it is not clear that lower bounds improve the

accuracy much–e.g., even with perfect control over RF transmission distances, cannot resolve the almost-symmetry in the thick line of the Extreme Scaling layout•good horizontal localization but poor vertical

Page 26: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

35

Lower & Upper Bounds for Acoustic Ranging

• Lower as well as upper bounds are useful for acoustic ranging–an acoustic range of R with error e is interpreted as lower bound R-e and upper bound R+e

–layout = random GPS error = 3m ranging error = 1m over 20m localization error = 4m rms

–layout = XS thick section GPS error = 3m ranging error = 1m over 35m localization error = 2m rms

Page 27: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

36

III. Averaging of Neighbor Positions

1. Each node exchanges position information with its neighbors

2. Each non-anchor node computes its estimated position as the average of its neighbors’ positions

3. Repeat until convergence, or patience exhausted

Works fairly well inside convex hull spanned by anchor nodes if the node distribution is more or less uniform

Page 28: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

37

Your Mileage May Vary

Actual performance depends on many factors, including• range of radio communication• consistency of that range between nodes• reliability of the characterization of the range• accuracy of anchor positions

Data on the actual XSMs and deployment topology is needed for a more detailed assessment

Page 29: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

38

ExScal Topology Issue: Connectivity

• Loss of connectivity or the occurrence of “fractures” in the mote network form a threat to accurate localization

• The probability of fracture in a network with bounded “communication” range* and of bounded girth, given independent node-failure probability f > 0, tends to 1 as the length tends to infinity (non-percolation)

* In this context the lesser of radio and acoustic range

girth

length

Page 30: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

39

Quantifying the Threat to Connectivity

Experimentally (simulation)• Assumptions

– range is 20.25m (standard disk model)– node-failure probability f = 0.02 (2%)

• The probability that the whole network of about 10,000 motes — insofar as they did not fail — consists of more than one component is about 0.12

• If the “dangling legs” near the asset are disregarded, that probability drops to about 0.006 — so almost all cases are due to leg fractures

• The probability of a local fracture in a single 20-mote thin line segment is about 0.07, and of such a fracture somewhere in the leg-less network is about 0.68

• With a “fuzzy disk” model we see dramatic increases

Page 31: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

40

Quantifying the Threat (ctd.)

Analytically• Assumptions

– range is 20.25m (standard disk model)– uniform node-failure probability f > 0

• We can use a four-state Markov process to analyze connectivity in straight-line networks of arbitrary size n.

• Let Df (n) denote the network-disconnection probability

• The eigenvalues of the transition matrix associated with the Markov process tell us that, as n , (1Df (n1)) (1Df (n)) 1 f 2 O( f 3)

• From this we find this approximation (for small f ) Df (n) 1 exp{nf 2}

which is consistent with the simulation results

Page 32: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

41

Quantifying the Threat (ctd. 2)

Analytically• Assumptions

– fuzzy disk model:

varying edge-failure

probability (with

50% at 18m)

– uniform node-failure probability f > 0

• Using a Markov process as before, we find (1Df (n1)) (1Df (n)) 1 ½ f O( f 2)

• From this we find this approximation (for small f ) Df (n) 1 exp{½nf }

which is consistent with the simulation result D0.02 (20) 0.15

edge

-fai

lure

pro

babi

lity 100%

0%

50%

5m 10m 20m15m 25m

Page 33: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

42

Quantifying the Threat (ctd. 3)

• Remark: the following observations were added in a late stage and should be further verified experimentally or analytically

• Under the same assumptions as on the previous slide, there is almost certainly no percolation in a square grid of nodes with 20m spacing, even if f = 0 !

• For the standard disk model as before and casual deployment with the same density of (on average) 1 node per 400m2, there is no percolation

• Percolation is achieved for twice that density, probably even for the fuzzy disk model, but only if the density is truly uniform (Poisson); not if the coverage is uneven, as it is likely to be under actual casual processes

Page 34: 1 Constraint Networks for the Synthesis of Networked Applications Lambert Meertens Cordell Green Kestrel Institute Lambert Meertens Stephen Fitzpatrick

43

Project Plans

• Further interaction with the Extreme Scaling demo– investigate effective localization methods