420 likes | 633 Views
Real-time message scheduling in wireless sensor networks. Kavitha Balasubramanian Teaching Assistant, CprE 458/558 Dept. of Electrical and Computer Engineering Iowa State University, Ames, IA 50011. Agenda. Introduction Wireless Sensor Networks
E N D
Real-time message scheduling in wireless sensor networks Kavitha Balasubramanian Teaching Assistant, CprE 458/558 Dept. of Electrical and Computer Engineering Iowa State University, Ames, IA 50011 Cpre 558: Project Presentation
Agenda • Introduction • Wireless Sensor Networks • Scheduling Algorithms in Wireless Sensor Networks • Implementation • Conclusion Cpre 558: Presentation
Agenda • Introduction • Wireless Sensor Networks • Scheduling Algorithms in Wireless Sensor Networks • Implementation • Conclusion Cpre 558: Presentation
Agenda • Introduction • Wireless Sensor Networks • Scheduling Algorithms in Wireless Sensor Networks • Implementation • Conclusion Cpre 558: Presentation
Agenda • Introduction • Wireless Sensor Networks • Scheduling Algorithms in Wireless Sensor Networks • Implementation • Conclusion Cpre 558: Presentation
Agenda • Introduction • Wireless Sensor Networks • Scheduling Algorithms in Wireless Sensor Networks • Implementation • Conclusion Cpre 558: Presentation
Introduction • Real-time systems • Hard real-time • Guarantee deadlines • Soft real-time • Improve hit ratio • Wireless sensor network applications require real-time support • Surveillance and tracking • Border patrol • Fire fighting. Cpre 558: Presentation
Wireless Sensor Networks • Operate in Adhoc networks • Communication patterns • Local coordination • Sensors coordinate with one another in order to aggregate data • Sensor-base communication • Sends data from the local group to the base station • Real time sensor applications need timeliness guarantees • Schedule messages based on deadlines • Exploit spatial reuse of wireless channel • Simultaneous transmissions • Explicitly avoid collisions • Prevent false blocking Cpre 558: Presentation
Scheduling Algorithms in Wireless Sensor Networks • RAP: A Real-Time Communication Architecture for Large-Scale Wireless Sensor Networks • Chenyang Lu Brian M. Blum Tarek F. Abdelzaher John A. Stankovic Tian He • Scheduling messages with deadline in real time multi-hop wireless sensor networks • Huan Li, Prashant Shenoy, Krithi Ramamritham Cpre 558: Presentation
RAP(A Real-Time Communication Architecture for Large-Scale Wireless Sensor Networks) • Velocity monotonic scheduling • Deadline and Distance aware • Static monotonic velocity (SMV) • Dynamic monotonic velocity (DMV) • Higher velocity denotes higher priority Cpre 558: Presentation
RAP(A Real-Time Communication Architecture for Large-Scale Wireless Sensor Networks) • Static monotonic velocity • Dynamic monotonic velocity (DMV) Cpre 558: Presentation
Scheduling messages with deadline in real time multi-hop wireless sensor networks • Application Background • Definitions • False Blocking • Algorithm details • Conclusions Cpre 558: Presentation
Application Background • Examples • Searching for trapped people in a building on fire, Building map of an unknown environment • Each robot carries sub-set of sensors and has wireless connectivity • Communication over an adhoc network Cpre 558: Presentation
Assumptions • Global topology information available • Messages to be transmitted available • Routing information available Cpre 558: Presentation
Definitions • Arrival Time (AT) • Time at which message arrives at a node • Transmission Duration • Difference between instants when first bit is sent out and last bit is received by receiver • Data Validity • Time interval for which data value produced by sensor is valid • Also determined by start time of consuming task • Effective Deadline (ed) • Minimum of data validity deadline and start time of consuming task • Latest Start time • latest time by which a hop must start transmitting for it to reach its destination by effective deadline Cpre 558: Presentation
Definitions • Message needs to travel h hops from source to destination; • mi : denotes transmission of message at the ith hop • Pd(mi) : transmission time incurred on remaining hops to destination. • LST(mi) = ed(m) – pd(mi) Cpre 558: Presentation
False Blocking One hop transmission 1 -> 0 : RTS 0 -> 1 : CTS 2: Receives RTS of 1 and is blocked during the transmission of m1 3 -> 2 : RTS 2 : Blocked and does not respond 4 : Receives RTS sent by 3 and is blocked 5 -> 4 : RTS 4 : Blocked and does not respond Even though m1 and m3 can be transmitted simultaneously and do not interfere Cpre 558: Presentation
False Blocking • Deadline miss: m1 : 0 to 2 m2 : 2 to 7 m3 : 7 to 9 (misses deadline) • Parallel transmissions can reduce deadline misses Cpre 558: Presentation
False Blocking • Deadlock • False blocking propagates • Propagation is along circular path • In cycle {A,B,C,D,E,F,A} every second node {A,C,E} is sending RTS to the next node {B,D,F} that is already blocked and because of this RTS, the previous node gets blocked Cpre 558: Presentation
Goal • Avoid collisions • False blocking needs to be eliminated for meeting deadlines • Do parallel transmissions (carefully) to meet deadline constraints • Consider potential impact of scheduling messages on future message transmissions Cpre 558: Presentation
Algorithm • Channel reuse based on smallest LST first • Partition message transmissions into disjoint sets • Messages in one set can be transmitted together • Transmission in one set should complete before next one begins • Once message is scheduled at hop i, it is considered for scheduling at hop i+1 Cpre 558: Presentation
m1 m2 m3 m4 Initial state Cpre 558: Presentation
m1 m2 m3 m4 Divide into sets m1 m3 m2 m4 Set1 Set2 Set3 Cpre 558: Presentation
m1 m2 m3 m4 Transmit Messages m1 m3 m2 m4 Set1 Set2 Set3 m5 m6 Cpre 558: Presentation
m1 m2 m3 m4 Transmit Messages m1 m3 m2 m4 Set1 Set2 Set3 m5 m6 m7 Cpre 558: Presentation
m1 m2 m3 m4 m5 m6 m7 m8 Transmit Messages m1 m3 m2 m4 Set1 Set2 Set3 Cpre 558: Presentation
m1 m2 m3 m4 m5 m6 m7 m8 Calculate LST m1 m3 m2 m4 Set1 Set2 Set3 Cpre 558: Presentation
m1 m2 m3 m4 Sort the Message queue m1 m3 m2 m4 Set1 Set2 Set3 m7 m6 m5 m8 Cpre 558: Presentation
m1 m2 m3 m4 Repeat the process m1 m3 m2 m4 Set1 Set2 Set3 m7 m6 m5 m8 Cpre 558: Presentation
Set Construction • Condition to join a set: • Exploit parallelism: • Arrival time of the message < Finish time • Schedule within deadline: • Finish time of message is no greater than the effective deadline. • No interference: • Current message transmission does not interfere with existing message transmissions in the set • Does not violate scheduled transmissions: • Inserting transmission into the set does not cause deadline violations for already scheduled transmissions in other sets Cpre 558: Presentation
Example Cpre 558: Presentation
Example • Message m1 • m1 selected first since it has smallest LST @time = 0 • S1 = {T(m1)} • s(S1) = AT = 0 • f(S1) = 2 < 6 Cpre 558: Presentation
Example • Message m2 • m1 and m2 interfere. • m2 cannot be added to S1. • Create new set S2 = {T(m2)} • s(S2) = f(S1) = 2 • f(S2) = s(S2) + 5 = 2 + 5 = 7 < 8 • S1 = {T(m1)}, S2 = {T(m2)} Cpre 558: Presentation
Example • Message m3 • Condition 1: Exploit parallelism • f(S1) = 2 > a(m3) : • Condition 2: Schedule within deadline • f(m3) = max(s(S1),a(m3)) + tt(m3) = 1 + 2 = 3 < d(m3) = 8 • Condition 3: No interference • m3 and m1 do not interfere • Condition 4: Does not violate scheduled transmissions • Since f(m3) = 3 > f(S1) ; fnew(S1) = f(m3) = 3; snew(S2) = fnew(S1) = 3; fnew(m2) = 3 + 5 = 8 Cpre 558: Presentation
Example • Therefore S1 is feasible for T(m3) • Final schedule : • S1 = {T(m1),T(m3)} • S2 = {T(m2)} • m1 and m3 are transmitted in parallel followed by m2 Cpre 558: Presentation
Example • Therefore S1 is feasible for T(m3) • Final schedule : • S1 = {T(m1),T(m3)} • S2 = {T(m2)} • m1 and m3 are transmitted in parallel followed by m2 Cpre 558: Presentation
Conclusion • Advantages • Explicitly avoids collisions • Doesn’t inject infeasible packets into the system • Exploits spatial channel reuse Cpre 558: Presentation
Implementation • Implemented in C++ • Input • Network topology • Collision Matrix • Distance Matrix • Routing table • Message Size • Events Cpre 558: Presentation
Implementation • Results • Comparison of performance of the RAP and the CR-SLF • Deadline miss • Impact of parameter settings • Message size • Network topology • Distance • Number of events Cpre 558: Presentation
Summary • RAP: Distributed • CR-SLF: Centralized • SLF without channel reuse is same as Dynamic Velocity Monotonic Scheduler • CR-SLF performs better because of channel reuse and collision avoidance Cpre 558: Presentation
Questions Cpre 558: Presentation
References • Scheduling Messages with Deadlines in Multi-hop Real-time Sensor Networks 11th IEEE Real-Time and Embedded Technology and Applications Symposium, San Francisco, California, March 2005. • RAP: A Real Time Communication Architecture for Large Scale Wireless Sensor Networks IEEE Real-Time Technology and Applications Symposium, San Jose, California, September 2002. Cpre 558: Presentation