The MAC sublayer of the 5G NR protocol stack interfaces to the RLC sublayer from above and the PHY layer from below. It maps information between logical and transport channels. Logical channels are about the type of information carried whereas transport channels are about how such information is carried. The physical layer offers transport channels to the MAC layer to support transport services for data transfer over the radio interface. MAC layer offers transport channels to the RLC sublayer. The logical channels exist between MAC and PHY whereas transport channels exist between PHY and the radio layer. Hence MAC is the interface between logical channels and physical transport channels.
Physical layer services to MAC sublayer:
- Data transfer
- HARQ feedback signaling
- Scheduling request signaling
- CQI (Channel Quality Index) measurements
5G NR MAC functions:
- Data transfer
- Radio resource allocation
- Mapping between logical and transport channels (Both downlink and uplink)
- Multiplexing of MAC SDU’s onto TBs (Transport blocks)
- Demultiplexing of MAC SDU’s from TBs
- Scheduling information reporting
- Logical channel prioritization
5G NR MAC Procedures:
- Random Access Procedure: Get the initial uplink grant for UE (User Equipment) and help in performing synchronization with the gNB. It covers Random Access Procedure initialization, Random Access Resource selection, Random Access Preamble transmission, Random Access Response reception, contention resolution, and the completion of the Random Access procedure.
- DL-SCH data transfer: it does everything needed to perform downlink data transfer.
- UL-SCH data transfer: it does everything needed to perform uplink data transfer.
- Scheduling Request (SR): it is used by UE to transmit requests to gNB to obtain UL grants.
- PCH reception: it helps in monitoring paging messages in a special period.
- BCH reception: it carries basic information regarding the 5G NR cell.
- DRX (Discontinuous Reception): it helps in monitoring PDCCH as per special pattern in a discontinuous manner. Due to this discontinuous monitoring, energy consumption can be achieved.
- Other procedures: the other 5G NR MAC procedures include transmission and reception without dynamic scheduling, activation/deactivation of SCells, activation/deactivation of PDCP duplication, bandwidth part (BWP) operation, handling of measurement gaps, handling of MAC CE’s, beam failure detection and recovery operation, etc.
5G NR MAC Header and subheaders:
A MAC PDU consists of one or more MAC sub-PDUs. Each MAC sub-PDU consists of the various fields:
- A MAC subheader only including padding
- A MAC subheader and a MAC SDU
- A MAC subheader and a MAC CE (Control Element)
- A MAC subheader and padding
The MAC SDU’s are of variable sizes. Each MAC subheader corresponds to either a MAC SDU, a MAC CE, or padding.
Main procedures of 5G NR MAC
When a UE is making its initial access to the network, the Random Access procedure is essential which is involved in different scenarios. It is of type 4-step or 2-step procedure. Each type can be contention-based Random Access (CBRA) or contention-free Random Access (CFRA).
Contention-based Random Access: In contention-based random access, UE selects a preamble randomly from a pool of preambles shared with other UEs. UE has a potential risk of selecting the same preamble as another UE and may experience conflict or contention. In contention-based, multiple UE’s attempt to connect to the network at the same time. The eNB is intelligent enough to tackle this situation because every UE should be unique to the network.
The UE can always send the same preamble ID to the network, thereby resulting in collisions. This type of collision is called “contention” and is known as the “contention-based” RACH process. The network has to go through additional processes to resolve these contentions and this process is known as contention resolution.
In total, there are 64 preambles per cell. The 64 preambles are grouped to indicate the length of the needed resource. The preambles are reserved for contention-free access.
- A preamble will be selected by UE and transmitted in the available subframe. Based on the correlation, it may detect the access and can measure the timing of the UE transmission.
- The information on the scheduled resource will be exchanged and a temporary C-RNTI will be assigned.
- The UE sends its ID. The type of ID depends on the state.
- The contention resolution is performed
Non Contention or contention-free random access: In this, the preamble is allocated by the gNB and such preambles are also known as dedicated random access preamble. It is provided to UE either via RRC signaling or Physical layer signaling. when the dedicated resources are insufficient, the gNodeB instructs UEs to initiate contention-based RA. It is also a three-step procedure.
- Random Access Preamble Assignment
- Random Access Preamble Transmission (msg1)
- Random Access Response
MAC plays an important role in Carrier Aggregation (CA). It distributes MAC PDUs and CEs across different component carriers (CCs) and generates one TB (Transport Block)per TTI (Transmit Time Interval) per CC (Component carrier). Each CC has its own HARQ entity within MAC. Through Carrier Aggregation involves multiple carriers or cells, they all come under the same cell group. Aggregation happens over one primary cell (Pcell) and one or more secondary cells (Scell). Within a single MAC entity, there can be multiple instances of transport channels.