Your SlideShare is downloading. ×
0
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
A Real Time Mac For A Sensor Network
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

A Real Time Mac For A Sensor Network

265

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
265
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. A Real-time MAC for a Sensor Network Vivek Raghunathan and Roberto Solis ece497 class project
  • 2. Problem Motivation <ul><li>Sensor network environment = low energy nodes, correlated nodes. Realtime MAC scheme for sensor network – not done, but needed! (SCADA) </li></ul><ul><li>Goal 1: provide realtime guarantees, with low overhead. </li></ul><ul><li>Goal 2: Use correlation between neighbours to “relax deadlines” </li></ul><ul><li>Architecture for Sensor MAC </li></ul>Channel Clustering Scheme Realtime Scheduler Redundancy Rescheduler
  • 3. Realtime MAC Scheduler <ul><li>Assumptions </li></ul><ul><li>Wireless MAC – everyone can hear each other </li></ul><ul><li>Synchronized and slotted time (can be relaxed) </li></ul><ul><li>Only real-time stations. All stations have same real-time requirement (can be relaxed) </li></ul><ul><li>N = number of nodes </li></ul>
  • 4. Distributed TDMA: N= fixed <ul><li>Initialize – nodes learn each other’s id’s. </li></ul><ul><li>At each node, a table of [nbr, time since last tx] is maintained (initially all time =0) </li></ul><ul><li>Node with max. time since last tx transmits (“ src ”). Ties broken by lower node id. </li></ul><ul><li>All nodes snoop the transmission </li></ul><ul><li>Table update: </li></ul><ul><ul><ul><li>time since last tx[ src ] = 0; </li></ul></ul></ul><ul><ul><ul><li>time since last tx[all other nodes] ++; </li></ul></ul></ul>
  • 5. Distributed TDMA (contd) <ul><li>Exactly tracks a TDMA scheme. </li></ul><ul><li>If packet error on channel detected, all nodes hard reset couter tables (also if no transmission overheard for finite time interval) </li></ul><ul><li>If nothing to transmit in slot, station transmits a small packet (“token”) </li></ul><ul><li>Implementing priority is trivial: adjust the update rate of time since last retransmission according to priority. </li></ul><ul><li>Optimization so that nodes don’t snoop all the time - node sends header of fixed length (“token”), then sends packet. </li></ul>
  • 6. D-TDMA: N = variable <ul><li>Introduce a timegap between header and packet transmission. </li></ul><ul><li>This is not practical .. so transmit only the header first, then wait for timegap , then transmit the packet (with header) </li></ul><ul><li>Divide timegap into 2 slots – slot 1 and slot 2 </li></ul><ul><li>slot 1 for new nodes to tx “join request” </li></ul><ul><li>slot 2 is a slot used to provide a slotted ALOHA kind of capability </li></ul>
  • 7. D-TDMA, N=variable (contd) <ul><li>A: nobody wishes to join the network: slot 1,2 empty </li></ul><ul><li>B: 1 station wishes to join: slot 1 has a join_request, slot 2 has a net_info packet (tx by node with the token) </li></ul><ul><li>C: >=2 stations wish to join: slot 1 has garbage, slot 2 has a jam signal (tx by node with token) – (thus emulates slotted ALOHA) </li></ul><ul><li>D: no token in network: slot 1 garbage/join, slot 2 empty </li></ul><ul><li>Contending stations (case C & D) use a tree-based contention resolution algorithm to enter the network (ref. Bertsekas and Gallager) </li></ul>
  • 8. Redundancy Re-scheduler Modeling neighbor correlation <ul><li>With every node pair (i,j), associate a redundancy value = R(i,j). </li></ul><ul><li>The meaning of redundancy is: </li></ul><ul><li>If N packets arrive at i in a window of time and N packets arrive at j in the same window, then only the first N + N - N*R(i,j) = N(2 - R(i,j)) packets are of real-time value. The other packets can be dropped without loss of utility to the consumer of the data. </li></ul>
  • 9. Redundancy Re-scheduler When to reschedule <ul><li>Obvious (incorrect) answer: “always after a packet has been successfully transmitted on the channel” </li></ul><ul><li>Greater the redundancy R(i,j), the lesser value the other node's data has to this node. A node's decision to reschedule its packet affects other nodes. </li></ul><ul><li>Thus, correct answer is “ a node should reschedule a packet just after the node with which it has the least redundancy has just transmitted on the channel ” </li></ul>
  • 10. Whether to reschedule – ideal algorithm <ul><li>For every node i , we have inequalities of the form: </li></ul><ul><ul><li>N( i ) + N(minimum redundancy-> i ) >= (N’( i ) + N’(minimum redundancy-> i ))(2-R( i , minimum redundancy-> i )), (call these equations **) where </li></ul></ul><ul><ul><ul><li>N( i ) = Number of packets transmitted so far by i </li></ul></ul></ul><ul><ul><ul><li>minimum redundancy-> i = node with which station i has least redundancy </li></ul></ul></ul><ul><ul><ul><li>N’(i) = Number of arrivals at node i </li></ul></ul></ul><ul><li>Try to solve the equality equations. 1 equation per node. N eqns in N unknowns (N( i) ) </li></ul><ul><li>No solution in majority of cases. </li></ul>
  • 11. An approximate distributed algorithm <ul><li>Probabilistically drop packets </li></ul><ul><li>Excess = (N(i) + N(min. red.->i) - (N ’ (i) + N ’ (min red->i))(2 - R(i, min red->i))) + </li></ul><ul><li>P drop proportional to excess; should increase very rapidly with excess </li></ul><ul><li>P drop proportional to fairness = N( i) /(N( i) + N(min red->i)) </li></ul><ul><li>P drop = 2/PI * tanh(excess) * fairness </li></ul>
  • 12. Performance Evaluation <ul><li>Implemented and simulated distributed-TDMA (N fixed) in ns-2 </li></ul><ul><li>Matlab and C simulation to justify choice of P drop </li></ul><ul><li>Implementing the redundancy re-scheduler in ns-2 </li></ul><ul><li>METRICS </li></ul><ul><ul><li>Per station throughput to show that D-TDMA works as expected. Obtain schedulable region. </li></ul></ul><ul><ul><li>Increase in system lifetime due to token optimisation </li></ul></ul><ul><ul><li>Deviation from optimality for redundancy rescheduler </li></ul></ul><ul><ul><li>Increase in schedulable region/energy efficiency due to redundancy rescheduling scheme </li></ul></ul>
  • 13. D-TDMA simulation
  • 14. Re-scheduler performance <ul><li>Ideal = an allocation of N(i) that satisfies the equations ** exactly </li></ul><ul><li>Run simulation, find allocation, plug the N(I) into the equations ** to compute the RHS(simulation) </li></ul><ul><li>Deviation from ideal = RHS(simulation) – RHS(ideal) </li></ul><ul><li>While overestimates result in inefficiency, underestimates result in loss of utility to the consumer and are to be avoided as much as possible </li></ul>15% error, always underestimates 10% error (underestimates with p=1/2) 4.3% error (underestimates most of the time) Hard (drop pkt as soon as excess >=1) 25% overestimate, rare 5% under 32% overestimate 1% error (always overestimates) Tanh Red. Uniform in (0,1) Wide redundancy Red. Uniform in (0.5,1) High redundancy Red. Uniform in (0,0.5) Low redundancy
  • 15. Distributed TDMA (contd) <ul><li>Other nodes only listen to token. </li></ul><ul><li>No real need for time synchronization - the packet transmission on channel serves as a clock to synchronize nodes! </li></ul><ul><li>Now like a token ring scheme; token is the header of packet </li></ul>
  • 16. Modification <ul><li>Intuition: nodes should drop more packets as they die down. </li></ul><ul><li>factor = f(E_left/E_total). factor should increase from 0 (E_left= 0) to 1 (E_left = E_total) in a concave fashion. (E_left = remaining energy at node) </li></ul><ul><li>P drop (new) = P drop * factor </li></ul>How to reschedule <ul><li>Drop the packet </li></ul>

×