PRACH – Physical random access channel is one of the complicated physical channel and it helps to carry random access preambles to the network through msg1.msg2 is in downlink on peach from network and msg3 uses PUSCH.
Below is the general structure for PRACH transmission which includes cyclic prefix, one or more number of sequences and guard period. As per 3gpp PRACH formats with upto 12 repetitions of PRACH sequences.
Guard period helps to adjust the propagation differences as PRACH is transmitted before time synchronisation is achieved. device close to base station can send faster than device staying at the cell edge. prefix mainly used as a backup for propagation delay incurred during channel.

PRACH is generated by Zadoff chu (ZC) sequence and ZC sequence helps in generating sequences upto x-1 with each sequence of length x. 3GPP specified PRACH sequence length can be 839 and 139 so there can be 838 and 138 root sequences respectively.
a ZC sequence has the ability to generate additional sequences using the sequence length and cyclic shift for each of these root sequences. i.e lets take length as 16 and cyclic shift as 4. so the number of sequences possible for each root sequence is calculated below.
no of sequences for each root sequence = length of the sequence/cyclic shift size
i.e 16/4 = 4
so for each root sequence, can generate additionally 4 sequences.
EX:-

total number of sequences available based on the length of the root sequence and size of the cyclic shift. for example lets take 839 length for long format and shift size as 119 and total sequences possible to generate are 839/119 = 7.
so for 839 sequences additionally 7 more for each becomes 839*7 =5,873 sequences.
Negative Impacts on PRACH Performance:
Very common issue is the frequency offset between device transmitter and network receiver or vice versa. The frequencies at both ends mismatch and the extent of this mismatch can cause huge damage in terms of network decoding the right preamble.
Another most common scenario is mobility where device in mobility. These frequency offsets can cause additional peaks which can mislead the network with inaccurate estimate of propagation delay between device and network. as a consequence in message 2 network will send incorrect timing advance command and then eventually RACH process fails when device sends Message 3.
Mitigation:
To reduce this impact of frequency offsets on PRACH performance 3gpp introduced the concept of restricted and unrestricted sets. to understand simply this is like when the offset reaches certain upper limit then we need to restrict certain cyclic shifts which is inturn reduce generating more sequences to reduce the ambiguity.
generally for long formats the subcarrier spacing(SCS) used are 1.25KHz or 5KHz
if the frequency offset < SCS/2 i.e 600Hz device can use unrestricted set in case of 1.25KHz scs.
if the frequency offset < SCS/2 i.e 2.5KHz the device can use unrestricted set in case of 5 kHz scs.
Even between restricted set types there is a certain criteria for frequency offset if it reaches that level i.e upto 2.5KHz in 1.25KHz SCS and upto 10KHz in case of 5KHz scs.
Available Preamble Formats:
Ref: 3gpp 38.211