Title: A System for Simulation, Emulation, and Deployment of Heterogeneous Sensor Networks
1A System for Simulation, Emulation,and
Deployment ofHeterogeneous Sensor Networks
- Presented at SenSys 2004
- Baltimore, MD
- Lewis Girod, Thanos Stathopoulos, Nithya
Ramanthan - Jeremy Elson, Deborah Estrin,
- Eric Osterweil and Tom Schoellhammer
- CENS Systems Lab
2Importance of Heterogeneous Systems
- Many ENS systems combine the strengths of mote
and microserver platforms - Motes perform simple sensing tasks with long
battery life - Microservers expend more energy to host
sophisticated sensors and algorithms
Robotic nodes host cameras, tend clusters of
static motes
Clusters of dynamically taskable static motes
report data to nearest sink
Static motes report data back to fixed gateway
3Heterogeneous Distributed Systems
- Vision complex application integrated from small
and large nodes - Integrates two already complex distributed
systems in a non-trivial way - Each system depends on input from the other
- To Build and Debug such applications, we must
- Integrate the system software running on the
motes and microservers - Drive simulations of microserver system with
realistic input from mote net - How can this be done?
Motes augment a microserver-based triggered
imaging app
4Contributions of this Work
Emulation Array
- EmTOS
- Simple yet powerful mechanism for building and
evaluating heterogeneous systems - Run TinyOS code on EmStar microservers
- EmStar systems can participate directly in TinyOS
network - Enables range of simulation, emulation, and
hybrid modes - Uniform set of tools ? no cost to transitions
among modes - Experiments
- Characterize EmTOS accuracy
- Case Study
- Development of ESS using EmTOS
Mote in JR
EmView
5Motes and Microservers
Mote (e.g. Mica2dot) Applications use TinyOS
component framework, are written in NesC. Native
TinyOS simulation via TOSSIM.
Microserver (e.g. Stargate) Applications run
above Linux, within the EmStar component
framework.Native EmStar simulation via EmSim.
So, how can we
- Integrate mote and microserver nets w/o
reimplementing protocols? - Simulate a complete system, made up of motes and
microservers?
6Solution EmTOS Wrapper Library
EmTOS Wrapper Library
Enables NesC applications to provide new EmStar
services
tos/leds
tos/eeprom
tos/tasks
User defined
User defined
EmStatusServer
EmPacketServer
TOS status
Unmodified NesC Application
Wraps an unmodified NesC app into an EmStar
module
SenseToRFM
TimerC
AM
Implements TinyOS API and low-level components
LEDs
EEPROM
UART
ADC
RadioCRCPacket
ClockC
Underlying EmStar Services
By connecting to existing EmStar services
link/mote0
motenic
This fairly small investment of effort -- the
wrapper library and some TinyOS components that
make up a new TinyOS platform -- simultaneously
addresses both goals of heterogeneous simulation
and integration!
Transceiver (Mote)
7Enables Mote-Microserver Integration
Example ESS
ESS network
- NesC-based Multihop tree routing protocol
- Runs natively on motes
- Runs in EmTOS wrapper on microserver
- Wrapped version exposes EmStar devices
- Used by microserver sink implementation
- Increased visibility on microserver
ESS
EssDse
Multihop
link/mote0
motenic
Dse
TimerC
AM
Transceiver (Mica2)
RadioCRCPacket
ClockC
ADC
Mote RF Channel
8Enables Heterogeneous Simulation
- EmTOS makes TinyOS look like an EmStar module
- Thus EmSim can simulate them like any other
EmStar node! - EmSim runs N EmStar nodes in parallel on a
centralized server - Simulated microservers run natively (runs real
code) - Simulated motes run TinyOS/NesC app in EmTOS
wrapper
Example ESS
9Requirements for Development Tools
- Deployment Target
- Large Scale
- Works in Reality
- Limited Visibility
- No Out Of Band debug channel
- Key Simulation Requirements
- Real Code for rapid iteration
- Common world model for all nodes
- Visualization, logging, analysis tools
- Work across many modes simulation, emulation,
deployment
10EmSim Modes
(Runs at scale of emulation array)
Pure Sim
Deployed
11Pure Simulation Mode
Simulation Server
- Pure Simulation Mode
- All Application code runs on server
- Maximum Visibility
- Full logs and status
- Minimum Reality
- Modeled mote RF channel / MAC
- Emulated motes timing
- Initial debug and regression testing
Modeled Mote RF Channel
Motes
Microservers
12Emulation Array
Simulation Server
Serial MUX
HostMote Serial Protocol
- Emulation Array
- Used for Emulation/Real/Hybrid Mode
- Real motes installed in environment
- Serial multiplexer connects server to real motes,
replaces channel model - Limits scale improves reality
Motes
Microservers
13Emulation Mode
Simulation Server
Serial MUX
HostMote Serial Protocol
- Emulation Mode
- All Application code runs on server
- Same visibility as simulation
- Real mote RF channel
- Motes run Transceiver packet proxy
- Packet timing
Motes
Microservers
14Real Mode
Simulation Server
Serial MUX
HostMote Serial Protocol
- Real Mode
- Microserver code runs on server
- Mote code pushed to physical motes
- Full visibility for microservers
- Motes report only partial status info
- Stub applications gateway to tools
Dbg Stub
Dbg Stub
Dbg Stub
Motes
Microservers
15Hybrid Mode
Simulation Server
Serial MUX
HostMote Serial Protocol
- Hybrid Mode
- Mixture of real and emulated motes
- Range of possibilities
Dbg Stub
Dbg Stub
Motes
Microservers
16EmTOS Emulation Accuracy
VS
- EmTOS enables integration and simulation
- But it does not present the same timing as a real
mote. - How can we characterize the differences and
assess their importance?
- Performed two experiments
- Compared timer jitter in EmTOS vs. Mica2
- Compared packet latency in Emulation Mode vs.
Mica2
17Mica2 Timer Jitter is Application Dependent
2 Timers compute Task
1 Timer
3 Timers
10µs
1µs
10ms
- Compared requested time against actual time of
event - Real motes exhibit widely varying,
application-dependent jitter - Depends on number of tasks scheduled before the
Timer task - EmTOS exhibits consistent 10ms jitter resulting
from jiffy timer (1ms jitter for Linux 2.6
Kernels)
18Emulated Packet Timing is Delayed
Distribution of RTT
60ms
60ms
180ms
120ms
EmTOS
Mica2
- Native motes access channel directly while EmTOS
must traverse a serial line to access the RF
channel via Transceiver - Results in similar timing distribution, with 60ms
excess RTT
19Do the differences matter?
- EmTOS cant do precise timing and hardware
interrupts - e.g. EmTOS can emulate many network layer
protocols - EmTOS cant emulate the TinyOS MAC layer
- Validation is easy using EmTOS and an Emulation
Array - Compare runs in Emulation Mode and Real Mode
- Emulation Mode timing, interrupts by EmTOS
- Real Mode timing, interrupts by Mica2s in
emulation array - Validation catches design flaws masked by
emulation mode - e.g. Early version of ESS
- Interest messages were flooded too quickly
- Emulation delay improved performance
- But still caught pre-deployment!
20Case Study ESS Development
- Development process
- Use of simulation, emulation, and real modes
- Real mode used to validate vs. Emulation mode
- Analysis and performance measurement
- Real mode packet traces with precise timing
- Offline analysis of collisions and retx
- In deployment
- EmTOS integrates Multihop tree-building and
transport protocol with microserver software - EmStar provides visibility and robustness for
microserver code - Live topology data returned via transport layer
piped to visualization tools
Pure Sim
Deployed
21Current and Future Work
- Current
- CENS Contaminant Transport Project
- Based on ESS codebase, but closes loop locally to
control robot - TinyDB with heterogeneous routing layer (Intel
Research) - Uses EmTOS to run TinyDB code on Stargate, and
attract compute-intensive query processing to
more powerful nodes - Future
- Triggered Imaging and Acoustic Processing
- Inputs from mote systems trigger microserver
applications - Mote Herding Further work on mote-microserver
integration - Stargate-side middleware for applications across
mote clusters - e.g. function handoff, resource discovery,
reliable data transport
22Conclusion
- EmTOS is a simple, powerful technique for
simulating, emulating, and deploying
heterogeneous sensor systems - EmTOS facilitates
- Integration of motes and microservers by enabling
code to be shared across platforms - Simulation of heterogeneous systems composed of
motes and microservers within a single world
model - While EmTOS is not an accurate emulation of a
Mica2 - Its close enough for development and integration
of many application- and network-level components
23Thank You
- More information
- The EmStar website, for downloads, documentation,
mailing lists http//cvs.cens.ucla.edu/emstar - A System for Simulation, Emulation, and
Deployment of Heterogeneous Sensor Networks, in
SenSys 2004 http//lecs.cs.ucla.edu/girod/papers
/emtos-sensys04.pdf - EmStar a Software Environment for Developing
and Deploying Wireless Sensor Networks, in
USENIX 2004 http//lecs.cs.ucla.edu/girod/papers
/emstar-usenix04.pdf