Cours ModelesInteractionEtTechnologiesPervasives ASR8

Vous aimerez peut-être aussi

Vous êtes sur la page 1sur 61

05/01/10

Interactions et TechnoIogies
pour Ies environnements
pervasifs
Sbastien Leriche
Sbastien Leriche / CSC5004 2010 page 2 Dpartement INF
PIan

Introduction aux Systmes Pervasifs

Interactions avec I'environnement : capteurs et


effecteurs

ModIes de programmation pour Ie pervasif


page 3 direction ou services
Introduction aux
Systmes Pervasifs

tymoIogie : Emprunt I'angIais, driv du Iatin pervasus


qui est Ie participe pass de pervadere, aIIer de toute part,
s'insinuer, se propager, se pntrer dans, s'tendre,
imprgner, se rpandre, faire rpandre, envahir

Ce terme n'est pas reconnu officieIIement dans I'usage en


Iangue franaise

Synonymes : diffus, omniprsent


Sbastien Leriche / CSC5004 2010 page 4 Dpartement INF
Votre avis pour commencer ?
Sbastien Leriche / CSC5004 2010 page 5 Dpartement INF
Le rIe de I'informatique

Environnement informatique
Avant : environnement virtuel dans lequel nous
entrons pour effectuer une tche et dont nous
sortons la fin de la tche (mdiathque)
Aujourdhui : espace ph!sique amlior de "estion
de linformation (transports en commun # passe
$avi"o)

AppIication
Avant : lo"iciel pour e%ploiter un matriel
Aujourdhui : mo!en pour lutilisateur deffectuer une
tche
page 6 direction ou services
&' (attern' )*iquitous + ,ervasive -omputin": A .echnolo"!/driven
(otivation 0 1ummer school on u*iquitous and pervasive computin"0 2332
Sbastien Leriche / CSC5004 2010 page 7 Dpartement INF
Historique (1)

[Mark Weiser, 1991]


A ne4 4a! of thin5in" a*out computers in the
4orld0 one that ta5es into account the natural human
environment and allo4s the computers themselves
to vanish in the *ac5"round
.he most profound technolo"ies are those that
disappear'.he! 4eave themselves into the fa*ric of
ever!da! life until the! are indistin"uisha*le from it
(' 6eiser .he computer for the t4ent!/first centur!0 1cientific
American0 sept 7887:89/739
Sbastien Leriche / CSC5004 2010 page 8 Dpartement INF
Historique (2)

[M. Satyanarayanan, 2001]


Au del des s!stmes distri*us et mo*iles

4 chaIIenges
)tilisation effective des espaces intelli"ents
:nvisi*ilit
1cala*ilit # passa"e l;chelle
.ransparence des in"alits denvironnements
(' 1at!anara!anan ,ervasive computin" : <isions and challen"es0
:=== ,ersonal -ommunications0 au"' 2337:73/7>
Sbastien Leriche / CSC5004 2010 page 9 Dpartement INF
Historique (3)

[Saha & Mukherjee, 2003]


Syst me
distribu
Syst me
distribu
Syst me
distribu
Gestion de
la mobilit
Gestion de
la mobilit
Gestion de
la mobilit
Gestion de
lubiquit
Gestion de
lubiquit
Gestion de
lubiquit
Syst me mobile
Syst me pervasif
Gestion du
contexte
Gestion du
contexte
Gestion du
contexte
?enis -onan
?jamel @elaAd
@runo ?efude
1*astien Beriche
(ichel 1imatic
1*astien Beriche
,r/requis A1C
?' 1aha + A' (u5herjee ,ervasive computin" : a paradi"m for the
27st centur!0 :=== -omputer journal0 march 233D:2E/D7
Sbastien Leriche / CSC5004 2010 page 10 Dpartement INF
Historique (4)
Sbastien Leriche / CSC5004 2010 page 11 Dpartement INF
Vers I'internet des objets...

Connexion rseaux omniprsentes


&ilaire0 6ifi0 @luetooth0 F,C1#F1(#DF'''

Priphriques inteIIigents (capacit de


traitement et d'interaction)
1ervices lmentaires

DisponibiIit d'un point d'accs Internet


:nterconne%ion des s!stmes entre eu%
Accs des services comple%es

Internet des objets ou des choses Internet of


things
Sbastien Leriche / CSC5004 2010 page 12 Dpartement INF
Les objets inteIIigents

Peuvent se souvenir des vnements importants


(moire

Prsentent un comportement dpendant du


contexte
-apteurs

IIs sont interactifs


-ommuniquent avec leur environnement
=n rseau avec les autres o*jets intelli"ents

Ce n'est pIus de Ia science-fiction, ces objets


existent (cf. Iaboratoire informatique ambiante)
Sbastien Leriche / CSC5004 2010 page 13 Dpartement INF
La grande probImatique

Comment faire interagir des objets inteIIigents


Guand on n;est pas sHr de ce qu;il ! aura
l;e%cution
Guand ces o*jets peuvent tom*er en panne (plus il
! en a0 plus la pro*a*ilit que l;un d;entre eu% soit en
panne au"mente)
Guand on veut pouvoir profiter d;o*jets non prvus
la conception
'''

Les objets ont beau tre inteIIigents, a nous fait


une beIIe jambe si on ne sait pas construire de
I'interaction ! Et ce n'est pas si faciIe...
Sbastien Leriche / CSC5004 2010 page 14 Dpartement INF
Les petites probImatiques

Dcouverte

ExpIoitation

Gestion du contexte

Htrognit

Administration dcentraIise

VoIatiIit

VoIume(s)

DpIoiement,

Adaptation

Orchestration...
Sbastien Leriche / CSC5004 2010 page 15 Dpartement INF
La question Bonus

O doit-on excuter Ie code ?


&aut/il e%cuter le code au plus prs des
donnes#capteurs ou est/il prfra*le de le dporter
sur une machine tierce I

Pas de rponse universeIIe, compromis entre :


.aille de code et mmoire disponi*le
-onsommation lectrique
@ande passante
?istance de communication
=nvironnement de pro"rammation # lan"a"e
@esoins temps/rel
=%i"ences de scurit
Sbastien Leriche / CSC5004 2010 page 16 Dpartement INF
Interactions en environnement pervasif
Homme
Machine
Environnement
(Jors sujet)
=ntres/sorties
classiques0
:J(0 KE sens
Capteurs : ph!siolo"iques0
ph!siques0 "estuelle'''
Effecteurs : (oteurs0
si"nau%0 relais
lectriques''' K E sens
page 17 direction ou services
Capteurs et effecteurs

Dans Ia Iittrature en Iangue angIaise,


on trouve Ies termes sensors et
actuators. Ce dernier est souvent
maIadroitement traduit par actionneur
pour Ies effecteurs.
Sbastien Leriche / CSC5004 2010 page 18 Dpartement INF
Environnement physique d'excution

Un capteur ou un effecteur a besoin d'un support


d'excution qui Iui fournit :
=ner"ie (lectrique0 au moins aujourd;hui)
(o!en de communication (:#L srie M 6ifi''')
,rocesseurs lo"iques (-,)0 ?1,''')
(moire (CA(''')
(odule capteur
Radio Transceiver
Data
Storage
Sensing Module
Battery Power
Processor
Anatomy of a Sensor Node
Radio Transceiver
Data
Storage
Sensing Module
Battery Power
Processor
Anatomy of a Sensor Node
Sbastien Leriche / CSC5004 2010 Dpartement INF
BasicX-24

18 mm x 32 mm

~ 50 mA

Basic

Price ~ $50
@asic 1peed NE0333 instructions per
second
==,CL( D2O *!tes ()ser pro"ram
and data stora"e)
(a% pro"ram len"th P333K lines of @asic code
CA( 933 *!tes
Availa*le :#L pins 27 (7N standard K 2 serial
onl! K D accessed outside
standard dip pin area)
Analo" :nputs (A?-s) P (P of the 7N standard :#L
pins can individuall! function
as 73*it A?-s or standard
di"ital :#Ls or a mi%ture of
*oth)
1erial :#L speed 7233 / 9N3'PO @aud
,ro"rammin" interface Ji"h speed 1erial
,h!sical ,ac5a"e 29 pin ?:, module
Sbastien Leriche / CSC5004 2010 Dpartement INF
PIC / AVR

SmaII and cheap micro


processors

Wide range of
configurations, USB, RF,
CAN

Price: from ~2 C to 30 C

AssembIer or C
Sbastien Leriche / CSC5004 2010 Dpartement INF
ScatterWeb

BuiIt specificaIIy as Sensornetwork node

A number of sensors aIready

Radio or seriaI communication

More advanced than Smart-Its

Price ~ 100 C
Sbastien Leriche / CSC5004 2010 Dpartement INF
Smart-Its

Latest version ParticIe

Lancaster Do-It-YourseIf

Program in C

Sensorboards with a Iot of


options on them

Radio or seriaI communication

Price: from 10 C to 150 C


http:##particle'teco'edu
http:##smart/its'com
Sbastien Leriche / CSC5004 2010 Dpartement INF
Motes

AKA BerkIey motes

SmaII embedded systems for


Sensor networks

OnIy avaiIabIe in kits, starter kit


~ $900
Sbastien Leriche / CSC5004 2010 Dpartement INF
Embedded Java

TINI, JStik, JStamp, SaJe

JVM custom 1.1.8 or J2ME/CLDC

Ethernet aII except JStamp

JavaReaITime support on JStik, JStamp, SaJe

SeriaIports, 1-wire,
SPI

$100 - $400
Sbastien Leriche / CSC5004 2010 Dpartement INF
Arduino

Dedicated programming Ianguage


?:Q a5a ?o/:t/Qourself

Low cost moduIes ~50$

UItra-Iow consumption ~1W

FuIIy open source project


http:##444'atmel'com#d!n#resources#prodRdocuments#docP7N7'pdf
Sbastien Leriche / CSC5004 2010 Dpartement INF
Smartphones

C++ or Java (ObjectiveC/IPhone)

BIuetooth, GPRS, GPS

GeneraIIy sIower processing


capacity compared to PDAs

Hard to connect externaI


sensors directIy

BIueTooth seriaI adapter one


possibIe way to connect an
embedded system Iike BX24
Sbastien Leriche / CSC5004 2010 Dpartement INF
PDAs

PocketPC

Linux

PaIm

BIuetooth, WLAN, GPRS

PossibIe to connect
externaI sensors, e.g.
through seriaI port
Sbastien Leriche / CSC5004 2010 Dpartement INF
MeshCube

Dimensions: smaII cube (7x5x7cm)

No moving parts

Low power consumption (ca. 4W)

100Mbps ethernet + up to 2 WLAN


(802.11a/b/g) interfaces (RP-SMA
connectors)

400MHz MIPS processor

64MB RAM

32MB fIash

USB

Runs Linux
http:##444'meshcu*e'or"
Sbastien Leriche / CSC5004 2010 Dpartement INF
Mini-ITX, Nano-ITX .

Ordinary PC in tiny formfactor

Nano-ITX

72 % 72 cm

EDD(hS T 7 FJS U (a% 7 F* CA(

Audio0 <FA0 .</out0 =thernet0 )1@


2'3

1A.A0 :?=0 mini/,-:

FitPC2

7'N FJS U 7Fo CA( U J?(: U 6ifi U


)1@
Sbastien Leriche / CSC5004 2010 Dpartement INF
Other options

Laptops

PC104 aka industriaI PC

IPC@Chip PC with 186


processor and DOS

Desktop PC
Sbastien Leriche / CSC5004 2010 page 31 Dpartement INF
ExempIes de capteurs et effecteurs

Sensors and actuators

MatrieI du Iaboratoire d' informatique


ambiante
Sbastien Leriche / CSC5004 2010 Dpartement INF
Sensors

Biosensors, physioIogicaI

Falvanic 15in response (F1C)

=lectro-ardioFram (=-F)

=lectro(!oFram (=(F)

Cespiration

Resistive, capacitive

Position and ID, RFID

CMUcam, embedded computer vision


Sbastien Leriche / CSC5004 2010 Dpartement INF
Air sensors

Gas sensors

L%!"en

V-i"aretteW smo5e

<arious 5inds of air pollution

Dust sensors (particIes in air)


Sbastien Leriche / CSC5004 2010 Dpartement INF
PhysioIogicaI monitoring

Immediate sensing

,ulse

Jeart rate

&all detection
Sbastien Leriche / CSC5004 2010 Dpartement INF
Sensing

BiomedicaI
Jeart rate
.emperature
14eat

EnvironmentaI
(oisture
,ollution level
.emperature
Cadiation
Sbastien Leriche / CSC5004 2010 Dpartement INF
Gesture recognition

Home appIiance controI

MedicaI monitoring
video
Sbastien Leriche / CSC5004 2010 Dpartement INF
Woven RFID Antenna (A. Neudeck, TITV-Greitz)
Sbastien Leriche / CSC5004 2010 Dpartement INF
Actuators

VisuaI dispIays

Speakers

Motors

BubbIe machine

Traffic Iights
Sbastien Leriche / CSC5004 2010 Dpartement INF
Human senses

Vision

Hearing

Touch

SmeII

Taste
Sbastien Leriche / CSC5004 2010 Dpartement INF
Actuators

Hearing

1pea5ers0 headphones0
directional )ltra1ound0 ,ieSo
spea5ers0 *uSSers0 *one/
conductin"0 :C headphones

-onduct sound 4ith a thin hose

(echanical sound sources0 e'"'


sha5e a chain

SmeII/taste

=ssential oils
Sbastien Leriche / CSC5004 2010 Dpartement INF
Actuators cont.

Touch

Japtic0 .actile
/ =lectro/(echanical0 rela!s0 motors
/ =ner"! consumption T relative hi"h

Jeat#-old
/ ,ieSo elements
/ Jeat/4ire
/ =ner"! consumption / hi"h
Sbastien Leriche / CSC5004 2010 Dpartement INF
Actuators cont.

CompIex ones

.< or Cadio *roadcasts0 local


or not

,la!in" music or sounds

-ontrol e%istin" infrastructure


usin" rela!s
http:##444'*lin5enli"hts'de
Sbastien Leriche / CSC5004 2010 Dpartement INF
Actuators cont.

More compIex exampIes

1(1#((1

<oice messa"es

<-C

&AX

=/mail

:nstant (essa"in"

Any machine to machine interaction (network)


Sbastien Leriche / CSC5004 2010 Dpartement INF
TactiIe feedback/attention
.o"ether 4ith Armns mar5stridss5ola and &(<
(aster 4or5 *! Yohan Andersson and Anni5a Bund*er"
Sbastien Leriche / CSC5004 2010 Dpartement INF
Communication with signs and voice.
Needs visual contact and hearing range.
Sbastien Leriche / CSC5004 2010 Dpartement INF
Adding computer-controIIed motion to textiIes

Integrate microactuators into the textiIe materiaI

E.g. shape-memory aIIoys (SMA), mainIy used for


medicaI appIications

Affect the acoustic properties of a room with


dynamic textiIes

Micro- and macroIeveI physicaI movement

Static eIectricity, MEMS...?


Sbastien Leriche / CSC5004 2010 Dpartement INF
Vision

Emitting vs refIective

?ispla!s0 lamps0 =B0


Bi"ht =mittin" ?iods /
B=?

-romatic colours
(thermo0 photo0 pieSo0
h!dro0 electro)0 e/in5
Sbastien Leriche / CSC5004 2010 Dpartement INF
EL and Thermocromatic coIours

EIectroIuminescent
(EL) materiaI emits
Iight when voItage is
appIied

Thermo cromatic
coIours change
when heat is appIied
Sbastien Leriche / CSC5004 2010 Dpartement INF
Chromic materiaIs, dynamic coIors

Thermochromic

Photochromic

EIectrochromic

Does not emit Iight in itseIf


Sbastien Leriche / CSC5004 2010 Dpartement INF
By Linda MeIin
Sbastien Leriche / CSC5004 2010 Dpartement INF
Sbastien Leriche / CSC5004 2010 Dpartement INF
Heatelement applicated behind fabric printed with
Termocromic paint
page 53 direction ou services
ModIes de programmation
pour Ies capteurs et effecteurs

C'est joIi ces petites btes, mais est-ce


que a mord et, si oui, comment on Ies
apprivoise?
Sbastien Leriche / CSC5004 2010 page 54 Dpartement INF
Besoins au niveau programmation (1)

Pour interagir efficacement avec ces capteurs et


effecteurs, on a besoin de recettes (au sens
design pattern par exempIe), de mthodes, d'outiIs
ddis au niveau programmation

IntergicieIs (API, abstraction, couche


intermdiaire)

UtiIisation de paradigmes diffrents


,ro"rammation vnementielle
-ommunications as!nchrones'''

UtiIisation des concepts de programmation


avancs
.hreads0 :J(0 ?ra";n ?rop0 '''
Sbastien Leriche / CSC5004 2010 page 55 Dpartement INF
Besoins au niveau programmation (2)

Vous aIIez manipuIer pIusieurs couches


intergicieIIes en TP
Accs 4e*cam0 son0 capteurs )1@'''
Celativement simple car A,: ddie

Mais vous aurez besoin de matriser certains


concepts de programmation
-omplments # rappels des modules .1,
prcdents
Sbastien Leriche / CSC5004 2010 page 56 Dpartement INF
RappeI : Ies threads en Java
pu*lic class JelloCunna*le implements Cunna*le Z
pu*lic void run() Z
1!stem'out'println([Jello from a thread\[)U
]
pu*lic static void main(1trin" ar"sVW) Z
(ne4 .hread(ne4 JelloCunna*le()))'start()U
]
]
http:##java'sun'com#docs#*oo5s#tutorial#essential#concurrenc!#simple'html
Sbastien Leriche / CSC5004 2010 page 57 Dpartement INF
Les pooIs de threads en Java 1.5

L'utiIisation d'un thread (au moins) par capteur ou


effecteur permet d'avoir une appIication sans
bIocage (muIti-tche)

API Java 1.5 et +


java.utiI.concurrent
http:##java'sun'com#docs#*oo5s#tutorial#essential#concurrenc!#pools'html
http:##444'deitel'com#articles#javaRtutorials#233E772N#Yava(ultithreadin"R.utorialR,art9'html
Sbastien Leriche / CSC5004 2010 page 58 Dpartement INF
Les vnements en Java

PrincipaIement utiIis dans Ies IHM


(ais pas seulement \

EventObject, EventListener
AddXXXListener / fireXXX (XXX=vnement)
http:##java'sun'com#docs#*oo5s#tutorial#uis4in"#events#inde%'html
http:##444'j"uru'com#faq#vie4'jspI=:?^8PE9>
Sbastien Leriche / CSC5004 2010 page 59 Dpartement INF
DpIoiement : archives jar et Manifest

Jar : format pour Ie dpIoiement d'appIication java

EnsembIe de ressources (.cIass et autres


donnes) compresses au format ZIP

SimpIe construire avec EcIipse (exporter/jar)


Bi"ne de commande : jar cvf appli'jar _

Fichier MANIFEST.MF
(ta/donnes associes l;application
-lasse (ain0 class/path0 si"natures'''
=n "nral0 dans rpertoire (=.A/:$&

Attention, par dfaut, pas d'incIusion possibIe de


jar dans Ie jar...
http://fjep.sourceforge.net
Sbastien Leriche / CSC5004 2010 page 60 Dpartement INF
DpIoiement : Java Web Start

Java Web Start permet de Iancer des appIications


Java directement partir du Web

QueI que soit Ie mode de Iancement utiIis, Java


Web Start se connecte toujours au serveur Web
pour dterminer si une nouveIIe version de
I'appIication est disponibIe.
http:##java'sun'com#developer#technicalArticles#,ro"rammin"#jnlp#
http:##java'sun'com#j2se#7'E'3#docs#"uide#java4s#developers"uide#s!nta%'html
page 61 direction ou services
Prochaine sance : TP
capteurs et effecteurs

AppIication pervasive : Iorsqu'une personne se


pIace devant une machine, ceIIe-ci Iui indique
(sous forme vocaIe) si un capteur est connect et,
Ie cas chant, annonce Ies informations fournies
par ce capteur.

Et sous peu, on introduira communications et


rseaux

Vous aimerez peut-être aussi