## 2 System Model
### Queue Length of Devices Estimation  
Queue length size of the device refers to the number of backlogged data packets that are stored at the device. A larger queue length size on the intermediate device induces data transmission delay in the network. The number of data packets in the queue is a metric that reflects the data traffic load of the mobile devices. The queue length size of the devices is evaluated by using the Backpressure algorithms [48]. Backpressure is referred to as the throughput optimal scheduling algorithm in the highly dynamic network, which forwards the data packets based on the traffic congestion information of the devices. In a queuing network, packets are removed from the device queue once it delivered or added to the next device queue. Next, when the packets received at the destination device, the packets will be removed from the queue of all devices. Let \(Q^{c}_{n}(t)\) denotes the number of data packets flow from the device \(c\in D\) are backlogged at the device \(n\in D\) at the time \(t\). Therefore, the backlogged packets on an intermediate device \(c\) of the link \((x,y)\) are defined as \(Q^{c}_{(x,y)}(t)=Q^{c}_{x}(t)-Q^{c}_{y}(t)\). All the devices in the network maintained backlogged packets information locally through the information packets exchanged with each other. A weight assigned to the link \((x,y)\) over flow \(c\) at the time \(t\) is estimated as below:  
\[w^{c}_{(x,\ y)}(t)=\max[Q^{c}_{(x,\ y)}(t),0] \tag{6}\]  
The \(w^{c}_{(x,\ y)}(t)\) denotes the Backpressure weight on the link \((x,y)\), which is the maximum weight assigned to the link \((x,y)\) at the time slot \(t\), i.e., \(W_{(x,\ y)}(t)=\max_{c\in N}w^{c}_{(x,\ y)}(t)\). The packets are scheduled for flow \(c\) only when the device \(c\) attains the maximum weight on the activated link [49]. In this way, the maximum weight on the link \((x,y)\) can be defined as below:  
\[\max\!\!\sum_{x\in N}\sum_{y\in N}\mu_{(x,\ y)}(t)W_{(x,\ y)}(t), \tag{7}\]  
\[\text{s.t.}\ \mu_{(x,\ y)}(t)\in\Gamma_{S(t)}\]  
The equations given above illustrates the maximization of the weighted network throughput by choosing transmission rates. The links scheduled is based on the primacy of order, i.e., the highest prioritized link would be the first to be scheduled. Based on the stability theory, the linear optimization by Equation (7) is made with the queueing network toward stability, thereby, achieved the maximum network throughput performance in the IoT 5G network based on D2D communications [49]. Moreover, the maximum network throughput is attained in a queuing network if all the traffic arrival rates and all individual queues of devices are strongly stable. As a result, the channel capacity of the stable network with memoryless channels is achieved, equivalent to the Shannon channel capacity [50]. Therefore, the maximum throughput can be attained in the queuing network to maintain the network stability with maximum data packets arrival rates that can be derived as follows:  
\[\lim_{T\rightarrow\infty}\sup\frac{1}{T}{\sum_{t=0}^{T-1}E[Q(t)]}<\infty \tag{8}\]  
The \(E[Q(t)]\) refers to the expected average queue length of the network at a time \(t\). The network backlog update at each time slot \(t\) is obtained by transmission rate matrix \(\mu_{(x,\ y)}(t)\), and it denotes the rate offered for flow \(c\) on the link \((x,y)\) during the slot \(t\). Thus, the Backpressure schedule algorithm based on the system queuing process dynamics is satisfied. \[Q_{n}^{c}(t+1)\leq\max[Q_{n}^{c}(t)-\sum_{b}\mu_{(n,\ y)}^{c}(t),0]+\alpha_{n}^ {c}(t)+\sum_{a}\mu_{(x,\ n)}^{c}(t) \tag{9}\]  
The equation (Equation (9)) above expresses inequality due to an actual number of packets from neighbors device arrives at the device \(m\) during the slot \(t\) is less than \(\mu_{(x,\ n)}^{c}(t)\) if the neighbor's device has few or no packets to transmit. The notation \(\alpha_{n}^{c}(t)\) refers to the number of exogenous flow \(c\) packets generated at the device \(n\).