Upload
others
View
12
Download
0
Embed Size (px)
Citation preview
1
Wireless Sensor Wireless Sensor Networks SeminarNetworks Seminar
Dario Rossi [email protected]
Seminar Outline• Wireless Sensor Networks (WSN)
– Brief history and overview• Application examples
– Trees, thiefs, birds, volcanos, icebergs...• The hardware
– Panoramic of available Motes– Application demo– Experimental measurements
• The software– TinyOS: Operating System– nesC: Programming Language– TOSSIM: Simulation Environment
Seminar Outline• Wireless Sensor Networks (WSN)
– Brief history and overview• Application examples
– Trees, thiefs, birds, volcanos, icebergs...• The hardware
– Panoramic of available Motes– Application demo– Experimental measurements
• The software– TinyOS: Operating System– nesC: Programming Language– TOSSIM: Simulation Environment
2
• Early 1980s– Arpanet (=Internet) had 200 hosts – DARPA started the 1st WSN program on
Distributed Sensor Networks (DSN)– Mobile nodes were carried by trucks
• 21st Century– Internet has grown so big that its
tomography is a research field per se – DARPA funded the SensIT program– SmartDust sensors fit into 1 mm3
Sensor History
Sensor Keywords
• Sensor Hardware– Cheap, publicly-available, off-the-shelf
components, modular, integrated, power-efficient, extensible, tiny
• Sensor Software– Free, open-source, modular, abstract, power-
efficient, extensible, small footprint• Keywords are very similar
– This follows from high level of integration
Sensor Network Protocol Stack •Everything is integrated
–room for cross-layer optimization!
•Application requirements–drive routing choices...–and dictate hardware!
•Everything is tiny... –from the network stack...–to the operating system!
ApplicationTransportNetworkData linkPhysical
Power PlaneMobility Plane
Task Plane
3
Faster, Smaller, Numerous• Moore’s Law
– “Stuff” (transistors, etc) doubling every 1-2 years
• Bell’s Law– New computing class
every 10 years
year
log
(peo
ple
per
co
mp
ute
r)
Streaming Data to/from the
Physical World
– Necessarily “cheap” • Cheap is relative:
last year 100-500$, now <100$, target << 1$– Necessarily small
• More survivable, ubiquitous, etc.– Necessarily many
• Economies of scale, finer measurement granularity. – Necessarily robust
• Common case: no maintenance– Necessarily low-power
• No battery refill, long-term applications
Sensor Devices
Sensor Network Design Factors
• Fault Tolerance of individual sensors• Scalability 102, 103, (... 106 !?)• Production Cost some cents• Hardware Constraints will likely remain• Power Consumption primary constraint• Network Topology dense and varying• Environment unattended, remote• Transmission Media RF,infrared,optical,...• Sensor Applications need specific solution
4
Sensor vs Ad-hoc Networks• Sensors
– Are extremely power constrained– Have limited storage (RAM) and processing
(CPU) capabilities • Sensors are densely deployed
– Number of sensors >> ad hoc nodes – Sensors may not have global identification
• Possibly very frequent topology changes– prone to failure– application duty-cycle
Sensor Network Characteristics
• Sensor networks are composed...– By a large number of devices...– Highly cooperative...– Densely deployed... – Inside (or near) the phenomenon
• Sensor placement– Does not need to be engineered/predetermined– Random deployment on inaccessible terrains– Implies self-organizing capabilities
Sensor Network
Base-Remote Link
BaseStation
Gateway
Patch Network Motes
Transit Net
Data Service
Internet
•multi-hopcommunication
•to route data through a sink
•reachable over the internet
5
Sensor Network
Base-Remote Link
BaseStation
Gateway
Patch Network MotesMotes
Transit Net
Data Service
Internet
Sensor Network
Base-Remote Link
BaseStation
GatewayGateway
Patch Network Motes
Transit Net Transit Net
Data Service
Internet
Sensor Network
Base-Remote Link
BaseBaseStationStation
Gateway
Patch Network Motes
Transit Net
Data Service
Internet
6
Sensor Network
BaseBase--Remote Remote LinkLink
BaseStation
Gateway
Patch Network Motes
Transit Net
Data Service
Internet
ApplicationsApplications
Sensor Network Applications• Environment/Health
Monitoring– Habitat monitoring– Integrated biology– Structural monitoring
• Commercial, Control, Interactive– Product quality monitor– Intrusion detection– Pursuer-evader
7
From cold icebergs...
K.Martinez, J.Hart, H.Ong, ''Environmental Sensor Networks,'' IEEE Computer 37(8), pg. 50-56, 2004.
...to hot volcanos...
G. Werner-Allen, K . Lorincz , M. Ruiz, O. Marcillo, J. Johnson, J. Lees, and M. Welsh. ‘‘ ’’, In IEEE Internet Computing, March/April 2006.
...to redwood trees...
36m
33m: 11132m: 110
30m: 109,108,107
20m: 106,105,104
10m: 103,102,101
Temperature vs. Time
8
13
18
23
28
33
7/7/039:40
7/7/0313:11
7/7/0316:43
7/7/0320:15
7/7/0323:46
7/8/033:18
7/8/036:50
7/8/0310:21
7/8/0313:53
7/8/0317:25
7/8/0320:56
7/9/030:28
7/9/034:00
7/9/037:31
7/9/0311:03
Date
Humidity vs. Time
3 5
4 5
5 5
6 5
7 5
8 5
9 5
Rel H
um
idit
y (
%)
1 0 1 1 0 4 1 0 9 1 1 0 1 1 1
8
…to the interior of bird nests…
12:00 13:00 14:00 15:00 16:00 17:0039
39.5
40
40.5
41
Time
PIR
Tem
pera
ture
(°C
)
PIR and ambient temperature, Burrow 3, Aug. 4
12
13
14
15
16
Am
bien
t Te
mpe
ratu
re (
°C)
00:00 01:00 02:00 03:00 04:00 05:00 06:0010
15
20
25PIR and ambient temperature, Burrow 3, Jul 13
PIR
Tem
pera
ture
(°C
)
10
15
20
25
Am
bien
t Te
mpe
ratu
re (
°C)
...to vineyards...
Guess who’d collect data?
http://www.intel.com/technology/techresearch/research/rs01031.htm
…to meeting social networks…A.Chaintreau, P. Hui, J. Crowcroft, C. Diot , R. Gass, J.Scott, ‘ ’Impact of Human Mobility on the Design of Opportunistic Forwarding Algorithms’’, IEEE Infocom’06(pictures not from the paper)
wearable sensors
9
…to real-time surveillance...
S. Oh, P. Chen, M.Manzo, and S. Sastry‘‘Instrumenting Wireless Sensor Networks for Real-Time Surveillance’’
…to structural monitoring.•Removing wiring lower the infrastructure cost (as well as easening the maintenance)
•Wireless sensors could replace many wires in many different contexts
15
13
14
6
5`
15
118
Mote Layout
12
9
WSN Application Boundaries ?
Field Tools
SensorNetwork
Database
Internet
Data Display Monitor
Deployment
Configuration
ClientTools
Sensor Data
ConfigLog
Calib
AnalysisTools
10
TinyOS World: Last Year
java
javac gcc avr-gcc, msp-gcc
nesC
Maté
Bom billa
Query VM
Tiny
DB
App
jApp
Pyth
on
Pow
Tiny
Viz
TOSS
IMscript
Panasonic
Panasonic
Panasonic
Panasonic
( )( )( )( )
...
...
Tython
TinyOS World: Today
java
javac gcc avr-gcc, msp-gcc
nesC
Maté
Bom billa
Tiny
DB
App
jApp
Pyt
Tiny
Viz
TOSS
IM
scriptPanasonic
Panasonic
Panasonic
Panasonic
( )( )( )( )
...
...
Tython
Middleware services and abstractionsMiddleware services and abstractionsDeluge, Nucleus, Drip/Drain, Marionette ...Deluge, Nucleus, Drip/Drain, Marionette ...
TinyOS World
• A few more examples:– TinyDB -> Query processor– Maté -> Virtual machine– Great Duck Island -> Real case of study
• Next time, we will dig into:– TinyOS -> Operating system– nesC -> Programming language– TOSSIM -> WSN simulator
11
TinyDB: OverviewHigh level abstraction
•Data -centric programming•Prototype a declarative query processor (TinySQL)•Users treat whole network as a streaming database•Interact with sensor network as a whole
Pros and Cons•Burden shifted on the query-engine developer •Efficient, complete framework•Specialized, hard to customize
Sensor Network
TinyDB
Query Trigger
Data
S.Madden, J.Hellerstein,W.Hong, ‘‘TinyDB: In Network Query Processing in TinyOS
TinyDB: Architecture
TinyDB: ArchitectureSense
Network
Catalog
Heart MemoryQueryEngine
12
TinyDB: Queries in TinySQL
[ON event]SELECT attributesFROM (sensors | buffer)WHERE predicatesSAMPLE PERIOD const | ONCE[GROUP BY expression][INTO buffer][TRIGGER ACTION command]
TinyDB: A Simple Query
SELECT nodeId, roomNo, light, noiseFROM sensorsWHERE (light<200) AND (noise<200)SAMPLE PERIOD 30s
130
108
109
110
LightLight
2
19
2
19
IdId
178251
122171
189250
155170
NoiseNoiseRoomRoomEpochEpoch
“Find free rooms for a meeting.”
TinyDB: Powerful Queries• Create named buffer in Flash memory
CREATE BUFFER nameSIZE x
• Store results in buffer, and query over bufferSELECT a1, a2,… SELECT a3, ak, … FROM sensors FROM nameSAMPLE PERIOD d SAMPLE PERIOD d2INTO name
• Actions may follow queries SELECT tempWHERE temp > 50TRIGGER alarm
Efficient and complete butspecialized and hard to customize
13
Mate: OverviewHigh level abstraction
– Bytecode virtual machine, – sensor execute custom code, chunked
in network packetsPros and cons:
– Custom applications can be built– Bytecode instructions are very
expressive, arbitrary primitive set– Self-forwarding code, network
reprogramming through flooding– VM impose severe overhead– Power efficiency compromised– VM itself cannot be updated
over the air
( )( )( )( )
( )( )( )( )
constants
nesCconfvodf
TinyOs VM
Scripter
Code
.. = - - - - -
----------------------- - - -
---------- =
P r o g r a m
VMBuilder
Once
Detec
t
Timer
Recv
Events
Language
S p e c i f i c a t i o n
«tscript»
err sort filt
led sqrt castsend m o d l o g
light mean logr
Primitives
Code Pkt
P.Levis and D.Culler , ‘‘Maté: A Tiny Virtual Machine for Sensor Networks," In Proc. of 10th ASPLOS
Mate: Performance
0%
20%
40%
60%
80%
100%
0 20 40 60 80 100120140160180200220240Time (seconds)
Per
cent
P
rogr
amm
edPick t=rand(0,T)Flood C unless rx
C before t
Overhead– High for simple
operations (and)– Low for complex
primitives (send)
Network programming
Mate: Code Capsule Example
gets # Push heap variable on stackpushc 1 # Push 1 on stackadd # Pop twice, add, push resultcopy # Copy top of stacksets # Pop, set heappushc 7 # Push 0x0007 onto stackand # Take bottom 3 bits of valueputled # Pop, set LEDs to bit patternhalt #
•Increment a counter + display it on Leds
14
Mate: Code Capsule Example
gets # Push heap variable on stackpushc 1 # Push 1 on stackadd # Pop twice, add, push resultcopy # Copy top of stacksets # Pop, set heappushc 7 # Push 0x0007 onto stackand # Take bottom 3 bits of valueputled # Pop, set LEDs to bit patternhalt #
•Increment a counter + display it on Leds
0x1b0xc10x060x0b0x1a0xc70x020x080x00 Flexible and expressive but
inefficient and power wasteful
Great Duck Island (GDI)
R.Szewczyk , J. Polastre, A.Mainwaring, D. Culler, ‘‘Lessons from a sensor network expedition,’’ In Proc. of EWSN’04
GDI Motivation: Leach’s Storm Petrel
• Questions– What factors make a good nest? – What are the occupancy patterns
during incubation?– And during the breeding season?
• Methodology – Characterize the climate
• inside and outsize the burrow– Collect detailed occupancy data
• from occupied and empty nest– Validate a sample of sensor data
• with a different sensing modality
15
GDI Sensor NodesMotesMica @ 900Mhz25 inside, 25 outside
Sensorlight, temperature, humidity, infrared
Packagingsealant (+ acrylic tubefor outside motes)
GDI: Sensor Data Confidence?
• Useless for biologists– no new science about birds behavior
• Useful for engineers– insights on how to build sensors
GDI: Temperature and Light• Light measurements
– Uncalibrated– Binary reading– Sensor health measure
• Temperature– Reasolution
• Observed: 2 °C• Expected: 0.5 °C
– Measured temperature• Inside the enclosure• Rather than ambient• Fine on cloudy days
16
GDI: Sensor Failures• Humidity
– High readings = rain, recoverable– Low readings = fatal failure (26 motes)
• Light– Loss of diurnal patterns, high reading– 7 cases, 6 correlate with humidity failures
• Temperature– Persistent reading of 0– 22 failures, all a subset of humidity failures
0 10 20 30 40 50 60 700
0.2
0.4
0.6
0.8
1
Pop
ulat
ion
attr
ition
(%
)
Time (days)
Failed humidity sensorTotal node population
days
GDI: Packet Loss Patterns
GDI: Packet Loss Patterns
17
GDI: Packet Loss Patterns
Challanges still exists• GLACSWEB, GDI
– Sensor lasted less than expected– Packet losses, clocks drift, power
drain...
• Volcano– Network reprogramming failure
caused several long hikes
• The vineyard– Lassie the dog never came back !!
HardwareHardware
18
Crossbow Mote History
$$ +
Network Embedded Systems Technology
Program
• Embedded networked sensors– Basic board has radio, processor, memory– Sandwich sensor boards in layers– Open-source hardware/software concept– Modular design for fast development
• Sensors have many usages– Application driven requirements– Hardware has to be modular and extensible
• Sensors have limited resources– Power / CPU / Memory– Hardware has to be power efficient
Hardware Design Principles
Sensor Node Components
Power Unit
ProcessorStorage
SenseUnit
ADC
Transceiver
MobilizerLocation Finder
Power GeneratorGenericNode
19
Sensor Node Components
Power Unit
ProcessorStorage
SenseUnit
ADC
Transceiver
MobilizerLocation Finder
Power GeneratorSinkNode
Several Pieces of Hardware
RadioMotes
Sensing Boards
ProgrammingBoards
Processing, Connectivity
EnvironmentalData Gathering
Gateway,Development
Motes Evolution
20
Radio Stack Evolution1 RENE
• RFM TR1000• 10Kbps (AM)• Exports Bit-level interface• Con: Software -intensive• Pro: Simple hardware allows
easy software optimization
3 MICA2• ChipCon 1000 (CC1K)• 38.4 Kbps (FSK)• 433/916 Mhz• Exports Byte-level interface• Hardware bit synchronization
2 MICA• RFM TR1000 • 40Kbps (FM)• 433/916 Mhz• Edge hardware detection• Byte-2- bit hardware conversion• 4x gain on the same stack
4 MICAz/TELOS• ChipCon 2420 (CC2420)• 250Kbps (QPSK/QAM)– 2.4GHz ISM band– Export packet-level interface• Hardware intensive • Direct Sequence Spread
Spectrum (DSSS)
CC2420 Radio– Standard compliance
• IEEE 802.15.4 (16 channels)• Zigbee Alliance (WiFi equivalent
in WSN context)– Fast data rate, robust signal
• 250kbps : 2Mchip/s : DSSS• 2.4GHz, Offset QPSK• -94dBm sensitivity• Low Voltage Operation (1.8V min)
– Lot of features• 128byte packet buffer• Automatic address decoding • Automatic acknowledgements• Hardware link quality indicator• Hardware encryption/authentication
•Radio vs. Flash–250kbps radio sending 1 byte
•Energy : 1.5µ J•Duration : 32µ s
–Atmel flash writing 1 byte•Energy : 3µ J•Duration : 78µ s
Power Consumption Profile
Mica2 motes
21
Power Consumption Example
• MicaZ – 0.2 ms wakeup – 30 µW sleep
– 33 mW active– 45 mW radio
– 250 kbps– 2.5V min
• Telos – 0.006 ms wakeup– 2 µW sleep
– 3 mW active– 45 mW radio
– 250 kbps– 1.8V min
Supporting mesh networking with a pair of AA batteries reportingdata once every 3 minutes using synchronization (<1% duty cycle)
328 days 945 days453 days
• Mica2– 0.2 ms wakeup – 30 µW sleep
– 33 mW active– 21 mW radio
– 19 kbps– 2.5V mi
Next Generation Motes
Sensing Boards• MTS101
Basic sensor board • MTS300/MTS310
Multi sensor board • MTS400/420
Environmental monitoring and GPS (MICA2)• MTS510
Light/Accel/Microphone (MICA2DOT) • MDA300/500
Data acquisition board (MICA2, MICA2DOT)
22
Sensing Boards• Data acquisition board
• Qualified with numerous external environmental probes
– Humidity– Soil moisture– PAR light– Wind speed, direction
• 8 Analog Inputs • 8 Digital Input/Output • 2 Relay Channels • Selectable Sensor Excitation of 2.5, 3, 5V
CrossbowMDA300
Sensing Boards
• Multi Sensor Board– Light, Temperature – Microphone, Sounder – Tone Detection Circuit – Accelerometer, Magnetometer (MTS310)– Compatible with MICA, MICA2, MICAz, …
CrossbowMTS300/310
Sensing BoardsCrossbowMTS310
23
Programming Boards & Gateway
• MIB - Programming and Interface Boards– Provides interface between a mote and a PC– Parallel port (older)– Serial RS232 (common)– Ethernet (newer)
• Stargate - Networked Single Board Computer– Interfaces Sensor Networks to the Internet & WWW– 400 Mhz Intel Xscale running Linux based PC – Compact Flash, Ethernet, USB Host, infrared and
additional interfaces through PCMCIA.
• Programming and Serial Interface Board– Mote Connector + Serial Connector– Fast program downloading (115 Kbaud) and
communication (57.6 Kbaud) over RS-232 – Mote leds mirrored on board (easy debug) – Wall Power Supply
CrossbowMIB510
Programming Boards & Gateway
Programming Boards & Gateway
CrossbowMIB510
24
• Ethernet Interface Board– Base Station/Ethernet Gateway – Remote In-System Programming – Full TCP/IP Protocol – Power Over Ethernet (POE) Ready
Programming Boards & Gateway
CrossbowMIB600
Demo Time!Demo Time!
•Compile TinyOS Application•Reprogram Motes•Getting raw data on a PC•Sensing demo•Routing demo
25
Experimental Experimental MeasurementsMeasurements
Ganesan, Woo, et al
Experimental Measurements
• Evaluate performance of current technology• With special emphasis on mobilitymobility...
• …using the static scenarios results as reference
( )( ) ( )( )
( )( ) ( )( ) ( )( )
( )( )( )( )
Different speeds
Different topologies
Experimental Measurements
26
• Evaluate performance of current technology• With special emphasis on mobilitymobility...
( )( ) ( )( )
( )( ) ( )( ) ( )( )
( )( )( )( )
Different speeds
Different topologies
C-F.Chiasserini, C.Casetti, D.Rossi, “An empirical study on communication performance of stationary and mobile sensors”, Sensor Networks and Configuration: Fundamental, Techniques, Platform and Experiments, N.Mahalik Ed., Springer-Verlag, Germany, April 2006
Experimental Measurements
Measurement Framework•• Develop a measurement Develop a measurement frameworkframework
– Transmitter/Receiver sensor application– Packet trace collection and analysis
•• Adopt a rigourous Adopt a rigourous methodologymethodology– Experiments should be repeatable
• Controlled testbed environment
– Experiment must be repeated• Topology, individual sensors, weather and daytime sampling
•• Build a measurement Build a measurement databasedatabase–– Publicy available Publicy available –– 1.5 millions packets up to now1.5 millions packets up to now
Performance Metrics• Radio channel metrics
– Received Signal Strength Indication (RSSI)
• MAC layer metrics– Number of transmission attempts
• Application level metrics– Packet loss probability– Loss burst length
27
Parameters Evaluated
•• HardwareHardware Mica2 vs MicaZ•• EnvironmentEnvironment Indoor vs outdoor•• InterferenceInterference Day vs night •• TopologyTopology Circle vs array•• Network sizeNetwork size 1 to 8 sensors•• MobilityMobility Stationary vs mobile
–– StationaryStationary Distance–– MobileMobile Speed
Single Sensor Experiments:
( )( )( )( )
( )
( )
( )
( )RadiusTX RX
Single Sensor Experiments:Evidence...
( )( )( )( )
( )
( )
( )
( )RadiusTX RX
28
Single Sensor Experiments:
Single Sensor Experiments:...and causes
Dynamic Array Topology
( )( )( )( )
( )( )( )( )
( )( )( )( )
( )( )( )( )
Speed vRX
…TX1 TXnTX2
RX
29
Dynamic Array Topology
Dynamic Array Topology
Experimental Projects• Carry on similar measurements
– Comparing TelosB with MicaZ– Stress mobility by adotping motor vehicles
• Probabilistic dissemination schemes based on distance between communicating pairs– Infer distance through bayesian framework
• Investigate the impact of Forward Error Correction (FEC)– When does redundance overhead is worth ?– Look at CRC failure transmitting known random
sequences