# Handover Management for D2D Communication in 5G Networks
## 4 Proposed Approach
### Choosing Handover Target
```
Input:\(RSRP_{\text{DUE}_{1}^{e}}^{\mathcal{S}\text{eNB}}\), \(RSRP_{\text{DUE}_{2}^{e}}^{\mathcal{S}\text{eNB}}\), \(RSRP_{\text{DUE}_{1}^{e}}^{\mathcal{T}\text{eNB}}\), \(RSRP_{\text{DUE}_{2}^{e}}^{\mathcal{T}\text{eNB}}\), \(D_{Counter}^{\mathcal{S}\text{eNB},j}(t)\), \(D_{Counter}^{\mathcal{T}\text{eNB},j}(t)\) and \(\varphi\) Output: Handover decision for \(i\)-th pair of D2D users
1:if\(RSRP_{\text{DUE}_{1}^{e}}^{\mathcal{S}\text{eNB}}\geq\varphi\) and \(RSRP_{\text{DUE}_{1}^{e}}^{\mathcal{S}\text{eNB}}\geq\varphi\)then
2:returnreturn retain transmission in the SeNB
3:end
4:else
5:if\(RSRP_{\text{DUE}_{1}^{eNB}}^{\mathcal{S}\text{eNB}}\geq\varphi\) or \(RSRP_{\text{DUE}_{1}^{e}}^{\mathcal{S}\text{eNB}}\geq\varphi\)then
6:if\(RSRP_{\text{DUE}_{1}^{e}}^{\mathcal{T}\text{eNB}}\geq\varphi\) and \(RSRP_{\text{DUE}_{1}^{e}}^{\mathcal{T}\text{eNB}}\geq\varphi\)then
7:return handover to the TeNB
8:end
9:else if\(RSRP_{\text{DUE}_{1}^{eNB}}^{\mathcal{T}\text{eNB}}\geq\varphi\) or \(RSRP_{\text{DUE}_{1}^{e}}^{\mathcal{T}\text{eNB}}\geq\varphi\)then
10:if\(D_{Counter}^{\mathcal{T}\text{eNB},j}(t)>D_{Counter}^{\mathcal{S}\text{eNB},j}(t)\) for a period of \(TTT\)then
11:return handover to the TeNB
12:end
13:else
14:return retain transmission in the SeNB
15:end
16:end
17:else
18:return retain transmission in the SeNB
19:end
20:end
21:else
22:if\(RSRP_{\text{DUE}_{1}^{eNB}}^{\mathcal{T}\text{eNB}}\geq\varphi\) and \(RSRP_{\text{DUE}_{1}^{e}}^{\mathcal{T}\text{eNB}}\geq\varphi\)then
23:return handover to the TeNB
24:end
25:else if\(RSRP_{\text{DUE}_{1}^{eNB}}^{\mathcal{T}\text{eNB}}\geq\varphi\) or \(RSRP_{\text{DUE}_{1}^{e}}^{\mathcal{T}\text{eNB}}\geq\varphi\)then
26:return handover to the TeNB
27:end
28:else
29: Calculate \(Utility_{i}^{\mathcal{S}\text{eNB}}\) and \(Utility_{i}^{\mathcal{T}\text{eNB}}\) using (8)
30:if\(Utility_{i}^{TeNB}>Utility_{i}^{\mathcal{S}\text{eNB}}\) for a period of \(TTT\)then
31:return handover to the TeNB
32:end
33:else
34:return retain transmission in the SeNB
35:end
36:end
37:end
38:end
```

**Algorithm 2** Handover Decision Algorithm

### Handover Procedure

As we determine the target eNB and make the decision to hand over to it, the handover procedure will proceed accordingly. The 3 GPP standard of LTE-A specifies the handover procedure for a single cellular user [11]. The main difference with D2D handover is that, in the handover procedure of a D2D pair, the original serving eNB will issue the joint handover command to both users of the D2D pair. Both users detach from the previous serving eNB and synchronize with the target eNB after both the handover decision of the original serving eNB and the admission control of target eNB are made. After the synchronization for both users of the D2D pair with the target eNB, the target eNB would allocate radio resources for both users to sustain their D2D communication. ### Analysis of Computational Complexity

In order to achieve a seamless handover for each pair of D2D users in a realistic environment, we need to ensure that our proposed methods are effective and efficient. Fortunately, for \(n\) eNBs and \(d\) D2D pairs, the time complexity of Algorithm 1 and Algorithm 2 for each pair of D2D users are only \(O(n)\) and \(O(1)\), respectively. Thus, the time complexity for each eNB to conduct the handover mechanism for every pair of D2D users in its coverage is at most \(O(d\cdot n)\). Therefore, our proposed algorithms meet the real-time computational requirement in the real environment. ## 5 Simulations

### Parameter Settings and Network Topology

To evaluate the system performance of the proposed algorithms, we consider a network environment consists of 19 eNBs, as shown in Figure 3. Also, there are 1-6 pairs of D2D users uniformly distributed in the coverage of each eNB. Table 1 shows the parameter settings used in the simulations. Additionally, for the two DUEs of the same D2D pair, two mobility models are taken into account in the simulations.