# Performance Analysis of D2D Communication with Retransmission Mechanism in Cellular Networks
## 4 Queuing Model and Feedback Strategy
### Analysis Model of the Feedback Queuing Model  
To show the impact of buffering at the D2D transmitter, queuing theory was modeled to approximate the traffic state of the D2D data-link. We modeled the packet arrival by a Bernoulli process with probability \(q\), while modeling the server system as a queuing model with feedback [37]. Let \(p_{suc}\) be the transmission success probability of data packets, which depends on the received SINR of the D2D user across time slots.  
Figure 1: A hybrid network consisting of both cellular and D2D links.  
With the SAW-ARQ protocol, the transmitter received a status report from the receiver after the transmission and then started the next transmission round. We defined one slot as the duration time, which included the time to send the preceding packet at the front of the queue, the arrival of one new packet, and the acknowledgment of the feedback delay. As a matter of fact, some existing studies [37; 38] assumed that error detection and the transmission of acknowledgment packets used no time at the receiver.  
In this study, both were completed at the end of the slot, and the transmission was scheduled for the next time slot. If packet transmission was successful, the next packets were sent; otherwise, the packet for retransmission had a preemptive priority and occupied the front of the queue. That means that the feedback packet was sent first at the beginning of the next round of transmission. We set the D2D transmitter (D2D-TX) to be equipped with a finite buffer of \(L_{max}\) packets, which was the same assumption as that applied in [39; 40]. If the queue length reached the buffer capacity, subsequent arriving packets were dropped; this approximation was also used in previous research [41]. Without loss of generality, Figure 2 shows the feedback queuing model.  
Furthermore, considering the timeliness of data transmission, we set the maximum number of retransmission attempts at \(K\), after which the failed packets were dropped. In other words, a packet had \(k\) chances to be successfully sent, where \(k\in\{1,2,\ldots K\}\). The packet transmission failure had a probability of \(1-p_{suc}\), in which case it returned to the head of the queue for retransmission during the next time slot \(t+1\). A retransmission attempt counted only if the packet was successfully sent. It was sent again if a sending failure occurred, and that cycle repeated until the packet was retransmitted \(K\) times. It was necessary to account for the queuing length in the buffer when checking the state of the sent packet. We defined the probability set of the packet transmission state as \(P_{state}=\left\{p_{state}^{k}\right\}_{k=1,2,\ldots,K}\).  
As mentioned above, when \(k=1\), the current processing packet was in its first sending state in two cases:  
Case 1: The previous packet was sent successfully, provided it was in any state \(j,j\in(1,K-1)\).  
Case 2: When the previous packet reached the upper bound of the number of retransmission attempts, this packet dropped from the queue. We obtained the probability of the packet transmission state as follows:  
\[p_{state}^{k}=\left\{\begin{array}{l}p_{suc}(1-p_{suc})^{k-1}\left[1+(1-p_{suc })^{K}\right],1\leq k<K\\ p_{suc}(1-p_{suc})^{K-1},k=K\end{array}\right.. \tag{2}\]