# Preamble Design and Collision Resolution in a Massive Access IoT System
## 3 Preamble Design
### Sub-Preamble Sequence Design
Please note that the gNB is unable to recognize the dedicated sub-preamble, since the location index is random. However, the TA values obtained from the two types of the sub-preamble sequences sent by the same device should be identical, since those sub-preambles suffered from the same channel delay. Hence, for a specific shared sub-preamble, the corresponding dedicated sub-preamble can be identified via the TA values. Accordingly, the sub-preamble sequence reception scheme is summarized as Algorithm 2. Please note that when multiple devices transmit their preambles on the same PRACH, \(y_{s}\) consists of multiple shared sub-preamble sequences. Likewise, \(y_{d}\) contain multiple dedicated sub-preamble sequences when the corresponding \(\mu\) is configured identically. How to identify those overlapping sub-preamble sequences for different devices will be introduced in the next subsection. ```
0: The received preamble sequence in the gNB \(y(n)\); The length of the sub-preamble \(L_{i}\); The length of the GI \(L_{g}\); The length of the empty sequence \(L_{0}\); The sets of the local sub-preamble sequences \(S_{i}\);
0: The received shared sub-preamble sequence \(y_{s}(n_{s})\); The received dedicated sub-preamble sequence \(y_{d}(n_{d})\);
1: Intercept the first \(L_{s}\) elements of \(y(n)\) as \(y_{s}(n_{s})\);
2: Divide the residual sequence in the middle and obtain two sequences with the equal length \(L_{d}+L_{g}\), i.e., \(\bar{y}_{d,candidate}(n_{d})\) and \(\bar{y}_{d,candidate}(n_{d})\);
3: Remove the GI from \(\tilde{y}_{d,candidate1}(n_{d})\) to obtain \(y_{d,candidate1}(n_{d})\);
4: Output \(y_{d}(n_{d})=y_{d,candidate1}(n_{d})\) for \(\mu=1\);
5: Remove the GI from \(\tilde{y}_{d,candidate2}(n_{d})\) to obtain \(y_{d,candidate2}(n_{d})\);
6: Output \(y_{d}(n_{d})=y_{d,candidate2}(n_{d})\) for \(\mu=2\);
```
**Algorithm 2** Preamble sequence reception scheme

### Multiple TA Values Capturing Method

Based on the sub-preamble sequence reception, the gNB can correlate each sub-preamble with the local sequences respectively. The value of correlation calculation with a delay for the sub-preamble is expressed as

\[d_{i}(\tau_{i})=\frac{1}{N_{ZC}}\sum_{n_{i}=0}^{L_{i}-1}|y_{i}(n_{i})\cdot c_{ i}^{*}((n_{i}-\tau_{i})\text{ mod }L_{i})|^{2},\ 0\leq n_{i}\leq L_{i}-1,\ i\in\{s,d\} \tag{9}\]

where \(\tau_{i}\in\{0,1,2,...,L_{i}-1\}\), \(c_{i}(n_{i})\in S_{i}\) denotes local sub-preamble sequence, and \((\cdot)^{*}\) denotes the complex conjugate. Additionally, the estimation TA value is related to the peak location of correlation, which can be expressed as

\[\widehat{\tau}_{i}=\arg\max_{\tau_{i}}\{d_{i}(\tau_{i})\geq r_{th}\}, \tag{10}\]

where \(r_{th}\) denotes the pre-determined threshold. After the gNB detects the received shared sub-preambles, a set of TA values \(\Gamma_{s}=\{\tau_{s}^{1},\tau_{s}^{2},...,\tau_{s}^{\theta}\}\) can be captured, where \(\theta\) denotes the number of detected shared sub-preambles. Similarly, another set of TA values \(\Gamma_{d}=\{\tau_{d}^{1},\tau_{d}^{2},...,\tau_{d}^{\sigma}\}\) can be obtained, where \(\sigma\) represents the number of detected dedicated sub-preambles. For ease of description, in the subsequence, the TA values in set \(\Gamma_{s}\) are defined as shared TA values and those in set \(\Gamma_{d}\) are defined as dedicated TA values. If \(\tau_{s}=\tau_{d}\), the corresponding shared sub-preamble and dedicated sub-preamble are considered to belong to the same devices. This is because the shared sub-preamble and dedicated sub-preamble that sent by the same device always suffer from the same channel delay. Consequently, the gNB can identify preambles sent from different devices through comparing the shared TA value and the dedicated TA value. Figure 3 shows an example of capturing two TA values for two different devices. In the example, two RA-attempting devices send the shared sub-preambles with the same index \(v_{s}\) and different dedicated sub-preambles on the same PRACH. Therefore, the gNB receives a overlapping preamble sequence.