2. 2
Wireless sensor networks
A sensor node (mote)
8K RAM, 4Mhz processor
magnetism, heat, sound, vibration, infrared
wireless (radio broadcast) communication up to 100 feet
costs ~$10 (right now costs $200)
3. 3
New Class of Computing
year
log(peoplepercomputer)
streaming
information
to/from physical
world
Number Crunching
Data Storage
productivity
interactive
Mainframe
Minicomputer
Workstation
PC
Laptop
PDA
4. 4
Why use a WSN?
• Ease of deployment
Wireless communication means no need for a communication
infrastructure setup
Drop and play
• Low-cost of deployment
Nodes are built using off-the-shelf cheap components
• Fine grain monitoring
Feasible to deploy nodes densely for fine grain monitoring
5. 5
Challenges in sensor networks
• Energy constraint
• Unreliable communication
• Unreliable sensors
• Ad hoc deployment
• Large scale networks
• Limited computation power
• Distributed execution
: Nodes are battery powered
: Radio broadcast, limited
bandwidth, bursty traffic
: False positives
: Pre-configuration inapplicable
: Algorithms should scale well
: Centralized algorithms
inapplicable
: Difficult to debug & get it right
9. 9R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R
8
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9
Temperature vs. Time
Temperature(C)
Humidity vs. Time
35
45
55
65
75
85
95
RelHumidity(%)
101 104 109 110 111
2003, unpublished
Bottom Top
36m
34m
30m
20m
10m
10. 10
Precision agriculture
• Wireless sensor networks can be placed on farm lands to
monitor temperature, humidity, fertilizer and pesticide levels
• Pesticide and fertilizer can only be applied when and where
required
Pesticide and fertilizer per one acre costs $20
Considering 100,000 acres savings of $2 million possible
Vineyards
BC
11. 11
Equipment Health Monitoring in
Semiconductor Fab
Fab Equipment
Mote + Vibration Sensors
Ad Hoc Mote
Network
Intranet
802.11 Mesh
Intranet isolation
Root Node
• Equipment failures in production fabs is very costly
Predict and perform preemptive maintenance
• Typical fab has ~5,000 vibration sensors
Pumps, scrubbers, …
Electricians collect data by hand few times a year
Sample: 10’s kilohertz, high precision, few seconds
12. 12
Put tripwires anywhere—in deserts, other areas where physical terrain
does not constrain troop or vehicle movement—to detect, classify &
track intruders
Project ExScal: Concept of
operation
13. 13
Envisioned ExScal customer application
Gas pipeline
Border control
Canopy precludes aerial
techniques
Rain forest – mountains – water
environmental challenges
Convoy protection
IED
Hide Site
Detect anomalous activity
along roadside
14. 14
ExScal summary
• Application has tight constraints of event detection scenarios: long
life but still low latency, high accuracy over large perimeter area
• Demonstrated in December 2004 in Florida
• Deployment area: 1,260m x 288m
• ~1000 XSMs, the largest WSN
• ~200 XSSs, the largest 802.11b ad hoc network
15. 15
Line in the sand project
• Thick line allows detection & classification as intruders enter the protected
region; also allows fine grain intruder localization
• Grid of thin lines allows bounded uncertainty tracking
Thick Entry Line
A S S E T
1 km
250 m
16. 16
ExScal sample scenarios
Intruding person walks through thick line
• (pir) detection, classification, and fine-grain localization
Intruding vehicle enters perimeter and crosses thick line
• (acoustic) detection, classification, and fine-grain localization
Person/ATV traverses through the lines
• coarse-grain tracking
Management operations to control signal chains, change parameters, and
programs dynamically; query status and execute commands
18. 18
Types of sensor platforms
1. RFID equipped sensors
1. Smart-dust tags
typically act as data-collectors or “trip-wires”
limited processing and communications
• Mote/Stargate-scale nodes
• more flexible processing and communications
1. More powerful gateway nodes, potentially using wall power
19. 19
Grain-sized nodes
Powered by inductive coupling to a transmission from a
reader device to transmit a message back
Available commercially at very low prices
× Computation power is severely limited
× Can only trasmit stored unique id and variable
× Hard to add any interesting sensing capability
20. 20
Matchbox-sized nodes
• Mica series, XSM node, Telos
• 8-bit microprocessor, 4MHz CPU
ATMEGA 128, ATMEL 8535, or Motorola HCS08
• ~4Kb RAM
holds run-time state (values of the variables) of the program
• ~128Kb programmable Flash memory
holds the application program
Downloaded via a programmer-board or wirelessly
• Additional Flash memory storage space up to 512Kb.
21. 21
Mica2 and Mica2Dot
• ATmega128 CPU
– Self-programming
• Chipcon CC1000
– FSK
– Manchester encoding
– Tunable frequency
• Low power consumption
– 2 AA battery = 3V
1 inch
22. 22
Basic Sensor Board
• Light (Photo)
• Temperature
• Prototyping space for
new hardware designs
24. 24
Telos Platform
• Low Power
Minimal port leakage
Hardware isolation and buffering
• Robust
Hardware flash write protection
Integrated antenna (50m-125m)
Standard IDC connectors
• Standards Based
USB
IEEE 802.15.4 (CC2420 radio)
• High Performance
10kB RAM, 16-bit core, extensive double buffering
12-bit ADC and DAC (200ksamples/sec)
DMA transfers while CPU off
25. 25
Brick-sized node: Stargate
• Mini Linux computers communicating via 802.11 radios
Computationally powerful
High bandwidth
Requires more energy (AA infeasible)
• Used as a gateway between the Internet and WSN
28. 28
TinyOS
• most popular operating system for WSN
developed by UC Berkeley
• features a component-based architecture
software is written in modular pieces called components
Each component denotes the interfaces that it provides
An interface declares a set of functions called commands that the
interface provider implements and another set of functions called events
that the interface user should be ready to handle
• Easy to link components together by “wiring” their interfaces
to form larger components
similar to using Lego blocks
29. 29
TinyOS
• provides a component library that includes network protocols,
services, and sensor drivers
• An application consists of
a component written by the application developer and
the library components that are used by the components in (1)
• An application developer writes only the application
component that describes the sensors used in the application,
the middleware services configured with the appropriate
parameters based on the needs of the application
30. 30
Benefits of using TinyOS
• Separation of concerns
TinyOS provides a proper networking stack for wireless communication
that abstracts away the underlying problems and complexity of message
transfer from the application developer
E.g., MAC layer
• Concurrency control
TinyOS provides a scheduler that achieves efficient concurrency control
An interrupt-driven execution model is needed to achieve a quick
response time for the events and capture the data
For example, a message transmission may take up to 100msec, and without an
interrupt-driven approach the node would miss sensing and processing of
interesting data in this period
Scheduler takes care of the intricacies of interrupt-driven execution and provides
concurrency in a safe manner by scheduling the execution in small threads.
31. 31
Benefits of TinyOS
• Modularity
TinyOS’s component model facilitates reuse and reconfigurability since
software is written in small functional modules. Several middleware
services are available as well-documented components
Over 500 research groups and companies are using TinyOS and
numerous groups are actively contributing code to the public domain
33. 33
TOS Execution Model
• commands request action
ack/nack at every boundary
call command or post task
• events notify occurrence
HW interrupt at lowest level
may signal events
call commands
post tasks
• tasks provide logical concurrency
preempted by events
RFM
Radio byte
Radio Packet
bitbytepacket
event-driven bit-pump
event-driven byte-pump
event-driven packet-pump
message-event driven
active message
application comp
encode/decode
crc
data processing
34. 34
Event-Driven Sensor Access
Pattern
• clock event handler initiates data collection
• sensor signals data ready event
• data event handler calls output command
• device sleeps or handles other activity while waiting
• conservative send/ack at component boundary
command result_t StdControl.start() {
return call Timer.start(TIMER_REPEAT, 200);
}
event result_t Timer.fired() {
return call sensor.getData();
}
event result_t sensor.dataReady(uint16_t data) {
display(data)
return SUCCESS;
}
SENSE
Timer Photo LED
35. 35
Programming Syntax
• TinyOS 2.0 is written in an extension of C, called nesC
• Applications are too
just additional components composed with OS components
• Provides syntax for TinyOS concurrency and storage model
commands, events, tasks
local frame variable
• Compositional support
separation of definition and linkage
robustness through narrow interfaces and reuse
Interpositioning
• Whole system analysis and optimization
39. 39
Compared to Internet
• No clear layering; cross layer design is norm
• No separation between edge vs core of the network
all nodes are both routers and hosts
• End-to-end principle fails
unreliable channels, multihop latency
• Ad hoc deployment
timesync, localization, topology control, clustering etc services needed
• Routing needs are different...