Title: Wireless Sensor Networks: Time for RealTime
1Wireless Sensor NetworksTime for Real-Time?
Professor Jack Stankovic Department of Computer
Science University of Virginia February 2009
2Ad Hoc WSN
- Sensors
- Actuators
- CPUs/Memory
- Wireless Radio
- Power Limited
Self-Organizing
3Mica2, Mica2Dot, MicaZ
- ATMega 128L 8-bit, 8MHz, 4KB EEPROM, 4KB RAM,
128KB flash. - Chipcon CC100 or CC2420.
Mica2
Mica2Dot
4Outline
- Motivation do WSN have RT constraints?
- Can we apply real-time technology?
- If so, what technology?
- Should we apply real-time technology?
- Real-Time Scheduling and WSN
- Real-Time Control and WSN
- Final Thoughts
5Computing in Physical Systems
Road and Street Networks
Environmental Networks
Industrial Networks
Open, Heterogeneous Wireless Networks
with Sensors and Actuators
Battlefield Networks
Building Networks
Vehicle Networks
Body Networks
6Real-Time Constraints?
- Many types
- Hard deadlines
- Hard deadlines and safety critical
- Soft deadlines
- Time based QoS
7Example Group Management (Tracking)
Base Station
8Deadlines
- If we have enough late messages within groups we
can lose the track - Not straightforward deadline
- Tied to redundancy, speed of target
- If messages dont make it to base station in hard
deadline we miss activating IR camera - If we dont act by Deadline D truck carrying bomb
explodes safety critical
9What RT Technology?
10Real-Time Systems
- A real-time system is one in which the
correctness of the system depends not only on the - logical result of computations, but also
- on the time at which the results are produced.
11Real-Time Constraints
- Hard and Soft RT
- Safety critical
V
V
D
D
V
D
minus infinity
12Technology (pointers)
- Rate Monotonic Analysis
- A practitioners handbook for real-time analysis
Klein, et. al. - Earliest Deadline First (EDF) theory
- Deadline scheduling for real-time systems
Stankovic et. al. - Control Theory based scheduling
- Deterministic OS kernels
- Real-Time Operating Systems Stankovic et. al.
- Predictability and (Hard) Guarantees
- Hard Real-Time Computing Systems - Buttazzo
13Can We Apply RT Technology
- Basis of that technology
- Deterministic underlying models
- Worst case assumptions
- Highly controlled (closed) environments
14WSN Uncertainties
- Highly dynamic wireless communication
- Arbitrary Interference
- Environment
- Parallel communications
- Other wireless systems
Highly Controlled Highly
Uncontrolled
Classical RT WSN
15Communication
Irregular Range of A
A and B are asymmetric
16Spatial Impact
RSSI measured in a parking lot
17Temporal Impact
RSSI measured every hour
18Adaptive Transmission Power Control (ATPC)
See our paper in SenSys
19Uncertainties -Voids
Left Hand Rule
Destination
VOID
Source
20Other Uncertainties
- Energy depletion
- Nodes fail
- Environmental disturbances
- Other co-located systems (mobile and not)
RT Impossible?
21Any Good News?
- Sensors gather redundant information
- Virtualization
- Create reliable system out of unreliable
parts - Can we do this in time
- Can we tame the uncertainties
22Guarantees
- Function of Assumptions
- Classical Hard Real-Time
- Closed/controlled system
- Careful set of assumptions
- Gap between assumptions and system is often small
- Subject to max number of losses/errors
- Function of Assumptions
- WSN
- Open system
- Careful set of assumptions
- Gap may be large
- Subject to max number of losses/errors
23Real-Time Technology
- Velocity Monotonic
- Exact Characterization
- Deadline Partitioning
- SW-based Control Theory
24Sensor Net Routing
- End-to-end
- Real-time
- Collisions
- Congestion
- Power
- Security
- Mobility
Destination
Source
Base Station
Assumption Nodes know location
25Velocity Monotonic Scheduling (VMS)
- Consider Time and Distance
- Loc.(Dest.) Loc.(Source) Distance
- Distance/Deadline Velocity
See our RAP paper
26VMS
- Static VMS (compute at source)
- Fixed velocity on each hop
- Vdis(x0,y0,xd,yd)/D
- Adapt velocity at intermediate node
- Vi dis(xi,yi,xd,yd)/Si
- Slack Si D - elapsedTime
F(remaining distance)
27Example
D
dis 90 m D 2 s V 45 m/s HIGH Priority
A
C
B
dis 60 m D 2 s V 30 m/s LOW Priority
28Deadline Miss Ratio
Deadline Miss Ratio FCFSgtDSgtDVM,SVM
Overall Deadline Miss Ratios with deadlines (5,10)
29Best Effort
- Runtime algorithm
- Can we develop a VMA (velocity monotonic
analysis) analogous to RMA? - More rigorous than best effort
30Next Example
- Static off-line
- Early assessment
- Careful set of assumptions
31WSN Schedulability Analysis
- Given a sensor network and multiple periodic
real-time streams, can all streams meet their
time constraints in the network? - Carefully state assumptions
- Result produce a feasible communication link
schedule
32Exact Characterization
- Given
- Fixed Topology of the WSN
- Communication Matrix
- Interference Matrix
- Set of Streams
- D, P, Start_Time, Transmission_Time, Source and
Destination - Fixed Routing
- Clock sync slots
- Is there a schedule for all streams to meet all
constraints?
33Schedulability Analysis
Stream specification
Network topology
Communication parameters
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
34Exact Characterization - Algorithm
- 1. Order streams by importance (vel.)
- 2. Find and allocate free links to most important
stream - 3. Update remaining streams conditions based on
new allocation - 4. If any streams still pending, then go to step
1.
35Example per stream
36Workloads
- Known workloads
- All, most common, expected, outlier, key
workloads - Design time
- Provides an understanding of capabilities of the
system - Guarantees subject to assumptions
- Allocate per stream or per link
- If fails, know that up to Stream k the system is
OK - Redesign
37Robustness
- Change topology
- Change routing
- Communication and Interference matrices as a
function of time - Allow for message faults (retransmissions)
38Analogous to the cylinder packing problem
39More Rigorous than VMS
- Exact analysis (uses velocity)
- Many assumptions
- Off-line (design time) estimation
- Robustness studies possible
40Case Study
- System-wide view of real-time
- Surveillance and tracking application
- Apply classical real-time approach
- Deadline partitioning
41VigilNet
1. An unmanned plane (UAV) deploys motes
Zzz...
Sentry
2. Motes establish a sensor network with power
management
3. Sensor network detects vehicles and wakes up
the sensor nodes
42VigilNet Architecture
43Deadline Partition
- Reduce the design space through deadline
partition. - Assign sub-deadlines for each stage in the
system to achieve the overall deadline - Example to follow
- 6 stages
- Overall deadline 5 seconds
44Stage 1. Target Triggers the First Sentry
- Initial Activation (Tinitial)
- Nodes are either sentry/non-sentry
- For Sentry node periodic sleep (P)
Tinitial the time until the a sentry detects
the target
45Stage 2 Sentry Ensures it is a Real Target
- Initial Activation (Tinitial)
- Initial Target Detection (Tdetect)
- Hardware delay response
- Sampling delay, accumulate sampling
- Running the detection algorithm
Tdetection the time until the first sentry
confirms detection
46Stage 3 Wake Up Neighboring Nodes
- Initial Activation (Tinitial)
- Initial Target Detection (Tdetect)
- Wakeup (Twakeup)
- Time to from a group around the target.
Twakeup the time to broadcast wakeup messages
47Stage 4 Sentry Aggregates the Reports
- Initial Activation (Tinitial)
- Initial Target Detection (Tdetect)
- Wakeup (Twakeup)
- Group Aggregation (Taggregation)
- Establish a group to track the target and define
a logical entity - Wait for multiple messages from group members to
validate detection
Taggregation the time to aggregate messages
48Stage 5 Send Aggregated Results to Base Station
- Initial Activation (Tinitial)
- Initial Target Detection (Tdetect)
- Wakeup (Twakeup)
- Group Aggregation (Taggregation)
- End-to-end delay (Te2e)
- Relay message to base-station
Te2e the time relay the message to base-station
49Stage 6Base Station Processing
- Initial Activation (Tinitial)
- Initial Target Detection (Tdetect)
- Wakeup (Twakeup)
- Group Aggregation (Taggregation)
- End-to-end Delay (Te2e)
- Base Processing (Tbase)
Tbase the time to do summary at the Base station
50System Evaluation
51200 XSM Motes
52Delays
Average detection delay 2.42 seconds Average
classification delay 3.56 seconds Average delay
to get velocity estimation 3.75 seconds
53Control Theory
Controlled variable
Overshoot
Steady state error
??
Reference
Steady State
Transient State
Time
Settling time
54Sensor Net Routing
- End-to-end
- Real-time
- Collisions
- Congestion
- Power
- Security
- Mobility
Destination
Source
Base Station
Assumption Nodes know location
55SPEED
USE VELOCITY
See our Speed paper
56SPEED Architecture
57Evaluation
(Added Congestion)
E2E Delay Energy
Consumption
58Performance
Figure A. E2E delay profile of DSR
Figure B. E2E delay profile of AODV
59Performance
Figure. D E2E delay profile of SPEED
Figure C. E2E delay profile of GF
60Final Thoughts
- We can and should apply RT Technology to WSN
- What is a guarantee
- Function of many different underlying assumptions
- But so is classical real-time scheduling theory
- What are the limits/usefulness of rigorous
real-time analysis for WSN?