Node Localization in Wireless Sensor Networks Radu Stoleru Computer Science University of Virginia Motivation Sensor Radio link Sensor Sensor Sensor Credits: OTB News 2 Motivation Credits: Matt Welsh (Harvard) 3 Motivation Credits: www.visitingdc.com 4 Enabling Technology? Processor Mica Dot Mica2 RAM ETag ATmega128, 8-bit, Telos 16MHz 4KB Program Memory 128KB External Flash Memory 512KB Radio Transceiver (60kbps, 250kbps) Lifetime (2AA, no dutycycle) Mica Mote Operating Environment Untethered, Harsh Pluto ~6 days EmberNet DSYS25 BT Node XYZ 5 Existing WSN Applications Military (VigilNet, Virginia) Volcano Monitoring (Harvard) Structural Monitoring (Berkeley) Credits: OTB News, www.visitingdc.com. Matt Welsh (Harward) 6 How to Localize Nodes? ► Why node localization is a Hard problem? Outdoor GPS Expensive, Precise Range-Based absolute distance/angle estimates WiFi Hotspots Cheap, Inaccurate Range-Free use only connectivity and proximity 7 Let’s Compare Solutions Low Cost AdHoc Long Range Low Power High Accuracy Fast Ideal + + + + + + Range Free + + +/- + - + Ultrasound - + - - + + WiFi - - +/- - - + GPS - + + - + + 8 Contributions Outline ► Node Localization in WSN Event-Based Localization ► Asymmetric Architecture Image-Based Passive Localization ► Asymmetric Architecture Implementations, Real Evaluations Robust Localization Framework Proximity to Deployment Area, Deployment Knowledge ► Integrated WSN Systems ► Programming Abstractions Spotlight (SenSys ’05) StarDust (SenSys ’06) They work too! EmNetS ‘07 SECON ’04, EmNetS ‘04 Mobisys ‘04, RTAS ‘05, INFOCOM ‘06, TOSN ‘06 ICDCS ‘04 9 Spotlight 10 Concept of Operation (X1, Y1, R1) at T1 (X2, Y2, R2) at T2 (X2, Y2, R2) (X1, Y1, R1) 11 Questions ► How to efficiently distribute events in the network? (trade-off: energy spent for event creation vs. accuracy) ► How to deal with sensing channel noise? ► How to deal with unrecoverable errors in the sensing channel? Can we do better than loosing everything? ► What is the range of the system? ► How long does it take to localize a network? 12 System Architecture Spotlight Device Sensor Node i e(t) Event Distribution Function E(t) Event Detection Function D(e) Generates Events Timestamp Events Report Timestamps Compute Location Ti = { ti1 ti2 ….} pi(x,y,z) Localization Function L(T) Disseminate Location Asymmetric Architecture Event Distribution Function (EDF): the core of Spotlight We propose 3 Functions 13 Point Scan EDF Light Spot 0 Sensor s L E(t ) p | p [0, L] p t * s LTi ti1 E(ti1 ) ti1 * s 14 Line Scan EDF E(t ) Ex (t ) Ey (t ) LTi {ti1, ti 2} E(ti1 ) E(ti 2 ) 15 Area Cover EDF Event Detection Errors? 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 E(t ) p | p Sk BIT(k , t ) 1 LTi p | p COG(Sk ) ( BIT(k , t ) trueif t Ti ) ( BIT(k , t ) false if t T Ti ) 16 Area Cover EDF Event Detection Errors? Use ECC, e.g. Hamming(7,4) dddpdpp Does the code placement matter? What if we can not even detect an error? 17 Area Cover EDF min d E (i, j ) d H ( i , j ) K Code placement strategies d E (i, j ) Euclidian distancebetween i and j d H (i, j ) Hammingdistancebetween i and j Code placement, No ECC, 1-bit error Code placement, with ECC, 3-bit error 18 Design Analysis ► Execution Cost assuming: All nodes in a square area, with length D N events / unit time generated by the Spotlight device r is tolerable localization error Criterion Point Scan Line Scan Area Cover Localization Time (D2/r2)/N (2D/r)/N logrD/N # Detections 1 2 logrD # Time Stamps 1 2 logrD Event Overhead D2 2D2 D2logrD/2 r2 N DrN Spotlight Power D2 N / 2 19 Implementation ► ► mSpotlight System Spotlight Device: Projector Laptop ► Mica2 motes ► Short range (10-20m) ► Versatile, it generates: Point Scan Line Scan Area Cover 20 Implementation ► Spotlight System ► Spotlight Device: Telescope Mount Diode Laser Laptop ► XSM motes ► Long range (>1000m) ► It generates: Point Scan Line Scan 21 mSpotlight - Point Scan EDF 14 87cm/sec Location error [cm] 12 58cm/sec 10 43cm/sec 8 35cm/sec 6 4 2 0 7.0 10.5 14.0 17.5 21.0 24.5 Event Size [cm] Localization Duration [sec] 120 87cm/sec 100 58cm/sec 43cm/sec 80 35cm/sec 60 40 20 0 7.0 10.5 14.0 17.5 21.0 24.5 Event Size [cm] 22 mSpotlight - Area Cover EDF 3.5 Location error [cm] 3.0 20ms/event 40ms/event 80ms/event 100ms/event 60ms/event 2.5 2.0 1.5 1.0 0.5 0.0 6 8 10 12 Localization Duration [sec] Number of Bits 10 9 8 7 6 5 4 3 2 1 0 20ms/event 40ms/event 80ms/event 100ms/event 6 60ms/event 8 10 12 Number of Bits 24 Spotlight - Point Scan EDF Localization Error [cm] 25 0.7m/sec 20 1.4m/sec 3m/sec 15 10 5 0 6 12 18 Event Size [cm] Localization of an area 100x40 m2 Localization Time [min] 40 3m/sec 35 6m/sec 30 9m/sec 25 20 15 10 5 0 0 25 50 75 100 125 150 Event Size [cm] 25 Comparison Low Cost AdHoc Long Range Low Power High Accuracy Fast Ideal + + + + + + Spotlight + + + + + +/- Range Free + + +/- + - + Ultrasound - + - - + + WiFi - - +/- - - + GPS - + + - + + 26 StarDust 27 Corner-Cube Retroreflector ►Problem: Sensor Nodes have limited power supply. Hence, impossible to shine like a star. 28 Concept of Operation ID ? ID ? ID ? ID ? ID ? ID ? ID ? We need to match node IDs to locations! 29 System Architecture Central Device Node ID Matching R V’ V’ Sensor Node i Image Processing Φ(Ψ(λ)) Ψ(λ) Transfer Function Φi(λ) Light Emitter Radio Model G(Λ,E) Asymmetric Architecture 1. 2. 3. Take two pictures, one without light and one with light Image Processing to identify the positions of the light-spots Label relaxation algorithm to associate the positions with node 30 Image Processing A football stadium where we deploy 6 sensor nodes in a 3x2 grid. The distance between the lighting device and the sensor nodes is approximately 500ft. ► Deployment area Without illumination With illumination 31 Image Processing Difference Edge Detection ► Each pixel P is described by an RGB Value The light reflected back by CCR has highest intensity. ► Edge Detection is applied to identify the location of light spot ► 32 System Architecture Central Device Node ID Matching V’ Sensor Node i Image Processing Φ(Ψ(λ)) Transfer Function Φi(λ) R matching ID turnsΨ(λ)out to be a V’ very difficult problem! Light Emitter Radio Model V’ G’(V’,E’) G(Λ,E) Isomorphism G(L,E) 33 Mapping: Positions ↔ Nodes ►Idea I: Use constraints Color constraints Connectivity constraints Spatial Deployment constraints Temporal constraints ►Idea II: Combine different constraints ►Idea III: Label relaxation algorithm 34 Color Constraints ► Use color to map positions to nodes. ► Two extreme Cases Each node has different CCR color (unique mapping). Only one color available (no constraints) 35 Connectivity Constraints ► A pair of nodes must be located near each ? other if they can communicate with each other. 36 Connectivity Constraints Radio Model: N nodes in square of size L; k = # unidirectional radio connections; R = radio range L R(k ) N 2 k k 0.66 0.6 0.051 4N 4N 60 Connected N = 26 K = 180 Not Connected 40 R = 25ft Count L = 60ft 50 30 20 10 0 0 10 20 30 40 50 60 70 80 90 Distance [feet] 37 Spatial Deployment Constraints ► Drop sensor nodes at different locations Wind affects the size of landing area x-y displacement follows Rayleigh distribution A A B B Landing area Unique Mapping Probabilistic Mapping 38 Time Constraints ►Drop sensor nodes at different times ►Two extreme cases Drop one by one. Take a picture after each drop. Drop all at the same time. No constraints. Picture N Picture N+1 Picture N+2 39 Mapping: Positions ↔ Nodes ►Idea I: Use constraints Color constraints Connectivity constraints Spatial Deployment constraints Temporal constraints ►Idea II: Combine different constraints ►Idea III: Label relaxation algorithm 40 Hybrid constraints? ► Color & Connectivity: Introduction of the label relaxation algorithm Pni (k ) 0.25 ni 11 ni nj 12 12 0.32 0.2 11 9 8 0 0.2 4 0.25 1 11 10 12 0.25 8 9 0.25 7 0.25 5 0.25 3 0.0 10 10 0.25 12 8 8 0.25 nj 7 0.2 0.68 4 5 0.2 0 1 3 0.2 Qnsi (k ) Fact: ni is connected with nj Support 11 10 ni can not be 8 or 1 nj can not be 3 41 Label relaxation algorithm Pni (k ) denotes the probability node n has label λ i k Qns (k ) denotes the support for label λk of node ni i The label relaxation algorithm is iterative 1 s s P (k ) Pni (k )Qni (k ) Kni s 1 ni N K ni Pnsi (k )Qnsi (k ) k 1 K ni S s 1 P is a normalization factor to ensure ni (k ) 1 is the number of iterations 42 Example of Supports Connectivity constraint supports according to the link quality ( g number of packets k m n n received) ► i j M Q (k ) gk m P (m ) s ni m 1 s nj ►Time constraints supports ►Color constraint supports Q (k ) 1 s ni 0.25 11 12 12 0.2 9 0.2 7 0.2 5 0.2 3 0.2 8 0.25 8 10 0.25 4 0.25 1 11 10 Space constraints supports according to displacement distance Qnsi (k ) PDF (Dnik ) ► 43 Experiments ►Outdoor deployment of 26 nodes in a 120X60 ft2 area ►Investigate hybrid solution: connectivity and color constraints Credits: Shan Lin 44 Coloring Space Size Colors randomly assigned to nodes. Larger color space means dramatically improved performance 45 Color Uniqueness Colors randomly assigned to nodes It is better to assign one color to multiple nodes. 46 Localization Time Improved time (w.r.t. Color) Improved accuracy (w.r.t. Connectivity) Assume 50 colors available. 47 Error Tolerance Tolerate 10% false negatives, for double of localization error) False Negatives: influence of not identifying nodes in the picture 48 Connectivity 49 StarDust Summary ►Accuracy 5 feet error under 12 colors with 91% correctness in mapping ►Flexible framework Allows for novel constraints => higher accuracy ►Range 1500 ~4500 ft (clearness of the atmosphere) ►Time 52 seconds (our case) for color and connectivity. Milliseconds with unique colors. ►Cost less than $0.1 per node 50 Comparison Low Cost AdHoc Long Range Low Power High Accuracy Fast Ideal + + + + + + StarDust + + + + +/- + Spotlight + + + + + +/- Range Free + + +/- + - + Ultrasound - + - - + + WiFi - - +/- - - + GPS - + + - + + 51 Related Work ► ► Range-free: Centroid [Bulusu:02], Gradient(Nagpal:03), DVHop[Niculescu:03], APIT(He:03), Prob Grid(Stoleru:04), ELA(Vicaire:05), SerLoc (Laszos:05) Range-based: Cricket(Pryiantha:00), AhLoS(Savvides:00), RADAR(Bahl:00), SpotON(Hightower:00), Calamari(Whitehouse:02), DV-Distance[Niculescu:03], Robust Quads(Moore:04), Acoustic Range(Simon:04), MoteTrack(Lorincz:05), RIPS (Maroti:05), Local Angle(Bruck:05), LaSLAT (Taylor:06) 52 Conclusions ►Node localization has multi-dimensional requirements Challenge: How to meet requirements in realistic settings! Answer: Asymmetric Architecture ►High accuracy in multi-dimensional space: Spotlight Long effective range, reusable system (amortized cost) ►Fast localization in multi-dimensional space: StarDust Extensible framework, good accuracy ►Systems work too! Spotlight and StarDust System implementation and outdoor evaluation 53 Acknowledgments: Prof. John A. Stankovic (UVa) - advisor Tian He (U. Minnesota) Pascal A. Vicaire (UVa) Many more professors and colleagues at UVa and UIUC For more info: www.cs.virginia.edu/radu 54 Node Localization in Wireless Sensor Networks Radu Stoleru Computer Science University of Virginia