Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Medium Access Control in Wireless Networks

Similar presentations


Presentation on theme: "Distributed Medium Access Control in Wireless Networks"— Presentation transcript:

1 Distributed Medium Access Control in Wireless Networks
Nitin Vaidya © 2009

2 Medium Access Protocol Performance
Depends on Channel properties Physical capabilities Single interface? One packet at a time? One channel at a time? Antenna diversity? Assume single interface, single channel, single antenna, one packet at a time, unless specified

3 Assumption Low delay-capacity product Propagation delay small compared
to transmission time

4 Distributed Medium Access Protocols
Coordinated access Each host is somehow “scheduled” to transmit in certain intervals of time Schedule chosen to avoid excessive interference between simultaneous transmissions Random access Each host “randomly” decides when to transmit

5 “Basic” Medium Access Control (MAC) Protocol
Based on Aloha Simple rule: Transmit packet immediately (if not transmitting already)

6 Basic Protocol Shortcomings No provision for reliability
No detection of “collisions”

7 Basic Protocol

8 Slotted Access Synchronized slot boundaries: Window of vulnerability = 1 slot

9 Slotted Access Slot size = L (packet duration) if propagation delay ignored & slot boundaries synchronized With propagation delay ≤  , slot size L +  , to ensure window of vulnerability of 1 slot With clock skew ≤  , slot size L +  + , to ensure window of vulnerability of 1 slot

10 Back-of-the-Envelope Analysis
Slotted scheme with synchronized slots Access probability p = probability that a host will (independently) transmit in a given slot For optimal throughput, p = 1/n

11 Slotted Aloha When n   , optimal throughput approaches 1/e = 0.36

12 Each slot overlaps with 1 or 2 slots of other hosts
Unsynchronized Slots Each slot overlaps with 1 or 2 slots of other hosts

13 Unsynchronized Slots Assume that each slot overlaps with exactly 2 slots of other hosts Access probability = p Throughput = Optimal p = 1/(2n-1) Optimal throughput for n   = 1/(2e)

14 Lower curve for unsynchronized slots
Numerical Results Lower curve for unsynchronized slots

15 Basic Aloha Slotted access improves performance by reducing the window of vulnerability Alternative: Reduce collisions using carrier sensing

16 Carrier Sense Multiple Access (CSMA)
Listen-before-you-talk A host may transmit only if the channel is sensed as idle

17 Energy Detection A potential implementation
sample the signal periodically sum the square of the sampled values if sum exceeds a threshold, signal present Requires non-zero delay to correctly sense the channel status Another possibility: Detect transition from idle to busy, and vice-versa, instead of presence of a signal

18 Energy Detection – Approximation
Implementation using Carrier Sense (CS) threshold Pcs If received power < CS threshold  Channel idle Else channel busy

19 Energy Detection – Approximation
Energy detection accuracy also affected by noise & interference Energy detection non-deterministic due to presence of noise The approximation assumes that if received signal exceeds Pcs, the transmission will always be sensed

20 Feature Detection Detect a “well-known” waveform to know if a transmission is taking place Preamble Trade-off between complexity & accuracy of sensing with energy detection and feature detection Our discussion will assume the approximate characterization of energy detection

21 Carrier Sense Multiple Access (CSMA)
D perceives idle channel although A is transmitting A B C D distance power D’s CS Threshold

22 Carrier Sense Multiple Access (CSMA)
D perceives busy channel when A transmits D B C A distance power D’s CS Threshold

23 Trade-Off Large carrier sense threshold  More transmitters
 Greater spatial reuse & more interference Trade-off between spatial reuse and interference

24 Impact of CS Threshold on Interference
Suppose C transmits even though A is already transmitting A B C D

25 Impact of CS Threshold on Interference
Suppose C transmits even though A is already transmitting A B C D

26 Hidden Terminals

27 Hidden & Exposed Terminals
Collisions may occur despite carrier sensing Smaller carrier sensing can help But increases the incidence of exposed terminals ?

28 Hidden & Exposed Terminals
Cannot eliminate all collisions using carrier sensing Trade-off between hidden and exposed terminals Optimal carrier sense threshold function of network “topology” and traffic characteristics

29 Collision Detection Ethernet uses carrier sensing & collision detection (CSMA/CD) Transmitter also listens to the channel Mismatch between transmitted & received signal indicates mismatch Stop transmitting immediately once collision is detected  Reduces time lost on a collision

30 Collision Detection in Wireless Networks
Receiving while transmitting: Received signal dominated by transmitted signal Collision occurs at receiver, not the transmitter  Collision detection difficult at the transmitter without feedback from the receiver

31 Collision Avoidance Use mechanisms to reduce occurrence of collisions
For collisions to occur, transmissions must overlap in time Two types of overlapping transmissions Simultaneous Concurrent

32 Parameter  Worst-case propagation delay 
Worst-case carrier sensing delay   =  +  A Signal sensed C

33 Simultaneous Transmissions
Transmission by C in this interval cannot be prevented by carrier sensing = Simultaneous transmissions

34 Concurrent Transmissions
Overlapping transmissions, which are not simultaneous, are said to be concurrent Simultaneous and concurrent transmissions desirable if they do not cause too much interference to ongoing transmissions Trade-off between spatial reuse & interference

35 Reliability Forward error correction Retransmissions
Stop-and-wait protocol Send a packet Start timeout interval, and Wait for Ack If no Ack within timeout interval, retransmit

36 Retransmission Protocol

37 Overhead of Collisions
Function of Cost of collisions Frequency of collisions

38 A Mechanism to Reduce Collision Cost
“Reserve” the wireless channel before transmitting data Send short control packets for reservation Collision may occur for control packets, but they are short  lower collision cost Once channel reserved, data transmission (hopefully) reliable

39 RTS-CTS Control Packets
RTS = Request-to-Send CTS = Clear-to-Send

40 RTS-CTS Exchange A sends RTS to B
Duration of proposed transmission specified in RTS B responds with CTS to acknowledge receipt of RTS Host A sends data to B on receipt of CTS Other hosts overhearing RTS keep quiet for duration of proposed transmission

41 RTS-CTS Better to use RTS-CTS if …
… data packets large , collisions frequent

42 RTS-CTS RTS-CTS reduce collision cost due to simultaneous transmissions If data packets too small, sending RTS-CTS not beneficial A possible implementation: Send RTS-CTS only for data packets with size > RTS-threshold

43 Solutions for Hidden Terminals
Busy-tone Virtual carrier sensing Carrier sensing mechanism discussed earlier will be referred to as physical carrier sensing, to differentiate with virtual carrier sensing

44 Busy-Tone Mechanism Host A transmits data to B
Host B transmits busy-tone while receiving the data Host C defers transmission if received busy-tone power exceeds threshold Pcs

45 Busy-Tone Mechanism If C transmits even though B is sending a busy-tone, then

46 Busy-Tone Mechanism Interference bound = Pcs , independent of path gain between A and C Unlike with physical carrier sensing Sensing threshold for busy-tone Pcs is a good bound on the interference  Interference can be controlled by controlling Pcs

47 Multiple Interferers To allow k interferes, Pcs should be smaller by a factor of k

48 Issues with Busy-Tone Mechanism
Overhead of spectrum used for busy-tone Differences in channel gain of data and busy-tone channel

49 Issues with Busy-Tone Mechanism
Reliability of Ack packets Busy-tone from host B will protect reception of data at host B. To protect Ack sent to host A: Host A may also send a busy-tone during the reception of Ack What about the short interval between completion of data transmission and start of Ack transmission? Other hosts should sense data and busy-tone channel, and stay idle long enough after the channels go idle to allow for the Ack

50 Issues with Busy-Tone Mechanism

51 Virtual Carrier Sensing
RTS specifies duration of transmission CTS also includes the duration Any host hearing RTS or CTS stay silent as shown RTS CTS

52 Virtual Carrier Sensing
Host C may not receive RTS from A and still cause collision with Ack reception at host A Assume SINR-threshold model  SINR  necessary for reliable delivery

53 SINR for RTS reception at C is upper bounded as
If C transmits while A is receiving an Ack from B, SINR for Ack reception at A is upper bounded as RTS CTS

54 It is possible to find path gains for which we have
and

55 Virtual Carrier Sensing
C’s silent interval below is not adequate to ensure reliable Ack reception at A Similarly, D’s silent interval not adequate to ensure reliable data reception at B RTS CTS

56 Virtual Carrier Sensing - Modification
Greater protection from interference Reduce book-keeping with multiple nearby transmitters

57 “Space Reserved” by Virtual CS
RTS RTS Not circular in reality

58 Physical & Virtual CS Physical carrier sensing (PCS) & virtual carrier sensing (VCS) may be used simultaneously Channel assumed idle only if both PCS and VCS indicate that the channel is idle

59 p-Persistence A dialog may consist of Data Data-Ack RTS-CTS-Data-Ack
Dialog begins at a valid transmission opportunity

60 p-Persistence Recall: Slotted access used slot size = packet size
Exploiting physical carrier sensing to reduce slot size Goal: Choose slot size to minimize number of opportunities for another host to interfere

61 p-Persistence Slot size Back-of-the-envelope analysis:
Consider n nodes that can sense each other p = access probability for each slot

62 Duration required for a transmission or collision

63 Efficiency of channel access

64

65 Unsynchronized Slots A sub-optimal approach

66 Backoff Intervals Bounded number of valid opportunities skipped before transmitting a packet Example: Choose backoff interval uniformly in range [Bmin, Bmax] Initialize a counter by this value Decrement counter after each slot in which channel detected idle On a valid opportunity, if counter 0, transmit

67 Responding to Packet Loss
Packet loss may occur due to Collision from a simultaneous transmission Other causes (e.g., concurrent transmission) To reduce collisions with simultaneous transmissions, access probability should be reduced May be achieved by increasing the window over which backoff interval is chosen Exponential backoff : [0,cw-1]  [0,2cw-1]

68 IEEE 802.11 Distributed Coordination Function (DCF)
Physical & virtual carrier sensing (RTS-CTS) Contention window (cw) : Backoff chosen uniformly in [0,cw-1] Exponential backoff after a packet loss Contention window reset to CWmin on a success

69 IEEE DCF

70 IEEE 802.11 Wireless MAC Distributed and centralized MAC components
Distributed Coordination Function (DCF) Point Coordination Function (PCF) DCF suitable for multi-hop ad hoc networking DCF is a Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA) protocol Inter-frame spacing: SIFS & DIFS

71 IEEE 802.11 DCF Uses RTS-CTS exchange to avoid hidden terminal problem
Any node overhearing a RTS or CTS cannot transmit for the duration of the transfer Uses ACK to achieve reliability Any node receiving the RTS cannot transmit for the duration of the transfer To prevent collision with ACK when it arrives at the sender When B is sending data to C, node A will keep quite A B C

72 IEEE 802.11 Pretending a circular range RTS = Request-to-Send RTS A B
F Pretending a circular range

73 IEEE 802.11 NAV = remaining duration to keep quiet
RTS = Request-to-Send RTS A B C D E F NAV = 10 NAV = remaining duration to keep quiet

74 IEEE CTS = Clear-to-Send CTS A B C D E F

75 IEEE CTS = Clear-to-Send CTS A B C D E F NAV = 8

76 IEEE DATA packet follows CTS. Successful data reception acknowledged using ACK. DATA A B C D E F

77 IEEE ACK A B C D E F

78 IEEE Reserved area ACK A B C D E F

79 Backoff Interval When transmitting a packet, choose a backoff interval in the range [0,cw-1] cw is contention window Count down the backoff interval when medium is idle Count-down is suspended if medium becomes busy When backoff interval reaches 0, (optionally) transmit RTS

80 DCF Example B1 = 25 B2 = 20 B1 = 5 B2 = 15 data wait data wait B2 = 10
B1 and B2 are backoff intervals at nodes 1 and 2 IFS ignored in figure. RTS-CTS-Ack not shown. cw = 32

81 Backoff Interval The time spent counting down backoff intervals is a part of MAC overhead Choosing a large cw leads to large backoff intervals and can result in larger overhead Choosing a small cw leads to a larger number of collisions (when two nodes count down to 0 simultaneously)

82 Since the number of nodes attempting to transmit simultaneously may change with time, some mechanism to manage contention is needed IEEE DCF: contention window cw is chosen dynamically depending on collision occurrence

83 Binary Exponential Backoff in DCF
When a node fails to receive CTS in response to its RTS, it increases the contention window cw is approximately doubled (up to an upper bound) When a node successfully completes a data transfer, it restores cw to Cwmin cw follows a sawtooth curve

84 Contention Resolution Overhead
Channel contention resolved using backoff Nodes choose random backoff interval from [0, CW] Count down for this interval before transmission Overhead (time not used for reliable data): Backoff, collisions, RTS/CTS, Ack Random backoff RTS/CTS Data Transmission/ACK


Download ppt "Distributed Medium Access Control in Wireless Networks"

Similar presentations


Ads by Google