time synchronization protocols in wireless sensor networks

31
Time Synchronization Protocols in Wireless Sensor Networks

Upload: flora-reed

Post on 21-Jan-2016

237 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Time Synchronization Protocols in Wireless Sensor Networks

Time Synchronization Protocols in Wireless Sensor Networks

Time Synchronization Protocols in Wireless Sensor Networks

Page 2: Time Synchronization Protocols in Wireless Sensor Networks

M. Maroti, B. Kusy, G. Simon, A. LedecziSenSys 2004

The Flooding Time Synchronization Protocol

The Flooding Time Synchronization Protocol

S. Ganeriwal, R. Kumar, M. B. Srivastava Sensys 2003

Timing-sync protocol for sensor networks

Timing-sync protocol for sensor networks

Three Papers Three Papers

Jeremy Elson, Lewis Girod and Deborah EstrinOSDI 2002

Fine-Grained Network Time Synchronization using Reference

Broadcasts

Fine-Grained Network Time Synchronization using Reference

Broadcasts

Page 3: Time Synchronization Protocols in Wireless Sensor Networks

3

Time Synchronization.Time Synchronization.

Getting all devices in a distributed system to the same time (clock Skew/offset) at exactly the same rate (clock drift).

Page 4: Time Synchronization Protocols in Wireless Sensor Networks

4

Applications of Time Synchronization Applications of Time Synchronization

List a set of functions that need time synchronization

Synchronized MAC

Power Management

Data TimeStamp

Tracking3.

2. 1.

4.

Localization5. Real-time Services6.

Profiling & Debug7. Coordinated Actuation8.

Page 5: Time Synchronization Protocols in Wireless Sensor Networks

5

Why Time Synchronization is Needed? Why Time Synchronization is Needed?

Clock skew (offset): Difference between time on two clocks.

Different start times

Only local clock available initially

Clock drift: Count at different rates.

Different frequency of the oscillator.

Accuracy : agreement between the oscillators expected and actual frequencies (freq. error) (PPM)

Stability: drifting in frequency over time, because of short term factors (temperature Etc.) and long term factors (Aging)

Page 6: Time Synchronization Protocols in Wireless Sensor Networks

6

The accuracy and driftThe accuracy and drift

Rubidium

Cesium

Quartz

Drift rate Cost

~10-15 s / day

~10-12 s / day

~10-6 s / day

High

Low~10-6 s / s1s /12 day

~10-6 s / hr

Desktop

IPAQs

AtomicClocks

embeded

Page 7: Time Synchronization Protocols in Wireless Sensor Networks

7

Why Not Atomic clockWhy Not Atomic clock

CPU power drawn by motes ~ 25 mWCost will be the deciding factor!

Page 8: Time Synchronization Protocols in Wireless Sensor Networks

8

State-of-the-ArtState-of-the-Art

General solutions for time sync problem:

GPS (Global Positioning System)

NTP (Network Time Protocol)

Page 9: Time Synchronization Protocols in Wireless Sensor Networks

9

GPS overviewGPS overview

T1 = t1 + |X-s1|/c

Gather four satellite signals and solve the non-linear system of equations.

Figure source: http://www.dependability.org/wg10.4/timedepend/03-Schmi.pdf

Propagation delay

Page 10: Time Synchronization Protocols in Wireless Sensor Networks

10

Global Positioning System (GPS)Global Positioning System (GPS)

Single Hop Synchronization

+’s

Commercial receivers can achieve accuracy of better than 200ns.

-’s

Needs a clear sky view (not possible inside buildings, underwater etc.)

Receivers need long settling time

Receivers can be large, costly and high power consuming.

Page 11: Time Synchronization Protocols in Wireless Sensor Networks

11

802.11 Synchronization802.11 Synchronization

Clients just adoptthe timestamp in the beacon packet

Send at T1Base station

Very simple, Provides ms accuracy.

Neglects packet delay and delay jitters

Same approach being used by NIST to synchronize electronic products such as wall clocks, clock radio, wrist watches etc. worldwide.

WWVB signals are being transmitted from colarado.

Page 12: Time Synchronization Protocols in Wireless Sensor Networks

12

NTP: Internet SynchronizationNTP: Internet Synchronization

A

Send at T3Recv at T4

T4 = T3 + DELAY- OFFSET

Send at T1 Recv at T2

T2 = T1 + DELAY + OFFSET

B

OFFSET = {(T2-T1)-(T4-T3)}/2

DELAY = {(T2-T1)+(T4-T3)}/2

Client Peer

Page 13: Time Synchronization Protocols in Wireless Sensor Networks

13

Network Time Protocol (NTP)Network Time Protocol (NTP)

The standard C/S Internet Synchronization Protocol

+’s

Scalable

Self configuration in multi hop networks (hierarchical)

Robustness to failures and sabotage (multiple servers)

-’s

High Cost

Pair-wise

Not energy efficient

S1 S1 S1 S1

S2* *

S1 S1

*S2 S2

Clients(c)

Page 14: Time Synchronization Protocols in Wireless Sensor Networks

14

Time Synchronization in Sensor NetworksTime Synchronization in Sensor Networks

How is time synchronization in sensor networks different from the traditional networks?

1. Energy Utilization

2. Single hop vs. multi hop

3. Infrastructure-Supported vs. Ad-hoc

4. Static topology vs. Dynamic Topology

5. Connected vs. Disconnected

6. Dynamic time sync. requirements, depending on the application

Page 15: Time Synchronization Protocols in Wireless Sensor Networks

M. Maroti, B. Kusy, G. Simon, A. Ledeczi

SenSys 2004

The Flooding Time Synchronization Protocol

The Flooding Time Synchronization Protocol

First Papers First Papers

Page 16: Time Synchronization Protocols in Wireless Sensor Networks

16

FTSP Basic Idea: Deal with SkewFTSP Basic Idea: Deal with Skew

Receiver Time = Sender Time + Signaling Delay

Sender

Receiver

Signaling Delay

Challenging issue: estimate signaling Delay!!!

Sender side delay

Receiver side delay

Propagation delay

Page 17: Time Synchronization Protocols in Wireless Sensor Networks

17

Let’s look at delays in detailLet’s look at delays in detail

software MAC propagationTX RX software

sender receiver

ALL DELAYS ARE VARIABLE !

Bottleneck

Use low level time stamping

Page 18: Time Synchronization Protocols in Wireless Sensor Networks

18

Delays in transmitting and receiving a message

Delays in transmitting and receiving a message

interrupt handling

encoding

propagation

(byte alignment)

interrupt handling

decoding

send

erre

ceiv

ercpu:

radio:

antenna:

antenna:

radio:

radio:

cpu:

Page 19: Time Synchronization Protocols in Wireless Sensor Networks

19

FTSP Basic Idea II.FTSP Basic Idea II.

Use periodic flooding to provide robustness

Page 20: Time Synchronization Protocols in Wireless Sensor Networks

20

FTSP Idea III: Deal with DriftFTSP Idea III: Deal with Drift

Real Time

Ideal clock

Node B clock

Node A clock

t1

Local node time

45 degree

Page 21: Time Synchronization Protocols in Wireless Sensor Networks

21

Basic Idea III: Deal with DriftBasic Idea III: Deal with Drift

Receiver gets the multiple time stamps (Ta,Tb)

Uses this to update the estimate on the clock drift.

Tim

e a

t N

od

e A

Time at Node B

Offset}

Slope = drift

Page 22: Time Synchronization Protocols in Wireless Sensor Networks

22

Analysis of FTSPAnalysis of FTSP

+’s MAC layer delay are removed by low-level time-

stamping

Robust

Clock Drift through linear regression

Support multi-hop time synchronization

-’s Relatively high cost in flooding

Special timestamp message needed

Page 23: Time Synchronization Protocols in Wireless Sensor Networks

Second Papers Second Papers

Jeremy Elson, Lewis Girod and Deborah EstrinOSDI 2002

Fine-Grained Network Time Synchronization using Reference

Broadcasts

Fine-Grained Network Time Synchronization using Reference

Broadcasts

Page 24: Time Synchronization Protocols in Wireless Sensor Networks

24

RBS: Synchronize receivers RBS: Synchronize receivers

Based on CesiumSpray system by Verissimo and Rodrigues

Receiver-receiver synchronization

Figure source: Courtesy of Jeremy Elson

Page 25: Time Synchronization Protocols in Wireless Sensor Networks

25

Sender

Receiver 1

Receiver 2

Critical Path

Sender

Receiver

Critical PathTime

Traditional critical path:From the time the sender

reads its clock, to when the receiver reads its clock

RBS: Only sensitive to the differences in receive time

and propagation delay

Magic behind RBS

Figure source: Courtesy of Jeremy Elson

Page 26: Time Synchronization Protocols in Wireless Sensor Networks

26

Analysis of RBSAnalysis of RBS

+’s The biggest sources of non deterministic latency are removed.

Message does not need to have any time stamp neither the time when its sent is needed.

Multiple broadcasts allow tighter synchronization.

Outliers are handled gracefully because of the use of best fit line.

-’s Needs a network with physical broadcast channel (not possible in

networks with point to point links)

They have not explored the scaling issues like automatic and dynamic election of set of nodes to send out beacons

Page 27: Time Synchronization Protocols in Wireless Sensor Networks

S. Ganeriwal, R. Kumar, M. B. Srivastava Sensys 2003

Timing-sync protocol for sensor networks

Timing-sync protocol for sensor networks

Third Papers Third Papers

Page 28: Time Synchronization Protocols in Wireless Sensor Networks

28

Tree-based SynchronizationTree-based Synchronization

Pair-wise NTP over multi-hop

Page 29: Time Synchronization Protocols in Wireless Sensor Networks

29

TPSN: Conventional sender-receiver synchronization

TPSN: Conventional sender-receiver synchronization

ASend at T3

Recv at T4

T4 = T3 + DELAY- OFFSET

Send at T1 Recv at T2

T2 = T1 + DELAY + OFFSET

B

OFFSET = {(T2-T1)-(T4-T3)}/2

DELAY = {(T2-T1)+(T4-T3)}/2

Based on NTP

Enemy is non-determinism!

Asymmetric delays and varying offset

Page 30: Time Synchronization Protocols in Wireless Sensor Networks

30

Comparison of the time sync protocols.Comparison of the time sync protocols.

FTSP TPSN RBS

Send/Access Time TS at MAC TS at MAC Eliminated

Prop. time Not handled Acknowledgements Not handled

Byte Alignment Handled Acknowledgements Not handled

Average error single hop 1.48 us 16.9 us 29.1 us

Traffic/load Low High Low

Network hierarchy Not fixed Needed Not needed

Page 31: Time Synchronization Protocols in Wireless Sensor Networks

31

Take Away MessagesTake Away Messages

Need to deal with uncertainty in MAC access delay

FTSP = Low Level Time-stamping + Flooding + Linear regression

RBS = Receiver-Receiver Synchronization

FTSP = Pairwise Multi-hop NTP