EE5406 Wireless Network Protocols – Basic MAC Protocols
Dr. David Wong Tung Chong
Email: [email protected]
Website: http://www1.i2r.a-star.edu.sg/~wongtc/course.html
Academic Year 2010/2011
Outline
• Basic Medium Access Control (MAC) Protocols
– Conflict-free
• Static Allocation
– TDMA – FDMA – CDMA
• Dynamic Allocation
– Polling (Centralized Control)
– Contention-Based
• Static Resolution
– ALOHA – CSMA
• Dynamic Resolution
– CSMA/CA
• Wireless Scheduling
Basic MAC Protocols
Time Division Multiple Access (TDMA)
• Each frame has a control segment.
• A control segment contains a synchronization pattern to keep stations in
synchronization, as well as other control data.
• The guard bands ensure that the time slot assigned to each station are separated.
• Each station time slot allows for transmission of both
overhead (OH)and data.
• The major disadvantage of TDMA is the requirement that each station must have a fixed allocation of channel time regardless of whether it has data to transmit or not.
• To calculate the queueing delay in the buffer of each station, we can model each of them as a M/D/1 queue.
Station M Frame i-1 Frame i Frame i+1
Time
Control OH Data OH Data OH Data
... ...
...
Station 1 Station 2
Guard Time
Figure 1. Time Division Multiple Access (TDMA)
R
R/M
Frequency Division Multiple Access (FDMA)
• The major disadvantage of FDMA is that each station has a fixed allocation of channel bandwidth
regardless of whether it has data to transmit or not.
• The entire channel can
sustain a rate of R bps which is equally divided among M stations (in practice, there are guard bands between
frequency channels).
• Since the individual bands are disjoint, there is no interference among users’
transmissions and the system can therefore be viewed as M independent M/D/1 queues.
Figure 2. Frequency Division Multiple Access (FDMA)
Station 1
Station 2
Station
3 ... Station
M Frequency
Code Division Multiple Access (CDMA)
• CDMA does not attempt to allocate disjoint time or frequency resources to each user.
• Instead this approach allocates all resources to all simultaneous users, controlling the power transmitted by each to the minimum required to maintain a given signal-to-noise ratio for the required level of performance.
• Each user employs a noise-like wideband signal occupying the entire frequency allocation for as long as it is needed.
• In this way, each user contributes to the background noise affecting all the users, but to the least extent possible.
• This additional interference limits capacity, but because time and bandwidth resource allocations are unrestricted, the
resulting capacity is greater than for conventional systems.
• Neglecting bit error probability, the system can be viewed as M
independent M/D/1 queues.
Polling
• The central controller sends a polling message to the first station in the polling sequence.
• After receiving the polling message, this station transmits its data to the central controller and indicates that it has completed transmitting by adding a go- ahead message.
• The central controller then polls the next station in sequence and the process continues until all stations have had an opportunity to transmit.
• The polling sequence is used over and over again.
• Assume that the maximum propagation delay between stations is τ.
• This system can be modeled as a M/G/1 with vacation for M users.
• The vacation time (station walk time) consists of a propagation time, a time to transmit control packets (polling and go- ahead), and possibly synchronization time and turnaround time for half duplex link.
• We can also consider this time as the time required to transfer use of the channel from one station to the next.
1 λ
2 λ
M λ
Central Controller
Figure 3. Polling
ALOHA
• The basic ALOHA
method is efficient for very low loads.
• The maximum normalized
throughput is about 18% for short
normalized
propagation delay.
Yes
Packet Ready
?
Positive Acknowledgement
?
Transmit
Wait two-way propagation
delay
Yes
No
Compute randombackoff integer (k) Delay k packet
transmission times
No
Figure 4. Algorithm followed at each station for ALOHA protocol
Slotted ALOHA
• Slotted ALOHA can effectively double the fraction of the capacity of the transmission channel that can be used.
• The maximum
normalized throughput is about 36% for short normalized
propagation delay.
• All stations must be synchronized and packet transmissions must all start at the beginning of agreed- upon slots.
Positive Acknowledgement
? Packet Ready
Yes
?Transmit
Wait two-way propagation delay.
Quantized to slot time
Yes
No Compute random backoff integer
(k)
Delay k packet transmission times
Delay to beginning of next slot
No
Figure 5. Algorithm followed at each station for Slotted ALOHA protocol
Carrier Sense Multiple Access (CSMA)
•The carrier-sense information is used to minimize the
length of the
collision interval.
A
B
Positive Acknowledgement
?
Yes
Packet Ready
?
Transmit
Wait two-way propagation delay ---
Quantized to slot times
Yes
No
Compute random backoff integer
(k)
Delay k packet transmission times
No
Carrier sense strategy
CDelay to beginning of next slot
Figure 6. Algorithm followed at each station for CSMA protocol
Non-Persistent CSMA
• The channel is sensed and the following algorithm is used
when a station has a ready packet:
• If the channel is idle, the packet is transmitted.
• If the channel is busy, the station uses the backoff
algorithm, following the path through C in the figure, to reschedule the transmission.
• At the time of retransmission, the channel is sensed again and the algorithm is repeated.
Channel Busy
?
B A
C
Figure 7. Carrier Sense Strategy for Non-Persistent CSMA protocol
p-Persistent CSMA
• Two constants are used for this algorithm:
– τ, the maximum propagation delay between two stations and
– p, a specified probability.
• A station using the p-persistent algorithm senses the channel and then the following occurs:
• If the channel is sensed idle, a random number uniformly distributed on [0,1] is chosen. If the selected number is less than or equal to p, the packet is transmitted; if not, the station waits τ seconds and
repeats the complete algorithm (which includes the contingency that the channel may be busy).
• If the channel is busy, the station persists in sensing the channel until it is found to be idle and then proceeds as described
above.
Figure 8. Carrier Sense Strategy for p-Persistent CSMA protocol
No Connection A
C
B
Yes
Channel Busy
?
No Select random number, r, from
[0,1]
r≤p
?
Yes Delay τ
second
No
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
• There are two access methods in CSMA/CA MAC.
• They are the basic access method and the request-to-send/clear-to- send (RTS/CTS) access method.
• The basic access method is a two-way handshaking, while the RTS/CTS access method is a four-way handshaking.
• In the former access method, the source station sends its frame to the destination station in the data transmission phase.
• After correctly receiving the frame, the destination station sends an acknowledgement to the source station in the acknowledgement phase.
• Thus, this process completes the two-way handshaking.
• In the latter access method, the source station sends a RTS frame to the destination station.
• If the destination station receives the RTS frame correctly and is available for reception, it replies with a CTS frame.
• Then the source station sends its data frame to the destination station.
• Upon correctly receiving the data frame, the destination station acknowledges receipt of the data frame with an acknowledgement frame.
• This completes the four-way handshaking.
• If the payload is below a certain threshold, the basic access method is used; otherwise, the RTS/CTS access method is used.
Carrier Sense Multiple Access with
Collision Avoidance (CSMA/CA)
1. Data
2. ACK
Source Destination
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
Figure 9. Basic Access for CSMA/CA protocol
3. Data 1. RTS
2. CTS 4. ACK
Source Destination
Figure 10. RTS/CTS Access for CSMA/CA protocol
Carrier Sense Multiple Access with
Collision Avoidance (CSMA/CA)
Medium busy
SIFS DIFS
Backoff
Window
Frame
Time
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
Figure 11. Channel Access in CSMA/CA protocol
• The CSMA/CA MAC works as follows.
• If the channel is idle for more than a distributed coordination function inter-frame space time (DIFS) and the backoff counter is zero, a station can transmit immediately.
• If the channel is busy, the station will generate a random backoff
period. This random backoff period is uniformly selected from zero to the current contention window size. The backoff counter decrements by one if the channel is idle for each time slot and freezes if the channel is sensed busy. The backoff counter is re-activated to count down when the channel is sensed idle for more than a distributed coordination function inter-frame space time. At the initial backoff stage, the current contention window size is set at the minimum contention window size.
Carrier Sense Multiple Access with
Collision Avoidance (CSMA/CA)
• If the backoff counter reaches zero, the station will attempt to transmit its frame. If it is successful, the destination station will send an
acknowledgement after a short inter-frame space and the current contention window size is reset to the minimum contention window
size. If it is not successful, it will increase the current contention window size by doubling it and add one only until a maximum contention
window size is reached in the next backoff stage and a new random backoff period is selected as before.
• This process repeats itself until the frame is successfully transmitted or until the maximum retry limit is reached. If the frame is still not
successfully transmitted, then it is dropped.
Carrier Sense Multiple Access with
Collision Avoidance (CSMA/CA)
• If a station does not receive an acknowledgement within an
acknowledgement timeout period after a frame is transmitted, it will continue to attempt to re-transmit the frame according to the backoff algorithm.
• In the RTS/CTS access method, if a station does not receive a CTS frame within a CTS timeout period after sending an RTS frame, it will attempt to re-transmit the frame according to the RTS/CTS access method and the backoff algorithm.
Carrier Sense Multiple Access with
Collision Avoidance (CSMA/CA)
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
Figure 12. Example of exponential increase in contention window
CWmin 31 63 127
255 511
1023 1023 CWmax
Initial Attempt 1st Retransmission 2nd Retransmission
3rdRetransmission
4thRetransmission
1/(W0+1) if it comes from state (Lretry,0) (1-p)/(W0+1) otherwise
:
p/(W1+1)
…
…
… p/(Wj+1)
0,W0
0,1 …
1 1
1-p 1
: … p/(Wj+1+1)
j,Wj
j,1 …
1 1 j,0
1-p 1
Lretry,WLretry Lretry,1
…
… 1 p/(WLretry+1)
1 Lretry,0
1 1
• p is the probability that a station in the backoff stage senses the channel busy.
• W
jis the contention window size in backoff stage j.
• L
retryis the number of backoff stages.
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
Figure 13. State Transition Diagram for CSMA/CA MAC
0,0
Station 0 Medium busy
Station 1
Station 2 Packet arrival, backoff counter=3
Packet arrival, backoff counter=5 DIFS
3δ
Packet
SIFS
2δ ACK
DIFS
Packet
SIFS
ACK
Figure 14. Example of CSMA/CA MAC data packet
Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
time
time
time
Wireless Scheduling
• The function of a scheduling
algorithm is to select the session whose head-of-line (HOL) packet is to be transmitted next.
• This selection process is based on the QoS
requirements of each session.
• Each mobile station (MS) can support one or more sessions at any given time.
Session 1
Session 2
Session N
Scheduler Transceiver
Channel state Monitor/predictor
MS
MS
MS
Figure 15. A typical wireless scheduler
:
:
Wireless Scheduling
• Generalized processor sharing (GPS) is an efficient, flexible and fair scheduler originally proposed for use in an error-free
environment.
– It is an idealized fluid flow model that services all sessions simultaneously.
• Channel state dependent packet scheduling (CSDPS)
– A wireless scheduling framework which allows the use of different service disciples such as round robin (RR), longest queue first (LQF) or earliest timestamp first (ETF).
– The main idea is to avoid bursty errors at the link layer instead of relying on the transport or application layer for error recovery.
– The channel state for each session is monitored and if the channel state for a session that is due to transmit is in a bad state, the
transmission of its packet is deferred.
Wireless Scheduling
• Idealized Wireless Fair Queuing (IWFQ)
– A realization of packet-based GPS (PGPS) with a compensation mechanism for error-prone sessions.
– PGPS is a generalized version of fair queuing.
• Channel-Condition-Independent Fair Queuing (CCIFQ)
– The system gives priority to sessions that have good state, while all other error sessions (with possibly different channel states) are
treated as the same – not allowed to transmit.
– This is in fact unfair among sessions and increase the average delay of the sessions.
• Proportional Fair (PF)
– Designed for high data rate (HDR) services in CDMA systems.
– Simple yet effective fairness notion.
– Based on utility based concept.
– HDR (downlink) scheduling is performed in a TDMA manner (i.e.,
only one user is selected for HDR transmission in each burst
Wireless Scheduling
• The transceiver can be a base station (BS).
• The BS is assumed to be the intelligent entity that allocates resources to mobile stations for their uplink transmissions and schedules the packets
transmitted to the mobile stations for downlink transmissions.
Session 1
Session 2
Session N
Scheduler
Transceiver
Channel state Monitor/predictor
MS
MS
MS
Figure 16. A typical wireless MIMO scheduler
:
:
: