• No results found

Evaluation of an Algorithm used in Routing and Service Discovery Protocols of Wireless Sensor Networks The Trickle Algorithm

N/A
N/A
Protected

Academic year: 2021

Share "Evaluation of an Algorithm used in Routing and Service Discovery Protocols of Wireless Sensor Networks The Trickle Algorithm"

Copied!
34
0
0

Loading.... (view fulltext now)

Full text

(1)

Evaluation of an Algorithm used in

Routing and Service Discovery Protocols

of Wireless Sensor Networks

The Trickle Algorithm

Markus Becker

[email protected]

ComNets, TZI, University Bremen, Germany

(2)

Outline

IETF Protocol Stack for Wireless Sensor Networks Routing Protocol for Low power and Lossy Networks Trickle Algorithm

Simulation Analytical Model Evaluation

(3)

The Internet Engineering Task Force protocol stack for

Wireless Sensor Networks

(4)

The Internet Engineering Task Force protocol stack for

Wireless Sensor Networks

USB

802.15.

4

80

2.3

WSN node Border Router Node Border Router Host Internet Host

6LoWPAN: IPv6 over Low power Wireless Personal Area Network AM: Active Messaging

CoAP: Constrained Application Protocol IP: Internet Protocol

PPP: Point-to-Point Protocol

RPL: Routing Protocol for Low power and Lossy Networks TCP: Transmission Control Protocol

(5)

The Internet Engineering Task Force protocol stack for

Wireless Sensor Networks

PPP Interface USB 802.15. 4 80 2.3

WSN node Border Router Node Border Router Host Internet Host

6LoWPAN: IPv6 over Low power Wireless Personal Area Network AM: Active Messaging

CoAP: Constrained Application Protocol IP: Internet Protocol

MAC: Medium Access Control PHY: Physical Layer

PPP: Point-to-Point Protocol

RPL: Routing Protocol for Low power and Lossy Networks TCP: Transmission Control Protocol

UDP: User Datagram Protocol WSN: Wireless Sensor Network

(6)

The Internet Engineering Task Force protocol stack for

Wireless Sensor Networks

PPP Interface USB 802.15. 4 80 2.3

WSN node Border Router Node Proxy Internet Host

6LoWPAN: IPv6 over Low power Wireless Personal Area Network AM: Active Messaging

CoAP: Constrained Application Protocol IP: Internet Protocol

PPP: Point-to-Point Protocol

RPL: Routing Protocol for Low power and Lossy Networks TCP: Transmission Control Protocol

(7)

Routing Protocol for Low power and Lossy Networks

I IETF RFC 6206 and 6550...6554

I RFC 6206: The Trickle Algorithm

I RFC 6550: Routing Protocol RPL

I RFC 6551: Routing Metrics

I RFC 6552: Objective Function

I RFC 6553: IPv6 Option for RPL

I RFC 6554: IPv6 Routing Header for RPL

I Low power and Lossy Networks (LLN) consist Border

Router (BR), Router (R) and Host (H) nodes

I H choose only the default router

I RPL operates only within an LLN and terminates at BR

(8)

RPL: Upward Routes

I DIO: Destination-Oriented Directed Acyclic Graph

Information Object

I DIO announces upward routes (Routes to the BR)

(9)

Trickle Algorithm: Variables and Constants

I Variables

τ Communication interval length

T Timer value in range [τ /2,τ]

C Communication counter

I Constants

K Redundancy constant

τL Lowestτ

τH Highestτ

Note: Notation according to the original Trickle paper: P. Levis, N. Patel, D. Culler, S. Shenker: ’Trickle: A Self-Regulating Algorithm for Code Propagation and Maintenance in Wireless Sensor Networks’ in NSDI’04 Proceedings.

(10)

Trickle Algorithm: Rules

I τ expires

→Doubleτ, up toτH, pick a new T from range [τ /2,τ]

I T expires

→If C < K, transmit

I Received consistent data

→Increment C

I Received inconsistent data

(11)

Simulation Scenarios

I Line scenario with Closest

Pattern Matching Propagation Model (’Line-CPM’)

I Grid scenario (’Grid’)

I Varying number of nodes

I Varying inter-node

(12)

Simulation Execution

I TinyOS application with 6LoWPAN implementationblip

I Simulation toolTOSSIM

I blipextended for simulations

(13)

Analytical Models

I Number of Messages

(14)

Analytical Models

I Number of Messages

(15)

Trickle Algorithm

Trickle algorithm in Line-Direct scenario: τL 0 0. Hop 1. Hop 2. Hop 3. Hop

(16)

Analytical Model: Consistency Time

Modelling consistency time for the Line scenario

τL 2τL 3τL (1) τL 2τL 3τL 1 τL 2τL 3τL 1 τL 2τL 3τL 1 0. Hop: No Delay 1. Hop: Uniformly

distributed delay 2. Hop: Addition of 2 uniformly distributed delays -> Triangle 3. Hop: Addition of 1 uniformly distributed delay and triangle

Central limit theorem: mean of summation of i.i.d. random variables, each with finite mean and variance, will be approximately normally distributed

τL 2τL 3τL

(1/4)

1/4 1/4 1/4

τL 2τL 3τL

(17)

Analytical Model: Consistency Time

Modelling consistency time for the Line scenario

τL 2τL 3τL (1) τL 2τL 3τL 1 τL 2τL 3τL 1 τL 2τL 3τL 1 0. Hop: No Delay 1. Hop: Uniformly

distributed delay 2. Hop: Addition of 2 uniformly distributed delays -> Triangle 3. Hop: Addition of 1 uniformly distributed delay and triangle

Central limit theorem: mean of summation of i.i.d. random variables, each with finite mean and variance, will be approximately normally distributed

τL 2τL 3τL

(1/4)

1/4 1/4 1/4

(18)

Analytical Model: Consistency Time

The probability density function (pdf) of the time to consistency scenario can be modeled in detail by

p(t)= N1 N−1 P h=0 C−1 P c=0 N−1 P a=1 fh,c,a(t)·ph,c,a(t), where h: hops c: Trickle cycle

a: number of 1-hop ancestors closer to source N: total number of nodes

(19)

Analytical Model: Consistency Time

p(t)= N1 N−1 P h=0 C−1 P c=0 N−1 P a=1 fh,c,a(t)·ph,c,a(t), where fh,c,a=1(t)=                      δ(t) ,h=0, L−1{L{Θ(tτL 2)−Θ(t−τL)}h} ,h≥1,c=0 Θ(t−τL·(2c+1−1)−τ2L ·2c) −Θ(t−τL·(2c+1−1)) ,h=1,c≥0 L−1{L{Θ(tτL 2)−Θ(t−τL)}h−c· L{Θ(t−2τL)−Θ(t−3τL)}c} ,h>1,0<c<h.

Θ(·)denotes the Heaviside step function. Ldenotes the

Laplace transform andL−1denotes the inverse Laplace

(20)

Analytical Model: Consistency Time

f

h,c,a

(

t

)

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 t [s] 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 p ( t ) Distributions ph,c,a(t) h=1, a=0 c= 0 1 2 3 4 0 2 4 6 8 10 12 14Time t [s]16 18 20 22 24 26 28 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 p ( t ) Distributions ph,c,a(t) c=0, a=0 h= 0 1 2 3 4 5 6 7 8

(21)

Analytical Model: Consistency Time

f

h,c,a

(

t

)

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 Time t [s] 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 p ( t ) Distributions ph,c,a(t) c=0 h=0, a=0 h=0, a=1 h=0, a=2 h=1, a=0 h=1, a=1 h=1, a=2 h=2, a=0 h=2, a=1 h=2, a=2 h=3, a=0 h=3, a=1 h=3, a=2 h=4, a=0 h=4, a=1 h=4, a=2 h=5, a=0 h=5, a=1 h=5, a=2 h=6, a=0 h=6, a=1 h=6, a=2 h=7, a=0 h=7, a=1 h=7, a=2 h=8, a=0 h=8, a=1 h=8, a=2

The distribution fora6=1

can be calculated from the cdf given by

1−(1−P(X ≤x))aof

(22)

Analytical Model: Consistency Time

f

h,c,a

(

t

)

0 2 4 6 8 10 12 Time 14 t [s]16 18 20 22 24 26 28 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 p ( t ) Distributions ph,c,a(t) h=2, a=0 c= 0 1 2 3 4 5

Figure:Probability Density Function

forh=2,a=0,cvaried 0 2 4 6 8 10 12 14Time t [s]16 18 20 22 24 26 28 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 p ( t ) Distributions ph,c,a(t) h=3, a=0 c= 0 1 2 3 4 5

Figure:Probability Density Function

(23)

Analytical Model: Consistency Time

p

h,c,a

(t

)

PRR1 PRR1 PRR1 PRR2 PRR2 PRR3 0 20 40 60 Distance [m]80 100 120 140 160 180 0.00 0.05 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 0.951.00 PRR

(24)

Algorithm for Analytical Model

I calc_base_dists()

I calc_prr() I calc_neigh(prr)

I calc_tx_outcomes(neighbors, prr)

I calc_hopcounts(prr, inject_node, trickle_k, neighbors, scenario)

I calc_hopcounts_next_cycles(hopcounts)

I calc_neighbors_hop_closer(hopcounts, prr, trickle_k) I calc_prob_mix_from_hopcount(hopcounts)

(25)

Simulation & Analytical Model: Parameters

The Trickle settings for the following results are:

I τL=2 s

I τH =32 s

(26)

Simulation & Analytical Model: Line 9, K = 1

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

No

de

s c

on

sis

te

nt

P ( T ≤ t )

Model Time to Consistency (cdf)

(#Nodes: 9, K: 1)

Distance [m]

10

20

30

40

50

60

70

80

90

100

110

115

120

125

130

135

140

145

analytical

simulated

(27)

Simulation & Analytical Model: Line 9, K = 3

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28

Model Time

t

[s]

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

No

de

s c

on

sis

te

nt

P ( T ≤ t )

Model Time to Consistency (cdf)

(#Nodes: 9, K: 3)

Distance [m]

10

20

30

40

50

60

70

80

90

100

110

115

120

125

130

135

140

145

analytical

simulated

(28)

Simulation & Analytical Model: Line 9, K = 9

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

No

de

s c

on

sis

te

nt

P ( T ≤ t )

Model Time to Consistency (cdf)

(#Nodes: 9, K: 9)

Distance [m]

10

20

30

40

50

60

70

80

90

110

115

120

125

130

135

140

145

analytical

(29)

Simulation & Analytical Model: Line 16, K = 3

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28

Model Time

t

[s]

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

No

de

s c

on

sis

te

nt

P ( T ≤ t )

Model Time to Consistency (cdf)

(#Nodes: 16, K: 3)

Distance [m]

10

20

30

40

50

60

70

80

90

100

110

115

120

125

130

135

140

145

analytical

simulated

(30)

Simulation & Analytical Model: Line 25, K = 3

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

No

de

s c

on

sis

te

nt

P ( T ≤ t )

Model Time to Consistency (cdf)

(#Nodes: 25, K: 3)

Distance [m]

10

20

30

40

50

60

70

80

90

110

115

120

125

130

135

140

145

analytical

(31)

Simulation & Analytical Model: Grid 9, K = 3

0 2 4 6 8 10 12 14 16 18 20 22 24 26 28

Model Time

t

[s]

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

No

de

s c

on

sis

te

nt

P ( T ≤ t )

Model Time to Consistency (cdf)

(#Nodes: 9, K: 3)

Distance [m]

10

20

30

40

50

60

70

80

90

100

110

115

120

125

130

135

140

145

analytical

simulated

(32)

Simulation results and 95% confidence intervals

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 No de s c on sis te nt P ( T ≤ t ) 95 % Confidence Interval

Model Time to Consistency (cdf) (#Nodes: 9, K: 3) Distance [m] 10 20 30 40 50 60 70 80 90 100 110 115 120 125 130 135 140 145

(33)

Trickle/Push Comparison

Trickle Push

tpush= 3 s tpush= 5 s tpush= 39 s

t95% 29.4 s 27.9 s 36.4 s 169.1 s

tmax 34.9 s 33.0 s 47.0 s 240.5 s

Packets until consistent 176 714 196 415 Packets in steady state ≈2.61s 33.31s 201s 2.61s

I Trickle Settings: τL= 2s,τH = 32s,K=3

(34)

Conclusions & Outlook

I Conclusions

I Implemented and studied the Trickle algorithm

I Important algorithm for RPL and distribution of other information

I Distributes faster and more-efficient than fixed-interval pushing

I First analytical model of Trickle algorithm

I Model for delay distribution was shown here

I Model for number of sent packets exists as well

I Analytical delay model fits simulation results

I Outlook

References

Related documents

Port of Helsingør will introduce digital management technologies that enable the development of eco-systems between ports and their hinterland. As a result, the overall goal is of

With the results from the two-year samples we can say that differences in preferences across respondent attributes for the four indirect subsidy scheme options (including no

Although numerous airborne particles were observed while applying the stockinet and putting on large drapes for preparation of total knee arthroplasty, fewer particles (0.3 – 2. 0 μ

The present study tested a conceptual model of the relationships among religious well-being, existential well-being, positive religious coping, and family

The goal of the paper is to develop minimax lower bounds on error rates of estimation of low rank density matrices in trace regression models used in quantum state tomography

В ряду констант регионального раз- вития выделим следующие индикато- ры: качество жизни населения региона, социально-демографическая и инвес- тиционная привлекательность

The consolidated accounts have been prepared in accordance with International Financial Reporting Standards (IFRS) as adopted by the EU and the Annual Accounts Act and give a true

So when the number of steps is minimized (without it affecting the integral closure) we consider the generating set to be as simple as possible, and so the ideal generated by it is