Professional Documents
Culture Documents
Random Access
Dr. Stavros Toumpis
Telecommunications Research Center Vienna
Nodes must decide when to access the channel, i.e., transmit. Two conicting targets: Collisions of packets must be avoided. Bandwidth must not be underutilized. Therefore, a balance is needed. This is the task of the MAC protocol.
2
Random access is preferable when: trac is bursty (e.g., data). topology changes fast or is unknown. Transmission scheduling is preferable when: trac is periodic (e.g. voice trac). topology changes slowly. quality guarantees are needed. Hybrid protocols are adaptable to the trac/mobility conditions.
6 5
Nodes monitor the channel (i.e., there is channel sensing). A node with a packet transmits only if it perceives an idle channel. If a node with a packet perceives a busy channel, it waits for the channel to become available, then waits for a random time interval (to avoid collisions). If there is a collision, packet is backlogged for a random time interval. Do humans use CSMA?
CSMA Example
A,B,C,D are along a straight line, and within range of each other. A CARRIER SENSING
B C D
B D
DATA FOR C
DATA FOR C
A
Vulnerable window
Packet Arrivals
Time
CSMA works great in totally connected networks with small propagation delays. (It works perfectly in totally connected networks with zero propagation delays.)
9
Nodes sense the channel before and after transmitting. If a collision is detected, all transmitters stop immediately. Collisions are detected much earlier, and do not cost a lot of bandwidth. Ethernet is based on CSMA/CD. Unfortunately, CSMA/CD is not practical in wireless networks, because it is very hard to transmit and listen at the same time. So we can not have wireless Ethernet.
10
CSMA/CD Example
A,B,C,D are along a straight line, and within range of each other.
A B C D
B
Backoff
CARRIER SENSING
Packet Arrivals
Vulnerable window
Time
11
It is possible that a node sense the channel to idle, but should not transmit (the hidden terminal problem). It is possible that a node senses the channel busy, but should transmit (the exposed terminal problem).
1) Hidden Terminal Problem B A D C A 2) Exposed Terminal Problem B D C
(In the examples, only nodes connected by a straight line can listen to each others transmissions.)
12
Receiver transmits a busy tone in another channel (control channel). Nodes sense the control channel before transmitting.
1) Hidden Terminal Problem B A D C
BLUE: DATA CHANNEL RED: CONTROL CHANNEL
13
BTMA Example
A B C D
CARRIER SENSING
DATA BUSY TONE
BT SENSING
Time
Vulnerable window
(Only nodes connected by a straight line can receive each others signals.)
14
Disadvantages of BTMA
Some bandwidth is sacriced, and nodes must be full-duplex (harder than half-duplex). If all receivers transmit BT, some transmitters are unnecessarily stopped. If only intended receiver transmits BT, there are collisions elsewhere.
In rst case, C can not transmit a packet to A (he should have been allowed). In second case, B transmits a packet to C and there is collision (bandwidth is wasted).
15
3) DATA B A DATA D C
One way to think about it: BTMA in time domain. ACK packet exists only in some incarnations (for example IEEE 802.11).
16
RTS
CTS
CS VCS
CS
Nodes keep track of CTS packets they received: virtual carrier sense.
Vulnerable window
DATA
VCS
CS
VCS
ACK CS
Time
17
Backo Mechanism
Motivation: When channel becomes available, maybe more than one nodes have packets to transmit. If all of them transmit, there will be collisions. Solution: nodes backo for random times. Each selects a random number for backo counter between 1 and the contention window CW. While channel is idle, nodes reduce backo counter. First one to hit 0 transmits. The rest freeze their counters.
18
B 1=10 =0 B 1 COUNT X COUNT DOWN FREEZE COUNTER DOWN DATA B 2 =25 B 2=20 B 2=0 COUNTB 2=15 FREEZE Y COUNT DOWN DATA DOWN COUNTER
B 1=30 B 1=10
Time
19
Congestion Control
The contention window size should reect the level of congestion in the network: If there is little trac, the contention window should be small. If there is a lot of trac, the window should be large to reduce collisions. The solution of IEEE 802.11: If a node transmits but fails, it doubles the contention window, until it reaches CWmax. If a node transmits and succeeds, it resets the contention window to CWmin. The solution of MACAW: Multiplicative Increase, Linear Decrease (MILD). The contention window does no change very fast.
20
Assume heavy trac: all nodes need the channel all of the time. But red and blue transmissions cannot coexist (see previous slide). In 4-node example, if A has the channel, D can not get it back. We have long-term fairness but not short-term fairness. In 6-node example, C can only initiate transmission if both A and F are silent at the same time. Backo algorithm makes matters worse! Nodes that fail in handshake double their contention window.
21
Add extra control packets (Bharghavan et al., 1994 [6]): Receivers invite transmitters when they sense that the channel becomes available. Works great in 4-node example. Does not work in 6-node example. Change backo algorithm (Ozugur et al., 1999, [8]): Nodes that have more than their fair share of the channel use greater larger backo counter. But what is a fair share of the channel? There is no nice solution on the MAC layer. Routing layer should help.
22
Performance of [8]
Fairness Index is ratio of maximum to minimum throughput. Fairness is still not achieved, and bandwidth is lost.
23
Bandwidth is divided in 4 channels: Data channel (for DATA packets). Control Channel (for RTS and CTS packets). Channel for transmitting BTr (receiver busy tone). Channel for transmitting BTt (transmitter busy tone).
B
LEGEND
RTS/CTS DATA BTt BTr
25
Evaluation of DBTMA
Disadvantages: Complicated. Bandwidth is sacriced for control channel and busy tone channels. Advantages: Data packets never collide (this is possible with CSMA/CA, and very wasteful). Articial restrictions on transmissions of CSMA/CA are lifted:
1) Receivers can be neighbors B A D C A 2) Transmitters can be neighbors B D C
26
Transmitter receiver pairs must use the same power because communication must be bidirectional (setting (A)). Dierent pairs must use same power, otherwise strong transmitters kill weak transmitters (setting (B)).
(A)
(B)
27
28
Same as previous, but now nodes transmit power spikes during the data packets. Throughput same as IEEE 802.11: transmitting with maximum power ... each interferer appears to be
29
T T
100
R
CTS Radius Interference Radius
R
CTS Radius
11
Interference Radius
Anyone in outer ring will not hear CTS but can destroy the transmission
(Minimum SINR required for successful reception: T = 10.) PCM also suers from this! Problem is typically masked by poor physical layer mode.
30
nonFIFO
C A B D C A D C A B D C
Dropping the FIFO requirement can lead to a tighter packing of transmissions. Problem is typically masked by simple trac models.
31
Other Problems
Control packets might collide. Nodes must decide a power threshold for declaring the channel busy. Placing the threshold too high will prohibit some transmissions that could take place. Placing it too low will not protect suciently other transmissions. No matter where you place the threshold, mistakes will be made. The problem is that you are sensing at the wrong place (i.e., the transmitter, not the receiver.)
32
RTS CTS DATA
Time
STEP 2 (CTS) B A D C
33
FRAME n1
FRAME n
FRAME n+1
CONTENTION PERIOD
DATA SLOT
RTS m
CTS m
RTS 1
CTS 1
RTS 2
CTS 2
34
Initially, all nodes with packets contend. Nodes that are being unsuccessful: Either back o (so others will have a better chance). Or remain in contention, but pick a new destination (if such exists). Nodes that succeed, use the rest of the slots for power control. Energy is conserved. Interference is reduced for the rest.
35
An example network
100 y (m)
1 2 3 6
50 100
12
5 8
10 11
50
7 9
150
0 0
200 x (m)
250
300
350
400
Reception is successful as long as the SINR is greater than a threshold T = 10 dB. All transmitters transmit with rate R = 1 Mbps. Maximum transmitter power is Pmax = 0.3 W. Power gains decay exponentially with distance, with decay exponent = 4, and there is no fading: Gij = Kdij .
Nodes that can communicate directly in the absence of interference are connected by a line in the gure.
37
Discard weak links. SNR in the absence of interference is below 10 (for RP-10), 30 (for RP-30), or 120 (for RP-120). Keep the rest of the links. Use them to construct minimum hop routes. Dierent tradeos: RP-10 needs few hops. RP-120 is robust to interference. RP-30 is balanced.
38
Routing Tables
RP10
3 6 1 2 6 1 2 6 7 9 8 7 9 8
1 2 7 9
12 10
5 4
11
RP30
3
12 10
5 4
11
RP120
3
12 10
5 4
11
39
CTS 1
RTS 1
3
6
& & '& '& ' '
6
B B CB CB
10
C C
Contending:
D D ED ED E E
9
P P QP QP
7
$ $ %$ %$ Q % %
9
7
@ @
10
A@
A@
10
Q
Locked:
0 10
10 12
12
( ( )( )( 0 ) ) 10
98
98
8
1 1
8
6 6 76 76 7 7
10
10 10
H H
10
Silent:
F F GF GF #
IH
IH
5
! ! #
5
11
11
"
"
"
"
"
"
10
4
2 2 32 32 3 3
4
4 4 54 54 5 5
40
CTS 2
RTS 2
3
10
10
6
$ $ %$ %$ % %
6
0 0 10 10 1 1
Contending:
2 2 32 32 3 3
9
8 8 98 98
7
9 B B
9
7
5
10
9
Locked:
12
CB CB C C
12
@ @ A@ A@ A A
8
10 10
6 6
8
7 10
Silent:
4 4 54 54 #
76
76
5
! ! #
5
11
11
"
"
"
"
10
" "
10
4
& & '& '& ' '
4
( ( )( )( ) )
41
CTS 3
RTS 3
3
10
6 2
6 1 2
Contending:
( ( )( )( ) )
9
4 4 54 54 5 5
7
8 8
9
7
4
6 6
Locked:
12
98 98 9 9
12
76 76 7 7
8
10
2 2
8
6 10
Silent:
0 0 10 10 #
32
32
5
! ! #
5
11
11
"
"
"
"
10
" "
10
4
$ $ %$ %$ % %
4
& & '& '& ' '
42
(a)
(b) 0.4
(a) PBOA with 10 slots. (b) PBOA with 5 slots. (c) PBOA with 2 slots.
0.3
0 0
0.2
0.8
With more slots, nodes should be more persistent. Intuition: Backing o should be progressive over all slots.
43
At the start of the i-th RTS minislot a node A will transmit an RTS packet: If it transmitted an RTS in the previous RTS minislot and heard a CTS packet in reply. Or all of the following conditions are satised: A did not transmit a CTS packet in the previous minislot pair. The received power in the previous CTS minislot did not exceed a threshold PT . If A has not decoded an RTS in the previous RTS minislot, it must have a non-empty queue. If A has decoded an RTS transmitted from a node B in the previous RTS minislot, it must have a packet for a node C such that C can decode the packet in the presence of interference from node B. A must perform a biased coin toss, with probability p, and succeed. At the start of the i-th CTS minislot, whoever received an RTS packet addressed to him, replies with a CTS packet. At the start of the data slot, whoever received a CTS packet at the last CTS minislot transmits a data packet.
45
CTS 1
RTS 1
3
6 6
6
P P QP QP Q Q
6
76 76 7 7
2
1
9
# " # "
7
F F
7
8 8
10
98 98
10
"
"
12
H H IH IH I I
12
54 54 5 5
8
D D ED ED E E
8
10 10 1 1
10
10
@ @ A@ A@ A A
5
5
& &
'&
'&
11
11
'
'
4
B B CB CB C C
4
32 32 3 3
46
CTS 2
RTS 2
3
10
6 6
10
6
P P QP QP Q Q
6
76 76 7 7
2
1
9
# " # "
7
F F
7
8 8
10
98 98
10
"
"
12
H H IH IH I I
12
54 54 5 5
8
D D ED ED E E
8
10 10 1 1
10
10
@ @ A@ A@ A A
5
5
& &
'&
'&
11
11
'
'
4
B B CB CB C C
4
32 32 3 3
47
CTS 3
RTS 3
3
10
6 6
10
6
P P QP QP Q Q
6
76 76 7 7
2
1
9
# " # "
7
F F
7
8 8
10
98 98
10
"
"
12
H H IH IH I I
12
54 54 5 5
8
D D ED ED E E
8
10 10 1 1
10
10
@ @ A@ A@ A A
5
5
& &
'&
'&
11
11
'
'
10
10
2 2
4
B B CB CB C C
4
32 32 3 3
48
0.5
0.4
(g) (d)
0.8
0.6
4,8
0.3
(g)
(e)
0.2 0.1
0.4
0.2
0 0
0.1
0.2
r3,12
0.3
0.4
0.5
0.6
RP10
RP120
(a) Perfect power control. (b) ON/OFF power control. (c) Optimal PC. (d) ON/OFF PC.
Energy Eciency
18 16
(a) IEEE 802.11, RP-10. (b) PBOA, RP-10. (c) PRUA, RP-10. (d) IEEE 802.11, RP-30. (e) PBOA, RP-30. (f) PRUA, RP-30. (g) IEEE 802.11, RP-120. (h) PBOA, RP-120. (i) PRUA, RP-120.
14 12 10 8 6 4 2 0 0 0.1 0.2
(i)
(e)
Throughput, T (Mbps)
50
1000 900 800 700 Delay, D (msec) 600 500 400 300 200 100 0 0 0.1 0.2 0.3 0.4 Throughput, T (Mbps) (f) 0.5 0.6 (c) (e) (a) (b) (d)
(a) IEEE 802.11. (b) PBOA. (c) PRUA. (d) Uniform capacity, ON/OFF power control. (e) Uniform capacity, Optimal power control. (f) Bound on delay due to packetizing of data.
51
0.55 0.5 Uniform Capacity, Cu (Mbps) 0.45 0.4 0.35 0.3 0.25 0.2 0.15 (e)
(a)
(d)
(f)
(b)
(a) PBOA, RP-10. (b) PBOA, RP-30. (c) PBOA, RP-120. (d) PRUA, RP-10. (e) PRUA, RP-30. (f) PRUA, RP-120.
(c)
10 15 Minislot pairs, m
20
25
52
CSMA/CA PRUA
IdealPCM
0 3.5 4 4.5 Throughput, T (Mbps) 5
PBOA
5.5
Ideal-PCM is CSMA/CA with the following modication: Nodes only transmit with the minimum power required for successful reception. Interferers seem to transmit with maximum power.
53
Network Model: Nodes connected by lines can communicate directly, the rest do not interfere. Receivers can decode at most one packet at a time (any two partially overlapping packets will both be destroyed). Transmitter rate: R = 1 Mbps. Maximum number of simultaneous transmissions s: In theory: s = 4. With CSMA/CA: s = 2. With PBOA or PRUA: s = 4.
54
3 4
Uniform capacity calculation: Simultaneous transmissions: s = 4. Average number of hops: h = 16 7. s =7 Uniform capacity is Cu = R h 4 Mbps = 1.75 Mbps. Uniform capacity of MAC protocols (by simulation): CSMA/CA Cu = 0.635 Mbps. PBOA Cu = 1.05 Mbps. PRUA Cu = 1.145 Mbps.
To achieve capacity, arbitrarily distant nodes must coordinate. Impossible with distributed MAC protocols!
55
Conclusions
We studied random access protocols: Before CSMA/CA (i.e. RTS/CTS handshake) CSMA/CA (very important due to its use in IEEE 802.11) After CSMA/CA Emphasis on why things do not work, how we try to make them work, and how we always fail in some way or another. Capacity is lost in many dierent places: Power control. Routing protocol. Queuing discipline. (Distributed) Medium Access Control.
56
References
[1] L. G. Roberts, Aloha packet system with and without slots and capture, Stanford, CA: Stanford Research Institute, Advanced Research Projects Agency, Network Information Center. [2] L. Kleinrock and F. A. Tobagi, Packet switching in radio channels: Part ICarrier Sense Multiple Access models and their throughput-delay characteristics, IEEE Trans. Commun., vol. 23, no. 12, pp. 14001416, Dec. 1975. [3] R. M. Metcalfe and D. R. Boggs, Ethernet: distributed packet switching for local computer networks, Comm. of the ACM, vol. 19, no. 5, pp. 395404, July 1976. [4] F. A. Tobagi and L. Kleinrock, Packet switching in radio channels: Part IIthe hidden terminal problem in carrier sense multiple-access and the busy tone solution. IEEE Trans. Commun., vol. 23, no. 12, pp. 14171433, Dec. 1975. [5] P. Karn, MACA: A new channel access method for packet radio, in Proc. CNC, vol. 1, London, Ontario, Canada, Sep. 1990, pp. 134140. [6] V. Bharghavan, A. Demers, S. Shenkar, and L. Zhang, MACAW: A media access protocol for wireless LANs, in Proc. ACM SIGCOMM, London, UK, Aug. 1994, pp. 212225. [7] Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specication, IEEE Std. 802.11. [8] T. Ozugur, M. Naghshineh, P. Kermani, and J. A. Copeland, Fair media access for wireless LANs, in Proc. IEEE GLOBECOM, vol. 1B, Rio De Janeiro, Brazil, Dec. 1999, pp. 570579. [9] Z. J. Haas, J. Deng, and S. Tabrizi, Collision-free medium access control scheme for ad-hoc networks, in Proc. IEEE MILCOM, vol. 1, Atlantic City, NJ, Nov. 1999, pp. 276280.
57
[10] Z. J. Haas and J. Deng, Dual busy tone multiple access (DBTMA) a multiple access control scheme for ad hoc networks, IEEE Trans. Commun., vol. 50, no. 6, pp. 975985, June 2002. [11] S. Agarwal, S. Krishnamurthy, R. H. Katz, and S. K. Dao, Distributed power control in ad hoc wireless networks, in Proc. IEEE PIMRC, 2001. [12] E.-S. Jung and N. H. Vaidya, A power control MAC protocol for ad hoc networks, in Proc. ACM Mobicom, Atlanta, GA, Sep. 2002, pp. 3647. [13] Z. Tang and J. J. Garcia-Luna-Aceves, A protocol for topology-dependent transmission scheduling in wireless networks, in Proc. IEEE WCNC, vol. 3, New Orleans, LA, Sep. 1999, pp. 13331337. [14] S. Toumpis and A. J. Goldsmith, Performance, optimization, and cross-layer design of media access control protocols for wireless ad hoc networks, in Proc. IEEE ICC, Anchorage, AK, May 2003, pp. 22342240. [15] A. Colvin, CSMA with collision avoidance, Computer Communications, vol. 6, no. 5, pp. 227235, May 1983. [16] B. P. Crow, I. Widjaja, J. G. Kim, and P. T. Sakai, IEEE 802.11 Wireless Local Area Networks, IEEE Commun. Mag., vol. 35, no. 9, pp. 116126, Sep. 1997. [17] D. P. Bertsekas and R. Gallager, Data Networks, 2nd ed. 1991. Englewood Clis, NJ: Prentice Hall, Dec.
58