1 / 19

Gradient Clock Synchronization in Wireless Sensor Networks

Gradient Clock Synchronization in Wireless Sensor Networks. Philipp Sommer Roger Wattenhofer. Time Synchronization is a well-studied Problem. Time, Clocks, and the Ordering of Events in a Distributed System L. Lamport, Communications of the ACM, 1978.

ann
Download Presentation

Gradient Clock Synchronization in Wireless Sensor Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Gradient ClockSynchronization in Wireless Sensor Networks Philipp Sommer Roger Wattenhofer

  2. Philipp Sommer, ETH Zurich @ IPSN'09 Time Synchronization is a well-studied Problem • Time, Clocks, and the Ordering of Events in a Distributed SystemL. Lamport, Communications of the ACM, 1978. • Internet Time Synchronization: The Network Time ProtocolD. Mills, IEEE Transactions on Communications, 1991 • Reference Broadcast Synchronization (RBS)J. Elson, L. Girod and D. Estrin, OSDI'02 • Timing-sync Protocol for Sensor Networks (TPSN)S. Ganeriwal, R. Kumar and M. Srivastava, SenSys'03 • Flooding Time Synchronization Protocol (FTSP)M. Maróti, B. Kusy, G. Simon and Á. Lédeczi, SenSys'04 • and many more ... State-of-the-art time syncprotocolforwirelesssensornetworks

  3. Philipp Sommer, ETH Zurich @ IPSN'09 Preview: FTSP vs. GTSP • Gradient Time Synchronization Protocol (GTSP) • Details will followsoon • Network synchronizationerror(global skew) • Pair-wisesynchronizationerrorbetweenanynodes in thenetwork NEW FTSP (avg: 7.7 μs) GTSP (avg: 14.0 μs)

  4. Philipp Sommer, ETH Zurich @ IPSN'09 Preview: FTSP vs. GTSP (2) • NeighborSynchronizationerror(localskew) • Pair-wisesynchronizationerrorbetweenneighboringnodes • Synchronizationerrorbetweentwodirectneighbors FTSP (avg: 15.0 μs) GTSP (avg: 2.8 μs)

  5. Philipp Sommer, ETH Zurich @ IPSN'09 Time in Sensor Networks • Common time is essential formanyapplications: • Assigning a global timestamptosenseddata/events • Co-operationof multiple sensornodes • Preciseeventlocalization (e.g., shooterdetection) • Coordinationofwake-upandsleepingtimes (energyefficiency) • TDMA-based MAC layer Global Global Local Local Local

  6. Philipp Sommer, ETH Zurich @ IPSN'09 Outline • Introduction • ClockSynchronization Basics • Gradient Time Synchronization Protocol (GTSP) • Evaluation • Conclusions

  7. Philipp Sommer, ETH Zurich @ IPSN'09 Sensor NodeClocks • Eachnodehas a hardwareclockH(t) • Counter registerofthemicrocontroller • Crystal quartzoscillator (e.g., 32kHz, 7.37 MHz) • Subjecttoclockdrift (30 ppm) • Eachnodehas a logicalclockL(t) • Holdstheestimationofthecurrent global time • Computedas a functionofthecurrenthardwareclockH(t) • Logical clock rate

  8. Philipp Sommer, ETH Zurich @ IPSN'09 ClockSynchronizationAlgorithm • Exchange messageswithcurrentclockvalue L(t) withothers • Adjustclockratesandoffset • Repeat thisprocessfrequently • Uncertainty (jitter) in themessagedelay • Varioussourcesoferrors (deterministicandundeterministic) • Can bereduced (but not eliminated) bytimestampingat MAC layer

  9. Philipp Sommer, ETH Zurich @ IPSN'09 TheoreticalBounds on theSynchronizationAccuracy • Two nodes u and v cannot be synchronized perfectly • Worst-case example: • Error increaseswithdistancefromthereferencenode • Lowerboundresultfromtheoreticalwork • Clockerrorbetweennodesdistanced apart depends on thenetworkdiameterD: • R. Fan and N. Lynch. Gradient Clock Synchronization. In PODC ’04: Proceedings of the twenty-third annual ACM symposium on principles of distributed computing, 2004. u 0 1 2 3 μ v 0 1 2 3 u 0 1 2 3 μ + ε v 0 1 2 3

  10. Philipp Sommer, ETH Zurich @ IPSN'09 Gradient ClockSynchronization • Global property: Minimize clock error between any two nodes • Local (“gradient”) property: Small clock error between two nodes if the distance between the nodes is small. FTSP GTSP

  11. Philipp Sommer, ETH Zurich @ IPSN'09 Gradient Time Synchronization Protocol (GTSP) • Synchronizewithallneighboringnodes • Broadcast periodic time beacons, e.g., every 30 s • Noreferencenodenecessary • Howtosynchronizeclockswithouthaving a leader? • Follow thenodewiththe fastest/slowestclock? • Idea: Go totheaverageclockvalue/rate of all neighbors (includingnodeitself)

  12. Philipp Sommer, ETH Zurich @ IPSN'09 Drift and Offset Compensation in GTSP • Update ruleforthelogicalclock rate: • Update ruleforthelogicalclockoffset: • Note: We will jump directlyto a higherclockvalueiftheoffsetexceeds a certainthreshold, e.g., 20 μs.

  13. Philipp Sommer, ETH Zurich @ IPSN'09 Experimental Evaluation • Mica2 platformusingTinyOS 2.1 • System clock: 7.37 MHz (crystalquartz) • Hardware clock: System clockdividedby 8 = 921 kHz • Clockgranularityof 1 microsecond (1 clock tick ≈ 1 μs) • Testbedof 20 Mica2 nodes • Base stationtriggersexternaleventsbysending time probe packets • Ring topologyisenforcedbysoftware

  14. Philipp Sommer, ETH Zurich @ IPSN'09 Experimental Results • Network synchronizationerror(global clockskew) • 7.7 μs with FTSP, 14.0 μs with GTSP • FTSP needsmore time tosynchronize all nodes after startup FTSP GTSP

  15. Philipp Sommer, ETH Zurich @ IPSN'09 Experimental Results (2) • Neighborsynchronizationerror(localclockskew) • 5.3 μs with FTSP, 4.0 μs with GTSP FTSP GTSP

  16. Philipp Sommer, ETH Zurich @ IPSN'09 NeighborSynchronization Error: FTSP vs. GTSP • FTSP has a large clockerrorforneighborswith large stretch in thetree (Node 8 andNode 15) FTSP GTSP

  17. Philipp Sommer, ETH Zurich @ IPSN'09 Multi-Hop Time Synchronization in Practice • Is thisreally a problem in practice? • Ring topologyof 20 nodesseemstobe „artificial“!? • Finding a tree-embeddingwithlowstretchishard • In a n = m*m gridyou will havetwoneighborswith a stretchofat least • Example: FTSP on a 5x4 gridtopology • Node 2 and 7 have a distanceof 13 hops!

  18. Philipp Sommer, ETH Zurich @ IPSN'09 Simulation Results • Simulation of GTSP for larger networktopologies • Network errorof ~1 msfor 100 nodes in a linetopology • Neighborerrorbelow 100 μs forthe same topology

  19. Philipp Sommer, ETH Zurich @ IPSN'09 Conclusionsand Future Work • Gradient Time Synchronization Protocol (GTSP) • Distributed time synchronizationalgorithm (noleader) • Improvesthesynchronizationerrorbetweenneighboringnodeswhile still providingprecisenetwork-widesynchronization • Bridgingthegapbetweentheoryandpractice • Is there a „perfect“ clocksynchronizationprotocol? • Goal: Minimizinglocaland global skewatthe same time

More Related