5G NR: 2-Step Random Access Procedure (Release-16)

1.            Introduction
As in the case of LTE, the RA procedure can take two distinct forms: Contention-Based Random Access (CBRA) and Contention-Free Random Access (CFRA).
The RA procedure is thoroughly discussed in the post 5G NR: Random Access Procedure. The CBRA procedure adopted in LTE as well as in NR-Release 15 is a 4-step procedure (Msg1, Msg2, Msg3 and Msg4).
With 4-step CBRA procedure, after transmitting PRACH preamble (Msg1), the UE should wait for an RA response (Msg2) from the network and then transmit PUSCH (Msg3). After receiving Msg3, the network resolves the contention in Msg4.
There are two optimization possibilities to reduce the latency involved in 4-step RA procedure:
1.      Reduce or completely avoid the time it takes for the UE to receive Msg2.
2.      Reduce or completely avoid the time it takes for the network to wait before transmitting Msg4.
3GPP in Release-16, has introduced a new RA type to implement the above said optimizations.
With 2-step CBRA procedure;
1.      PRACH (Msg1) and PUSCH (Msg3) are transmitted together and is named as MsgA.
2.      RAR (Msg2) and contention resolution (Msg4) transmitted together and is named as MsgB.
The new 2-step RA type not only reduces the latency involved in the overall RA procedure but also reduces the control signalling overhead.
The 3GPP in Release-16 has named legacy RA procedure as 4-step RA type or Type-1 RA procedure and the new 2-step RA procedure as 2-step RA type or Type-2 RA procedure.
One important point to note w.r.t. CFRA in 4-step RA type is that, even though CFRA procedure doesn’t have 4 steps (only steps-0, 1, 2), both CFRA and CBRA procedures fall under single RA type which is 4-step RA type.
Note the following important points w.r.t 2-step RA type:
1.    All triggers for 4-step RA type are considered valid for 2-step RA type too and no new trigger is defined for 2-step RA type in Release-16.
2.    It is applicable for RRC_INACTIVE , RRC_CONNECTED and RRC_IDLE states.
3.    Channel structure of MsgA is such that PRACH preamble and PUSCH carrying payload are transmitted in TDM fashion.
4.    The network should provide MCS(s) and time-frequency resource size(s) of PUSCH in MsgA in RRC configuration beforehand.
5.    MsgA-PUSCH contents are same as Msg3 contents of 4-step RA type.
6.    MsgB contents are similar to that of combined Msg2 and Msg4 contents of 4-step RA type.
7.    A new RNTI is defined in Release-16 for MsgB reception - MsgB-RNTI.
Similar to 4-step RA type, both CBRA and CFRA procedures are possible in 2-step RA type too. 4-step RA type is briefly discussed in the next section and 2-step RA type is discussed in Section 3.

2                       4-step RA type
4-step RA type is thoroughly discussed in the post 5G NR: Random Access Procedure.
Both CBRA and CFRA procedural flows with 4-step RA type are shown below.




In 4-step RA type CBRA, the UE randomly selects an RA preamble from a pool of preambles shared with other UEs in the cell. If multiple UEs transmit same preamble, all those UEs decode same RA response content and transmit PUSCH on the same UL time/frequency resources. In the last step, the network resolves the contention.
-   The RA preamble transmission is known as Msg1.
-   The random-access response (RAR) is known as Msg2.
-   The PUSCH carrying uplink data using the UL Grant received in Msg2 is known as Msg3.
-   The contention resolution is known as Msg4.
In CFRA, the UE uses a dedicated preamble provided by the network specifically to this UE via RRC signaling or PDCCH order.
-      The RA preamble transmission is known as Msg1.
-      The random-access response (RAR) is known as Msg2.

3                       2-step RA Type
In 2-step RA type (shown below), as the name indicates, there are only two steps involved.

Both CBRA and CFRA procedures are defined even in this new RA type.
3.1    CBRA in 2-step RA Type:
-      In both CBRA and CFRA procedures, MsgA includes a preamble transmission on PRACH and a payload transmission on PUSCH. In 4-step RA type, the UE never transmits a PUSCH before receiving Msg2 (RAR).
-      Note the name ‘MsgA’ is used here instead of ‘Msg1’.
-      After MsgA transmission, the UE monitors for a response from the network within a configured window (configured by RRC parameter msgB-ResponseWindow-r16).
-      If contention resolution is successful upon receiving the network response, the UE ends the RA procedure as shown in Fig C above.
-      In 2-step RA type, the RA response and the contention resolution together are known as MsgB where as Msg2+Msg4 are used in 4-step RA type.
-      In some cases, within MsgB, the network may ask the UE to fallback to 4-step RA type. Then the UE performs Msg3 transmission and monitors contention resolution. If contention resolution is not successful after Msg3 (re-)transmission(s), the UE goes back to MsgA transmission i.e., switches back to 2-step RA type.
-      If the RA procedure with 2-step RA type is not completed after a number of MsgA transmissions, the UE can be configured to switch to CBRA with 4-step RA type. This is explained in later sections.
3.2    CFRA in 2-step RA Type:
-      In both CBRA and CFRA procedures, MsgA includes a preamble transmission on PRACH and a payload transmission on PUSCH. In 4-step RA type, the UE never transmits a PUSCH before receiving Msg2 (RAR).
-      Note ‘MsgA’ is used here instead of ‘Msg1’.
-      After MsgA transmission, the UE monitors for a response from the network within a configured window (msgB-ResponseWindow-r16).
-      For CFRA, upon receiving the network response, the UE ends the RA procedure as shown in Fig D above. In this case, the response to MsgA is known as MsgB unlike Msg2 in the case of 4-step RA type.
-      If the RA procedure with 2-step RA type is not completed after a number of MsgA transmissions, the UE can be configured to switch to CBRA with 4-step RA type. This is explained in later sections.

4                       Selection between 2-step and 4-step RA Types
The UE selects 2-step or 4-step RA type at the initiation of the RA procedure based on network configuration:
CBRA case:
-      When both 4-step and 2-step RA types are configured by the network, an RSRP threshold is used by the UE to select between 2-step RA type and 4-step RA type. The RSRP threshold is configured by the field msgA-RSRP-Threshold.
-      If the RSRP is above this threshold, the UE select 2-step RA type otherwise, 4-step RA type is chosen.
CFRA case:
-      When CFRA resources for 4-step RA type are configured, the UE performs random access with 4-step RA type.
-      When CFRA resources for 2-step RA type are configured, UE performs random access with 2-step RA type.
-      The network does not configure CFRA resources for both 4-step and 2-step RA types at the same time.
-      CFRA with 2-step RA type is only supported for handover.
For random access in a cell configured with Supplementary Uplink (SUL), the network can explicitly signal which carrier to use (UL or SUL). Otherwise, the UE selects the SUL carrier if and only if the measured quality of the DL is lower than a broadcast threshold.
-      UE performs carrier (UL or SUL) selection before selecting between 2-step and 4-step RA type. The RSRP threshold (msgA-RSRP-Threshold) for selecting between 2-step and 4-step RA type can be configured separately for UL and SUL.

5                       MsgA Transmission
As discussed already, the MsgA transmission consists of PRACH preamble transmission (MsgA-PRACH) and a PUSCH payload transmission (MsgA-PUSCH).
The procedure for selecting PRACH resources is similar to that of 4-step RA type but using the 2-step RA type associated parameters.
The UE transmits PUSCH after the transmission of PRACH (TDM). The transmission of PUSCH is after the PRACH transmission by at least N symbols where the value of N depends upon SCS of the active UL BWP (as given below).
µ
SCS (kHz) 
N
0
15
2
1
30
2
2
60
4
3
120
4

The actual time offset between PUSCH and the start of each PRACH slot is configured by msgA-PUSCH-TimeDomainOffset. The first PUSCH occasion (PO) in each slot is defined by SLIV which is configured by startSymbolAndLength-MsgAPO.
Of course, a PUSCH will be transmitted only in UL symbols (per UL-DL configuration).
The time and frequency resource allocation of PRACH and PUSCH will be discussed in a separate post.
Once MsgA is transmitted, the UE should monitor for RA response. The UE uses RA_RNTI in 4-step RA type whereas in 2-step RA type, MsgB-RNTI is used. As can be seen below, the calculation of MsgB-RNTI is almost similar to that of RA-RNTI.
MsgB-RNTI = 1 + s_id + 14×t_id + 14×80×f_id + 14×80×8×ul_carrier_id + 14×80×8×2
where s_id is the index of the first OFDM symbol of the PRACH occasion (0 ≤ s_id < 14), t_id is the index of the first slot of the PRACH occasion (RO) in a system frame (0 ≤ t_id < 80), f_id is the index of the RO in the frequency domain (0 ≤ f_id < 8), and ul_carrier_id is the UL carrier used for RA preamble transmission (0 for NUL carrier, and 1 for SUL carrier).
Contents of MsgA:
The contents of MsgA are similar to the contents of Msg3 when using 4-step RA type. For full details about the contents of Msg3, see here. In a broad sense, the contents of the MsgA/Msg3 are of two types as described below;
1.      The UE may already have a C-RNTI (e.g. UE in RRC_CONNECTED) at the time of RA procedure initiation. Ex:  RA procedure was initiated by a PDCCH order, during CFRA initiated by synchronous RRC reconfiguration (e.g. handover) etc…
-       In this case, the UE would send C-RNTI MAC CE within MsgA/Msg3. Depending upon the scenario in which RA procedure is triggered, the UE may also include additional information such as RRCReconfigurationComplete.
2.      The UE didn’t have a C-RNTI at the time of RA procedure initiation, e.g., during RRC connection re-establishment procedure, RRC connection resumption procedure etc…
-       In this case, the UE would send CCCH SDU in MsgA/Msg3…e.g., RRCResumeRequest, RRCReestablishmentRequest etc…

6                       MsgB Reception and Contention Resolution
After transmission of MsgA (PRACH and PUSCH), the UE needs to monitor for a RA response. Similar to 4-step RA type, an RA response window is defined by the field msgB-ResponseWindow.
The RA response window starts at least one symbol after the last symbol of the PUSCH occasion corresponding to the MsgA-PUSCH transmission and lasts for the duration configured by msgB-ResponseWindow. The window length can be configured to be 1, 2, 4, 8, 10, 20, 40, 80, 160, or 320 slots.
During msgB-ResponseWindow, the UE attempts to detect DCI format 1_0 with CRC scrambled by a corresponding MsgB-RNTI/C-RNTI.
-      If C-RNTI MAC CE was included in MsgA, the UE monitors PDCCH on C-RNTI.
-      If C-RNTI MAC CE was not included in MsgA, UE monitors PDCCH on MsgB-RNTI.
As shown below in the overall flow diagram, there are two possible scenarios depending upon whether the UE receives MsgB successfully or not.















Scenario1: UE receives MsgB successfully:
The steps that the UE follow after receiving MsgB depends upon the contents of MsgA that the UE has sent to the gNB and there by the RNTI used by the gNB for MsgB.
1.     Random Access Response is received on C-RNTI:
If UE has included C-RNTI MAC CE in MsgA, after receiving MsgB, the UE considers that RA procedure is successfully completed. The procedure ends here.
-      In this case, the response from the network could be an uplink grant or downlink assignment addressed to C-RNTI. Additionally, if gNB wants to adjust UE’s uplink timing, it may send Absolute Timing Advance Command MAC CE subPDU.

2.     Random Access Response is received on MsgB-RNTI:
If UE has not included C-RNTI MAC CE in MsgA, the response from the network (PDCCH) is addressed MsgB-RNTI.
MsgB contents could be fallbackRAR or successRAR or Backoff Indicator (BI). The UE procedure when ‘BI’ is received is same as that of 4-step RA type. If the UE receives fallbackRAR or successRAR, the procedure is explained below in Case1 and Case2 respectively.
Case1 - The gNB is not able decode MsgA-PUSCH correctly (fallbackRAR):
It is possible that the network detects MsgA-PRACH preamble but not able to decode MsgA-PUSCH correctly. In this case, the network would order the UE to fallback to 4-step RA type by transmitting a required grant for transmission Msg3 => This is basically retransmission of MsgA-PUSCH using Msg3 of 4-step RA type.
How the UE would know if the network is ordering the UE to fallback? If the MsgB contains fallbackRAR MAC subPDU (new in Release-16), the UE understands that it has to switch to Msg3 transmission.
It is important to note that if the 2-step RA type was initiated as CFRA procedure, then the UE considers the RA procedure is successful even if it has received fallbackRAR. The RA procedure ends here.
The following sequence diagram illustrates the fallback procedure for CBRA case;

A fallbackRAR consists of a RAPID, an uplink grant to transmit the Msg3, Timing Advance Command and Temporary C-RNTI.
When MsgB is received, the UE first checks if the received RAPID matches the transmitted preamble ID (MsgA-PRACH). If a match is found, the UE processes the TA Command and applies the UL Grant for transmission of Msg3 using the received Temporary C-RNTI.
As shown below, the structure of fallbackRAR MAC subPDU is similar to the one with MAC RAR (4-type RA type).

After Msg3 transmission and possible re-transmission(s), if the contention resolution is still not successful, the UE goes back to MsgA transmission.

Case2 - The gNB successfully decodes MsgA-PUSCH (successRAR):
In this case, the gNB would transmit a successRAR MAC subPDU within MsgB. The successRAR MAC subPDU (new in Release-16) contents are shown below.










-   UE Contention Resolution Identity: This field contains the UL CCCH SDU. If the UL CCCH SDU is longer than 48 bits, it contains the first 48 bits of the UL CCCH SDU.
-   R: Reserved bit, set to "0".
-   TPC (2-bits): The TPC command for the PUCCH resource containing HARQ feedback for MsgB.
-   HARQ Feedback Timing Indicator (3-bits): The PDSCH-to-HARQ feedback timing indicator field for MsgB HARQ feedback.
-   PUCCH Resource Indicator (4-bits): The PUCCH resource indicator for HARQ feedback for MsgB.
-   Timing Advance Command (12-bits): This field indicates the amount of timing adjustment to applied for further UE transmissions.
-   C-RNTI (16-bits): C-RNTI to be used by the UE upon completion of Random Access.
After receiving the successRAR MAC subPDU, the UE processes the Timing Advance Command, and PUCCH resource Indicator and HARQ feedback Timing Indicator and used in transmitting MsgB HARQ feedback using PUCCH.
More importantly, the UE checks if the CCCH SDU included in the MsgA and the received Contention Resolution Identity matches. If both are matched, the UE considers the RA procedure is successfully completed. Otherwise, the procedure that the UE follows to retransmit RA preamble is illustrated in the overall flow diagram discussed in the beginning of this section.
The following sequence diagram shows a successful 2-step RA type.










Scenario2: UE did not receive MsgB:
In case if the gNB could not detect UE’s Msg1-PRACH preamble, the UE doesn’t receive any response (MsgB) from the gNB. In this case, the UE would continue to decode until the expiry of msgB-ResponseWindow.
If the UE doesn’t receive a valid response from the network during the msgB-ResponseWindow, the UE either re-transmits MsgA or falls back to 4-step RA type and starts transmitting Msg1.
The field msgA-TransMax defines maximum number of MsgA preamble transmissions performed before switching to 4-step RA type. If this field is configured, the UE retransmits MsgA for msgA-TransMax-1 times and then falls back to 4-step RA type.
Once switched to 4-step RA type, the UE starts to transmit Msg1 and still if no response is received from the network, it would continue to re-transmit Msg1 until total number of preamble transmissions (MsgA+Msg1 attempts) reach the value configured by preambleTransMax.
It is important to note that if the original 2-step RA type is CFRA, when RA type is switched to 4-step RA type, the UE discards the dedicated preamble and switches to CBRA procedure.
The following flow diagram explains the algorithm described above.












7                       RRC Configuration for 2-step RA Type
As far as the RRC configuration is concerned, almost all the IEs required for 4-step RA type are required for 2-step RA type too. 3GPP Release 16 has introduced new IE structures for 2-step RA type which are similar to that of 4-step RA type.
In 2-step RA type, PUSCH is transmitted without waiting for a response from the network, hence the UE needs to know PUSCH configuration beforehand. The configuration for PUSCH is given in the IE msgA-PUSCH-Config.
As shown below, a couple of new IEs have been added to BWP-UplinkCommon IE.
BWP-UplinkCommon
genericParameters
BWP
rach-ConfigCommon
SetupRelease { RACH-ConfigCommon }
pusch-ConfigCommon
SetupRelease { PUSCH-ConfigCommon }
pucch-ConfigCommon
SetupRelease { PUCCH-ConfigCommon }
rach-ConfigCommonTwoStepRA-r16      
SetupRelease { RACH-ConfigCommonTwoStepRA-r16 }
msgA-PUSCH-Config-r16
SetupRelease { MsgA-PUSCH-Config-r16 }

rach-ConfigCommonTwoStepRA
-      This IE provides configuration of cell-specific RA parameters which the UE uses for both CBRA and CFRA.
-      Moreover, the network configures this IE whenever it configures CFRA with 2-step RA type (for reconfiguration with sync).
-      The structure of the IE rach-ConfigCommonTwoStepRA is similar to that of RACH-ConfigCommon IE which is meant for 4-step RA type.
-      An important field in this IE is msgA-RSRP-Threshold. The UE selects 2-step RA type based on this threshold.
RACH-ConfigGenericTwoStepRA
-      This IE is configured as part of rach-ConfigCommonTwoStepRA and provides generic RA configuration (as shown below). This IE contains information such as PRACH configuration (MsgA), preamble power ramping step size, frequency resources for PRACH, RA response window for MsgB etc…
RACH-ConfigGenericTwoStepRA
msgA-PRACH-ConfigurationIndex-r16
INTEGER  (0..262)
msgA-RO-FDM-r16
ENUMERATED { one, two, four, eight }
msgA-RO-FrequencyStart-r16
INTEGER  (0..274)
msgA-ZeroCorrelationZoneConfig-r16
INTEGER  (0..15)
msgA-PreamblePowerRampingStep-r16
ENUMERATED { 0dB, 2dB, 4dB, 6dB }
msgA-PreambleReceivedTargetPower-r16
INTEGER  (-202..-60)
msgB-ResponseWindow-r16 (in slots)
ENUMERATED { 1, 2, 4, 8, 10, 20, 40, 80, 160, 320 }
preambleTransMax-r16
ENUMERATED { 3, 4, 5, 6, 7, 8, 10, 20, 50, 100, 200 }
msgA-TransMax-r16
ENUMERATED { 1, 2, 4, 6, 8, 10, 20, 50, 100, 200 }

msgA-PUSCH-Config
-      This IE is used to specify the PUSCH allocation for MsgA in 2-step RA type. It provides the UE with all needed configuration for PUSCH transmission such as time/frequency domain resource, DMRS type, MCS, PUSCH Tx power related parameters etc…
-      This IE needs to be configured separately for CFRA and CBRA.
-      For CBRA, the IE msgA-PUSCH-Config is configured as part of BWP-UplinkCommon IE.
-      For CFRA, the IE msgA-PUSCH-Config is configured as part of the IE CFRA-TwoStep (discussed later) within RACH-ConfigDedicated.
-      The structure of the IE msgA-PUSCH-Config is given below;
MsgA-PUSCH-Config-r16
msgA-PUSCH-ResourceList-r16
SEQUENCE (size(1..2)) OF MsgA-DMRS-Config-r16-r16
msgA-TransmformPrecoder-r16
ENUMERATED { enabled, disabled }
msgA-DataScramblingIndex-r16
INTEGER  (0..1023)
msgA-DeltaPreamble-r16
INTEGER  (-1..6)
MsgA-PUSCH-Resource-r16
msgA-PUSCH-PreambleGroup-r16
ENUMERATED { groupA, groupB }
msgA-MCS-r16
INTEGER  (0..15)
nrofSlotsMsgA-PUSCH-r16
INTEGER  (1..4)
nrofMsgA-PO-PerSlot-r16
ENUMERATED { one, two, three, six }
msgA-PUSCH-TimeDomainOffset-r16
INTEGER  (1..32)
msgA-PUSCH-TimeDomainAllocation-r16
INTEGER  (1..64)
startSymbolAndLengthMsgA-PO-r16
INTEGER  (0..127)
mappingTypeMsgA-PUSCH-r16
ENUMERATED { typeA, typeB }
guardPeriodMsgA-PUSCH-r16
INTEGER  (0..3)
guardBandMsgA-PUSCH-r16
INTEGER  (0..1)
frequencyStartMsgA-PUSCH-r16
INTEGER  (0..274)
nrofPRBs-PerMsgA-PO-r16
INTEGER  (1..32)
nrofMsgA-PO-FDM-r16
ENUMERATED { one, two, four, eight }
msgA-IntraSlotFrequencyHopping-r16
ENUMERATED { enabled }
msgA-HoppingBits-r16
BIT STRING (SIZE(2))
msgA-DMRS-Config-r16
MsgA-DMRS-Config-r16
 . . . 


CFRA-TwoStep-r16
-      This IE is used to specify configuration of CFRA for 2-step RA type and is part of RACH-ConfigDedicated which is provided as part of reconfiguration with sync (e.g. Handover).










Reference: 3GPP TS 38.213 (v16.1.0), 38.321 (v16.1.0), 38.300 (v16.1.0), and 38.331 (v16.0.0)