Indoor Localization Using Artificial Bee Colony with Levy Flight

Using Wi-Fi signal strength for detecting objects in an indoor environment has different types of applications, such as, locating perpetrator in finite areas, and detecting the number of users on an access point. In this work, we propose a hybrid optimization algorithm to train training Multi-Layer Perceptron Neural Network that could be distributed in monitoring and tracking devices used for determining the location of users based on the Wi-Fi signal strength which their personal devices receive. This hybrid algorithm combines Artificial Bee Colony (ABC) and Levy Flight (LF) algorithm, called ABCLF. ABCLF increases the exploration and exploitation capabilities of ABC so that it can be used efficiency for the purpose of training Multi-Layer Perceptron “MLP” Neural Network. The proposed ABCLF algorithm guarantees the enhancing of accuracy with the increasing in iterations because it has the powerfull of the frame work of Artificial Bee Colony algorithm “three phases whith different strategies of searching” and the powerfull of the Levy Flight local search algorithm which has been used in both onlooker bee phase with a short step size walk to guarantee the enhancing in the exploitation and in scout bee phase with a long step size walk to guarantee the enhancing in the exploration. The results of our study show that the classification accuracy of the trained neural network using ABCLF is better than the other evolutionary algorithms used in this study for the same purpose like ABC, Genetic Algorithm (GA), Biogeography-Based Optimization (BBO), Probability Based Incremental Learning (PBIL) and Particle Swarm Optimization (PSO).


Introduction
The localization problem has attracted many researchers' attention recently. Location-based services, e.g. location-based recommender systems, are one of the major motivations behind this problem. To address this problem, many techniques have been used in literature. The main techniques used for localization are GPS, Bluetooth, and Wi-Fi. Although the GPS is a widely used method for outdoor localization, it is not appropriate for indoor localization due to the weak GPS signal in indoor environments. Bluetooth seems to be a good alternative to GPS in indoor localization. However, the short range of Bluetooth signals is the significant drawback of the Bluetooth-based localization and limits the use of this technique in both indoor and outdoor localization. Wi-Fi, on the other hand, is the best solution for indoor localization since it has a longer range, compared to Bluetooth signals, and it is appropriate for indoor localization with strong indoor signals unlike GPS [1].
For indoor Wi-Fi based localization, the received signal strength (abbreviated to RSS), time of arrival (abbreviated to TOA) and angle of arrival (abbreviated to AOA) are the most commonly used techniques in the previous studies. When compared with the other two techniques, measuring the RSS is much easier and does not need any extra hardware because the RSS is already available to the user in many Wi-Fi transceivers [2]. For that reason, the RSS technique is less expensive and less complex than the TOA and AOA techniques. Nonetheless, the RSS is less accurate, especially when compared to the TOA. The RSS-based methods are divided into two separate methods: the model-based method and the training-based method. Some model-based studies use the wireless signal propagation model to calculate the distance of a mobile client and then use some methods, such as trilateration and weighted centroid localization, to figure out the location [3]. However, the model-based technique is not adequately accurate because the channel propagation model contains uncertainty. Some studies use the training-based method to position a mobile client. They build their training dataset at different locations with different orientations, and various signal strengths are measured at each location and each orientation [4,5]. So the Wi-Fi signal strength received from diverse routers in a finite location will be used to train the NN so that it could further predict the unknown user's location for a set of location's signal strengths.
Artificial Neural Network is a nonlinear and non-parametric model, which is used to solve different types of classification problems. Nonetheless, the convergence of the ordinary training algorithms, such as Back Propagation (BP), is slow and not always guaranteed. Therefore, we need efficient optimization strategies to attain faster convergence and higher accuracy rates [1].
Using swarm intelligence to solve optimization problems, which exploits the collective ability of swarm algorithms, becomes more popular. Besides, many studies use hybridization between different types of these algorithms, for example, a particle-bee algorithm that integrates the advantages of intelligent behavior of bird swarms and honey bee [6]. Another example is a PS-FW which is a hybrid between fireworks algorithm and PSO particle swarm optimization [7]. Also, a hybrid optimization algorithm, which is based on ABC and some other methods, has been developed [8][9][10][11]. These hybrid systems have more impact because of their advantages over their individuals.
The power of these hybrid algorithms comes from their individuals that imitating the best features in nature. This powerful hybridization leads the researchers to try different hybridization strategies of global and local search methods to improve the exploitation and exploration of the individual.
In this paper, we concentrate on the hybridization between ABC algorithm and LF algorithm in terms of building a new metaheuristic algorithm that is more efficient than both ABC and LF in most of the benchmarks. In literature, some researchers used this type of hybridization between ABC and levy flight algorithms but this study employs a different strategy. In one of the previous studies [12], new solutions are generated around the best solution using four modifications. First modification gives more chance to the best solution to update itself by increasing the number of scout bees, the second modification improves the convergence by the experience of the global best solution reached so far, the third modification helps in exploitation by retaining the acquired experience of the swarm about the search area, while the fourth modification is taking advantage in exploration of the search space. This algorithm is called LFABC. Another study [13] balances the diversity and convergence capability of the ABC by applying three modifications on ABC as the following, incorporating ABC by Lévy Flight Local Search after scout phase in order to enhance the capability of ABC's exploitation, incorporating opposition based learning to avoid the lull situation of the algorithm and increase the convergence speed, and the last modification is by changing the food sources search equation to that one used in Gbest-guided ABC [13]. This algorithm is called Opposition based lévy flight ABC [14].
In this work, we will first introduce the standard ABC algorithm, and then we will describe the standard LF algorithm. After that, we will formulate the new ABCLF followed by its implementation. Finally, we will train the NN for indoor localization classification using Genetic Algorithm (GA), Ant Colony Optimization (ACO), Evolutionary Strategy (ES), Biogeography-Based Optimization (BBO), Probability Based Incremental Learning (PBIL), Particle Swarm Optimization (PSO), ABC and ABCLF and perform a comparison using a dataset found in [1].

Standard ABC Algorithm
The ABC algorithm divides the bee foraging task into three phases: employed and onlooker bees for exploitation in addition to scout bees for exploration. These three types of tasks lead the bees to converge towards the best food source by sharing information. The bee colony is divided into two equal subsets of bees, the employed and onlookers. A scout bee carries out a random search. The employed bee becomes a scout as soon as its food source is exhausted. Each of these tasks is described in detail as follows and the main steps of ABC are given in Algorithm 1 below [15].
The number of control parameters used in the ABC is three: The number of employed or onlooker bees which equals the number of food sources, the threshold number (limit), and the maximum number of cycles.

Employed Bee Task
In this task, Eq. 2 is used for performing the update of the current solution where k ∈ [2 SN] and j ∈ [2 D] are randomly chosen indices and k is not equal to i. Employed bees update the existing solution based on the fitness value of the new solution. Then they replace the existing food source with the new one of higher fitness value.

Onlooker Bee Task
The onlooker bees' task starts when the employed bees phase finishes. In this task, the onlooker bees, which are in the hive, calculate the selection probability of food sources based on the employed bees that shared information about the new solutions. The probability may be calculated using Eq. 3.

Scout Bee Task
A food source is assumed to be exhausted if that food source is not improved for a threshold number of iterations. Then employed bee becomes a scout. New food source will be created randomly inside the search space using Eq. 1

Lévy Flight Local Search Algorithm
The Lévy Flight Local Search is one of the stochastic search algorithms which use a random walk to update its solutions. The step walks are defined as random step lengths, which have a particular probability distribution. These step lengths can be drawn from a Lévy distribution, which is stated in Eq. 4.
Where (0 < β ≤ 2) and s is the step length which can be calculated by Eq. 5.
Where u and v are drawn from Gaussian distributions.
The ith individual solution is updated using: x ij ′ (t + 1) = x ij (t) + step_size(t) * U(0,1) The step sizes of Levy flights are too ornery, that is, they may use for both exploration and exploitation by changing this step size. The main steps of the LFLS is shown in Algorithm 2 [14].

Algorithm 2: Lévy Flight Local Search Strategy Insert the optimization function Min f(x) and β;
An individual x i will be selected randomly then initialize t=1 and σ v = 1; Compute σ u using Eq. 6 WHILE (t < ε ) do Use Eq. 5 to compute step size; Use Eq. 7 to generate a new solution

The Proposed ABCLF Algorithm
The proposed ABCLF algorithm has the advantages of increasing the exploitation and exploration of ABC. Since it applies the levy flight step walks in both onlooker and scout phases in ABC.
As we mentioned above, ABC is not efficient enough in the exploitation stage due to the same and random searching strategies used by both the employed and onlooker's bee's phases. So if another powerful local search algorithm like LF used in the onlooker bees task with a small step size walk, the exploitation would increase, and if another powerful local search algorithm like LF used in the scout bees task with a long step size walk, the exploration would increase. The ABCLF pseudo-code for classification using Multi-Layer Perceptron is shown in Algorithm 3.

Algorithm 1: Artificial Bee Colony
Step 1: Start by doing the initialization process of the population and obtain the initial solution by Eq. 1.
Step 2: The employed bees will move onto new food sources by Eq. 2. v i j = x i j + rand(0,1)(x i j − x k j ) (2) Step 3: Apply greedy selection. (3) Step 4: The onlooker bees will move onto the food sources depending on the selection probability P i and Eq. 2 within the scope of the potential solution and determine the amounts of their nectar.
Step 5: The scouts will move using Eq. 1 for searching new food sources when the food source is exhausted by the exploitations.
Until: the fitness of the solution reaches the needed accuracy or the maximum numberof iterations. Then, the loop ends and the optimal solution will be memorized.

Computational Results For The Proposed Classification Algorithm
The inputs to the NN are the seven features of wireless signal strengths measured from the diverse routers. The outputs are the class labels that classify users according to their location in one of four rooms (four outputs). The number of hidden nodes is 15 with one hidden layer. The dataset which is 2000 sample 7 features is divided into 85% for training and 15% for testing. The tenfold cross validation is performed and the average of ten folds is recorded as the classification accuracy. We compared ABCLF with other models like ABC, ACO, BBO, ES, GA, PBIL and PSO for the same purpose of classification and the results of all of them are summarized in terms of convergence curves of mean square error in Fig. 1. Table 1 illustrates the accuracy of NN classification after training using these algorithms for 10000 evaluations.
The following configuration was considered in the experiments: The proposed ABCLF enhances the performance of the NN because it enhances the possibility of exploring new research areas (food sources) and exploits the area near the best solutions to overcome the local minimum. This is illustrated by the continuously decreasing in Mean Square Error (MSE) values during the training as shown in Fig. 1. As shown in Fig. 1 and Table 1, there is a very slight error when the weights are obtained by ABCLF for NN training. Also Fig. 1 shows that the proposed ABCLF has a good convergence speed but not better than GA, so we can say that both ABCLF and GA are the higher convergent algorithms from the compared algorithms. According to the results in Fig. 1, it is clear that the accuracy of the NN classification increases as the number of evaluations increases even if it exceeds a large number of evaluations not like the other algorithms. The reason for this increase is due to the advantages of the LF algorithm of increasing the exploration and exploitation of the search. Step 1: Initialize the population by Eq. 1. Start by doing the initialization and normalization process of the dataset to be in the range [-10, 10]. Select an appropriate number of Input, Output and Hidden neurons for the NN according to the dataset. Set a suitable maximum number of iterations to train the NN.

REPEAT
Step 2: To train the NN, move the employed bees onto their food sources by Eq. 2. Pass the obtained food sources to train the NN. Calculate the NN's mean square error and compute its classification accuracy.
IF The new food sources are better than the older Replace the new instead of the old solutions ELSE Increase the failure END IF Step 3: Determine the nectar amounts of food sources by Eq. 3.
Step 4: The onlooker bees will move onto the food sources according to the selection probability of Eq. 3 and using the levy flight walk step in formula Eq. 7.
Pass the obtained food sources to train the NN. Calculate the NN's mean square error and compute its classification accuracy. IF The new food sources are better than the older Replace the newer instead of the older solutions ELSE Increase the failure END IF Step 5: The scouts will move using Eq. 7 for searching new food sources, when the food source is deserted by the bees.
UNTIL requirements are met.

Conclusions and Recommendations
This work introduces a new hybrid optimization algorithm, called ABCLF, which was used for indoor location classification based on real-time measurements of Wi-Fi received signal strength. This algorithm uses the advantages of LF algorithm to improve the exploration and exploitation of ABC. The proposed algorithm used to train multi layer perceptron NN. The experiments are performed on the dataset [1]. The results of this work show that the accuracy of the NN classifier which is trained by using the proposed ABCLF is more accurate than BBO, PBIL, GA, PSO, ACO, ES and ABC algorithms. Both ABCLF and GA are the higher convergent algorithms from the compared algorithms. We recommend to use this proposed algorithm to train NNs on other applications and to hybrid it with Levenberg-Marquardt algorithm to train the backpropagation NN instead of MLP.