sens: a sensor, environment and network simulator sameer sundresh, wooyoung kim and gul agha

28
SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha University of Illinois at Urbana- Champaign http://osl.cs.uiuc.edu Presented at ANSS 37 April 21, 2004

Upload: lel

Post on 22-Jan-2016

36 views

Category:

Documents


0 download

DESCRIPTION

SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha University of Illinois at Urbana-Champaign http://osl.cs.uiuc.edu Presented at ANSS 37 April 21, 2004. What is a Sensor Network?. Many simple nodes with sensors deployed throughout an environment. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

SENS: A Sensor, Environment and Network Simulator

Sameer Sundresh, Wooyoung Kim and Gul Agha

University of Illinois at Urbana-Champaignhttp://osl.cs.uiuc.edu

Presented at ANSS 37April 21, 2004

Page 2: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

What is a Sensor Network?● Many simple nodes with sensors

deployed throughout an environment.– Determination of sensor positions

(localization)– Cooperative target identification & tracking– Indoor or outdoor environment monitoring– Civil structural health monitoring (SHM)

Page 3: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Example: Localization Experiment

Page 4: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Example: Structural Health Monitoring

Semi-active Hydraulic Damper(SHD), Kajima Corporation, Japan

Model bridge with attached wireless sensors,B.F. Spencer’s Lab, Civil E., U. Illinois U-C

Accelerometer board prototype,Ruiz-Sandoval, Nagayama & Spencer,Civil E., U. Illinois Urbana-Champaign

Page 5: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Characteristics of Sensor Networks● Errors are common.

– Wireless communication– Noisy measurements– Node failures are to be expected

● Network interacts heavily with environment.● Highly constrained nodes.

– e.g. 4k RAM, 2 AA batteries, 20msg/s radio ● Must operate for months, little supervision.● Experiments are time- and space-intensive.

Page 6: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Related Work● Custom application-specific simulators● Network simulators

– OPNET, ns-2, Monarch (based on ns-2), GloMoSim

● Sensor network wireless protocol simulators– UCLA SensorSim, GeorgiaTech SensorSimII

● Sensor node simulators– TOSSIM (for TinyOS), TOSSF (based on SWAN)

● Application-oriented simulators– SENS, Siesta, EmStar

Page 7: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Simulator Structure

Node Node

Node

Environment Deployed Network

Simulator

Application

Network

Physical

Node

msg

sense

/act

uate

Application

Network

Physical

Node

sense

/act

uate

msg

Environment

Node

Simulation Controller

messages

SENS is composed of several concurrently interacting components modeled as actors.

Page 8: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Simulator Components● Application

– sense/actuate interface– message send/receive interface

● Physical– handles sense/actuate together with

Environment– maintains radio & sensor neighbor sets– computes power usage (based on actuate

requests to enable/disable simulated hardware)● Network

– handles send/receive– several interchangeable implementations

Page 9: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Simple Application#include "System/Sim.h"#include "Interfaces/PhysicalMessages.h"// Message type definitions.MESSAGE_TYPE(AppMesg, int);

// Application to be simulated on a node.class SimpleApplication: public Application {public: SimpleApplication(SimController *sc, node_id id_, vector<string> *args) : Application(sc, id_) { schedule(new AppMesg(77), 0.5); // Send message to self. registerHandler(&SimpleApplication::onAppMesg); registerHandler(&SimpleApplication::onSensorValue); } // Message handlers. void onAppMesg(AppMesg *) { cout << "I'm not really listening. " << getTime() << endl; send(new AppMesg(77), 0.3); // Radio neighborhood broadcast. } void onSensorValue(SensorValue *sv) { cout << getTime() << " SA " << id << " sensed something " << endl; }};

// Add SimpleApplication to the ComponentRegistry so it is instantiable from config files.static RegisterApplication<SimpleApplication> re_app("SimpleApplication");

Page 10: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Network Components

Trade off simulation efficiency and accuracy● SimpleNetwork: immediate, guaranteed

delivery to all neighbors within range.● ProbLossyNetwork: probabilistic delivery and

delay; delivery probabilities can optionally decrease under heavy traffic.

● CollisionLossyNetwork: calculates collisions at receiving end based on message overlap and relative signal strengths; selectable interval size.

Page 11: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Environment Simulation● Environment is divided into tiles with

different signal propagation characteristics.– Based on experimental measurements.

● Each sensor is located on one tile.

Page 12: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Environment Simulation● Environment is divided into tiles with

different signal propagation characteristics.– Based on experimental measurements.

● Each sensor is located on one tile.

Echo Soundmuffledby grass

“Beep!”

Maximumrange cut-off

Page 13: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Circular Wave Propagation

Source

Tile (x,y)1

23

4θ12

θ23

Page 14: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Circular Wave Propagation

Source

Tile (x,y)1

23

4θ12

θ23

f(0)

f(0.5)

f(1)

g(1) g(0.5) g(0)

Page 15: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Measurement and Attenuation● Must translate total energy passing through

a tile to energy of the signal received by a sensor.– Can use f to calculate energy density.– Else divide total energy by max. arc

length, approx. by |sinθ|+|cosθ|.

● Circular waves = 2-D = 1/r– Simulate 3-D = 1/r2 by propagating sqrt(energy)

● To simulate attenuation A observed by real sensors, apply M-1(A(M(e))).

Page 16: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Simulation Parameters

Determines behavior of nodes and signals.

Can be adjusted forother scenarios.

Page 17: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Observed Mica-2 Radio Range (sketch)

Mica-2

40% signal strengthvariation with angle

Page 18: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Ranging: Simulation vs. Experiment

● Wall effects evident.

● Similar behavior.

● Experiment was separate from calibration.

3m tall, 2/3m thick brick wall

concrete

grass

Page 19: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Simplified Localization Example● Typical sensor data is location-dependent,

hence localization is a necessary service.

● Anchor nodes know their locations.● Perform triangulation

using ranging data.● Errors due to obstacles

(indirect sound paths).– Anchor– Grass or wall– Real vs. localized

Page 20: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Ranging/Localization Complications

Page 21: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Localization vs. Obstacle Density

Page 22: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Non-Anchor Power Usage Simulation

Power savings of the black listing policy:If a non-anchor believes it will not make a successful ranging measurement to an anchor, it should not even bother trying.

Page 23: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Simulator Performance

n sensor nodes

t simulated time

Exec. time: O(nt),PC much faster than sensor node

Setup time: O(n2)= # interactions

Time to simulate 1000 seconds ofsimplified localization application.

Page 24: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Ongoing Work● More detailed measurements of node

behavior– acoustic ranging in presence of wind, echoes– radio signal strength (e.g. imperfect antenna)– inter- and intra-node timing characteristics

● Civil structure environment model– Matlab model for environment– Experimental validation of sensor simulations

Page 25: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

Ongoing Work● Language/API refinement

– deployable sensor node code– automatic annotation of timing and power

● Use in sensor network service development– localization (acoustic, radio)– Soham Mazumdar, Ashish Agarwal, Indranil

Gupta, Wooyoung Kim & Gul Agha, “Fast Range Queries Using Pre-Aggregated In-Network Storage,” submitted to ACM SenSys 2004.

– structural health monitoring– geographic routing

Page 26: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

http://osl.cs.uiuc.edu

Page 27: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

End of slides.

Page 28: SENS: A Sensor, Environment and Network Simulator Sameer Sundresh, Wooyoung Kim and Gul Agha

A Typical Wireless Sensor Node● Mica-2 from Crossbow

– 4MHz 8-bit Atmel AVR– 4096 bytes RAM– 128kB flash for program code– 433MHz, 32kb/s radio (~ 20 30-byte messages/s)– Powered by 2 AA batteries

● Mica-2 sensor board– 4kHz audio buzzer + microphone + tone detector– 2-axis accelerometer, 2-axis magnetometer– light/temperature sensor

● Currently costs ~$150, eventually under $10.