mihai galos - icecs 2010 1 dynamic reconfiguration in wireless sensor networks mihai galos, fabien...

18
1 Mihai GALOS - ICECS 2010 Dynamic reconfiguration in Wireless Sensor Networks Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology (INL) Lyon Institute of Nanotechnology (INL) Lyon Lyon , France , France

Upload: claud-brooks

Post on 11-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

1Mihai GALOS - ICECS 2010

Dynamic reconfiguration in Wireless Sensor NetworksDynamic reconfiguration in Wireless Sensor Networks

Mihai GALOS, Fabien Mieyeville, David NavarroMihai GALOS, Fabien Mieyeville, David Navarro

Lyon Institute of Nanotechnology (INL) Lyon Institute of Nanotechnology (INL)

LyonLyon, France, France

Page 2: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

2Mihai GALOS - ICECS 2010

Outline

Introduction to WSN (Wireless Sensor Networks)

Dynamic Reconfiguration

Existing solutions

Motivation

Our solution

Supported Architectures

Results

Conclusion and Perspecitves

Page 3: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

3Mihai GALOS - ICECS 2010

WSN - Introduction

Wireless sensor networks (WSNs) are composed of resource-constrained sensor

nodes that can cooperatively monitor physical or environmental conditions, such as

temperature, pressure, acceleration, …

Applications:– environmental data collection

– security or health monitoring

– Vehicles

– …

Network standards:– IEEE 802.15.4

– ZigBee

Page 4: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

4Mihai GALOS - ICECS 2010

WSN - Node

Small size

Low cost

Low energy consumption

Low processing power

Sensor Processing & controlling unit

Communication interface

MemoryNODE

Battery

commercial " lab assembled"

Some existing platforms:

Page 5: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

5Mihai GALOS - ICECS 2010

WSN Dynamic Reconfiguration

Node, typical application:– Sensing of an analog value

– Processing of the read value

– Sending it via RF

Dynamic Reconfiguration (firmware update): add, modify or remove functionalities after deployment

Reasons for Dynamic Reconfiguration:– Fine-tuning of algorithms (i.e. : compensating for meteorological conditions)

– Adding / remove algorithms

– Replacing a failing node

Page 6: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

6Mihai GALOS - ICECS 2010

Existing Solutions for Dynamic Reconfiguration

Operating Systems Virtual Machines

Page 7: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

7Mihai GALOS - ICECS 2010

Existing solutions : Operating systems

• Fall into two categories– Monolithic (whole firmware image has to be sent over RF to

reconfigure a node)

– Modular (only the functionality in question is transmitted)

Name Type Update CostRunning

CostsHeterogeneity support

Update Type

TinyOS Monolithic High

Low Limited Machine Code

MantisOS

Modular MediumNanoRK

SOS

Page 8: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

8Mihai GALOS - ICECS 2010

Existing solutions: Virtual Machines

• Again, two categories– ASVM (Application-specific virtual machines)

– General-purpose virtual machines

Name Type Update CostRunning

Costs

Heterogeneity

Support

Update

Type

Maté ASVM

LowMedium to

HighYes

Virtual Machine

specific

Bytecode

Darjeeling GPVM

VMSTAR GPVM

Page 9: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

9Mihai GALOS - ICECS 2010

Desired solution

Page 10: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

10Mihai GALOS - ICECS 2010

Our approach: In situ Compilation

Goal: implement solution to dynamically reconfigure a WSN, with the following requirements:– Running Cost: Low

– Updade Cost: Low

– Support for Heterogenity: Yes

– Modularity: Yes

Specifications– Hardware

– 8 or 16 bit CPU architecture running on the node

– Less than 128kB of Flash

– Less than 20Mhz of CPU speed

– Less than 16kB or RAM

– Lack of a Memory Management Unit

– Software

– Size of RAM poses limitations on input file for compilation

High-level language, small bytecount +

compilation

Execution in Native format

Page 11: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

11Mihai GALOS - ICECS 2010

A new High-level language: MinTax

• Name: Minimal Syntax, inspired from C

• Small syntax means less radio time to transmit functionality

• Strongly typed high-level language

• Each clause is delimited from others with the ’;’ delimiter

• Functions do not have explicit return types

Name Supported?

IdentifiersYes, 2 bytes wide

Data types

Yes

signed/unsigned 8bit or 16bit

Arithmetic operationsYes, (+, -, / , * and %)

For and While loops Yes

If and Switch-Case clauses Yes

Nesting Yes

Structures Yes

Pointers Experimental

Digital I/O operations Yes

ADC Yes

Preprocessor directives No

Typedefinitions No

Page 12: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

12Mihai GALOS - ICECS 2010

MinTax: an example

1. aUk{

2. ^i=A2;

3. ^j=8;

4. ^u=i;

5. Wi<99

6. Wj>0

7. Pi,j;

8. u=d@k;

9. j-

10. #

11. i+

12. #

13. }u;

1. Uint8_t a (uint16_t k){

2. Uint8_t i = read_analog_pin(pin2);

3. Uint8_t j = 8;

4. Uint8_t u = i;

5. While(i<99){

6. While(j>0){

7. Pwm_output(i,j);

8. u=delay(k);

9. j - -;

10. }

11. i++;

12. }

13. return u;}

Page 13: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

13Mihai GALOS - ICECS 2010

The MinTax Compiler

Analysis Stage– Lexical Analysis: splitting the input file

into atoms or tokens – Implemented, generated with re2c

– Syntactical Analysis: validation that the input file corresponds to the language’s formal grammar – Not Needed

– Semantical Analysis: context evaluation of symbols (Symbol Table) – Implemented, merged with Lexical Analysis to make single-pass compilation

Synthesis Stage - ImplementedVariables are allocated to internal registers

Small functionalities

Faster execution, less energy used when executing generated code

Position independent Code

Page 14: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

14Mihai GALOS - ICECS 2010

The MinTax Compiler: Supported WSN Nodes

The WSN world usually comprises solutions around microcontrollers from Atmel and Texas Instruments

Mica2

Z1 AVRRaven

Page 15: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

15Mihai GALOS - ICECS 2010

Results

Sending of a “Blink” application, Mica2 platform:

Compile, and reprogram:

Page 16: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

16Mihai GALOS - ICECS 2010

Conclusion and perspectives

Conclusion– High-level language (MinTax) coupled with in-situ compilation

– Energy-efficient solution for dynamic reconfiguration

Perspectives– Heterogeneous network validation

– Multi-OS Integration

Page 17: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

17Mihai GALOS - ICECS 2010

Thank you !

Page 18: Mihai GALOS - ICECS 2010 1 Dynamic reconfiguration in Wireless Sensor Networks Mihai GALOS, Fabien Mieyeville, David Navarro Lyon Institute of Nanotechnology

18Mihai GALOS - ICECS 2010