# <center><i class="fas fa-clipboard-list"></i> MAC Scheduler in LTE</center>
###### tags: `O-RAN`
:::info
**Goal:**
Exploring MAC Scheduler in LTE and read all the paper related to it
- [x] Understand MAC Scheduler in LTE
- [X] Explore the MAC Scheduler Paper in IEEE
- [x] Science behind in MAC Scheduler
:::
:::spoiler **References**
- [Web](https://yatebts.com/an-introduction-to-the-lte-mac-scheduler/#:~:text=MAC%20Scheduling%20in%20LTE&text=Sitting%20just%20above%20the%20Physical,of%20Service%20for%20UE%20connections.)
- [Paper IEEE](https://remote-lib.ui.ac.id:2082/document/9271427)
- [OFDM](https://blog.yate.ro/2015/05/20/ofdm-the-science-behind-lte/)
:::
## MAC Scheduler in RN-LTE Network
MAC scheduler is an essetial component of the LTE radio network. They are sitting just above the Physical layer. The MAC Scheduler assigns bandwidth resources to user equipment and is responsible for deciding on how uplink and downlink channels are used by the eNodeb and the UEs of a cell. it also enforces the necessary QoS for UE connections. QoS is set of rules that come from the PCRF in the core network. These rules define priority, bit rate and latency requirements for different connections to the UE. They usually based on the types of applications using UE connection. For example, the QoS requirements for a VoLTE call are different from those for checking the e-mail.
By looking this image below, MAC scheduler has control over OFDM modulation in sense of decides, according to information that is received from other LTE nework components. In this figure, the resource element (sub-carrier) is represented on the frequency axis, while the sub-frames are represented on the time axis.

:::info
**This figure shows downlonk scheduling, but the MAC Scheduler controls uplink scheduling in a similar way**
:::
In order to take its resource allocation decisions, the MAC Scheduler receives information such as:
* QoS data from the PCRF: minimum guaranteed bandwidth, maximum allowed bandwidth, packet loss rates, relative priority of users.
* Messages from the UEs regarding the radio channel quality, the strength or weakness of the signal.
* Measurements from the radio receiver regarding radio channel quality, noise and interference.
* Buffer status from the upper layers about how much data is queued up waiting for transmission.

Typically, a MAC Scheduler can be programmed to support one scheduling algorithm with many parameters.
Here are some example of scheduling algorithms:
* **Round Robin** - used for testing purposes and uses equal bandwidth for all UEs without accounting for channel conditions
* **Proportional Fairness** - tries to balance between the QoS priorities and total throughput, usually preferred in commercial networks
* **Scheduling for Delay-Limited Capacity** - guarantees that the MAC Scheduler will always prioritize applications with spesific latency requirements
* **Maximum C/I** - guarantees that the MAC Scheduler will always assign resource blocks to the UE with the best channel quality
One of the key features of LTE is the ability to control and prioritize bandwidth across users. It is the MAC Scheduler that gives LTE this capability.
## OFDM - The Science Behind LTE
No one wants to see low quality video that they're watching on Youtube. We all want to send big chunks of data as big as and as fast as we could send, while still keeping the integrity of the data. Nevertheless, the faster we send the data, the more likely it is to experience transmission problems, especially due to interference or weak signal.
OFDM is the radio science behind huge bandwidth capabilities we see in LTE. OFDM splits data into small sub-carriers, also known as data streams, on neighboring frequencies, over a single channel. It allows sending more data than through single carrier modulation techniques, and at a higher rate. OFDM also handles phenomena such as interference, noise or multipath significantly more efficiently than other modulation methods.
### How It Works
The following explanation is for non-engineers and is meant to shed some light on OFDM. We'll use a theoretical example: a bandwidth of 1 MHz and round numbers, which are easier to remember and apply to real-life scenarios.
Traditional single carrier modulation uses only one frequency to send the bits, as seen below.

In OFDM, the bandwidth of 1 MHz band is split into, say 1000 sub-carriers of 1 kHz, and each of them sends one symbol per millisecond.

Next, OFDM uses the FFT (Fast Fourier Transform) algorithm and its inverse to effectively retrieve the original data bits from the symbols and vice versa.
OFDM has a special property called orthogonality, which essetially means that sub-carriers are spaced in such a way that they only partially overlap, as the peak of each sub-carrier insersects the zero crossing of the neighboring sub-carrier. This characteristic is perfectly illustrated in the image below, where you can see 5 of the 1000 1 kHz sub-carriers in the frequency domain, in a single channel.
Orthogonality is what allows us to pack sub-carriers really tight, without wasted frequencies between them as in traditional cases, which require using guard bands.

The data rate obtained using OFDM is the same as in the case of single-carrier modulation, so you might wonder why we use it so enthusiastically in LTE, which is what we'll explain below.
### Effective against multipath propagation and interference
Multipath propagation occurs the moment a radio signal bounces-off obstacles that appear in its path: water sources, hills and mountains, buildings, tree etc. Multipath causes the transmitted signal to be sent on two or more paths to the receiver, making it difficult for the receiver to interpret what it receives. Only some frequencies are prone to experience multipath. In single carrier modulation systems, it has a damaging impact throughout the whole frequency and affects all of the data symbols.

Take a look at the image below: only one carrier experiences multipath, but since all sub-carrier transport redundant copies of the sent symbols, data loss is minimal.

OFDM is also effective against interference because only some of the data streams will be affected by this phenomenon and data can be more easily recovered with redundant error-correction coding.
### **Spectral Eficiency**
When using OFDM, LTE can tailor the modulation to make the best possible use of the available radio path to and from the UEs. Because of the OFDM carrier structure, LTE can take advantage of the changes in channel conditions and uses different modulations depending how close or far the UEs are from the transmitter.
Because it uses OFMD, LTE can dynamically change the symbol alphabet, dependign on the radio conditions, for each individual sub-carrier. For example, if you're sending data close to the transmitter, LTE will apply a 64-QAM modulation scheme, that is 6 bits/symbol. In extreme cases, LTE can even use BPSK (1 bit/symbol).
### **Disadvantages**
OFDM also has its downsides. It has high peak-to-average power ratio, and requires a highly linear and oversized power amplifier that usually has a low efficiency. We can see in the image below, you can see a typical OFDM peak-to-average power ratio. This occurs because because multiple sub-carriers with different phases combine constructively in the time domain.
Typically, to obtain a 5 W average output power, an OFDM system requires a 100 W power amplifier, representing an increase by a factor of 20 from the actual 5 W output. Otherwise, the distortion is far too destructive to allow OFDM to function normally.

OFDM is also very sensitive to Doppler shift. This phenomenon occurs when the UE is moving, thus making the frequency of the signal received different from the frequency of the initially transmitted signal. Among its effects in OFDM, Doppler shift Deteriorates synchronization, data recovery, and destroys the orthogonality of sub-carriers.
:::warning
**Term of Abbreviations**
- LTE: Long-Term Evolution
* OFDM: Orthogonal Frequency Division Multiplexing
* FFT: Fast Fourier Transform
* MAC: Medium Access Control
* PCRF: Policy and Charging Rules Function
* QoS: Quality of Service
* UE: User Equipment
* UMTS: Universal Mobile Telecommunications System
* VoLTE: Voice over LTE
* RN: Radio Network
:::