This document discusses self-awareness in extremely distributed wireless sensor networks. It describes how such networks can utilize duty-cycled communication to save energy while maintaining synchronization. At the system level, algorithms are proposed for cluster merging and synchronization. Gossip-based data dissemination is discussed as a building block for application-level awareness, allowing local decision making. Remaining challenges are noted around ensuring information dissemination in crowded network conditions.
Self-Awareness in Extremely Resource-Constrained Wireless Networks
1. Self-Awareness in 8 KB and 7 ms
Maarten van Steen
VU University Amsterdam
Dept. Computer Science
The Network Institute
1 / 36
Background The facilitators Background The facilitators
The facilitators: increasingly smaller nodes
Plug computer Smart phones
Crossbow mote MyriaNed
2 / 36 2 / 36
Background The facilitators Background The facilitators
The facilitators: increasingly smaller nodes
A TinyOS watch (thanks to Univ. Warsaw)
3 / 36 3 / 36
2. Background The facilitators Background The facilitators
Extreme Wireless Distributed Systems
In what sense extreme?
Scale (size #1): extremely large system: 1000s to 100,000s of
wireless nodes
Scale (size #2): potentially extremely small nodes: severely,
resource-constrained devices
Additional characteristics
Highly dynamic: nodes join/leave/move
Highly heterogeneous: many different communication protocols
and different types of nodes
Large parts of the underlying communication network fairly
unreliable with asymmetric links
In essence a sparse network compared to the wired case.
4 / 36 4 / 36
Background The facilitators Background The facilitators
General architecture
Applications
External
Wireless/hybrid network feedback
system
Sensors/actuators
Architecture
Network consists of many different (wireless) devices
Sensor/actuators may be shared between applications
External feedback system: reasoning component for apps & network
that cannot be (easily) handled through in-network processing
5 / 36 5 / 36
Background Problems Background Problems
Well-known problems: Resource constraints
Algorithmic requirements
Energy awareness:
Duty cycles â synchronization problems
Periodic algorithms
Preferred: fewer messages, but each with âlotsâ of data
Simplicity of algorithms:
No time/memory/energy for sophisticated computations (e.g.: no
crypto?)
Donât be too simple, but cleverly optimize (e.g., cross-layer design)
6 / 36 6 / 36
3. Background Problems Background Problems
Well-known problems: Wireless communication
False assumptions
Unit disk radio patterns
Links are symmetric
Links are reliable
Link quality is stable
7 / 36 7 / 36
Background Problems Background Problems
Overview
1 Background
The facilitators
Problems
2 Application scenarios
Crowds
Social games
3 System-level self-awareness
Duty-cycled networks
Decision
NotiïŹcation
4 Application-level self-awareness
Gossip-based ad hoc routing
What we need to discover
8 / 36 8 / 36
Application scenarios Crowds Application scenarios Crowds
Application scenarios: crowds
Crowd management
Situation: a large event without ïŹxed routes (trade fair, festival)
Goal: guide people using social information:
Direct people having similar interests to the same locations
Direct the same social group to the same place (scheduling)
Goal: keep groups together (such as a family)
9 / 36 9 / 36
4. Application scenarios Crowds Application scenarios Crowds
Very different types of crowds
structured unstructured
semi-structured semi-structured
10 / 36 10 / 36
Application scenarios Social games Application scenarios Social games
Application scenarios: social games
Stimulate mingling
Situation: Conference with people from
different groups.
Goal: Stimulate people from different groups
to interact.
Approach: Keep track of group interactions:
When Maarten from Amsterdam talks to
Marco from Groningen: bonus points for
either one, as well as their respective
groups.
Group points are distributed to each
member.
Mingling achievements are displayed on
electronic badges (feedback and social
intervention).
11 / 36 11 / 36
Application scenarios Social games Application scenarios Social games
Application scenarios: social games
ATxmega CPU (32 MHz): 4 KB
EEPROM, 8 KB SRAM, 128 KB
Flash
USB/JTag connectors
8 MB external data ïŹash (good for
logging)
various sensors (light, accelerometer,
microphone)
FYI
We have been running many simulations, but also experiments with up
to nearly 250 badges.
12 / 36 12 / 36
5. Application scenarios Social games Application scenarios Social games
30 years of Informatics in Amsterdam
13 / 36 13 / 36
Overview
1 Background
The facilitators
Problems
2 Application scenarios
Crowds
Social games
3 System-level self-awareness
Duty-cycled networks
Decision
NotiïŹcation
4 Application-level self-awareness
Gossip-based ad hoc routing
What we need to discover
14 / 36 14 / 36
System-level self-awareness System-level self-awareness
System-level self-awareness
Some observations
With (tens, hundreds of) thousands of nodes, there is no way that
traditional sensor-network techniques can be used for:
extracting sensed data for real-time, ofïŹine processing
routing messages between (distant) nodes
discovering properties of the network (size, topology, etc.)
Sensor badges need to be small:
small, low-capacity batteries
strict energy budgets
15 / 36 15 / 36
6. System-level self-awareness Duty-cycled networks System-level self-awareness Duty-cycled networks
Example: Duty-cycled networks
Essence
Nodes simultaneously power on their radios only periodically in order
to communicate:
Can lead to substantial energy savings
Algorithms tend to have a strong periodic nature
Algorithms are often necessarily simple: you may need to ïŹnish by
the end of the duty cycle
Our interest: extreme low duty cycles (less than 1% of the time
active).
16 / 36 16 / 36
System-level self-awareness Duty-cycled networks System-level self-awareness Duty-cycled networks
Duty Cycling
Crucial problem
Clocks tend to drift....
(a)
(b)
(c)
17 / 36 17 / 36
System-level self-awareness Duty-cycled networks System-level self-awareness Duty-cycled networks
TDMA-based Media Access
frame
slot
RX RX TX RX Idle Idle Idle Join Idle Idle Idle Idle
Guard time TX time Guard time Node A
RX Time Node B
tick
Offset between nodes
1 tick = 1/32768 secs â 30”secs
1 slot = 28 ticks â 850”secs
Frame length is a parameter
18 / 36 18 / 36
7. System-level self-awareness Duty-cycled networks System-level self-awareness Duty-cycled networks
GMACâs Duty-cycled TDMA protocol
frame
slot
RX RX TX RX Idle Idle Idle Join Idle Idle Idle Idle
Guard time TX time Guard time Node A
RX Time Node B
tick
Offset between nodes
Active period: 8 slots (i.e., 6.8 millisecs), frame length: 1170 slots â
8
duty cycle: 1170 = 0.68%.
For each frame length, nodes select a random slot in the active period to
broadcast, and listen to the other 7.
Nodes broadcast a join message during a random slot in the idle period.
19 / 36 19 / 36
System-level self-awareness Duty-cycled networks System-level self-awareness Duty-cycled networks
Frame Synchronization
r r+1
Two distinct aspects of synchronization
Maintenance of synchronized clusters
Merging of separate clusters
20 / 36 20 / 36
System-level self-awareness Duty-cycled networks System-level self-awareness Duty-cycled networks
Synchronization maintenance: the median algorithm
median average
offset from local clock
1 Sort all received messages by offset from local clock
2 Choose the median offset to synchronize with
3 Adjust local clock by one-half the median offset
Observation
Works good enough; improvements are possible allowing for lower
duty cycles.
21 / 36 21 / 36
8. System-level self-awareness Duty-cycled networks System-level self-awareness Duty-cycled networks
Cluster merging
r r+1
Three subproblems
Detection
Decision
NotiïŹcation
22 / 36 22 / 36
System-level self-awareness Duty-cycled networks System-level self-awareness Duty-cycled networks
Active detection
1 The sensor network is partitioned into two temporally disjoint
clusters, red and blue
2 A node from the red cluster node broadcasts a join message
during its idle period
3 Several blue cluster nodes neighboring the red node receive the
message and merge
23 / 36 23 / 36
System-level self-awareness Duty-cycled networks System-level self-awareness Duty-cycled networks
Passive detection
1 The sensor network is partitioned into two temporally disjoint
clusters, red and blue
2 Red cluster node broadcasts a normal application message
during its active period
3 A single blue cluster node is listening in its idle period, receives
the message, and merges
24 / 36 24 / 36
9. System-level self-awareness Decision System-level self-awareness Decision
Decision
r r+1
Observation
Decision algorithm should implement a total-ordering relation over
clusters: A B â cluster A is superior to cluster B.
Wrong example: âJoin if Iâm active in X âs ïŹrst half round.â
All nodes have a unique hardware ID
Nodes use this unique ID as their cluster ID at startup
The ordering of IDs (integers) provides a total ordering of clusters
25 / 36 25 / 36
System-level self-awareness NotiïŹcation System-level self-awareness NotiïŹcation
Active detection with notiïŹcation
1 The sensor network is partitioned into two temporally disjoint
clusters, with red blue.
2 A node from the red cluster node broadcasts a join message
during its idle period
3 Several blue cluster nodes receive the message, but stay
synchronized to their current cluster for one frame before merging
26 / 36 26 / 36
System-level self-awareness NotiïŹcation System-level self-awareness NotiïŹcation
Active detection with notiïŹcation
1 All merging blue nodes notify their neighbors (via a ïŹeld in an
application message) of the superior red cluster
2 The merging nodes ïŹnally complete their merge, while the ïŹnal
blue node begins the same process
27 / 36 27 / 36
10. System-level self-awareness NotiïŹcation System-level self-awareness NotiïŹcation
Active detection with targeted joins
1 The sensor network is partitioned into two temporally disjoint
clusters, but now blue red.
2 A node from the red cluster node broadcasts a join message
during its idle period
3 Several blue cluster nodes receive the message, but will now
send a join message during the red nodeâs active period.
28 / 36 28 / 36
System-level self-awareness NotiïŹcation System-level self-awareness NotiïŹcation
Evaluation: Active versus passive detection
Active detection Passive detection
100 000
standard deviation ( sec)
10 000
1000
100
10
2000 Time (rounds) 8000 2000 Time (rounds) 8000
29 / 36 29 / 36
System-level self-awareness NotiïŹcation System-level self-awareness NotiïŹcation
Evaluation: Active detection with targeted joins
Active detection Active + Merge + Target
1
Fraction synchronized nodes
Low density
Moderate density
High density
0
Time (rounds) 3000 Time (rounds) 3000
Observation
Self-awareness at the system level in WSNs is all about about ïŹnding
the right reactive (simple) algorithms.
30 / 36 30 / 36
11. Overview
1 Background
The facilitators
Problems
2 Application scenarios
Crowds
Social games
3 System-level self-awareness
Duty-cycled networks
Decision
NotiïŹcation
4 Application-level self-awareness
Gossip-based ad hoc routing
What we need to discover
31 / 36 31 / 36
Application-level self-awareness Application-level self-awareness
Information dissemination as a building block
Observations
Extreme geospatial distributed systems require decentralized
solutions:
In geospatial systems (including wireless systems), each node has
a location in a 2D (or 3D) plane
Latency is a nonnegligible factor â centralized solutions may
impose unacceptable request/response delays
We also need to minimize the dependencies between nodes
Essential: let nodes make decisions based on as much current,
locally available information as needed/possible
Important
By supporting efïŹcient and effective information dissemination, we
provide a building block for local-only decision-making. This brings us
to gossiping.
32 / 36 32 / 36
Application-level self-awareness Gossip-based ad hoc routing Application-level self-awareness Gossip-based ad hoc routing
Gossip-based data dissemination
From ïŹooding to gossiping: Basic model
Each node can broadcast data items only to its 1-hop neighbor.
A source injects (broadcasts) a data item.
A node receives data item x â broadcast x with probability p.
ModiïŹcation
When the source has only few neighbors, a data item may not be
forwarded at all â for the ïŹrst k hops, a received data item is
broadcast with probability 1.
33 / 36 33 / 36
12. Application-level self-awareness Gossip-based ad hoc routing Application-level self-awareness Gossip-based ad hoc routing
Improving data dissemination
Observation
If messaging does not die out, i.e., most of the nodes are reached â
with n neighbors expect to see approximately p · n messages from
those neighbors (assuming ideal communication medium).
Improvement
If a node does not see a message from at least m neighbors, it
broadcasts the message if it hadnât done so before. It turns out that
m = 1 is (often) good enough!
Note
This type of gossiping is great, but when it comes to crowded networks
a lot of ïŹne-tuning and local feedback is needed to avoid a collapse.
34 / 36 34 / 36
Application-level self-awareness What we need to discover Application-level self-awareness What we need to discover
The speculative part
35 / 36 35 / 36
Application-level self-awareness What we need to discover Application-level self-awareness What we need to discover
Questions
36 / 36 36 / 36