Title: FireflyInspired Sensor Network Synchronicity with Realistic Radio Effects
1Firefly-Inspired Sensor Network Synchronicity
with Realistic Radio Effects
Geoffrey Werner-Allen, Geetika Tewari, Ankit
Patel Matt Welsh and Radhika Nagpal Division of
Engineering and Applied Sciences Harvard
University firefly_at_eecs.harvard.edu
2What is synchronicity?
Synchronicity the ability to organize
simultaneous collective action
3What is synchronicity?
Synchronicity the ability to organize
simultaneous collective action ...contrast
with... Time Synchronization the ability to
establish a common time base allowing events to
be time-stamped in a meaningful way
4Natural Synchronicity
Fireflies!
Cardiac Cells
5Nice Properties
No leaders No perfect nodes No global
information No routing tree
6Synchronicity in WSN's
Network Timer Useful for coordinating
sampling network-level duty cycling etc...
7Pulse Coupling
Each node 1) Is an oscillator 2) Periodically
emits a pulse 3) Adjusts the period of its pulse
by observing other pulses
8Coupled Oscillators Strogatz
Example of system dynamics 1) Nodes move
together at a fixed rate from 0 to T 2) When
nodes reach T they fire, return to 0 3) Each
nodes base period is T 4) Overhearing a fire
shortens my period
9Coupled Oscillators Strogatz
10Coupled Oscillators Strogatz
11Coupled Oscillators Strogatz
12Coupled Oscillators Strogatz
13Coupled Oscillators Strogatz
14Coupled Oscillators Strogatz
tA
A hears B fire at tA
15Coupled Oscillators Strogatz
tA
tA'
?(tA)
A hears B fire at tA A jumps to tA'tA?(tA)
16Coupled Oscillators Strogatz
tA
tA'
?(tA)
A hears B fire at tA A jumps to tA'tA?(tA)
Jump Function
17Coupled Oscillators Strogatz
A hears B fire at tA A jumps to tA'tA?(tA) B
returns to 0
18Coupled Oscillators Strogatz
A hears B fire at tA A jumps to tA'tA?(tA) B
returns to 0
19Coupled Oscillators Strogatz
A hears B fire at tA A jumps to tA'tA?(tA) B
returns to 0
20Coupled Oscillators Strogatz
A hears B fire at tA A jumps to tA'tA?(tA) B
returns to 0
21Coupled Oscillators Strogatz
A hears B fire at tA A jumps to tA'tA?(tA) B
returns to 0
22Coupled Oscillators Strogatz
tB
B hears A fire at tB
23Coupled Oscillators Strogatz
tB
?(tB)
B hears A fire at tB B jumps to tB'tB?(tB)
24Coupled Oscillators Strogatz
B hears A fire at tB B jumps to tB'tB?(tB) A
returns to 0
25Goal Synchronicity
t0
0
T
T
26Goal Synchronicity
t0
0
T
T
tT
0
T
27Goal Synchronicity
t0
0
T
T
tT
0
T
t2T
0
T
28Goal Synchronicity
t0
0
T
T
tT
0
T
t2T
0
T
t3T
0
T
29The Jump Function
Call ?(t) the Jump Function Synchronicity
emerges when ?(t) is monotonically increasing If
t1 gt t2 then ?(t1) gt ?(t2) Intuitively, as a node
gets closer to firing other firing events affect
it more strongly Note that a node cannot jump
past T! If t' t' ?(t) gt T the node fires
and returns to 0
30Previous Theoretical Results
Several groups have proved convergence Mirollo
Strogatz1 N fully connected oscillators Lucarel
li Wang2 N connected oscillators
1. Synchronization of Pulse-Coupled Biological
Oscillators, 1990. 2. Decentralized
Synchronization Protocols with Nearest Neighbor
Communication, Sensys 2004.
31From Theory to Reality
Theory Nodes can instantaneously observe firing
events Reality Communication latencies due to
MAC Problems Time that a node hears a firing
message is delayed from when sender fired Firing
messages may arrive out of order Firing messages
may arrive too late to be useful
32Solutions Measure Delays
Problem Time that a node hears a firing message
is delayed from when sender fired Solution
Quantify send delay through link-level
timestamping
33Solutions Reachback Algorithm
Problems Firing messages may arrive out of
order Firing messages may arrive too late to be
useful Solution Relax instantaneous
communication requirement
34Solutions Reachback Algorithm
Problems Firing messages may arrive out of
order Firing messages may arrive too late to be
useful Solution Relax instantaneous
communication requirement Reachback Firefly
Algorithm (RFA)
35Reachback Firefly Algorithm (RFA)
Nodes do not react immediately to neighbors'
firings 1) During every firing period each node
collects overheard firing messages 2) At the end
of the firing period the node applies a
cumulative jump based on all overheard messages
to the next firing period Nodes take a single
jump at the beginning of each firing period equal
to the sum of all the jumps they would have taken
in the previous firing period
36Coupled Oscillators RFA
37Coupled Oscillators RFA
38Coupled Oscillators RFA
39Coupled Oscillators RFA
40Coupled Oscillators RFA
A hears C fire at tC
41Coupled Oscillators RFA
A hears C fire at tC
42Coupled Oscillators RFA
A hears C fire at tC
43Coupled Oscillators RFA
A hears C fire at tC
44Coupled Oscillators RFA
A hears C fire at tC
45Coupled Oscillators RFA
A hears C fire at tC A hears B fire at tB
46Coupled Oscillators RFA
A hears C fire at tC A hears B fire at tB
47Coupled Oscillators RFA
A hears C fire at tC A hears B fire at tB
48Coupled Oscillators RFA
A hears C fire at tC A hears B fire at tB
49Coupled Oscillators RFA
A hears C fire at tC A hears B fire at tB
50Coupled Oscillators RFA
A hears C fire at tC A hears B fire at tB
51Coupled Oscillators RFA
A hears C fire at tC A hears B fire at tB A
fires,
52Coupled Oscillators RFA
A hears C fire at tC A hears B fire at tB A
fires, returns to 0
53Coupled Oscillators RFA
?TOTAL
A hears C fire at tC A hears B fire at tB A
fires, returns to 0 A computes single jump based
on tC and tB.
In this case ?TOTAL ?(tB - ?(tC)) ?(tC) Not
commutative!
54RFA Phase Plot
T-?T
?3
Strogatz
?2
?1
RFA
?T?1?2?3
T-?T
55RFA Evalution Strategy
Evaluation proceeded on three fronts Theory Pro
ve that RFA converges for 2 oscillators Simulatio
n Experiment with parameter choice in TinyOS
simulator MoteLab Run experiments on real
sensor network testbed (MoteLab)
56Proof Technique Return Map
Let ?A be the phase of oscillator A The Return
Map R(?A,?B) describes how the phases change over
time
57Proof Technique Return Map
Let ?A be the phase of oscillator A The Return
Map R(?A,?B) describes how the phases change over
time
58Proof Technique Return Map
Let ?A be the phase of oscillator A The Return
Map R(?A,?B) describes how the phases change over
time
t 2T
(?A'',?B'') R(?A',?B')
...etc...
59Theoretical Results
For two oscillators A, B, with phases ?A,
?B Using the Return Map R(?A,?B) we prove
that 1. For any e, at some point TSlt8, (?A-
?B) lt e. For e 0.1 sec we call TS the Time to
Synchronicity 2. The state where (?A- ?B) 0 is
a stable fixed point Once the system reaches
synchronicity small perturbations do not disturb
it 3. If the jump function ?(t) t / FFC, then
TS ??FFC When nodes take smaller jumps they take
longer to reach synchronicity
60Implementation Details
RFA implemented as a single TinyOS
component Originally targeted at the Crossbow
MicaZ mote but since easily ported to Mica2,
TelosA/B/TMote Sky
MicaZ
TMote Sky
61Implemented Jump Function
Our implementation used a jump function ?(t) t
/ FFC FFC is the Firing Function Constant
62Simulation Goals
Debug Implementation TOSSIM is a simplified
world no clock skew, no radio contention, no
computation time, etc. Experiment with Parameter
Choice How does the Firing Function Constant)
affect TS? Experiment with Topology How do
less-connected topologies affect TS? How Well
Does it Work? Achievable accuracy
63Evaluation Metrics
How long does it take to reach synchronicity? Tim
e to Sync (TS) time it takes for system to reach
state where nodes are clustered within 0.1 sec
After synchronicity how tight are firing
groups?
64Evaluation Metrics
How long does it take to reach synchronicity? Tim
e to Sync (TS) time it takes for system to reach
state where nodes are clustered within 0.1
sec After synchronicity how tight are firing
groups?
65Evaluation Metrics
How long does it take to reach synchronicity? Tim
e to Sync (TS) time it takes for system to reach
state where nodes are clustered within 0.1
sec After synchronicity how tight are firing
groups? Group Spread (GS) after synchronicity
maximum time delta between two nodes in the same
firing group
66Evaluation Metrics
How long does it take to reach synchronicity? Tim
e to Sync (TS) time it takes for system to reach
state where nodes are clustered within 0.1
sec After synchronicity how tight are firing
groups? Group Spread (GS) after synchronicity
maximum time delta between two nodes in the same
firing group N Percentile Group Spread (N
GS) after synchronicity N of firing groups had
group spread less than this amount
67TOSSIM Results Time to Sync
(grid topology)
1200
1000
800
TS (sec)
600
400
200
20
100
500
50
68TOSSIM Results Accuracy
(all-to-all topology)
4
50 GS 90 GS (msec)
3
2
1
500
750
70
100
1000
69MoteLab Goals
More Reality MoteLab is a testbed of real sensor
network nodes 1) Lossy asymmetric links 2)
Clock skew drift How Well Does it
Work? Achievable accuracy
70 a WSN Testbed
Location of MoteLab nodes Links are colored
according to quality.
Connectivity graph showing links better than 80.
MoteLab Accounts Available! werner_at_eecs.harvard.ed
u
71FTSP Backbone
Problem No Global Clock on MoteLab
72FTSP Backbone
Problem No Global Clock on MoteLab Solution FT
SP Flooding Time Synchronization
Protocol1 Developed at Vanderbilt Promises
time-stamping accuracies in the microsecond
range We used FTSP in order to evaluate the
accuracy of our RFA algorithm on MoteLab
1. The Flooding Time Synchronization Protocol,
Maróti et. al, Sensys 2004.
73FTSP Errors
Data collected on MoteLab
Max FTSP Error (sec)
74RFA on Accuracy
75RFA on Time to Sync
As in simulations TS??FFC
76RFA on Phase Plot
(24 Nodes, 500FFC)
Relative Phase (sec)
Time (sec)
77Effects of Clock Skew
Even if nodes perfectly calculate when next to
fire clock skew will disperse groups
78Effects of Clock Skew
Even if nodes perfectly calculate when next to
fire clock skew will disperse groups Hypothesis
ErrorTOTAL ErrorINSTRINSIC ErrorSKEW
79Effects of Clock Skew
Even if nodes perfectly calculate when next to
fire clock skew will disperse groups Hypothesis
ErrorTOTAL ErrorINSTRINSIC ErrorSKEW(T)
Error due to skew should scale with the period, T
80Clock Skew Results
Very linear effect!
GS (msec)
T (sec)
81Future Work
Improve accuracy of RFA Algorithms to deal with
clock skew
82Conclusions
Biologically-inspired algorithms can be
implemented on sensor network hardware
83Questions?
Questions?
werner_at_eecs.harvard.edu firefly_at_eecs.harvard.edu
84TOSSIM Results Non-convergence
(grid topology)
Synced
85Project Goals
1) Implement biological algorithm on real sensor
network hardware 2) Verify convergence of
Strogatz-like model given real sensor network
radios and oscillators
86Project Non-Goals
Create a time-stamping system to compete with
FTSP1! (In fact, we use FTSP in our evaluation)
1. The Flooding Time Synchronization Protocol,
Maróti et. al, Sensys 2004.
87Outline
1) Models of Synchronicity 2) Reachback Firefly
Algorithm 3) Theoretical Results 4) Simulation
Results 5) Testbed Results