Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

55
1 Challenge the future Neighborhood Cardinality Estimation in Dynamic Wireless Networks Marco Cattani , M. Zuniga, A. Loukas, K. Langendoen Embedded Software Group, Delft University of Technology

description

More: http://cattanimarco.com/2014/01/23/lightweight-neighborhood-cardinality-estimation-in-dynamic-wireless-networks/

Transcript of Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

Page 1: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

1 Challenge the future

Neighborhood Cardinality Estimation in Dynamic Wireless Networks

Marco Cattani, M. Zuniga, A. Loukas, K. Langendoen Embedded Software Group, Delft University of Technology

Page 2: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

2 Challenge the future

Motivations

Improve safety of people during an outdoor festival

© Alex Prager

Page 3: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

3 Challenge the future

Motivations

Helping people to avoid areas where density crosses dangerous thresholds

© Alex Prager

Page 4: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

4 Challenge 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

Page 5: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

5 Challenge 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

Page 6: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

6 Challenge the future

Existing solutions

Error Scale Energy Concur. Speed

Existing works on cardinality estimation do not fit our requirements

Page 7: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

7 Challenge 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

Page 8: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

8 Challenge 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

Page 9: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

9 Challenge 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

Page 10: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

10 Challenge 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

Page 11: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

11 Challenge 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

Page 12: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

12 Challenge the future

Estreme’s mechanism

Page 13: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

13 Challenge the future

The basic idea

When a room get crowded, the more persons the less is the personal space (in orange)

Person

Personalspace

Page 14: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

14 Challenge the future

The basic idea

When a room get crowded, the more persons the less is the personal space (in orange)

Page 15: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

15 Challenge the future

The basic idea

When a room get crowded, the more persons the less is the personal space (in orange)

Page 16: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

16 Challenge the future

The same idea applies in time.

Page 17: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

17 Challenge the future

The basic idea

The more devices (that periodically generate an event), the shorter is the inter-arrival time

12

7

Period

Inter-arrival time

Event

Page 18: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

18 Challenge the future

The basic idea

The more devices (that periodically generate an event), the shorter is the inter-arrival time

123

7

Page 19: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

19 Challenge the future

The basic idea

The more devices (that periodically generate an event), the shorter is the inter-arrival time

12

45

3

7

Page 20: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

20 Challenge the future

The basic idea

The more devices (that periodically generate an event), the shorter is the inter-arrival time

12

45

3

67

Page 21: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

21 Challenge the future

Model

12

45

3

67

E(n) = ( period / cardinality )

Given N devices (that periodically generate an event), the expected inter-arrival length (n) is

Page 22: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

22 Challenge the future

Model

12

45

3

67

E(n) = ( period / cardinality )

inverting

Cardinality = ( period / n ) – 1

Given N devices (that periodically generate an event), the expected inter-arrival length (n) is

Page 23: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

23 Challenge the future

Model

12

45

3

67

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

Page 24: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

24 Challenge the future

Implementation

Page 25: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

25 Challenge 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

Page 26: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

26 Challenge 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

Page 27: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

27 Challenge 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

Page 28: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

28 Challenge 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

Page 29: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

29 Challenge 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

Page 30: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

30 Challenge 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

Page 31: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

31 Challenge 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

Page 32: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

32 Challenge 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

Page 33: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

33 Challenge 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

Page 34: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

34 Challenge the future

Tight bound

Effects of a delay (ε) in the measurements on the estimation error (e)

Ε[e]=Θ −ρ1+ ρ

$

%&

'

() , ρ =

ε (n+1)period

Page 35: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

35 Challenge 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

Page 36: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

36 Challenge 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

Page 37: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

37 Challenge 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

Page 38: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

38 Challenge 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

Page 39: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

39 Challenge 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

Page 40: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

40 Challenge 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

Page 41: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

41 Challenge the future

Evaluation

Page 42: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

42 Challenge the future

Evaluation

020406080

100

card

inal

ity

node positions

L R

Our testbed consists of 100 nodes with MSP430 processors and CC1101 transceivers

Page 43: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

43 Challenge the future

Evaluation

020406080

100

card

inal

ity

node positions

L R

It offers a wide range of neighborhood cardinalities

Page 44: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

44 Challenge the future

Evaluation

020406080

100

card

inal

ity

node positions

L R

And a long transmission range. This means high cardinalities, but also drastic changes!

Page 45: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

45 Challenge 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)

Page 46: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

46 Challenge 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 1000

0.2

0.4

0.6

neighborhood cardinality

rela

tive

erro

r

T−Estreme S−Estreme Baseline

Page 47: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

47 Challenge 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 1000

0.2

0.4

0.6

neighborhood cardinality

rela

tive

erro

r

T−Estreme S−Estreme Baseline

Page 48: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

48 Challenge the future

Accuracy in static scenarios

3) Estreme’ s accuracy is stable across different cardinalities

10 15 20 30 40 50 60 80 1000

0.2

0.4

0.6

neighborhood cardinality

rela

tive

erro

r

T−Estreme S−Estreme Baseline

Page 49: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

49 Challenge 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

Page 50: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

50 Challenge 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 400

200 60

−40 0 40

80

−40 0 40

100

Coun

t

Deviation from expected value [ms]

Cardinality

Page 51: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

51 Challenge the future

Estimation characteristics

S-Estreme provide a smoother signal, but suffers when the cardinality changes in space

0

50

100

150

nodes

card

inal

ity

L R

T−Estreme S−Estreme Ground truth

Page 52: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

52 Challenge the future

Adaptability to changes

Under network dynamics, Estreme adapts to sudden cardinality changes in few minutes

0 15 30 45 60 75 900

50

100

150

time (minutes)

card

inal

ity

T−Estreme S−Estreme Ground truth

Page 53: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

53 Challenge 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 450

50

100

150

L R

time (minutes)

card

inal

ity

T−Estreme S−Estreme Hybrid G.Truth

Page 54: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

54 Challenge the future

Conclusions

Problem Neighborhood Cardinality Estreme Generic Framework Implementation Cooperative Behaviors Evaluation Accurate and Agile

Page 55: Lightweight Neighborhood Cardinality Estimation in Dynamic Wireless Networks (IPSN 2014)

55 Challenge the future

Conclusions

Problem Neighborhood Cardinality Estreme Generic Framework Implementation Cooperative Behaviors Evaluation Accurate and Agile