Slotted Programming

Slotted Programming Slotted Programming - Start

Added : 2016-07-15 Views :44K

Download Presentation

Slotted Programming




Download Presentation - The PPT/PDF document "Slotted Programming" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.



Presentations text content in Slotted Programming

Slide1

Slotted Programmingfor Sensor Networks

Roland FluryRoger WattenhoferDistributed Computing GroupETH Zurich, Switzerland

D

ISTRIBUTED COMPUTING

Slide2

Roland Flury @ IPSN 2010

Energy Efficient Communication

A

B

time

Radio off

Radio on

TX

Radio off

Radio off

Radio on

RX

Radio off

t

0

t

A

t

B

Close to optimal!

Slide3

Roland Flury @ IPSN 2010

Requirements

Good SynchronizationExact time executionNo delayIf B is too late, it misses the messageRadio must be free to useNo other task may be using the radio

Slotted Programming can ensure these properties

Slide4

Roland Flury @ IPSN 2010

Programming Sensor Nodes

What are the time critical sections?E.g. wake up the radio at t0 to receive a messageCan they be delayed by another task?Can we avoid it?Check access to any device, not only radio

Need to analyze the entire application

Any part may interact with any other part

Slide5

Roland Flury @ IPSN 2010

Traditional vs Slotted

Traditional Application

No interference of other tasksCan analyze each task separately

Slotted Application: Temporal separation of the tasks

time

time

Slide6

Roland Flury @ IPSN 2010

Slotted & Synchronized

A

time

B

All nodes need to be synchronized

Clock sync module does all the work

Transparent to the other modules

Slide7

Roland Flury @ IPSN 2010

Slotted Programming

time

Scheduling Window

Easy case: repetitive schedule

Advanced schedules are possible

Slide8

Roland Flury @ IPSN 2010

Slotted Programming

Scheduling Window

Slide9

Roland Flury @ IPSN 2010

Slotted Programming

1) @boot: allocate slots2) schedule slots: startSlot() - stopSlot()

Scheduling Window

Clock Sync

Sampling

Routing

@boot

init()

init()

init()

@runtime

startSlot()

startSlot()

startSlot()

stopSlot()

stopSlot()

stopSlot()

Slide10

Roland Flury @ IPSN 2010

Slotted Programming

Scheduling Window

startSlot()

{

startRxTimer();

startTxTimer();

}

time

RX

TX

RX timer

TX timer

Slide11

Roland Flury @ IPSN 2010

Slotted Programming

Very simple: Time divisionNo side effectsAdditional module does not disturb existing appGuaranteed access to resourcesSimplified software structureStep towards provably correct softwareEnergy efficient applicationsClock Sync is transparent

Too simplistic?

Slide12

Roland Flury @ IPSN 2010

Examples

Slotted Clock SynchronizationEnergy Efficient AlarmingData gathering

Goal

Synchronize all nodes of a network

A master node dictates its time

to the remaining nodes

Slide13

Roland Flury @ IPSN 2010

Slotted Clock Synchronization

Bootstrap procedure to get rough synchronization

A

B

C

time

RX

TX

Slide14

Roland Flury @ IPSN 2010

Pipelining

RX

TX

TX

TX

RX

TX

RX

time

root

1 hop

2 hops

3 hops

Slide15

Roland Flury @ IPSN 2010

Pipelining

RX

TX

TX

TX

TX

RX

RX

time

root

1 hop

2 hops

3 hops

Slide16

Roland Flury @ IPSN 2010

Pipelining

RX

TX

TX

TX

TX

RX

RX

time

Best synchronization

we can have!

Lenzen, Sommer, Wattenhofer

@Sensys 2009

root

1 hop

2 hops

3 hops

Slide17

Roland Flury @ IPSN 2010

Slotted Clock Sync

Timers not delayedAccess to radio not blockedTransparent to remaining modules:All timers are relative to the time when the current slot started

time

startSlot()

Slide18

Roland Flury @ IPSN 2010

Examples

Slotted Clock SynchronizationEnergy Efficient AlarmingData gathering

Goal

a) Inform the root node about an event

b) Inform all nodes about an event

energy efficient and reliable

Slide19

Roland Flury @ IPSN 2010

Energy Efficient Alarming

Initial idea: Pipelined RSSI sniffsSend a message to transmit an alarmMeasure the RSSI value to detect an alarmSeveral nodes may indicate an alarm in parallel

Slide20

Roland Flury @ IPSN 2010

Alarm!

RSSI

TX

RSSI

TX

RSSI

TX

5ms

root

1 hop

2 hops

3 hops

TX

RSSI

TX

RSSI

TX

RSSI

TX

RSSI

root-to-all

any-to-root

Slide21

Roland Flury @ IPSN 2010

False Alarm!

RSSI works fine – indoorsAround 30% false alarms when deployed outdoorsTinyNode with Semtech XE1205 RadioFSK modulation:Announce an alarm: Send at f0No alarm: be quietDetection:No alarm: white noise (50% '1' and 50% '0')Alarm: > 75% '0'Several nodes may indicate an alarm in parallel

0

1

f

0

f

1

Slide22

Roland Flury @ IPSN 2010

Signaling

Reuse same pipeline as for RSSI:

5ms

root

1 hop

2 hops

3 hops

RX

RX

root-to-all

any-to-root

RX

RX

RX

RX

RX

Slide23

Roland Flury @ IPSN 2010

Slotted Programming

How to compare the RSSI and Signaling?Slotted Programming = ModularityEasy reuse of software modulesEnergy Efficient: Tight pipeliningNo delays for wakeup, guaranteed access to radioFalse Alarms: 30% RSSI vs 1% Signaling

RSSI

RSSI

RSSI

RSSI

RSSI

RSSI

Slide24

Roland Flury @ IPSN 2010

Examples

Slotted Clock SynchronizationEnergy Efficient AlarmingData gathering

Goal

Collect sensor readings at a base station

Slide25

Roland Flury @ IPSN 2010

Slotted Data Gathering

root

1 hop

2 hops

3 hops

TX

RX

RX

TX

RX

TX

RX

Slide26

Roland Flury @ IPSN 2010

Slotted Data Gathering

root

1 hop

2 hops

3 hops

TX

RX

RX

TX

RX

TX

RX

Slide27

Roland Flury @ IPSN 2010

Slotted Programming - Recap

Simple time divisionModularityNo delays, guaranteed access to resourcesEnergy efficient applicationsTight scheduling & wakeup patternsTransparent Clock SyncSimplified software structureEach module can be analyzed independently

RX

TX

Slide28

Roland Flury @ IPSN 2010

Thank You!

slotos – an extension to TinyOS that

supports slotted programming will be

available online soon.

Slide29

Roland Flury @ IPSN 2010

Slotted Programming For Everything?

External asynchronous eventsFast samplingMultitasking required?

time

Fast sensor sampling

Slide30

Slide31

Slide32


About DocSlides
DocSlides allows users to easily upload and share presentations, PDF documents, and images.Share your documents with the world , watch,share and upload any time you want. How can you benefit from using DocSlides? DocSlides consists documents from individuals and organizations on topics ranging from technology and business to travel, health, and education. Find and search for what interests you, and learn from people and more. You can also download DocSlides to read or reference later.
Youtube