Distributed Time Synchronization over Multihop Wireless Sensor Networks
Distributed Time Synchronization over Multihop Wireless Sensor Networks Lei Rao October 29 th, 2008 Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 1
Acknowledgement Ø This presentation Ø Mainly based on the ICDC’ 06 paper by Roberto Solis and his partners from UIUC Ø Partially based on the ICDC’ 06 paper by Arvind Giridarha and his partners from UIUC Ø Partially based on materials by Sensor Web Mu. RI Review Meeting by P. R. Kumar from UIUC Ø Partially based on materials by Andreas Willig from Technical University Berlin Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 2
Outline of The Presentation Ø Time Synchronization Problems and Motivations Ø Related Works Ø Distributed Time Synchronization Ø Conclusions Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 3
An Example Ø Goal: estimate angle of arrival of a very distant sound event using an array of acoustic sensors Ø From the figure, q can be estimated when x and d are known: Ø d is known a priori, x must be estimated from differences in time of arrival Ø x = C Dt where C is the speed of sound Ø For d=1 m and Dt=0. 001 we get q = 0. 336 radians Ø When Dt is estimated with 500 ms error, the q estimates can vary between 0. 166 and 0. 518 Ø Morale: a seemingly small error in time synch can lead to significantly different angle estimates Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 4
Motivations Ø Time synchronization algorithms can be used to better synchronize clocks of sensor nodes Ø Time synchronization is needed for WSN applications and protocols: Ø Applications: AOA estimation, beamforming Ø Protocols: TDMA, protocols with coordinated wakeup, . . . Ø Distributed debugging: timestamping of distributed events is needed to figure out their correct order of appearance Ø WSN have a direct coupling to the physical world, hence their notion of time should be related to physical time: Ø physical time = wall clock time, real-time, i. e. one second of a WSN clock should be close to one second of real time Ø Commonly agreed time scale for real time is UTC, generated from atomic clocks and modified by insertion of leap seconds to keep in synch with astronomical timescales (one rotation of earth) Ø Other concept: logical time (Lamport), where only the relative ordering of events counts but not their relation to real time Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 5
General Properties of Time Synchronization Algorithms Ø Physical time vs. logical time Ø Global vs. local algorithms Ø Keep all nodes of a WSN synchronized or only a local neighbourhood? Ø Absolute vs. relative time Ø Hardware vs. software-based mechanisms Ø A GPS receiver would be a hardware solution, but often too heavyweight/costly/energy-consuming in WSN nodes, and in addition a line-of-sight to at least four satellites is required Ø A-priori vs. a-posteriori synchronization Ø Is time synchronization achieved before or after an interesting event? Post-facto synchronization Ø Deterministic vs. stochastic precision bounds Ø Local clock update discipline Ø Should backward jumps of local clocks be avoided? (Users of make say yes here. . ) Ø Avoid sudden jumps? Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 6
Constraints for Time Synchronization in Wireless Sensor Networks Ø An algorithm should scale to large networks of unreliable nodes Ø Quite diverse precision requirements, from ms to tens of seconds Ø Use of extra hardware (like GPS receivers) is mostly not an option Ø low mobility Ø Often there are no fixed upper bounds on packet delivery times (due to MAC delays, buffering, . . . ) Ø Negligible propagation delay between neighboring nodes Ø Manual node configuration is not an option Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 7
Outline of The Presentation Ø Time Synchronization Problems and Motivations Ø Related Works Ø Distributed Time Synchronization Ø Conclusions Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 8
Related Works Ø Many algorithms have been proposed for solving time synchronization problems. Ø K. Romer (2001) To generate time stamps using unsynchronized local clocks Ø Scott Graham and P. R. Kumar (2004) A time translation protocol Ø M. Sichitiu and C. Veerarittiphan (2003) Clock drift between nodes is assumed to be linear, and nodes exchange timestamps to estimate the best fit Ø S. Adlakha S. Ganeriwal and etc. (2003) A hierarchical tree topology of the network is used Ø J. Elson and K. Romer (2003) Reference Broadcast Synchronization Ø Miklos Maroti Gyula Simon and etc. (2004) Flooding Time Synchronization Protocol is proposed Ø R. Karp J. Elson and etc. (2003) J. Elson L. Girod and etc. (2002) Reference Broadcast Synchronization (RBS) Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 9
Outline of The Presentation Ø Time Synchronization Problems and Motivations Ø Related Works Ø Distributed Time Synchronization Ø Conclusions Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 10
Bilateral Clock Synchronization Ø Synchronization between two neighbors Ø Linear clock model tremote skew offset 0 tlocal Ø Propagation delay from i to j = di tremote tlocal Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca Sent t Received 11
An Impossibility Result Ø Theorem: Ø It is impossible to determine through any packet exchanges the six unknown parameters - d 1, d 2 - Offset 0 d 1 - Skew d 2 Ø Consequence - Cannot estimate all four parameters if delays in two directions are asymmetric - Solution: Assume that delays in both directions are symmetric Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 12
Estimating Skew, Latency and Offset t 1 A t 2 A t 3 A A’s time A B B’s time t 1 B t 2 B t 3 B Skew Transmission Delay The difference between the received and transmitted timestamps at node j and node i Offset Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca Ø Use recursive least squares for parameter updating Ø Issues - Ill conditioning - Reparametrization - Instead of ( , offset at time 0) use ( , offset now) - Combination of windowing and exponential forgetting 13
Multi-hop Time Synchronization Ø Suppose that there are n nodes all having clocks running at exactly the same speed, except that they have different offsets Ø With node 1 chosen as the reference, let zi denote the amount that node i’s clock is ahead of node 1 ti(t) = t 1(t) + zi Ø Problem: We want to obtain estimates vi = ˆzi of the offsets with respect to the reference node for all node i in the network Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 14
An improvement: Spatial smoothing Ø How to solve the problem? Ø Use constraints 1 Ø Sum of offsets along any loop is zero Each node i has a clock ci(t), where t represents the reference time variable 2 Loop 1 4 5 3 Kirchoff’s law: Loop sum of voltage drops = 0 Ø Let A = incidence matrix of graph - Ø Then o = AT v Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 15
A Distributed Asynchronous Multi-hop Time Synchronization Algorithm Use Ø How to construct a distributed asynchronous algorithm which. Coordinate solves this descent optimization problem? Ø Consider the least square problem: Ø Let Ø Therefore , then , setting leads to Ø The Asynchronous Multi-hop Time Synchronization Algorithm Ø Each node periodically exchanges time stamped packets with each of it’s neighbors and estimates the bilateral offsets Ø Each node periodically transmits current estimate of its own offset vi to each of its neighbors. When it receives all its neighbors’ current estimates, it updates its own estimate using the update Ø The above two steps run in parallel Ø The bilateral estimates are computed as above Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 16
A Distributed Synchronous Multi-hop Time Synchronization Algorithm Ø How To Synchronize the algorithm? Ø Solution: each estimate is associated with a sequence number n Ø Nodes transmit the latest estimates along with the sequence numbers to each of their neighbors Ø Each node i obtains its (n + 1)st estimate using the equation Ø The Convergence of the algorithm? Ø The synchronous as well as asynchronous versions of the averaging algorithm converge to the optimal least-squares solution v Ø The proof is given in the ICDC’ 06 paper by Arvind Giridarha and his partners from UIUC Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 17
Outline of The Presentation Ø Time Synchronization Problems and Motivations Ø Related Works Ø Distributed Time Synchronization Ø Conclusions Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 18
Conclusions Ø A clock synchronization protocol has been presented Ø Ø For wireless sensor network Fully distributed Use asynchronous messages Requires no topological constructions Ø The simulation result is mentioned in the paper other than the presentation Ø Any improvements? Ø Further considerations Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 19
THANK YOU Q&A Rao. Lei@CS. Mc. Gill leirao@cs. mcgill. ca 20
- Slides: 20