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

Download Report

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

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
Node Based Algorithm for TDMA scheduling
Application Design
Results
Conclusion
Future work
Deepak
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
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
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
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.
Challenges in synchronization methods

Synchronization becomes difficult due to nondeterministic nature of factors
such as:

Send Time

Access Time

Propagation Time

Receive Time
Challenges for synchronization (cont.)
Disconnected network leading to synchronization problem
Synchronization Protocol Examples

Lightweight Time Synchronization (LTS)

Reference-Broadcast Synchronization (RBS)

Timing-sync Protocol for Sensor Networks (TPSN)
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
LTS (cont.)

Types of Synchronization in LTS

Pair-wise synchronization

Multihop synchronization
LTS (cont.) (Pair wise synchronization)
Packet exchange for pair wise synchronization
LTS (cont.) Multihop- Synchronization

Extension of pair-wise synchronization.

Two schemes for Multihop-Synchronization


Centralized
Distributed
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
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
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
RBS (cont.)
Figure 2.3 (a) Critical Path (Traditional)
(b) Critical Path (RBS) (Elson et al. 2002)
RAJIV
RBS (co-relating events)
E1 = PA + 2
E7 = PB - 4
PA = PB + 10
E1 = E7 + 16
Topology requiring multi-hop synchronization
RBS (Multihop)
E1(R1) -> E1(R4) -> E1(R8) -> E1(R10)
RBS extension for Multi-hop Synchronization
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)
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
Two Phases in TPSN

Level Discovery Phase

Synchronization Phase
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
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
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
Two way message exchange
• All the time stamping is done at the MAC
layer
Calculating drift and propagation delay
(T 2  T 1)  (T 4  T 3)

2
(T 2  T 1)  (T 4  T 3)
d 
2
Δ = clock drift
d = propagation delay
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
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
Node Based Scheduling Algorithm (cont.)
Works in two phases:


Coloring the network

Scheduling the network
Coloring the network
Color the network such that nodes i and j get different colors if (i,j) € EC
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
Application Design
Base Station (level 0)
sync mssgs
at time t1
Mote 4
Mote 5
Mote 6
Level 1
Parent
nodes
Mote 1
sync mssgs
at time t2
Mote 2
Mote 3
Level 2
Child
nodes
Packet losses with burst data
5 ft range
10 ft range
25 ft range
Theoretical
2800
Packets Received
2400
2000
1600
1200
800
400
0
60
120
180
Time (seconds)
240
300
Packet losses with burst data (percentage)
5 ft range
10 ft range
25 ft range
45
The average percentage
loss for burst data:
40
35
% Packet loss
30
25 ft = 40%
10 ft = 25.05 %
5 ft =19%.
25
20
15
10
5
0
60
120
180
Time (seconds)
240
300
Packet loss with non-burst data (Time period = 200ms)
5 ft range
10 ft range
Packets expected
25 ft range
Theoretical
Data rate= 40 pkts/sec
Time period = 200ms
13000
12000
11000
10000
9000
8000
7000
6000
5000
4000
3000
2000
1000
0
The average percentage
loss for burst data:
25 ft = 14.18%
10 ft = 8.54%
5 ft = 7.6%.
60
120
180
Time (Seconds)
240
300
Packet loss with non-burst data (Time period = 100ms)
5 ft range
10 ft Range
25 ft Range
Theoretical
30000
Data rate= 80 pkts/sec
Time period = 100ms
Packets expected
25000
20000
The average percentage
At 80 pkts/second:
15000
25 ft = 57.29%
10 ft = 43.59%
5 ft = 39.62%.
10000
5000
0
60
120
180
Time (seconds)
240
300
Packet loss with TDMA scheduling
5 ft range
10 ft range
25 ft range
Theoretical
3500
The average percentage
with TDMA:
3000
Packets received
2500
25 ft = 7.6%
10 ft = 6.57 %
5 ft = 5.88%.
2000
1500
1000
500
0
60
120
180
Time (seconds)
240
300
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
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
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.
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.
Thank You