## 3 Integrated Radio Coverage and Device Capacity Analysis Framework
### Theoretical Approach
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Spreading Factor (SF)** & **Maximum Path Loss (dB)** & **Distance from LoRaWAN Gateway (km)** \\ \hline
7 & 138.5 & 7.420 \\ \hline
8 & 141 & 8.515 \\ \hline
9 & 143.5 & 9.773 \\ \hline
10 & 146 & 11.217 \\ \hline
11 & 148.5 & 12.874 \\ \hline
12 & 151 & 14.775 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: LoraWAN propagation model parameters. subdivided into two slots of a 0.5 ms duration each. During each slot, a number of SC-FDMA subcarriers are transmitted, leading to the generation of seven symbols per slot. The total bandwidth occupied by the subcarriers is equal to 180 kHz, and there are 2 choices for the actual subcarrier bandwidths: either there are 12 subcarriers occupying each 15 kHz or 48 subcarriers with respective individual bandwidths equal to 3.75 kHz. The model currently considers the uplink direction, where there are two specific channels: The Narrowband Physical Random-Access Channel (NPRACH) for accessing the network resources and the Narrowband Physical Uplink Shared Channel (NPUSCH), which is used for transmitting data and control information [21]. In the case of NB-IoT, the focus is on devices that transmit measurement data towards the base station; therefore, the objective is to model the key mechanisms that are related to uplink coverage and capacity. During the uplink, there is an initial random-access procedure where the device sends an NPRACH using a narrowband subcarrier (of 3.75 kHz) with a respective frequency hopping pattern. The duration of the NPRACH transmission is considered to be equal to 5.6 ms. After successful reception of the NPRACH transmission (without any collisions with other contending devices), the device receives an appropriate PRB allocation to send a data packet (using an NPUSCH) via a specific combination of subcarriers and slots. The following table (based on [25]) shows representative combinations of frequency and time resources that can be considered. A Resource Unit (RU) consists of a number of SC-FDMA subcarriers and slots. Each SC-FDMA symbol within and RU represents a Resource Element (RE). The number of required NREs for an NPUSCH transmission of PL bytes can be expressed as [24]:  
\[N_{RE}=\frac{8(PL+28)+24}{CR\times N_{b}} \tag{6}\]  
where CR is the code rate, and \(N_{b}\) is the number of bits/symbols (equal to 2 assuming QPSK modulation). The number of the required RUs can then be calculated with the following expression:  
\[N_{RU}=\frac{N_{RE}}{N_{sc}\times N_{slots}\times N_{symbols}} \tag{7}\]  
where \(N_{sc}\), \(N_{slots}\), \(N_{symbols}\) are the numbers of subcarriers, slots, and SC-FDMA symbols per RU, respectively. Following that, the required transmission duration for the required RUs can be calculated:  
\[T_{NRU}=N_{RU}D_{RU} \tag{8}\]  
where \(D_{RU}\) is the RU duration, as shown in Table 2.  
In order to ensure the reception of the uplink packets on all considered ranges, a number of NPUSCH retransmissions is defined by the standard. According to [25] these repetitions can be assumed was shown in Table 3: \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Number of** & **Number of** & **Number of** & **Number of** & **Duration of RU** & **Number of REs** \\
**Subcarriers** & **Slots** & **Symbols** & **(ms)** & **Number of REs** \\ \hline
1 & 16 & 112 & 8 & 112 \\ \hline
3 & 8 & 56 & 4 & 168 \\ \hline
6 & 4 & 28 & 3 & 168 \\ \hline
12 & 2 & 14 & 1 & 168 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: NB-IoT uplink transmission options (15 kHz subcarriers). Therefore, the actual ToA for an NB-IoT uplink data transmission can be expressed as:  
\[ToA_{NB}=N_{rep}^{U}T_{NRU} \tag{9}\]  
Finally, the actual number of users that can be accommodated with one RACH period can be expressed as:  
\[N_{D}^{0}=\frac{T_{RACH}-N_{rep}^{D}D_{RACH}}{ToA_{NB\times}e} \tag{10}\]  
where the slotted Aloha access scheme collisions are considered by dividing the estimated devices' number over \(e\)[26].