Unleash Your Potential - Namagunga Girls Coding Club
Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)
1. 1Challenge the future
Neighborhood Cardinality Estimation
in Dynamic Wireless Networks
Marco Cattani, M. Zuniga, A. Loukas, K. Langendoen
Embedded Software Group, Delft University of Technology
4. 4Challenge the future
Requirements
• Providing each participant
with a compact, battery
powered device
• Concurrently estimate and
communicate the density of
the crowd
Helping people to avoid areas where density
crosses dangerous thresholds
5. 5Challenge the future
Requirements
• Providing each participant
with a compact, battery
powered device
• Concurrently estimate and
communicate the density of
the crowd neighborhood
cardinality
Helping people to avoid areas where density
crosses dangerous thresholds
6. 6Challenge the future
Existing solutions
Error Scale Energy Concur. Speed
Existing works on cardinality estimation do
not fit our requirements
7. 7Challenge the future
Existing solutions
Error Scale Energy Concur. Speed
RFID Low 1000 Low No Fast
Existing works on cardinality estimation do
not fit our requirements
8. 8Challenge the future
Existing solutions
Error Scale Energy Concur. Speed
RFID Low 1000 Low No Fast
Group testing Low 10 - No V. Fast
Existing works on cardinality estimation do
not fit our requirements
9. 9Challenge the future
Existing solutions
Error Scale Energy Concur. Speed
RFID Low 1000 Low No Fast
Group testing Low 10 - No V. Fast
Neigh. Discovery Low 10 Low Yes Slow
Existing works on cardinality estimation do
not fit our requirements
10. 10Challenge the future
Existing solutions
Error Scale Energy Concur. Speed
RFID Low 1000 Low No Fast
Group testing Low 10 - No V. Fast
Neigh. Discovery Low 10 Low Yes Slow
Mobile phones High 10 High Yes Fast
Existing works on cardinality estimation do
not fit our requirements
11. 11Challenge the future
Existing solutions
Error Scale Energy Concur. Speed
RFID Low 1000 Low No Fast
Group testing Low 10 - No V. Fast
Neigh. Discovery Low 10 Low Yes Slow
Mobile phones High 10 High Yes Fast
Estreme Low 100s Low Yes Fast
Existing works on cardinality estimation do
not fit our requirements
17. 17Challenge the future
The basic idea
The more devices (that periodically generate
an event), the shorter is the inter-arrival time
1
2
7
Period
Inter-arrival time
Event
18. 18Challenge the future
The basic idea
The more devices (that periodically generate
an event), the shorter is the inter-arrival time
1
2
3
7
19. 19Challenge the future
The basic idea
The more devices (that periodically generate
an event), the shorter is the inter-arrival time
1
2
4
5
3
7
20. 20Challenge the future
The basic idea
The more devices (that periodically generate
an event), the shorter is the inter-arrival time
1
2
4
5
3
6
7
21. 21Challenge the future
Model
E(n) = ( period / cardinality )
Given N devices (that periodically generate an
event), the expected inter-arrival length (n) is
22. 22Challenge the future
Model
E(n) = ( period / cardinality )
inverting
Cardinality = ( period / n ) – 1
Given N devices (that periodically generate an
event), the expected inter-arrival length (n) is
23. 23Challenge the future
Model
E(n) = ( period / cardinality )
inverting
Cardinality = ( period / n ) – 1
Given N devices (that periodically generate an
event), the expected inter-arrival length (n) is
ESTREME
25. 25Challenge the future
Implementation
• Duty cycling
Apply Estreme
• Periodic event: wakeup
We implemented Estreme in Contiki OS, on top
of an asynchronous low-power listening MAC
1
2
rendezvous
B1 BB
4 A1
3
inter-
arrival
26. 26Challenge the future
Implementation
• Duty cycling
• Low-power listening
• First (next) awake neighbor
Apply Estreme
• Periodic event: wakeup
• Inter-arrival: rendezvous
We implemented Estreme in Contiki OS, on top
of an asynchronous low-power listening MAC
1
2
rendezvous
B1 BB
4 A1
3
inter-
arrival
27. 27Challenge the future
Implementation
• Detect collision
• Retransmit the last ACK with
a given probability
Nodes must rendezvous with the first awake
neighbor
A1
B B1
2
rendezvous
B1 BB
4 A1
3
inter-
arrival
A1
delay
28. 28Challenge the future
Implementation
• Detect collision
• Retransmit the last ACK with
a given probability
• Accurate timing
• Measure delay
Still, due to delays, the rendezvous time is
longer than the inter-arrival time
A1
B1
2
rendezvous
B1 BB
4 A1
3
inter-
arrival
A1
delays
29. 29Challenge the future
Implementation
• Detect collision
• Retransmit the last ACK with
a given probability
• Accurate timing
• Measure delay
Still, due to delays, the rendezvous time is
longer than the inter-arrival time
A1
B1
2
rendezvous
B1 BB
4 A1
3
inter-
arrival
A1
delays
30. 30Challenge the future
Implementation
• Detect collision
• Retransmit the last ACK with
a given probability
• Accurate timing
• Measure delay
Still, due to delays, the rendezvous time is
longer than the inter-arrival time
A1
B1
2
rendezvous
B1 BB
4 A1
3
inter-
arrival
A1
delays
31. 31Challenge the future
Implementation
• Detect collision
• Retransmit the last ACK with
a given probability
• Accurate timing
• Measure delay
Still, due to delays, the rendezvous time is
longer than the inter-arrival time
A1
B1
2
rendezvous
B1 BB
4 A1
3
inter-
arrival
A1
delays
32. 32Challenge the future
A1
B1
2
rendezvous
B1 BB
4 A1
3
inter-
arrival
A1
delays
Implementation
• Detect collision
• Retransmit the last ACK with
a given probability
• Accurate timing
• Measure delay
• Append delay to
acknowledgments
Still, due to delays, the rendezvous time is
longer than the inter-arrival time
33. 33Challenge the future
Implementation
• Detect collision
• Retransmit the last ACK with
a given probability
• Accurate timing
• Measure delay
• Append delay to
acknowledgments
Still, due to delays, the rendezvous time is
longer than the inter-arrival time
A1
B1
2
rendezvous
B1 BB
4 A1
3
inter-
arrival
A1
delays
34. 34Challenge the future
Tight bound
Effects of a delay (ε) in the measurements on
the estimation error (e)
Ε[e]= Θ −
ρ
1+ ρ
$
%
&
'
(
) , ρ =
ε(n +1)
period
35. 35Challenge the future
Tight bound
1. To reduce the error we want ρ to be as small as possible.
A longer delay ε, increases the estimation error (under-
estimation).
Effects of a delay (ε) in the measurements on
the estimation error (e)
Ε[e]= Θ −
ρ
1+ ρ
$
%
&
'
(
) , ρ =
ε(n +1)
period
36. 36Challenge the future
Tight bound
2. Given a fixed delay, a shorter period increases the
estimation error
Effects of a delay (ε) in the measurements on
the estimation error (e)
Ε[e]= Θ −
ρ
1+ ρ
$
%
&
'
(
) , ρ =
ε(n +1)
period
37. 37Challenge the future
Tight bound
3. Given a fixed delay, with more devices, the estimation error
increases
Effects of a delay (ε) in the measurements on
the estimation error (e)
Ε[e]= Θ −
ρ
1+ ρ
$
%
&
'
(
) , ρ =
ε(n +1)
period
38. 38Challenge the future
Tight bound
4. Estreme requires sub-millisecond accuracy. Example:
Period = 1 s, n = 100 neighbors, ε = 1 ms à 9% error
Effects of a delay (ε) in the measurements on
the estimation error (e)
Ε[e]= Θ −
ρ
1+ ρ
$
%
&
'
(
) , ρ =
ε(n +1)
period
39. 39Challenge the future
Implementation
• T-Estreme (Time)
• Periodically measure the
inter-arrival times
• Average the last
measured samples (n)
Nodes must collect several inter-arrival times
(samples) to estimate the cardinality
2
3 2 3 4 3
1
2 2 1 3 2
B
A
40. 40Challenge the future
Implementation
• T-Estreme (Time)
• Periodically measure the
inter-arrival times
• S-Estreme (Space)
• Periodically exchange
average inter-arrivals
Nodes must collect several inter-arrival times
(samples) to estimate the cardinality
2
3 2 3 4 3
1
2 2 1 3 2
B
A
2
3
45. 45Challenge the future
Evaluation
• Inspired by most recent works in group testing protocols
• On-demand cardinality estimator based on rounds
• Each round, nodes answer with a decreasing probability
• Count number of non-empty rounds (RSSI)
PROS: fast and resilient to collisions
CONS: sensitive to noise, only one estimator
Compared Estreme to a state-of-the-art
technique (Baseline)
46. 46Challenge the future
Accuracy in static scenarios
1) At low cardinalities, Estreme is comparable
to state-of-the-art techniques
10 15 20 30 40 50 60 80 100
0
0.2
0.4
0.6
neighborhood cardinality
relativeerror
T−Estreme S−Estreme Baseline
47. 47Challenge the future
Accuracy in static scenarios
2) At higher cardinalities, Estreme is way
better than the state-of-the-art
10 15 20 30 40 50 60 80 100
0
0.2
0.4
0.6
neighborhood cardinality
relativeerror
T−Estreme S−Estreme Baseline
48. 48Challenge the future
Accuracy in static scenarios
3) Estreme’ s accuracy is stable across
different cardinalities
10 15 20 30 40 50 60 80 100
0
0.2
0.4
0.6
neighborhood cardinality
relativeerror
T−Estreme S−Estreme Baseline
49. 49Challenge the future
Tight bound
3. Given a fixed delay, with more devices, the estimation error
increases
Effects of a delay (ε) in the measurements on
the estimation error (e)
Ε[e]= Θ −
ρ
1+ ρ
$
%
&
'
(
) , ρ =
ε(n +1)
period
50. 50Challenge the future
Accuracy in static scenarios
Why is the estimation accuracy stable across
all the densities?
0
200
10 15 20
0
200
30 40 50
−40 0 40
0
200
60
−40 0 40
80
−40 0 40
100
Count
Deviation from expected value [ms]
Cardinality
51. 51Challenge the future
Estimation characteristics
S-Estreme provide a smoother signal, but
suffers when the cardinality changes in space
0
50
100
150
nodes
cardinality
L R
T−Estreme S−Estreme Ground truth
52. 52Challenge the future
Adaptability to changes
Under network dynamics, Estreme adapts to
sudden cardinality changes in few minutes
0 15 30 45 60 75 90
0
50
100
150
time (minutes)
cardinality
T−Estreme S−Estreme Ground truth
53. 53Challenge the future
Adaptability to changes
An hybrid solution provides the right
trade-off between crispness and smoothness
0 5 10 15 20 25 30 35 40 45
0
50
100
150
L R
time (minutes)
cardinality
T−Estreme S−Estreme Hybrid G.Truth