DESYNC-TDMA – Implementation

DESYNC: Self-Organizing
Desynchronization and TDMA
on Wireless Sensor Networks
(IPSN’07)
Julius Degesys, Ian Rose, Ankit Patel,
Radhika Nagpal
Division of Engineering And Applied Sciences, Harvard University
Introduction
• Synchronization is biologically–inspired:
cardiac cells beating together, fireflies
• It is an important primitive in WSN:
decentralized algorithms for node synchr
so that the network remains stable despite
individual faults / topology changes
Desynchronization
• Is the logical opposite of synchronization
• Nodes performs their tasks as far away as
possible from all other nodes
• The goal is to interleave periodic events to
occur in a round-robin schedule:
imagine not fireflies flashing in unison
but in a uniformly distributed fashion
Desynchronization
Setting: Motes performing
periodic tasks
Synchronization: Sometimes
desirable to perform tasks at the
same time
Desynchronization
Setting: Motes performing
periodic tasks
Synchronization: Sometimes
desirable to perform tasks at the
same time
Perfect Desynchronization:
Other times, want even
distribution
• No two are happening at the
same time
• Perfect round-robin schedule
DESYNCH
• A biologically inspired, self-mantaining
algorithm to achieve desynchronization in
a single-hop network.
• Possible applications:
equally distribute monitoring tasks
organize sleep cycles
improve MAC protocols such as TDMA
Background - Synch modelling
• Many synchronized systems are modeled as
networks of oscillators :
each node pulses at a fixed frequency
existence of an algorithm converging to synchrony
(Mirollo-Strogatz, Synchronization of pulse-coupled
biological oscillators, SIAM 1990)
• Desynch can be considered as a patterned
synch where all oscillators pulse at evenly
spaced intervals:
algorithm converging to desynchrony
(DESYNC) in O( n^2), for n < 500
Background 2 – Channel sharing in WSN
• In WSN nodes needs to share the channel
• MAC protocols:
Contention-based (CSMA/CA):
nodes checks the channel before transmitting
if busy they randomly back off and try later
Schedule-based (TDMA):
time is divided into slots, each node picks one of
them to transmit collision-free
CSMA/CA
• Pro:
simple and adaptive
used when the expected contention is low /
in case of bursty traffic
• Draws:
unable to detect collision while transmitting
hidden terminal problem
large backoffs and message loss under high
load
low bandwith utilization
TDMA
• Pro:
low latency & good bandwith (fixed frequency)
good for predictable traffic (fixed bit rate)
• Two main drawbacks:
overhead: tyme synch among nodes & slot
schedule negotiation
wasted slots: slot goes unused when node
does not need to transmit
Key Observation
• TDMA only requires nodes to
desynchronize their transmissions
• There is no need to agree on global time
• If nodes could self mantain
desynchronization, we can solve the
above drawbacks simultaneously
DESYNC applied to TDMA
The Framework
• Single-hop network
• Each node performs a task with period T
• Фi(t)= phase of node i at time t, 0 ≤ i ≤ n-1
• Nodes moving clockwise on a ring
• Upon reaching Фi(t)= 1 node i “fires”,
indicating the end of its cycle to others
• All nodes observe the firing, and:
use this information to jump forward or
backward in phase
• Being Δi(t)= Фi(t) – Фi-1(t):
GOAL: Δi(t)= 1/n , 0 ≤ i ≤ n-1
Desync
• Nodes oblivious of the current state,
aware only of the firing events
Framework
Single node
periodically
“fires” by
broadcasting a
message
A typical starting
configuration
(random)
A system in
desynchronization
?
How do we get from a
random start to
desynchronization?
DESYNC Algorithm
FIRE
A
A
B
B
C
•node
Node
Cneighbor
has
already
as well
ason
B.
•ALocal
view
of three
nodes,
let’s
focus
Bthe
pay
attention
to fired,
the
of
the
firings
• •When
back
fires,
B timing
jumps
towards
B has
C’sown
firing
time. neighbors)
before
and
after
its
(phase
midpoint
oftracked
the
nodes
preceiding
and following it
Node A is about to fire.
DESYNC Algorithm(2)
• Δi+1, Δi = firing time of previous and next nodes
relative of node i’s firing
note Δi+1 it’s in node’s memory (stale)!
• Node i can compute the phase of its previous
neighbor:
Фi+1(t)= Фi(t) + Δi+1 (mod 1)
and the one of its next neighbor
Фi-1(t)= Фi(t) - Δi (mod 1)
• Using that info, node i computes the
desired midpoint as:
Фmid(t)= 1/2 [Фi+1(t) + Фi-1(t)]
• Now he can jump towards it:
Ф’(t)= (1-α) Фi(t) + α Фmid(t)
where α Є (0,1).
It turned out that α = 1 does not always
allow convergence ( oscillation due to
memory time delay)
DESYNC Algorithm(3)
Convergence to Desynchrony:
regardless the usage of stale informations.
Simple Implementation: constant
memory regardless of the network size
Self-Adapting: if number of nodes
changes, those closest to the disturbance
adjust their phases, leading the system back
to desynchronization.
DESYNC-TDMA Algorithm
• Nodes use earlier firings to compute the
TDMA slots near the time of their next
firing
• Node i’s TDMA slot begins at previously
computed midpoint between i and its
previous phase neighbor
• It ends at the midpoint between i and its
next phase neighbor
• A node will never fire outside its slot:
a) If node B doesn’t jump:
Ф A < ФB < ФC
ФA+ФB < 2ФB < ФC+ФB
mid(AB) < ФB < mid(BC)
b) Being B’ = mid(AC) the target jump point of B,
this point is always within B’s time slot:
Ф B < ФC
Ф A < ФB
ФA+ФB < ФA+ФC
ФA+ФC < ФB+ФC
ФA+ФB < ФA+ФC < ФB+ФC
mid(AB) < mid(AC) < mid(BC)
DESYNC-TDMA Key Features
1)The algorithm fully utilizes the channel
defining a set of non-overlapping slots
covering T
Collision free transmission, fully
utilized bandwidth
DESYNC-TDMA Key Features(2)
2) TDMA schedule adapts to nodes
entering or leaving.
When a node leaves, its neighbors
readjust their slot boundaries
if node does not need to transmit:
leave the protocol, sleep & re-enter
When a node enters he must interrupt:
cost of one time period latency /
one data slot interrupted
DESYNC-TDMA Key Features(3)
• 3) The algorithm is self-contained:
– No need to know the network size
– No need to discover neightbors IDs
– No need to agree on a global time
– No need for a time synchronization protocol
The round-robin schedule is a result of the
order in which nodes enter the process
DESYNC-TDMA – Implementation
• Implemented on Telos WSN with TinyOS
• Motes use a 250Kbps wireless transceiver.
• Default CSMA radio interface to transmit,
with initial backoff reduced to 1.2 ms
• Motes use their local clock to track firings
• MAC-level TS used to insert a delay into
msg
Evaluation – Experimental Setup
• Single-hop network, 20 Telos motes around a
Tmote Sky acting as a base station
• The BS logs all messages
• Two experiments:
Fixed-Size: a fraction of total
motes (n = 4,10, 20) to transmit data in
the entire slot, to test TDMA-like
performance under peak load.
Node Removal-Addiction: in order to
evaluate the effect of motes enteringleaving.
Initially n = 8, then a mote removed
at t = 135. At t = 180 three motes enter the
system.
Evaluation Metrics
• Average Desync error: is the average deviation
from desired slot-size of T/n for a given round
• Normalized throughput: best possible data
throughput is 62.8 Kbps (single mote to BS).
Ratio between measured data msg throughput
and the above value, meaured at each round
• Fairness: average, min & max throughput per
node
• Message Loss: BS detect missed msg by SN
Ratio between missed msg and expected msg.
Experimental Results
Motes
arrival
and departure
experiment:
motes
started
Time
Desynchronization
of
each mote’s
firing
error
relative
over to
time
those
for8different
of
a single
n mote
Desync
error and
throughput
changes
over
time
t= 135 one
mote left n=
and10)
three motes woke up at t=180
(At
fixed-size
experiment,
( fixed-size
experiment,
n= 10)
Comparison to other MAC Protocols
• Ideal TDMA: upper bound, collision-free slots of
T/n size, fully utilized bandwidth.
• Fixed TDMA: lower bound, slot size of T/N
• Hybrid TDMA: (Z-MAC). TDMA is modified so
that unowned slots can be used by other motes.
• CSMA: simple and adaptive, works well for
small networks and variable traffic.
Large backoffsand message loss under high
load.
Comparison to other MAC protocols
Throughput throughput
and message
loss
across
different
protocols
Normalized
over
n, for
different
protocols
where
Total throughput
a 10as
nodes
varying
data
rates
each
node tries toonsend
muchnetwork
as possible
(high
data
rate)
Summary and Conclusion
• Desync-TDMA is a new way of thinking about
TDMA scheduling.
• Draws:
Pro:
- 1
Noround
explicit
latency
scheduling
before/transmitting
time
synchronization
- Smaller
slot for several round until re- Excellent
achievingtotal
desynchronization
throughput and collisionfree transmission
under
high loads
- Fairness
could lead
to wasted
bandwidth
-- Fairness
andfiring
predictable
message
Effect of lost
messages
on
latencies
desynchronization accuracy?
- Self-adaptive to topology changes
Future Work and Open Issues
• Applying DESYNC to coordinate sleep
schedules
• Extend DESYNC-TDMA to multi-hop networks.
This is much more complex due to:
– Intersecting neighborhoods
– Overlapping broadcast regions:
hidden terminal
Any question?
Thanks for your attention