clock synchronization in sensor networks mostafa nouri

31
Clock Synchronization in Sensor Networks Mostafa Nouri

Upload: aron-mathews

Post on 29-Dec-2015

232 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Clock Synchronization in Sensor Networks Mostafa Nouri

Clock Synchronization in Sensor Networks

Mostafa Nouri

Page 2: Clock Synchronization in Sensor Networks Mostafa Nouri

Outline

Need for time synchronization in sensor networks

Definition of time synchronization Common problems in time synchronization Typical schemes and algorithms.

Page 3: Clock Synchronization in Sensor Networks Mostafa Nouri

Sensor Networks

Sensor networks and applicationsDeeply embedded into the environmentSense, monitor, and control environments

for a long period of time without human intervention

Vast collection of miniature, lightweight, inexpensive, energy-efficient sensor nodes

Page 4: Clock Synchronization in Sensor Networks Mostafa Nouri

Sensor Networks

Applications Biological & Environmental: habitat monitoring,

wildlife, pollution, natural catastrophes Civil: infrastructure, machine health, human health,

traffic monitoring Military: surveillance, tracking, detection

Network Architecture / Sensor Platforms

Low-powerCPU/CADC

Radio

Memory

Sensors

Battery

BaseStation

Page 5: Clock Synchronization in Sensor Networks Mostafa Nouri

Why Need for Time Synchronization Link to the physical world

When does an event take place? Key basic service of sensor networks

Fundamental to data fusion Crucial to the efficient working of other basic

services Localization, Calibration, In-network processing, …

Several protocols require time synchronization Cryptography, Topology management.

Page 6: Clock Synchronization in Sensor Networks Mostafa Nouri

Sensor Networks

Characteristics of SN Cheap and Small

No Accurate Oscillator

Limited Energy Need to Sleep

Work Together Data Fusion

Conclusion must initiate T-Sync in WSN

?

?

?

?

?

Page 7: Clock Synchronization in Sensor Networks Mostafa Nouri

Metrics for Synchronization Protocols Precision Longevity of synchronization Time and power budget available for

synchronization Geographical span Size and network topology

Page 8: Clock Synchronization in Sensor Networks Mostafa Nouri

Examples

Energy efficient radio scheduling

Array processing

Radio OffRadio On

Time

SenderRadio OffReceiver

Guard band due to clock skew; receiver can’tpredict exactly when packet will arrive

Page 9: Clock Synchronization in Sensor Networks Mostafa Nouri

Computer Clocks

Clocks in computers C(t)=k∫0

tω(τ)d τ + C(t0) ω is frequency of oscillator, C(t0). Time of the computer click implemented based on a hardware

oscillator Computer clock is an approximation of a real time t

C(t)=a*t+b a is a clock drift (rate) B is an offset of the clock

Perfect clock Rate = 1 Offset = 0

C(t)

t

C(t)

ab

Page 10: Clock Synchronization in Sensor Networks Mostafa Nouri

Definition of time synchronization

Let C(t) be a perfect clock A clock Ci(t) is called correct at time t

If Ci(t)=C(t)

A clock Ct(t) is called accurate at time t If dCi(t)/dt = dC(t)/dt = 1

Two clocks Ci(t) and Ck(t) are synchronized at time t if Ci(t)=Ck(t)

Time synchronization Requires knowing both offset and drift

Page 11: Clock Synchronization in Sensor Networks Mostafa Nouri

NTP Overview

Most widely used time synchronization protocolHierarchical: C/S model

Perfectly acceptable for most cases.Coarse grain synchronization

Inefficient when fine grain synchronization is required

Page 12: Clock Synchronization in Sensor Networks Mostafa Nouri

Why not Use NTP

Link Ratio of packet loss is very low in Internet (fiber, cable) Links are short range and short lived in sensor networks

(wireless) Topology

Static, robust and configurable Energy aware

Frequent message exchange Listening to the network is free Using the CPU in moderation free

Page 13: Clock Synchronization in Sensor Networks Mostafa Nouri

Difficulties in Sensor Networks

No periodic message exchange is guaranteed There may be no links between two nodes at all

Transmission delay between two nodes is hard to estimate The link distance changes all the time

Energy is very limited Nodes sleep most of the time to conserve power

Node need to be small and cheap No expensive clock circuitry

Page 14: Clock Synchronization in Sensor Networks Mostafa Nouri

Basic Approach

Collaboration among sensor nodesEstablish pair-wise relationship between

nodes.Extend this to network level.

Two approaches for collaborationReceiver-ReceiverSender-Receiver

Page 15: Clock Synchronization in Sensor Networks Mostafa Nouri

SR vs. RR

Sources of error-variation of packet delays and clock drifts

A B

BA A

A

B

B

Beacon

Page 16: Clock Synchronization in Sensor Networks Mostafa Nouri

Basic Mechanism

Pair-wise synchronization

T2=T1+delay+offset

T4=T3+delay-offset

offset=((T2-T1)-(T4-T3))/2 delay=((T2-T1)+(T4-T3))/2

A B

h ih j

distance

T1

T4

T2T3

Page 17: Clock Synchronization in Sensor Networks Mostafa Nouri

Sources of Errors

Send time Kernel processing Context switches Interrupt processing

Access time Specific to MAC protocol

e.g. in Ethernet, sender must wait for clear channel Transmission time Propagation time

Very small in WSNs, can be ommited Reception time Receive time

Page 18: Clock Synchronization in Sensor Networks Mostafa Nouri

Illustration

Sender Receiver

NICNIC

Send time

Acess time

Transmission time

Propagation time

Reception time

Receive time

Physical Media

Page 19: Clock Synchronization in Sensor Networks Mostafa Nouri

Typical Schemes and Algorithms

RBS (Reference Broadcast Synchronization) TPSN (Timing-Sync Protocol for Sensor Networs) DTMS (Delay Measurement Time Synchronization) LTS (Lightweight Time Synchronization) FTSP (Flooding Time Synchronization Protocol) TS/MS (Tiny-Sync and Miny-Sync) TSync AD (Asynchonous Diffusion)

Page 20: Clock Synchronization in Sensor Networks Mostafa Nouri

TPSN

Features Sender-receiver bidirectional mechanism Two phases of operation:

Level discovery and synchronization Level discovery phase

Root node initiates level discovery A node on receiving its level broadcasts it Any node receiving multiple level packets takes the first one

and ignores the others Any node not receiving a level packet times out and sends a

request for level packet

Page 21: Clock Synchronization in Sensor Networks Mostafa Nouri

Level Discovery Phase

A

B

H

E

CF

K

DG

L

JI

01

2

3

1

1

1

2

2

2 23

Page 22: Clock Synchronization in Sensor Networks Mostafa Nouri

TPSN

Synchronization phase Root node sends a start synchronization packet All nodes of level 1 synchronize themselves to the

root node For every level i, the nodes of that level synchronize

to the nodes of level i-1 If a node in level i-1 is not synchronized, then it does

not respond to synchronization requests from level i

Page 23: Clock Synchronization in Sensor Networks Mostafa Nouri

Time Synchronization Algorithm

A

B

H

E

CF

K

DG

L

JI

01

3

1

1

2

2

2 23

Page 24: Clock Synchronization in Sensor Networks Mostafa Nouri

LTS

Features Minimize synchronization complexity rather than

maximizing accuracy Authors claim that wireless sensor networks need quite low

synchronization accuracy Sender-receiver bidirectional mechanism Two LTS algorithms

Centralized Node sends a synchronization request to a closest reference

node by any routing mechanism Distributed

Requires a spanning tree to be constructed firstly

Page 25: Clock Synchronization in Sensor Networks Mostafa Nouri

LTS

LTS optimizes synchronization frequency with required precision The synchronization frequency is calculated from the requested

precision, from the depth of the spanning tree, from the drift bound Simulation results

500 nodes (120 x 120) Target precision: 0.5 Duration: 10 hrs Centralized: 65% of all nodes request synchronization

4-5 synchronization operation on average per node Distributed:

Average 26 pair-wise synchronization per node

Page 26: Clock Synchronization in Sensor Networks Mostafa Nouri

TS/MS

Features Determining relative offset and drift between two nodes Sender-receiver bidirectional scheme

Node 1 sends a probe message to node 2 time-stamped with t0

Node 2 generates timestamp tb and responds immediately Node 1 generates timestamp tr

Two clocks c1(t) and c2(t) are linearly related as C1(t)=a12C2(t)+b12

The following inequalities are held: t0<a12tb+b12<tr

Page 27: Clock Synchronization in Sensor Networks Mostafa Nouri

TS/MS

C2 (t)

Sample 1

Sample 3

t0

tr

C1(t) = a

12H

2(t) + b

12

C1(t)

Node 1 Node 2

t0

tr

tb

tb

a12b12

Page 28: Clock Synchronization in Sensor Networks Mostafa Nouri

Parameter Estimation

Relative drift a12 and offset b12

The tighter the bound, the higher the synchronization precision

Requires high amount of data points and quite complex Algorithms precision increases with the increased

number of data points.

Page 29: Clock Synchronization in Sensor Networks Mostafa Nouri

Difference Between TS and MS

Different methods in selecting useful data points Tiny-Sync

Keep only four constrains of all data points Does nor always give the best solution for the bounds

Mini-Sync is an extension of Tiny-Sync More optimal solution with increased complexity Keeps also the data points which may be useful by some

future data points to give tighter bounds A data point is discarded only if it is definitely useless Quite complex selection criterion.

Page 30: Clock Synchronization in Sensor Networks Mostafa Nouri

Reference

Elson, Girod, Estrin, “Fine-Grained Network Time Synchronization using Reference Broadcasts”

Sichitiu, Veerarittiphan, “Simple, Accurate Time Synchronization for Wireless Sensor Networks”

Ganeriwal, Kumar, Srivastava, “Timing-Sync Protocol for Sensor Networks”

Genunen, Rabaey, “Lightweight Time Synchronization for Wireless Sensor Networks”

Li, Rus, “Global Clock Synchronization in Sensor Networks” Dai, Han, “TSync: A Lightweight Bidirectional Time Synchronization

Service for Wireless Sensor Networks”

Page 31: Clock Synchronization in Sensor Networks Mostafa Nouri

Thank you