132
Sensor Networks and Self-stabilization TDMA Clustering Conclusion Self-stabilization and Sensor Networks M Potop Butucaru, F Petit, S Tixeuil UPMC Sorbonne Universités [email protected]

Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Self-stabilization andSensor Networks

M Potop Butucaru, F Petit, S Tixeuil

UPMC Sorbonne Université[email protected]

Page 2: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

OutlineSensor Networks and Self-stabilization

Model(s)Cached SensornetSelf-stabilizing Unison

TDMAMotivationAlgorithm stack

ClusteringDensitySelf-stabilizing ClusteringSimulation Results

Conclusion

Page 3: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Sensor NetworksI processor + sensors + radioI 2 AA batteries, on/off switchI 3 LEDs for debugging

Page 4: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Sensor Networks

While (batteries supply power)

I Collect, aggregate and reduce dataI log into memory

In spite of numerous fault modes

I Permanent sensor failures, node failuresI restarts, radio failuresI transient faults, reconfigurations

Page 5: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Distributed Systems

Definition (Classical System, a.k.a. Nonstabilizing)Starting from a particular initial configuration, the systemimmediately exhibits correct behavior.

Definition (Self-stabilizing System)Starting from any initial configuration, the systemeventually reaches a configuration from with its behavioris correct.

I Self-stabilization permits to recover from transientfailures

Page 6: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Distributed Systems

Definition (Classical System, a.k.a. Nonstabilizing)Starting from a particular initial configuration, the systemimmediately exhibits correct behavior.

Definition (Self-stabilizing System)Starting from any initial configuration, the systemeventually reaches a configuration from with its behavioris correct.

I Self-stabilization permits to recover from transientfailures

Page 7: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Self-stabilization

“Correct”

Time

Configurations

Stabilization Time

Page 8: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Complexity Criteria

Maximize useful lifetime of systemI “maximise useful”: correct quickly from illegitimate

stateI Self-stabilization, scalability

I “maximise lifetime”: use minimal energy to preservebatteries

I local vs. global preserving

Page 9: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

System Specifics

I only one radio frequency

I no collision detect

I access technique: CSMA/CA

I use CRC to detect collision

I no directional send/receive

I msg. are small (30 bytes)

I radio range about 1 meter

I number of neighbors < 10

I could be large number ofnodes (perhaps > 100000)

I unique node IDs (probably)

I cost a few U(someday)

I slow processor (4 MHz)

I limited memory (4 KB RAM)

I item nodes have real-timeclocks ≡ drift between 1msec and 100 msec persecond

I several power modesavailable

Page 10: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

The Model(s)

a b

c

d

e

f

gh

i j

k

l

a b

c

d

e

f

gh

i j

k

l

a b

c

d

e

f

gh

i j

k

l

a b

c

d

e

f

gh

i j

k

l

Page 11: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

The Model(s)

a b

c

d

e

f

gh

i j

k

l

a b

c

d

e

f

gh

i j

k

l

a b

c

d

e

f

gh

i j

k

l

a b

c

d

e

f

gh

i j

k

l

Page 12: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

The Model(s)

a b

c

d

e

f

gh

i j

k

l

a b

c

d

e

f

gh

i j

k

l

a b

c

d

e

f

gh

i j

k

l

a b

c

d

e

f

gh

i j

k

l

Page 13: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

The Model(s)

a b

c

d

e

f

gh

i j

k

l

a b

c

d

e

f

gh

i j

k

l

a b

c

d

e

f

gh

i j

k

l

a b

c

d

e

f

gh

i j

k

l

Page 14: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

The Model(s)

Self-stabilizing model

I Read neighborhood state,I compute and update local state

Sensor Network modelI Read local state,I compute and broadcast to neighborhoodI Collisions may appear

Page 15: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Self-stabilization in Sensor NetworksTransform (i.e. Simulate) the self-stabilizingmodel into the sensor networks model

I Pros: reuse existing SS algorithmsI Cons: potentially inefficient, overhead

I [Herman 03] Cached Sensornet Transform

Design self-stabilizing algorithms for the sensornetworks model

I Pros: potentially efficientI Cons: ignore previous SS work

I [Herman 03] Unison with collisions

Page 16: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Self-stabilization in Sensor NetworksTransform (i.e. Simulate) the self-stabilizingmodel into the sensor networks model

I Pros: reuse existing SS algorithmsI Cons: potentially inefficient, overheadI [Herman 03] Cached Sensornet Transform

Design self-stabilizing algorithms for the sensornetworks model

I Pros: potentially efficientI Cons: ignore previous SS work

I [Herman 03] Unison with collisions

Page 17: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Self-stabilization in Sensor NetworksTransform (i.e. Simulate) the self-stabilizingmodel into the sensor networks model

I Pros: reuse existing SS algorithmsI Cons: potentially inefficient, overheadI [Herman 03] Cached Sensornet Transform

Design self-stabilizing algorithms for the sensornetworks model

I Pros: potentially efficientI Cons: ignore previous SS workI [Herman 03] Unison with collisions

Page 18: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Cached Sensornet Transform

Basic Algorithm

I Each node p has a variable vp

I Each neighbor q of p has a variable cqvpI cqvp is the cached value of vp at q

I Whenever p assigns vp, p also broadcasts the newvalue to the neighborhood

I Whenever a neighbor q of p receives vp, q updates cqvp

accordingly

Page 19: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Cached Sensornet Transform

Definition (Cache coherence)For all neighbors p and q, cqvp = vp

Lemma (Closure)If started from a cache coherent state, and without collisions,the self-stabilizing model is simulated by replacing alloccurrences of cqvp by vp

Page 20: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Lemma (Closure)If started from a cache coherent state, and without collisions,the self-stabilizing model is simulated by replacing alloccurrences of cqvp by vp

a bccbva

cavb

ccva

cavc

Page 21: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Lemma (Closure)If started from a cache coherent state, and without collisions,the self-stabilizing model is simulated by replacing alloccurrences of cqvp by vp

a bccbva

cavb

ccva

cavc

Page 22: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Lemma (Closure)If started from a cache coherent state, and without collisions,the self-stabilizing model is simulated by replacing alloccurrences of cqvp by vp

a bccbva

cavb

ccva

cavc

Page 23: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Cached Sensornet Transform

Periodic retransmitI Each node p periodically broadcasts vp to its

neighborhood

Lemma (Convergence)If started from an arbitrary state, and without collisions, acache coherent state is eventually reached

Page 24: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Lemma (Convergence)If started from an arbitrary state, and without collisions, acache coherent state is eventually reached

a bccbva

cavb

ccva

cavc

Page 25: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Lemma (Convergence)If started from an arbitrary state, and without collisions, acache coherent state is eventually reached

a bccbva

cavb

ccva

cavc

Page 26: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Lemma (Convergence)If started from an arbitrary state, and without collisions, acache coherent state is eventually reached

a bccbva

cavb

ccva

cavc

Page 27: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Lemma (Convergence)If started from an arbitrary state, and without collisions, acache coherent state is eventually reached

a bccbva

cavb

ccva

cavc

Page 28: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Lemma (Convergence)If started from an arbitrary state, and without collisions, acache coherent state is eventually reached

a bccbva

cavb

ccva

cavc

Page 29: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Cached Sensornet Transform

Message Corruption

I Each neighbor q of p has a Boolean variable bqvp

I If q receives vp correctly, bqvp becomes trueI G→ A becomes

for all neighbors q of p, bpvq and G→A; for all neighbors q of p, bpvq becomes false

Page 30: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

I If q receives vp correctly, bqvp becomes trueI G→ A becomes

for all neighbors q of p, bpvq and G→A; for all neighbors q of p, bpvq becomes false

a bccbva

cavb

ccva

cavc

Page 31: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

I If q receives vp correctly, bqvp becomes trueI G→ A becomes

for all neighbors q of p, bpvq and G→A; for all neighbors q of p, bpvq becomes false

a bccbva

cavb

ccva

cavc

Page 32: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

I If q receives vp correctly, bqvp becomes trueI G→ A becomes

for all neighbors q of p, bpvq and G→A; for all neighbors q of p, bpvq becomes false

a bccbva

cavb

ccva

cavc

Page 33: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

I If q receives vp correctly, bqvp becomes trueI G→ A becomes

for all neighbors q of p, bpvq and G→A; for all neighbors q of p, bpvq becomes false

a bccbva

cavb

ccva

cavc

Page 34: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

I If q receives vp correctly, bqvp becomes trueI G→ A becomes

for all neighbors q of p, bpvq and G→A; for all neighbors q of p, bpvq becomes false

a bccbva

cavb

ccva

cavc

Page 35: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

I If q receives vp correctly, bqvp becomes trueI G→ A becomes

for all neighbors q of p, bpvq and G→A; for all neighbors q of p, bpvq becomes false

a bccbva

cavb

ccva

cavc

Page 36: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

I If q receives vp correctly, bqvp becomes trueI G→ A becomes

for all neighbors q of p, bpvq and G→A; for all neighbors q of p, bpvq becomes false

a bccbva

cavb

ccva

cavc

Page 37: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

I If q receives vp correctly, bqvp becomes trueI G→ A becomes

for all neighbors q of p, bpvq and G→A; for all neighbors q of p, bpvq becomes false

a bccbva

cavb

ccva

cavc

Page 38: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Cached Sensornet Transform

Periodic Retransmit

Message Corruption

Lemma (Self-stabilization)If started from an arbitrary state, the self-stabilizing model iseventually simulated

Page 39: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Self-stabilizing Unison

Specification

I Each node p has a clock variable vp

I For every neighbors p and q, |vp − vq| 6 1

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

Page 40: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Self-stabilizing Unison

Specification

I Each node p has a clock variable vp

I For every neighbors p and q, |vp − vq| 6 1

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

Page 41: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

7 2 0 8 1 1

Page 42: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

7 2 0 8 2 1

Page 43: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

7 2 1 8 2 1

Page 44: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

7 2 2 8 2 1

Page 45: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

7 2 2 8 2 2

Page 46: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

7 2 2 8 2 3

Page 47: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

7 3 3 8 3 3

Page 48: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

7 4 4 8 4 4

Page 49: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

7 5 5 8 5 5

Page 50: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

7 6 6 8 6 6

Page 51: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

7 7 6 8 7 7

Page 52: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

8 7 6 8 8 8

Page 53: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

8 7 7 8 9 8

Page 54: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

Self-stabilizing Unison

I for every neighbor q, vq > vp → vp := vp + 1

non activatable activatable legitimate

8 8 7 8 9 9

Page 55: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Unison with Collisions

Specification

I Each node p has a clock variable vp

I For every neighbors p and q, |vp − vq| 6 1

Self-stabilizing Unison

with Collisions

I for every neighbor q, vq > vp → vp := vp + 1

I for every neighbor q, cpvq > vp → vp := vp + 1I Only correctly received messages update cached

variables

Page 56: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Unison with Collisions

Specification

I Each node p has a clock variable vp

I For every neighbors p and q, |vp − vq| 6 1

Self-stabilizing Unison with Collisions

I for every neighbor q, cpvq > vp → vp := vp + 1

I Only correctly received messages update cachedvariables

Page 57: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Unison with Collisions

Specification

I Each node p has a clock variable vp

I For every neighbors p and q, |vp − vq| 6 1

Self-stabilizing Unison with Collisions

I for every neighbor q, cpvq > vp → vp := vp + 1I Only correctly received messages update cached

variables

Page 58: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

non activatable activatable legitimate

lower than value strictly greater

2 2141

20

Page 59: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

non activatable activatable legitimate

lower than value strictly greater

2 3241

20

Page 60: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

non activatable activatable legitimate

lower than value strictly greater

2 4341

20

Page 61: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

non activatable activatable legitimate

lower than value strictly greater

2 4321

20

Page 62: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

non activatable activatable legitimate

lower than value strictly greater

2 4324

20

Page 63: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

non activatable activatable legitimate

lower than value strictly greater

2 4324

20

Page 64: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

non activatable activatable legitimate

lower than value strictly greater

2 4324

23

Page 65: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

non activatable activatable legitimate

lower than value strictly greater

3 4334

33

Page 66: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

non activatable activatable legitimate

lower than value strictly greater

4 4344

43

Page 67: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Unison with Collisions

Cache coherence weakening

I For every neighbors p and q, cpvq 6 vq

Self-stabilizing Unison with collisions

I Unison and Weak cache coherence are preserved byprogram executions

I Unison and Weak cache coherence eventually holdI Some extra work is expected to get bounded clock

values

Page 68: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Self-stabilization in Sensor Networks

Transform (i.e. Simulate) the self-stabilizingmodel into the sensor networks model

I [Herman 03] Cached Sensornet TransformI Overhead is not upper bounded

Design self-stabilizing algorithms for the sensornetworks model

I [Herman 03] Unison with collisionsI Proof in the model is specific to the problem

Page 69: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

OutlineSensor Networks and Self-stabilization

Model(s)Cached SensornetSelf-stabilizing Unison

TDMAMotivationAlgorithm stack

ClusteringDensitySelf-stabilizing ClusteringSimulation Results

Conclusion

Page 70: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Towards an Intermediate ModelAn atomic step at a node

I Compute new state, write new state at all neighbors(no collision)

Hypothesis

I Global clock, unique IDs

SolutionI TDMA to avoid collisions

I assume synchronised, real-time clocks (to enableTDMA slotted time)

I but TDMA implemented using CSMA/CA as basic,underlying model

Page 71: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Towards an Intermediate Model

SolutionI TDMA to avoid collisionsI assume synchronised, real-time clocks (to enable

TDMA slotted time)I but TDMA implemented using CSMA/CA as basic,

underlying model

Page 72: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

TDMA Scheduling

1 2 3 4 5 1 2 3 4 5 1 2 . . .

I Algorithm messages are transmitted during the“overhead” periods

I TDMA slot assignment is the output of our algorithm

Page 73: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Self-stabilizing TDMA for Sensors

I [Kulkarni, Arumugam 03] 2-D GridsI nodes are aware of their positionsI Not suitable for dynamic/faulty networks

I [Herman,Tixeuil 04] General graphs of boundeddegree

I Randomized algorithm, self-stabilizing in expectedO(1) time, to assign TDMA slots

I Solution is a protocol stack based on variablepropagation, minimal coloring of N2, MISconstruction, and mapping colors↔ TDMA slots

Page 74: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

2 0

3

1

4 2 0 4

2 0

3

1

4 2 1 3

5 5

5

5

5 3 3 3

5 5

5

5

5 5 4 3

I both are minimal,I but second

solution is betterfor time-slotassignment

Page 75: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Example

2 0

3

1

4 2 0 4

2 0

3

1

4 2 1 3

5 5

5

5

5 3 3 3

5 5

5

5

5 5 4 3

I both are minimal,I but second

solution is betterfor time-slotassignment

Page 76: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

OverviewN2 minimal coloring→ TDMA schedule

N3 coloring + MIS→ N2 minimal coloring

N3 coloring→MIS

Variables propagation→ N3 coloring

CSMA/CA→ Variables propagation

Page 77: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

CSMA/CA→ Variables propagation

I Wait fixed delayI to process received messages, and update local

variablesI Wait random delay

I to allow Aloha-style analysis for probability ofcollisions among neighbors

I “Age” information to remove invalid data

Page 78: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Shared variables→ N3 coloringPrevious L(1,0)& L(1,1) Coloring

I [Ghosh, Karaata 93] Planar graphs L(1,0)I [Sur, Srimani 93] Bipartite graphs L(1,0)I [Gradinariu,Tixeuil 00] General graphs L(1,0)I [Gradinariu, Johnen 01] Colors of size n2 L(1,1)

Our algorithm∃j ∈ N3

i , colorj = colori → colori := random(∆ \ {colorj|j ∈N3

i })

I Stabilizes in expected O(1)I Output an ID-based DAG of constant height

Page 79: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

N3 coloring→MIS

[Ikeda, Kamei, Kakugawa 02]

No parent in MIS→ join MIS

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

Page 80: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

N3 coloring→MIS

[Ikeda, Kamei, Kakugawa 02]

No parent in MIS→ join MIS

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

Page 81: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

N3 coloring→MIS

[Ikeda, Kamei, Kakugawa 02]

No parent in MIS→ join MIS

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

Page 82: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

N3 coloring→MIS

[Ikeda, Kamei, Kakugawa 02]

No parent in MIS→ join MIS

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

Page 83: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

N3 coloring→MIS

[Ikeda, Kamei, Kakugawa 02]

No parent in MIS→ join MIS

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

Page 84: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

N3 coloring→MIS

[Ikeda, Kamei, Kakugawa 02]

No parent in MIS→ join MIS

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

Page 85: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

N3 coloring + MIS→Minimal N2 coloring

MIS→ send colors to dominated nodes

a

b

c

d

j

e

f

g

h

i

1,i

2,i

0

4,g

3,g

1,i

0

2,i

0

4,g

0,j

6,j

5

3,g

1,i

0

2,i

0

1

4,g

0,j

6,j

5

3,g

1,i

0

2,i

0

Page 86: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

N3 coloring + MIS→Minimal N2 coloring

MIS→ send colors to dominated nodes

a

b

c

d

j

e

f

g

h

i

1,i

2,i

0

4,g

3,g

1,i

0

2,i

0

4,g

0,j

6,j

5

3,g

1,i

0

2,i

0

1

4,g

0,j

6,j

5

3,g

1,i

0

2,i

0

Page 87: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

N3 coloring + MIS→Minimal N2 coloring

MIS→ send colors to dominated nodes

a

b

c

d

j

e

f

g

h

i

1,i

2,i

0

4,g

3,g

1,i

0

2,i

0

4,g

0,j

6,j

5

3,g

1,i

0

2,i

0

1

4,g

0,j

6,j

5

3,g

1,i

0

2,i

0

Page 88: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

N3 coloring + MIS→Minimal N2 coloring

MIS→ send colors to dominated nodes

a

b

c

d

j

e

f

g

h

i

1,i

2,i

0

4,g

3,g

1,i

0

2,i

0

4,g

0,j

6,j

5

3,g

1,i

0

2,i

0

1

4,g

0,j

6,j

5

3,g

1,i

0

2,i

0

Page 89: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

N3 coloring + MIS→Minimal N2 coloring

MIS→ send colors to dominated nodes

a

b

c

d

j

e

f

g

h

i

1,i

2,i

0

4,g

3,g

1,i

0

2,i

0

4,g

0,j

6,j

5

3,g

1,i

0

2,i

0

1

4,g

0,j

6,j

5

3,g

1,i

0

2,i

0

Page 90: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Minimal N2 coloring→ TDMA Schedule

2 0

3

1

4 2 0 4

5 5

5

5

5 3 3 35 15

5

5

5 3 3 35 15

5

15

5 3 3 315

15

5

15

5 3 3 315

15

15

15

5 3 3 315

15

15

15

15 3 3 31

515

15

15

15 3 1

3 315

15

15

15

15

13

13 31

515

15

15

15

13

13

13

15

15

15

15

15

13

13

13

Page 91: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Minimal N2 coloring→ TDMA Schedule

2 0

3

1

4 2 0 45 5

5

5

5 3 3 3

5 15

5

5

5 3 3 35 15

5

15

5 3 3 315

15

5

15

5 3 3 315

15

15

15

5 3 3 315

15

15

15

15 3 3 31

515

15

15

15 3 1

3 315

15

15

15

15

13

13 31

515

15

15

15

13

13

13

15

15

15

15

15

13

13

13

Page 92: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Minimal N2 coloring→ TDMA Schedule

2 0

3

1

4 2 0 4

5 5

5

5

5 3 3 3

5 15

5

5

5 3 3 3

5 15

5

15

5 3 3 315

15

5

15

5 3 3 315

15

15

15

5 3 3 315

15

15

15

15 3 3 31

515

15

15

15 3 1

3 315

15

15

15

15

13

13 31

515

15

15

15

13

13

13

15

15

15

15

15

13

13

13

Page 93: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Minimal N2 coloring→ TDMA Schedule

2 0

3

1

4 2 0 4

5 5

5

5

5 3 3 35 15

5

5

5 3 3 3

5 15

5

15

5 3 3 3

15

15

5

15

5 3 3 315

15

15

15

5 3 3 315

15

15

15

15 3 3 31

515

15

15

15 3 1

3 315

15

15

15

15

13

13 31

515

15

15

15

13

13

13

15

15

15

15

15

13

13

13

Page 94: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Minimal N2 coloring→ TDMA Schedule

2 0

3

1

4 2 0 4

5 5

5

5

5 3 3 35 15

5

5

5 3 3 35 15

5

15

5 3 3 3

15

15

5

15

5 3 3 3

15

15

15

15

5 3 3 315

15

15

15

15 3 3 31

515

15

15

15 3 1

3 315

15

15

15

15

13

13 31

515

15

15

15

13

13

13

15

15

15

15

15

13

13

13

Page 95: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Minimal N2 coloring→ TDMA Schedule

2 0

3

1

4 2 0 4

5 5

5

5

5 3 3 35 15

5

5

5 3 3 35 15

5

15

5 3 3 315

15

5

15

5 3 3 3

15

15

15

15

5 3 3 3

15

15

15

15

15 3 3 31

515

15

15

15 3 1

3 315

15

15

15

15

13

13 31

515

15

15

15

13

13

13

15

15

15

15

15

13

13

13

Page 96: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Minimal N2 coloring→ TDMA Schedule

2 0

3

1

4 2 0 4

5 5

5

5

5 3 3 35 15

5

5

5 3 3 35 15

5

15

5 3 3 315

15

5

15

5 3 3 315

15

15

15

5 3 3 3

15

15

15

15

15 3 3 3

15

15

15

15

15 3 1

3 315

15

15

15

15

13

13 31

515

15

15

15

13

13

13

15

15

15

15

15

13

13

13

Page 97: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Minimal N2 coloring→ TDMA Schedule

2 0

3

1

4 2 0 4

5 5

5

5

5 3 3 35 15

5

5

5 3 3 35 15

5

15

5 3 3 315

15

5

15

5 3 3 315

15

15

15

5 3 3 315

15

15

15

15 3 3 3

15

15

15

15

15 3 1

3 3

15

15

15

15

15

13

13 31

515

15

15

15

13

13

13

15

15

15

15

15

13

13

13

Page 98: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Minimal N2 coloring→ TDMA Schedule

2 0

3

1

4 2 0 4

5 5

5

5

5 3 3 35 15

5

5

5 3 3 35 15

5

15

5 3 3 315

15

5

15

5 3 3 315

15

15

15

5 3 3 315

15

15

15

15 3 3 31

515

15

15

15 3 1

3 3

15

15

15

15

15

13

13 3

15

15

15

15

15

13

13

13

15

15

15

15

15

13

13

13

Page 99: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Minimal N2 coloring→ TDMA Schedule

2 0

3

1

4 2 0 4

5 5

5

5

5 3 3 35 15

5

5

5 3 3 35 15

5

15

5 3 3 315

15

5

15

5 3 3 315

15

15

15

5 3 3 315

15

15

15

15 3 3 31

515

15

15

15 3 1

3 315

15

15

15

15

13

13 3

15

15

15

15

15

13

13

13

15

15

15

15

15

13

13

13

Page 100: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Minimal N2 coloring→ TDMA Schedule

2 0

3

1

4 2 0 4

5 5

5

5

5 3 3 35 15

5

5

5 3 3 35 15

5

15

5 3 3 315

15

5

15

5 3 3 315

15

15

15

5 3 3 315

15

15

15

15 3 3 31

515

15

15

15 3 1

3 315

15

15

15

15

13

13 31

515

15

15

15

13

13

13

15

15

15

15

15

13

13

13

Page 101: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

OutlineSensor Networks and Self-stabilization

Model(s)Cached SensornetSelf-stabilizing Unison

TDMAMotivationAlgorithm stack

ClusteringDensitySelf-stabilizing ClusteringSimulation Results

Conclusion

Page 102: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Motivation

Clusters for routingMANET routing protocols are flat, thus not scalableCluster-heads have extra responsibility for the routing ofmessage

Cluster-heads should be stableHandle departures and removals Handle node mobility

Page 103: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Density

ρ(u) =|{e = (v, w) ∈ E | w ∈ {u} ∪Nu and v ∈ Nu}|

|Nu|

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

Page 104: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Density

ρ(u) =|{e = (v, w) ∈ E | w ∈ {u} ∪Nu and v ∈ Nu}|

|Nu|

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

Page 105: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Density

ρ(u) =|{e = (v, w) ∈ E | w ∈ {u} ∪Nu and v ∈ Nu}|

|Nu|

a

b

c

d

j

e

f

g

h

i

a

b

c

d

j

e

f

g

h

i

Page 106: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Cluster Head Heuristics

a1.33

b1.75

c1

d1.75

j1.5

e1.8

f1.33

g1.5

h1

i1

a1.33

b1.75

c1

d1.75

j1.5

e1.8

f1.33

g1.5

h1

i1

a1.33

b1.75

c1

d1.75

j1.5

e1.8

f1.33

g1.5

h1

i1

Page 107: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Cluster Head Heuristics

a1.33

b1.75

c1

d1.75

j1.5

e1.8

f1.33

g1.5

h1

i1

a1.33

b1.75

c1

d1.75

j1.5

e1.8

f1.33

g1.5

h1

i1

a1.33

b1.75

c1

d1.75

j1.5

e1.8

f1.33

g1.5

h1

i1

Page 108: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Cluster Head Heuristics

a1.33

b1.75

c1

d1.75

j1.5

e1.8

f1.33

g1.5

h1

i1

a1.33

b1.75

c1

d1.75

j1.5

e1.8

f1.33

g1.5

h1

i1

a1.33

b1.75

c1

d1.75

j1.5

e1.8

f1.33

g1.5

h1

i1

Page 109: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Number of Cluster Heads

I Using stochastic geometry, it is possible to calculatethe mean density, and then upper bound the numberof cluster-heads

PoΦ

(ρ(0) > maxk=1,..,Φ(B0) ρ(Yk)

)6

(1 +

∑+∞n=1

1n(λπR2)

n

n!

)exp {−λπR2}

Page 110: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Number of Cluster Heads

Upper bound of the number of clusters in function of the process intensity

40

60

80

100

120

140

160

500 1000 1500 2000 2500 3000

lambda

Page 111: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Self-stabilizing Clustering

Basic IdeaI Identify N and N2

I Compute and broadcast densityI Attach to neighbor with higher densityI use identifiers to break ties

I Can be O(Diameter) if graph is regular

Page 112: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Self-stabilizing Clustering

Basic IdeaI Identify N and N2

I Compute and broadcast densityI Attach to neighbor with higher densityI use identifiers to break tiesI Can be O(Diameter) if graph is regular

Page 113: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Faster Self-stabilizing Clustering

Basic IdeaI Identify N and N2

I Compute and broadcast densityI Random L(1, 1) coloring with δ2 colors

I This can be done in expected O(1) timeI Attach to neighbor with higher densityI use colors to break ties

I Expected constant stabilization timeI Use lexicographic order (density, color)

Page 114: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Faster Self-stabilizing Clustering

Basic IdeaI Identify N and N2

I Compute and broadcast densityI Random L(1, 1) coloring with δ2 colors

I This can be done in expected O(1) timeI Attach to neighbor with higher densityI use colors to break tiesI Expected constant stabilization timeI Use lexicographic order (density, color)

Page 115: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Simulation Results

R = 0.05 R = 0.08 R = 0.1With DAG No DAG With DAG No DAG With DAG No DAG

# clusters 61.0 61.4 19.2 19.5 11.7 11.7e(H(u)/C(u)) 2.6 2.6 3.1 3.1 3.2 3.2average tree length 2.7 2.7 3.3 3.3 3.5 3.5

Page 116: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Simulation Results

R = 0.05 R = 0.08 R = 0.1With DAG No DAG With DAG No DAG With DAG No DAG

# clusters 52.8 1.0 29.3 1.0 18.5 1.0e(H(u)/C(u)) 3.4 29.1 4.1 19.1 3.6 6.5average tree length 3.7 83.4 4.7 100.5 4.5 32.1

Page 117: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

How fast is the coloring ?

ModelUrns and balls

a

bc

d 4 0 0 0

Page 118: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

How fast is the coloring ?

ModelUrns and balls

a

bc

d 0 1 2 1

Page 119: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

How fast is the coloring ?

ModelUrns and balls

a

bc

d 1 1 1 1

Page 120: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

How fast is the coloring ?

ModelUrns and balls

Expected stabilization time

E [N] = V0

Vi =1

1 − pi,i

1 +

L−1∑j=i+1

pi,jVj

for i = L − 2, . . . , 0

with VL−1,L−1 = 1/(1 − pL−1,L−1).

Page 121: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

How fast is the coloring ?

ModelUrns and balls

What is missed by the model ?

a b c d

Page 122: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

How fast is the coloring ?

ModelUrns and balls

What is missed by the model ?

a b c d

Page 123: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

How fast is the coloring ?

ModelUrns and balls

What is missed by the model ?

a b c d

Page 124: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

How fast is the coloring ?

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0.18

500 600 700 800 900 1000 1100

Pro

port

ion

of c

reat

ion

of n

ew c

onfli

cts

over

the

num

ber

of r

e-dr

awin

g co

lors

Number of nodes

All but one mode- Max = max degree * 2

All mode- Max = max degree * 2

Both mode for all other color domain size values

Page 125: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

How fast is the coloring ?

1

1.5

2

2.5

3

3.5

500 600 700 800 900 1000 1100

Sta

biliz

atio

n T

ime

(Num

ber

of s

teps

bef

ore

stab

iliza

tion)

Process Intensity (Number of nodes)

Synchronous Scheduling, ’All but One’ ModeSynchronous Scheduling, ’All’ Mode

Distributed Probabilistic Scheduling, ’All but One’ ModeDistributed Probabilistic Scheduling, ’All’ Mode

Central Probabilistic Scheduling, ’All but one’ ModeCentral Probabilistic Scheduling, ’All’ Mode

Page 126: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Influence of the color domain

1.2

1.4

1.6

1.8

2

2.2

2.4

2.6

2.8

3

500 600 700 800 900 1000 1100

Sta

biliz

atio

n T

ime

(Num

ber

of s

teps

bef

ore

stab

iliza

tion)

Process Intensity (Number of nodes)

Max = 2 * Max degreeMax = Node degree * node degreeMax = Max Degree * Max Degree

Page 127: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Influence of the color domain

1.7

1.75

1.8

1.85

1.9

1.95

2

500 600 700 800 900 1000 1100

Delta = max degree squareDelta = 2*max degree

Delta=node degree square

Page 128: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Improving Stability

I When two nodes compete for being cluster-heads(same density), the former cluster-head wins

I Color is still used to break remaining tiesI Clusters merge if cluster-heads are 2 hops apartI Still exp. Constant stabilization time

Page 129: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Improving StabilityRandom moves at random speeds

I Observe every 15 seconds for 2 minutes

Pedestrians (0-1.6 m/s)I Original algorithm: 78% re-electionI “Stable enhanced” algorithm: 82% re-election

Cars (0-10 m/s)I Original algorithm: 25% re-electionI “Stable enhanced” algorithm: 31% re-election

Page 130: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Conclusion

I Self-stabilization is interesting for sensor networksI Known SS solutions should be implemented in sensor

networksI Sensor networks are interesting for self-stabilization

I Simple devicesI Small operating system

I Energy constraints and collisions make thingscomplicated

Page 131: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Conclusion

I Self-stabilization is interesting for sensor networksI Known SS solutions should be implemented in sensor

networksI Sensor networks are interesting for self-stabilization

I Simple devicesI Small operating system

I Energy constraints and collisions make thingscomplicated

Page 132: Self-stabilization and Sensor Networkstixeuil/m2r/uploads/Main/SEC_cours02_capt… · Sensor Networks and Self-stabilization TDMA ClusteringConclusion Distributed Systems Definition

Sensor Networks and Self-stabilization TDMA Clustering Conclusion

Sensors in Action

Launch Movie