440 likes | 644 Views
NETW 1010. Internet of Things: Wireless Networks. Dr. Eng. Amr T. Abdel-Hamid. Fall 2013. Wireless Network De facto. Objectives of MAC protocols. Collision avoidance Energy efficiency Scalability Latency Fairness Throughput Bandwidth utilization. MAC Protocol Categories.
E N D
NETW 1010 Internet of Things: Wireless Networks Dr. Eng. Amr T. Abdel-Hamid Fall 2013
Objectives of MAC protocols • Collision avoidance • Energy efficiency • Scalability • Latency • Fairness • Throughput • Bandwidth utilization
Challenges for MAC in IOT? • Limited energy resources • Limited processing and memory capabilities • Limited packet size • Cheap encoder/decoder • Event-based networking • Inaccurate clock crystals • Bottom line: • Existing MAC protocols cannot be used?!!
The Trivial Solution • Transmit and pray • Plenty of collisions --> poor throughput at high load A B C collision
The Simple Fix Don’t transmit • Transmit and pray • Plenty of collisions --> poor throughput at high load • Listen before you talk • Carrier sense multiple access (CSMA) • Defer transmission when signal on channel A B C Can collisions still occur?
CSMA/CD (Collision Detection) • Keep listening to channel • While transmitting • If (Transmitted_Signal != Sensed_Signal) Sender knows it’s a Collision ABORT
Wireless Medium Access Control C D A B Signal power SINR threhold Distance
Wireless Media Disperse Energy A cannot send and listen in parallel C D A B Signal power Signal not same at different locations SINR threhold Distance
Collision Detection Difficult • Signal reception based on SINR • Transmitter can only hear itself • Cannot determine signal quality at receiver B A C D
Red < Blue = collision Red signal >> Blue signal C D X A B Signal power SINR threhold Distance
Important: C has not heard A, but can interfere at receiver B C is the hidden terminal to A C D X A B Signal power SINR threhold Distance
Important: X has heard A, but should not defer transmission to Y Y X is the exposed terminal to A C D X A B Signal power SINR threhold Distance
Don’t know whether two transmissions will conflict or not C wants to transmit to D but hears B; C defers transmission to D although it won’t disturb the transmission from B to A Exposed Terminal Problem (ETP) Critical fact #1: Interference is receiver driven while CSMA is sender driven
Reason: limited transmit/sensing capabilities B can communicate with A and C A and C can not hear each other If A transmits to B & C transmits to B, collision occurs at B Hidden Terminal Problem (HTP)
IFS • Priorities are defined through different inter frame spaces • SIFS (Short Inter Frame Spacing) • Highest priority packets such as ACK, CTS, polling response • Used for immediate response actions • PIFS (PCF IFS): Point Coordination Function Inter-Frame spacing • Medium priority, for real time service using PCF • SIFS + One slot time • Used by centralized controller in PCF scheme when using polls • DIFS (DCF, Distributed Coordination Function IFS) • Lowest priority, for asynchronous data service • SIFS + Two slot times • Used as minimum delay of asynchronous frames contending for access
Problems with CSMA/CA • Hidden terminal problem • Exposed terminal problem
CSMA/CA-Avoiding Collisions Idea:allow sender to “reserve” channel rather than random access of data frames: avoid collisions of long data frames • Sender first transmits small request-to-send (RTS) packets to BS using CSMA • BS broadcasts clear-to-send CTS in response to RTS • RTS heard by all nodes • Sender transmits data frame • Other stations defer transmissions avoid data frame collisions completely using small reservation packets!
CSMA/CA with RTS/CTS • Transmitter sends an RTS (Request To Send) after medium has been idle for time interval more than DIFS • Receiver responds with CTS (Clear To Send) after medium has been idle for SIFS Then data is transmitted • RTS/CTS is used for reserving channel for data transmission so that the collision can only occur in control message • Use short signaling packets for Collision Avoidance • RTS Packet (Request To Send, 20 Bytes) • A sender requests the right to send from a receiver with a short RTS packet before it sends a data packet • CTS Packet (Clear To Send, 16 Bytes) • The receiver grants the right to send as soon as it is ready to receive They contain (Sender Address, Receiver Address, Packet Size)
Hidden terminal problem • A sends RTS • B sends CTS • C overhears CTS • C inhibits its own transmitter • A successfully sends Data to B
Exposed terminal problem • B sends RTS to A (overheard by C) • A sends CTS to B • C cannot hear A’s CTS • C assumes A is either down or out of range • C does not inhibit its transmissions to D
Time is divided into beacon intervals Each beacon interval begins with an ATIM window If host A has a packet to transmit to B, A must send an ATIM Request to B during an ATIM Window If a host does not receive an ATIM Request during an ATIM window, and has no pending packets to transmit, it may sleep during rest of the beacon interval Power Saving in 802.11 Ad hoc Mode
S-MAC: Contention based protocols • Problem: “Idle Listening” consumes significant energy • Solution: Periodic listen and sleep • During sleeping, radio is turned off • Important parameter: “duty cycle” -> • Reduce duty cycle to ~ 10% • Listen for 200ms and sleep for 1.8s • Property: High latency, low energy
S-MAC • Each node goes into periodic sleep mode during which it switches the radio off and sets a timer to awake later • When the timer expires it wakes up and listens to see if any other node wants to talk to it • The duration of the sleep and listen cycles are application dependent and they are set the same for all nodes • Requires a periodic synchronization among nodes to take care of any type of clock drift
Periodic Sleep and Listen • All nodes are free to choose their own listen/sleep schedules • To reduce control overhead, neighboring nodes are synchronized together • They listen at the same time and go to sleep at the same time -> synchronized sleep
Synchronization • SYNC packets are exchanged periodically to maintain schedule synchronization. • Synchronization period: • Period for a node to send a SYNC packet • Receivers will adjust their timer counters immediately after they receive the SYNC packet
Synchronization • Each node maintains a schedule table that stores schedules of all its known neighbors • For initial schedule: • A node first listens to the medium for a certain amount of time (at least the synchronization period) • If it does not hear a schedule (SYNC packet) from another node, it randomly chooses a schedule and broadcasts its schedule with a SYNC packet immediately • This node is called a Synchronizer • If a node receives a schedule from a neighbor before choosing its own schedule. It follows this neighbor’s schedule • Becomes a Follower
Coordinated sleeping • In a large network, we cannot guarantee that all nodes follow the same schedule. • The node on the border will follow both schedules. • When it broadcasts a packet, it needs to do it twice, first for nodes on schedule 1 and then for those on schedule 2.
Coordinated sleeping Border nodes have less time to sleep and consume more energy than others.
Collision avoidance • S-MAC is based on contention, i.e., if multiple neighbors want to talk to a node at the same time, they will try to send when the node starts listening. • Similar to IEEE802.11, i.e., use RTS/CTS mechanism to address the hidden terminal problem • Perform carrier sense before initiating a transmission
Adaptive listening feature • Reduce multi-hop latency due to periodic sleep • BASIC IDEA: Let the node which overhears its neighbor’s transmission stay awake • Both neighbors will learn about how long the transmission is from the duration field in the RTS and CTS packets • They are able to adaptively wake up when the transmission is over • Reduce latency by at least half (e.g., CTS of 2 is heard by 3 also, 3 remains awake!!)
Reservation based protocols • Reservation based • First reserve a transmission slot • Then transmit • Traffic Adaptive Medium Access (TRAMA) • Totally Collision free