4-Step RA and 2-Step RA in 5G-NR
Ajay Kumar Singh
Technical Lead-SIT |Experienced Telecom Testing Professional with Expertise in 2G | 3G | LTE | 5G NR-SA/NSA | Protocol Testing | UE logs Analysis| RAN/ORAN Testing | RF Planning and Optimization
#Random Access Procedure: - In Telecommunication a base-station (eNB/gNB) allows multiple UEs to randomly access the network at the same time known as Random Access.
For Random Access the gNB generates a set of 64 Random Access Preambles using Zadoff-Chu Sequence generation method.
As multiple UEs can select the preamble from a group of available preambles there is a chance that the multiple UEs picks the same preamble at the same time for RACH. This could lead to the collision where the gNB will allow the access to only one UE leaving other UEs to re-attempt the RACH again.
In the cases of connected mode mobility (Handover) it is necessary that the UE completes the RACH to target cell without any issue, hence some of the preambles are reserved and transmitted to the UEs during Handover process only. This leads out two types of RACH Process as mentioned below.
1.?????Contention based Random Access (CBRA)
2.?????Contention Free Random Access (CFRA)
Contention based Random Access:
In the case of Contention-based procedure, UE selects a Random-access preamble from a group of available preambles which are shared to all the UE's. There is a possibility at a given time two UE's might select the same Random-access preamble and transmit to gNB at the same time which might result in collision or contention at the gNB.
Contention Free Random Access:
In the case of contention-free random-access procedure, gNB allocates a dedicated random-access preamble to UE which removes the possibility of collision. Like out of 64 available preambles the gNB reserve few preambles for CFRA to be used during Handover.
->> Based on number of steps required to perform RACH Process, it has been classified into two types of RACH Process: -
1.?????4-STEP RACH Process??????????????2.???????2-STEP RACH Process
Till 3gpp Rel.15 we have 4-Step Process only available but 3gpp Rel.16 introduces 2-Step RACH Process that aims to improve the overall latency of the RACH procedure as compared to 4-Step RACH Process by reducing the Control Signalling overhead at the gNB.
1.??4-step RACH process: -
Now, to perform Random Access the UE need to select a preamble.
There are two Groups of RA-Preambles defined.
1.?????RA-preamble Group A
2.?????RA-preamble Group B
-ra-Msg3SizeGroupA: the threshold to determine the groups of Random Access Preambles
-msg3-DeltaPreamble: ?PREAMBLE_Msg3
-messagePowerOffsetGroupB: the power offset for preamble selection.
-numberOfRA-PreamblesGroupA: As per 3gpp Spec. 38.321 ,the value given by this parameter indicates the first numbers of Random Access Preambles belong to Random Access Preambles group A. The remaining Random Access Preambles associated with the SSB belong to Random Access Preambles Group B (if configured). If Random Access Preambles Group B is supported by the cell and SSBs are mapped to Random Access Preambles, Random Access Preambles Group B is included in each SSB.
<< Conditions to transmit Group B >>
-->>if Msg3 has not yet been transmitted:
if Random Access Preambles Group B is configured:
{
if the potential Msg3 size (UL data available for transmission + MAC header and, where required, MAC CEs) is greater than ra-Msg3SizeGroupA and the pathloss is less than PCMAX (of the Serving Cell performing the Random Access Procedure) – preambleReceivedTargetPower – msg3- DeltaPreamble – messagePowerOffsetGroupB;
or
if the Random Access procedure was initiated for the CCCH logical channel and the CCCH SDU size + MAC subheader is greater than ra-Msg3SizeGroupA:
select the Random Access Preambles Group B.
else:
select the Random Access Preambles group A.
}
else:
select the Random Access Preambles group A.
->> If Msg3 is being retransmitted:
select the same group of Random Access Preambles as was used for the Random Access Preamble transmission attempt corresponding to the first transmission of Msg3.
From above conditions it can be concluded that:
The configuration and parameters required to initiate RACH is explained in
https://www.dhirubhai.net/pulse/rach-5g-nr-ajay-kumar-singh
#MSG1 (Random Access Preamble): UE selects a preamble from the set of preambles generated as per PRACH parameters sent by gNB in SIB1 and send MSG1 (Random Access Preamble) on PRACH Channel. The UE also calculates the RA-RNTI based on below formula (As per 3gpp Spec. 38.321 [5.1.3]) and save it.
RA-RNTI = 1 + s_id + 14 × t_id + 14 × 80 × f_id + 14 × 80 × 8 × ul_carrier_id
Frequency domain location (resource) for PRACH Preamble is determined by the RRC parameter?msg1-FDM?and?msg1-FrequencyStart
Time domain location (resource) for PRACH Preamble is determined by the RRC parameter?prach-ConfigurationIndex.
#MSG2 (Random Access Response): The gNB after receiving the Msg-1 calculates the RA-RNTI using the same formula mentioned above and scramble it with CRC of DCI Format 1_0 and send it on Type 1-PDCCH.
The UE then start monitoring Type 1-PDCCH for the window size mentioned in ra-ResponseWindow in SIB1. If UE successfully decode the PDCCH then it decodes the PDSCH carrying RAR data.
The MAC entity may stop the timer ra-ResponseWindow after successful reception of a RAR containing Random Access Preamble identifiers that matches the transmitted PREAMBLE_INDEX. (HARQ operation is not applicable to the Random Access Response transmission).
RAR is sent in MAC-PDU also known as MAC-RAR PDU. The header of MAC-RAR PDU carries the subheaders consisting of the BI (Backoff Indicator) and multiple RAPID .The payload part of MAC-RAR PDU carries the TA command, UL Grant and Temporary C-RNTI for respective RAPID. After decoding RAR, UE check if RAPID in RAR PDU matches the RAPID assigned to the UE.
If UE does not receive the Msg2 within ra-ResponseWindow size, then the UE again send the Msg1 with power ramped up with the step mentioned by powerRampingStep until it receives the Msg2 or the max. attempts of transmitting msg1 reaches the preambleTransMax value. Please note that power ramping is not possible if UE is already using it Max. power (Pmax.) for sending the Msg1.
Also, if the UE receive the Msg2 and the RAPID in the Msg2 does not matches with the preamble sent in Msg1 by the UE then the UE will consider it as Msg1 failure and wait for the time mentioned by BI (Backoff indicator) in Msg2 and re-attempt the PRACH.
#MSG3 (Scheduled Transmission): The UE after receiving the Msg2 uses the UL grant provided in Msg2 to send Msg3 on PUSCH.
The Msg3 will be sent on PUSCH along with RRC Message – RRC setup Request carrying IEs: UE Identity & Establishment cause.
The UE will send Msg3 on PUSCH and start ra-ContentionResolutionTimer
Now the question is when the UE will send the Msg3 after receiving the Msg2?
“If in slot ‘n’ a UE receives a PDSCH with a RAR message for a corresponding PRACH transmission from the UE, the UE transmits an Msg3 PUSCH in slot n + k2 + Δ “[3gpp Spec. 38.213 8.3]
Where Δ is the additional subcarrier spacing specific slot delay value for the first transmission of MSG3 scheduled by the RAR. When the UE transmits a MSG3 scheduled by RAR, the Δ value specific to MSG3 subcarrier spacing μPUSCH is applied in addition to the K2 value. Refer Table 6.1.2.1.1-5 of 3gpp Spec. 38.214
From the Msg2 UL grant we can see the size of Msg3 PUSCH time resource allocation is 4 bits (Range 0….15). From the above logs of Msg2 we can see that the value of Msg3 PUSCH time resource allocation is “4”, now we need to go to SIB1 and check the logs for pusch-ConfigCommon and select the item 4 where value of k2 is 5
So, the Msg3 will be sent after 11 slots {k2+ Δ = 5+ 6 (Considering SCS=120Khz)} once Msg2 is received.
Please note: if?pusch-ConfigCommon?includes?pusch-TimeDomainAllocationList:
then use table defined by?pusch-TimeDomainAllocationList, where the possible values of?k2?is between 0 and 32.
else: use the default A table as shown below.
The UE may assume a minimum time between the last symbol of a PDSCH reception conveying a RAR message with a RAR UL grant and the first symbol of a corresponding PUSCH transmission scheduled by the RAR UL grant is equal to?
?????????????????????????????????????????NT,1?+ NT,2?+ 0.5 msec, where:
MSG3 timing: minimum time between RAR and PUSCH
领英推荐
#MSG4 (Contention Resolution): After reception of Msg3 the gNB sends PDCCH carrying DCI format 1_0 with CRC scrambled by a corresponding TC-RNTI scheduling a PDSCH that includes a UE contention resolution identity.
The UE decodes the MSG4 and if the UE contention resolution identity sent in MSG4 matches with the UE identity used in MSG3 then it is considered that contention resolution is successful and ra-ContentionResolutionTimer will be stopped.
If UE does not receive the MSG4 and ra-ContentionResolutionTimer expires, then the UE will send Msg1 again after waiting for time specified by backoff indicator in Msg2.
2. 2-step RACH process: -
The two steps of 2-Step RACH process are: -
The UE perform Step-2 RACH process only if the parameters related to Step-2 RACH process are configured in SIB1 and below conditions are satisfied.
As in 2-step RA, MsgA consists of the contents of Msg1+Msg3, the UE needs PUSCH occasion as well in addition to the PRACH occasion.
The UE selects the PUSCH occasion corresponding to the selected preamble and PRACH occasion and determine the UL grant and associated HARQ information for the MsgA payload according to the selected PUSCH and perform the MsgA transmission procedure. So, the task of UE is to first select the PRACH preamble from PRACH occasion and then select the PUSCH occasion.
PRACH Preamble selection: -
The UE identifies the PRACH occasion and select PRACH preamble as per the configuration configured in SIB1-RACH-ConigCommonTwoStepRA
Like 4-Step RA, in the case of 2-Step RA also the UE identifies the preamble Group to be selected for preamble based on below criteria.
->> if Random Access Preambles Group A for 2-step RA type is configured then select the Random Access Preambles group A.
->> if Random Access Preambles Group B for 2-step RA type is configured:
{
if the potential MsgA payload size (UL data available for transmission + MAC header and, where required, MAC CEs) is greater than the ra-Msg-ASizeGroupA
and the pathloss is less than PCMAX (of the Serving Cell performing the Random Access Procedure) – msgA-PreambleReceivedTargetPower – msgA-DeltaPreamble – msgA-messagePowerOffsetGroupB;
or
if the Random Access procedure was initiated for the CCCH logical channel and the CCCH SDU size + MAC subheader is greater than ra-MsgA-SizeGroupA:
select the Random Access Preambles group B.
else:
select the Random Access Preambles group A.
}
PUSCH Occasion selection:
The parameters for PUSCH occasion configured in SIB1 are mentioned below:?
msgA-PUSCH-Config: - A UE uses it to determines time resources and frequency resources for PUSCH occasions in an active transmitted in Active / Initial BWP.
Please note: A PUSCH occasion is valid if it does not overlap in time and frequency with any valid PRACH occasion.
For 2-Step RA, a UE first transmits the PRACH and then after “N” symbols it transmits the PUSCH. Where N is dependent on SCS of active UL BWP and given as.
A UE does not transmit a PUSCH in a PUSCH occasion if the PUSCH occasion associated with a DMRS resource is not mapped to a preamble of valid PRACH occasions or if the associated PRACH preamble is not transmitted. A mapping between one or multiple PRACH preambles and a PUSCH occasion associated with a DMRS resource is as per PUSCH configuration.
#MsgA: UE after selecting the preamble sends the MsgA to the gNB with the selected preamble and PUSCH payload. The content of MsgA-PUSCH is same as Msg3 contents of 4-Step RA i.e., UE identity and Establishment cause.
The RA-RNTI associated with the PRACH occasion in which the Random Access Preamble is transmitted, is computed as:
RA-RNTI = 1 + s_id + 14 × t_id + 14 × 80 × f_id + 14 × 80 × 8 × ul_carrier_id
UE send the MSGA as per parameters defined in SIB1 under RACH-ConigCommonTwoStepRA
#MsgB: The UE after sending MSGA starts the msgB-ResponseWindow and start monitoring for Type-1 PDCCH carrying DCI format 1_0 with CRC scrambled MsgB-RNTI or C-RNTI while the msgBResponseWindow is running.
Now there are two conditions based on what type of RNTI is carried by DCI format 1_0
i.)?DCI format 1_0 with CRC scrambled by MsgB-RNTI
If the UE detects the DCI format 1_0, with CRC scrambled by the corresponding MsgB-RNTI and LSBs of a SFN field in the DCI format 1_0 is same as corresponding LSBs of the SFN where the UE transmitted PRACH, and the UE receives a transport block in a corresponding PDSCH within the window, the UE passes the transport block to higher layers.
The higher layer then,
->> if the MsgB contains a MAC subPDU with Backoff Indicator then set the PREAMBLE_BACKOFF to value of the BI field of the MAC subPDU using Table 7.2-1, multiplied with SCALING_FACTOR_BI else set the PREAMBLE_BACKOFF to 0ms.
->> if the MsgB contains a fallbackRAR MAC subPDU and if the RAPID in the MAC subPDU matches the transmitted PREAMBLE_INDEX in MsgA then consider this Random Access Response reception successful and apply the following actions ?
->> if the MsgB contains a successRAR MAC subPDU and if the CCCH SDU was included in the MsgA and the UE Contention Resolution Identity in the MAC subPDU matches the CCCH SDU then consider this Random Access Response reception successful. Stop msgB-ResponseWindow and set the C-RNTI to the value received in the successRAR apply the following actions
The lower layer then makes the transmission of a PUCCH with HARQ-ACK information having ACK value if the RAR message(s) is for successRAR, where
- a PUCCH resource for the transmission of the PUCCH is indicated by PUCCH resource indicator field of 4 bits in the successRAR from a PUCCH resource set that is provided by pucch-ResourceCommon. [38.214 Table 9.2.1-1]
- a slot for the PUCCH transmission is indicated by a HARQ Feedback Timing Indicator field of 3 bits in the successRAR having a value k from {1, 2, 3, 4, 5, 6, 7, 8} and, with reference to slots for PUCCH transmission having duration Tslot , the slot is determined as n + k + ?, where n is a slot of the PDSCH reception and ? is as defined for PUSCH transmission in Table 6.1.2.1.1-5 of [6, TS 38.214].
The PUCCH transmission should happen before NT,1 + 0.5 msec after the last symbol of the PDSCH reception, where NT,1 is the PDSCH processing time for UE processing capability 1 [6, TS 38.214]?
ii.)??DCI format 1_0 with CRC scrambled by C-RNTI
If the UE detects the DCI format 1_0 with CRC scrambled by a C-RNTI and a transport block in a corresponding PDSCH within the window, the UE passes the transport block to higher layers.
The higher layer then,
->> If it contains UL grant for a new transmission, consider this RAR reception successful, stop the msgB-ResponseWindow and consider this Random Access procedure successfully completed.
->> if the MAC PDU contains the Absolute Timing Advance Command MAC CE subPDU then process the received Timing Advance Command, consider this RAR reception successful, stop the msgB-ResponseWindow and consider this Random Access procedure successfully completed.
?MAC PDU (MsgB)
A MAC PDU consists of one or more MAC subPDUs and optionally padding. Each MAC subPDU consists one of the following:
- a MAC subheader with Backoff Indicator only
- a MAC subheader and fallbackRAR
- a MAC subheader and successRAR
- a MAC subheader and MAC SDU for CCCH or DCCH
- a MAC subheader and padding.
Now, if msgB-ResponseWindow expires, and the Random Access Response Reception has not been considered as successful based on descriptions above then increment PREAMBLE_TRANSMISSION_COUNTER by 1 then reattempt the process and if PREAMBLE_TRANSMISSION_COUNTER = preambleTransMax + 1 then indicate a Random Access problem to upper layers and consider this Random Access procedure unsuccessfully completed.
If the Random Access procedure is not completed and if msgA-TransMax is applied and PREAMBLE_TRANSMISSION_COUNTER = msgATransMax + 1 then set the RA_TYPE to 4-stepRA and start 4-step RA.
Senior Wireless Design Engineer
3 个月Hey Can I know the which release version are are is this reference to ?
Senior Software Engineer specializing in 5G NR SW Development at Qualcomm
10 个月nice