Sunteți pe pagina 1din 40

A part of Swedish ICT

Introduction to
Wireless Sensor
Networks
Luca Mottola (www.sics.se/~luca)
Networked Embedded Systems Group SICS
Programming WSNs: A System Perspective
KTH Graduate Course, Fall 2010
Goals:
understand the issues in building distributed
systems using wireless embedded devices
gain insights into state-of-the art solutions to
solve these issues
get practical hand-on experience at building
such distributed systems
Achieved by covering a range of topics
operating systems, communication
protocols, programming abstractions,
Hands-on labs and real-world projects!
About This Course
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Luca Mottola
SICS
About Us
Olaf Landsiedel
KTH
Adam Dunkels
SICS
Antonio Gonga
Ph.D. student at KTH,
class TA
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Computing on the Internet
Nodes are
resource-rich
#nodes #users
Interaction between people and
human-mediated data sources
Communication
among geographically
distributed nodes
Focus: human-centered
interactive decision making
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Internet of Things
Nodes are
resource-scarce
#nodes >> #users
Interaction between people
and the instrumented world
(e.g., sensors, actuators)
Answers are obtained by
fusing real-time information
from distributed nodes
Focus: support human-supervised
autonomous decision making
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Enabled by miniaturization of
processing, communication,
sensing and actuating
devices
Many cheap devices with
short-range communication
More coverage with less
energy (and no wires!)
Wireless Sensor Networks
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Applications
Examples:
Wildlife monitoring
Glacier monitoring
Cattle herding
Ocean monitoring
Vineyard monitoring
Cold chain monitoring
Rescue of avalanche victims
Vital sign monitoring
Tracking vehicles
Sniper localization
Volcano monitoring
Tunnel monitoring and rescue
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Example: Volcano Monitoring
(adapted from M. Welsh)
Anatomy of a WSN Node
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Anatomy of a WSN Node
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Example: TelosB/TMote Sky
TI MSP 430 (16 bit RISC)
8 MHz
10 KB RAM
48 KB code, 1MB flash
Chipcon CC2420 radio
IEEE 802.15.4 compliant
50 m. range indoor,
250 m. range outdoor
bandwidth 250 kbits/s
On-board antenna
Temperature, light, and
humidity sensors built-in
Turns the green led on if
humidity is below 50%
If humidity goes above
50%, turns the red led on
Hello World Sensing Demos
Humidity
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Hello World Sensing Demos
Acceleration
Shake the mote to
turn the leds on!
Introduction to Wireless Sensor Networks
2010 Luca Mottola
CrossBow
MICA2
MoteIV
TMote Sky
Intel iMote2 Sun SPOT
CPU and clock ATmega128L
16 MHz
TI MSP 430
8 MHz
Intel PXA271
416 MHz
ARM 920T
180 MHz
Memory
(RAM, code, flash)
4 KB, 128 KB,
512 KB
10 KB, 48 KB,
1 MB
256 KB, 32 MB,
32 MB
512 KB
(data+code),
4 MB
Radio chip Chipcon 1000 Chipcon 2420 Chipcon 2420 Chipcon 2420
Power 2 AA 2 AA 3 AAA 3.7V
rechargeable
Language C-based C-based C-based Java2ME
Some Mote Platforms
Introduction to Wireless Sensor Networks
2010 Luca Mottola
WSN Challenges: Power
Power consumption
devices are battery-powered, meant to
operate unmanned for a long period of time
communication is typically the biggest energy drain
duty cycle is critical: nodes sleep for most of the time
communication ~mA, stand-by ~A
TMote mote always on: ~8 days;
2% duty cycle (1.2s/min): 9 months
Introduction to Wireless Sensor Networks
2010 Luca Mottola
No radio
duty-cycle
Radio
duty-cycle
Speaking of Radio..
Introduction to Wireless Sensor Networks
2010 Luca Mottola
WSN Challenges: Reliability
Reliability
wireless link quality fluctuates based on
environment
topology changes as the WSN operates!
nodes are often deployed in a hostile
environment and may fail
the application/network
must self-organize!
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Non-isotropic range, asymmetric links
Collisions, hidden terminal problem
What-you-see-is-not-what-you-get topologies
e.g., good connection to far nodes and bad to close ones
The Woes of Wireless
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Changing Topologies
Introduction to Wireless Sensor Networks
2010 Luca Mottola
A Reference Architecture
Operating Systems
OSs for WSNs different
from mainstream ones
-basic run-time support for application programs
-little or no support for user interaction
Programs are cross-compiled and linked with
the OS library
-the resulting binary is deployed on the WSN node
Most popular: Contiki and TinyOS
-alternatives: Mantis, LiteOS,
Main differences: model of concurrency,
support for dynamic linking,
Adam and Luca to
tell more in Lecture
2, 4, 5, and 7
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Medium Access Control (MAC)
Goals: avoid packet collisions and turn off the radio
whenever possible
Much simpler than conventional MACs
some features are demanded to application code
CSMA (Carrier Sense) and TDMA (Time Division)
are dominant
CSMA good for changing topologies, may suffer under
heavy load
TDMA guarantees predictable
performance, needs time synch
Olaf talks in
Lecture 3
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Hello World Comm Demo
Steal the Light! (adapted from M. Lunden)
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Routing
Concern: energy consumption
WSN routing is different:
conventional protocols based on
addresses identifying the target
(e.g., unicast or multicast IP addresses)
WSN nodes may not be relevant per se:
it is their (individual or collective) features that matter
many-to-one, one-to-many, and
many-to-many vs. one-to-one
Attribute-based routing is also used
message forwarding based on the nature of data
similar to content-based routing
Plethora of protocols available
a small subset used for real
sink
source source
Olaf
discusses in
Lecture 6
Introduction to Wireless Sensor Networks
2010 Luca Mottola
IP Networking
Interoperability and integration with
the Internet motivate using IP
Issues:
network overhead
size of stack implementations
address assignment
routing
Several activities
6LowPan
header compression,
ROLL
routing,
ISA100
Adam talks in
Lecture 10
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Time Synchronization
Often necessary to correlate
the data to the time it was sampled
e.g., structural monitoring, earthquake detection
Nodes have different times
differences in clock quartzes and in their drifts
well-known problem in distributed systems (NTP):
peculiarity here is wireless and energy-awareness
Several protocols available
precision down to milliseconds
require periodic network-wide message exchanges
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Node Localization
It is often necessary to know the physical
location of a node
interpret sensed data, determine span of actuation
often determined at deployment time and known to
both nodes and gateway
What if location is not known?
assume nodes are GPS-equipped
easy and precise but energy hungry
use radio-based localization
e.g., based on RSSI
Introduction to Wireless Sensor Networks
2010 Luca Mottola
In Practice, However
Each component is often built separately
The programmer is forced to deal with low-level details
instead of the application logic
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Wide variety of application
requirements
Inherent tension between:
the desire to shield programmers
from complexity
the need to enable cross-layer design
January 28th, 2008
centralized
decentralized
homogeneous heterogeneous
Habitat
monitoring
Wildlife
monitoring
Healthcare
Smart
ambient
Wireless
Sensor and
Actor Networks
WSN Challenges: Programming
Luca tells more in
Lecture 8 and 9
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Putting All Togheter:
The Torre Aquila Deployment
(Trento, Italy)
M. Ceriotti, L. Mottola, G. P. Picco, A. L. Murphy, S. Guna, M. Corr, M. Pozzi, D. Zonta, and P. Zanon.
"Monitoring Heritage Buildings with Wireless Sensor Networks: The Torre Aquila Deployment.
In IPSN/SPOTS, 2009. Best paper award.
Heritage buildings require
maintenance and careful
assessment
Typically achieved with
wired data loggers
cumbersome and invasive
especially in the presence of
works of art
WSNs as a viable alternative
untethered monitoring
minimum invasiveness
high sensing granularity
flexibility and ease of relocation
Traditional data logger
WSN node
Motivation
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Torre Aquila
31-meter tall medieval tower
part of the complex of Castello
del Buonconsiglio in Trento, Italy
The 2
nd
floor contains the
Ciclo dei 12 mesi
internationally-renowned
frescoes, attracting thousands of
visitors each year
Originally the Eastern gate to
the city
today, surrounded by high volume
of vehicular traffic
Concerns due to the plan of
diverting traffic into a road
tunnel near the tower
Deployment in Torre Aquila
FIRST FLOOR
NORTH SECTION
SECOND FLOOR
THIRD FLOOR
0
141
144
145
148
149
150
151
152
153
154
160
161
162
142
143
144
149
151
152
161
162
0 160
146
146
150
141
153
148 154
142
143
145
Environmental
Acceleration
!
!
Universita degli Studi di Trento - Facolta di Ingegneria
Tecnologie distribuite per il monitoraggio strutturale di ediIici storici

!
140


Fig. 4.104 Optical Coil Sensor,
predisposi:ione delle connessioni nellapposito involucro



Fig. 4.105 Optical Coil Sensor installato
FOS
F
O
S
joint
Deformation
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Software
Functionality fully decoupled, asynchronous
interactions through a middleware layer
Sampling and Tasking to drive sensing based
on user parameters
Data Collection to report sensed data reliably
Data Dissemination to distribute user
parameters
Time Synchronization to correlate readings
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Software
Sampling & Data Collection
Different classes
of traffic
Bursty, high-rate
w/ strong reliability
(compressed)
vibration data
Low-rate w/ weak reliability
environmental, deformation data
Best effort
system monitoring
Node type Operating
parameters
Typical
values
Environmental Sampling period P
# of sampling sessions N
10 min
infinite
Deformation # of samples averaged A
Sampling period P
# of sampling sessions N
10
10 min
infinite
Acceleration Sampling frequency F
Sampling duration D
# of sampling sessions N
200 Hz
20 s
infinite
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Sampling & Data Collection
Routing Details
Hop-by-hop reliability
scheme
Child
send(tuple 6)
Parent
retrieve(tuple 7)
4 5 6
cache
send(tuple 7)
send(tuple 8)
5 6 7
cache
6 7 8
cache
send(tuple 9)
7 8 9
cache
Torre Aquila Demo
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Monitoring Heritage Buildings with WSNs: The Torre Aquila Deployment
2009 Matteo Ceriotti and Luca Mottola
Vibration
!
Vibrational Modes
D. Zonta et al. Real-Time Health Monitoring of of Historic Buildings with Wireless Sensor Networks
In Proc. of the 7th Int. Conf. On Structural Health Monitoring, 2009.
Deformation
!
!
!
!
The breath of
the structure
(Preliminary) Data Analysis
Lessons Learned
Thick walls drastically affect wireless propagation
small changes in node placement modify the topology
motes are tempting
Moved the sink
node by 1 meter!
0
0.2
0.4
0.6
0.8
1
#
1
4
2
#
1
4
3
#
1
4
6
#
1
4
8
#
1
5
1
#
1
5
2
P
e
r
c
e
n
t
a
g
e

o
f

t
i
m
e
04 Sept - 09 Sept
#
1
4
2
#
1
4
3
#
1
4
6
#
1
4
8
#
1
5
1
#
1
5
2
09 Sept - 14 Sept
1 Hop
2 Hops
3 Hops
4 Hops
5 Hops
6 Hops
0
0.2
0.4
0.6
0.8
1
#
1
4
2
#
1
4
3
#
1
4
6
#
1
4
8
#
1
5
1
#
1
5
2
P
e
r
c
e
n
t
a
g
e

o
f

t
i
m
e
04 Sept - 09 Sept
#
1
4
2
#
1
4
3
#
1
4
6
#
1
4
8
#
1
5
1
#
1
5
2
09 Sept - 14 Sept
1 Hop
2 Hops
3 Hops
4 Hops
5 Hops
6 Hops
0
0.2
0.4
0.6
0.8
1
#
1
4
2
#
1
4
3
#
1
4
6
#
1
4
8
#
1
5
1
#
1
5
2
P
e
r
c
e
n
t
a
g
e

o
f

t
i
m
e
04 Sept - 09 Sept
#
1
4
2
#
1
4
3
#
1
4
6
#
1
4
8
#
1
5
1
#
1
5
2
09 Sept - 14 Sept
1 Hop
2 Hops
3 Hops
4 Hops
5 Hops
6 Hops
Introduction to Wireless Sensor Networks
2010 Luca Mottola
Questions?
Introduction to Wireless Sensor Networks
2010 Luca Mottola

S-ar putea să vă placă și