430 likes | 564 Views
Channel Access Protocols for Ad Hoc Networks. Instructor: Carlos Pomalaza-Ráez Fall 2003 University of Oulu, Finland. Media Access Control (MAC). Protocols that enable multiple users to share a finite amount of frequency and time resources
E N D
Channel Access ProtocolsforAd Hoc Networks Instructor: Carlos Pomalaza-RáezFall 2003University of Oulu, Finland
Media Access Control (MAC) • Protocols that enable multiple users to share a finite amount of frequency and time resources • Needed for efficient operation and good performance for wireless systems • An important goal is to minimize overhead while maximizing overall network capacity • Ad Hoc networks have no pre-existing infrastructure or centralized administration, e.g. base stations, and as such they require distributed MAC protocols
Wireless MAC issues • Half-duplex operation • Time varying channel • reflection • diffraction • scattering received signalpower varies asfunction of time multipathfading • Burst channel errors • bit-error rate can be as high as 10-3 or higher • packet loss can be minimized by using smaller packets, forward error correcting codes and retransmission methods such as acknowledgement packets
Wireless MAC issues • Location dependent carrier sensing • Hidden nodes. A hidden node is one that is within the range of the intended destination but out of range of the sender • Exposed nodes. An exposed node is one that is within the range of the sender but out of range of the destination • Capture. This event occurs when a receiver can correctly receive a transmission from one of two (or more) simultaneous transmissions, all within its range, because the signal strength of the correctly received signal is much higher than strength of the other signals
Hidden and Exposed Node Problems Hidden node • A is transmitting to B • C is out of range of A and is unaware of the transmission • If C transmits to B it will cause a collision at B Exposed node • B is transmitting to A • C wants to transmit to D • C senses transmission & declines even if its transmission will not cause any collision at A
Capture Problem If A and C transmitsimultaneously to B then the signal power of C, received at B, is higher than the one from A (because dCB < dAB) and there is a good probability that C’s signal can be correctly decoded in the presence of A’s transmission dAB B A dCB C D This capture of C’s signal can improve protocol performance, but it results in unfair sharing of the channel with preference given to nodes closer to the receiver. Wireless MAC protocols need to ensure fairness under such conditions
Classification of MAC Protocols Wireless MAC protocols can be classified into two categories, distributed and centralized, according of the type of network architecture for which they have been designed. Protocols can be further classified, based on the mode of operation, into random access protocols, guaranteed access protocols, and hybrid access protocols Wireless MAC protocols DistributedMAC protocols CentralizedMAC protocols Randomaccess Randomaccess Guaranteedaccess Hybridaccess Since we are interested in Ad Hoc networks we will focus our discussions on distributed type protocols
Performance Metrics • Delay – Average time spent by a packet in the MAC queue. It is a function of protocol and traffic characteristics • Throughput – Fraction of the channel capacity used for data transmission • Fairness – A fair MAC protocol does not exhibit preference to any single node when multiple nodes are trying to access the channel • Stability – A stable system can handle instantaneous loads that are greater than the maximum sustained load • Robustness against Channel Fading • Power Consumption – Most wireless devices have limited battery power, it is then important to design MAC protocols that have power saving features • Support for multimedia – Protocols need to treat packets from various applications based on their delay constraints. Common methods are the use of access priorities and scheduling
Distributed MAC Protocols These protocols are based on carrier sensing and collision avoidance Carrier sensing refers to listening to the physical medium to detect anyongoing transmission Collision avoidance techniques must be implemented to minimize the probability of collisions. Two mechanisms can be used: • Collision Avoidance with Out-of-Band Signaling such as the one used in the BTMA (busy tone multiple access) protocol → F.A. Tobagi and L. Klienrock, “Packet Switching in Radio Channels: Part II – The Hidden Terminal Problem in Carrier Sense Multiple Access and the Busy Tone Solution,” IEEE Trans. Commun., COM-23, 1975, pp. 1417-1433 • Collision Avoidance with Control Handshaking such as one used in MACA (multiple access with collision avoidance) protocols → P. Karn, “MACA – A New Channel Access Method for Packet Radio.” ARRL/CRRL Amateur Radio 9th Computer Networking Conf., 1990
Distributed Foundation Wireless MAC • It is a derivative of the MACA protocol • It is the basic access protocol of the IEEE 802.11 standard • Consists of a four-way exchange, RTS-CTS-DATA-ACK DIFS SIFS Sender node RTS DATA SIFS SIFS Receiver node CTS ACK NAV(DATA) NAV(CTS) NAV(RTS) Others NAV- Network Allocation Vector
Distributed Foundation Wireless MAC To give preference to a stations trying to send and ACK different waiting intervals are specified: • DIFS (distributed inter frame space) → a node must sense channel idle for DIFS interval before making an RTS attempt • SIFS (short inter frame space)→ a node has to sense channel idle for SIFS before sending an ACK. SIFS < DIFS • NAV (Network Allocation Vector): Packets contain time field (NAV) to indicate duration of current transmission. • All nodes that hear RTS/CTS back off NAV amount (time) before sensing the channel.
Performance Analysis of 802.11 DCF • Assumptions • Fixed number of stations, each always having a packet available for transmission (saturation condition) • Each packet needs to wait for random backoff time before transmitting • Constant & independent collision probability for each transmitted packet • Ideal channel condition (no hidden terminals and capture) • Notation • b(t) = stochastic process representing the backoff time counter • CWmin = minimum contention window = W • m = maximum backoff stage → CWmax = 2mW • Wi = 2iW, where i (0,m) is called “backoff stage” • s(t) = stochastic process representing the backoff stage at time t • p = probability of each transmitted packet being collided
802.11 DCF Example {s(t9),b(t9)} = {1,7} {s(t0),b(t0)} = {0,3} SIFS SIFS DIFS DIFS BO=5 Station A BO=3 BO=4 BO=7 RTS Busy channel DATA RTS t9 t0 t1 t2 t3 …... t4 t8 Station B CTS ACK collision DIFS DIFS BO=4 Others Busy channel NAV(RTS) RTS RTS BO=7 BO=4 BO=2 Busy channel NAV(CTS) ACK Station A has a packet to transmit to station B. At the end of the ACK station A waits for a DIFS and then chooses a backoff time equal to 3 before sending an RTS to station B. Another station also waits for a DIFS and chooses a backoff time equal to 7. At t3 station A initiates the RTS/CTS transaction with station B. The station that had a backoff time of 7 “freezes” its timer until the channel is idle again. After B’s ACK station A has another packet to transmit and this time it chooses a backoff time of 4 which brings it to a collision condition with the station that had resumed its counter. Because of the collision station A increments its contention window size and chooses a backoff time of 7.
802.11 DCF - Markov Chain Model A bi-dimensional process model {s(t),b(t)} can be used (*) which leads to a discrete-time Markov chain model with the following transition probabilities: P{i,k | i, k+1} = 1; k (0, Wi– 2), i (0,m) 1 i,k+1 i,k This equations accounts for the fact that, at the beginning of each slot time, the backoff time is decremented as long as the counter has not reached zero and that the channel has been sensed idle for a mini-slot (*) G. Bianchi, “Performance Analysis of the IEEE 802.11 Distributed Coordinated Function,” IEEE Journal on Selected Areas in Communications, vol. 18, no. 3, March 2003, pp. 535-547
802.11 DCF - Markov Chain Model P{0,k | i, 0} = (1-p)/ W0; k (0, W0– 1), i (0,m) Tx Success i,0 (1-p)/ W0 . . . 0, W0– 1 0,0 0,1 0,W0– 2 This equations accounts for the fact that a new packet following a successful packet transmission starts with backoff stage 0, and that the backoff is initially uniformly chosen in the range (0, W0– 1)
802.11 DCF - Markov Chain Model P{i,k | i-1, 0} = p/ W1; k (0, Wi– 1), i (1,m) Tx Collision i-1,0 p/ Wi . . . i, Wi– 1 i,0 i,1 i,Wi– 2 When an unsuccessful transmission occurs at backoff stage i-1, the backoff stage increases, and the new initial backoff value is uniformly chosen in the range (0, Wi)
802.11 DCF - Markov Chain Model P{m,k | m, 0} = p/ Wm ; k (0, Wm– 1) . . . 0, W0– 1 0,0 0,1 0,W0– 2 (1-p)/ W0 m,0 p/ Wm . . . m, Wm– 1 m,1 m,2 m,Wm– 2 This equation models the fact that once the backoff stage reaches the value m, it is not increased in subsequent packet transmissions
Steady State Probabilities The stationary transition probability distribution π(i,k) is then π(0,0) is determined by using the normalization condition from which
Steady State Probabilities The probability that a station transmits in a randomly chosen slot time can be derived since any transmission occurs when the backoff time counter is zero p, the probability that a transmitted packet encounters a collision, is the probability that in a time slot at least one of the n-1 remaining stations transmits. At steady state, each remaining station transmits a packet with probability τ, this results in From this two equations the values for p and τcan be found using numerical techniques
Throughput Let Ptr be the probability that there is at least one transmission in the considered slot time, i.e., The probability Ps that a transmission on the channel is successful is given by the probability that exactly one station transmits on the channel, conditioned on the fact that at least one station transmits, i.e., The normalized throughput S, defined as the fraction of the time the channel is used to successfully transmit payload bits is then
Throughput If E[P] is the average packet payload then S can be expressed as where For the basic access mechanism (no RTS/CTS transaction) the packet header is And let δ be the propagation delay
Throughput – Basic Access SIFS DIFS PHYhdr MAChdr ACK PAYLOAD Tsuccess (basic access) DIFS PHYhdr MAChdr PAYLOAD Tcollision (basic access) E[P*] is the average length of the longest packet payload involved in a collision Where F(.) is the probability distribution function for the packet payload size
Throughput – RTS/CTS SIFS SIFS SIFS DIFS PHYhdr MAChdr PAYLOAD RTS CTS ACK Tsuccess (RTS/CTS) DIFS RTS Tcollision (RTS/CTS)
Model Validation The model is validated by comparing its results with those obtained via simulation. The parameters used for the validation study are summarized in the following table. A PHY layer using a FHSS modulation system is assumed.
Model Validation- Simulation vs. Analysis Analytic results are represented by lines, simulation results by symbols
Elimination Yield – Non-Preemptive Multiple Access (EY-NPMA) EY-NPMA is the channel access protocol used in the HYPERLAN system. HIPERLAN is a high-speed (24 Mb/s) wireless LAN standard. The protocol works as follow: • A node that has data to transmit senses the channel • If the channel is free for at least 1,700 bits then it is considered free and the node can start transmitting • Each data frame must be explicitly acknowledge with an ACK packet • If the channel is sensed busy the node synchronizes itself with the end of the current transmission interval • At that point a channel access cycle begins according to the EY-NPMA scheme • This scheme has 3 phases: prioritization, contention, and transmission
Channel Access (EY-NPMA) Prioritization phase Contention phase Transmission phase Elimination phase (B) Yield phase (D) Data Frame ACK PriorityDetection Cycle SynchronizationInterval PriorityAssertion SurvivalVerificationInterval • In the prioritization phase only the nodes with the highest channel access priority frame are allowed to continue to the next phase • The contention phase has 2 sub-phases: elimination, and yield • In the elimination phase each node transmits for a random number of slots after which it listen to the channel. If the channel is busy the node loses contention and waits for the next cycle. If the channel is idle the node moves to the yield phase • In the yield phase the node listens to the channel for a random number of slots. If no transmission is detected during this time, the node starts and completes its data transmission
Channel Access (EY-NPMA) For the prioritization phase each frame is assigned a priority level h (0, H-1). Each node that has a frame with priority h senses the channel for the first h prioritization slots. If the channel is idle during this interval, then the node transmits a burst in the h + 1 slot and it is admitted to the contention phase, otherwise it stops contending and waits for the next channel access cycle. The elimination phase consists of at most n slots followed by an elimination survival verification slot. Starting from the first elimination slot, each node transmits a burst for a number B, 0≤ B ≤ n, of subsequent elimination slots. B has a truncated geometric probability distribution function, i.e., The yield phase consists of at most m yield slots. Each node listens to the channel for a number D, 0≤ D ≤ m, of yield slots before beginning a transmission. D has also a truncated geometric probability distribution function, i.e.,
Performance Analysis (EY-NPMA) Analysis of the HIPERLAN MAC protocol via a mathematical model is very difficult because of the complexity and level of interdependence of the various processes that are involved. Therefore the analysis is carried out using simulation models. For the study carried by Anastasi et. al. (*) the simulation model compared the performance of the protocol with different arrival processes. The nodes have infinite buffers and they contribute with the same offered load. Poisson and ON/OFF processes are used. The ON/OFF period lengths are Weibull distributed with α= 1 (Markov Modulated Markov Process) and α< 1. Studies have shown that experimental data related to WWW applications can be satisfactorily modeled by ON/OFF processes where the ON and OFF time-lengths distributions are heavy tailed, e.g. Weibull, Pareto. The Weibull probability distribution function of a random variable X is: (*) G. Anastasi, L. Lenzini, and E. Mingozzi, “Stability and Performance Analysis of HIPERLAN,” Proceedings of IEEE INFOCOM’98, pp. 134-141.
Multi-Channel Assignment Approach 7 6 2 1 5 8 4 3 • Proposed for CDMA Ad-Hoc Networks • Nodes use different channels (codes) to transmit data • The codes must be “locally” unique but they can be reused • The code or channel can be used as an implicit address for the node • Similar approach is used in cellular networks but there the topology is static
Channel Assignment in Ad Hoc Networks Let G(V,E) be the graph representation of the network and Δ the maximum degree of the graph. The problem of channel assignment becomes then one of graph coloring • For any node: • All its neighbors have different colors (ROCA), or • All two-hop neighbors have different colors (TOCA) ROCA = Receiver-Oriented-Code-Assignment TOCA = Transmitter-Oriented-Code-Assignment Brooks and Vizing theorem:
Channel Assignment in Ad Hoc Networks In Ad-Hoc networks: • There is no base station • Nodes are free to connect or disconnect • Nodes move about • Increase or decrease their transmission range • Should minimize or avoid the primary and secondary conflicts Two transmissions with the same code arrive at a node simultaneously A transmission arrives at a node that is receiving a signal with a different code These features call for distributed, dynamic, code assignment algorithms
Minimal Recoding Strategies • A change in the code assignment (recoding) is needed to eliminate potential collisions caused by nodes joining the network, moving, or changing the power of their transmissions • The recoding strategy must be distributed and local • The number of events required for recoding should be minimized • The maximum number of codes needed for a proper recoding should be also minimized • Used TOCA method since it has better performance1 • Assign a code ci to each node such that, • CA1 - For every edge (vi,vj) E, ci≠ cj (primary collision avoidance) • CA2 - For every pair of edges (vi,vk), (vj,vk) E & i≠ j, ci≠ cj (secondary collision avoidance) • Graph coloring problems of this nature are NP-complete L. Hu, “Distributed Code Assignment for CDMA Packet Radio Networks,” IEEE Trans. on Networking, vol. 1, no. 6, December 1993, pp. 668-677
Set 1n Set 2n Set 4n Set 3n Recoding on Node Join Consider the event where a new node n joins an Ad Hoc network …… …… …… …… n Node n joins Nodes in 3n need not change their color since n will be assigned a new color different from any color in 3n. To minimize the amount of recoding there is only to recode the nodes in the set 1nU 2nU {n}
Recoding on Node Join If the set of old colors in 1nU 2nis {C1, C2,…, Cm} and the number of nodes in 1nU 2n with these corresponding colors is {K1, K2,…, Km}, then apart from recoding n, at least need to be recoded with different new colors to avoid conflicts into the new code assignment after node n joins the network. To find out which nodes to chose for recoding one can use the following approach(1). Consider the undirected graph G’= (V1U V2, E’) where,V1 = 1nU 2nU {n} V2 = {i : i Z+ & i ≤ max = maximum color constraint in the vicinity of 1nU 2nU {n} }E = {(u,v) : u V1, v V2, u is not constrained to be newly colored with v} “maximum color constraint in the vicinity of 1nU 2nU {n}” means the maximum integer among all constraints due to 3nU 4n on nodes 1nU 2nU {n}, e.g. the set of old colors in 3nU 4nforbidden to be assigned to nodes in 1nU 2nU {n} due to the constraints CA1 andCA2, and all old colors in 1nU 2n. The edges in E are weighted; edges (u,v), u 1nU 2n, v V2 where v is the old color assigned to node u are given a weight of 3; all other edges have weight 1. I. Gupta, “Minimal CDMA Recoding Strategies in Power Controlled Ad-Hoc Wireless Networks,” Technical Report, Dept. of Computer Science, Cornell University, 2001.
Recoding on Node Join (Example) 1nU 2n 2 H B A 3 D F 1 C 3 1 G 4n 2 E 3 1n = {G}, 2n = {A,B,F,C}, 3n = { }, 4n = {D,F}. The original color assignment, before node H joins the network, is indicated next to each node (in the square box). Next G’ is built as previously defined. Note that G’ is a bipartite graph.
Recoding on Node Join (Example) Consider now the maximum matching M A 1 3 on this bipartite graph. M is a set of edges with no common end-vertices and with the maximum total weight among all such sets. There are many efficient algorithms to find a maximum matching of a weighted bipartite graph(1). Once M is found assign a node u in V1 to the color in V2 that M matches into, and for all the remaining nodes in V1 not matched by M, assign them consecutive colors one by one starting from | V2 | + 1 onwards. 1 B 1 1 3 3 C 1 2 3 F 1 1 G 3 3 1 H Z. Galil, “Efficient Algorithms for Finding Maximum Matching in Graphs,” ACM Computing Surveys, vol. 18, March 1998, pp. 23-28. 1
Recoding on Node Join (Example) A The maximum matching M for this example is then {(A,2), (B,3), (C,1)}. The color (code) assignment for the unmatched nodes is (F,4), (G,5) and (H,6). This recoding strategy is local since the task of recoding the nodes in 1nU 2nU {n} is locally centralized at node n, and uses only local information. 1 3 B 3 2 3 • Claims(1) • Minimal Recoding: For the event where n joins the network this algorithm recodes the minimum number of nodes • Optimal among Minimal: Among all minimal strategies that recode nodes only one hop away from the event, e.g. nodes in 1nU 2nU {n}, this strategy re-assigns the least maximum color to any node C F 3 G H I. Gupta, “Minimal CDMA Recoding Strategies in Power Controlled Ad-Hoc Wireless Networks,” Technical Report, Dept. of Computer Science, Cornell University, 2001.
Recoding on Node Join (Pseudo Code) • Obtain the constraints (u, oldcolor (v)) of the from-neighbors u of n, • Obtain the constraints (n, oldcolor (v)) for n, • Let max = maximum color seen in these constraints on old colors in 1nU 2n • Let V1 = 1nU 2nU {n}, V2 = (1,2,…,max} • Build the bipartite graph G’ by joining edges from each vertex v in V1 to each color k in V2 that it can be assigned without conflicting with the constraints with any of the nodes not in 1n U 2nU {n} • Assign a weight of 3 to the edge if it connects to the old color assigned to v, otherwise assign it a weight of 1 • Run the bipartite matching algorithm on G’ • For each edge v in V1 that is matched to some edge k in V2 assign k as the new color. For all the remaining m vertexes in V1 not assigned a color assigned them the colors max + 1, …, max + m • Transmit this information to all concerned nodes and coordinate on when to change colors
1n = { }, 2n = {E,F,G}, 3n = { }, 4n = {A,D,C}. The original color assignment, before node B moves, is indicated next to each node (in the square box). Recoding on Move The event when a node n moves can be handled in almost the same way as when a node joins the network, e.g. for the following example, 2 4n B A 3 B D F 1 C 3 E 1 G 1nU 2n 3 2
Recoding on Move (Example) The bipartite graph G’ is The maximum matching M is 1 B B 3 1 1 1 E E 3 3 2 2 3 3 F 1 F 1 3 3 3 3 G G 1 The final color (code) is (A,2), (B,4), (C,1), (D,3), (E,3), (F,1), and (G,2)
Recoding on Node Move (Pseudo Code) 0. Define 1n,2n, 3n,and 4n,for the node n in its new position • Obtain the constraints (u, oldcolor (v)) of the from-neighbors u of n, • Obtain the constraints (n, oldcolor (v)) for n, • Let max = maximum color seen in these constraints on old colors in 1nU 2n • Let V1 = 1nU 2nU {n}, V2 = (1,2,…,max} • Build the bipartite graph G’ by joining edges from each vertex v in V1 to each color k in V2 that it can be assigned without conflicting with the constraints with any of the nodes not in 1n U 2nU {n} • Assign a weight of 3 to the edge if it connects to the old color assigned to v, otherwise assign it a weight of 1 • Run the bipartite matching algorithm on G’ • For each edge v in V1 that is matched to some edge k in V2 assign k as the new color. For all the remaining m vertexes in V1 not assigned a color assigned them the colors max + 1, …, max + m • Transmit this information to all concerned nodes and coordinate on when to change colors