# GPS Position Prediction Method Based on Chaotic Map-Based Flower Pollination Algorithm

Authors: Wanjun Yang; Zengwu Sun
Journal: Complexity
 (2021)

---

## Abstract

GPS position data prediction can effectively alleviate urban traffic, population flow, route planning, etc. It has very important research significance. Using swarm intelligence optimization algorithm to predict geographic location has important research strategies. Flower pollination algorithm (FPA) is a new swarm intelligence optimization algorithm (SIOA) and easy to implement and has other characteristics; more and more scholars have continuously improved it and applied it to more fields. Aiming at the fact that FPA leads to the local optimal value in cross-pollination, the chaotic mapping strategy is proposed to optimize related issues that the population is not rich enough in the self-pollination process. The improved flower pollination algorithm has better advantages in testing function convergence and geographic location prediction effect.


---

## Body

## 1. Introduction

SIOA is a hot topic in the field of algorithm research in recent years. Because such algorithms are inspired in daily life and production, simple and easy to understand, easy operation and implementation of the algorithm, more accurate test results of the algorithm, and good stability. Therefore, both the improvement research of algorithm content and algorithm structure and the exploration of algorithm practical application field have been widely developed. For example, in 2010, Wang et al. [1] proposed an improved particle swarm optimization algorithm (PSO) for solving constrained problems. Cui and He [2] proposed an elite reverse learning strategy, flower pollination algorithm, and applied it to solve engineering optimization problems. Ali [3] proposed an adaptive algorithm based on PSO to solve engineering cases. Chen et al. [4] proposed an adaptive genetic algorithm in 2018 and applied the algorithm to solve function optimization problems, etc. Many scholars have studied the application of intelligent algorithms to engineering optimization problems.Genetic algorithm [5] is an intelligent algorithm that uses biological genetic rules for selection, a method that can be optimized from generation to generation. Drosophila optimization algorithm (DOA) [6] is an imitation of Drosophila’s flying foraging behavior, gray wolf optimization algorithm (GWO) [7] is an imitation of wolf pack's division of labor and cooperative predation behavior, whale optimization algorithm(WOA) [8] is a simulation of humpback whale pack's cooperative predation and competition, and moth extinguishing optimization algorithm [9] is a simulation of moth's positioning and movement in nature according to light sources. FPA [10] is a swarm intelligence algorithm proposed by Cambridge scholar Yang in 2012 by observing and simulating the pollination behavior of plant flowers. The algorithm mainly searches for optimization by simulating cross-pollination and self-pollination in the pollination process. Abdel-Raouf [11] combined Particle Swarm Optimization (PSO), which has similar performance to FPA, with it to optimize the initial solution of FPA. The improvement of the quality of the initial solution improves the performance of the algorithm, including optimization accuracy and convergence speed. Chakraborty et al. [12] proposed the differential evolution FPA. Combine the advantages of the DE algorithm with FPA.


## 2. Basic FPA

The pollination process of flowering plants in nature can be divided into two types according to different pollen carriers: self-pollination based on wind medium and water medium and cross-pollination based on insect medium and bird medium. Self-pollination refers to pollination between different flowers of the same plant individual, while cross-pollination refers to pollination between different individual flowers of the same plant. Since self-pollination pollinates between different flowers of the same plant individual, the movement range of pollen is small, which is abstracted into the flower pollination algorithm, i.e., local search with small search range. Cross-pollination requires insect or bird vectors to carry pollen for pollination, and these insect and bird pollinators usually use Levy flight mechanism to move. Levy flight is a special kind of random walk. The flying individual moves randomly in a small range with a large probability and jumps to another range far away with a small probability to move randomly. Because Levy flight can move with large steps, cross-pollination is abstracted into flower pollination algorithm, which is a global search with a large search range.In practice, most plants have many flowers, each containing tens of thousands of pollen. In order to simplify the research, assuming that each flower has only one flower and produces one pollen, there is an optimization plan for each pollen. According to the above principles, the flower pollination process is abstracted into the following model:Step 1: cross-pollination is carried out by insects or birds carrying pollen through Levy flight, which is a global pollination processStep 2: self-pollination is a local pollination process through natural factorsStep 3: the pollinator of the flower is an attribute of the flowerStep 4: the transition probability between local optimization and global optimization of the transformation probability P control algorithm


### 2.1. Cross-Pollination of FPA

In FPA, the cross-pollination behavior corresponds to the global search, and the position of pollen individualxi in the tth iteration is represented by xit; then, in the t+1 iteration, the position xi+1t of cross-pollination pollen individual is shown as(1)xi+1t=xit+Fxit−g∗,where F is the proportion coefficient and g∗ is the optimal individual. The movement of insects or birds is relatively random, with small distances in most cases and long distances occasionally. Distance movement, in order to simulate this movement rule, Levy flight strategy is introduced in global search, and Levy flight random number is used as scaling factor, namely,(2)xi+1t=xit+Lxit−g∗,where L is a random number obeying Levy distribution, and its expression is shown as(3)Levy∼λΓλsinπλ/2π∗s1+λ,s≫s0≫0,where λ=1.5, Γλ is the standard gamma function, and s is the moving step size. s=U/V1/λ,U∼N0,σ2,V∼N0,1, and U∼N0,σ2 mean that the random variable U obeys with mathematical expectation of 0. σ2 is Gaussian normal distribution. The variance formula is as follows:(4)σ2=Γ1+λλΓ1+λ/2,sinπλ/22λ−1/21/λ,where a value is given and a constant is obtained. For example, when σ2=1, Gamma function Γ1+λ=1, Γ1+λ/2=1; then,(5)σ2=1,sinπ×1/220=1.In the flower pollination algorithm, the self-pollination behavior corresponds to local search. The positionX of the self-pollinated pollen individual can be expressed as(6)xit+1=xit+randxjt−xkt,where rand∈0,1, xjt and xkt, respectively, represent two individuals different from xjt in the population. Self-pollination is simulated in a limited area.The pollination behavior of flowers in the region, in which pollen individuals move for a short distance within the region. In theory, local pollination and global pollination can occur randomly in flower pollination activities.There is no restriction on pollination. However, the fact is that neighboring flowers are more likely to accept pollination from local flowers than those far away. By imitating this feature and setting the conversion probabilityp, it can be effectively used for the conversion between global and local. Preliminary parameter studies show that most of the P=0.8 may be more effective in application.


### 2.2. FPA Flow

For the minimization problem, the specific flow of FPA is as follows:Step 1 (initialization algorithm parameters): flower number, i.e., population number,n, transformation probability p, and fitness value function f. The algorithm is end, the upper limit of iteration times Tmax or the target accuracyTa.Step 2: initializing the population, calculating the fitness values of all individuals in the population, and recording the individualg∗ with the best fitness value and the optimal fitness value fg∗.Step 3: judging whether the algorithm meets the condition of stopping the iteration, stopping the iteration, and transferring to step 8, otherwise transferring to step 4.Step 4: generating a random numberrand∈0,1 for all individuals in the population and comparing it with the conversion probability p. If p>rand, apply formula (2) to update the individual position and carry out global search, otherwise apply formula (6) to update the individual position and carry out local search. Proceed to step 5.Step 5: carrying out cross-border processing on individual and transferring to step 6.Step 6: calculating each position fitness value after the cross-border processing in step 5, comparing with the fitness value of the current individual, if the fitness value of the updated solution is better, replacing the current solution with the new solution, and transferring to step 7, otherwise transferring to step 8.Step 7: comparing that new solution with the current global optimal solution and updating the data.Step 8: judging whether the current individual is the last individual in the population; if so, transferring to step 3 to end the current iteration, otherwise returning to step 4 to continue updating other individuals.Step 9: output the global optimal value (g∗) and corresponding fitness value fg∗, and the algorithm ends


## 2.1. Cross-Pollination of FPA

In FPA, the cross-pollination behavior corresponds to the global search, and the position of pollen individualxi in the tth iteration is represented by xit; then, in the t+1 iteration, the position xi+1t of cross-pollination pollen individual is shown as(1)xi+1t=xit+Fxit−g∗,where F is the proportion coefficient and g∗ is the optimal individual. The movement of insects or birds is relatively random, with small distances in most cases and long distances occasionally. Distance movement, in order to simulate this movement rule, Levy flight strategy is introduced in global search, and Levy flight random number is used as scaling factor, namely,(2)xi+1t=xit+Lxit−g∗,where L is a random number obeying Levy distribution, and its expression is shown as(3)Levy∼λΓλsinπλ/2π∗s1+λ,s≫s0≫0,where λ=1.5, Γλ is the standard gamma function, and s is the moving step size. s=U/V1/λ,U∼N0,σ2,V∼N0,1, and U∼N0,σ2 mean that the random variable U obeys with mathematical expectation of 0. σ2 is Gaussian normal distribution. The variance formula is as follows:(4)σ2=Γ1+λλΓ1+λ/2,sinπλ/22λ−1/21/λ,where a value is given and a constant is obtained. For example, when σ2=1, Gamma function Γ1+λ=1, Γ1+λ/2=1; then,(5)σ2=1,sinπ×1/220=1.In the flower pollination algorithm, the self-pollination behavior corresponds to local search. The positionX of the self-pollinated pollen individual can be expressed as(6)xit+1=xit+randxjt−xkt,where rand∈0,1, xjt and xkt, respectively, represent two individuals different from xjt in the population. Self-pollination is simulated in a limited area.The pollination behavior of flowers in the region, in which pollen individuals move for a short distance within the region. In theory, local pollination and global pollination can occur randomly in flower pollination activities.There is no restriction on pollination. However, the fact is that neighboring flowers are more likely to accept pollination from local flowers than those far away. By imitating this feature and setting the conversion probabilityp, it can be effectively used for the conversion between global and local. Preliminary parameter studies show that most of the P=0.8 may be more effective in application.


## 2.2. FPA Flow

For the minimization problem, the specific flow of FPA is as follows:Step 1 (initialization algorithm parameters): flower number, i.e., population number,n, transformation probability p, and fitness value function f. The algorithm is end, the upper limit of iteration times Tmax or the target accuracyTa.Step 2: initializing the population, calculating the fitness values of all individuals in the population, and recording the individualg∗ with the best fitness value and the optimal fitness value fg∗.Step 3: judging whether the algorithm meets the condition of stopping the iteration, stopping the iteration, and transferring to step 8, otherwise transferring to step 4.Step 4: generating a random numberrand∈0,1 for all individuals in the population and comparing it with the conversion probability p. If p>rand, apply formula (2) to update the individual position and carry out global search, otherwise apply formula (6) to update the individual position and carry out local search. Proceed to step 5.Step 5: carrying out cross-border processing on individual and transferring to step 6.Step 6: calculating each position fitness value after the cross-border processing in step 5, comparing with the fitness value of the current individual, if the fitness value of the updated solution is better, replacing the current solution with the new solution, and transferring to step 7, otherwise transferring to step 8.Step 7: comparing that new solution with the current global optimal solution and updating the data.Step 8: judging whether the current individual is the last individual in the population; if so, transferring to step 3 to end the current iteration, otherwise returning to step 4 to continue updating other individuals.Step 9: output the global optimal value (g∗) and corresponding fitness value fg∗, and the algorithm ends


## 3. Improve FPA Algorithm Strategies

By analyzing the pollination strategy of FPA, it is not difficult to find that gametes aim at the global optimal plan through global comparison. In the process of catching up with the global optimal particles, as the particles gradually approach the global optimal solution, most particles show obvious “homogeneity,” which makes the algorithm fall into the local optimal and appear premature.In the process of local search, gametes do not refer to the global optimal solution, but only take the difference between two arbitrary individuals in the pollen group as the catch-up target, showing obvious randomness, blindness, and uncertainty, thus reducing the update speed of the global optimal solution. At the same time, the switching probabilityp remains constant in the whole optimization process, resulting in too small a proportion of global search in the initial stage of the algorithm and too large a proportion in the later stage, thus reducing the search efficiency of the algorithm.In addition, due to the random selection of initial pollen gametes in FPA, it is difficult for gametes to be relatively evenly distributed in the solution space, thus reducing the efficiency of FPA search. The above defects limit the optimization accuracy and convergence speed of FPA to a certain extent. Chaotic variables can use their unique nonlinear laws to traverse all feasible solutions in the target space. At the same time, reverse learning strategy can increase the diversity of pollen gametes. Using reverse learning chaotic mapping to initialize gametes of FPA algorithm can make gametes evenly distributed and maintain the diversity of gametes, thus improving the distribution quality of initial gametes. In the global search of FPA algorithm, chaotic search can help FPA algorithm search in the whole solution space to avoid global search falling into local optimization. In terms of local search, by defining an operator, the search range is related to the algorithm iterations times, and the range of local search can be reduced with the progress of the algorithm, which makes the algorithm more targeted. At the same time, the switching probabilityp is linked with the algorithm iterations times so that the algorithm can dynamically adjust the proportion of local and global search in different stages, thus improving the optimization accuracy and convergence speed.


### 3.1. Logistic Maps

The chaotic system is a random and irregular motion, and its behavior is mainly characterized by uncertainty, nonrepeatability, and unpredictability. Many chaotic maps have appeared in the development of chaos, such as logistic mapping, tent mapping, and Chebyshev mapping. The most commonly used one is logistic mapping:(7)Zt+1=uZt1−Zt,where t is expressed as the number of iterations, t=1,…,k, k is the max value. When μ = 4, μ∈0,1, andμ≠0.25,0.5,0.75, equation (7) is in a chaotic state, and the above chaotic range is between (0, 1). Another chaotic mapping is adopted in this paper:(8)Zt+1=αZt−2tanhβZtexp−3Zt2.When the valuesα=0.4 and β=2.8, equation (8) is in a chaotic state, and the chaotic solution generated by equation (8) is in a range of (−0.9, 0.9) larger than that of logistic mapping solution, which is more conducive to searching. All algorithms in this paper adopt this parameter setting.


### 3.2. FPA Based on Chaotic Mapping

The principle of CFPA is to use the value generated by chaotic mapping to replace the random value probability of rand to generate [0, 1] in the process of migration operation. When the search ability is not strong in the later stage of the algorithm, each group of solutions will be searched fork times to obtain new individuals. The formula for chaotic search by replacing the old individuals with new individuals is as follows:(9)Xkbest=Xbest+Zt,where Xk is the solution of equation (9). The flow of chaotic mapping flower pollination algorithm is expressed as follows:Step 1: initialize the population, the sizep, the max iteration number k, the transformation probability p, and the fitness value function f are set.Step 2: calculate the fitness functionf of the habitat in which the population is located, and compare and retain the optimal fitness value f, determining whether the condition is satisfied, and if the condition is satisfied, output it; otherwise, continue with the following steps.Step 3: from equations (1) and (2) calculate the position and optimal position of each individual.Step 4 (position of the individual): the optimal fitness is compared with the chaotic mapping probabilityXk to select the optimal fitness of the individual. Reassemble into a new optimal location, and update location.Step 5: performe a mutation operation according to equation (5).Step 6: carry out chaotic search according to that chaotic map of formula (7).Step 7: if it is judged that the stop condition is met, stop; if not met, repeat step (3).


## 3.1. Logistic Maps

The chaotic system is a random and irregular motion, and its behavior is mainly characterized by uncertainty, nonrepeatability, and unpredictability. Many chaotic maps have appeared in the development of chaos, such as logistic mapping, tent mapping, and Chebyshev mapping. The most commonly used one is logistic mapping:(7)Zt+1=uZt1−Zt,where t is expressed as the number of iterations, t=1,…,k, k is the max value. When μ = 4, μ∈0,1, andμ≠0.25,0.5,0.75, equation (7) is in a chaotic state, and the above chaotic range is between (0, 1). Another chaotic mapping is adopted in this paper:(8)Zt+1=αZt−2tanhβZtexp−3Zt2.When the valuesα=0.4 and β=2.8, equation (8) is in a chaotic state, and the chaotic solution generated by equation (8) is in a range of (−0.9, 0.9) larger than that of logistic mapping solution, which is more conducive to searching. All algorithms in this paper adopt this parameter setting.


## 3.2. FPA Based on Chaotic Mapping

The principle of CFPA is to use the value generated by chaotic mapping to replace the random value probability of rand to generate [0, 1] in the process of migration operation. When the search ability is not strong in the later stage of the algorithm, each group of solutions will be searched fork times to obtain new individuals. The formula for chaotic search by replacing the old individuals with new individuals is as follows:(9)Xkbest=Xbest+Zt,where Xk is the solution of equation (9). The flow of chaotic mapping flower pollination algorithm is expressed as follows:Step 1: initialize the population, the sizep, the max iteration number k, the transformation probability p, and the fitness value function f are set.Step 2: calculate the fitness functionf of the habitat in which the population is located, and compare and retain the optimal fitness value f, determining whether the condition is satisfied, and if the condition is satisfied, output it; otherwise, continue with the following steps.Step 3: from equations (1) and (2) calculate the position and optimal position of each individual.Step 4 (position of the individual): the optimal fitness is compared with the chaotic mapping probabilityXk to select the optimal fitness of the individual. Reassemble into a new optimal location, and update location.Step 5: performe a mutation operation according to equation (5).Step 6: carry out chaotic search according to that chaotic map of formula (7).Step 7: if it is judged that the stop condition is met, stop; if not met, repeat step (3).


## 4. Performance Comparisons of Algorithms

It should be checked by the test function. The choice of test function is based on the properties. Ideally [13, 14], a good set of test functions should have multiple attributes, unimodal and multimodal, so that the optimization algorithm can be tested comprehensively. Based on this principle, this paper selects four typical and widely used standard test functions for testing.(1)
Ackley function:(10)fx=−20∗e−0.20.5xi2+xj2−e0.5∗cos2πxi+cos2πxj+e+20.The best values:minfx∗=f0,0,...,0=0.(2)
Beale function:(11)fX=∑i=1nxi2−10cos2πxi+10,xi≤5.2.The best values:minfx∗=f0,0,...,0=0.(3)
Rastrigin Function:(12)fx=−sinxicosxjexp100−xi2+xj2π.The best values:minfx∗=f0,0,...,0=0.(4)
Holder table function:(13)fx=−sinxicosxjexp100−xi2+xj2π.The best values:minfx∗=f8.05502,9.66459=−19.2085.f1–f4 functions are shown in Table 1.Table 1
Benchmark function.
FunctionFunction nameValues rangeOptimal positionOptimal valuef1Ackley[−5,5]D[0]D0f2Beale[−4.5,4.5]D(3,0.5)D0f3Rastrigin[−5.2,5.2]D[0]D0f4Holder table[−10,10]D(|8.055|,|9.665|)D−19.2085The abovef1–f4 functions are tested, and their function image is shown in Figure 1:Figure 1
f1–f4 functions’ schematic diagram.
(a)(b)(c)(d)In order to verify the change of convergence and fitness of CFPA algorithm, the execution efficiency of intelligent optimization algorithm is verified by continuously iterating the value of function. In this paper, GA, PSO, FPA, and CFPA algorithms are taken as comparison objects, and the fitness value changes of [100, 1000] are set through constant iteration. The final iterative effect is shown in Figures2–5.Figure 2
Four algorithms for fitness value underf1 function.Figure 3
Four algorithms for fitness value underf2 function.Figure 4
Four algorithms for fitness value underf3 function.Figure 5
Four algorithms for fitness value underf4 function.


## 5. Comparison of GPS Position Prediction

Considering the experimental application capability of CFPA algorithm, this paper selects GPS data as the application scenario to predict the position change in GPS.GPS data is derived from city taxi positioning data in Chengdu, Sichuan, China, including road ID, vehicle ID, transit time, longitude, dimension, real-time speed, and location number. Details from August 1, 2014, to August 31, 2014, are shown in Table2.Table 2
GPS vehicle data.
VehicleDateTimeLatitudeLongitudePosition50032014/08/1206 : 01 : 1830.702971104.010691654822014/8/320 : 04 : 5330.681366104.0451543323242014/8/1210 : 21 : 2730.680909104.072372505132014/8/521 : 08 : 3330.729595104.0226271363638212014/8/906 : 44 : 5730.571478103.9570357...From Table2, the location number is to number the GPS position (longitude and latitude). The position error is valid within a certain range. The longitude and dimension position numbers within the valid range for some hot spots (e.g., railway stations, hospitals, schools, and bus stations) are the same. In this lab, the number of position numbers is about 120. The location information with less location information and small amount of data is deleted.Adjust and calculate GPS data, calculate the time and position relationship of vehicles at different positions, and count related information of different road sections. The main data are shown in Table3.Table 3
Vehicle GPS road conditions.
PositionVehicleRoad (m)EntryDepartureSpeed (km/h)Road conditions10111325.608 : 04 : 1808 : 05 : 2322.61765151242.816 : 34 : 0016 : 35 : 1023.2110832451224.421 : 18 : 1521 : 20 : 1525.1247323342.510 : 57 : 0610 : 59 : 1010.5036123243.413 : 17 : 5913 : 20 : 239.20...In the process of geographical position prediction, due to traffic conditions in the road, i.e., congestion, slow movement, and comfort. In this paper, the average speed of the vehicle is used as the judgment standard, and its threshold intervals are, respectively, set: less than 12 km/h is jam, 12∼25 km/h is slow, and more than 25 km/h is comfortable. To verify the prediction effect of the algorithm proposed in this paper on geographical position, CFPA is compared with GA, PSO, and FPA algorithms with real geographical location information as the reference standard. The figure shows the comparison effect of geographical position prediction with other algorithms, as shown in Figure6.Figure 6
GPS position prediction with four algorithms.Select one day as the time point for position prediction, and select different time periods to evaluate the GPS position. GA performs poorly in algorithm, and its error is relatively large, with an average value of about 4.56 units. PSO and FPA are close in prediction effect, but the effect is general, with error values of 4.12 and 3.67, respectively. CFPA algorithm has obvious advantages in prediction effect, with an error unit of 1.89. Comparing the above four algorithms, it is found that CFPA algorithm has obvious advantages in prediction accuracy and error and has good convergence in the fitness value.


## 6. Conclusion

In this paper, the basic principle of flower pollination algorithm is introduced, and the flower pollination algorithm is improved through chaotic mapping strategy. The improved CFPA algorithm compares the test efficiency under four test functions, and the convergence of CFPA's fitness value has obvious advantages. Finally, GPS position data are used to predict the geographical position. CFPA also has the best prediction effect in the prediction effect. The next research work mainly tests other test functions to further verify the overall advantages of the algorithm.



---

*Source: 9972701-2021-04-26.xml*