Through initial access, the device was able to find out the cell. Now with the random access procedure, the device will be able to access the cell. It was triggered in some different scenarios such as
i) whenever the UE goes from RRC idle to RRC connected mode (maybe due to the device getting switched ON or entering the new coverage area after a while or the first time).
ii) if there is some uplink data to be sent so it needs to request the resources to proceed then this procedure is used
iii) if somehow the synchronization is lost maybe due to inactivity from a device over a long time then this procedure is used
iv) when the synchronization is to be established with a new cell during the handover process then this procedure can be used.
Random access procedure can be accepted in two distinctive ways, such as
Step 1: The UE has to select the preamble randomly from the pool of resources which was shared with other UE and transmit the preamble. Now, there is some designated slot where the UE was only able to send the random access preamble known as PRACH. Now, the UE is synchronized and also has system information, it was able to locate these designated slots and after finding them, then transmit the random access preamble in the appropriate places.
Now all the transmissions are controlled by the network with respect to timing adjustment command and power control. Whenever there was the first uplink transmission, there is no such timing adjustment information available to the UE. So in that case, based on the timing received from the secondary synchronization block, the UE estimate the time for sending the preamble. If the timing estimate is correct it means that the preamble is transmitted successfully.
And somehow if there is some delay, then in such cases the preamble can interfere with another transmission because the timing of the preamble has not been exactly with the given slot. To overcome this, guard time is added in that slot to overcome the chances of having a collision with the other transmission. If there is a small cell then the guard time is also small and for the large cell, the guard time is large. The UE can also estimate the transmission power based on the received power from the secondary synchronization block similar to the timing estimation.
But this is not adequate power therefore there was a power ramping mechanism where the preamble may be repeated with the transmission power increasing during each retransmission. After lots of predefined attempts have been done, if there is no response, then the random access attempt is considered a failure. If one of the power is retransmission, the random access will move towards the further step.
Step 2: When the UE sends the random access preamble, it will wait for the random access response. This response will be given by the network with the information like, it has received the preamble or not and also it provides the temporary ID and the uplink resources to the UE for further communication. In brief random access response (RAR) includes information such as information about the preamble for which the response is valid, which was identified using random access preamble identifier.
When the lots of UE wants to perform random access at the same time then using random access preamble identifier it was clear that response is actually for which UE. It also has timing correction due to which the UE can send for further communication with correct timing. RARG, it also includes scheduling grants through which the UE can understand, what resources can we use while communicating with the next step message(step 3 message). It also includes the temporary identity called TC- RNTI, which was used between the UE and the network for further communication.
Step 3: Suppose there was a scenario where there was only one UE to perform random access procedure then no collision will occur. But in another scenario, if there were lots of devices which want to perform random access procedures then there is a chance of collision while transmitting. There are two scenarios. First, if the number of you has a different preamble, that means they will get a different temporary ID i.e. TC-RNTI. So they will get differentiated and there will be no collision.
Second, there will be a scenario, where the UE’s wants to access the random access procedure at the same time and randomly select the same preamble, which means that the both UE have the same temporary ID due to which the collision will occur and in this case is known as contention-based random access. In this step, the UE has a temporary ID, so it will send an RRC connection setup request, which includes the UE Contention Resolution identity which is 48 bits long and there is no chance that the different UE can get the same preamble and resolution identity.
Since it was the first time when UE connected to the network then it will take UE Contention Resolution Identity and if it is not its first time, then UE will use C-RNTI. The message sends in Step 3, will have the unique ID. The message is transmitted using uplink share channel resources to the radio access network, it will ready already assigned in the previous step.
Step 4: To make sure that device does not use the identity of other devices. This step is used the response message was sent to the UE that the connection setup is completed with the particular unique ID. So the response message was sent with a specific identity. Since they have the same temporary ID. Then, a unique ID will be asked to every UE which is necessary for validation for connection to the network.
Then one of the UE will provide the unique ID and that device temporary ID will be converted from TC-RNTI to the C-RNT. This means the random access is successful and another device will receive a response message as random access failure. When the random access is successful that means the device is now in RRC connected mode or state. And this is the completion of the random access procedure that is contention-based.
It was triggered when the UE is handed over to another service and then there is downlink data for the UE when there is non-standalone mode and new NR cell is established.
Step1: random access preamble assignment is done in this step. In contention-based random access, the preamble is selected from a set of preambles. In which, it is possible that more devices can have the same preamble. Now in CFRA, the RAN is triggered, so it will not select the same preamble for different UE. Then RAN selects the preamble and gives it to the UE and suggests the UE start the random access procedure.
Step 2: the unique preamble is received. The random access request is made from UE to the RAN.
Step 3: On receiving a unique preamble request, RAN gives random access response which includes the timing adjustment and power control information same as in contention-based random access and also includes the information like uplink grant which is used by the UE for uplink communication.