## 3 Proposed Handover Scheme
### Position Prediction  
In Step 1 of the workflow described in Section 3.1, the position prediction is performed when the BSN crosses the AP boundary. Note that the future trajectory of a BSN would possibly follow the similar movement trend with its historical trajectory. In this study, we utilize the average velocity \(\overline{v}\) over the last \(N\) time slots of the historical trajectory as the movement trend to predict future position.  
To model the future positions, we made the following assumptions:  
* The future trajectory of a BSN follows the WPAN model [23];
* The future trajectory starts with the velocity of \(\overline{v}\);
* The future acceleration \(a_{i}\) follows a white Gaussian distribution, _i.e_., \(a_{i}\sim N(0,\sigma_{a}^{2})\), where \(\sigma_{a}^{2}\) is extracted from the historical trajectory by taking their variances, _i.e_., \(\sigma_{a}^{2}=\mathrm{var}[a_{k-1},a_{k-2},...,a_{k-N}]\).  
The movement trend \(\overline{v}\) is expressed as  
\[\overline{v}=\frac{v_{k-1}+v_{k-2}+...+v_{k-N}}{N},k>N \tag{3}\]where \([v_{k-1},v_{k-2},...,v_{k-N}]\) is the set of historical velocities, and \(k\) is the current time index. According to the movement trend, a series of future positions (\(s_{i},k<i\leq k+\tau\)) is predicted as follows:  
\[v_{i}=\left\{\begin{array}{c}\bar{v},i=k\\ v_{i-1}+a_{i}T,k<i\leq k+\tau\end{array}\right. \tag{4}\]  
\[s_{i}=s_{k}+\sum_{j=k}^{i}\Big{(}\frac{v_{j-1}+v_{j}}{2}\Big{)}T=s_{k}+(i-k)T \bar{v}+\sum_{j=k}^{i}T\left[(i-j)+\frac{1}{2}\right]a_{j} \tag{5}\]  
\[\hat{s}_{i}=E\left[s_{i}\right]=s_{k}+(i-k)T\bar{v} \tag{6}\]  
The notations involved are summarized in Table 1. The future velocity \(v_{i}\) at the time index \(i\) is predicted based on the starting velocity of \(\bar{v}\) and historical acceleration \(a_{i}\). Assuming that \(a_{i}\) follows Gaussian distribution, the predicted position \(s_{i}\) also follows a Gaussian distribution with a mean of \(\hat{s}_{i}\) and an accumulated variance.  
Figure 3 depicts the procedure of position prediction. As can be seen, curve _AB_ is the historical trajectory of the BSN. When the BSN crosses the AP boundary at point \(B\) (also denote as \(s_{k}\)), position  
\begin{table}
\begin{tabular}{c l} \hline \(\bar{v}\) & The average velocity of the historical trajectory \\ \(N\) & The number of time index that contribute to \(\bar{v}\) \\ \(k\) & The time index that BSN crosses the boundary \\ \(i\) & The time index \\ _v\({}_{i}\)_ & The velocity of BSN at time index \(i\) \\ _s\({}_{i}\)_ & The position prediction of BSN at time index \(i\) \\ _a\({}_{i}\)_ & The acceleration of BSN at time index \(i\) \\ _\(\sigma_{a}^{2}\)_ & The variance of acceleration extracted from historical trajectory \\ \(T\) & The time interval between two position predictions \\ \(\widehat{s_{i}}\) & The expectation of \(s_{i}\) \\ _\(\tau\)_ & The prediction period \\ \hline \end{tabular}
\end{table}
Table 1: The notations of the terms.  
Figure 3: Position prediction.  
prediction is performed, and \(\hat{s}_{k}\), \(\hat{s}_{k+1}\), and \(\hat{s}_{k+2}\) are the predicted positions in the time index \(k\), \((k+1)\), and \((k+2)\) respectively.