# Method for Handling Massive IoT Traffic in 5G Networks
## 6 Analytical Model  
The small IoT data packets from IoT devices arrive at the RN multiplexer. The first packet arrival at the multiplexer activates the timer. Due to the timer activation, the first packet would stay in the buffer for a duration not more than \(T_{max}\). During this time, arrival of additional packets would result  
Figure 3: Multiplexing either due to timer expiry or maximum buffer size. in improvement of multiplexing gain. Once the packet waiting duration reaches the timer expiration threshold \(T_{max}\), the course of packet multiplexing is triggered. The large multiplexed packet is then transmitted to the BS. \(N_{max}\) is the maximum number of resource blocks available for RN to use in a single Transmission Time Interval (TTI). If some or all of the \(N_{max}\) radio resource block are not needed in a TTI for RN traffic, the unallocated blocks are made available for regular mobile users waiting for radio resources from the BS. Alternately, if the timer expiry time \(T_{max}\) has not been reached, but the total size of small packets arrived at the multiplexing buffer reaches the size of \(n_{max}-\textit{overhead}\); the large multiplexed packet is formed then and sent to BS before the timer expires. The size of \(n_{max}\) depends on the available TBS, which in return is dependent on backhaul air interface radio channel conditions. At most, \(r\) packets can be aggregated into a single large packet and \(r\) is expressed as:  
\[r=\frac{n_{max}-\textit{overhead}}{l} \tag{1}\]  
where \(l\) describes the fixed size of the arriving packets in bits. Consider \(x\) as the actual number of packets in the RN buffer. As long as the waiting time does not reach \(T_{max}\) or the buffer size does not reach \(n_{max}-\textit{overhead}\), \(x\) remains in the interval \(1\leq x<r\). Packet arrival rate from IoT devices, \(\lambda\) is considered to be exponentially distributed. It can be shown that the total waiting time of \(x^{th}\) packet is Erlangian [24]. Therefore, the probability of subsequent arrival of packet prior to multiplexing with \(x\) packets already in the buffer is denoted as \(a_{x}\) and given as:  
\[a_{x}=\left\{ \begin{array}{ll}1,&x=0\\ 1-\left(\sum\limits_{i=0}^{x-1}\frac{e^{-\lambda T_{max}}(\lambda T_{max})^{i} }{l!}\right),&1\leq x<r\\ 0,&x\geq r\end{array} \right. \tag{2}\]  
The probability of initiating the multiplexing after \(x\) arrivals is \(b_{x}\) where \(b_{x}=1-a_{x}\). This multiplexer now emulates an r-stage Coxian process (Figure 4). The probability of an arrival with empty buffer, \(a_{0}\) is 1 as the packet multiplexing starting without a single packet in the buffer is not possible. For triggering the multiplexing process, a single packet must arrive at the multiplexing buffer. Consequently, \(b_{0}\) would always be 0. Upon arrival of the first packet from IoT device, the multiplexing system goes to stage 1 of the Coxian process with a total of \(r\) stages. Stage 1 illustrates that one packet has arrived in the buffer. During the first stage, two cases are possible. It is likely that the second packet also arrives into the multiplexing buffer ahead of timer expiry. The probability of this case is denoted as \(a_{1}\). But the converse case can also happen where no packet arrivals occur after the first one until timer expiry and the packet multiplexing is initiated with a single packet in the buffer. The probability of this case is expressed as \(b_{1}\). Now, if the second packet arrival occurs before the timer expires, the process is said to have entered stage 2. After entering stage 2, again two cases are possible. Either the third packet arrival occurs, which is considered to have a probability \(a_{2}\). Or the timer expires after the second arrival with a likelihood of \(b_{2}\). These probabilities \(a_{x}\) and \(b_{x}\) in each stage could happen only until \(x\) becomes equal to \(r\), i.e., \(r\) packets arrive.