CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.

Slides:



Advertisements
Similar presentations
Christoph Lenzen Philipp Sommer Philipp Sommer Roger Wattenhofer Roger Wattenhofer Optimal Clock Synchronization in Networks.
Advertisements

The Flooding Time Synchronization Protocol
Gradient Clock Synchronization in Wireless Sensor Networks
HIERARCHY REFERENCING TIME SYNCHRONIZATION PROTOCOL Prepared by : Sunny Kr. Lohani, Roll – 16 Sem – 7, Dept. of Comp. Sc. & Engg.
Wireless Sensor Networks Clock Synchronization Professor Jack Stankovic University of Virginia.
Computer Networks Group Universität Paderborn Ad hoc and Sensor Networks Chapter 9: Localization & positioning Holger Karl.
Time and Clock Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Max-Min D-Cluster Formation in Wireless Ad Hoc Networks - Alan Amis, Ravi Prakash, Thai Vuong, Dung Huynh Presenter: Nirav Shah.
Christoph PODC 2009 Tight Bounds for Clock Synchronization Christoph Lenzen, Thomas Locher, and Roger Wattenhofer.
Computer Science 425 Distributed Systems CS 425 / ECE 428  2013, I. Gupta, K. Nahrtstedt, S. Mitra, N. Vaidya, M. T. Harandi, J. Hou.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Time Synchronization (RBS, Elson et al.) Presenter: Peter Sibley.
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Wireless Sensor Networks 16th Lecture Christian Schindelhauer.
Teaching material based on Distributed Systems: Concepts and Design, Edition 3, Addison-Wesley Copyright © George Coulouris, Jean Dollimore, Tim.
He Huang Introduction:The Flooding Time Synchronization Protocol.
Ad Hoc and Sensor Networks – Roger Wattenhofer –9/1Ad Hoc and Sensor Networks – Roger Wattenhofer – Clock Synchronization Chapter 8 TexPoint fonts used.
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Wireless Sensor Networks 15th Lecture Christian Schindelhauer.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Global Synchronization in Sensornets Jeremy Elson, Richard Karp, Christos Papadimitriou, Scott Shenker.
Time Synchronization Murat Demirbas SUNY Buffalo.
1 University of Freiburg Computer Networks and Telematics Prof. Christian Schindelhauer Wireless Sensor Networks 13th Lecture Christian Schindelhauer.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Fine-Grained Network Time Synchronization using Reference Broadcasts Jeremy Elson, Lewis Girod, and Deborah Estrin U.C.L.APresenter: Todd Fielder.
MAC Layer Protocols for Sensor Networks Leonardo Leiria Fernandes.
Lecture 9: Time & Clocks CDK4: Sections 11.1 – 11.4 CDK5: Sections 14.1 – 14.4 TVS: Sections 6.1 – 6.2 Topics: Synchronization Logical time (Lamport) Vector.
Lecture 2-1 CS 425/ECE 428 Distributed Systems Lecture 2 Time & Synchronization Reading: Klara Nahrstedt.
8/18/2015 Mobile Ad hoc Networks COE 549 Synchronization Tarek Sheltami KFUPM CCSE COE 1.
1 Physical Clocks need for time in distributed systems physical clocks and their problems synchronizing physical clocks u coordinated universal time (UTC)
Timing-sync Protocol for Sensor Networks (TPSN) Presenter: Ke Gao Instructor: Yingshu Li.
Energy-Aware Synchronization in Wireless Sensor Networks Yanos Saravanos Major Advisor: Dr. Robert Akl Department of Computer Science and Engineering.
Ted Herman/March Time, Synchronization, and Wireless Sensor Networks Part I Ted Herman University of Iowa.
Time of arrival(TOA) Prepared By Sushmita Pal Roll No Dept.-CSE,4 th year.
Adaptive Control-Based Clock Synchronization in Wireless Sensor Networks Kasım Sinan YILDIRIM *, Ruggero CARLI +, Luca SCHENATO + * Department of Computer.
Ad Hoc and Sensor Networks – Roger Wattenhofer –9/1Ad Hoc and Sensor Networks – Roger Wattenhofer – Time Synchronization Chapter 9 TexPoint fonts used.
On-Demand Traffic-Embedded Clock Synchronization for Wireless Sensor Networks Sang Hoon Lee.
Power Save Mechanisms for Multi-Hop Wireless Networks Matthew J. Miller and Nitin H. Vaidya University of Illinois at Urbana-Champaign BROADNETS October.
Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri.
1 Clock Synchronization for Wireless Sensor Networks: A Survey Bharath Sundararaman, Ugo Buy, and Ajay D. Kshemkalyani Department of Computer Science University.
Outline for Today Objectives: –Time and Timers Administrative details: –Talk on learning at 4 in 130 North Building –Questions?
A Passive Approach to Sensor Network Localization Rahul Biswas and Sebastian Thrun International Conference on Intelligent Robots and Systems 2004 Presented.
CS 546: Intelligent Embedded Systems Gaurav S. Sukhatme Robotic Embedded Systems Lab Center for Robotics and Embedded Systems Computer Science Department.
Time synchronization for UWSN. Outline Time synchronization knowledge Typical time sync protocol Time sync in UWSN Discussion.
11/25/2015 Wireless Sensor Networks COE 499 Localization Tarek Sheltami KFUPM CCSE COE 1.
Fasika Assegei Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.
Computer Science 1 TinySeRSync: Secure and Resilient Time Synchronization in Wireless Sensor Networks Speaker: Sangwon Hyun Acknowledgement: Slides were.
Fine-Grained Network Time Synchronization using Reference Broadcasts Jeremy Elson, Lew Girod, and Deborah Estrin OSDI Boston, MA Speaker : hsiwei-Chen.
Time This powerpoint presentation has been adapted from: 1) sApr20.ppt.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Time Synchronization Protocols in Wireless Sensor Networks.
Content caching and scheduling in wireless networks with elastic and inelastic traffic Group-VI 09CS CS CS30020 Performance Modelling in Computer.
UNIT IV INFRASTRUCTURE ESTABLISHMENT. INTRODUCTION When a sensor network is first activated, various tasks must be performed to establish the necessary.
SERENA: SchEduling RoutEr Nodes Activity in wireless ad hoc and sensor networks Pascale Minet and Saoucene Mahfoudh INRIA, Rocquencourt Le Chesnay.
Ad Hoc and Sensor Networks – Roger Wattenhofer –9/1– Clock Synchronization TexPoint fonts used in EMF. Read the TexPoint manual before you delete this.
Distributed Systems Lecture 5 Time and synchronization 1.
Distributed Computing
Wireless Sensor Network Architectures
Net 435: Wireless sensor network (WSN)
Clock Synchronization
Logical time (Lamport)
Wireless Mesh Networks
CDK: Sections 11.1 – 11.4 TVS: Sections 6.1 – 6.2
Logical time (Lamport)
Logical time (Lamport)
Overview: Chapter 4 Infrastructure Establishment
Logical time (Lamport)
Presentation transcript:

CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch

Discrete Algs for Mobile Wireless Sys2 Lecture 6  Topics: Time Synchronization  Sources: Elson et al. paper Karp et al. paper MIT Fall 2008 slides

Discrete Algs for Mobile Wireless Sys3 Clock Synchronization  Nodes have individual clocks  Synchronizing the time on the various clocks is essential for many applications Coordination of wake-up and sleeping times (energy efficiency) TDMA schedules Ordering of collected sensor data/events Co-operation of multiple sensor nodes (e.g. object tracking) Estimation of position information

Discrete Algs for Mobile Wireless Sys4 The Clock Synchronization Problem  Every node has a local (hardware) clock  Logical clock is some function of the hardware clock add some computed value to hardware clock  Goal: Compute local logical clocks to Compensate for offset or skew between clocks: values are not the same Compensate for drift between clocks: rates are not the same

Discrete Algs for Mobile Wireless Sys5 Clock Synchronization Algorithm  Distributed algorithm that computes logical local clock for every node  Logical clocks should be as close together as possible  Logical clocks should also run at approximately the same rate as the hardware clocks Don't keep them always synchronized to time 0

Discrete Algs for Mobile Wireless Sys6 External vs. Internal Synchronization  External synchronization: Nodes synchronize with an external clock source Ex: GPS  Internal synchronization: Nodes synchronize to a common time within themselves to a leader, to an averaged time, or to anything else

Discrete Algs for Mobile Wireless Sys7 Other Types of Clock Synchronization  One-shot versus periodic synchronization Periodic synchronization required to compensate for clock drift  A-priori versus a-posteriori A-posteriori clock synchronization triggered by an event  Local versus global synchronization

Discrete Algs for Mobile Wireless Sys8 Clock Sources  Radio Clock Signal: Clock signal from a reference source (atomic clock) is transmitted over a longwave radio signal WWVB station in Colorado transmits at 60 kHz, can be received all over US Accuracy limited by the distance to the sender Special antenna/receiver hardware required

Discrete Algs for Mobile Wireless Sys9 Clock Sources  Global Positioning System (GPS): Satellites continuously transmit own position and time code Line of sight between satellite and receiver required Special antenna/receiver hardware required Accuracy: a few 100 ns

Discrete Algs for Mobile Wireless Sys10 Clock Devices in Sensor Nodes  Structure External oscillator with a nominal frequency (e.g. 32 kHz) Counter register which is incremented with oscillator pulses Works also when CPU is in sleep state Oscillator

Discrete Algs for Mobile Wireless Sys11 Clock Devices in Sensor Nodes  Accuracy Clock drift: random deviation from the nominal rate dependent on power supply, temperature, etc. E.g. TinyNodes have a maximum drift of ppm at room temp. temperature This is a drift of up to 50 μs per second or 0.18s per hour

Discrete Algs for Mobile Wireless Sys12 GPS?  What if all nodes had a GPS receiver? High accuracy Nodes would even get position information for free…  Problems: GPS needs unobstructed access to satellite (e.g., GPS does not work indoors) Too complex hardware, too expensive for small, simple wireless (sensor) devices

Discrete Algs for Mobile Wireless Sys13 Time Synchronization in the Internet with NTP Several levels of time servers Servers on same level coordinate among themselves and with servers on adjacent levels Round-trip time used to get estimate on latency Heuristic method to best compute time estimate based on different estimates Jitter buffer to account for variance in message delays Clients connect to NTP server(s) Accuracy at clients highly dependent on symmetry of message delay between client and server (typical: 1 – 30 ms) Figure: Wikipedia

Discrete Algs for Mobile Wireless Sys14 Su, Akyildiz Time-Diffusion  Practical paper, does not give theoretical guarantees  Uses similar ideas as NTP but adapted to wireless scenario: Multi-hop network (topology cannot be “chosen”) Dynamic, possibly mobile network Nodes might fail often Energy constraints (e.g., need load balancing) Should be a more symmetric protocol

Discrete Algs for Mobile Wireless Sys15 Su, Akyildiz Time-Diffusion  Two cases: With / without outside sources of time.  With: Outside sources tell the time to some special “master” nodes, who diffuse it through the network.  Without: Master nodes broadcast their timing info to their neighbors, who continue the time diffusion.

Discrete Algs for Mobile Wireless Sys16 Su, Akyildiz Time-Diffusion  Load Balancing / Fault Tolerance: Master nodes are elected by random decisions Frequent reelection of master nodes  Time information is propagated in an “ad-hoc” way through the network  Nodes adjacent to master/leader nodes may be chosen as leader nodes to further diffuse the info  Use statistical heuristics to compute time estimates based on info of neighbors (cf. NTP)  Also uses jitter buffers to compensate for varying msg. delays

Discrete Algs for Mobile Wireless Sys17 Sender/Receiver Synchronization  Roundtrip-Based Synchronization  Message delays: d 1, d 2 unknown to A and B  Clock offset (B – A): t 2 – (t 1 + d 1 ) = t 3 – (t 4 – d 2 )  Average the two expressions and rearrange terms to get (t 2 – t 1 + t 3 – t 4 )/2 + (d 2 – d 1 )/2  Approximating it with (t 2 – t 1 + t 3 – t 4 )/2 gives an estimate of B – A whose error is half the difference in the delays d1d1 d2d2

Discrete Algs for Mobile Wireless Sys18 Influences on Packet Latency –Sending Time S (up to 100ms) –Medium Access Time A(up to 500ms) –Transmission Time T(tens of ms, depending on size) –Propagation Time P A,B (  s, depending on distance) –Reception Time R(up to 100ms) Asymmetric packet delays due to non-determinism Solution: timestamp packets at MAC layer S A T R P A,B Critical path Timestamp T A Timestamp T B

Discrete Algs for Mobile Wireless Sys19 Reference Broadcast Synchronization (RBS) [Elson,Girod,Estrin]  Observation: sender side delay > receiver side delay  Also much higher variability on sender side (needs to wait for free channel)  Exploit local broadcast nature of wireless communication  Each signal simultaneously received by many nodes  Synchronize between receivers of the same message (instead of between sender and receiver)  Large part of delay is the same for all receivers

Discrete Algs for Mobile Wireless Sys20 Reference Broadcast Synchronization A sender synchronizes a set of receivers with one another Point of reference: beacon’s arrival time Only sensitive to the difference in propagation and reception time Time stamping at the interrupt time when a beacon is received After a beacon is sent, all receivers exchange their reception times to calculate their clock offset A BS

Discrete Algs for Mobile Wireless Sys21 RBS Extensions  Idea can be used to synchronize over many hops  Synchronization can be improved by doing several broadcasts.  Clock Drift: Paper assumes that each local clock runs at a fixed rate (rates of different clocks can be different)  Uses least-squares linear regression to cope with clock drift  Experiments of Elson et al. indicate that the variation in receive time roughly follows a Gaussian distribution

Discrete Algs for Mobile Wireless Sys22 RBS: Discussion  RBS gives method to synchronize between two receivers of the same message  Synchronization by nodes without common neighbor done by considering path of receiver-pairs  Skew proportional to length of path  Method does not give globally consistent estimates of pair- wise clock offsets L j (t)  L i (t)*a i,j + b i,j and L k (t)  L j (t)*a j,k + b j,k and L k (t)  L i (t)*a i,k + b i,k but a i,j *a j,k ≠ a i,k and b i,j *a j,k + b j,k ≠ b i,k  Pairwise synchronizations are not optimally precise (do not have minimal variance from the truth)

Discrete Algs for Mobile Wireless Sys23 Global Synchronization of Sensornets [Karp, Elson,Papadimitriou,Shenker]  Tries to exploit full potential of reference broadcasts, ensure globally consistent pairwise translations and optimal precision  Model: No clock drift (only clock offsets) Given: set of receiver-broadcast pairs (r i, s k ) (r i : receiver node, s k : signal) Offset of clock of node r i : T i (offset w.r.t. universal time) Signal s k sent at real time U k, received by r i at clock time y i,k = U k + T i + e i,k The e i,k are independent random variables with zero mean and variance V i,k  Goal: Find best globally consistent estimate of offsets T i

Discrete Algs for Mobile Wireless Sys24 Two Problems  To find the optimal (minimum-variance) pairwise synchronization between nodes i and j, find the minimum-variance estimate of T j – T i. Can be posed as a flow problem  To produce a globally consistent synchronization, esimate all the T i 's independently and find a maximum likelihood joint choice of all the T i 's. Can be reduced to a linear system of least-squares equations  These two problems have the same solution!

Discrete Algs for Mobile Wireless Sys25 Minimum Variance Pairwise Synchronization  Goal: Estimate T 1 – T 2. Use differences in receive times of signals  Consider signal s k received by r 1 and r 2. Estimate T 1 – T 2 with y 1,k – y 2,k = (T 1 – T 2 ) + (e 1,k – e 2,k ) r1r1 r2r2 sksk

Discrete Algs for Mobile Wireless Sys26 Minimum Variance Pairwise Synchronization  Consider signal s k1 received by r 1 and r i, and signal s k2 received by r i and r 2. Since T 1 – T 2 = (T 1 – T i ) + (T i – T 2 ), estimate T 1 – T 2 with y 1,k1 – y i,k1 + y i,k2 – y 2,k2 = (T 1 – T 2 ) + (e 1,k1 – e 2,k1 ) + (e i,k2 – e 2,k2 ) r1r1 riri s k1 r2r2 s k2

Discrete Algs for Mobile Wireless Sys27 Minimum Variance Pairwise Synchronization  Similarly, if you have an arbitrary length chain of alternating receivers and signals, the error is the expression given at top of p. 5 of paper.  Since each e i,k has zero mean, this estimator is unbiased.  By considering all possible paths between a pair of receivers, and weighting them appropriately, we get an estimator with much lower variance than any single path can provide.  This approach is pursued using flow theory on a corresponding resistor network  Show that the minimum variance estimators for pairs are globally consistent.

Discrete Algs for Mobile Wireless Sys28 Maximum Likelihood Offset Assignment  Find the maximally likely set of offset assignments T i Will be globally consistent, but why should they be minimum variance?  Assume y i,k 's (local clock time when r i receives signal s k ) are independent Gaussian random variables with mean U k + T i and variance V i,k  Show the joint probability density of the y i,k 's is an expression involving the U k 's and T i 's  Derive a system of linear equations for the T i 's that maximize this joint probability density  Show that a solution to the linear system is obtained when T i is set equal to the value from the resistor network formulation

Discrete Algs for Mobile Wireless Sys29 Computing the Estimators  Set up and solve system of linear equations for quantities in the resistive network corresponding to the minimum variance estimators OR  Use a new approximation algorithm based on minimum-cost flow presented in the paper

Discrete Algs for Mobile Wireless Sys30 Use in Practice?  Estimator for two nodes at distance L in infinite grid has variance O(log L), exponential improvement over RBS, which uses only one path and thus has variance O(L)  An efficient PTAS for computing the effective resistance is given by the paper.  Not clear whether this can be made distributed  Cost seems to be rather high