analysis of a clock synchronization protocol for wireless sensor networks faranak heidarian julien...

19
Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Post on 19-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks

Faranak Heidarian

Julien Schmaltz

Frits Vaandrager

Page 2: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Outline

Introduction

Synchronization Algorithm

Time Model

UPPAAL Model

Error Scenarios

Clique Topology

Line Topology

Conclusion

2

Page 3: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Introduction

3

Page 4: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Flower Auction

4

Use Case I : asset managementtheft detection and resolving ownership disputesUse Case II : supply chain managementreal-time awareness (track and trace)

Page 5: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Theft Detection

5

Active tag ad-hoc network topology is shown in blue

Observation nodes can be connected to fixed local infrastructure

When the network detects a node is lost, alarm is raised .

Dynamic Topology

Page 6: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Time Model

6

TXRX RX idle idle idle idle

Time is considered as a sequence of Time Frames.

A time frame is composed of a fixed number, say C, of Time Slots.

In a time slot the hardware clock of the sensor node ticks a fixed number, say k0, of times.

A Time Frame

tsn

Page 7: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Guard Time

7

TX Time Slot

SENDING

RX Time Slot

g t

Page 8: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Uppaal Model

8

A Wireless Sensor Node

Clock

Synchronizer

Page 9: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Synchronization Definition. A network is synchronized if and only if for all

reachable states

(∀i, j ∈ Nodes)(SENDINGi and neighbor(i,j)⇒ csn[i] = csn[j])

9

21

1 2

1 2

3

3

3

TX

TX

CollisionA

B

C

Page 10: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Conditions of Protocol Synchronization

Theorem. A wireless sensor network with clique topology is synchronized if and only if three conditions hold:

10

min).1(max).( (3)

min).2).1((max.. (2)

min).1.(max)..( (1)

00

00

00

gktgk

gkMkM

kMgkM

M : the maximum distance between two consecutive active slots

Page 11: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Fast Receiver- Slow Sender, during transmission

Proving Necessity

To exclude this scenario, the following condition should be satisfied:

11

min).1(max).( 00 gktgk

Page 12: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Proving Sufficiency

Hand-proof • 1000 lines of formulae • Complex large invariants • Needs some history variables

Formal proof • Isabelle/HOL theorem prover • About 5,000 lines • Needs a proof for every single step!

12

Page 13: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Some Invariants

13

csn[i] last g clk[i] tsn[i] csn[i] (3)

last csn[j] csn[i] SENDING (2)

g clk[i] csn[j] csn[i] GO_SEND (1)

i

i

Page 14: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Different Topologies

14

g = 2 g = 3 g = 3 g = 4 g = 3 g = 3

ρ = 29/30

ρ = 58/59 ρ =38/39 ρ = 58/59 ρ = 58/59 ρ = 48/49

Page 15: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Line Topology

We claim that for a line network of size N, the guard time g should be at least N. We consider only networks with perfect clocks, in which clock drift is zero.

15

Page 16: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

An Error Scenario

16

Page 17: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Conclusion

We proved the correctness of model of Chess algorithm under some assumptions; however, the current implementation has flaws.

Model checking helped us to find the error scenarios and parameter constraints for our model.

Invariant proof is complicated. Using Isabelle/HOL ,we did not discover any mistakes

in the hand proof. However, there was some places that needed some expansion (1 line of hand proof can be equivalent to 100 lines in Isabelle). These places were the core places explaining some details of the protocol.

17

Page 18: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Future Work

Correcting/Improving the Protocol and Proving its correctness.

Adding a gain factor Using Kalman filter (Assegei, 2008)Using algorithm of Lenzen, Locher & Wattenhofer

(2008)Adapting the algorithm of Pussente & Barbosa

(2009)

(Usually, it is easy to adapt our Uppaal model.)

Using Parametric Timed Automata (Hune et al, 2002)

Using “Event Order Abstraction” (Umeno, 2008)There are many Probabilistic Challenges 18

Page 19: Analysis of a Clock Synchronization Protocol for Wireless Sensor Networks Faranak Heidarian Julien Schmaltz Frits Vaandrager

Thank You19