Modeling and Analysis of WSNs Joint work with : F. Maraninchi, L. - - PowerPoint PPT Presentation

modeling and analysis of wsns
SMART_READER_LITE
LIVE PREVIEW

Modeling and Analysis of WSNs Joint work with : F. Maraninchi, L. - - PowerPoint PPT Presentation

Modeling and Analysis of WSNs Joint work with : F. Maraninchi, L. Samper, O. Bezet, W. Znaidi And many discussions within the ARESA project : France-T el ecom, Coronis Systems, LIG-Drakkar, CITI, TIMA Overview 1. Wireless Sensor Networks


slide-1
SLIDE 1

Modeling and Analysis of WSNs

Joint work with :

  • F. Maraninchi, L. Samper, O. Bezet, W. Znaidi

And many discussions within the ARESA project : France-T´ el´ ecom, Coronis Systems, LIG-Drakkar, CITI, TIMA

slide-2
SLIDE 2

Overview

  • 1. Wireless Sensor Networks
  • 2. Design, programming and analysis techniques for WSNs
  • 3. What has been done within V´

erimag ?

  • 4. Where we could go in a near future ?
slide-3
SLIDE 3

Wireles Sensor Network

A set of sensing devices (nodes), communicating through radio links, to collect/agreggate/transmit information about their external environment.

messages

Sink

Fire

Area under supervision

slide-4
SLIDE 4

Node architecture

E N E R G Y

MAC Routing self organization Sensing CPU Memory Radio

Environment Physical Software Hardware

Application code

Typical hardware characteristics (e.g., Mica motes, Crossbow) :

◮ CPU : 8/16 bits, 8 MHz, ∼ 128 Kb pgm, ∼ 512 Kb data ◮ Radio : range ∼ 100 meters, 40.000 bits/sec. ◮ Energy : 2 AA batteries

slide-5
SLIDE 5

Typical radio device

Tx Rx Hibernate Idle Off

RXTXEN RXTXEN ATTN=0(edge) (see Section 3.4)

Doze

doze_en (Wait 128) hibernate_en (Wait 24 cycles) RST=0 RST=1

slide-6
SLIDE 6

Typical MAC protocol

Transmitter Preamble Reception Receiver Radio off Periodic channel sampling Radio on Data

slide-7
SLIDE 7

Typical routing protocol : directed diffusion

Sink alarm fire Sink Sink

slide-8
SLIDE 8

Typical (foreseen) WSN applications

◮ Environement/health monitoring ◮ Smart buildings (structure monitoring, home comfort, ...) ◮ Object tracking ◮ Traffic management ◮ Metering ◮ etc.

⇒ some key parameters : node mobility, dynamic network (re)-configuration, energy supply, network size, security concerns, etc.

slide-9
SLIDE 9

A real commercial application

Water counter metering, Coronis Systems

◮ periodic sampling (sensor at 32 hz, 1 measure/hour, 1 emission/day) ◮ expected lifetime : ∼ 10-15 years (using a 3.6 v Lithium battery) ◮ network : up to 2000 nodes, partly configured by hand

(no collisions !)

slide-10
SLIDE 10

Why is it still a challenging domain ?

WSN = embedded systems (tight constraints, difficult to update) + wireless (multi-hop communications, timed behaviour) + non-functional properties (energy, QoS, security, dots) ⇒ important need in cross-layers development and tuning ⇒ so far, no “convincing” design and analysis techniques Some “related” topics :

◮ Ad hoc networks, vehicular networks (VaNet), . . . ◮ smart cards, . . .

slide-11
SLIDE 11

Overview

  • 1. Wireless Sensor Networks
  • 2. Design, programming and analysis techniques for WSNs
  • 3. What has been done within V´

erimag ?

  • 4. Where we could go in a near future ?
slide-12
SLIDE 12

Design and programming efforts

◮ Hardware level :

Tight integration between low power CPU and radio transceivers (Berkeley’s motes, Arch Rock, Coronis transceiver, WSN430 (Lyon CITI), . . .)

◮ Protocol level :

A huge number of MAC proposals, some “integrated” communication stacks (802.15.4, ZigBee, Wavenis, . . .)

◮ OS and application level :

A few dedicated languages, with programming and execution environments (nesC/TinyOS, Sun SPOT/Squawk VM, Contiki, etc.)

slide-13
SLIDE 13

TinyOS (Berkeley)

An operating system and developemnt plateform for WSNs . . .

  • 1. a component library (hardware interface + com. protocols)
  • 2. a programming language (nesC)
  • 3. a code generator

◮ for specific hardware motes ◮ for simulation tools

Generated code = software components + “built-in” scheduler

slide-14
SLIDE 14

nesC (Berkeley)

nesC = C + component model + concurency model Component interface :

◮ commands (methods accepted by the component) ◮ events (call backs sent by the component)

Concurency :

◮ “synchronous” tasks

(executed when CPU is idle, can be preempted)

◮ events : hardware interuptions, split-phase operations

(preempt the execution of running task or event). ⇒ low level programming model, possible race conditions, . . .

slide-15
SLIDE 15

Modeling nesC/TinyOS with BIP

[joint work with Ananda, Joseph, Jacques (Pulou), Marc]

→ a translation of the nesC execution model into BIP

Radio Timer Sensor Application Protocol EventManager TaskManager Radio Timer Sensor Application Protocol BIP nesC

◮ partly automated (nesC behaviour to be translated by hand) ◮ shows that BIP is expressive enough ◮ compare to similar work performed with Ptolemy ◮ could be used for “intra-node” validation ?

slide-16
SLIDE 16

Existing analysis techniques

Simulation techniques

◮ operational model, can be executed ◮ can be made accurate, including “real”code (cycle-accuracy) :

(“true” packet collisions, inst. energy consumed)

◮ but non exhaustive, and can be simulator dependant

Analytic techniques

◮ probabilistic model, descriptive ◮ requires some abstraction level, are they sound ?

(prob. of collisions, energy = nb. of msgs sent)

◮ exhaustive analysis (worst case, mean case)

slide-17
SLIDE 17

The current picture

cycle−accurate simulation analytic techniques Exaustiveness Hopeless Useless Accuracy

slide-18
SLIDE 18

Overview

  • 1. Wireless Sensor Networks
  • 2. Design, programming and analysis techniques for WSNs
  • 3. What has been done within V´

erimag ?

  • 4. Where we could go in a near future ?
slide-19
SLIDE 19

Useless → Hopeless : how to fill the blank ?

  • 1. Global and accurate simulation model for WSNs

◮ to better understand the domain . . . ◮ to build an experimental simulation plateform

  • 2. Experiments with existing model-checking tool

◮ to know where are their limits ◮ to propose the necessary extensions

  • 3. Definition of a sound abstraction relation

◮ taking into account the energy consumption ◮ that can be applied “component-wised”

slide-20
SLIDE 20

Glonemo : specification

A global, component-wise, and accurate WSN model :

◮ detailed node hardware description ◮ several software layers (com. protocols, application code) ◮ the physical environment (comm. canal, sensor inputs)

A simulation engine :

◮ able to collect various data during a run

(e.g., energy, msg exchanged, . . .)

◮ efficient enough . . .

⇒ a “benchmark application” : monitoring and tracking of a pollution cloud

slide-21
SLIDE 21

Glonemo : model architecture

Observations Node A Canal Node B Other nodes Hardware Cloud Environnement Wind Routing Routing MAC Application Application MAC Hardware Other data CPU CPU ... ... Radio Radio

slide-22
SLIDE 22

Implementation

Written in Reactive ML (L. Mandel, LRI)

◮ based upon Caml (expressive, high-level, data structure) ◮ parallelism is a top-level primitive

(1 process per component, 8 components per node)

◮ synchronous reactive model (discret global time)

⇒ fixed step simulation Energy model

◮ synchronous observers associated to each hardware element

(1 state = 1 instantaneous consumption value)

◮ mimics the functional behaviour ◮ a global observer integrates the energy consumed / node

slide-23
SLIDE 23

MAC protocol

Emission /Send Ack reception /Receive CCA Carrier Sense Channel Busy t=0[T] and t=t_detect[T] Packet to send Reception CCA : Clear Channel Assessment Sleep and t=t_detect[T] End of the random Backoff Random Backoff /Off /Off /Off Channel Free /Send /Off /Idle /Receive /Receive /Idle Reception /Off free channel busy channel /Send End of reception Reception reception End of failure /Off /Send Emission Ack Ack received

  • r

timeout /Off End of emission /Receive

slide-24
SLIDE 24

Radio energy consumption (Motorola MC13192)

Idle Transmit Receive

0.0 mW 110.7 mW 105.3 mW 105.3 mW

105.3 mW 110.7 mW 105.3 mW 105.3 mW 105.3 mW 105.3 mW 400 µs 144 µs 144 µs 100 µs 100 µs

Sleep

332 µs

Tx Off Idle Off Idle Off Tx Rx Idle Rx Tx

slide-25
SLIDE 25

Global energy consumption (example)

Receive

105.3 mW

Transmit

110.7 mW

Idle

105.3 mW

Slow

11 mW

Fast

35.1 mW 0.0 mW

Sleep Tx Off Idle Idle Off Idle Rx Tx Rx Tx Off Slow Fast CPU Radio

Radio in Idle

  • Tx
  • Off

state Sleep Idle Idle Tx Tx Tx conso (mW) 0.0 105.3 105.3 110.7 110.7 110.7 CPU in Fast

  • Slow

state Slow Fast Fast Fast Fast Fast conso (mW) 11 35.1 35.1 35.1 35.1 35.1 Node (mW) 11 140.4 140.4 145.8 145.8 145.8 mJ (1 step = 10−2s) 0.11 1.514 2.918 4.376 5.834 7.292

slide-26
SLIDE 26

Environment modelling

Realistic sensor inputs are spatially and temporarally correlated (= e.g., Poisson law) ⇒ need to be explicitely modeled . . . Connection between Reactive ML and Lucky

◮ a constraint-based language ◮ description and simulation of stochastic reactive systems

Application : processes wind and cloud ⇒ experimental results showed more pessimistic network lifetimes than with classical distribution laws

slide-27
SLIDE 27

In practice . . .

200 400 600 800 1000 1200 1400 1600 2 4 6 8 10 12 14 16 18 Temps (s) Energie consommee (As)

efficient : up to 100.000 nodes, faster than real-time below 1000 nodes modular : set of replacable “components”

slide-28
SLIDE 28

Some experiments with Glonemo

slide-29
SLIDE 29

“accurate” vs. “abstract” modelling

→ compare the lifetime of each node when energy E :

  • 1. is computed accurately (w.r.t. hardware current state)
  • 2. is abstracted :

E = number of emissions × λ × fixed emission cost λ = average number of collisions (estimated by simulations) ⇒ mean values not always representative . . .

slide-30
SLIDE 30

Comparison with a real network

→ “calibrate” the simulator by comparison with an existing WSN Coronis :

◮ network deployed since 2004

(water counter metering, Les Sables d’Olonnes)

◮ monitoring + precise energy consumption estimation

Work in-progress :

  • 1. simulate this application with Glonemo (2000 nodes)
  • 2. compare the energy consumptions
  • 3. evaluate a possible auto-configuration protocol
slide-31
SLIDE 31

A new auto-organisation protocol

→ evaluate a new protocol (T. Watteyne, FT/CITI)

◮ “geographic” routing from virtual node coordinates ◮ node coordinates randomly initialized, updated during msg

emissions

◮ analytic an simulation techniques are encouraging

(good performance, robust, energy efficient) work in-progress :

  • 1. implement this protocol within the “cloud” benchmark
  • 2. compare with other classical MAC/routing protocol
  • 3. better tune the organisation phase
slide-32
SLIDE 32

Using Dynamic Voltage Scaling (DVS) ?

How to reduce the CPU consumption inside a node ?

◮ V divided by n ⇒ speed divided by n, E divided by n2 ◮ WSN nodes are essentially idle or weakly busy (weak duty cycle) ◮ synchronous CPU :

◮ discrete working states ◮ time (and energy) latency when state changes

Hardware Routing MAC Application CPU ... ... Radio D V S Stop Fast Slow commands inst./sec.

  • verhead

time (energy)

Node activity prediction ? Strong deadlines ? Need for an OS ? ⇒ preliminary answers through simulation . . .

slide-33
SLIDE 33

The current picture

analytic techniques Exaustiveness cycle−accurate simulation Glonemo Hopeless Useless Accuracy Model−checking

slide-34
SLIDE 34

WSN model-checking with IF : a case study

◮ Detection of a pollution cloud ◮ Comparison of the network lifetime w.r.t two routing

algorithms : directed diffusion and flooding.

◮ Other elements (MAC, hardware, channel, . . .) more abstract

Observations Node Node Other nodes Environment Routing Routing Application Application data Other Cloud Channel Energy MAC Energy MAC

slide-35
SLIDE 35

IF model (details)

◮ Network lifetime : a global clock, never reset ◮ MAC layer and channel :

◮ → real network : ◮ Unicast : acks ⇒ msgs re-emitted when lost ◮ Broadcast : no acks, no re-emissions ◮ → IF model : ◮ Unicast : arbitrary (finite) emission delays ◮ Broadcast : non-deterministic failures, fixed emission delays

◮ Energy : 1 emission = 3 units ; 1 reception = 2 units ◮ Environnement :

◮ p´

eriodic stimulation of the current node

◮ move to a neighbour node

slide-36
SLIDE 36

Computation of worst-case network lifetime

A node is dead (fail-silent behaviour) when out of energy Several criteria do define network lifetime :

◮ elapsed time before the death of X % of the nodes ◮ elapsed time before the network is partitioned

⇒ notion of “dead” states worst-case scenario =

shortest path (w.r.t Lifetime clock) from initial to a “dead” state

Implementation :

IF exploration engine + A* shortest path search algo (min-cost tool)

slide-37
SLIDE 37

Experimental results

1 2 3 4 5 6

Sink

Worst case lifetime 1st node dead partitioned network Flooding 14 21 Directed diffusion 41 52 1st node dead worst-case random simulation Flooding 14 40 32 18 21 19 Directed diffusion 41 80 78 123 108 101

slide-38
SLIDE 38

Model-checking with IF : conclusion

In favor :

◮ WSNs routing algorithms could be modeled ◮ Possible to define and compute lifetime properties ◮ performs like similar tools (Uppaal, RT-Maude)

Against :

◮ strong and uncontroled abstractions

(energy consumed ∼ number of msg transmitted)

◮ network configuration too small

(12 nodes ⇒ 3.106 states ⇒ 1 day of CPU)

slide-39
SLIDE 39

Model-checking with IF : what else could be done ?

◮ Modeling langage

◮ communication primitives

(Fifo queues vs radio broadcasts + RDV)

◮ network topology ◮ ⇒ a WSN BIP profile ?

◮ Exploration engine

◮ dedicated data structures for energy consumption

state = (control, discrete data, clocks, energy) e.g., symbolic “priced zones” (Linear Priced Timed Automata)

◮ dedicated exploration algo ? Bounded model-checking ?

◮ Abstraction techniques

◮ combine various abstraction degrees :

a detailled node + a few less detailed ones + rest of the net

slide-40
SLIDE 40

Linearly Priced Timed Automata (LPTA)

Timed automaton extend with prices (on states and transitions)

p1

c1

[x < D] send!m p2

c2 c

(p1, η, p)

δ

− → (p1, η + δ, p + c1.δ) (p1, η, p) send !m − → (p2, η, p + c) ⇒ costs are associated to each run of the automaton Symbolic state space representations : priced zones

◮ capture the minimal cost to reach a location ◮ minimum cost reachability pb is decidable

Efficiency in practice ? Application to maximal cost ?

slide-41
SLIDE 41

The current picture

analytic techniques Exaustiveness Model−checking cycle−accurate simulation Glonemo Hopeless Useless Accuracy Abstractions

slide-42
SLIDE 42

Energy preserving abstractions

2 V 13.3 mW 48.9 mW 3 V 1 V 0.8 mW OFF 0 mW

Sleep

332 µs

35.1 mW

140.4 mW 140.4 mW 145.8 mW

400 µs

100 µs

Transmit

145.8 mW

100 µs 140.4 mW 144 µs 140.4 mW

Receive

140.4 mW

144 µs 140.4 mW 140.4 mW

Idle S l e e p

3 5 . 1 m W

T r a n s m i t

1 4 5 . 8 m W

R e c e i v e

1 4 . 4 m W OFF m W 4 8 . 9 m W 3 V with DVS

Abstractions CPU Radio

  • ther parts
  • f the model
slide-43
SLIDE 43

Abstraction definition (1/3)

M1 less abstract than M2 iff

  • 1. same inputs → same outputs (functional equivalence)
  • 2. M2 consumes as much as M1 (worst-case lifetime)

S1 1 S2 8 Send Off Off S3 10 Idle

Detailed radio model, M1

Q12 Off Q3 10 Send 8 Idle

  • r Off

Abstract radio model, M2

M1 M2 =def ∀ input e. Out(M1, e) = Out(M2, e) ∧ E(M1, e) ≤ E(M2, e)) But, very strong abstraction . . .

slide-44
SLIDE 44

Abstraction definition (2/3)

S1 1 S2 8 Send Off Off S3 10 Idle

Detailed radio model, M1

Q12 Off Q3 10 Send 5 Idle

  • r Off

Abstract radio model, M2

Finer abstraction, but true only under certain conditions : ∃e such that E(M1, e) E(M2, e) ⇒ Need to restricts the set of inputs using a context K

slide-45
SLIDE 45

Abstraction definition (3/3)

Abstraction might be true only for some “relevant” inputs (not for all combinations, only after a certain time, etc.) Context K = set of input traces (e.g., K ∈ 2{Send,Idle,Off}∗) M1 K M2 ⇐ ⇒ ∀e ∈ K,    Out(M1, e) = Out(M2, e) ∧ E(M1, e) ≤ E(M2, e) → But radio abstraction still have to be preserved by composition with the MAC model . . .

slide-46
SLIDE 46

Abstraction : model composition

Emission /Send Ack reception /Receive CCA Carrier Sense Channel Busy t=0[T] and t=t_detect[T] Packet to send Sleep and t=t_detect[T] End of the random Backoff Random Backoff /Off /Off /Off Channel Free /Send /Off /Idle /Receive /Receive /Idle Reception /Off free channel busy channel /Send End of reception Reception reception End of failure /Off /Send Ack Ack received

  • r

timeout /Off End of emission /Receive

Send Off Idle Off $1$ $S_1$ $8$ $S_2$ $10$ $S_3$

10 Q3 5 Q12

MAC

Idle Receive Send,Off Pckt2receive Busy Pckt2send

Radio K’ K

Packet received

  • k

Idle

  • r Off

Off

  • r

Idle Send

If, ∀ input e ∈ K ′, Out(Mac, e) ∈ K then Radio1 K Radio2 ⇒ Mac Radio1 K ′ Mac Radio2 More generaly : Out(M, K ′) ⊆ K ⇒ (M1 K M2 ⇒ M M1 K ′ M M2)

slide-47
SLIDE 47

Abstraction : what to do next ?

◮ decision procedure for relation K

◮ “weighted” trace inclusion ◮ enumerative vs symbolic techniques ?

◮ transpose this work in the “asynchronous framework”

◮ general com. primitives, dense time, non-determinism ◮ weighted simulation relation (e.g. amortized simulation) ◮ simulation relations between LPTA ◮ decision procedure

◮ methodology

◮ how to guess correct contexts and abstract models ? ◮ assume-guarantee paradigm for energy related properties ?

slide-48
SLIDE 48

Overview

  • 1. Wireless Sensor Networks
  • 2. Design, programming and analysis techniques for WSNs
  • 3. What has been done within V´

erimag ?

  • 4. Where we could go in a near future ?
slide-49
SLIDE 49

Some more open perspectives

WSN = relevant/challenging application domain for design and analysis techniques

◮ Programing

◮ dedicated language (Gals systems, more abstract than nesC ?) ◮ code generation for specific platforms

(asics, lightweight run-time environment)

◮ Analysis

◮ behavioural vs analytic techniques

(probabilities, is worst case really an issue)

◮ security properties

◮ Next ?

◮ experiment plateform ?