This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
•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
…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
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
• 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
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
• 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