prach learning experience (1)

一、Why RACH ? (What is the functionality of RACH ?)

When you first hear the word "RACH" or "RACH process", the first question that comes to mind is "Why RACH?" What is the function/purpose of the RACH process? Why do we need this complexity (seems too complex) operation?
Of course, this doesn't confuse you, RACH has very important functionality, especially in LTE (and WCDMA). The main uses of RACH can be described as follows.
① Realize uplink synchronization between UE and eNB
② Obtain Message3 uplink resources (such as RRC connection requirements)

. For example, when we take a train or other means of transportation, we need a ticket to determine the waiting room, flight, carriage and seat number, prach It is a mobile phone train ticket, which is only valid for a period of time. After the data is decoded and the mobile phone is connected (equivalent to getting on the train), the role of prach is over. As for how to decode it, it depends on how the code is designed.
In most communications (especially digital communications, whether wired or wireless), the most important prerequisite is establishing timing synchronization between the receiver and transmitter. So no matter what communication technology you look into, you'll see some synchronization mechanisms designed specifically for that specific communication.
In LTE (WCDMA), synchronization of the downlink ( transmitter = eNB, receiver = UE ) is achieved through a special synchronization channel (special physical signal pattern). For more information, see the Time Synchronization Process page. This downlink synchronization signal is broadcast to everyone and is transmitted at certain intervals.
However, in the uplink (Transmitter = UE, Reciever = eNB), it is inefficient for the UE to use this broadcast/always-on synchronization mechanism (actually wasting energy and causing a lot of interference to other UEs). You may easily understand this type of question. For the uplink, this synchronization process should meet the following conditions
1) Synchronization should only be performed when there is an urgent need
2) Synchronization should only be dedicated to one specific UE
All the complicated/messy stories on this page are mostly about process mechanisms specifically designed to meet these criteria.
Another purpose of the RACH process is to obtain the resources of Msg3 (Message 3). An RRC connection request is an example of Msg3, and there are several different types of Msg3 depending on the situation. You can understand this part by reading this page, and it's not very complicated.

二、Trigger condition of RACH

There are many conditions that trigger the RACH process. The overview in the protocol TS38.300-9.2.6 is as follows:
1) Initial access from RRC_IDLE;
2) RRC Connection Re-establishment procedure;
3) DL or UL data arrival during RRC_CONNECTED when UL synchronization status is “non-synchronised”;
4) UL data arrival during RRC_CONNECTED when there are no PUCCH resources for SR available;
5) SR(Scheduling Request) failure;
6) Request by RRC upon synchronous reconfiguration (eg handover);
7) Transition from RRC_INACTIVE;
8) To establish time alignment for a secondary TAG;
9) Request for Other SI (see clause 7.3);
10) Beam failure recovery;
the above 10 situations are relatively easy to understand, mainly initial access and RRC connection re-establishment , Uplink desynchronization in the RRC connection state, insufficient uplink scheduling resources in the RRC connection state, uplink scheduling failure, uplink synchronization reconfiguration (cell switching), etc.

三、Two types of RACH process : Contention-based and Contention-free

When the UE sends the PRACH preamble, it uses a specific pattern to send it, and this specific pattern is called a "signature". In each LTE cell, a total of 64 preamble signatures are available, and the UE randomly selects one of these signatures.
Does the UE select one of the signatures "randomly"? Does this mean there is a possibility of multiple UEs sending PRACH with the same signature?
There is such a possibility. This means that the same PRACH sequence arrives at the NW from multiple UEs at the same time. This kind of PRACH conflict is called "contention", and the RACH process that allows this kind of "contention" is called "contention-based" RACH process. In this contention-based RACH process, the network goes through an additional process to resolve these contentions in a later step, called the "contention resolution" step.
However, there are situations where such contention is unacceptable for some reason (such as time constraints) and can be prevented. Typically in this case the network informs each UE exactly when and where it must use the preamble signature. Of course, in this case, the network will distribute these leading signatures so that it does not collide. This RACH process is called a "contention-free" RACH process. To start a "contention-free" RACH process, the UE should be in connected mode before the RACH process, just like in the handover case.
The typical contention-based RACH process is as follows:
Insert image description here
1) UE->NW: RACH preamble (RA-RNTI, indicating L2/L3 message size)
2) UE<——NW: Random access response (timing advance, T_C-RNTI, UL authorization for L2/L3 messages)
3) UE->NW: L2/L3 messages
4) Early dispute resolution information
Now assume that contention occurs in step 1. For example, two UEs sent PRACH. In this case, both UEs will receive the same T_C-RNTI and resource allocation in step 2). Therefore, in step 3, both UEs will send L2/L3 messages to the NW with the same resource allocation (i.e. with the same time/frequency location). What happens when two UEs transmit the exact same information at the exact same time/frequency location? One possibility is that the two signals interfere with each other, and NW decoding does not exist in either. In this case, neither UE will have any response (HARQACK) from the NW, and they all think that the RACH process has failed and go back to step 1. Another possibility is that the NW can only successfully decode messages from one UE but not from another. In this case, the UE that successfully decodes L2/L3 at the NW end will obtain HARQACK from the network. This HARQACK process of step 3 is called the "contention resolution" process.
A typical " no contention" RACH procedure is as follows:
Insert image description here
1) UE<——NW:RACH preamble (PRACH) allocation
2)UE->NW:RACH preamble (RA-RNTI, indicating L2/L3 message size)
3)UE<— — NW: Random access response (timing advance, C-RNTI, UL authorization for L2/L3 messages)

四、How the information is encoded into PRACH (RACH Preamble) ?

In LTE, all information (data) after the PRACH sequence has its own binary structure, which means they are converted into a specific data structure. However, the information in the PRACH preamble is represented by purely physical properties. The physical properties that form the information in PRACH are as follows.
1) Preamble transmission timing (t_id)
2) PRACH frequency domain transmission position (f_id)
3) The sequence of the entire I/Q data of the PRACH signal (as shown in the example below)
The following is the PRACH transmission signal in the time domain. (You might think this looks different than what you expected. You might expect to see a Zadoff-Chu sequence, but this doesn't look like a Zadoff-Chu sequence. PRACH's Zadoff-Chu sequence is in the frequency domain, but this is a time domain sequence .PRACH Zadoff-Chu is converted into a time domain sequence as shown below by the transformation shown in the How to Generate RACH Signal section)

%%%%%%    仿真环境
%软件版本:MATLAB R2021a
clear all;
close all;
clc
%*************** 参数设置 ***************%
% PRACH配置设置以及retriving PRACH info
ue.DuplexMode = 'FDD'; % UE使用FDD的双工方式
ue.NULRB = 6; % 上行链路,PRACH占6个RB的带宽,改变了采样率SamplingRate
prach_config.Format = 0; % 格式0,Nzc的长度为839
prach_config.CyclicShifIdx = 0; % 循环移位长度
prach_config.FreqOffset = 0;  % 决定UE传输PRACH前导的频域位置,以PRB为单位
prach_config.SeqIdx = 0;
prach_PreambleIdx = [22]; % rootSequenceIndex,为逻辑值

[prach_sym, prachInfo] = ltePRACH(ue, prach_config);
prach_arrayIndex = 0 : length(prach_sym) - 1;
prach_clip = 1:100; % 切片(?)

subplot(2,3,1);
plot(real(prach_sym),imag(prach_sym),'ro','MarkerFaceColor',[1 0 0]);axis([-0.2 0.2 -0.2 0.2]);
title('PRACH符号的星座图');

subplot(2,3,[2 3]);
plot(prach_arrayIndex,real(prach_sym),'ro-',prach_arrayIndex,imag(prach_sym),'bo-');ylim([-0.2 0.2]);
xlim([0 6000]);
legend('real','Imag');
title('PRACH index vs PRACH value(Time Domain)');
subplot(2,3,4);
plot(real(prach_sym(prach_clip)),imag(prach_sym(prach_clip)),'ro','MarkerFaceColor',[1 0 0]);
axis([-0.2 0.2 -0.2 0.2]);
title('Constellation');
subplot(2,3,[5 6]);
plot(prach_arrayIndex(prach_clip),real(prach_sym(prach_clip)),'ro-',prach_arrayIndex(prach_clip),imag(prach_sym(prach_clip)),'bo-');
xlim([0 max(prach_arrayIndex(prach_clip))]);ylim([-0.2 0.2]);
legend('real','Imag');
title('PRACH index vs PRACH value.(Time Domain)');

Insert image description here

五、Exactly when and Where a UE transmit RACH ?

To answer this question, you need to refer to the 3GPP specification TS36.211-Table 5.7.1-2. This table will give the frames and subframes in which the UE is allowed to transmit PRACH preamble characters. As you can see in this table, PRACH preamble timing and PRACH preamble type are determined by the PRACH configuration index. How to determine PRACH configuration index? It is determined by the SIB2 parameter prach-ConfigIndex.
<TS36.211 - Table 5.7.1-2: PRACH Configuration Index>

Insert image description here

For example, if the UE uses "PRACH ConfigurationIdex 0", it should only transmit RACH in even SFN (System Frame Number). Does this mean that this UE can transmit RACH at any time within the specified SFN? The answer to this question is in the "Subframe number" column of the table. It says "1" which means "PRACH CONFIG IDEX 0". This means that the UE is only allowed to transmit RACH on subframe 1 of every even-numbered SFN.
In the image below, you should know all the dimensions in the image below (the red rectangle is the PRACH signal).
Insert image description here
R_Slot is determined by the PRACH configuration index, and R_length is determined by the Premable format. When the leading format is 0~3, F_offset is obtained by the following formula. n/RA/PRBoffset in this equation is specified by prach-FreqOffset in SIB2. (For details, please refer to 36.2115.7 Physical Random Access Channel)
FDD:
Insert image description here
TDD: Preamble format 0-3
Insert image description here

TDD:Preamble format 4
Insert image description here

六、What is preamble format ?

If you see 36.211-Table 5.7.1-1 shown above, you will see a column called "Preamble Format". What is the format of the preamble? It is defined as the following figure.
Insert image description here
It can be seen that the length of the PRACH leading character depends on the format of the leading character. For example, the length of a PRACH with a preamble format of 0 is (3186+24567). (As you know, one sample (T) is 1/30.72 (=0.03255)us. It is defined as 1/(15000x2048) seconds (=0.03255us) in the 36.2114 frame structure. In LTE, the basic units of time
are is the sampling period Ts, and the value is fixed equal to:
Ts=1/(15000*2048)=32.55ns.
Among them, 15000 indicates that the subcarrier interval is 15kHz, and 2048 indicates the number of sampling points. In addition to the 15kHz subcarrier interval, 3GPP also A carrier spacing of 7.5kHz is defined, and this subcarrier spacing is specifically for MBSFN. Therefore, unless otherwise specified, the default subcarrier spacing is 15kHz.

六、Why Multiple Preamble Format ?

You may ask "Why do we need such multiple preamble formats?", and especially "Why do we need prach formats with different lengths of time?".
First try to figure out what are the differences between preamble formats based on the table above (Table 5.7.1-1)? For simplicity, let's consider the format 0,1,2,3.
Let's look at T_SEQ (the length of the sequence). You'll see that format 0 and format 1 consist of a single copy of the prach transformed in the time domain. Format 2 and 3 consist of two concatenated copies of the prach sequence. What are the advantages of format 2,3 over format 1,2. I think a longer T_SEQ will help decode PRACH under noisy conditions as it provides a longer correlation window to detect PRACH.
Now let's look at the T_CP part. You'll notice that formats 1 and 3 have longer T_CPs compared to formats 0 and 2. A longer CP will give you better tolerance in fading environments, reducing ISI even in highly fading environments.
In fact, there is another important difference between each preamble format that is not explicitly shown in Table 5.7.1-1.
As a brief conclusion on cell sizes, we can rewrite the table as follows.
Insert image description here

Note 1 : T_CP (in ms) = T_CP(in Ts) x 0.03255 x 1/1000,
where 0.03225 is one Ts in us, 1/1000 is used to convert the unit from ‘us’ to ‘ms’
Note 2 : T_SEQ (in ms) = T_SEQ(in Ts) x 0.03255 x 1/1000,
where 0.03225 is one Ts in us, 1/1000 is used to convert the unit from ‘us’ to ‘ms’
Note 3 : Guard Time (in ms) = Number of Subframe - Total Length
Note 4 : Cell Radius is roughly the distance that the electromatic wave can travel during the guard time and devided by 2.
In case of free space(in vacumm) it is roughly is 300 (km/ms) x Guard Time (ms) / 2.

七、How to determined which Preamble format to use ?

How does ue know the preamble format it must use when generating prach and trnasmit? It is determined by the table below. As you can see, the Prach configuration index determines the preamble format to use. For example, if the Prach configuration index is 10, as shown in the following example, then prolog format 0 is used.
You may ask "Who determines the Prach configuration index?". The answer is "ENB determines it via the Prach-Configindex IE in SIB2. See the Prach-Configindex section for details.
< TS36.211 - Table 5.7.1-2 : Interpretation of PRACH Config >
Insert image description here

八、How does Network knows exactly when UE will transmit the RACH ?

Very simple. The network knows when the UE will send the RACH even before the UE sends it because the network tells the UE when the RACH should be transmitted. (If the UE cannot correctly decode the network information about RACH, even if the UE sends RACH, the network will not be able to detect it).
The following sections will introduce RACH network information.
Which RRC message contains RACH configuration?
It's in SIB2 and you can find the details in 3GPP 36.331.
<RRC Parameters for RACH Operation>
Insert image description here

九、How many RA-Preambles can be used ?

Theoretically, a total of 64 PRACH preambles are available, but under specific conditions (e.g., in a specific cell, whether for attachment or handover, etc.) the number of available preambles is determined by a pair of SIB2 as shown below Parameters determined.
Insert image description here
There are two sets of RA-Preambles above, Group A and Group B. Group always exists, Group B only exists for specific configuration in SIB 2 parameters. Group A and Group B are determined in 36.321 5.1.1 Random Access Process Initialization, as shown below.

If sizeofra-preamblesgroupa is equal to numberofra-preambles, there is no random access sequence group B. The preambles in the random access sequence preamble group A are preambles (0 to sizeofrapreamblesgroupa - 1), if present, in the random access preamble, group B is (from preambles in the 64 preambles group defined in 36.211 sizeofra-preamblesgroupa to numberofra-preambles-1).

If there is a random access preamble group B, the thresholds messagePowerOffsetGroupB and messageSizeGroupA, the configured UE transmit power PCMAX, c[36101] of the serving cell that performs the random access process, and the offset deltaPreambleMsg3 between the preamble and Msg3 are to select two groups A set of required random access preambles (PCell only). //deltaPreambleMsg3 is a power control related parameter (see 36.331 and 36.213 5.1.1.1 UE behavior for details)

十、How to Generate 64 PRACH Preamble Sequences ?

As mentioned above, the maximum number of UEs that can be used in a cell is 64. How to generate these 64 different types of Prach sequences? The process is as follows.
1) Use rootSequenceInderex to generate the zaddoff chu sequence (849 samples) (we call this sequence the "base sequence")
2) Generate 64 different sequences by performing circular moves of the base sequence. The cyclic shift interval is determined by NCS, which is determined by ZerocorelationZoneconfig and HighSpeEdflag.
For example:
We assume that SIB2 broadcasts parameters as follows.
a) rootsequenceIndexex = 22
b) HighspeedFlag = false
c) zerocorlationzoneconfig = 5
From a) you will get the basic zaddoff-chu sequence with u = 1 (see the RootSequenceIndex section if you want to know how to derive this number).
Get NCS(CyclicsHift interval) = 26 from b) and c) (see ZerocorRelationZoneConfig and HighspeedFlag. section if you wonder how this number is derived).
Now, you can get 64 different prach sequences as follows.
PRACH Sequence[0] = base sequence
PRACH Sequence[1] = do cyclic shift to base sequence by 1 * 26 samples
PRACH Sequence[2] = do cyclic shift to base sequence by 2 * 26 samples

PRACH Sequence[31] = do cyclic shift to base sequence by 31 * 26 samples
PRACH Sequence[32] = do cyclic shift to base sequence +1
PRACH Sequence[33] = do cyclic shift to base sequence +1 by 1 * 26 samples
PRACH Sequence[34] = do cyclic shift to base sequence +1 by 2 * 26 samples
……
PRACH Sequence[63] = do cyclic shift to base sequence+1 by 31 * 26 samples

11. PRACH Signal Structure

The figure below shows the Propable signal structure of Prach compared to the normal uplink subframe. A few points to particularly mention are
1) the sequence length in the frequency domain is 6 UL subframes, which is 1.08 MHz
2) the preamble length in the time domain including the guard time (= CP length + sequence length + GT length) It can be 1 or 2 or 3 according to the preamble format
3) One sub-carrier of Prach preamble is 1.25 kHz, and the sub-carrier of 1 UL subframe is 15 kHz. This means that 12 preamble subcarriers are 1 UL subframe subcarrier.
< PRACH Resource Grid >
Insert image description here

Reference documentation

https://www.sharetechnote.com/html/RACH_LTE.html#prach_ConfigIndex

Guess you like

Origin blog.csdn.net/weixin_45143788/article/details/131705243