# Energy-Efficient Device Discovery Mechanism for Device-to-Device Communications in 5G Networks +
## 4 Performance Analysis of Proposed Hybrid D2D Discovery Mechanism  
In this section, the energy consumption (in terms of the number of transmitted discovery beacons), discovery delay and discovery success rate of the proposed hybrid D2D discovery mechanism are analyzed. The system is assumed to have multiple homogeneously hexagonal cells and each cell has multiple D2D-enabled UEs. The cell radius is \(R\) and each BS is located at the cell center. In each cell, UEs are uniformly distributed over the cell. UEs' requests for communicating with their target UEs arrive at each cell according to the Poisson process with rate \(\lambda_{UE}\). The communication time of each D2D link conforms to an exponential distribution with parameter \(\mu\), i.e., with the mean time \(1/\mu\). In each cell, the ratios of UEs whose target UEs are located in the same cell as themselves (case A in Figure 3) and in adjacent cells (case B in Figure 3) are denoted by \(r_{1}\) and \(r_{2}\), respectively. We also assume that the transmissions of a discovery beacon/data packet and its response/acknowledgment (ACK) can be finished within the same time slot and the propagation delay is negligible. In Wi-Fi Direct protocol, only channels 1, 6, and 11 are used and the maximum probing distance of Wi-Fi signals is \(d\). Additionally, the retry limit is assumed to be \(R_{T}\). Notably, to focus on the performance of D2D discovery mechanism and make the mathematical analysis tractable, we assume that the contentions only exist among D2D source UEs. For example, popular video streaming applications that video packets are always sent from source UEs to target UEs meet this assumption. First, considering a given target UE A to be discovered, according to Figure 5 only those source UEs located within the circle of radius \(d\) can interfere with the discovery messages for the target UE A. Since the UE intensity of each hexagonal cell is \(\lambda_{UE}/(3\sqrt{3}R^{2}/2)\), the average number \(\sigma\) (contention load) of D2D source UEs within a circle of radius \(d\) is expressed by  
Figure 4: Proposed channel assignment algorithm. \[\sigma = \frac{\lambda_{UE}\pi d^{2}(r_{1}+r_{2})P_{S}}{(3\sqrt{3}R^{2})\mu} \tag{1}\] \[= \frac{h\lambda_{UE}d^{2}rP_{S}}{R^{2}\mu},\]  
where the constant \(h=2\pi/(3\sqrt{3})\). The parameter \(r=r_{1}+r_{2}\) is the total ratio of UEs which need initiate Phase 2 D2D discovery procedure. \(P_{S}\) is the probability that a UE successfully discovers its target UE, also named discovery success rate in this paper. The discovery success rate \(P_{S}\) is defined as the ratio of the number of UEs which successfully discover their target UEs to the total number of UEs which initiate D2D discovery procedure. Notably, since all cells are assumed to be homogeneous, Equation (1) can also be applied to the case that the circle of radius \(d\) is located among adjacent cells, as shown in Figure 5.  
Next, since there are three channels able to be used, the effective load of each channel in a circle of radius \(d\) is \(\sigma/3\). Then the probability \(P(X=n)\) that there are \(n\) D2D links contending the same Wi-Fi channel equals  
\[P(X=n)=\frac{e^{-\sigma/3}(\sigma/3)^{n}}{n!}. \tag{2}\]  
According to the results of [32], the probability \(p\) that a D2D UE (DUE) transmits a discovery beacon or data packet at each time slot is given by  
\[p=\frac{2(1-2p_{f})}{(1-2p_{f})(W+1)+p_{f}W[1-(2p_{f})^{R_{T}}]}, \tag{3}\]  
where \(W\) is the minimum contention window size and set equal to \(1\) in this paper. The maximum backoff stage is set equal to \(R_{T}\) in this paper. Notably, Equation (3) is derived based on the full load assumption, i.e., every DUE always has discovery beacons or data packets for transmission. Note that the collision probability of a transmitted beacon or packet is \(1-(1-p)^{n-1}\) when there are \(n\) DUEs in contending the wireless channel.