EnviroTrack: Towards Environmentally Immersive Programming Tarek - - PDF document

envirotrack towards environmentally immersive programming
SMART_READER_LITE
LIVE PREVIEW

EnviroTrack: Towards Environmentally Immersive Programming Tarek - - PDF document

e t i u S EnviroTrack: Towards Environmentally


slide-1
SLIDE 1

1

EnviroTrack: Towards Environmentally Immersive Programming

Tarek Abdelzaher

Department of Computer Science University of Illinois at Urbana Champaign

S u i t e

Situation Aware Distributed Embedded Systems Emergency Response

Real-Time and Embedded Systems

The Next Frontier

Today Clusters, Farms Grids, WWW Embedded Everywhere

  • Transparent
  • Context-aware
  • Mobile
  • Miniature
  • Ubiquitous

(Smart attire, smart spaces, …)

Autonomic Computing

Privacy Security

✂✁ ✄ ☎✝✆ ✞ ✟ ✠ ✡ ☛ ✠ ✡ ☞ ✞ ✌ ✍ ✄ ✞ ✎✑✏ ✄ ✎ ✞ ✁ ✒✔✓ ✕ ✖ ✗ ✘ ✙ ✚ ✛ ✗ ✜✣✢✂✤ ✥ ✦ ✘ ✧

Processors

★ ✩ ✪ ✫ ✬ ✭ ✮ ✯

Embedded and Real-Time Systems

slide-2
SLIDE 2

2

Precision Agriculture Habitat Monitoring Infrastructure Protection Disaster Response Target Tracking

Sensor Networks

Applications

Border Control

Features

  • Ad hoc deployment
  • Massive distribution
  • Interaction with a

physical environment

  • Unattended operation

A Fundamental Challenge: Sensor Network Application Development

Cost of sensor network software will dominate total

system cost

Example: U. Virginia’s VigilNet

Cost of hardware: $10K

(100 nodes * $100/node at scale)

Cost of software development/debugging/testing: $120K

(5 graduate students * 20 weeks * 40 hrs * $30/hr)

Hardware cost is decreasing but programmers’ cost isn’t

Reducing software cost

Development cost: reusable components, high-level

abstractions

Debugging cost: automated checking and analysis tools Testing cost: realistic simulation/emulation environments

slide-3
SLIDE 3

3

Reducing Development Cost:

Distributed Programming Abstractions

  • Distributed programming paradigms
  • Abstract distributed communication
  • Provide location transparency

Logical View

Reducing Development Cost:

Distributed Programming Abstractions

slide-4
SLIDE 4

4

  • Distributed programming paradigms
  • Abstract distributed communication
  • Provide location transparency
  • Sensor Network Programming

Abstractions

  • Represent the physical world to

the programmer

  • Abstract distributed interaction

with the physical environment Logical View

Reducing Development Cost:

Distributed Programming Abstractions

  • Distributed programming paradigms
  • Abstract distributed communication
  • Provide location transparency
  • Sensor Network Programming

Abstractions

  • Represent the physical world to

the programmer

  • Abstract distributed interaction

with the physical environment Logical View

Reducing Development Cost:

Distributed Programming Abstractions

slide-5
SLIDE 5

5

“Macro-programming”: Sensor Network Programming Languages

Node-based

NesC, MANTIS, Snack, TinyScript, …

Event-based

DSWare, SensorWare, GalsC/GuysC

Group-based

Abstract regions, State-centric programming, Hood, …

Query-based

Cougar, TinyDB/TAG, TinySQL, Tina, …

Virtual machines

Mate, ASVM, …

Biological

Amorphous computing, swarm computing

EnviroSuite: An object based system where objects

represent environmental entities

Environmentally Immersive Programming

Exports a new address space in which the addressed

entities (called contexts) are representations of physical entities in the external environment

Contexts:

Logical representations of entities in the external world Have unique names (context labels) – same as IP hosts Instantiated when the corresponding external entities are

  • bserved in the environment – follow these entities around

Tracking objects (tasks) can be attached to contexts to

execute in the vicinity of the corresponding real-world entity

Tasks (attached to contexts) can communicate and

invoke each other’s methods remotely

slide-6
SLIDE 6

6

EnviroSuite Architecture

Tracking Objects Self-Named Objects Region Objects

Object representation protocols

Context vehicle { sense = magnetic() state = AVG(position()) method sendHome { send (base, state) } }

Declarations Analysis Engine Specifications:

  • communication delays
  • data throughput
  • lifetime

Constraints

Feasibility Check

Configuration No? Feedback

Sensor data processing library Storage Subsystem Comm. Subsystem Application code Network Stack

Run-time Code Analysis Simulation/ Emulation

EnviroSuite Walkthrough

  • I. The Programmer’s View

Tracking Objects Self-Named Objects Region Objects

Object representation protocols

Context vehicle { sense = magnetic() state = AVG(position()) method sendHome { send (base, state) } }

Declarations Analysis Engine Specifications:

  • communication delays
  • data throughput
  • lifetime

Constraints

Feasibility Check

Configuration No? Feedback

Sensor data processing library Storage Subsystem Comm. Subsystem Application code Protocol Stack

Run-time Code Analysis Simulation/ Emulation

slide-7
SLIDE 7

7

Programming Model

Tracking Objects Context Type: Car

Context Label

Aggregate State Variables

Tracking Objects Context Type: Person

Context Label

Aggregate State Variables

Object Representation Protocol (Tracking Object) External Entity

Contexts and Objects

Contexts: Encapsulate entity state and tracking objects Tracking objects: Perform entity-specific computation,

communication and sensing

History Entity ID

State Context

Attached Tracking Objects

Programmer’s View

slide-8
SLIDE 8

8

Communication

State Context

Programmer’s View

Context

Attached Tracking Objects Attached Tracking Objects

Objects may export methods for remote invocation

Context Example

begin context tracker sense: magnetic() + motion(); state: location = avg (position,3,2); end History Entity ID

Context (e)

Programmer’s View

Sensee( ) = TRUE Leader Members Statee( ) = average position

slide-9
SLIDE 9

9

Attaching Objects

History Entity ID

Context (e)

Programmer’s View

Sensee( ) = TRUE Leader Members Statee( ) = average position

begin context tracker sense: magnetic() + motion(); state: location = avg (position,3,2); end begin object reporter send (state, home); end

Attaching Objects

History Entity ID

Context (e)

Programmer’s View

Sensee( ) = TRUE Leader Members Statee( ) = average position

begin context tracker sense: magnetic() + motion(); state: location = avg (position,3,2); end begin object reporter send (state, home); end Attach

slide-10
SLIDE 10

10

Attaching Objects

History Entity ID Programmer’s View

Sensee( ) = TRUE Leader Members Statee( ) = average position

begin context tracker sense: magnetic() + motion(); state: location = avg (position,3,2); end begin object reporter send (state, home); end Attach begin object mic turn-on microphone send (sound, home); end

Aggregation and State Management

Leader Member

Timer Aggregation Function State() Trigger Function Sense() Periodic Sensor Reports Trigger Function Sense() Remote Invocation

Start/stop Join/leave Join/leave

Application Objects

Invocation Send/receive

Group Management and Leader Election

Election

slide-11
SLIDE 11

11 Context Type: Metal Context Type: Intruder

Object Statistics Count() HandleAlarms() GetHistory() Object Tracker GetPosition() MicOn() MicOff() Object Alarm DefineTrigger() EnableAlarms() DisableAlarms()

Summary:

  • 1. Define objects

and contexts

Summary

  • 2. Attach objects

to contexts

Context Type: Intruder

Object Alarm DefineTrigger() EnableAlarms() DisableAlarms() Object Tracker GetPosition() MicOn() MicOff() Object Statistics Count() HandleAlarms() GetHistory() Tracker Tracker Alarm Stats

Context Type: Metal

slide-12
SLIDE 12

12

Programmer’s View

Context Type: Intruder

Tracker Tracker Alarm Stats

Method Invocation

Object Statistics Count() HandleAlarms() GetHistory() Object Tracker GetPosition() MicOn() MicOff()

Context Type: Metal

Object Alarm DefineTrigger() EnableAlarms() DisableAlarms()

Deployed Sensor Network

Example: Intrusion Detection Scenario

slide-13
SLIDE 13

13 Sensor field Goal: monitor physical entities in the environment

Example: Intrusion Detection Scenario

Intruder Package Context 1. Type: Metal Context 2. Type: Intruder Sensor field Leader Leader Abstract representation: physical entities as logical contexts

Example: Intrusion Detection Scenario

slide-14
SLIDE 14

14 Context 2. Type: Intruder Entity-to-entity Communication Sensor field Leader Leader Context 1. Type: Metal Logical contexts can communicate, host computation, and have unique identifiers

Example: Intrusion Detection Scenario EnviroSuite Walkthrough

  • II. Object Representation

Tracking Objects Self-Named Objects Region Objects

Object representation protocols

Context vehicle { sense = magnetic() state = AVG(position()) method sendHome { send (base, state) } }

Declarations Analysis Engine Specifications:

  • communication delays
  • data throughput
  • lifetime

Constraints

Feasibility Check

Configuration No? Feedback

Sensor data processing library Storage Subsystem Comm. Subsystem Application code Protocol Stack

Run-time Code Analysis Simulation/ Emulation

slide-15
SLIDE 15

15

EnviroSuite Walkthrough

  • II. Object Representation

Tracking Objects Self-Named Objects Region Objects

Object representation protocols

Context vehicle { sense = magnetic() state = AVG(position()) method sendHome { send (base, state) } }

Declarations Analysis Engine Specifications:

  • communication delays
  • data throughput
  • lifetime

Constraints

Feasibility Check

Configuration No? Feedback

Sensor data processing library Storage Subsystem Comm. Subsystem Application code Protocol Stack

Run-time Code Analysis Simulation/ Emulation

Object Representation Protocols

Implement distributed algorithms for exporting the

abstraction of physical objects

Unique representation Identity management Need well defined semantics

Crossing targets? False positives/false negatives? Spatial object boundaries?

Object types

Tracking objects Region objects Self-named objects

slide-16
SLIDE 16

16

Tracking Objects: Group Management Protocols

Nodes sensing a given target form a single context Context has leader, members, and followers

Elected Leader

Nodes that can sense the target and hear the leader (members) Nodes that cannot sense the target but hear the leader (followers) Leader’s Heartbeat Range (awareness horizon)

Node State Transition Diagram

Default Follower Member Leader sense sense stop sense stop receive leader heartbeat sense timeout New Leader Election win lose handoff

slide-17
SLIDE 17

17

Condition for Unique Representation

Target can’t move fast enough to be sensed by a

node that is outside leader heartbeat range:

Communication range > 2 Sensing Range + Target

speed x group migration time

Sensing Range Sensing Range

Moving Target Leader heartbeat range Leader

Group management optimization 1:

Semi-dynamic leader election

Idea: allows only a subset of nodes to

compete for leadership

Faster leader election Fewer message collisions

Algorithm:

Pre-elect potential leaders Only potential leaders

compete for leadership

slide-18
SLIDE 18

18

Group management optimization 1:

Semi-dynamic leader election

Leader desert problem

previous leader create a spurious object

Group management optimization 1:

Piggy-backed heartbeat

Observation:

Members periodically send

data messages

Leaders periodically send

heartbeats

Idea: piggy-back leader

heartbeats onto member messages

Less communication

  • verhead

Better dissemination of

  • bject info.
slide-19
SLIDE 19

19

Group management optimization 1:

Piggy-backed heartbeat

Overcoming the leader desert problem

previous leader won’t create spurious object

1 2 3 4 5 6 0.5 1 2 4 8 16 32 64 Target Velocity (grid/s) Number of Objects

Group management optimization 1:

Piggy-backed heartbeat

Ideal

Maximum trackable speed EnviroSuite <=1 grid/s (22 mph) Piggy-backed heartbeat >=8 grid/s (179 mph)

slide-20
SLIDE 20

20

Group management optimization 2:

Implicit leader election

Observation:

Leaders periodically send data messages (target

positions) to the base station

Idea - reuse leader data messages as leader

competition messages

For each period, the potential leader that first

sends out a leader message becomes the leader

Others become silent in this period

2 4 6 8 10 0.5 1 2 4 8 16 32 Target Velocity (grid/s) Number of Objects

Group management optimization 3:

Implicit leader election

>=8 grid/s (179 mph) Implicit leader election 50 ~ 70 >=8 grid/s (179 mph) Piggy-backed heartbeat Number of control messages Maximum trackable speed

Ideal

slide-21
SLIDE 21

21

EnviroSuite Walkthrough

  • III. Analysis Tools

Tracking Objects Self-Named Objects Region Objects

Object representation protocols

Context vehicle { sense = magnetic() state = AVG(position()) method sendHome { send (base, state) } }

Declarations Analysis Engine Specifications:

  • communication delays
  • data throughput
  • lifetime

Constraints

Feasibility Check

Configuration No? Feedback

Sensor data processing library Storage Subsystem Comm. Subsystem Application code Protocol Stack

Run-time Code Analysis Simulation/ Emulation

EnviroSuite Walkthrough

  • III. Analysis Tools

Tracking Objects Self-Named Objects Region Objects

Object representation protocols

Context vehicle { sense = magnetic() state = AVG(position()) method sendHome { send (base, state) } }

Declarations Analysis Engine Specifications:

  • communication delays
  • data throughput
  • lifetime

Constraints

Feasibility Check

Configuration No? Feedback

Sensor data processing library Storage Subsystem Comm. Subsystem Application code Protocol Stack

Run-time Code Analysis Simulation/ Emulation

slide-22
SLIDE 22

22

Aggregate Performance Tradeoffs in Sensor Networks

Energy Information/Action Events Time

E T I

Sensor network

Analysis of Latency/Capacity Trade-offs Sensor Networks

What is the relation between radio range,

network density, total number of nodes, number of sinks, packet length, packet scheduling policy, packet throughput, MAC-layer protocol, and end-to-end packet ability to meet latency constraints?

slide-23
SLIDE 23

23

Network Real-time Capacity

Network bandwidth is the bottleneck Intuitively, network ability to meet latency requirements

(schedulability) decreases with:

Increased packet size (task processing time), C Increased distance between source and destination, L Decreased end-to-end latency constraint, D

Schedulability decreases with CL/D Is there a bound CapacityRT, such that all packets, i, reach

their destinations by their deadlines if:

RT i i i i

Capacity D L C ≤

Multi-stage Resource Pipelines

The Stage Delay Theorem: If the synthetic utilization

  • f resource j, does not exceed Uj, then no task is

queued on resource j for more than a fraction βj of its end-to-end deadline*, where:

βj = Uj (1 – Uj /2)/(1 – Uj)

*This is under deadline monotonic scheduling. Similar results derived for other policies.

slide-24
SLIDE 24

24

The Single Hop Problem

B A Receiver’s Radio Range

Equivalent Virtual Queue

Onl y one node in the vicinity of a receiver ca n

send a t a tim e

Throughput Optimization: Maximizing Real-Time Capacity

Consider a localized communication pattern where each

node communicates with nodes at most N hops away.

On any path, maximize Σj Uj subject to From symmetry, Uj = U Hence,

      + − + =

2

) 1 ( 1 1 1 N N U

=

≤ − −

N j j j j

U U U

1

1 1 ) 2 1 (

N U U U / 1 1 ) 2 / 1 ( = − −

slide-25
SLIDE 25

25

Real-Time Capacity

The total capacity theorem: I n a load-balanced

netw ork of n nodes, ea ch w ith a ra dio of tra nsm ission speed W a nd m neighb ors on a vera ge, if com m unica tion is l oca l ized w ithin a t m

  • st N hops:

For l a rge N:

      + − + =

2

) 1 ( 1 1 1 N N m nW CapacityOpt

mN nW CapacityOpt ≈

Real-time Capacity of Multi-hop Data-Collection in Sensor Networks

In a data collection sensor network with K collection

points, maximum path length N, and radio transmission speed W, what is a sufficient bound on real-time capacity?

slide-26
SLIDE 26

26

Data conservation constraints

Real-time Capacity of Multi-hop Data-Collection in Sensor Networks

In a data collection sensor network with K collection

points, maximum path length N, and radio transmission speed W, what is a sufficient bound on real-time capacity? j U U U U

j path j j j j

/ 1 , 1 1 ) 2 1 ( ∝ ≤ − −

N KNW CapacityDC ln 5 . 1+ ≈

K=3 N=2

Real-time Capacity of Multi-hop Data-Collection in Sensor Networks

In a data collection sensor network with K collection

points, maximum path length N, and radio transmission speed W, a sufficient bound on real-time capacity is:

slide-27
SLIDE 27

27

The Capacity/Latency Trade-off

The following sufficient condition quantifies a

(conservative) view of the capacity/latency trade-off in a data collection network: N KNW D L C

i i i i

ln 5 . 1+ ≤

System evaluation – empirical results

System introduction

Tracking Classification Velocity Regression False Alarm Filtering Engine Time Sync Group Mgmt Sentry Service Power Mgmt Tripwire Mgmt Localization Report Engine Application Layer Middleware Layer Network Layer Data Link Layer Robust Diffusion Tree Asymmetric Detection Radio-Base Wakeup MAC Sensor Drivers eXtreme Scale Motes (XSM) Interference Avoidence Frequency Filter Continuous Calibrator

slide-28
SLIDE 28

28

System evaluation – empirical results

Deployment

Deployment – 200 XSMs (20% node failures)

potential leaders base station other nodes

Base Station

System evaluation – empirical results

Tracking performance

23.5 mph 5.91 meter Vehicle (20±1 mph) 10.5 mph 7.06 meter Vehicle (10±1 mph) 6.9 mph 6.67 meter running person (7±1 mph) 2.9 mph 6.19 meter walking person (3±1 mph) Calculated velocity

  • Avg. tracking error

Target type

slide-29
SLIDE 29

29

Summary and Conclusions

High-level programming abstractions are needed for sensor

network applications

Underlying foundations must be found for analysis of

spatio-temporal behavior

EnviroSuite attempts to address the above challenges

Ensuring correct representation of the environment (e.g., correct

association of measurements and targets)

Providing analysis tools

General question: what services and analysis tools are most

important for reducing the cost of development, validation, testing, deployment, and robust execution of sensor networks software?

Selected Publications

  • Brian Blum, Prashant Nagaraddi, Anthony Wood, Tarek Abdelzaher, Sang Son, John

Stankovic, “An Entity Maintenance and Connection Service for Sensor Networks,” The First International Conference on Mobile Systems, Applications, and Services (MobiSys ‘03), San Francisco, CA, May 2003.

  • Tarek Abdelzaher et al., “EnviroTrack: Towards an Environmental Computing Paradigm for

Distributed Sensor Networks,” IEEE International Conference on Distributed Computing Systems, (ICDCS ‘04), Tokyo, Japan, March 2004.

  • Tarek F. Abdelzaher, Shashi Prabh, Raghu Kiran, “On Real-time Capacity Limits of Multihop

Wireless Sensor Networks,” IEEE Real-time Systems Symposium (RTSS ’04), Lisbon, Portugal, December 2004.

  • Liqian Lu, Tian He, Tarek Abdelzaher, John Stankovic, “Design and Comparison of

Lightweight Group Management Strategies in EnviroSuite,” International Conference on Distributed Computing in Sensor Networks (DCoSS ‘05), Marina Del Rey, CA, June 2005

  • Liqian Luo, Tarek Abdelzaher, Tian He, John Stankovic “EnviroSuite: An Environmentally

Immersive Programming Framework for Sensor Networks”, accepted to ACM Transactions

  • n Embedded Computing Systems (ACM TECS ‘05)
  • Tian He, Sudha Krishnamurthy, Liqian Luo, Ting Yan, Lin Gu, Radu Stoleru, Gang Zhou,

Qing Cao, Pascal Vicaire, John A. Stankovic, Tarek F. Abdelzaher, Jonathan Hui, Bruce Krogh, "VigilNet: An Integrated Sensor Network System for Energy-Efficient Surveillance," accepted to ACM Transactions on Sensor Networks (ACM ToSN ’05)