Full Life Cycle Analysis for Wireless Sensor Networks Jack Stankovic Computer Science University of Virginia January 10 , 2007 University of Virginia Main Themes of Talk • Require design time analysis to obtain approximate system design – do this with few assumptions • Redo analysis as a function of subsequent design choices – Specific routing protocol • Analysis of various types required at all phases of system design, implementation, and operation • Require a tool/framework for combining multi-stage analysis University of Virginia VigilNet - Power Aware Surveillance • Acoustic • Magnetometer • Four 90 degree motion sensors • XSM motes - Crossbow ACM TOSN, Feb. 2006 University of Virginia Energy Efficient Surveillance System 1. An unmanned plane (UAV) deploys motes Zzz... Sentry 3.Sensor network detects vehicles and wakes up the sensor nodes 2. Motes establish an sensor network with power management University of Virginia Tripwire-based Surveillance • Self-organize (partition) sensor network into multiple sections (one per base station). • Turn off all the nodes in dormant sections. • Apply sentry-based power management in tripwire sections • Flexible scheduling, sections rotate to balance energy. Road Dormant Active Dormant Active Dormant Dormant Active Dormant Active University of Virginia Sentry Duty-Cycle Scheduling • A common period p and duty-cycle β is chosen for all sentries, while starting times Tstart are randomly selected Non-sentries Sentries A D B C E Target Trace A t B t C t D t E 0 p Awake University of Virginia 2p t Sleeping VigilNet Architecture University of Virginia Life Cycle Analysis • Design Time – Analytical • Programming Time – Execution time, memory, delays, … • Debugging Time – Operational, fix bugs, race conditions • Field Testing Time – Overhear, replay • System Lifetime – Validation services University of Virginia ANDES • Extensible Design Tool – Model and analyze WSN “early” – Iterate to obtain final configuration • Integrate analysis into a design tool - Plug-ins – Target tracking analysis – Communication schedulability analysis – … • Extend AADL/OSATE framework – Used extensively for real-time and embedded systems – CMU/SEI University of Virginia Design Time • Performance Attributes – – – – – – Lifetime Sensing coverage Communication Capacity Reliability QoS Security • System Parameters – – – – – – Number of nodes Density Duty cycle Sensing Range Communication range Bandwidth University of Virginia Example - Tracking Analysis University of Virginia Tracking Analysis • First Level of Analysis – Probability of detection – Average detection delay – – – – – – Density d Duty cycle b Period T Sensing range R Length of Path L Speed of target v (stationary, slow, fast) – Impact on lifetime University of Virginia Obtain Probability of Detection R Node l target locus βT+l/v βT 0 l/v βT l/v T t Probability of detection (βT+l/v ) /T Time interval when the target is in the sensing area Time interval when the node is awake in one period University of Virginia Consider All Possible Locations For a fast target with velocity v R R (x,y) l target locus A L University of Virginia Formulas for Detection Delay Expected Detection Delay for Fast Targets: Expected Detection Delay for Slow Targets: where * DCOSS paper University of Virginia Expected Delay vs. β Expected Delay vs. beta (T=1s, R=5m, d=0.01/m*m) 1.8 v=5m/s v=15m/s v=25m/s v=35m/s 1.6 expected delay (s) 1.4 1.2 Minimum energy gives 1.3s detection delay 1 0.8 0.6 0.4 0.2 0 0 0.1 0.2 0.3 0.4 0.5 duty cycle beta 0.6 0.7 0.8 0.9 University of Virginia Realistic Sensing Areas Formulas Validated What do real sensing areas look like? University of Virginia Real-Time Communication Analysis • Next level of analysis – Are expected end-to-end data flows going to meet their deadlines? – Fn(bandwidth, deadlines, periods, workloads) – Impact on lifetime University of Virginia Schedulability Analysis – Example Network topology Stream specification stream 1 stream 2 stream 3 Stream Message Size Period Deadline Start time 1 2000b 100ms 1000ms 0 2 200b 20ms 100ms 0 3 40b 10ms 50ms 0 Communication parameters Interference range 3m Radio range 1m Result: Schedulable Communication Link from node 1 to 2 is assigned to stream 1 at time slot 1 Communication Link from node 3 to 5 is assigned to stream 3 at time slot 1 •••••• University of Virginia RT Scheduling Analysis • Analysis includes – The impact of interference – Streams’ time constraints – Multi-hop communication • Assumptions – – – – Perfect collision-free MAC protocol Fixed routing Constant communication and interference range No transmission failure University of Virginia Solution - Exact Characterization • Analogous to real-time scheduling theory • Prioritize streams (velocity) • Schedule stream 1 • Schedule stream 2 assuming stream 1 exists – Account for time, BW and interference • Keep adding streams until – All streams successfully scheduled – All streams up to stream X successfully scheduled University of Virginia Analogy of Schedulability Problem to Cylinder Packing Time t Y DC X DB DA stream C stream B stream A Stream A Stream C Stream B University of Virginia Implementation of Analysis stream 1 (period: 4, deadline: 5, delay: 1, path: link 1,2,3,4) stream 2 (period: 4, deadline: 6, delay: 1, path: link 5,6) 0 1 1 0 0 1 1 0 1 1 1 1 1 1 0 1 1 1 InterferenceMatrix 0 1 1 0 1 0 0 1 1 1 0 1 1 1 1 0 1 0 link6 Input=> link1 link2 link3 link4 link5 Output=> link/time 1 2 3 4 5 6 1 1 link allocation table 2 3 4 ... ... 1 1 1 2 2 Can be very general University of Virginia VigilNet Surveillance System 1. An unmanned plane (UAV) deploys motes Zzz... Sentry 3.Sensor network detects vehicles and wakes up the sensor nodes 2. Motes establish an sensor network with power management University of Virginia Main Idea of EnviroLog • A distributed service that achieves repeatability via asynchronous event recording and replay Input Flash Log modules EnviroLog Target modules Output Record Stage University of Virginia Main Idea of EnviroLog • A distributed service that achieves repeatability via asynchronous event recording and replay Input Flash Log modules EnviroLog Target modules Output Replay Stage University of Virginia Uses of EnviroLog • System evaluation – Suite of real tests recorded and replayed • Debugging – Exact same tests • Protocol comparison in real setting – Exact same tests • Parameter tuning – Exact same tests • Wider testing than possible with physical system (e.g., speed up capability exists) • Valuable for rare, unsafe or hard to reproduce events – Fire, explosion, … University of Virginia Summary • Require Initial Analysis to Approximate Design Parameters • Refine Based on Design Decisions – analysis accounts for those decisions • Validation of the Early Analysis via Empirical Data • Value of AADL basic features/analysis • Integration among Life Cycle Analyses – A comprehensive and consistent toolkit University of Virginia Acknowledgements • VigilNet – large team at UVA (Tian He, …) • ANDES – (Vibha Prasad, …) • Tracking Analysis – (Ting Yan, …) • Envirolog – (Liqian Luo, …) • Papers available on each of these topics University of Virginia