340 likes | 477 Views
Constraint Networks for the Synthesis of Networked Applications. Lambert Meertens Stephen Fitzpatrick Yunmei Wei http://consona.kestrel.edu/ NEST PI Meeting Charleston, SC, 28 June – 1 July 2004. Lambert Meertens Cordell Green Kestrel Institute. Summary.
E N D
Constraint Networks for the Synthesisof Networked Applications Lambert Meertens Stephen Fitzpatrick Yunmei Wei http://consona.kestrel.edu/ NEST PI Meeting Charleston, SC, 28 June–1 July 2004 Lambert Meertens Cordell Green Kestrel Institute
Summary • Three localization methods considered for ExScale 2004: I. a fairly sophisticated one, requiring ranging data II. 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
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
Common Assumptions of the Methods • Flat 2D terrain, no obstructions, immobile nodes • Localization means: participating nodes determine their positions (x, y) 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
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’
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
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 2004 available from www.kestrel.edu/home/publications.html
Summary of Ranging-based Method • Use acoustic ranging service to determine distance from each node to some nearby nodes • Exchange distance information with neighbors • Use ranges to compute a local map for each node independently (“initial map construction”) • 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
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
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! ? B A ?
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 B A !
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)
Dealing with Collinearity: New Rules Three new rules: • Just two distinct points may be used as map starter if no good triangle can be found • A node may be added to a map under construction if it forms a nice collinearity with two nodes already on the map • 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.
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
2R R Estimating Ranging Time • 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 • For the standard disk model with radius R, beacons cannot interfere if they are at least 2R apart
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” a, so the average time between two activations is 1/a 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 4pR2, and of those the expected number that will activate in any time slot is 4pR2a— which is the expectation of a Poisson process • The probability of interference-free activation is then afree= a exp{-4pR2a}
Estimating Ranging Time (ctd. 2) • Maximize afree: if dafree/da= 0, a = 1/(4pR2) and afree= a/e= 1/(4pR2 e) • If R= 20.25m/9m = 2.25, we find for the average time between interference-free activations 1/afree= 172.9 time slots • The probability of at least one interference-free activation in a period of T time slots is 1 - (1-afree)T • 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.
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
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
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
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
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
Algorithm Summary • 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 Transmitter’s region Transmission distanceImpossible locations of recipient Recipient’s current region Recipient’s new region
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
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
III. Averaging of Neighbor Positions • Each node exchanges position information with its neighbors • Each non-anchor node computes its estimated position as the average of its neighbors’ positions • 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
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
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
Quantifying the Threat to Connectivity Experimentally (simulation) • Assumptions • range is 20.25m (standard disk model) • node-failure probabilityf = 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
Quantifying the Threat (ctd.) Analytically • Assumptions • range is 20.25m (standard disk model) • uniform node-failure probabilityf > 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 (n+1)) (1Df (n)) 1 f2 + O( f 3) • From this we find this approximation (for small f) Df (n) 1 exp{nf2} which is consistent with the simulation results
Quantifying the Threat (ctd. 2) Analytically • Assumptions • fuzzy disk model: varying edge-failure probability (with 50% at 18m) • uniform node-failure probabilityf > 0 • Using a Markov process as before, we find (1Df (n+1)) (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 100% 50% edge-failure probability 0% 5m 10m 15m 20m 25m
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 iff=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
Project Plans • Further interaction with the Extreme Scaling demo • investigate effective localization methods