Gradient clock synchronization in wireless sensor networks
Download
1 / 19

Gradient Clock Synchronization in Wireless Sensor Networks - PowerPoint PPT Presentation


  • 138 Views
  • Uploaded on

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.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Gradient Clock Synchronization in Wireless Sensor Networks' - derora


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Gradient clock synchronization in wireless sensor networks

Gradient ClockSynchronization in Wireless Sensor Networks

Philipp Sommer

Roger Wattenhofer


Time synchronization is a well studied problem

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


Preview ftsp vs gtsp

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)


Preview ftsp vs gtsp 2

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)


Time in sensor networks

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


Outline

Philipp Sommer, ETH Zurich @ IPSN'09

Outline

  • Introduction

  • ClockSynchronization Basics

  • Gradient Time Synchronization Protocol (GTSP)

  • Evaluation

  • Conclusions


Sensor node clocks

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


Clock synchronization algorithm

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


Theoretical bounds on the synchronization accuracy

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


Gradient clock synchronization

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


Gradient time synchronization protocol gtsp

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)


Drift and offset compensation in gtsp

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.


Experimental evaluation

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


Experimental results

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


Experimental results 2

Philipp Sommer, ETH Zurich @ IPSN'09

Experimental Results (2)

  • Neighborsynchronizationerror(localclockskew)

    • 5.3 μs with FTSP, 4.0 μs with GTSP

FTSP

GTSP


Neighbor synchronization error ftsp vs gtsp

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


Multi hop time synchronization in practice

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!


Simulation results

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


Conclusions and future work

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