Wireless Sensor Networks · – Parking space finder • Each spot costs $1000s / year to maintain...

41
Wireless Sensor Networks: Wireless Sensor Networks: Seamless computing across the Seamless computing across the physical and PC worlds physical and PC worlds Feng Zhao, Jie Liu, Elaine Cheong, Prabal Dutta, Kamin Whitehouse Networked Embedded Computing Group Microsoft Research http://research.microsoft.com/nec MSR faculty summit talk, August 2, 2004

Transcript of Wireless Sensor Networks · – Parking space finder • Each spot costs $1000s / year to maintain...

  • Wireless Sensor Networks: Wireless Sensor Networks: Seamless computing across the Seamless computing across the physical and PC worldsphysical and PC worlds

    Feng Zhao, Jie Liu, Elaine Cheong, Prabal Dutta, Kamin Whitehouse

    Networked Embedded Computing GroupMicrosoft Researchhttp://research.microsoft.com/nec

    MSR faculty summit talk, August 2, 2004

  • A new class of computing platforms

    SPOT watch

    Microsoft SPOT stamp

    Berkeley Spec mote

    Berkeley WeC mote

    Sensoria WINS NG 2.0iPAQ handheld

    Hitachi mu-chip RFID

    Gordon Bell’s Law: Technology advances enable a new, lower-priced, higher-volume computing platform or class to form every decade.

  • What’s happening in the garage

    Multiple, concurrent queries:• Traffic engineering: where

    can one find a parking spot?

    • Security: what is going on down there?

    • Corporate health services: when should the air exhaust fan run?

    08:09 08:38 09:07 09:36 10:04 10:33 11:02 11:31 12:000

    5

    10

    15

    20

    25

    30Frequency of Vehicle Instances

    Arrival statistics

    8am 11am

  • Parking garage application• Application scenarios

    – Parking space finder• Each spot costs $1000s / year to maintain

    – Other apps include security and air quality monitoring• Sensors may be used to monitor vehicle traffic

    – To improve space usage– But wiring is expensive, sensor may fail

    • Re-taskable wireless sensor net testbed– Multi-sensing modality– Support cross-node coordination– Answer independent queries from concurrent users

  • Three application classes

    Monitoring activity:• E.g., parking garage,

    roadway traffic• Spatio-temporal pattern

    Monitoring space:• E.g., habitat• Occupancy, condition

    Monitoring objects:• E.g., asset tracking• Location, ID, property

  • Blurring the boundary between digital and physical worlds

    Characteristics:• Heterogeneous devices• Disparate capabilities• Physically embedded

    (energy, size, noise, real-time events, …)

    • Dynamic topology• Large scale• Inherent uncertainties (in

    systems and environment)• Concurrent user queries

    Desired properties:• Easy to program, deploy,

    and manage• Robust to failure• Responsive• Re-taskable• Scalable• Secure

  • Parking garage testbedSense• Speed, length, and

    direction of vehicles• Magnetic signature of

    vehicles• Image of vehicles

    Break beam sensors

    Micro-server

    Camera

    Magnetometer

    PC server

  • Multiple, concurrent queries

    Camera image

    Magnetometer output

    Breakbeam output

    Report (histogram)

    Micro Server Camera server

    P2.5: the garage project

    Count vehicles

    Acquire magnetic signatures of extra

    large vehiclesCapture image of vehicles moving in wrong direction

  • Programming Sensor Net:Finding the happy median

    • View the net as a collection of data

    • User interacts with it by sending queries

    • Little control over where computation is done

    Internet

    Sensornet

    Web servicesWeb

    services Sockets/streamshttp/Web

    ??Signal processing view

    Database view

    • View it as a collection of programs

    • Explicitly specify where computation is done

    • May scale poorly

    • View it as a collection of services

    • Explicitly program services and provide run-time adaptation to changes and failures

    • Be more resource aware and efficient

  • Towards A Service Model for Sensor NetSensor net as provider of services

    – Services encapsulating data and computation– Service discovery, composition, execution– Tasking description

    PlannerQuery Task graph Generator

    TaskingMSTML

    Service Composer

    Service scheduleExecution

    Run-time resource infoRun time

    Schedule time

    Service info

    User

    Report

    Service Discovery/Self-monitoring

    TaskingProgress

  • Example of services and their composition

    Counting vehicles with a sensor array– Extract edges from break beam detections– Sort edges into consecutive detections– Detect vehicles based on timing relations

    among detections– Count vehicles– Generate an arrival histogram report

    Tasking descriptions in MSTML format

  • A multi-tier architecture to support the service model

    Sensors

    Micro servers

    Front end/gateway to internet

    InternetInternet

    Desired properties:• Scalable• Re-taskable• Resource aware

    and efficient• Easy to manage

  • Sample wireless sensor hardware

    Telos MicaZ Ember Stargate

    Picture

    CUP/Memory 8MHz/12bit TI MSP430, 4K RAM, 512K flash

    8MHz/8bit ATmega 128L, 4K RAM, 128K flash

    8MHz/8bit ATmega 128L,

    400MHz/32bit Intel PXA255, 32K flash, 64K SDRAM

    Radio Chipcon cc2420, 802.15.4 (zigbee), 2.4GHz, 250kpbs, 120m range

    Chipcon cc2420, 802.15.4 (zigbee), 2.4GHz, 250kpbs, 120m range

    em2420, 802.15.4 (zigbee), 2.4GHz, 250kpbs, 120m range

    802.11b, bridge to mica2 radio, 0.5-10Mbps

    Sensors Temperature, humidity

    Light, temp, magnetic, sound, vibration,

    Add-on (e.g., temp, vibration)

    Mica sensor boards

    Power needs Tx 17.4mA, Rx 19.7mA, Sleep 2.4µA

    Tx 17.4mA, Rx 19.7mA, Sleep

  • An example of micro-server:SPOT stamp + 802.15.4 radio

    Development environment– High-level programming in C#/

    Visual Studio .NET– Managed execution with TinyCLR– Hardware abstraction layer (HAL)

    CC2420 HAL in C#

    SPOT stamp– Derived from MS SPOT watch– ARM7TDMI processor, 27.6MHz– 384KB RAM, 4MB Flash– USB (1), Serial (2), SPI, I2C,

    GPIO (24 shared lines)

    802.15.4 radio– CC2420 from Chipcon– 2.4GHz, up to 250kbs– Distance up to 40-100m LoS– Connected to SPOT with SPI (4

    lines) and GPIO (6 lines)

  • A multi-tier architecture to support the service model

    Sensors

    Micro servers

    Front end/gateway to internet

    InternetInternet

    Desired properties:• Scalable• Re-taskable• Resource aware

    and efficient• Easy to manage

  • Scale Sensor Network

    Result due to Gupta and Kumar (‘00):

    As the density of the network grows, the per node throughput scaleswith )/1( nO )/1( nO

    Uncontrolled flooding is not scalable with node density.

  • Scale Sensor Network

    Centralized data collection is not scalable with the number of nodes.

  • Scale Sensor Network

    A few well-placed, more powerful nodes can form an overlay network, coordinate smaller nodes, reduce communication latency

    Centralized decision making is not scalable with physical phenomena.

  • A multi-tier architecture to support the service model

    Sensors

    Micro servers

    Front end/gateway to internet

    InternetInternet

    Desired properties:• Scalable• Re-taskable• Resource aware

    and efficient• Easy to manage

  • Juggling Multiple Tasks

    A blue vehicle initially spotted

  • Juggling Multiple Tasks

    Bottom camera relinquishes blue vehicle to top camera, and starts to track red vehicle

    Cameras successfully track both vehicles• Without resource allocation and re-tasking, both might have looked at blue vehicle, leaving no camera to track red vehicle

    A red vehicle enters the scene

  • Sensor tasking and control

    • Unique to sensor net– Concurrent events, uncoordinated tasks, limited resources

    • Tasking and re-tasking based on– A priori task assignment– Run-time conflict resolution– Load balancing– Cascaded tasks– …

    • Need to be aware of the physical phenomena being monitored as well as system configuration

  • Collaborative processing in sensor networks

    • What information to gather and communicate? And how often?

    • Which nodes should participate in sensing, processing, or communication?

    • How should the information be migrated?

    • What is routing or querying in this context?

    Moving to a utility-based approach:• What information is critical for the high-level tasks?• What is the cost of accessing the information?

  • Collaborative processing− Group formation in sensor networks

    • Information needs and resource constraints define who should participate in the processing groups

    • Group membership (e.g. location)defines the behavior of a node

  • Information-based group formation

    A leader node (blue square) carries belief state• Choose sensors in the neighborhood with good information• Hand off current belief to chosen sensor (new leader) and update

  • Cascaded query processing“Find the intruder” (minimize energy usage)

    Query enters at edge of network; Have minimal knowledge of

    vehicle pos.

    Redundantbearingsensors

    Pos. estimate has improved; pick optimal sensors

    Results good enough; return via

    dir. diffusion

    Actively seek out information• Pick best info source considering resource cost and information utility• Different from traditional query processing:

    • Data may need to be collected to serve a query• Need to know where/how data is to be collected and processed

  • Examples of dynamic tradeoffs in QoS

    ( ) ( ) ( ) ( ) ( ) ( )1ˆ 1T TT T S SH x x x x x x x x xα α−= − ∑ − − − − −Utility function:

    Information gainMahalanobis Distance

    Energy costQuery path length

    α=1: Information utility only α=0: Energy utility only

  • Recall in our service model• Generate task graphs and describe in MSTML• Instantiate task graphs• Coordinate among concurrent queries• Adapt to resource availability and resolve conflicts

    PlannerQuery Task graph Generator

    TaskingMSTML

    Service Composer

    Service scheduleExecution

    Run-time resource infoRun time

    Schedule time

    Service info

    User

    Report

    Service Discovery/Self-monitoring

    TaskingProgress

  • Programming as service compositionServices

    – As abstraction of computation and data– Loosely coupled, asynchronous– Composition through input/output ports– Communicate via message passing– Discovered dynamically– May span over multiple nodes

    sensingservice

    geo-constrained group

    speed estimation

    service

  • Programming as service composition

    vehicle id service

  • Programming as service composition

  • Programming as service compositiontraffic-violation detection service

    vehicle id service

    speed estimation service

  • An Example• Task graph for counting vehicle query

    – Ports– Services– Wiring services together

    • Description in MSTML (micro-server tasking markup language)

    Ports

    Services

    Connectingservicestogether

  • Recall in our service model• Generate task graphs and describe in MSTML• Instantiate task graphs• Coordinate among concurrent queries• Adapt to resource availability and resolve conflicts

    PlannerQuery Task graph Generator

    TaskingMSTML

    Service Composer

    Service scheduleExecution

    Run-time resource infoRun time

    Schedule time

    Service info

    User

    Report

    Service Discovery/Self-monitoring

    TaskingProgress

  • Optimization in run-time service composition

    • Syntactic analysis – Graph analysis to

    remove duplications• Semantic analysis

    – Analyze information content to determine reuse or sharing (e.g., sampling)

    Vehicle counting services

    Large vehicle detection services

    Optimize out common components

  • Juggling Multiple Tasks

    How do the sensors coordinate and possibly migrate tasks?

  • Think of a sensor network as a distributed market

    • Sensors bid for sensing tasks• Each sensing task has a utility• The goal is to optimally allocate

    scarce resources to tasks– In a centralized setting, this

    is a classical assignment problem studied in OR and economics

    • Here, it may have to be done in a local, peer-to-peer manner!

  • An example of optimizing resource allocation

    • Many concurrent moving objects

    • Pan-and-tilt camera sensors are used for sensing

    • The goal is to monitor as many “high-value”objects as possible

    Joint work with Maurice Chu, et al., IEE IDSS04

  • Video playback of demo• As the vehicle drives

    through the testbed, the infrared break beams can detect its speed, length and direction.

    • If the vehicle is very large, a magnetic signature can be acquired. If the vehicle is speeding or moving in the wrong direction, an image can be acquired.

    • Users can query the system independently, viewing output such as occurrences of vehicles.

  • Capture an image of a speeding vehicle

  • Blurring the boundary between the digital and physical worlds

    What we are doing @ MSR:

    • Connect sensor networks with PC ecosystems

    – Make sensors visible to PCs and physical information available to people 24/7

    – Bring services (e.g., web services) to small devices

    • Develop platform and tools for networks of embedded devices

    – Deal with uncertainties in both systems and environments

    – Moving from “building unreliable systems from reliable parts” to “building reliable systems from unreliable parts”

    Please visit our demo booth #31:Networked Embedded Computing Group, http://research.microsoft.com/nec

    Wireless Sensor Networks: Seamless computing across the physical and PC worldsA new class of computing platformsWhat’s happening in the garageParking garage applicationThree application classesBlurring the boundary between digital and physical worldsParking garage testbedProgramming Sensor Net:Finding the happy medianTowards A Service Model for Sensor NetExample of services and their compositionA multi-tier architecture to support the service modelSample wireless sensor hardwareAn example of micro-server:SPOT stamp + 802.15.4 radioA multi-tier architecture to support the service modelScale Sensor NetworkScale Sensor NetworkA multi-tier architecture to support the service modelJuggling Multiple TasksJuggling Multiple TasksSensor tasking and controlCollaborative processing in sensor networksCollaborative processing - Group formation in sensor networksCascaded query processingExamples of dynamic tradeoffs in QoSRecall in our service modelProgramming as service compositionProgramming as service compositionProgramming as service compositionProgramming as service compositionAn ExampleRecall in our service modelOptimization in run-time service compositionJuggling Multiple TasksThink of a sensor network as a distributed marketAn example of optimizing resource allocationVideo playback of demoBlurring the boundary between the digital and physical worlds