# ML-based Handover Prediction and AP Selection in Cognitive Wi-Fi Networks

Muhammad Asif Khan1, Ridha Hamila2, Adel Gastli2, Serkan Kiranyaz2 and Nasser
Ahmed Al-Emadi2  Department of Electrical Engineering, Qatar University12
Email<EMAIL_ADDRESS>{hamila, adel.gastli, mkiranyaz<EMAIL_ADDRESS>
###### Abstract

Device mobility in dense Wi-Fi networks offers several challenges. Two well-
known problems related to device mobility are handover prediction and access
point selection. Due to the complex nature of the radio environment,
analytical models may not characterize the wireless channel, which makes the
solution of these problems very difficult. Recently, cognitive network
architectures using sophisticated learning techniques are increasingly being
applied to such problems. In this paper, we propose data-driven machine
learning (ML) schemes to efficiently solve these problems in wireless LAN
(WLAN) networks. The proposed schemes are evaluated and results are compared
with traditional approaches to the aforementioned problems. The results report
significant improvement in network performance by applying the proposed
schemes. The proposed scheme for handover prediction outperforms traditional
methods i.e. received signal strength method and traveling distance method by
reducing the number of unnecessary handovers by 60% and 50% respectively.
Similarly, in AP selection, the proposed scheme outperforms the strongest
signal first and least loaded first algorithms by achieving higher throughput
gains up to 9.2% and 8% respectively.

###### Index Terms:

Wi-Fi, Cognitive Networks, Machine Learning, Handover, Access Point Selection,
Throughput

##  I Introduction

Wi-Fi Networks are experiencing two paradigm shifts in terms of size and
applications. The size of Wi-Fi networks has increased from small home and
office networks to large-scale ultra-dense networks, also referred to as
Overlapping Basic Service Set (OBSS). At the same time, there has been an
increasing number of novel applications and services such as content
distribution [1], Internet of Things (IoT) [2], Intelligent Transportation
Systems (ITS) [3, 4], Device-to-Device (D2D) based cooperative networking [5,
6] and Unmanned Aerial Vehicles (UAVs) [7] that are using Wi-Fi as a
communication technology. These two paradigm shifts pose several challenges in
legacy Wi-Fi networks. Two fundamental challenges in ultra-dense Wi-Fi
networks are (i) handover prediction and (ii) access point (AP) selection.

###  I-A Handover Prediction Problem

Handover prediction refers to the problem of anticipating about the connection
state of a mobile device associated with an AP. Handover prediction can play a
key role in providing seamless connectivity in next generation networks. It
brings several potential benefits; firstly the accurate prediction of the
handover event allows to timely initiate the transfer of connection to a new
AP to reduce the handover delay. Secondly, it prevents unnecessary handovers
(i.e. ping-pongs) to avoid connection disruptions in highly dynamic networks.

Handover prediction can be challenging in some cases. Fig. 1 illustrates
different scenarios of inter-BSS handovers in Wi-Fi networks. A Wi-Fi user
travels from point A to point E (follows the trajectory shown as red, dashed
line). Assume that the user passes through the region where the radio coverage
of AP-1 and AP-2 overlaps, the received signal strength (RSS) drops below the
threshold value and it starts scanning for alternate connection. Meanwhile,
when the user moves a bit farther to point D, it discovers AP-2 with a
stronger signal. It disassociates from AP-1 and associates to AP-2 ($1^{st}$
handover). The user continues to move and follows the trajectory from point E
to G (dashed blue line) and again passes through an overlapping region of AP-2
and AP-3. At point F, the user changes association to AP-3 ($2^{nd}$ handover)
and back to AP-2 when it moves a little farther ($3^{rd}$ handover). The user
moves ahead and follows the third trajectory from point G to H, and changes
association to AP-1 when it approaches to point H ($4^{th}$ handover). At
Point H, the user can’t move farther towards AP-1 due to hindrance and the
signal form AP-2 becomes stronger even with a slight movement in any direction
($5^{th}$ handover).

From the above discussion, it becomes obvious that there are some cases where
the handover shall not take place despite the signal strength drops slightly
below the threshold level to avoid the ping-pong effect.

Figure 1: Inter-BSS handover scenario.

###  I-B Access Point Selection Problem

Assuming a Wi-Fi device is located in the transmission range of more than one
AP, it can associate with either one as shown in Fig. 2. By default, a station
associates to the AP from which it first receives a beacon or a probe response
frame. However, in practice such kind of automatic association of stations can
cause performance degradation when the connection to the selected AP is weak.
The optimal selection of an access point in dense WLANs is crucial for network
performance.

The legacy methods for users association in WLANs are: (i) Strongest Signal
First (SSF) and (ii) Least Loaded First (LLF). Both the SSF and LLF
association methods have shortcomings. For instance, in SSF scheme, a station
associates to the AP from which it receives a stronger radio signal, however,
if the AP is over-utilized, the association of more stations can cause
congestion in the BSS which leads to increase in the packet loss and the
packet end-to-end delay [8, 9, 10]. On the other hand, in LLF scheme, the
selection of the least loaded AP provides load balancing at multiple APs,
however it may force a station to associate with a distant AP. Consequently,
the station suffers from poor connection quality. To address these
shortcomings of SSF and LLF schemes, the authors in [11] propose a new metric
for AP selection named as potential bandwidth which is defined as, “the MAC
layer bandwidth that an end-host is likely to receive if it were to affiliate
with a given access point”. The new metric takes into account the signal
strength as well as the AP load and additionally the contention on the
wireless medium. However, the technique in [11] may not achieve the desired
performance if the APs uses different beacon frequencies. It is therefore
necessary to devise an AP selection strategy that improves the overall network
performance while meeting the demands of new users.

i

Figure 2: User association in overlapping BSS’s.

Recently, new architectures based on Software Defined Network (SDN) and
Cognitive Networking (CN) paradigms are being proposed in the literature [12,
13, 14]. SDN [15, 16, 17] refers to the type of networks in which the control
and data forwarding functions are separated. In these architectures, the
network devices such as switches, routers and access points act as non-
intelligent data forwarding devices while the intelligent functions such as
data routing are implemented in a central controller also called as the SDN
Controller. On the other hand, cognitive networking [14] refers to the network
paradigm in which the networks automatically learn and respond to changes by
actively taking decisions and planning network resources to achieve the end to
end performance goals. SDN offers the software adaptation to implement
cognitive networks [18]. Cognitive networks can be realized using both
distributed and centralized architectures. A novel approach to realize
cognitive networks is to adapt data-driven machine learning (ML) algorithms to
address challenges in future ultra-dense and dynamic networks [19, 20, 21]. ML
algorithms can be used for both network design [22, 23, 24, 25] and network
performance evaluation [26, 27, 28, 29].

This paper proposes a centralized network architecture using an SDN controller
that uses machine learning algorithms to solve the two aforementioned network
problems. Firstly, it anticipates the handover event that is likely to occur
and to decide whether the handover is actually required? The proposed scheme
reduces the likelihood of unnecessary handover events in the presence of
Overlapping BSS (OBSS) in ultra-dense deployment. Secondly, it solves the AP
selection problem by predicting the post-selection network throughput to
choose the best AP. Network throughput is a significant metric to measure the
user experience. The prior knowledge of future throughput can help to avoid
network congestion which can play a vital role in AP selection decision. The
proposed scheme can be used to develop large frameworks and testbeds for real-
time monitoring and network diagnostic to boost the Quality of Service (QoS)
in Wi-Fi networks.

###  I-C Contribution

The paper presents efficient schemes to address two fundamental issues (i.e.,
handover prediction and AP selection) in cognitive Wi-Fi networks. The
proposed schemes uses data-driven machine learning algorithms to solve the two
problems. The results are compared with traditional methods to validate the
benefits of the proposed scheme. The paper also proposes useful datasets to
train the machine learning algorithms for robust performance. The datasets
used in this study are acquired using simulations performed in network
simulator (ns-3) [30] and Mininet [31] emulator. An interesting contribution
is the use of ns-3 building class in the simulation which is not used in
previous related works to the best of our knowledge. The use of ns-3 building
class allows simulating both indoor and outdoor scenarios by configuring
buildings, floors, rooms and other real-world structures in simulation to
acquire more realistic datasets.

The rest of the paper is organized as follow: Section II presents the state-
of-the-art approaches to solve the handover prediction and AP selection
problems. Section III describes the proposed scheme. Section IV explains the
methodology used to evaluate the performance of the proposed scheme. The
evaluation results are reported in Section V. Lastly, conclusions are drawn in
Section VI.

##  II Related Work

Table I: Summary of related works.

Ref | Category | ML-based |  Parameters | Algorithms | Complexity | Applications
---|---|---|---|---|---|---
[32] | Throughput Prediction | Yes |  location, speed, SNR, RSRQ, RSRP, and RSSI | GLM, NN, RF | High | File transfer
[33] | Throughput Prediction | Yes |  Past Throughput values | Regression, NN,
SVR, EWMA | Low | TCP Session throughput
[34] | Throughput Prediction | Yes |  Frame Size and Channel SNR Values | MLP | Medium | Frame Size Optimization
[27] | Throughput Prediction | Yes |  MCS Index, Spatial Streams, Modulation Scheme, Coding Rate, Data Rates | Categorical
Regression | High | Interference Classification
[35] | Throughput Prediction | Yes |  Normalized RSS, Traffic Bytes transmitted by interfering stations, Inter-Channel Distance | Linear
Regression | High | Channel selection
[36] | Handover Prediction | No |  RSS | AR(1) | Low | Inter-BSS handover
[37] | Handover Prediction | No |  RSS, Position | Monitoring RSS trends | Low | Inter-BSS handover
[38] | Handover Prediction | No |  RSS | ARMA, ARIMA | Low | Inter-BSS handover
[39] | Handover Prediction | No |  RSS, distance | Rate of RSS change | Medium | WLAN to cellular
[40] | AP Selection | No |  SINR | OPASA | High | AP Selection in Dense WLANs
[11] | AP Selection | No |  potential bandwidth | Analytical approximation | Low | AP Selection in WLANs
[9] | AP Selection | No |  bandwidth | Max-min Approximation | High | AP Selection in WLANs
Terms: |  |  |
RSSI: Received Signal Strength Indicator | RSRP: Reference Signal Received Power
RSRQ: Reference Signal Received Quality | GLM: Generalized Linear Models
NN: Neural Network | EWMA: Exponential Weighted Moving Average
SVR: Support Vector Regression | RF: Random Forest
MLP: Multi-Layer Perceptron | AR: Auto Regression
ARMA: Auto-Regressive Moving Average | ARIMA: Auto-Regressive Integrated Moving Average

A cognitive network is a modern network architecture that is fully aware of
the network state and can adapt to the varying network conditions. Such a
network learns from these adaptations to make future decisions to achieve the
end-to-end performance goals. Several prototypes for realizing cognitive
networks are proposed in the last few years [13, 12, 41]. To realize efficient
and scalable cognitive networks, machine learning techniques are being used in
[42] and [43]. ML algorithms can be used for sophisticated learning and
decisions-making in large and complex wireless networks where analytical
methods do not meet the required performance requirements. Machine learning
techniques are applied to several problems in wireless networks, e.g.
throughput estimation [34, 44], interference classification [27], delay
analysis [35] and channel migration strategy [45].

In [46], authors address the problem of throughput estimation for TCP flows in
Wide Area Networks (WAN). The authors used Support Vector Regression (SVR) on
dataset obtained using a laboratory testbed. The prediction accuracy is
evaluated using “relative prediction error” metric. In [33], authors address
the TCP throughput prediction in cellular (3G/HSPA) networks using seven
prediction algorithms and compared the prediction accuracy of each using the
root-mean-squared error (RMSE) metric. In [32], authors propose a throughput
estimation strategy in Long Term Evolution (LTE) cellular network using
several network parameters such as RSSI, Signal-to-Noise Ratio (SNR),
Reference Signal Received Quality (RSRQ) and Reference Signal Received Power
(RSRP). The authors used three machine-learning algorithms namely Generalized
Linear Model (GLM), Artificial Neural Networks (ANN) and Random Forests (RF),
to evaluate the predictor performance.

Previous works on handover prediction in Wireless LANs [36, 37, 10] use
timeseries forecasting methods. Classical timeseries forecasting methods
include autoregression (AR), moving average (MA), Autoregressive Moving
Average (ARMA), Autoregressive Integrated Moving Average (ARIMA), Simple
Exponential Smoothing (SES) and other variants of these methods. For instance,
authors in [36] proposed a method to trigger handover using RSS based
prediction in Wireless LANs. The authors argue that the RSS value remains
constant during a short time interval (0.5 seconds in the proposed model), and
predict the future RSS values using the autoregressive process of order 1 i.e.
AR(1). The proposed scheme is evaluated using dataset collected from ns-3
simulation. Handover event is predicted using the position information of the
mobile device in [37]. In [10], authors proposed a handoff scheme based on the
continuous monitoring of wireless links using the short-term and long-term
trends in signal strength of beacon frames. The proposed scheme claims 50%
reduction in the handover delay as well as improvement in the overall
performance. In [38] authors used two RSS-based methods for handover
prediction i.e. ARMA for stationary signals and ARIMA for non-stationary
signals.

In [39], authors proposed traveling distance prediction based model for
handover decision. Authors used the RSS values to calculate the distance
between the AP and the mobile terminal (MT) using the following formula.

$RSS_{P}\;=\;E_{t}\times l_{OP}^{-\beta}\times 10^{\epsilon/10}$ (1)

where $E_{t}$, $\beta$ , $\epsilon$ represent the transmit power (in mW) of
the AP, the path loss exponent and a zero mean Gaussian distributed random
variable, respectively. The algorithm assumes that the MT travels at a
constant speed. Results are compared with Mohanty’s [47] and Varma’s methods
[48]. The classical methods used in the aforementioned works, perform poorly
on noisy data and in multi-step forecasting [49]. Hence, there is an
opportunity to use novel and efficient methods to solve the handover
prediction problem. For instance, authors in [50] proposed handover prediction
using recurrent neural networks (RNN) in vehicular networks. Although RNN is
relatively a more sophisticated method for time series predictions, we did not
use RNN in our proposed scheme due to their complexity. Instead, we designed
our dataset in a way to capture the time-dependency. Furthermore, the work
[50] does not considers AP load while selecting the new AP after handover..

To solve the AP selection problem in dense networks, authors in [40] propose a
decentralized algorithm. The proposed Optimal AP Selection Algorithm (OPASA)
uses the estimated downlink SINR which captures inter-BSS interference from
overlapping APs. The authors show that OPASA outperforms the SSF algorithm by
achieving up to 99% aggregate throughput gain. In [11], authors propose
potential bandwidth as a metric for AP selection. Potential bandwidth is
calculated from the beacon timing of APs. Authors in [9] solve the AP
selection problem using approximation of Max-min fair bandwidth allocation
algorithm. The authors compare the results and show that the proposed
approximation algorithm outperforms both SSF and LLF algorithms. Authors in
[51] proposed to use supervised ML methods (i.e., naive bayes, decision trees,
and random forest) to solve the AP selection, with higher throughput
improvement reported for random forest method.

##  III Proposed Scheme

###  III-A Architecture

The proposed scheme consists of four components: SDN controller, feature
extraction module, datasets, and machine learning module. Fig. 3 illustrates
the functional architecture of the proposed scheme.

Figure 3: Framework for cognitive network.

The SDN controller constantly collects network data consisting of several
parameters of interest such as device’s capability, supporting rates, battery
status, user’s position and speed information, Wi-Fi channel being used,
packet arrival rates, average throughput and frames retransmission ratios. The
network attributes constitute raw data which is then processed to extract
useful features. In the feature extraction module, some attributes are
directly used as features, whereas some new features are created from the raw
data. For instance, the number of associated clients to an AP is directly used
as a feature, whereas the inter-arrival time of the packets is a feature that
is computed from the packet-arrival times of two consecutive packets.

The features are then combined to form ML-ready datasets which are used by ML
algorithms to implement end-to-end learning. Two types of datasets are created
namely design datasets and evaluation datasets. The design datasets are used
to predict a design parameter e.g. the AP for association. Other examples
include the maximum number of nodes served by the AP, transmit power of the AP
and the optimum channel to be used etc. The evaluation datasets are used for
evaluating the network performance in the current conditions e.g. transmission
throughput. Other examples include average packet end to end delay, packet
inter-arrival rates, network congestion and channel access delay.

###  III-B Functional Overview

The SDN controller continuously monitors the network changes (called as
triggers). Three types of triggers are used by the controller i.e. (i)
topology change, (ii) performance degradation, and (iii) periodic triggers. A
new user sending association request to an AP corresponds to the first type of
trigger. The lower network throughput or increase in the packet end-to-end
delay than a pre-defined threshold level corresponds to the second type of
trigger. Periodic triggers are activated at regular intervals regardless of
any change in the network state. The activation of any of these triggers
automatically runs the appropriate ML model. The ML model at fixed intervals
imports the required ML-ready dataset form the database to retrain. When
triggered, the ML model can thus generate accurate output. The output of the
ML model is used by the SDN controller to implement a control action. The
proposed scheme for handover prediction and AP selection is explained as
follow:

###  III-C Handover Prediction Scheme

Handover prediction is solved as a binary classification problem using
supervised learning techniques. The raw data for handover prediction consists
of timeseries of RSS values of beacon frames received from APs. To be used in
supervised learning, the timeseries is transformed into dataset as illustrated
in Fig. 4 and further explained in this section.

Feature Derivation WindowForecast WindowForecast PointTime-9s-5s-1s+1s0s

Figure 4: Handover prediction framework.

Fig. 5 illustrates the proposed handover prediction scheme. Each device
constantly monitors the RSS and records the RSS values in beacon frames in a
RSS_REGISTER. The RSS_REGISTER is then shared with the controller every second
(beacon frequency). The controller copies the values from the RSS_REGISTER
into a database of raw data. Each time a RSS_REGISTER is received, it is
appended to the previous data. The raw data is then accessed by the feature
extraction module, which transforms the raw data into ML-ready dataset. The
ML-ready dataset consists of several features as depicted in Table II. Each
sample in the dataset consists of 13 features. Columns 1 to 10 contains per-
second average RSS values for 10 seconds. Column 11-13 contain the statistics
calculated based on the first 10 columns i.e. mean, minimum and maximum. Each
row in the dataset is calculated by applying a unit (1 second) shift to the
previous column.

The controller constantly monitors the current association of the device. The
method defines two RSS thresholds denoted as $T_{1}$ and $T_{2}$. $T_{1}$
refers to the RSS level which is significantly low, but still supports an
ongoing connection despite if RSS drops below it. Whereas, $T_{2}$ refers to
the RSS level which is the minimum level to support a connection. If RSS drops
slightly below the threshold, the connection will be terminated. The
controller sends first trigger when the RSS of the device drops the first
threshold $T_{1}$. The first trigger indicates the possibility of a handover
in the next couple of seconds and hence a proactive measure is necessary. The
trigger activates the machine learning module to run the algorithm at each
time step to predict the probability of handover in the next time step. It is
worthy to note that the first trigger is significant to reduce unnecessary
processing by continuously running the ML algorithms when the device lies in
good coverage. Once the trigger is generated, the ML module runs the trained
model to predict whether handover should be initiated or not? The ML module
periodically imports the most recent feature vector from the dataset for
inference and runs the model to predict the handover. The dataset is updated
by appending the prediction decision for the given feature vector to improve
the future learning process and prediction accuracy.

Figure 5: Handover prediction scheme.

When the handover is detected for a given feature vector, the handover process
is initiated. After completing the handover, when the RSS from the new AP is
increased and becomes higher than $T_{1}$, the controller sends another
trigger to the machine learning module to stop running the prediction process.
If at anytime, the RSS drops to the second threshold $T_{2}$, a handover is
initiated without running the ML model (the manual handover decision is not
illustrated in Fig. 5) and the dataset is updated by appending the handover
decision to the given feature vector.

Table II: Dataset for handover prediction. Features | Target Variable*
---|---
1, 2,… 10 | 11 | 12 | 13 |  Binary variable
RSS0 … RSS9 | Min | Max | Mean |  HO prediction*
(0, 1)

###  III-D Access Point Selection Scheme

The AP selection problem is addressed by the proposed scheme using a multi-
criteria online learning technique as illustrated in Fig. 6

Figure 6: AP selection flow diagram.

When an AP receives an association request from a Wi-Fi station (STA), it
forwards this request to the SDN controller. The SDN controller checks if the
dataset (Table IV) is available to use machine learning algorithm to choose
the best AP to offer connection to the new user. Initially when the network is
first deployed, the dataset is not available. Hence, the controller uses the
default algorithm (i.e. SSF or LLF) to select the AP. The controller computes
the per BSS throughput for the given network parameters. Once, the dataset is
populated with sufficient datapoints, any new association request is handled
by the machine learning model. The proposed scheme predicts the throughput for
each AP in the overlapping BSS and returns the estimated throughput for each
AP (if the new STA would be associated to this AP) to the controller. The
controller then selects the AP which provides higher estimated throughput for
connecting the requesting client.

To create the dataset for throughput estimation, the controller constantly
records the information such as the number of associated clients and packet
information (e.g. timestamps, arrival time, packet size and signal to noise
ratio etc.). New feature, Inter-Arrival Time (IAT) is calculated from the
timestamp and arrival time of each packet. The two features, IAT and the
number of clients connected to the access point are primarily selected to be
used for throughput estimation. Furthermore, new features are derived from the
IAT values, using the statistics such as minimum, maximum, mean, variance,
skew and kurtosis. The features are collected over a time window of fixed
duration for the whole network. The structure of ML-ready dataset for
throughput estimation is given in Table III

Table III: Dataset for throughput estimation. | Parameters | Derived | States | Data Type
---|---|---|---|---
Features | Clients | n_clients | - | integer
Timestamp | IAT | [mean, min, max, skew, kurtosis] | float
Arrival Time |  |
Target Variable | Arrival Time | Throughput* | - | float
Packet Size

For AP selection, the controller simultaneously collects other parameters to
compute features to create dataset. The structure of dataset used for AP
selection is listed in Table IV.

Table IV: Dataset for AP selection. | Parameters | Derived | States | Data Type
---|---|---|---|---
Features | Clients | n_clients | - | integer
RSSI | SNR | [mean, min, max, skew, kurtosis] | float
Noise Level |  |
MAC Queue Length | MAC delay | [mean, min, max, skew, kurtosis] | float
Time stamp |  |
Target Variable | Arrival Time | Throughput | - | float
Packet Size

##  IV Evaluations

The proposed scheme is implemented using ns-3 simulator [30] and Linux-based
Mininet network emulator [31]. Mininet provides a sufficient level of
flexibility and control over the network to dynamically implement new
configurations. Additionally, it allows interactive simulation and user can
add traffic and applications on devices as well as apply some topological
changes during the simulation runtime, thus enabling users to create more
dynamic scenarios. On the other hand, ns-3 is a de-facto standard for
simulating wireless networks. It provides accurate models of the wireless
channel. The recent version of ns-3 also supports indoor models where users
can model buildings, floors, rooms and other parameters of the real world.

To implement the proposed scheme for handover prediction, we performed
extensive simulations in ns-3 to acquire raw network data. Both indoor and
outdoors devices are deployed in the simulation. The simulation uses the
design parameters defined in Table V.

Table V: Simulation parameters for building topology. Parameter | Value
---|---
Building Area ($m^{2}$) | 300 x 100
No. of floors | 1
No. of rooms along x-axis | 30
No. of rooms along y-axis | 10
Type of building | Commercial
Wall type | Concrete with windows
Mobility Model | MobilityBuildingInfo
Propagation Loss Model | OhBuildingsPropagationLossModel
External Wall Loss (EWL) | 7 dB

The raw data acquired is transformed into dataset as given in Table II. The
datasets are then used in Mininet-based simulation to predict handovers using
Random Forest (RF) algorithm. Random Forest (RF) [52] is a supervised learning
algorithm employed in classification problems. It randomly selects features to
build several decision trees and then averages the results. It is relatively a
simpler algorithm and requires less time to train a ML model.

To implement the proposed scheme for AP selection, the controller is
configured to simulate the two user association algorithms i.e. SSF and LLF in
Mininet. The simulations include 3 APs and 50 STAs, randomly moving in the
network and changing association controlled by these algorithm. The network
traces are collected and dataset is created according to Table IV. Lastly, the
controller uses an ML model to perform AP selection. The previously collected
datasets are used to train the ML model to estimate network throughput. The
STA-AP association which will give higher estimated aggregate throughput, is
then selected.

The AP selection dataset involves the use of estimated throughput and hence it
is necessary to evaluate the accuracy of the algorithms which estimates the
throughput. To evaluate the accuracy of estimated throughput, we used two
algorithms i.e. Multi-layer Perceptron (MLP) and SVR due to their capability
to better predict such metrics [43]. The raw traces form the simulated network
are collected and transformed into useful features as listed in Table III to
create the ML-ready dataset. The dataset is divided into training-validation
(70-30 %) splits. The two algorithms are trained with the training data and
are then tested by applying to the unseen validation data. To further validate
the statistical significance of the model, 10-fold cross validation is used to
avoid over-fitting.

##  V Results and Discussion

The performance of the proposed handover prediction scheme primarily depends
on the accuracy of the machine learning model. Firstly, the prediction
accuracy of the RF algorithm used for handover prediction is evaluated using
confusion matrix. A confusion matrix is used to evaluate the percentage of
correct and wrong predictions on data points of all classes in the dataset.
The confusion matrix shown in Table VI shows the accuracy of the RF algorithm.

Table VI: Confusion matrix. |  | Predicted
---|---|---
|  | Handover | No Handover
| Handover | 90.5% | 9.5%
Actual | No Handover | 6.2% | 93.8%

It can be seen that the RF algorithm provides high accuracy to correctly
predict the handover events. In the next step, the performance of the proposed
handover prediction scheme is compared to other methods stated earlier to
assess the overall performance. Fig. [7] shows the performance of the proposed
scheme versus two other handover prediction methods based on RSS forecasting
method [36] and traveling distance method [39]. The figure shows the number of
unnecessary handovers (cumulative) over time, computed for the three methods.
It can be seen that the proposed scheme outperforms the two methods by
reducing the overall numbers of unnecessary handover. The analysis of results
show that the proposed scheme reduces the number of unnecessary handovers by
approximately 60% and 50% as compared to RSS method and traveling distance
method, respectively.

Figure 7: Unnecessary handovers using the proposed scheme versus previous
approaches.

The proposed scheme for AP selection problem is then evaluated. As the
accuracy of the AP selection scheme directly relies upon the accuracy of the
throughput estimation, we first evaluate the accuracy of the throughput
estimation using two ML algorithms i.e. MLP and SVR.

Figure 8: Throughput estimation (using MLP). Figure 9: Throughput estimation
(using SVR).

The predicted throughput versus actual throughput is plotted for both
algorithms as given in Fig. 8 and 9. It can be observed that the MLP model
provides better accuracy (i.e. predicted values are much closer to the actual
values) as compared to the SVR model. To further quantify the performance of
both models, three performance metrics i.e. training time, Mean Squared Error
(MSE) and R-squared are computed and the results are listed in Table VII. The
MLP based model requires long training time (1.59 second) than the SVR model
(0.211 seconds), however it provides better accuracy (i.e. less MSE for MLP =
0.067 as compared to SVR = 0.211) and better generalization to future
predictions (i.e. higher R-squared for MLP = 0.974 as compared to SVR =
0.916). The better learning capabilities of MLP costs longer training time due
to its complex design (hundreds of neurons arranged in several layers).

Table VII: Performance and complexity analysis of throughput estimation models. Parameter | MLP | SVM
---|---|---
Training time (s) | 1.59 | 0.211
R-Squared | 0.974 | 0.916
MSE | 0.067 | 0.211

The estimated throughput using MLP algorithm is then used for AP selection. In
AP selection, two performance metrics i.e. average BSS throughput and per-STA
throughput are used to compare the throughput gain of the proposed scheme
versus standard AP selection schemes (i.e. SSF and LLF). The results are shown
in Fig. 10 (average BSS throughput) and 11 (per-STA throughput). It can be
observed that the proposed scheme improves the average BSS throughput as well
as per-STA throughput. The analysis of throughput gains report an average
improvement of 9.2% and 8% as compared to the SSF and LLF schemes
respectively. It is worthy to note here, that the work in [9] also propose an
alternate AP association scheme for load balancing in Wi-Fi networks and
compared against SSF and LLF schemes. We could not compare our work against
[9] due to the complexity of the scheme in ns-3 environment. Additionally, it
would not be fair to compare our results against [9] due to the difference in
network configurations, topology, and the assumptions typically involved in
analytical models versus simulation environments.

(a) Average throughput. (b) Cumulative throughput.

Figure 10: Comparison of the average BSS throughput. Figure 11: Comparison of
per-STA throughput.

##  VI Conclusions and Future Work

The paper proposes machine learning techniques to solve two well-known
problems in WLAN networks i.e. the handover prediction problem and the AP
selection problem. The handover prediction problem is formulated as a multi-
step time-series prediction problem. It is solved using supervised learning
algorithm i.e. random forest in the proposed scheme. The goal in binary
prediction problem is to achieve high prediction accuracy. On the contrary,
the AP selection is a design problem to find the optimum AP-STA associations
that improves the network throughput performance. The proposed scheme solves
this issue by estimating throughput using all possible configurations and
selects the one which provides higher throughput gain. The performance of the
proposed scheme is validated and results report significant improvement in the
overall performance. The proposed scheme for handover prediction outperforms
the RSS method and traveling distance method by reducing the number of
unnecessary handovers by 60% and 50% respectively. In the AP selection
problem, the proposed scheme outperforms the SSF and LLF algorithms by
achieving higher throughput gains upto 9.2% and 8% respectively. However, it
is expected that a large set of problems and challenges in future Wi-Fi
networks can be solved using similar approaches. Although running ML
applications over resource constrained mobile devices can be challenging, the
new edge computing paradigm [53] can be a promising approach to meet the
computation requirements of future networks.

## References

  * [1] M. A. Khan, R. Hamila, and M. O. Hasna, “Optimal group formation in dense wi-fi direct networks for content distribution,” IEEE Access, vol. 7, pp. 161231–161245, 2019.
  * [2] H. Pirayesh, P. K. Sangdeh, and H. Zeng, “Coexistence of wi-fi and iot communications in wlans,” IEEE Internet of Things Journal, vol. 7, no. 8, pp. 7495–7505, 2020.
  * [3] S. Zeadally, M. A. Javed, and E. B. Hamida, “Vehicular communications for its: Standardization and challenges,” IEEE Communications Standards Magazine, vol. 4, no. 1, pp. 11–17, 2020.
  * [4] H. A. Omar, N. Lu, and W. Zhuang, “Wireless access technologies for vehicular network safety applications,” IEEE Network, vol. 30, no. 4, pp. 22–26, 2016.
  * [5] M. A. Khan, W. Cherif, F. Filali, and R. Hamila, “Wi-fi direct research-current status and future perspectives,” Journal of Network and Computer Applications, vol. 93, pp. 245–258, 2017.
  * [6] W. Cherif, M. A. Khan, F. Filali, S. Sharafeddine, and Z. Dawy, “P2p group formation enhancement for opportunistic networks with wi-fi direct,” in 2017 IEEE Wireless Communications and Networking Conference (WCNC), pp. 1–6, IEEE, 2017.
  * [7] M. A. Khan, R. Hamila, M. S. Kiranyaz, and M. Gabbouj, “A novel uav-aided network architecture using wi-fi direct,” IEEE Access, vol. 7, pp. 67305–67318, 2019.
  * [8] A. Balachandran, P. Bahl, and G. M. Voelker, “Hot-spot congestion relief and service guarantees in public-area wireless networks,” ACM SIGCOMM Computer Communication Review, vol. 32, no. 1, pp. 59–59, 2002.
  * [9] Y. Bejerano, S.-J. Han, and L. E. Li, “Fairness and load balancing in wireless lans using association control,” in Proceedings of the 10th annual international conference on Mobile computing and networking, pp. 315–329, ACM, 2004.
  * [10] V. Mhatre and K. Papagiannaki, “Using smart triggers for improved user performance in 802.11 wireless networks,” in Proceedings of the 4th international conference on Mobile systems, applications and services, pp. 246–259, ACM, 2006.
  * [11] S. Vasudevan, K. Papagiannaki, C. Diot, J. Kurose, and D. Towsley, “Facilitating access point selection in ieee 802.11 wireless networks,” in Proceedings of the 5th ACM SIGCOMM conference on Internet Measurement, pp. 26–26, Usenix Association, 2005.
  * [12] H. Ali-Ahmad, C. Cicconetti, A. de la Oliva, V. Mancuso, M. R. Sama, P. Seite, and S. Shanmugalingam, “An sdn-based network architecture for extremely dense wireless networks,” in Future Networks and Services (SDN4FNS), 2013 IEEE SDN for, pp. 1–7, IEEE, 2013.
  * [13] M. Danieletto, G. Quer, R. R. Rao, and M. Zorzi, “Carmen: a cognitive networking testbed on android os devices,” IEEE Communications Magazine, vol. 52, no. 9, pp. 98–107, 2014.
  * [14] M. Slavik, I. Mahgoub, and A. Badi, “Cross-layer design for wireless networks with cognitive controllers,” in Wireless Telecommunications Symposium, 2008\. WTS 2008, pp. 273–277, IEEE, 2008.
  * [15] H. Kim and N. Feamster, “Improving network management with software defined networking,” IEEE Communications Magazine, vol. 51, no. 2, pp. 114–119, 2013.
  * [16] A. Zahmatkesh and T. Kunz, “Software defined multihop wireless networks: Promises and challenges,” Journal of Communications and Networks, vol. 19, no. 6, pp. 546–554, 2017.
  * [17] Malbasic, Teodor and Bojović, Petar and Bojovic, Zivko and Šuh, Jelena and Vujošević, Dušan, “Hybrid SDN Networks: A multi-parameter server load balancing scheme,” Journal of Network and Systems Management, 01 2022.
  * [18] R. W. Thomas, D. H. Friend, L. A. Dasilva, and A. B. Mackenzie, “Cognitive networks: adaptation and learning to achieve end-to-end performance objectives,” IEEE Communications Magazine, vol. 44, pp. 51–57, Dec 2006\.
  * [19] C. Jiang and H. Zhang and Y. Ren and Z. Han and K. C. Chen and L. Hanzo, “Machine Learning Paradigms for Next-Generation Wireless Networks,” IEEE Wireless Communications, vol. 24, pp. 98–105, April 2017.
  * [20] N. Kato, Z. M. Fadlullah, B. Mao, F. Tang, O. Akashi, T. Inoue, and K. Mizutani, “The deep learning vision for heterogeneous network traffic control: Proposal, challenges, and future perspective,” IEEE Wireless Communications, vol. 24, no. 3, pp. 146–153, 2017.
  * [21] A. Omri, R. Bouallegue, R. Hamila, and M. Hasna, “Channel estimation for lte uplink system by perceptron neural network,” International Journal of Wireless & Mobile Networks (IJWMN), vol. 2, no. 3, pp. 155–165, 2010.
  * [22] F. Cadger, K. Curran, J. Santos, and S. Moffet, “Opportunistic neighbour prediction using an artificial neural network,” in Artificial Intelligence: Concepts, Methodologies, Tools, and Applications, pp. 1674–1686, IGI Global, 2017.
  * [23] D. Del Testa, M. Danieletto, G. M. Di Nunzio, and M. Zorzi, “Estimating the number of receiving nodes in 802.11 networks via machine learning techniques,” in Global Communications Conference (GLOBECOM), 2016 IEEE, pp. 1–7, IEEE, 2016.
  * [24] Abusubaih, Murad, “Intelligent Wireless Networks: Challenges and Future Research Topics,” Journal of Network and Systems Management, vol. 30, 01 2022.
  * [25] Awad, Mohamad and Ahmed, Marwa and Almutairi, A.F. and Ahmad, Imtiaz, “Machine Learning-Based Multipath Routing for Software Defined Networks,” Journal of Network and Systems Management, vol. 29, 04 2021\.
  * [26] M. O. Khan and L. Qiu, “Accurate WiFi packet delivery rate estimation and applications,” in IEEE INFOCOM 2016 - The 35th Annual IEEE International Conference on Computer Communications, pp. 1–9, April 2016.
  * [27] L. Kriara, M. K. Marina, and A. Farshad, “Characterization of 802.11 n wireless lan performance via testbed measurements and statistical analysis,” in Sensor, Mesh and Ad Hoc Communications and Networks (SECON), 2013 10th Annual IEEE Communications Society Conference on, pp. 158–166, IEEE, 2013\.
  * [28] Phit, Thyda and Abe, Kôki, “Packet inter-arrival time estimation using neural network models,” in Internet Conference, Tokyo, 2006.
  * [29] S. Chinchali and S. Tandon, “Deep learning for wireless interference segmentation and prediction,”
  * [30] T. R. Henderson, M. Lacage, G. F. Riley, C. Dowell, and J. Kopena, “Network simulations with the ns-3 simulator,” SIGCOMM demonstration, vol. 14, no. 14, p. 527, 2008.
  * [31] M. Team, “Mininet: An instant virtual network on your laptop (or other PC),” 2012.
  * [32] A. Samba, Y. Busnel, A. Blanc, P. Dooze and G. Simon, “Throughput Prediction in Cellular Networks: Experiments and Preliminary Results,” in ères Rencontres Francophones sur la Conception de Protocoles, l’Évaluation de Performance et l’Expérimentation des Réseaux de Communication (CoRes 2016), 2016.
  * [33] Y. Liu and J. Y. B. Lee, “An Empirical Study of Throughput Prediction in Mobile Data Networks,” in 2015 IEEE Global Communications Conference (GLOBECOM), pp. 1–6, Dec 2015.
  * [34] P. Lin and T. Lin, “Machine-learning-based adaptive approach for frame-size optimization in wireless lan environments,” IEEE Transactions on Vehicular Technology, vol. 58, no. 9, pp. 5060–5073, 2009.
  * [35] S. Kajita, H. Yamaguchi, T. Higashino, S. Umehara, F. Saitou, H. Urayama, M. Yamada, T. Maeno, S. Kaneda, and M. Takai, “A channel selection strategy for wlan in urban areas by regression analysis,” in Wireless and Mobile Computing, Networking and Communications (WiMob), 2014 IEEE 10th International Conference on, pp. 642–647, IEEE, 2014.
  * [36] J. Park, “A Handoff Trigger Method using the Predictability of Received Signal Strength,” International Journal of Energy, Information and Communications, vol. 4, no. 3, p. 55, 2013.
  * [37] J. Montavont and T. Noel, “IEEE 802.11 Handovers Assisted by GPS Information,” in 2006 IEEE International Conference on Wireless and Mobile Computing, Networking and Communications, pp. 166–172, June 2006.
  * [38] T.-H. Kim, Q. Yang, J.-H. Lee, S.-G. Park, and Y.-S. Shin, “A mobility management technique with simple handover prediction for 3g lte systems,” in 2007 IEEE 66th vehicular technology conference, pp. 259–263, IEEE, 2007\.
  * [39] X. Yan, N. Mani, and Y. A. Sekercioglu, “A traveling distance prediction based method to minimize unnecessary handovers from cellular networks to wlans,” IEEE communications letters, vol. 12, no. 1, pp. 14–16, 2008.
  * [40] P. B. Oni and S. D. Blostein, “Decentralized ap selection in large-scale wireless lans considering multi-ap interference,” in 2017 International conference on computing, networking and communications (ICNC), pp. 13–18, IEEE, 2017.
  * [41] L. Suresh, J. Schulz-Zander, R. Merz, A. Feldmann, and T. Vazao, “Towards programmable enterprise wlans with odin,” in Proceedings of the first workshop on Hot topics in software defined networks, pp. 115–120, ACM, 2012\.
  * [42] M. Van der Schaar and F. Fu, “Spectrum access games and strategic learning in cognitive radio networks for delay-critical applications,” Proceedings of the IEEE, vol. 97, no. 4, pp. 720–740, 2009.
  * [43] S. Ayoubi, N. Limam, M. A. Salahuddin, N. Shahriar, R. Boutaba, F. Estrada-Solano, and O. M. Caicedo, “Machine learning for cognitive network management,” IEEE Communications Magazine, vol. 56, no. 1, pp. 158–165, 2018.
  * [44] M. A. Khan, R. Hamila, N. A. Al-Emadi, S. Kiranyaz, and M. Gabbouj, “Real-time throughput prediction for cognitive wi-fi networks,” Journal of Network and Computer Applications, vol. 150, p. 102499, 2020.
  * [45] S. Kajita, T. Amano, H. Yamaguchi, T. Higashino, and M. Takai, “A new architecture of wi-fi aps with prediction-based autonomous channel migration function.”
  * [46] P. B. M. Mirza, J. Sommers and X. Zhu, “A Machine Learning Approach to TCP Throughput Prediction,” IEEE/ACM Transactions on Networking, vol. 18, pp. 1026–1039, Aug 2010.
  * [47] Mohanty, S., “A new architecture for 3G and WLAN integration and inter-system handover management,” Wireless Networks, vol. 12, pp. 733–745, 12 2006.
  * [48] Varma, V.K. and Ramesh, S. and Wong, K.D. and Barton, M. and Hayward, G. and Friedhoffer, J.A., “Mobility management in integrated UMTS/WLAN networks,” in IEEE International Conference on Communications, 2003\. ICC ’03., vol. 2, pp. 1048–1053 vol.2, 2003.
  * [49] J. Brownlee, Deep Learning for Time Series Forecasting: Predict the Future with MLPs, CNNs and LSTMs in Python.  Machine Learning Mastery, 2018.
  * [50] Noura Aljeri and Azzedine Boukerche, “A two-tier machine learning-based handover management scheme for intelligent vehicular networks,” Ad Hoc Networks, vol. 94, p. 101930, 2019.
  * [51] Militani, Davi and Vieira, Samuel and Valadão, Everthon and Neles, Kátia and Rosa, Renata and Rodríguez, Demóstenes Z., “A Machine Learning Model to Resource Allocation Service for Access Point on Wireless Network,” in 2019 International Conference on Software, Telecommunications and Computer Networks (SoftCOM), pp. 1–6, 2019.
  * [52] A. Liaw, M. Wiener, et al., “Classification and regression by randomforest,” R news, vol. 2, no. 3, pp. 18–22, 2002.
  * [53] M. Ishtiaq, N. Saeed, and M. A. Khan, “Edge computing in iot: A 6g perspective,” arXiv preprint arXiv:2111.08943, 2021.

|  Muhammad Asif Khan (SM’20) is a Postdoctoral Research Fellow at Qatar
Mobility Innovations Center (QMIC), Qatar University. He received the Ph.D.
degree in Electrical Engineering from Qatar University (2020), MSc degree in
Telecommunication Engineering from University of Engineering and Technology
Taxila, Pakistan (2013), and B.Sc. degree in Telecommunication Engineering
from University of Engineering and Technology Peshawar, Pakistan (2009). He
also worked as a Researcher Assistant at Qatar University (2014-2015) and at
QMIC (2016-2017). His current research interests include wireless networks,
edge computing, distributed machine learning, and computer vision. He is a
Senior Member of IEEE, and Member of IET. For more detailed information,
please visit his homepage: https://asifk.me.
---|---
|  Prof. Ridha Hamila received the MSc, LicTech with distinction, and PhD
degrees from Tampere University of Technology (TUT), Tampere, Finland, in
1996, 1999, and 2002, respectively. Dr. Hamila currently a Full Professor at
the Department of Electrical Engineering, Qatar University, Qatar. From 1994
to 2002 he held various research and teaching positions at TUT within the
Department of Information Technology, Finland. From 2002 to 2003 he was a
System Specialist at Nokia research Center and Nokia Networks, Helsinki. From
2004 to 2009 he was with Emirates Telecommunications Corporation, UAE. Also,
from 2004 to 2013 he was adjunct Professor at the Department of Communications
Engineering, TUT. His current research interests include mobile and broadband
wireless communication systems, Mobile Edge Computing, Internet of Everything,
and Machine Learning. In these areas, he has published over 200 journal and
conference papers most of them in the peered reviewed IEEE publications, filed
seven US patents, and wrote numerous confidential industrial research reports.
Dr. Hamila has been involved in several past and current industrial projects,
Ooreedo, Qatar National Research Fund, Finnish Academy projects, EU research
and education programs. He supervised a large number of under/graduate
students and postdoctoral fellows. He organized many international workshops
and conferences. He is a Senior Member of IEEE.
---|---
|  Adel Gastli (S’89, M’93, SM’00) received the B.Sc. degree in electrical
engineering from the National Engineering School of Tunis, Tunisia, in 1985.
He received the M.Sc. and the Ph.D. degrees from Nagoya Institute of
Technology, Japan, in 1990 and 1993, respectively.,His professional career
started with the National Institute for Standards and Intellectual Property,
Tunis, Tunisia, where he worked for two years on the standardization and
certification of electric products in Tunisia. Afterward, he joined the R&D
Department at Inazawa Works of Mitsubishi Electric Corporation in Japan and
worked there until 1995. In August 1995, he joined the Electrical and Computer
Engineering Department at Sultan Qaboos University, Muscat, Oman, where he
served as the Head of the Department from September 2001 to August 2003 and
from September 2007 to August 2009. He established the Renewable and
Sustainable Energy Research Group (RASERG) at Sultan Qaboos University, in
2003, and was its Chair till January 2013. He also established the University
Quality Assurance Office in February 2010 and served as its Director from
February 2010 to January 2013. In February 2013, he joined the Electrical
Engineering Department at Qatar University, Doha, Qatar, as a Professor and
Kahramaa-Siemens Chair in energy efficiency. In August 2013, he was appointed
the College of Engineering Associate Dean for Academic Affairs. In April 2014,
he established the Qatar University Clean Energy & Energy Efficiency Research
Group (CE3RG) that he is currently chairing. He has authored/coauthored more
than 150 papers in reputable journals and conferences. His research interests
include energy efficiency, renewable energy, and smart grid.
---|---
|  Serkan Kiranyaz was born in Turkey, 1972. He received his BS and MS degrees
in Electrical and Electronics Department at Bilkent University, Ankara,
Turkey, in 1994 and 1996, respectively. During 1996 – 2000 He worked as a
Field Engineer in Schlumberger W&T and Senior Researcher in Nokia Research
Center, Tampere, Finland. He received his PhD degree in 2005 and his Docency
at 2007 from Tampere University of Technology, Institute of Signal Processing
respectively. He was working as a Professor in Signal Processing Department in
the same university during 2009 to 2015 and he held the Research Director
position for the department and also for the Center for Visual Decision
Informatics (CVDI) in Finland. He currently works as a Professor in Qatar
University, Doha, Qatar. For more detailed information please refer to:
http://qufaculty.qu.edu.qa/mkiranyaz/ and
https://www.researchgate.net/profile/Serkan_Kiranyaz
---|---
|  Nasser Ahmed Al-Emadi received the B.S. and M.S. degrees, both in
electrical engineering, from Western Michigan University, Kalamazoo, in 1989
and 1994, respectively, and the Ph.D. degree from Michigan State University,
East Lansing, in 1999. He is currently a Full Professor and Chairperson of the
Department of Electrical Engineering, Qatar University, Qatar. His research
interests include operation, planning, and control of power systems,
artificial neural networks (ANN) and machine learning.
---|---