5G(NR): Random Access Procedure


5G(NR): Random Access Procedure


         we will discuss in this blog about the initial access procedure. it is also known as an initial cell search procedure. cell search is a procedure by which a UE can synchronize with the time and frequency of a cell and scan and get the cell id of a cell. The basic concept and procedure of cell searches are the same in any cellular communication system. so in 5G procedure is the same. 


Introduction:
          RACH stands for Random Access Channel. This is the first message from UE to eNB when you power on just to get synchronized with the best listening cell. UE can apply the random access procedure by two types.

There are two types of RACH procedures.

1- Contention based RACH Procedure (CBRA):
           It is a normal procedure, in this UE randomly select the preamble in zadoff chu sequence and send the RACH request towards the network. 
2- Contention Free RACH Procedure (CFRA)
          In this procedure network itself share the details of cell and preamble, by using this UE sends the RACH request towards the network. generally used in the handover scenario. 

1- Contention based RA

        In this UE randomly select the preamble( out of 64 preambles defined in each time-frequency in 5G). So there are some possibilities that multiple UEs can send the PRACH with the same preamble id. in this case same PRACH preamble can be reached to the network from multiple UEs at the same time. so at this stage PRACH collisions occur and this type of PRACH collision is called "Contention" and the RACH process that allows this type of "Contention" is called "Contention based" RACH Process.

2- Contention Free RA
     But there are some cases that these kinds of contention is not acceptable due to some reason (e.g., timing restriction), and these contentions can be prevented. in these scenarios, the Network itself informs each UE of exactly when and which preamble indexes it has to use for PRACH. Of course, in this case, the Network will allocate these preamble indexes so that it would not collide. This kind of RACH process is called the “Contention Free – CFRA” RACH procedure.


 The RA procedure is triggered for below events:
* For Initial access from RRC_IDLE

* For RRC Connection Re-establishment procedure

* For Handover (Contention Based or Non-Contetion Based)

* For DL data arrival during RRC_CONNECTED requiring random access procedure
* For UL data arrival during RRC_CONNECTED requiring random access procedure

* For SR failure (CBRA)
For Beam failure recovery (CBRA or CFRA)





              As shown in the above figure, gNB (NR Base station) periodically transmits SS blocks carrying synchronization signals (PSS, SSS) and broadcast channels (PBCH) using beam sweeping. One SS block contains..
- 1 symbol PSS
- 1 symbol SSS
-  and 2 symbols PBCH.



 SSB carry one or multiple SS blocks. Both PSS and SSS combinations help to identify about 1008 physical cell identities.

   Now The UEs first listen to the SS Blocks and select an SS-Block(SSB) before selecting RA preamble. If available, the UE selects an SS Blocks for which the RSRP is reported above rsrp-ThresholdSSB for PRACH transmission, otherwise, UE selects any SSB.
UE always scans the radio signals and their measurements. so UE processes the beam measurements and detects the best beam during synchronization. so consecutively UE decodes 5G NR system information (MIB/SIB) on that beam. Minimum SI (System Informations) is carried onto the PBCH channel. 

Msg1 - PRACH Preamble:
UE find the good beam and during the synchronization process and uses this beam and attempts random access procedure by transmitting RACH preamble (Msg-1) on the configured RACH resource. The preamble is referenced with the Random Access Preamble Id (RAPID). The preamble transmission is a Zadoff-Chu sequence.

        The RA-RNTI associated with the PRACH occasion in which the Random Access Preamble is transmitted, is calculated as
=> RA-RNTI = 1 + s_id + 14 × t_id + 14 × 80 × f_Id + 14 × 80 × 8 × ul_carrier_Id
s_id(nStartSymbIndx): the index of the first OFDM symbol of the specified PRACH (0 <= s_id < 14). 
t_id(slot): index of the first slot symbol of the specified PRACH in a system frame (0 <= t_id < 80)  
f_id(nFreqIdx): the index of the the specified PRACH in the frequency domain(0 <= s_id < 8) 
ul_carrier_id (nULCarrier): UL carrier used for Msg1 transmission (0 = normal carrier, 1 = SUL carrier)
Above valuses are available in Rach request (PHY_LU_RACH_IND). in wiresharl logs it looks like as below.




Msg 2 - RAR (PDCCH/PDSCH ):
        After PRACH transmission, the Random Access Response procedure will happen. The gNB responds with RAR ("RA Response") message(Msg-2). 

=>  A UE tried to find out a DCI Format 1_0 with CRC scrambled by the RA-RNTI corresponding to the RACH transmission. The UE looks for a message during a configured window of length ra-ResponseWindow. 

=>The RAR-Window is configured by rar-WindowLength IE in a SIB message and in Contention free rach procedure RAR window length IE is present in rrcReconfiguration with sync msg.
=>The RA-RNTI scrambled with DCI message signals the frequency and time resources assigned for the transmission of the Transport Block containing the Random Access Response message.
=>The UE detects a DCI Format 1_0 with CRC scrambled by the corresponding RA-RNTI and receives a transport block in a corresponding PDSCH. The RAR carries the 
     -timing advance
     -uplink grant and 
     -the Temporary C-RNTI assignment.

=>If UE successfully decoded the PDCCH, it decodes PDSCH carrying RAR data.
Following is the MAC PDU data structure that carries RAR(Random Access Response)
in Wireshark logs it RAR looks like.




Msg3 (PUSCH):         MSG 3 Transmission From UE to network, before sending Msg3(RRC Setup Request), UE needs to be determined below things
=> UEs need to determine which uplink slot will be used for sending the MSG3(RRC Setup request).
=> UEs will find out the subcarrier spacing for Msg3 PUSCH from the RRC parameter called msg3-scs (Subcarrier Spacing).

=>UEs will send Msg3 PUSCH on the same serving cell to which it sent PRACH.

As per 38.214
Table 6.1.2.1.1-5 defines the additional subcarrier spacing specific slot delay value for the first transmission of PUSCH scheduled by the RAR. When the UE transmits a PUSCH scheduled by RAR, the Δ value specific to the PUSCH subcarrier spacing μPUSCH is applied in addition to the K2 value.



let's suppose RAR(Random access response) received at slot number 15 then-
MSG 3 Will be transmitted at = 15( RAR Slot)+ K2+Delta = 15+3+6=24

so UL_Config For MSG3 has been prepared by NR-MAC at Slot 24.


in Wireshark logs, it looks like


Msg4 - RRC Contention setup (PDCCH/PDSCH):

       After getting msg3(RRC Connection request) from the UE, the following things will happen before sending msg-4.

-Start ra-ContentionResolutionTimer
-If PDCCH is successfully decoded,
-decode PDSCH carrying the MAC CE
-Set C-RNTI = TC-RNTI
-discard ra-ContentionResolutionTimer
-consider this Random Access Procedure successfully completed
-UL Config Is being Prepared as per pusch_Configuration. 


CRC Status sent GNB – PHY to GNB-MAC is  PaSS. & UE gets attached successfully.





No comments:

Post a Comment