In 5G NR (New Radio), the Random Access (RA) procedure is essential for connecting User Equipment (UE) to the network. It facilitates tasks such as initial network access, mobility, and handover. This process involves the exchange of various control messages between the UE and the base station (gNB) to grant access and allocate uplink resources. In this post, we’ll focus on the structure and function of the MAC PDU (Protocol Data Unit), MAC subheaders, and MAC payload as they relate to the Random Access Response (RAR), based on 3GPP TS 38.321
When a UE initiates a random access procedure, it transmits a preamble to the network. The gNB, upon receiving this preamble, compiles a MAC PDU containing one or more Random Access Responses. This MAC PDU is broadcasted to all UEs, but each subPDU within it is targeted to a specific UE, identified by the RAPID in the subheader.
Step-by-Step Process:
- 1. UE Transmits Preamble: The UE sends a Random Access Preamble as a request for resources.
- 2. gNB Responds with RAR: The gNB composes a MAC PDU containing multiple RARs and broadcasts it.
- 3. UE Decodes Response: Each UE decodes the RAR to check if it matches its RAPID.
- 4. Resource Allocation: If a match is found, the UE extracts its resource allocation and timing advance instructions.
This structured response mechanism enables efficient resource distribution and reduces the risk of collisions during the initial access phase.
MAC PDU for Random Access Response
The MAC (Medium Access Control) PDU (Protocol Data Unit) for the Random Access Response (RAR) carries vital information exchanged between the network and the UE during the random access procedure. The primary role of the MAC PDU in the context of RAR is to provide UEs with necessary instructions on uplink resource allocation and timing advance adjustments.
Key Characteristics of the MAC PDU for Random Access Response:
• Structure: The MAC PDU for RAR consists of one or more MAC RAR subPDUs. Each subPDU contains a MAC subheader and payload. The payload itself holds the information related to resource allocation for each UE.
• Triggering: The MAC RAR PDU is sent in response to the UE’s Random Access Preamble. It is transmitted by the gNB (Next Generation Node B) to handle multiple UEs simultaneously, particularly in scenarios where many UEs compete for network access.
• UE Identification: To distinguish between multiple UEs, the MAC RAR PDU uses the Random Access Preamble Identifier (RAPID). This allows the network to specify which UEs are granted resources.
Components of a MAC PDU for RAR:
- MAC Subheader with Backoff Indicator: This informs the UE about network overload and tells it how long to wait before attempting another random access if necessary. The Backoff Indicator subPDU (if present) is always placed at the beginning of the MAC PDU.
- MAC Subheader with RAPID: RAPID (Random Access Preamble ID) identifies the UE’s preamble in the MAC PDU and conveys uplink resource information for the UE. RAPID subPDUs can be placed anywhere after the Backoff Indicator.
- MAC Subheader with RAPID and RAR: This is used when the UE is being granted resources for uplink transmission. The subheader includes both the RAPID and Random Access Response (RAR) payload.
- Padding: Optional padding may be included at the end of the MAC PDU, depending on the transport block size and the number of subPDUs.
Why It Matters: The structure of the MAC PDU ensures that multiple UEs can receive responses simultaneously, optimizing how the network grants access during periods of high demand.
MAC Subheader for Random Access Response
The MAC subheader is a small but vital component of the MAC PDU. It contains information that helps the network manage resource allocation and ensures the correct delivery of uplink grants to UEs.
Fields in the MAC Subheader:
- E (Extension Field): A flag indicating whether there are more subPDUs in the PDU. If set to “1,” another subPDU follows. If “0,” it signals the last subPDU.
- T (Type Field): This flag distinguishes between two types of subPDUs:
- If set to “0,” the subheader contains a Backoff Indicator, notifying the UE of the wait time before reattempting random access.
- If set to “1,” the subheader contains a RAPID, which helps identify the UE that initiated the random access request.
- R (Reserved Field): A bit that is reserved and always set to “0.”
- BI (Backoff Indicator): This 4-bit field identifies the level of network congestion and how long UEs should wait before trying random access again.
- RAPID (Random Access Preamble IDentifier): A 6-bit field that matches the Random Access Preamble sent by the UE. When the RAPID matches, the UE decodes the subPDU to extract resource allocation data.
Significance: The MAC subheader helps the network manage multiple UEs attempting random access simultaneously. It ensures the right response is delivered to the correct UE without collisions.
MAC Payload for Random Access Response
The MAC RAR (Random Access Response) payload carries the critical information the UE needs to continue communication with the network, such as timing adjustments and uplink resource allocation. Each MAC RAR has a fixed size and is associated with a specific UE, identified by its RAPID.
Fields in the MAC RAR:
- R (Reserved): A reserved bit, always set to “0.”
- Timing Advance Command: This 12-bit field instructs the UE to adjust its transmission timing to align with the network’s timing, ensuring synchronization. Timing advance is crucial in scenarios where UEs are at different distances from the base station, preventing interference.
- Uplink (UL) Grant: A 27-bit field that specifies the uplink resources (frequency, time, and power) the UE should use to send data back to the network.
- Temporary C-RNTI: A 16-bit field providing the UE with a temporary identifier for further communication during the random access procedure. This allows the network to address the UE during subsequent interactions before a permanent identifier is assigned.
The Random Access Response process in 5G NR ensures efficient and scalable handling of UEs that seek to communicate with the network. By utilizing well-structured MAC PDUs, subheaders, and payloads, the network can simultaneously manage multiple UEs, optimize resource allocation, and ensure that all UEs remain synchronized. Understanding these mechanisms is crucial for anyone working in 5G technologies, as they form the backbone of initial access and mobility management in the system.
For more details on RACH procedure, refer to the official 3GPP specifications TS 38.321.
Further Reading