# Power Efficient Random Access for Massive NB-IoT Connectivity
## 3 Collision--CE Level Based RAP (PE-RAP)
### ACB Factor and Collision Probability  
Let there be '\(N\)' NB-IoT devices spread over all the three CE levels in a cell; 3 GPP proposes an ACB mechanism such that the ACB factor \(\rho\in[0,1]\) is broadcasted for the congestion control of RAP [29]. The device randomly chooses a value between \([0,1]\) and attempts RAP only if it is greater than the broadcasted value of \(\rho\). We consider that \(m_{k}\) out of \(N\) devices pass the ACB check and attempt RAP when there are \(M_{s}\) subcarriers configured by the network for the RAP at the given point. Then, \(\mathbb{P}_{r}(m_{k}\mid N)\) gives the probability that \(m_{k}\) out of \(N\) NB-IoT devices in the cell attempt the RAP, by transmitting with the optimal transmission probability \(\rho_{*}\) where \(\rho_{*}\) maximizes the average number of successes [29]. \(\mathbb{P}_{r}(m_{k}\mid N)\) can be expressed as  
\[\mathbb{P}_{r}(m_{k}\mid N)=\binom{N}{m_{k}}\rho_{*}^{m_{k}}(1-\rho_{*})^{N-m_ {k}} \tag{4}\]  
\(\mathbb{P}_{r}(M_{s})\) gives the probability that the subcarrier for preamble transmission selected by an active device is also selected by another active device and it can be expressed as  
\[\mathbb{P}_{r}(M_{s})=\left(1-(1-1/M_{s})^{m_{k}}\right) \tag{5}\]  
The NB-IoT device in PE-RAP reattempts to access the network only after a collision. The collision can occur if any other device, out of \(N-1\) remaining devices, selects the same subcarrier for preamble transmission. The collision probability therefore can be obtained as  
\[\mathbb{P}_{r}(C) =\sum_{m_{k}=1}^{N-1}\mathbb{P}_{r}(m_{k}\mid N)\mathbb{P}_{r}(M_ {s}) \tag{6}\] \[\mathbb{P}_{r}(C) =\sum_{m_{k}=1}^{N-1}\binom{N-1}{m_{k}}\rho_{*}^{m_{k}}(1-\rho_{* })^{N-m_{k}-1}\left(1-(1-1/M_{s})^{m_{k}}\right)\]  
From work in [31], we can get the optimal value of \(\rho_{*}\) that maximizes the probability of transmission as \(\min\left(1,\frac{M_{s}}{m_{i}}\right)\). Using the optimal value of \(\rho_{*}\), Equation (6) can be rewritten as in Equation (7) which can be elaborated as delineated in Equation (8).  
\[\mathbb{P}_{r}(C)=\sum_{m_{k}=1}^{N-1}\binom{N-1}{m_{k}}\left(\frac{M_{s}}{N} \right)^{m_{k}}\left(1-\left(\frac{M_{s}}{N}\right)\right)^{N-m_{k}-1}\left( 1-(1-1/M_{s})^{m_{k}}\right) \tag{7}\]  
\[\mathbb{P}_{r}(C)=\underbrace{\sum_{m_{k}=1}^{N-1}\binom{N-1}{m_{k}}\left( \frac{M_{s}}{N}\right)^{m_{k}}\left(1-\left(\frac{M_{s}}{N}\right)\right)^{N- m_{k}-1}}_{\Theta_{1}(\mathbb{P}_{r}(C))}-\underbrace{\sum_{m_{k}=1}^{N-1} \binom{N-1}{m_{k}}\left(\frac{M_{s}-1}{N}\right)^{m_{k}}\left(1-\left(\frac{ M_{s}}{N}\right)\right)^{N-m_{k}-1}}_{\Theta_{2}(\mathbb{P}_{r}(C))} \tag{8}\]We use the binomial theorem in Equations (9) and (10) to obtain \(\Theta_{1}(\mathbb{P}_{r}(C)))\) and \(\Theta_{2}(\mathbb{P}_{r}(C)))\), respectively.  
\[\Theta_{1}(\mathbb{P}_{r}(C)))=\sum_{m_{k}=1}^{N-1}\binom{N-1}{m_{k}}\left( \frac{M_{s}}{N}\right)^{m_{k}}\left(1-\left(\frac{M_{s}}{N}\right)\right)^{N-m _{k}-1}+\left(1-\frac{M_{s}}{N}\right)-\left(1-\frac{M_{s}}{N}\right)=1-\left( 1-\frac{M_{s}}{N}\right)^{N-1} \tag{9}\]  
\[\Theta_{2}(\mathbb{P}_{r}(C)))=\sum_{m_{k}=1}^{N-1}\binom{N-1}{m_{k}}\left( \frac{M_{s}-1}{N}\right)^{m_{k}}\left(1-\left(\frac{M_{s}}{N}\right)\right)^{N -m_{k}-1}+\left(1-\frac{M_{s}}{N}\right)-\left(1-\frac{M_{s}}{N}\right) \tag{10}\]  
\[=\left(\frac{M_{s}-1}{N}+1-\frac{M_{s}}{N}\right)^{N-1}-\left(1-\frac{M_{s}}{ N}\right)^{N-1}\]  
Then by applying Equations (9) and (10) in Equation (8) we can obtain \(\mathbb{P}_{r}(C)\) as  
\[\mathbb{P}_{r}(C)=1-\left(1-\frac{M_{s}}{N}\right)^{N-1}+\left(\frac{M_{s}-1} {N}+1-\frac{M_{s}}{N}\right)^{N-1}-\left(1-\frac{M_{s}}{N}\right)^{N-1}=1- \left(1-\frac{1}{N}\right)^{(N-1)} \tag{11}\]  
For very high number of NB-IoT devices such that \(N\rightarrow\infty\), we can further simplify Equation (11) as \((\lim_{N\rightarrow\infty}\mathbb{P}_{r}(C)=1-e^{-1})\).