44
TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS Presented by: Shet, Deepak Rajput, Rajiv

TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

  • Upload
    manton

  • View
    52

  • Download
    4

Embed Size (px)

DESCRIPTION

TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS. Presented by: Shet, Deepak Rajput, Rajiv. Outline. Goals Synchronization Problem Challenges in synchronization Synchronization protocol examples LTS RBS TPSN - PowerPoint PPT Presentation

Citation preview

Page 1: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Presented by:

Shet, Deepak

Rajput, Rajiv

Page 2: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Outline

Goals Synchronization Problem Challenges in synchronization Synchronization protocol examples LTS RBS TPSN Node Based Algorithm for TDMA scheduling Application Design Results Conclusion Future work

Page 3: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Deepak

Page 4: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Goals

To implement TPSN on Berkeley motes to achieve global time

synchronization in a wireless sensor network

Observing the effect of varying topology on synchronization errors

Scheduling the motes to transmit data according to a TDMA scheme

Exploring the data rate above which we need the TDMA scheduling

Investigating the effect of varying time-slots on packet loss

Page 5: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Need for Time Synchronization in WSN

Primary reasons for addressing synchronization problem in WSN are as follows:

Sensor nodes need to coordinate their operations and collaborate to achieve complex sensing tasks

Synchronization can be used by power saving algorithms to increase the network lifetime

Scheduling algorithms like TDMA can eliminate transmission collisions and conserve energy

Various sensor network applications, routing protocols, for example detection of duplicate packets need synchronization

Page 6: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Synchronization Problem

All computing devices contain a clock

C(t) = ait + bi C(t) = approximation of real time, t ait = clock drift. (Frequency of the clock) bi = offset of node i’s clock (Difference from the real time t)

C1(t) = a12 * C2(t) + b12

a12 = relative drift

b12 = relative offset between clocks of node 1 and node 2

Page 7: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Types of synchronization

Global Synchronization

Equalizing Ci(t) for all i=1 to n

Local Synchronization

Equalizing Ci(t) for some set of nodes which reside in a

close proximity.

Page 8: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Challenges in synchronization methods

Synchronization becomes difficult due to nondeterministic nature of factors such as:

Send Time

Access Time

Propagation Time

Receive Time

Page 9: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Challenges for synchronization (cont.)

Disconnected network leading to synchronization problem

Page 10: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Synchronization Protocol Examples

Lightweight Time Synchronization (LTS)

Reference-Broadcast Synchronization (RBS)

Timing-sync Protocol for Sensor Networks (TPSN)

Page 11: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Lightweight Time Synchronization (LTS)

Traditional algorithms focus on maximizing accuracy rather than energy expenses involved

LTS aims at minimizing overhead energy.

Cost of synchronization can be reduced by relaxed accuracy constraints

Targeted mainly at environment monitoring applications such as temperature control, traffic monitoring and surveillance

Page 12: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

LTS (cont.)

Types of Synchronization in LTS

Pair-wise synchronization

Multihop synchronization

Page 13: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

LTS (cont.) (Pair wise synchronization)

Packet exchange for pair wise synchronization

Page 14: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

LTS (cont.) Multihop- Synchronization

Extension of pair-wise synchronization.

Two schemes for Multihop-Synchronization

Centralized Distributed

Page 15: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

LTS (cont.)

Centralized

Extension of single-hop synchronization

Aims at constructing low-depth spanning tree

Pair-wise synchronization are performed along edges of

the tree

Reference node initiates synchronization

Page 16: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

LTS (cont.)

Distributed

Performs synchronization in distributed manner

Each node decides the time for its own synchronization

Nodes with lower data rate need not synchronize frequently ,

hence saves unnecessary synchronization effort

Page 17: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Reference-Broadcast Synchronization (RBS) for WSN

Receiver to Receiver synchronization

Nodes send reference packets to their neighbors

Receivers use arrival time of the packet as reference point for comparing their clocks

Removes Send Time and Access Time from the critical path

Only source of error is nondeterminism in propagation time and receive time

Page 18: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

RBS (cont.)

Figure 2.3 (a) Critical Path (Traditional) (b) Critical Path (RBS) (Elson et al. 2002)

Page 19: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

RAJIV

Page 20: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

RBS (co-relating events)

Topology requiring multi-hop synchronization

E1 = PA + 2E7 = PB - 4PA = PB + 10E1 = E7 + 16

Page 21: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

RBS (Multihop)

E1(R1) -> E1(R4) -> E1(R8) -> E1(R10)

RBS extension for Multi-hop Synchronization

Page 22: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Timing-sync Protocol for Sensor Networks (TPSN)

Conventional sender-receiver synchronization

Time stamping done at the MAC layer !!

Forms a hierarchical structure before synchronization

Two times better than RBS (theoretical and experimental evidence on Berkeley motes)

Page 23: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Why TPSN perform better?

By time stamping at the MAC layer

- Eliminates uncertainty at the Sender completely

(removing send and access time)

- Removes receive time at the Receiver

Page 24: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Two Phases in TPSN

Level Discovery Phase

Synchronization Phase

Page 25: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Level Discovery Phase

Aims at establishing a hierarchical structure

Root Node initiates the phase by broadcasting level-discovery packets

A node receiving a level-discovery packet:

- Assigns one higher level to itself

- Re-broadcasts the level-discovery packets

- Ignores any further level-discovery packets

Page 26: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Synchronization Phase

Root node initiates the phase by broadcasting synchronization packet

Nodes at level 1 begin the two way message exchange with root node

All the nodes at level 1 synchronize themselves to the root node through the two way message exchange

Nodes at level 2 back off for some random time when they hear this message exchange, before starting their own synchronization

In general, nodes at level “i” synchronize to the nodes at level “i-1”

The overall time required to synchronize the whole network depends on the number

Page 27: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Two way message exchange

Two way message exchange

• Node A constructs the “sync” packet and timestamps it with T1 before sending it

• Node B receives “sync” packet and timestamps it with T2

• Then, Node B sends an “ack” packet back to A and timestamps it with T3 just before sending it

• Node A receives the “ack” and timestamps it with T4 as soon as it gets it

• All the time stamping is done at the MAC layer

Page 28: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Calculating drift and propagation delay

( 2 1) ( 4 3)

2( 2 1) ( 4 3)

2

T T T T

T T T Td

Δ = clock drift

d = propagation delay

Page 29: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Node Based Scheduling Algorithm (for TDMA Scheduling)

IN WSNs, data packets are generated at different sources but travel toward a common destination

The scheduling problem is to determine conflict free assignment of time slots such that data packets constructed at each source node reach the destination sink node

Two types of conflicts

Primary Conflicts

Secondary Conflicts

Page 30: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Node Based Scheduling Algorithm (cont.)

The network is represented by a graph called G = (V,E)

V is a set of all the nodes including the sink node and there is only one sink node known as the Access Point (AP)

E is the number of undirected number of edges in the network

The conflict graph GC = (V,EC)

EC comprises the links or edges between the pair of nodes in G that should not transmit at the same time

A pair of nodes u and v belongs to the set I if either u or v can interfere with the signal intended for the other

Page 31: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Node Based Scheduling Algorithm (cont.)

Works in two phases:

Coloring the network

Scheduling the network

Page 32: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Coloring the network

Color the network such that nodes i and j get different colors if (i,j) € EC

Page 33: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Scheduling the network

• The nodes with the same color can transmit at the same time, while the nodes with different colors have to transmit at different times

• Each node with at least one packet at the beginning of the super slot transmits at least one packet during the super-slot

Page 34: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Application Design

Mote 1 Mote 2 Mote 3

Mote 4 Mote 6Mote 5

Base Station (level 0)

Level 2Child nodes

Level 1Parent nodes

sync mssgs at time t1

sync mssgs at time t2

Page 35: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Packet losses with burst data

0

400

800

1200

1600

2000

2400

2800

60 120 180 240 300

Time (seconds)

Pa

ck

ets

Receiv

ed

5 ft range

10 ft range

25 ft range

Theoretical

Page 36: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Packet losses with burst data (percentage)

0

5

10

15

20

25

30

35

40

45

60 120 180 240 300

Time (seconds)

% P

ack

et lo

ss

5 ft range

10 ft range

25 ft range

The average percentage loss for burst data:

25 ft = 40%10 ft = 25.05 % 5 ft =19%.

Page 37: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Packet loss with non-burst data (Time period = 200ms)

0100020003000400050006000700080009000

10000110001200013000

60 120 180 240 300

Time (Seconds)

Pac

ket

s ex

pec

ted

5 ft range

10 ft range

25 ft range

Theoretical

Data rate= 40 pkts/secTime period = 200ms

The average percentage loss for burst data:

25 ft = 14.18%10 ft = 8.54% 5 ft = 7.6%.

Page 38: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Packet loss with non-burst data (Time period = 100ms)

0

5000

10000

15000

20000

25000

30000

60 120 180 240 300

Time (seconds)

Pack

ets

exp

ecte

d

5 ft range

10 ft Range

25 ft Range

Theoretical

Data rate= 80 pkts/secTime period = 100ms

The average percentage At 80 pkts/second:

25 ft = 57.29%10 ft = 43.59% 5 ft = 39.62%.

Page 39: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Packet loss with TDMA scheduling

0

500

1000

1500

2000

2500

3000

3500

60 120 180 240 300Time (seconds)

Pack

ets

rece

ived

5 ft range

10 ft range

25 ft range

Theoretical

The average percentage with TDMA:

25 ft = 7.6%10 ft = 6.57 % 5 ft = 5.88%.

Page 40: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Conclusions

At burst data rates, huge packet loss occurs at the base station, so we need TDMA scheduling in this case

In case of non-burst data, high data rates of 80 pkts/sec (or more) at the base station, we need TDMA scheduling

The synchronization error varies with varying topology

The packet loss with TDMA scheduling for time slots of 500 milliseconds, 200 milliseconds, and 100 milliseconds was low. But for time periods below 100ms even TDMA scheduling was not effective

A linear increase in the relative synchronization error occurred when motes were kept unsynchronized after initial synchronization. Hence, periodic resynchronization was necessary

Page 41: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Future work

Blend the ideas of RBS and TPSN by:

Time stamping at the MAC layer in RBS

Trying receiver to receiver synchronization with TPSN

We need more effective algorithms in the case where nodes in a WSN are

continuously moving

Page 42: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

References

(Elson et al. 2002) Jeremy Elson, Lewis Girod and Deborah Estrin. “Fine-grained network time synchronization using reference

broadcasts,” in ACM SIGOPS Operating Systems Review 2002.

(Elson and Estrin 2001) Jeremy Elson and Deborah Estrin. “Time Synchronization for Wireless Sensor networks,” in Proceedings of the 15th

International Parallel & Distributed Processing Symposium 2001

(Ergern and Varaiya 2005) Sinem Coleri Ergen and Pravin Varaiya. “TDMA Scheduling Algorithms for Sensor networks,” in INFOCOM 2005.

(Ganeriwal et al. 2003) Saurabh Ganeriwal, Ram Kumar and Mani Srivastava. “Timing-sync protocol for sensor networks,” in Conference On

Embedded Networked Sensor System 2003.

(Greunen and Rabaey 2003) Jana van Greunen and Jan Rabaey. “Lightweight time synchronization for sensor networks,” in International

Workshop on Wireless Sensor Networks and Applications 2003.

(Gay et al. 2003) David Gay, Phil Levis, Rob Von Behren, Matt Welsh, Eric Brewer, and David Culler, “The nesC language: A holistic

approach to networked embedded systems,” in SIGPLAN Conference on Programming Language Design and Implementation (PLDI’03), June 2003.

Page 43: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

References (cont.)

(Hill et al. 2001) Jason Hill, Philip Bounadonna, David Culler,“Active message communication for tiny network sensors,” in

INFOCOM, 2001.

Sivrikaya ,F. Yener , B. “Time synchronization in sensor networks: a survey.” Network, IEEE (2004). Jeremy Elson and Kay Romer. “Wireless Sensor Networks: A New Regime for Time Synchronization.” ACM

SIGCOMM Computer Communication Review (2003).

(Li and Rus 2006) Qun Li and Daniela Rus. “Global Clock Synchronization in Sensor Networks,” in IEEE Transactions on Computers

2006.

(Phil et al. 2003) Phil Levis, Nelson Lee, Matt Welsh, “TOSSIM: Accurate and scalable simulation of entire TinyOS applications,” in

Proceedings of the First ACM Conference on Embedded Networked Sensor Systems (SenSys), November 2003.

(Hill et al. 2000) Jason Hill, Robert Szewczyk, Alec Woo, Seth Hollar, David Culler, and Kristofer Pister, “System architecture

directions for network sensors,” in Proceedings of the 9th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-IX), Cambridge, MA, pp 93-104, November 2000.

Page 44: TIMING-SYNC PROTOCOL FOR SENSOR NETWORKS

Thank You