# Handover Management for D2D Communication in 5G Networks
## 4 Proposed Approach
### Choosing Handover Target
Thus, we can calculate the SNR for each user \(k\) with respect to an eNB \(m\) by  
\[SNR_{k}^{m}=\frac{RSRP_{k}^{m}}{P_{noise}} \tag{5}\]  
where \(m\in\{1,2,\cdots,n\}\) and \(P_{noise}\) is the additive white Gaussian noise (AWGN) power. With the SNR value for each user with respect to each eNB, we can first calculate the transmission capacity, \(C_{k}^{m}\), according to [PERSON] [21] and then further obtain the transmission time on the control channel for each user \(k\) with respect to the eNB \(m\), i.e.,  
\[C_{k}^{m}=B_{k}^{m}\times log_{2}(1+SNR_{k}^{m}) \tag{6}\]  
\[T_{x}^{m,k}=\frac{S_{k}}{C_{k}^{m}} \tag{7}\]  
where \(B_{k}^{m}\) is the bandwidth allocated from eNB \(m\) to user \(k\), and \(S_{k}\) is the size of the control signals required by user \(k\). However, due to the equal size of control signals received by both users of the same D2D pair and the same bandwidth allocated to them, we can define our utility function for \(i\)-th pair of D2D users with respect to eNB \(m\) by simply using SNR values of \(DUE_{i}^{1}\) and \(DUE_{i}^{2}\) as follows:  
\[Utility_{i}^{m}=\frac{1}{\frac{1}{log_{2}\left(1+SNR_{DUE_{i}^{1}}^{m}\right)}+ \frac{1}{log_{2}\left(1+SNR_{DUE_{i}^{1}}^{m}\right)}} \tag{8}\]  
Thus, if there are multiple eNBs with the same largest \(D_{counter}\) value to a D2D pair, we then allow the eNB with the largest utility value to be the potential handover target of such a D2D pair. In addition to multiple eNBs with the same largest \(D_{counter}\) value, there might be a possible outage for a device within a D2D pair, which is caused by shadow fading or being too far away from the original serving eNB during its moving process. For this case, we would also use the utility function to determine the new serving eNB for the D2D pair. Moreover, due to the random nature of user mobility, some devices could change their directions or even make a U-turn during their movements. This would lead to them to be more distant from their handover candidates and further generate some mismatches in their list of candidate targets. To this issue, we update the list of candidate targets for each D2D pair by tracking each user's moving process. Specifically, we first define a threshold in terms of turning angle \(\rho\), and two moving vectors \(\overset{\rightarrow}{V_{k}^{old}}\) and \(\overset{\rightarrow}{V_{k}^{new}}\) as the initial moving direction and the current moving direction for user \(k\), respectively. Then, for a user \(k\) at time slot \(t\), we can use the dot product of \(\overset{\rightarrow}{V_{k}^{old}}\) and \(\overset{\rightarrow}{V_{k}^{new}}\) to calculate its current turning angle \(\theta_{k}(t)\) as follows:  
\[\theta_{k}(t)=cos^{-1}\left(\frac{\overset{\rightarrow}{V_{k}^{old}}.\overset {\rightarrow}{V_{k}^{new}}}{\overset{\rightarrow}{V_{k}^{old}}\|\cdot\| \overset{\rightarrow}{V_{k}^{new}}\|}\right) \tag{9}\]Figure 2 illustrates an example of a user's moving process, where \(P_{k}(t)\) is the position of user \(k\) at time slot \(t\). Thus, for a user \(k\) at time slot \(t\) where \(k\in\left[DUE_{i}^{1},DUE_{i}^{2}\right]\). If \(\theta<\rho\), it implies that the turning angle of user \(k\) is not large enough to cause the mismatches in \(\Gamma_{i}\). Thus we only need to update the corresponding \(D_{counter}\) values and add the appropriate eNBs to \(\Gamma_{i}\) as mentioned before. Conversely, if \(\theta\geq\rho\), we then set \(\Gamma_{i}\) to \(\varnothing\) in order to avoid any possible mismatches in the handover candidate list. According to the above rule, we design Algorithm 1 for the selection of a handover target for the \(i\)-th pair of D2D users. We use \(C_{i}(t)\) to indicate the set of eNBs to which the \(i\)-th D2D pair is approaching and use \(d_{k}^{m}(t)\) to represent the distance between user \(k\) and eNB \(m\) at time slot \(t\). Here, we briefly discuss our proposed algorithm. In Algorithm 1, for \(i\)-th pair of D2D users, Lines 4-6 handle the possible outage caused by shadow fading or being too far away from the original serving eNB.