An Artificial Neural Network-Based Handover Scheme for Hybrid LiFi Networks

Combining the ultra-high user throughput of the light fidelity (LiFi) and the ubiquitous coverage of wireless fidelity (WiFi), the hybrid LiFi and WiFi network (HLWNet) demonstrates unparalleled advantages in indoor wireless data transmission. Due to the line-of-sight propagation nature of the optical signal, the handover decision-making problem in HLWNets, however, becomes more critical and challenging than that in previous heterogeneous networks. In this paper, the handover decision-making problem in the HLWNet is regarded as a binary classification problem, and an artificial neural network (ANN)-based handover scheme is proposed. The complete handover scheme consists of two sets of ANNs that use the information about channel quality, user movement, and device orientation as input features to make handover decisions. After being trained with the labeled datasets that are generated with a novel approach, the ANN-based handover scheme is able to achieve over 95% handover accuracy. The proposed scheme is then compared with benchmarks under an indoor simulation scenario. The simulation results show that the proposed approach can significantly increase user throughput by 20.5 – 46.7% and reduce handover rate by around 59.5 – 78.2% as compared with the benchmarks; in the meanwhile, it maintains a great robustness performance against user mobility and channel variation.


FIGURE 1.
A three-module handover scheme. module (DMM), and the handover execution module (HEM), as depicted in Fig. 1. The IGM collects all the information required for the handover decision-making and periodically passes the information to the DMM, where the handover algorithm locates. The DMM then decides the most suitable access network and whether to perform the handover to it. The handover is triggered once the HEM receives the handover request from the DMM.
The handover algorithm that gives the rules for decision-making plays the most important role in the handover scheme design. Mathematically, the handover algorithm can be regarded as a multiple-input single-output function, where the inputs are the values of all metrics used for the handover decision-making and the output, equivalent to either ''0'' or ''1'', indicates the decision result. Any mathematical tool that approximates this type of functions can be used to design a handover algorithm. Many math models, including fuzzy logic (FL) [10], [11], Markov decision process (MDP) [12], [13] [14], and game theory (GT) [15], [16], have been applied for the handover algorithm design in heterogeneous visible light communication (VLC) and RF networks. In our previous work, we regard the handover problem in the HLWNet as a pattern recognition problem, more specifically a binary classification problem, for the first time [17]. The logistic regression (LR) and the support vector machine (SVM) have been applied to design the handover algorithms. Although the simulation results show that the LR-and the SVM-based handover methods outperform the previous handover schemes, their handover accuracy is hard to be improved further due to the inherent disadvantage of solving the non-linear boundary classification problem of these two methods.
To further increase the handover accuracy and improve the other handover metrics, we investigate the artificial neural network (ANN) in the handover decision-making in the HLWNet, due to its capability of solving non-linear problems without explicit models [18], [19] [20]. There have been a handful of attempts to apply ANN to the handover management problems in heterogeneous VLC-RF networks. To increase the user throughput of mobile users, [8] adopts an ANN to adjust the selection preference between LiFi and WiFi access networks. This work has shown the superiority of the ANN in handover algorithm design; however, there are still a number of research gaps in this study. First, the complex indoor user behavior such as device orientation is neglected in the decision-making. Furthermore, instead of deciding whether to execute the handover with given inputs straightaway, the ANN-based algorithms in [8] only provides the network preference score. Extra procedures are needed to make a complete handover decision.
Aiming at the issues mentioned above, we propose a novel ANN-based handover scheme, in which we regard the handover problem in HLWNets as a binary classification problem as we did in [17]. The proposed scheme consists of two ANNs: one is for the handover decision-making from LiFi to WiFi and the other one is for the handover decision-making from WiFi to LiFi. Compared with the ANN-based handover scheme in [8], our methods have two main advantages. Firstly, since multiple attributes such as channel quality, lightpath blockage, user mobility, and device orientation have been considered as features for the ANNs, our method can make more timely, precise, and reliable decisions. Additionally, our proposed method avoids redundant handover decision procedures. Since the handover is regarded as a binary classification problem, the proposed scheme is able to make the handover decision with a set of given inputs straightforward.
The simulation results show that the proposed scheme achieves above 95% handover accuracy, near-optimal user throughput, and a significant handover rate reduction as compared to the benchmarks. In addition, the proposed method shows superior robustness performance against different working scenarios.
The remainder of the paper is organized as follows. The HLWNet model is introduced in Section II. Section III demonstrates the novel ANN-based handover scheme. Section IV presents the simulation results and related discussion. Finally, the conclusions are drawn in Section V.

II. SYSTEM MODELS
An HLWNet system consisting of multiple LiFi APs and a single WiFi AP is used for this study. To avoid interference to the LiFi downlink transmission, we adopt a bidirectional LiFi network scheme that uses visible light for the downlink and IR for the uplink communication [22]. Each LiFi cell consists of a pair of LED and infrared (IR) photodetector (PD) as the transceiver, which is assumed to be facing vertically downwards. In addition, all LiFi and WiFi APs are connected to software-defined networking (SDN)-enabled switch via SDN agents, and the data packets from the Internet will be routed to each AP under the supervision of the network controller, as shown in Fig. 2 [7], [21]. In each LiFi cell, time division multiple access (TDMA) is employed as the multiple access scheme, whereas carrier-sense multiple access with collision avoidance (CSMA/CA) is applied as the medium access control (MAC) for the WiFi network [23].
The system models used for this study, including the LiFi channel model, WiFi channel model, the achievable data rate of both LiFi and WiFi, the modified orientation-based random waypoint (ORWP) model, and the light-path blockage, are the same as our previous work in [9]. The variable notations are also the same as those in [9]. Please refer to Section II of [9] for details.

III. ANN-BASED HANDOVER SCHEME
In this section, we propose a novel ANN-based handover scheme that regards the handover decision as a binary classification problem. The working procedure of the proposed handover scheme is quite straightforward, as shown in Fig. 3. The information about the current/target channel quality, light-path blockage, user mobility, and device orientation is gathered periodically by the IGM which locates in the user equipment (UE). Since only the vertical handover (VHO) is considered in our scheme, the IGM just needs to monitor the channel quality of the LiFi AP with the highest signalto-interference-plus-noise ratio (SINR) and the WiFi AP [9]. The SINR/SNR information can be monitored in the mobile node [8], [24]. The user velocity and angular information can be measured by the inertial measurement unit (IMU) in smart devices [6], [25]. Furthermore, the average lightpath available/unavailable period needs to be recorded and updated to calculate the estimated interruption and recovery rates,ξ 1 andξ 2 [10]. The measured information is then wrapped up as an input vector for the pre-trained neural network. After transforming the inputs through a series of hidden layers which are made up of a set of neurons, the neural network finally outputs the handover decision. In our scheme, the output ''1'' means executing the handover immediately, whereas the output ''0'' means not executing the handover. Since the complete handover scheme consists of two parts, i.e. the handover from WiFi to LiFi and the handover from LiFi to WiFi, we need to train two sets of neural networks. In the following section, we will describe the ANN architecture, the dataset generation, the ANN training, and the ANN testing.

A. ANN ARCHITECTURE
As mentioned in Section I, the handover algorithm can be regarded as a nonlinear function f (x) with a single output either equal to ''1'' or ''0'', where x ∈ R n is the input vector that contains n features. Therefore, designing the handover algorithm is equivalent to finding the optimal approximator or hypothesis h (x; ) of the function f (x). Neural network or ANN, modeled as collections of neurons, shows great potential to solve this problem since the neural network with at least one hidden layer, and proper activation functions can approximate any continuous function [26]. Combining the ANN with a maximum likelihood estimation (MLE) threshold, we can find an approximator function with an output equals ''1'' or ''0''. A fully-connected L-layer (not including input layer) ANN architecture, in which neurons between two adjacent layers are fully pairwise connected, is applied in this article, as shown in Fig. 4. As for each neuron, the sum of weighted outputs of the previous layer and a bias is fed in an activation function in it. The activation function is used to introduce non-linearity to the neuron. The computation process from the input layer to the output layer is called forward propagation, which is given by: where L denotes the depth of the ANN; s l is the number of neurons (not counting bias units) in layer l; a (j) i is the activation of neuron i (i = 0) in layer j; x 0 and a (j) 0 are the biases of the input vector and layer j respectively; (j) ∈ R s (j+1) ×(s j +1) is the matrix of weights controlling function mapping from layer j to layer j + 1; g(·) denotes the sigmoid activation function with the expression as: The UE is currently connected to the LiFi network and the shadow area is the handover execution period. Since the output of the hypothesis h (x; ) indicates the estimated probability that y = 1 on input x, a maximum likelihood estimator is needed in the output layer to achieve the ''1/0'' classification; Hence, for a neural network with well-trained parameters , given an input vector x, the DMM will send the handover request to the HEM if the output of the ANN, y = 1; otherwise, the UE will stay in the current network.

B. DATASET GENERATION
Adequate numbers of data with labeled ground truth are essential for supervised learning tasks; however, all previous works of the ANN-based handover algorithm, to the best of our knowledge, lack details on labeled data generation [8], [27] [28]. Unlike the other classification problem, such as object detection, it is not obvious to decide the target value with a set of given inputs; in other words, it is not clear whether the handover execution is worthwhile, though the information about the channel quality, user mobility, and the interruption/recovery rates is known. To build up the labeled datasets, we propose a novel approach that consists of the following steps: 1) First, we generate the tuple sequences of the dynamic information (including position, velocity, and polar angle) by the modified ORWP model in Section II-E of [9]. 2) The SINR/SNR values of both LiFi and WiFi channels for each user at each moment are then calculated from the position, velocity direction, and polar angle information under the simulation scenarios described in Section II-A and B of [9].
3) The light-path blockage is introduced by the ON-OFF model with given interruption and recovery rates ξ 1 and ξ 2 . For simplicity, the SINR of the LiFi channel is assumed to be 0 when the optical channel is blocked.
After implementing steps 1) to 3), we obtained the dataset for M users over the T SIM simulation time: where K = T SIM / t is the discrete time length. 1) Randomly choosing a time point k, the data required for the handover decision of UE m at this moment is denoted as: where x (m) k is the input vector for the neural network. As illustrated in Fig. 5, if the UE is connected to a LiFi AP and the average data rate of switching to the WiFi network in the following short period τ is greater than the rate of staying in the LiFi network, i.e., where τ e is the execution time, then we label y = 1, otherwise y = 0. 2) Feature scaling is needed to ensure that all features have the same scale. We end up with 10000 sets of data structured as shown in Fig. 6. With the same method, we have also created 10000 sets of data for the handover decision from WiFi to LiFi. Both datasets are partitioned into three segments, in which the training (70%) and validation (15%) sets are for adjusting the hyperparameters and tuning the model; and the test (15%) set is used to assess the network performance.

C. TRAINING AND TESTING
After setting up the ANN architecture, we obtain a hypothesis h(x; ). Then, we need to work on the model training to adjust the hyperparameters and to achieve the optimal performance. The data loss which measures the compatibility between a prediction and the ground truth is adopted to evaluate the hypothesis performance. In our work, the data loss is calculated by Eq. 6, as shown at the bottom of the next page, where N train is the size of the training set. Therefore, training the ANN is transformed into an optimization problem, * = arg min J ( ), which is solved by the gradient descent algorithm in our work [29]. During the training process, the ANN model should also be tuned based on the cross validation [30]. Finally, the performance of the hypothesis is evaluated on the test set by checking the average loss plots, and the confusion matrices [31].

A. SIMULATION PARAMETERS
An indoor office with dimensions of 18 × 18 × 3m 3 is implemented as the default simulation scenario, which is equipped VOLUME 10, 2022  with a 2.4GHz WiFi AP and 36 LED-based LiFi APs in a lattice topology. In addition, the kernelized LR(K-LR)-based, the kernelized SVM(K-SVM)-based, and the ANN-based handover algorithm (referred to as ANN * ) 1 in [8] with the same simulation parameters, are adopted as benchmarks of the proposed ANN-based handover scheme (referred to as proposed ANN). The handover overhead is approximated as a normal distribution with an expected value of 400ms [10]. Additionally, 300 users, whose velocity magnitude and direction are uniformly distributed from 0 − 3m/s and 0 − 2π, are evaluated and each of them has a simulation time of 300s. Other simulation parameters are summarised in Tables 1 and 2.

B. ANN SPECIFICATIONS
As described in Section III-B, the datasets are labeled by checking whether the handover execution brings more benefits than keeping connected to the current AP in the following ''τ '' period. If the handover is worthwhile, the data vector is labeled with ''1''; otherwise, it is denoted with ''0''. 1 Because the authors of [8] do not provide their dataset or explain how they generate their dataset, we train their ANN model with our datasets here. Therefore, the first task is to determine the optimal τ value that gives the best overall performance.
We first check the optimal τ of the dataset to train the ANN that makes the handover decision from LiFi to WiFi. We start by defaulting the depth of the ANN to 2, i.e. there is one hidden layer, which by default has 7 neurons and one bias. Suppose that the UE is currently connected to the LiFi network, different values of τ are chosen to label the 10000 sets of data, which are then used to train the neural network. After that, the trained hypothesis is used to simulate the average user throughput of the 100 users over 300s. As shown in Fig. 7a, we check the average user throughput against different τ values and then use 5th-degree polynomials to approximate the relation between them. It is found that the average user throughput of the proposed ANN-based handover scheme increases sharply and reaches its maximum when τ is around 1.9s. Then, the throughput decreases rapidly as the value of τ increases and eventually converges to around 25Mbps. This is because the measured inputs are only useful for the ''near future'' predictions but do not work for the longterm ones. In addition, the bell-shaped curve in Fig. 7a also indicates that it is feasible to employ a neural network to design a handover algorithm because if it did not work, the  curve should be a horizontal line. Using the same approach, the optimal τ for the dataset to train the ANN that makes the handover decision from WiFi to LiFi is found located around 2.1s, as shown in Fig. 7b. Hence, the two optimal values, τ = 1.9s and τ = 2.1s, are applied to label two datasets to train the decision-making ANNs. After obtaining the labeled datasets, we begin to train the ANNs for handover decision-making. We first train the ANN that makes handover decisions from LiFi to WiFi. The training and validation losses against the epoch index are shown in Fig. 8a. It shows that the training and validation losses decrease rapidly and converge to around the same amount as the epoch index increases. This indicates that our network is effective and that there is no overfitting.
The performance of the trained ANN is then checked with the test set and the results are presented in the confusion  Fig. 9a. It is found that the proposed ANN model performs quite well and it can achieve a 95.1% accuracy with

matrix in
where precision = 88.9% and recall = 89.2%. We have tried to improve the accuracy by increasing the number of hidden layers and neurons, but with limited improvement. Therefore, we believe that one hidden layer with 7 neurons and one bias is sufficient for this problem. With the same approach, we trained the other ANN that makes handover decisions from WiFi to LiFi with the second dataset. The losses of the training process and the confusion matrix are presented in Fig. 8b and 9b, respectively. The complete ANN-based handover scheme is obtained by combining the two well-trained ANNs. The proposed ANN-based approach will be compared with the other three benchmarks in terms of user throughput, handover rate, and robustness in the following sections.
C. HANDOVER ACCURACY 1000 sets of labeled data are randomly chosen from the test set to evaluate the handover accuracy of the four handover methods. The accuracy performance is presented in Fig. 10. It shows that the proposed ANN-based handover scheme is able to achieve the highest handover accuracy of 95.1% with F 1 score equivalent to 0.89. In addition, the handover accuracy of K-LR and K-SVM methods are similar, which agrees with the conclusion of our previous study in [17]. They can also achieve handover accuracy of above 90%; however, their F 1 scores, which equal 0.79 and 0.81 respectively, are lower than that of the proposed ANN-based method. The numerical results of these two methods are slightly different from those in [17] since different test sets are used in these two studies. The ANN * benchmark has the lowest handover accuracy of 83.1% and the worst F 1 score of 0.64.  Fig. 11 shows the cumulative distribution function (CDF) plot of average user throughput under two different situations: i) only LoS component is considered, and ii) both LoS and NLoS components are taken into account. It is found that for all four methods, the user throughput that considers both LoS and NLoS components is always greater than that which considers the LoS component only. This is because the NLoS component can significantly increase the received signal strength of UE, especially for those UE close to the wall, where LoS signal is often extremely low but the NLoS part is strong. Additionally, the proposed ANN-based scheme can always achieve the highest user throughput, which is around 20.5 − 46.7% higher than that of the benchmarks. Furthermore, it shows that the CDF curves of the proposed scheme are the sloppiest, which indicates that our method has the best robustness performance as compared to the benchmarks. The reason is that our approach takes into account multiple attributes to make the handover decision.

E. HANDOVER RATE
The handover performance of four different handover algorithms is presented in Fig. 12. Same as Section IV-C, it can be concluded that, for all four methods, the handover performance with both LoS and NLoS components considered is always better than that with LoS component only, which indicates that NLoS component can largely improve the optical channel quality. The average handover rates of the proposed ANN-based scheme are the lowest, whereas those of the ANN * are the highest. The performance of the K-LR is similar to that of the K-SVM, which agrees with what we found in [17]. Specifically, the proposed ANN-based algorithm can reduce the handover rates by around 59.5% and 78.2% as compared to K-SVM and ANN * algorithms.

F. ROBUSTNESS
A good handover algorithm should not only boost the transmission rate and avoid unnecessary handovers but also adapt  to different working scenarios. In other words, it is supposed to show robustness against different working scenarios. We first examine the effect of user velocity on the performance of different algorithms. Fig. 13 shows the average user throughput as a function of user velocity. It shows that the data rates provided by all four methods decrease as the user velocity increases; however, the proposed ANN-based approach and another ANN-based method (ANN*) have relatively smaller variations, since the user velocity has been attributed to the network selection in these two methods. Our proposed algorithm provides the highest user throughput at different velocities; in the meanwhile, it is more immune to speed variations than K-SVM and K-LR benchmarks. The influence of the user velocity on the handover rate is presented in Fig. 14. The handover rates increase as the velocity increases for all four methods, among which ANN * has the greatest handover rate, and our proposed algorithm has the lowest handover rate and the best robustness performance. The proposed ANN-based method can avoid around 60% and  75% handoffs as compared to the K-SVM and the ANN * algorithms, which agrees with our observation from Fig. 12. Fig. 15 and Fig. 16 compare the average user throughput and the handover rate performance of the proposed scheme and the benchmarks under different channel conditions. As we know, the quality of the optical channel is determined by interruption and recovery rates together. The interruption rate ξ 1 is chosen as 0.05s −1 and 0.1s −1 , whilst the recovery rate ξ 2 ranges from 0.1s −1 to 1s −1 . The increase in ξ 1 means that the light path is interrupted more frequently; in other words, the channel quality becomes ''worse''. In contrast, the increase in ξ 2 indicates that a blocked optical channel has a greater chance of recovery. In Fig. 15, it is found that the average user throughput of all four methods increases as ξ 1 decreases or as ξ 2 increases, which agrees with our expectation. Additionally, the average data rate provided by the ANN-based algorithm is always the highest; in the meanwhile, its variation is the smallest which indicates that our method has the best robustness performance. Fig. 16 shows the average handover rates of the proposed ANN-based method as compared with the benchmarks. It shows that ANN * , K-SVM, and K-LR methods have much higher handover rates and they are more susceptible to network condition variations. Our ANN-based algorithm, in contrast, can significantly reduce the handover rates under different channel qualities, and at the same time, maintain the strongest robustness.

V. CONCLUSION
In this paper, the handover problem in the HLWNet is regarded as a binary classification problem and an ANN-based handover scheme is proposed as a solution. The proposed handover scheme consists of two ANNs, of which one is for making the handover decision from LiFi to WiFi and the other one is for the handover decision from WiFi to LiFi. To obtain reliable and realistic simulation results, we build a comprehensive simulation model that includes channel quality, user movement, light-path blockage, and device orientation. In addition, a novel approach is introduced to generate labeled datasets for supervised training. After being trained with the pre-labeled datasets, the ANN models are able to achieve above 95% handover accuracy. The proposed ANN-based handover scheme is then evaluated and compared with another ANN-based method and two handover schemes using pattern recognition techniques. The simulation results show that, compared with benchmarks, the proposed method can significantly increase user throughput by around 20.5−46.7% and reduce handover rates by around 59.5 − 78.2%. Furthermore, the proposed method also shows great robustness against different working scenarios. Our work is novel and it shows that the neural network can be a potentially robust solution to the handover problem in heterogeneous networks. We believe that this work can play an important role in future research on the next-generation wireless network which is expected to be composed of ultra-dense networks with LoS communication links such as LiFi and millimeter wave networks. VOLUME 10, 2022