# Performance Analysis of D2D Communication with Retransmission Mechanism in Cellular Networks
## 5 Queuing Stationary Analysis and Performance Parameters  
### Steady-State Distribution Analysis  
Assuming that the queuing system achieved stability after a long-running process, let \(\mathbf{\Pi}=\left[\pi_{0},\pi_{1},\cdots,\pi_{L_{\max}}\right]\) be the steady-state probability distribution. For stable systems, the steady state solution can be obtained by solving:  
\[\mathbf{\Pi}\mathbf{P}=\mathbf{\Pi},\ \ \mathbf{\Pi}\mathbf{1}=\mathbf{1} \tag{15}\]  
where \(\mathbf{1}\) is the unity vector with \(L_{\max}+1\) dimensions, \(\mathbf{1}=\left[1,1,\ldots 1\right]^{T}\). The steady state solution was obtained via the iterative algorithm given in the following lemma.  
**Lemma 2**.: _With the transition probability matrix \(\mathbf{P}\) in (10), we solved (15) and obtain the following steady-state solution:_  
\[\pi_{0} =\frac{1}{1+\sum\limits_{i=1}^{L_{\max}}\frac{p_{0,1}p_{1,2}\cdots p_{i-1,i}}{p_{i,i-1}\cdots p_{2,1}p_{1,0}}} \tag{16}\]  
\[\pi_{i} =\frac{p_{0,1}p_{1,2}\cdots p_{i-1,i}}{p_{i,i-1}\cdots p_{2,1}p_{1,0}} \left(1+\sum\limits_{i=1}^{L_{\max}}\frac{p_{0,1}p_{1,2}\cdots p_{i-1,i}}{p_{i,i-1}\cdots p_{2,1}p_{1,0}}\right)^{-1},1\leq i\leq L_{\max} \tag{17}\]  
_where \(\pi_{0}\) represents the idle state probability. \(\pi_{i},1\leq i\leq L_{\max}\) denote the probability of having an \(i\) queue length._  
Proof of Lemma 2.: \(\pi_{0}\) and \(\pi_{i},1\leq i\leq L_{\max}\) are obtained by solving the balance equation and standardized Equation in (15), and we can get the matrix equation group as follows:  
\[\left\{\begin{array}{l}\pi_{0}p_{0,1}=\pi_{1}p_{1,0}\\ \pi_{i}\left(p_{i,i+1}+p_{i,i-1}\right)=\pi_{i-1}p_{i-1,i}+\pi_{i+1}p_{i+1,i}, \ \ \ \ 1\leq i<L_{\max}\\ \pi_{i}p_{L_{\max},L_{\max}-1}=\pi_{i-1}p_{L_{\max}-1,L_{\max}},\ \ \ \ \ i=L_{\max}\\ \pi_{0}+\pi_{1}+\cdots\pi_{L_{\max}}=1\end{array}\right.. \tag{18}\]  
From the first formula of (18), \(\pi_{i}\) can expressed by \(\pi_{0}\) as follows:  
\[\pi_{i} =\frac{p_{0,1}p_{1,2}\cdots p_{i-1,i}}{p_{i,i-1}\cdots p_{2,1}p_{1,0}} \pi_{0},1\leq i\leq L_{\max}. \tag{19}\]  
By utilizing the normalization condition \(\mathbf{\Pi}\mathbf{1}=1\), we obtain \(\pi_{0}\) as Equation (16). By substituting Equation (16) into Equation (19), the general formula \(\pi_{i}\) is derived as Equation (17).  
From Equation (15), we can see the elements matrix of transition probability \(\mathbf{P}\) was required for solving the steady-state distribution \(\mathbf{\Pi}\). Moreover, we can see via Equations (11)-(14) that the transition probability depended on the transmission success probability, average arrival rate, and retransmission state probability. The transmission success probability was calculated by stochastic geometry, which accounted for the interfering devices' intensity in our mathematical model. On the contrary, the idle state probability of D2D transmitter \(\pi_{0}\) was solved by queuing theory. Therefore, the analysis processing of the steady-state distribution by the queuing model and the successful transmission probability by the thinned PPP imposed a mathematical causality problem. We used the fixed point iteration method to solve this causality problem for the steady-state distribution, shown in Algorithm 1 as follows.