Download 幻灯片 1

Document related concepts

CAN bus wikipedia , lookup

Computer network wikipedia , lookup

IEEE 1355 wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Network tap wikipedia , lookup

Automated airport weather station wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Peer-to-peer wikipedia , lookup

Airborne Networking wikipedia , lookup

Transcript
Sensor Network
Xiang Mao & Qin Chen
Department of Electrical & Computer Engineering
14:47
“Sensor”
and
“Network”
Which is more important ???
14:47
1. Introduction
14:47
Introduction
Sensor network or more commonly wireless
sensor network (WSN) is a network consists of
spatially distributed autonomous sensors to
cooperatively monitor physical or environmental
conditions, such as temperature, sound, motion,
vibration, pressure, or pollutants.
—— Wikipedia
Sensing
Computing
Communication
14:47
This idea was born in late 1990s
Features
Sensor nodes are of
• a large number
• low-cost
• low-power
• multiple function
• small in size
14:47
WSN vs. Ad Hoc Networks
• The number of sensor nodes can be several orders of
magnitude higher than the nodes in an ad hoc network
• More densely deployed;
• Nodes may not have global identification (ID).
• Broadcast vs. peer-to-peer communication
• The mobility of sensor nodes is lower than nodes in an
ad hoc network
• Sensor nodes are prone to failures
• Sensor nodes are limited in power, computational
capacities, and memory
14:47
Technology Innovation
Moore’s law
Energy capacity
miniaturization
“One of the 10 technologies that will change the
System-on-chip
MEMS
world”,
Integration
MIT Technology Review, 2003
14:47
Components of a Sensor Node
14:47
Communication Architecture
Each of these scattered sensor nodes has the
The
sensor nodes
are usually
scattered
in aback
sensor
field
capabilities
to collect
data and
route data
to the
sink
The sink may communicate
with the task manager node
via Internet or Satellite.
14:47
2. Application
14:47
? In The Movie – Twister (1996)
Thanks to the National Severe Storms
14:47
Lab(NSSL) and the University of Oklahoma
Famous Prototype – Great Duck Island (2002)
Patch
Network
Sensor Node
Sensor Patch
Gateway
Transit Network
Burrow Occupancy Detector
Client Data Browsing
and Processing
Basestation
Miniature Weather Station
Base-Remote Link
Internet
Data Service
14:47
Senera – Bridge Monitoring
14:47
Our Fancy Stuff (2007)
14:47
3. Future Development
14:47
Innovation: Sensor Network  Sensor Web
Sensor Web is a
“Web of Webs”
14:47
Generalized Concept of Sensor
Remote Sensing
Satellite
Temperature
Sensor
Humidity
Sensor
Web
Camera
Sensor
Optical
Sensor
Billing-related
Device
Web
Smoke
Sensor
14:47
Mobile
Devices
……
……
NASA (JPL) Project
Space
+ Spacecraft
Sky
+
Land
+
Ocean
14:47
Lander
Sensor Nodes
Base
Station
Rover
I had a dream …
SensorMap by Microsoft
14:47
Topic. 1
Analytical Study:
Central vs. In-network
Data Processing
14:47
Outline
• In-network vs. centralized computing
• Environmental factors
– Topology
– Cache
– Dataset
• Results
• Conclusion
14:47
Why In-network Processing?
Operation
Current @ 3.6V
Idle
<1 mA
GPS position sampling and
CPU/storage
177 mA
Base discovery only
432 mA
Transmit data to base
1622 mA
from ZebraNet
Computation is much less expensive than
radio transmission!
14:47
Algorithms for Computing Paradigm
• Centralized computing paradigm
- Central data optimized algorithm
- Central result optimized algorithm
• In-network computing paradigm
- Local algorithm
- Local optimized algorithm
14:47
Central Data Optimized Algorithm
Definition: Collects all available data from
the nodes and transfers it to a central off
network computing facility.
Pros: - High response accuracy;
- Complete data reusability.
Cons: - High data transfer costs.
14:47
Central Result Optimized Algorithm
Improvement: It applies transformations to innetwork data to minimize the data transfer
overhead.
Pros: - Low data transfer overhead;
- High response accuracy.
Cons: - Transformations are limited by nodes’
computational capabilities;
- Reusability depends on transformation
type;
14:47
- Require cache/storage on each local
Local Algorithm
Definition: Each node computes the local
results and forward to its parent node.
Pros: - Overall overhead still lower than central
data optimized algorithm.
Cons: - Data overhead is directly proportional
to the size of the network;
- May introduce computational error due
to nodes’ limited computing resources;
- A limited amount of data reusability;
Enough
storage
for
the
subtree
results.
14:47
Local Optimized Algorithm
Definition: Each node computes a single
aggregate value that represents own local result
as well as aggregate results received from its
children and forward this value to its parent node.
Pros: - The data transfer overhead is minimized;
- Overhead may not related with network
size depending on how the in-network
aggregation process is defined.
Cons: - Even larger potential for computational
error than the local algorithm.
14:47
Key Environmental Factors
1. Network topology;
2. Amount of data that each sensor can
hold (cache);
3. Domain of data collected by sensors
(dataset).
14:47
1. Network Topology
14:47
2. Cache
Three levels of cache sizes have been
used as follows:
- Small ~ 5;
- Medium ~ 25;
- Large ~ 125.
* The cache size refers to the memory
buffer where data are stored, not the
hardware cache.
14:47
3. Dataset
Three ranges for the domain of the
datasets are used as follows:
- Small value set
~ (0, 3);
- Medium value set ~ (0, 1100);
- Large value set
14:47
~ (10000, 11100).
Impact of Network Size on Wide Network
14:47
Impact of Network Size on Wide Network
14:47
Impact of Network Size on Balanced Network
14:47
Impact of Network Size on Deep Network
14:47
Impact of Network Size on Deep Network
14:47
Impact of Dataset Domain
14:47
Conclusion
Experimental results show that centralized
computing is a viable alternative to in-network
computing under various conditions especially
when the result accuracy, the response time and
the data reusability are of primary concern.
My Point:
•the network size may be too small to provide compelling
results!
•Data traffic scene, data processing functions are not
clear;
•Deep network too simple, avoids many collisions …
14:47
Topic. 2
TinyOS: An Operating System
for Sensor Networks
14:47
Outline
• Motivation
– Sensor node (mote) specifications
– Four requirements
• Design
– Meet the four requirements
• Performance
• Applications
• Summary
14:47
Mote
• HW specifications
– Program memory: 128
KB
– RAM: 4 KB
– Power: two AA
batteries
– Size: 1 by 1 inch
– Data rate: 38.4 kbps
14:47
Motivation
 Why a new OS for sensor networks?
1) Limited resources
 Small size, low cost and power consumption
2) Reactive concurrency
 Many tasks
 Real-time
3) Flexibility
 HW and application variations
4) Low power
 Low power operations
 Flexible power management strategies
14:47
TinyOS
• Open source
– Collaboration between UC, Berkeley, Intel,
and Crossbow Technology
– Widely used by over a hundred groups
worldwide
• Component based architecture
• Programming language: nesC
• Supported development environment:
Linux and Windows
14:47
Main Concept
• Application =
Collection of
components +
scheduler
– Compiled into a single
executable
• Event-driven
architecture
• Single shared stack
14:47
Main (includes Scheduler)
Application (User Components)
Actuating Sensing Communication
Communication
Hardware Abstractions
Component Model
 Component
 Computation entity
 Abstraction of HW
resources
 Three abstractions




Interface
Command: downcall
Event: upcall
Task: computation
Split-phase
 Interface
Task
Interface
 Modules and
configurations
14:47
47
Component Library
•
•
•
•
•
•
Network protocols
Distributed services
Sensor drivers
Data acquisition tools
Timers
Storage
14:47
Execution Model
 Tasks
Preempt
POST
events
 Run-to-completion
 Non-preemptive FIFO
scheduling
 Atomic to each other
 Interrupt handlers
 Signaled
asynchronously by HW
 CAN preempt tasks
 NesC compiler prevents
nearly all data races
14:47
Tasks
FIFO
commands
commands
Interrupts
Hardware
Time
Network Messages
• Active message (AM)
– 36-byte packet with a 1-byte handler ID
– Event-driven
– Handlers are registered to receive messages
of a particular type
– Provides an unreliable, single-hop datagram
protocol
– Higher-level protocol and multi-hop
communication are built on top of the AM
interface
14:47
Comparison with Linux
Linux
TinyOS
Scheduling
Preemptive, priority
Non-preemptive FIFO
Concurrency
Process/thread
Task
IPC
Pipe, socket, semaphore
NA
Networking
Socket/TCP/UDP/IP
Active massage
MMU
Yes
NA
I/O
Blocking
Split-phase
Kernel/user space
Yes
NA
14:47
Req 1: Limited Resources
 Absolute size
 Components are resolved at compile time
 Application specific version
 Base TinyOS < 1KB
 Most applications < 16 KB
 TinyDB < 64 KB (largest TinyOS application)
 Footprint Optimization
 Stripping symbol table
 Prune dead code
 Cross-component optimization
 Size improvement: 8% -- 60%
14:47
Req 2: Reactive Concurrency
• Concurrency exhibited by applications
– Example: TinyDB
• Race detection
• Context switch
– Task scheduling
– Interrupt handler overhead
• Real-time constraints
– Burst of activities + lengthy idle interval
– Time critical work + task
14:47
Req 3: Flexibility
• Fine-grained components
• HW/SW transparency
• Interposition
14:47
Req 4: Low Power
 Application specific
 CPU power usage
 Split-phase operation
 Event driven execution
 Low-power sleep mode
 Power management interface
 Stop and start command
 15 days --- 5 years
 HW/SW transparency
 Replace SW components with HW ones
14:47
Applications
 Habitat monitoring
 Low power
 Robust
 Object tracking
 High concurrency: routing, data sharing, time
sync, localization, power management, and
sensor filtering
 TinyDB
 Largest and most complex application
 Concurrency control
 Limited resources
14:47
Summary
• Small memory footprint
– Application specific
– Non-preemptive FIFO task scheduling
• Power efficient
– Application specific
– Multi-level power management
• Efficient modularity
– Component architecture
– Function call (event, command) interface between components
14:47
Improvements
• FIFO scheduling  shortest first? Earliest
deadline first, etc?
14:47
References
• TinyOS: An Operating System for Sensor
Networks, Ambient Intelligence, 2005
• TinyOS tutorials,
http://docs.tinyos.net/index.php/TinyOS_T
utorials
• http://www.tinyos.net/
• http://en.wikipedia.org/wiki/TinyOS
• www.cs.virginia.edu/~cl7v/cs851talks/tinyos_chenyang.ppt
14:47
Question
The End?
14:47