# Rotated Black Hole: A New Heuristic Optimization for Reducing Localization Error of WSN in 3D Terrain

Authors: Qing-Wei Chai; Jerry Wangtao Zheng
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

Wireless sensor network (WSN) attracts the attention of more and more researchers, and it is applied in more and more environment. The localization information is one of the most important information in WSN. This paper proposed a novel algorithm called the rotated black hole (RBH) algorithm, which introduces a rotated optimal path and greatly improves the global search ability of the original black hole (BH) algorithm. Then, the novel algorithm is applied in reducing the localization error of WSN in 3D terrain. CEC 2013 test suit is used to verify the performance of the novel algorithm, and the simulation results show that the novel algorithm has better search performance than other famous intelligence computing algorithms. The localization simulation experiment results reveal that the novel algorithm also has an excellent performance in solving practical problems. WSN localization 3D terrain intelligence computing rotated the black hole algorithm.


---

## Body

## 1. Introduction

Due to the maturity of microelectronics and wireless communication technology, a lot of funds and researchers are attracted by wireless sensor networks (WSNs). These technologies have promoted the development of cheap, ultra-small, multifunctional, and smart sensor nodes (SNs), which have the ability to communicate with each other through wireless media [1]. Due to size and cost limitations, SN has limited functions and low computing power. Depending on the application, a collection of hundreds or thousands of nodes can be deployed in the area of interest. These nodes can communicate with each other through wireless media and form a network called a WSN.More and more fields can achieve better performance with the help of WSN, such as target tracking [2], military affairs, disaster management, environmental monitoring, and so forth. In order to better perceive the target in the above scene, the location information of the sensor node is indispensable; otherwise, the information obtained by the sensor node will have a low correlation with the target to be monitored.In order to obtain the accurate location of the sensor node, a global positioning system (GPS) module needs to be installed to provide accurate location information. However, due to the high cost and high energy consumption, it is impossible to install a GPS module on any sensor node. Without a GPS module, how to know the location of a node has become a problem that plagues researchers. In recent years, many algorithms have been proposed to calculate the positions of all sensor nodes in WSN [3]. According to the different of localization mechanisms, these algorithms can be divided into two categories: range-based localization algorithms and rang-free localization algorithms. In some localization algorithms, such as received signal strength indication (RSSI) [4], the time of arrival (ToA) [5, 6], and the angle of arrival (AoA) [7] of the signal, these algorithms use specific physical data to estimate the location of unknown nodes (not equipped with GPS modules), called distance-based positioning algorithm. Although the range-based positioning algorithm provides more accurate position information than the range-free positioning algorithm, it needs to be equipped with a specific module, which greatly increases the cost and energy consumption. WiFi distance measurement is used to improve accurate of indoor localization [8].On the other hand, some algorithms only need the connective information of WSN and can estimate the position of unknown nodes. These algorithms are called range-free localization algorithms, such as centroid algorithm [9], distance vector-hop (DV-Hop) algorithm [10, 11], and approximate point-in-triangulation test (APIT) algorithm [12].In [13], anchor nodes are set at the border land of monitoring regions and improve the estimation of per hop distance. The enhanced PSO algorithm is proposed and used to enhance the localization accurate of WSN in [14]. The hop size of each anchor node is replaced by an average hop size of all anchor nodes in [15]. Chen et al. proposed a method which adds a reference anchor node on hop size that calculates formulate to reduce the error of hop size of each anchor node [16]. In [17], the weighted least square algorithm is introduced to reduce the localization error of DV-Hop. In [18], a model is introduced to analysis localization error of mobile Lidar.The traditional 2D WSN has gradually been unable to meet the needs of the current society, such as smart city [19–22]. Some algorithms applied to 2D WSN must be extended to 3D WSN to adapt to new social needs. [23] proposes a method to optimize the deployment strategy of WSN in a 3D environment. Pan et al. proposed a new algorithm to optimize the coverage rate of WSN in 3D terrain [24], and a DV-Hop localization method applied in 3D terrain is proposed [25]. In [26], the authors utilize the GA algorithm to improve localization accurate of WSN in 3D terrain.In order to find the optimal solution of engineering problems quickly and accurately, many optimization algorithms have been established, some of them are inspired by natural phenomena, and [27] has briefly introduced the swarm intelligence algorithm. For example, the most popular evolution-inspired technique is genetic algorithms (GA) [28, 29] that simulates the Darwinian evolution. Differential evolution (DE) is an enhanced GA algorithm with better performance than GA [30–32]. Other popular algorithms are evolution strategy (ES) [33], probability-based incremental learning (PBIL) [34], genetic programming (GP) [35], Phasmatodea population evolution (PPE) algorithm [36], and biogeography-based optimizer (BBO) [37]. The particle swarm optimization (PSO) algorithm was developed based on the swarm behavior, such as fish and bird schooling in nature [38, 39]. Whale optimization algorithm (WOA) [40, 41] is a metaheuristic optimization algorithm by mimicking the hunting behavior of humpback whales. Grey wolf optimization (GWO) algorithm can be regarded as an enhanced PSO and achieve better performance [42, 43]. The ant colony optimization (ACO) is inspired by social behavior of ants in an ant colony [44]. Bat algorithm (BA) was inspired by the echolocation behavior of bats [45]. Black hole (BH) algorithms are inspired by the black hole phenomenon [46]. The gravitational search algorithm (GSA) was constructed based on the law of gravity and the notion of mass interactions [47]. The novel algorithm called moth search algorithm (MSA) is proposed which combine Levy fly and moth search [48]. In addition, some methods are proposed to improve the search ability of algorithms, [49–51] introduce the concept of compact, and significantly reduce the memory usage. The surrogate method utilizes the Kriging model to enhance the algorithm run speed [52–56].There are three contributions in this paper: Firstly, this study improves the search path of the black hole algorithm to improve the speed of obtaining the optimal solution. Secondly, the novel algorithm proposed in this article gets a better balance between local search ability and global search ability. Thirdly, this paper further enhances the localization accurate of WSN in 3D terrain.The rest of the paper is organized as follows: in Section2, the knowledge related to DV-Hop and BH algorithm are briefly introduced. The novel algorithm is shown in Section 3, and Section 4 utilizes the novel algorithm to reduce the localization error of WSN in 3D terrain. CEC 2013 test suit and simulation experiment of sensor nodes deploring are used to test the performance of novel algorithm in Section 5. Conclusion is the content of Section 6.


## 2. Related Work

### 2.1. DV-Hop Localization Algorithm in 3D Terrain

#### 2.1.1. Original DV-Hop

This section briefly introduces the original DV-Hop localization algorithm. In this localization algorithm, every node is stored in a table with three attributes which areX,Y,Hop. X and Y are the horizontal and vertical coordinates of the node, and Hop is the hop count of the node connect with other sensor nodes. In the first stage after the installation of the WSN, the hop count of all sensor nodes is initial to zero, and each anchor node (the node with the GPS module installed) broadcasts a message packet containing its localization information in the network. If a sensor node receives a message from another sensor node, the hop count between them would increase one. There may be multiple path links between any two nodes; so, the number of hops between them may have different values, but only the minimum number of hops between any two sensor nodes is reserved in DV-Hop. Secondly, the anchor node collects the number of hops and distance information between itself and other connected anchor nodes, thereby calculating the average length per hop of this anchor node. The calculating equation is presented in the following:
(1)Hopsizei=∑j=1mxi−xj2+yi−yj2∑j=1mHopi,j,where the position of ith anchor node is xi,yi, and m is the number of all anchor nodes. The hop count between ith anchor node and jth anchor node is represented as Hopi,j, and the average length of per hop of ith anchor node is Hopsizei.Each anchor node broadcasts its ownHopsize to the network by controlling flooding. The distance between unknown node u and anchor node A can be calculated by Eq (2). At the same time, the unknown node u forwards the information to surrounding nodes, and the corresponding hop count is increased by 1.
(2)DistanceA,u=hopA,u·HopsizeAThen, the location of the unknown node can be estimated by the trilateration localization method, and the localization error can be reduced by the least-squares method [10].


#### 2.1.2. DV-Hop in 3D Terrain

The wireless signal is transmitted from the transmitter to the receiver through electromagnetic radiation. Different from deploying WSN in a 2D environment, in a 3D environment, electromagnetic signals will be absorbed or blocked by surrounding obstacles. The number of obstacles determines the fading and shadowing of the signal between receiver and transmitter [57]. To detect whether the communication of nodes is blocker by surrounding terrain, a line-of-sight (LOS) algorithm is introduced. In this article, we use the Bresenham LOS algorithm, because it has a faster calculation speed, requires fewer calculation points, and does not require interpolation calculations [58]. The sensor model in WSN is a mathematical formula that characterizes the connectivity of sensors as a function of distance and terrain obstacles. This paper adopts the straightforward binary sensing model to determine whether a node is connected to the WSN. If a sensor node is within the communication radius of another sensor node, no obstacles obstruct the communication signal between them. These two sensor nodes can communicate with each other and vice versa. In order to illustrate the signal propagation in 3D terrain more vividly, Figure 1 shows the details of the LOS algorithm.Figure 1
The signal propagation in 3D terrain.In Figure1, there are 7 nodes on uneven terrain, named a, b, c, d, e, f, and g, which are represented by blue dots. As can be seen from the figure, nodes a and node b are connected by a green dashed line, indicating that they can communicate with each other, and this is because there is no obstacle between node a and node b that hinders signal propagation. Conversely, node b and node c are connected by a red dashed line, and they cannot communicate with each other. As there is a mountain peak between them, the signal propagation is hindered.


### 2.2. Black Hole Algorithm

The black hole (BH) algorithm is one of the population-based methods which is inspired by the black hole phenomenon. In this method, a population of candidate solutions to a given problem is generated and distributed randomly in the search space.In the proposed BH algorithm, the evolution of the population is done by moving all the candidates towards the best candidate solution in each iteration as shown in Eq. (2), and the best candidate solution is named black hole. If the population finds a better candidate solution than black hole, this solution would replace the black hole.
(3)Xit+1=Xit+rand·XBHt−Xiti=1,2,⋯,N,where Xit and Xit+1 are the locations of the ith star at iterations t and t+1, respectively. XBHt is the location of the black hole in the search space at tth iteration. The rand is a random number between 0 and 1, and N is the number of stars (candidate solutions).Otherwise, the black hole would engulfs the candidate solution which within the radius of its event horizon. This mechanism guarantees that the population will not be trapped in local optimal value. In order to keep the population size, a new individual will be generated randomly in search space of a problem. It is worth noting that a small number of individuals will pass through the event horizon of the black hole, which can improve the exploitation performance of the algorithm. The radius of the event horizon in the BH algorithm is calculated by the following equation:(4)R=fBH∑i=1Nfi.In the above formula,fBH represents the fitness value calculated according to the position of the black hole. The fitness value calculated from the position of the ith individual is denoted by fi. When the distance between an individual and the black hole is less than R, the individual will be swallowed, and the algorithm will randomly generate a new individual to maintain the population size.


## 2.1. DV-Hop Localization Algorithm in 3D Terrain

### 2.1.1. Original DV-Hop

This section briefly introduces the original DV-Hop localization algorithm. In this localization algorithm, every node is stored in a table with three attributes which areX,Y,Hop. X and Y are the horizontal and vertical coordinates of the node, and Hop is the hop count of the node connect with other sensor nodes. In the first stage after the installation of the WSN, the hop count of all sensor nodes is initial to zero, and each anchor node (the node with the GPS module installed) broadcasts a message packet containing its localization information in the network. If a sensor node receives a message from another sensor node, the hop count between them would increase one. There may be multiple path links between any two nodes; so, the number of hops between them may have different values, but only the minimum number of hops between any two sensor nodes is reserved in DV-Hop. Secondly, the anchor node collects the number of hops and distance information between itself and other connected anchor nodes, thereby calculating the average length per hop of this anchor node. The calculating equation is presented in the following:
(1)Hopsizei=∑j=1mxi−xj2+yi−yj2∑j=1mHopi,j,where the position of ith anchor node is xi,yi, and m is the number of all anchor nodes. The hop count between ith anchor node and jth anchor node is represented as Hopi,j, and the average length of per hop of ith anchor node is Hopsizei.Each anchor node broadcasts its ownHopsize to the network by controlling flooding. The distance between unknown node u and anchor node A can be calculated by Eq (2). At the same time, the unknown node u forwards the information to surrounding nodes, and the corresponding hop count is increased by 1.
(2)DistanceA,u=hopA,u·HopsizeAThen, the location of the unknown node can be estimated by the trilateration localization method, and the localization error can be reduced by the least-squares method [10].


### 2.1.2. DV-Hop in 3D Terrain

The wireless signal is transmitted from the transmitter to the receiver through electromagnetic radiation. Different from deploying WSN in a 2D environment, in a 3D environment, electromagnetic signals will be absorbed or blocked by surrounding obstacles. The number of obstacles determines the fading and shadowing of the signal between receiver and transmitter [57]. To detect whether the communication of nodes is blocker by surrounding terrain, a line-of-sight (LOS) algorithm is introduced. In this article, we use the Bresenham LOS algorithm, because it has a faster calculation speed, requires fewer calculation points, and does not require interpolation calculations [58]. The sensor model in WSN is a mathematical formula that characterizes the connectivity of sensors as a function of distance and terrain obstacles. This paper adopts the straightforward binary sensing model to determine whether a node is connected to the WSN. If a sensor node is within the communication radius of another sensor node, no obstacles obstruct the communication signal between them. These two sensor nodes can communicate with each other and vice versa. In order to illustrate the signal propagation in 3D terrain more vividly, Figure 1 shows the details of the LOS algorithm.Figure 1
The signal propagation in 3D terrain.In Figure1, there are 7 nodes on uneven terrain, named a, b, c, d, e, f, and g, which are represented by blue dots. As can be seen from the figure, nodes a and node b are connected by a green dashed line, indicating that they can communicate with each other, and this is because there is no obstacle between node a and node b that hinders signal propagation. Conversely, node b and node c are connected by a red dashed line, and they cannot communicate with each other. As there is a mountain peak between them, the signal propagation is hindered.


## 2.1.1. Original DV-Hop

This section briefly introduces the original DV-Hop localization algorithm. In this localization algorithm, every node is stored in a table with three attributes which areX,Y,Hop. X and Y are the horizontal and vertical coordinates of the node, and Hop is the hop count of the node connect with other sensor nodes. In the first stage after the installation of the WSN, the hop count of all sensor nodes is initial to zero, and each anchor node (the node with the GPS module installed) broadcasts a message packet containing its localization information in the network. If a sensor node receives a message from another sensor node, the hop count between them would increase one. There may be multiple path links between any two nodes; so, the number of hops between them may have different values, but only the minimum number of hops between any two sensor nodes is reserved in DV-Hop. Secondly, the anchor node collects the number of hops and distance information between itself and other connected anchor nodes, thereby calculating the average length per hop of this anchor node. The calculating equation is presented in the following:
(1)Hopsizei=∑j=1mxi−xj2+yi−yj2∑j=1mHopi,j,where the position of ith anchor node is xi,yi, and m is the number of all anchor nodes. The hop count between ith anchor node and jth anchor node is represented as Hopi,j, and the average length of per hop of ith anchor node is Hopsizei.Each anchor node broadcasts its ownHopsize to the network by controlling flooding. The distance between unknown node u and anchor node A can be calculated by Eq (2). At the same time, the unknown node u forwards the information to surrounding nodes, and the corresponding hop count is increased by 1.
(2)DistanceA,u=hopA,u·HopsizeAThen, the location of the unknown node can be estimated by the trilateration localization method, and the localization error can be reduced by the least-squares method [10].


## 2.1.2. DV-Hop in 3D Terrain

The wireless signal is transmitted from the transmitter to the receiver through electromagnetic radiation. Different from deploying WSN in a 2D environment, in a 3D environment, electromagnetic signals will be absorbed or blocked by surrounding obstacles. The number of obstacles determines the fading and shadowing of the signal between receiver and transmitter [57]. To detect whether the communication of nodes is blocker by surrounding terrain, a line-of-sight (LOS) algorithm is introduced. In this article, we use the Bresenham LOS algorithm, because it has a faster calculation speed, requires fewer calculation points, and does not require interpolation calculations [58]. The sensor model in WSN is a mathematical formula that characterizes the connectivity of sensors as a function of distance and terrain obstacles. This paper adopts the straightforward binary sensing model to determine whether a node is connected to the WSN. If a sensor node is within the communication radius of another sensor node, no obstacles obstruct the communication signal between them. These two sensor nodes can communicate with each other and vice versa. In order to illustrate the signal propagation in 3D terrain more vividly, Figure 1 shows the details of the LOS algorithm.Figure 1
The signal propagation in 3D terrain.In Figure1, there are 7 nodes on uneven terrain, named a, b, c, d, e, f, and g, which are represented by blue dots. As can be seen from the figure, nodes a and node b are connected by a green dashed line, indicating that they can communicate with each other, and this is because there is no obstacle between node a and node b that hinders signal propagation. Conversely, node b and node c are connected by a red dashed line, and they cannot communicate with each other. As there is a mountain peak between them, the signal propagation is hindered.


## 2.2. Black Hole Algorithm

The black hole (BH) algorithm is one of the population-based methods which is inspired by the black hole phenomenon. In this method, a population of candidate solutions to a given problem is generated and distributed randomly in the search space.In the proposed BH algorithm, the evolution of the population is done by moving all the candidates towards the best candidate solution in each iteration as shown in Eq. (2), and the best candidate solution is named black hole. If the population finds a better candidate solution than black hole, this solution would replace the black hole.
(3)Xit+1=Xit+rand·XBHt−Xiti=1,2,⋯,N,where Xit and Xit+1 are the locations of the ith star at iterations t and t+1, respectively. XBHt is the location of the black hole in the search space at tth iteration. The rand is a random number between 0 and 1, and N is the number of stars (candidate solutions).Otherwise, the black hole would engulfs the candidate solution which within the radius of its event horizon. This mechanism guarantees that the population will not be trapped in local optimal value. In order to keep the population size, a new individual will be generated randomly in search space of a problem. It is worth noting that a small number of individuals will pass through the event horizon of the black hole, which can improve the exploitation performance of the algorithm. The radius of the event horizon in the BH algorithm is calculated by the following equation:(4)R=fBH∑i=1Nfi.In the above formula,fBH represents the fitness value calculated according to the position of the black hole. The fitness value calculated from the position of the ith individual is denoted by fi. When the distance between an individual and the black hole is less than R, the individual will be swallowed, and the algorithm will randomly generate a new individual to maintain the population size.


## 3. Rotated Black Hole

In the original BH algorithm, the individual directly moves forward into the black hole. If the individual finds a better solution in the process, the black hole will be updated. However, in the multimodal problem, it is difficult for the intelligence computing algorithm to find a better solution on the straight path. [40] has introduced a formula which mimic the feeding behavior of whales and gotten great performance.In order to improve the search ability of the BH algorithm in multimodal problems, the rotated model is introduced in this paper. The position update equation of population in the rotated model is presented in the following:(5)Xit+1=D·ebl·cos2πl+XBHt.Xit+1 is the position of ith individual at t+1 iteration, and the D indicates the distance between it and black hole. The position of the black hole at t iteration is represented by XBHt. The b is a constant, it is set to 1 in this article, and l is a rand number between -1 and 1. In the novel algorithm, the original position update way and the rotated model are combined to find the optimal solution. In each iteration, the algorithm generates a rand number, if the rand number is bigger than a special constant a, the algorithm utilizes a rotated model and vice versa. The detail of the novel algorithm is presented in Algorithm 1 and Figure 2.Algorithm 1: The rotated black hole algorithm.
Initialization:i=1, t=1, D=50, n=30, a=0.7, T=1000;randomly initial the position of population and calculate the function value:Pos, fun;fun_BH = inf;whilet≤TdoPos=Pos1,Pos2,⋯,Posn,fun=fun1,fun2,⋯,funn;R_BH=fun_BH/sumfun;whilei≤ndoifrand<athenUpdatePosi according to Eq (3) and funi;endelseUpdatePosi according to Eq (5) and funi;endiffuni<fun_BHthenPos_BH = Posi;fun_BH = funi;endif The distance between Posi and Pos_BH smaller than R_BHthenInitialPosi and compute funiendi=i+1;endt=t+1;endFigure 2
The flow chart of the novel algorithm.


## 4. Rotated Black Hole Algorithm Applied on DV-Hop in 3D Terrain

In this section, the novel algorithm is applied to reduce locate error of unknown nodes in 3D terrain. [59] has proved that the intelligence computing algorithm has a distinct effect on WSN in 2D plane. In this paper, the 2D plane is extended to a 3D terrain as shown in Figure 3. This terrain is generated by the “peak” function of Matlab 2018a, and the connective state between any two nodes can be estimated by the LOS algorithm. The locate error of DV-Hop can be calculated by Eq. (6).
(6)e=∑i=1mx−xi2+y−yi2+z−zi2−disti2.Figure 3
Terrain for deploying sensor nodes.The position of theith anchor node is represented by xi,yi,zi, and x,y,z is the estimation position of unknown node. The disti means the real distance between ith anchor node and unknown node; so, e is the error between the real position and estimation position of unknown node in WSN. This section applies the novel algorithm to reduce the error, and the fitness function is shown as follows:
(7)fx,y=min∑i=1m1hopui2x−xi2+y−yi2+z−zi2−disti2,where the hop count between unknown node and ith anchor node is represented by hopui. The purpose of this article is to use the new algorithm to weigh trade-off all anchor nodes and find a suitable unknown node location.


## 5. Results and Discussion

### 5.1. CEC 2013 Simulation Results

To test the performance of the RBH algorithm, CREST was carried out using the CEC 2013 benchmark function, which is a convincing function for the testing optimization algorithm. There are 28 test functions in the CEC 2013 benchmark function. Thef1 to f5 are unimodal functions, mainly check out the convergence rate of the optimization algorithm. The f6 to f20 are multimodal functions, which are used to verify the performance of avoiding local optimal values of algorithms. The f21 to f28 are composition functions, and their simulation results reveal the comprehensive performance of optimization algorithms. CREST was compared with some frequently used optimization algorithms, such as WOA, GA, BH, PSO, ABC, and MSA algorithms. CREST in this study is implemented on the same notebook computer which equips with an i5-7300HQ CPU @2.5GHz. CREST results were presented in Table 1, every data is the average of 48 test results, and the best results are marked by underline and bolt font for each function.Table 1
Simulation results of CEC 2013 benchmark functions.
AlgorithmsGAWOAPSOABCMSABHRBHf11.70E+053.25E+03-1.02E+032.76E+041.81E+052.97E+046.74E+03f26.52E+092.04E+084.73E+078.19E+086.93E+093.58E+083.06E+08f32.73E+201.75E+115.80E+102.19E+154.10E+213.20E+121.15E+11f41.11E+061.01E+057.12E+041.01E+051.48E+079.48E+041.48E+05f51.04E+056.15E+02-8.03E+021.05E+041.16E+052.09E+031.24E+03f63.56E+04-2.14E+02-7.04E+023.22E+033.59E+041.25E+03-1.26E+02f77.89E+061.84E+03-4.00E+021.94E+042.35E+071.70E+02-5.60E+02f8-6.79E+02-6.79E+02-6.79E+02-6.79E+02-6.78E+02-6.79E+02-6.79E+02f9-5.18E+02-5.27E+02-5.27E+02-5.28E+02-5.12E+02-5.28E+02-5.33E+02f102.63E+048.64E+02-2.58E+024.39E+032.98E+043.48E+031.46E+03f112.35E+034.65E+023.35E+023.76E+022.58E+034.41E+022.72E+02f122.26E+037.72E+024.96E+025.31E+022.35E+036.05E+024.77E+02f132.31E+039.01E+028.34E+026.37E+022.50E+037.35E+026.07E+02f141.73E+041.14E+041.08E+041.01E+041.77E+041.36E+049.91E+03f151.65E+041.30E+041.28E+041.48E+041.83E+041.39E+041.45E+04f162.05E+022.03E+022.03E+022.04E+022.09E+022.03E+022.04E+02f175.72E+031.51E+031.48E+031.31E+036.07E+031.36E+031.31E+03f185.82E+031.62E+031.55E+031.51E+036.03E+031.46E+031.44E+03f192.83E+072.15E+031.10E+035.49E+053.44E+074.74E+043.44E+03f206.25E+026.25E+026.25E+026.25E+026.25E+026.25E+026.24E+02f211.34E+043.84E+031.73E+035.26E+031.37E+044.53E+033.72E+03f221.93E+041.43E+041.43E+041.20E+041.94E+041.61E+041.30E+04f231.84E+041.52E+041.52E+041.67E+041.98E+041.65E+041.56E+04f242.15E+031.42E+031.53E+031.40E+032.36E+031.58E+031.40E+03f251.80E+031.55E+031.67E+031.52E+031.82E+031.68E+031.52E+03f261.84E+031.67E+031.67E+031.67E+031.90E+031.67E+031.67E+03f275.16E+033.67E+034.03E+033.55E+035.30E+033.93E+033.46E+03f281.73E+041.04E+041.01E+049.09E+031.95E+049.85E+034.13E+03The optimal results of intelligence computing algorithms under the CEC 2013 were showed in Table1, and the best result of each test problem is marked in bold. The search ability of RBH algorithm on 14 benchmark functions is better or equal than other algorithms.In the unimodal problems, as the excellent local search ability of PSO, other algorithms are far from the PSO algorithm. In the multimodal problems, the new algorithm proposed in this paper has obtained 8 best results. The results show that the new algorithm has a strong global search ability than other comparison algorithms. Out of a total of eight composition problems, the new algorithm performed best in five, and this further verifies the novel algorithm with great global search ability. Through CREST, one conclusion was achieved that the RBH algorithm has good global search capabilities and is good at solving complex optimization problems.In Figure4, the details of intelligence computing algorithms to solve some optimal problems are given. Although the new algorithm cannot find a better solution than other algorithms in the early stage, it has a strong global search ability and is easy to avoid the local optimal value and finally find the optimal solution. Contrast other algorithms, the PSO has the fastest convergence rate but it has difficult jumping local optimal value; so, it is surpassed by other algorithms in the last stage. It can be seen that for complex problems, the new algorithm has an advantage due to its excellent global search ability.Figure 4
Simulation results of CEC 2013.
(a)
f9(b)
f17(c)
f18(d)
f24(e)
f25(f)
f26(g)
f27(h)
f28


### 5.2. Localization of WSN in 3D Terrain

In this section, the sensor nodes are randomly arranged in a100m×100m 3D terrain as shown in Figure 3. In order to comprehensively check the performance of all positioning algorithms, we design three simulation experiments with different number of nodes, different number of anchor nodes, and communication radius of sensor nodes. The best experimental results for each experiment are underlined.


#### 5.2.1. Localization Error of WSN with Different Numbers of Nodes in 3D Terrain

In this simulation experiment, we have configured 200, 250, 300, 350, 400, 450, and 500 nodes in the 3D terrain, respectively, the communication radius of all nodes is set to 20 m, and there are 30 anchor nodes. The simulation results are shown in Table2 and Figure 5.Table 2
Localization error of WSN with different numbers of nodes in 3D terrain.
AlgorithmNode number200250300350400450500DV-Hop27.12 m53.94 m44.20 m27.12 m29.22 m24.63 m28.53 mGA7.29 m6.94 m8.00 m7.27 m7.01 m7.33 m7.99 mWOA6.14 m5.35 m6.33 m5.19 m5.43 m5.68 m6.15 mBH6.17 m5.45 m6.26 m5.01 m5.45 m5.85 m5.90 mRBH5.94 m5.23 m6.22 m5.00 m5.30 m5.59 m5.90 mPSO7.88 m8.34 m7.74 m7.01 m6.99 m7.01 m7.62 mABC16.47 m17.86 m16.15 m23.14 m26.67 m24.73 m24.83 mMSA10.88 m10.63 m10.15 m9.69 m10.02 m10.23 m9.88 mFigure 5
Localization error of WSN with different numbers of nodes in 3D terrain.The localization error is the average value of localization error of all unknown nodes which is calculated by Eq. (6). From this table, we can see that the intelligence computing algorithm effectively improves the accuracy of the DV-Hop localization algorithm, and the novel algorithm has the strongest performance in all participated compared algorithms. The biggest localization error of the original DV-Hop algorithm appears 250 nodes. Generally speaking, the positioning error is positively related to the number of nodes. The reason for this phenomenon is that each node deployment is independent and random. In the experiment of deploying 250 nodes, the signals of many nodes are blocked by the terrain; so, the experimental results of the original DV-Hop are not ideal. However, in this experimental environment, intelligent computing shows strong optimization capabilities, which greatly reduces the positioning error.


#### 5.2.2. Localization Error of WSN with Different Numbers of Anchor Nodes in 3D Terrain

In this simulation experiment, there are 15, 20, 25, 30, 35, 40, and 45 anchor nodes, respectively, the number of nodes is 300, and the communication radius of sensor node is set to 20 m. Table3 and Figure 6 show the simulation results.Table 3
Localization error of WSN with different numbers of anchor nodes in 3D terrain.
AlgorithmAnchor node number15202530354045DV-Hop59.32 m49.05 m50.04 m67.02 m74.02 m83.01 m83.06 mGA7.10 m8.05 m7.72 m8.88 m10.31 m11.40 m13.14 mWOA6.15 m6.47 m6.64 m7.77 m9.16 m10.86 m12.25 mBH6.05 m6.40 m6.64 m7.74 m9.31 m10.72 m12.21 mRBH6.04 m6.24 m6.42 m7.68 m9.20 m10.65 m12.04 mPSO7.85 m8.48 m8.05 m8.68 m10.44 m11.48 m12.97 mABC16.23 m16.55 m19.91 m23.07 m23.80 m25.78 m27.99 mMSA10.40 m10.88 m10.58 m11.50 m13.29 m13.13 m15.13 mFigure 6
Localization error of WSN with different numbers of anchor nodes in 3D terrain.Generally, the positioning error decreases as the number of anchor nodes increases, but when the number of anchor nodes is greater than 35, a special situation occurs in the traditional DV-Hop. Excessive location information causes trouble to the traditional DV-Hop and reduces the accuracy of positioning. DV-Hop combined with intelligent computing algorithm, especially combined with RBH algorithm, can adapt to any conditions, and no matter the number of anchor nodes, the simulation results are equally excellent.


#### 5.2.3. Localization Error of WSN with Different Communication Radii in 3D Terrain

The communication radius of the sensor node can determine the anchor node that provides location information to how many sensor nodes. So, the value of communication radius of sensor nodes is a important factor for simulation results. We install the communication radius as 14, 18, 22, 26, 30, 34, and 38 to test the performance of different localization algorithms. There are 300 sensor nodes and 30 anchor nodes in this experiment, and the simulation results are presented in Table4 and Figure 7.Table 4
Localization error of WSN with different communication radii in 3D terrain.
AlgorithmCommunication radius14 m18 m22 m26 m30 m34 m38 mDV-hop59.32 m49.05 m50.04 m67.02 m74.02 m83.01 m83.06 mGA7.10 m8.05 m7.72 m8.88 m10.31 m11.40 m13.14 mWOA6.15 m6.47 m6.64 m7.77 m9.16 m10.86 m12.25 mBH6.05 m6.40 m6.64 m7.74 m9.31 m10.72 m12.21 mRBH6.04 m6.24 m6.42 m7.68 m9.20 m10.65 m12.04 mPSO7.85 m8.48 m8.05 m8.68 m10.44 m11.48 m12.97 mABC16.23 m16.55 m19.91 m23.07 m23.80 m25.78 m27.99 mMSA10.40 m10.88 m10.58 m11.50 m13.29 m13.13 m15.13 mFigure 7
Localization error of WSN with different communication radii in 3D terrain.From this table, we can see the influence of the communication radius on the experimental results. Different from what we originally envisioned, the increase of communication radius would increase the localization error of WSN. And without exception, all localization algorithms show this feature. The novel algorithm gets the best result at each experiment except communication radius is 30.


## 5.1. CEC 2013 Simulation Results

To test the performance of the RBH algorithm, CREST was carried out using the CEC 2013 benchmark function, which is a convincing function for the testing optimization algorithm. There are 28 test functions in the CEC 2013 benchmark function. Thef1 to f5 are unimodal functions, mainly check out the convergence rate of the optimization algorithm. The f6 to f20 are multimodal functions, which are used to verify the performance of avoiding local optimal values of algorithms. The f21 to f28 are composition functions, and their simulation results reveal the comprehensive performance of optimization algorithms. CREST was compared with some frequently used optimization algorithms, such as WOA, GA, BH, PSO, ABC, and MSA algorithms. CREST in this study is implemented on the same notebook computer which equips with an i5-7300HQ CPU @2.5GHz. CREST results were presented in Table 1, every data is the average of 48 test results, and the best results are marked by underline and bolt font for each function.Table 1
Simulation results of CEC 2013 benchmark functions.
AlgorithmsGAWOAPSOABCMSABHRBHf11.70E+053.25E+03-1.02E+032.76E+041.81E+052.97E+046.74E+03f26.52E+092.04E+084.73E+078.19E+086.93E+093.58E+083.06E+08f32.73E+201.75E+115.80E+102.19E+154.10E+213.20E+121.15E+11f41.11E+061.01E+057.12E+041.01E+051.48E+079.48E+041.48E+05f51.04E+056.15E+02-8.03E+021.05E+041.16E+052.09E+031.24E+03f63.56E+04-2.14E+02-7.04E+023.22E+033.59E+041.25E+03-1.26E+02f77.89E+061.84E+03-4.00E+021.94E+042.35E+071.70E+02-5.60E+02f8-6.79E+02-6.79E+02-6.79E+02-6.79E+02-6.78E+02-6.79E+02-6.79E+02f9-5.18E+02-5.27E+02-5.27E+02-5.28E+02-5.12E+02-5.28E+02-5.33E+02f102.63E+048.64E+02-2.58E+024.39E+032.98E+043.48E+031.46E+03f112.35E+034.65E+023.35E+023.76E+022.58E+034.41E+022.72E+02f122.26E+037.72E+024.96E+025.31E+022.35E+036.05E+024.77E+02f132.31E+039.01E+028.34E+026.37E+022.50E+037.35E+026.07E+02f141.73E+041.14E+041.08E+041.01E+041.77E+041.36E+049.91E+03f151.65E+041.30E+041.28E+041.48E+041.83E+041.39E+041.45E+04f162.05E+022.03E+022.03E+022.04E+022.09E+022.03E+022.04E+02f175.72E+031.51E+031.48E+031.31E+036.07E+031.36E+031.31E+03f185.82E+031.62E+031.55E+031.51E+036.03E+031.46E+031.44E+03f192.83E+072.15E+031.10E+035.49E+053.44E+074.74E+043.44E+03f206.25E+026.25E+026.25E+026.25E+026.25E+026.25E+026.24E+02f211.34E+043.84E+031.73E+035.26E+031.37E+044.53E+033.72E+03f221.93E+041.43E+041.43E+041.20E+041.94E+041.61E+041.30E+04f231.84E+041.52E+041.52E+041.67E+041.98E+041.65E+041.56E+04f242.15E+031.42E+031.53E+031.40E+032.36E+031.58E+031.40E+03f251.80E+031.55E+031.67E+031.52E+031.82E+031.68E+031.52E+03f261.84E+031.67E+031.67E+031.67E+031.90E+031.67E+031.67E+03f275.16E+033.67E+034.03E+033.55E+035.30E+033.93E+033.46E+03f281.73E+041.04E+041.01E+049.09E+031.95E+049.85E+034.13E+03The optimal results of intelligence computing algorithms under the CEC 2013 were showed in Table1, and the best result of each test problem is marked in bold. The search ability of RBH algorithm on 14 benchmark functions is better or equal than other algorithms.In the unimodal problems, as the excellent local search ability of PSO, other algorithms are far from the PSO algorithm. In the multimodal problems, the new algorithm proposed in this paper has obtained 8 best results. The results show that the new algorithm has a strong global search ability than other comparison algorithms. Out of a total of eight composition problems, the new algorithm performed best in five, and this further verifies the novel algorithm with great global search ability. Through CREST, one conclusion was achieved that the RBH algorithm has good global search capabilities and is good at solving complex optimization problems.In Figure4, the details of intelligence computing algorithms to solve some optimal problems are given. Although the new algorithm cannot find a better solution than other algorithms in the early stage, it has a strong global search ability and is easy to avoid the local optimal value and finally find the optimal solution. Contrast other algorithms, the PSO has the fastest convergence rate but it has difficult jumping local optimal value; so, it is surpassed by other algorithms in the last stage. It can be seen that for complex problems, the new algorithm has an advantage due to its excellent global search ability.Figure 4
Simulation results of CEC 2013.
(a)
f9(b)
f17(c)
f18(d)
f24(e)
f25(f)
f26(g)
f27(h)
f28


## 5.2. Localization of WSN in 3D Terrain

In this section, the sensor nodes are randomly arranged in a100m×100m 3D terrain as shown in Figure 3. In order to comprehensively check the performance of all positioning algorithms, we design three simulation experiments with different number of nodes, different number of anchor nodes, and communication radius of sensor nodes. The best experimental results for each experiment are underlined.


### 5.2.1. Localization Error of WSN with Different Numbers of Nodes in 3D Terrain

In this simulation experiment, we have configured 200, 250, 300, 350, 400, 450, and 500 nodes in the 3D terrain, respectively, the communication radius of all nodes is set to 20 m, and there are 30 anchor nodes. The simulation results are shown in Table2 and Figure 5.Table 2
Localization error of WSN with different numbers of nodes in 3D terrain.
AlgorithmNode number200250300350400450500DV-Hop27.12 m53.94 m44.20 m27.12 m29.22 m24.63 m28.53 mGA7.29 m6.94 m8.00 m7.27 m7.01 m7.33 m7.99 mWOA6.14 m5.35 m6.33 m5.19 m5.43 m5.68 m6.15 mBH6.17 m5.45 m6.26 m5.01 m5.45 m5.85 m5.90 mRBH5.94 m5.23 m6.22 m5.00 m5.30 m5.59 m5.90 mPSO7.88 m8.34 m7.74 m7.01 m6.99 m7.01 m7.62 mABC16.47 m17.86 m16.15 m23.14 m26.67 m24.73 m24.83 mMSA10.88 m10.63 m10.15 m9.69 m10.02 m10.23 m9.88 mFigure 5
Localization error of WSN with different numbers of nodes in 3D terrain.The localization error is the average value of localization error of all unknown nodes which is calculated by Eq. (6). From this table, we can see that the intelligence computing algorithm effectively improves the accuracy of the DV-Hop localization algorithm, and the novel algorithm has the strongest performance in all participated compared algorithms. The biggest localization error of the original DV-Hop algorithm appears 250 nodes. Generally speaking, the positioning error is positively related to the number of nodes. The reason for this phenomenon is that each node deployment is independent and random. In the experiment of deploying 250 nodes, the signals of many nodes are blocked by the terrain; so, the experimental results of the original DV-Hop are not ideal. However, in this experimental environment, intelligent computing shows strong optimization capabilities, which greatly reduces the positioning error.


### 5.2.2. Localization Error of WSN with Different Numbers of Anchor Nodes in 3D Terrain

In this simulation experiment, there are 15, 20, 25, 30, 35, 40, and 45 anchor nodes, respectively, the number of nodes is 300, and the communication radius of sensor node is set to 20 m. Table3 and Figure 6 show the simulation results.Table 3
Localization error of WSN with different numbers of anchor nodes in 3D terrain.
AlgorithmAnchor node number15202530354045DV-Hop59.32 m49.05 m50.04 m67.02 m74.02 m83.01 m83.06 mGA7.10 m8.05 m7.72 m8.88 m10.31 m11.40 m13.14 mWOA6.15 m6.47 m6.64 m7.77 m9.16 m10.86 m12.25 mBH6.05 m6.40 m6.64 m7.74 m9.31 m10.72 m12.21 mRBH6.04 m6.24 m6.42 m7.68 m9.20 m10.65 m12.04 mPSO7.85 m8.48 m8.05 m8.68 m10.44 m11.48 m12.97 mABC16.23 m16.55 m19.91 m23.07 m23.80 m25.78 m27.99 mMSA10.40 m10.88 m10.58 m11.50 m13.29 m13.13 m15.13 mFigure 6
Localization error of WSN with different numbers of anchor nodes in 3D terrain.Generally, the positioning error decreases as the number of anchor nodes increases, but when the number of anchor nodes is greater than 35, a special situation occurs in the traditional DV-Hop. Excessive location information causes trouble to the traditional DV-Hop and reduces the accuracy of positioning. DV-Hop combined with intelligent computing algorithm, especially combined with RBH algorithm, can adapt to any conditions, and no matter the number of anchor nodes, the simulation results are equally excellent.


### 5.2.3. Localization Error of WSN with Different Communication Radii in 3D Terrain

The communication radius of the sensor node can determine the anchor node that provides location information to how many sensor nodes. So, the value of communication radius of sensor nodes is a important factor for simulation results. We install the communication radius as 14, 18, 22, 26, 30, 34, and 38 to test the performance of different localization algorithms. There are 300 sensor nodes and 30 anchor nodes in this experiment, and the simulation results are presented in Table4 and Figure 7.Table 4
Localization error of WSN with different communication radii in 3D terrain.
AlgorithmCommunication radius14 m18 m22 m26 m30 m34 m38 mDV-hop59.32 m49.05 m50.04 m67.02 m74.02 m83.01 m83.06 mGA7.10 m8.05 m7.72 m8.88 m10.31 m11.40 m13.14 mWOA6.15 m6.47 m6.64 m7.77 m9.16 m10.86 m12.25 mBH6.05 m6.40 m6.64 m7.74 m9.31 m10.72 m12.21 mRBH6.04 m6.24 m6.42 m7.68 m9.20 m10.65 m12.04 mPSO7.85 m8.48 m8.05 m8.68 m10.44 m11.48 m12.97 mABC16.23 m16.55 m19.91 m23.07 m23.80 m25.78 m27.99 mMSA10.40 m10.88 m10.58 m11.50 m13.29 m13.13 m15.13 mFigure 7
Localization error of WSN with different communication radii in 3D terrain.From this table, we can see the influence of the communication radius on the experimental results. Different from what we originally envisioned, the increase of communication radius would increase the localization error of WSN. And without exception, all localization algorithms show this feature. The novel algorithm gets the best result at each experiment except communication radius is 30.


## 5.2.1. Localization Error of WSN with Different Numbers of Nodes in 3D Terrain

In this simulation experiment, we have configured 200, 250, 300, 350, 400, 450, and 500 nodes in the 3D terrain, respectively, the communication radius of all nodes is set to 20 m, and there are 30 anchor nodes. The simulation results are shown in Table2 and Figure 5.Table 2
Localization error of WSN with different numbers of nodes in 3D terrain.
AlgorithmNode number200250300350400450500DV-Hop27.12 m53.94 m44.20 m27.12 m29.22 m24.63 m28.53 mGA7.29 m6.94 m8.00 m7.27 m7.01 m7.33 m7.99 mWOA6.14 m5.35 m6.33 m5.19 m5.43 m5.68 m6.15 mBH6.17 m5.45 m6.26 m5.01 m5.45 m5.85 m5.90 mRBH5.94 m5.23 m6.22 m5.00 m5.30 m5.59 m5.90 mPSO7.88 m8.34 m7.74 m7.01 m6.99 m7.01 m7.62 mABC16.47 m17.86 m16.15 m23.14 m26.67 m24.73 m24.83 mMSA10.88 m10.63 m10.15 m9.69 m10.02 m10.23 m9.88 mFigure 5
Localization error of WSN with different numbers of nodes in 3D terrain.The localization error is the average value of localization error of all unknown nodes which is calculated by Eq. (6). From this table, we can see that the intelligence computing algorithm effectively improves the accuracy of the DV-Hop localization algorithm, and the novel algorithm has the strongest performance in all participated compared algorithms. The biggest localization error of the original DV-Hop algorithm appears 250 nodes. Generally speaking, the positioning error is positively related to the number of nodes. The reason for this phenomenon is that each node deployment is independent and random. In the experiment of deploying 250 nodes, the signals of many nodes are blocked by the terrain; so, the experimental results of the original DV-Hop are not ideal. However, in this experimental environment, intelligent computing shows strong optimization capabilities, which greatly reduces the positioning error.


## 5.2.2. Localization Error of WSN with Different Numbers of Anchor Nodes in 3D Terrain

In this simulation experiment, there are 15, 20, 25, 30, 35, 40, and 45 anchor nodes, respectively, the number of nodes is 300, and the communication radius of sensor node is set to 20 m. Table3 and Figure 6 show the simulation results.Table 3
Localization error of WSN with different numbers of anchor nodes in 3D terrain.
AlgorithmAnchor node number15202530354045DV-Hop59.32 m49.05 m50.04 m67.02 m74.02 m83.01 m83.06 mGA7.10 m8.05 m7.72 m8.88 m10.31 m11.40 m13.14 mWOA6.15 m6.47 m6.64 m7.77 m9.16 m10.86 m12.25 mBH6.05 m6.40 m6.64 m7.74 m9.31 m10.72 m12.21 mRBH6.04 m6.24 m6.42 m7.68 m9.20 m10.65 m12.04 mPSO7.85 m8.48 m8.05 m8.68 m10.44 m11.48 m12.97 mABC16.23 m16.55 m19.91 m23.07 m23.80 m25.78 m27.99 mMSA10.40 m10.88 m10.58 m11.50 m13.29 m13.13 m15.13 mFigure 6
Localization error of WSN with different numbers of anchor nodes in 3D terrain.Generally, the positioning error decreases as the number of anchor nodes increases, but when the number of anchor nodes is greater than 35, a special situation occurs in the traditional DV-Hop. Excessive location information causes trouble to the traditional DV-Hop and reduces the accuracy of positioning. DV-Hop combined with intelligent computing algorithm, especially combined with RBH algorithm, can adapt to any conditions, and no matter the number of anchor nodes, the simulation results are equally excellent.


## 5.2.3. Localization Error of WSN with Different Communication Radii in 3D Terrain

The communication radius of the sensor node can determine the anchor node that provides location information to how many sensor nodes. So, the value of communication radius of sensor nodes is a important factor for simulation results. We install the communication radius as 14, 18, 22, 26, 30, 34, and 38 to test the performance of different localization algorithms. There are 300 sensor nodes and 30 anchor nodes in this experiment, and the simulation results are presented in Table4 and Figure 7.Table 4
Localization error of WSN with different communication radii in 3D terrain.
AlgorithmCommunication radius14 m18 m22 m26 m30 m34 m38 mDV-hop59.32 m49.05 m50.04 m67.02 m74.02 m83.01 m83.06 mGA7.10 m8.05 m7.72 m8.88 m10.31 m11.40 m13.14 mWOA6.15 m6.47 m6.64 m7.77 m9.16 m10.86 m12.25 mBH6.05 m6.40 m6.64 m7.74 m9.31 m10.72 m12.21 mRBH6.04 m6.24 m6.42 m7.68 m9.20 m10.65 m12.04 mPSO7.85 m8.48 m8.05 m8.68 m10.44 m11.48 m12.97 mABC16.23 m16.55 m19.91 m23.07 m23.80 m25.78 m27.99 mMSA10.40 m10.88 m10.58 m11.50 m13.29 m13.13 m15.13 mFigure 7
Localization error of WSN with different communication radii in 3D terrain.From this table, we can see the influence of the communication radius on the experimental results. Different from what we originally envisioned, the increase of communication radius would increase the localization error of WSN. And without exception, all localization algorithms show this feature. The novel algorithm gets the best result at each experiment except communication radius is 30.


## 6. Conclusion

In this paper, a novel algorithm is proposed, which utilizes a rotated optimal path to greatly improve the optimal ability of the original BH algorithm, especially in multimodal problems and composition problems. The CEC 2013 test suits show that the novel algorithm has outstanding global search ability; so, the novel algorithm can easily avoid local optimal value. In addition, this paper uses a new algorithm to optimize the position of the unknown node based on the DV-Hop positioning method, thereby reducing the error of the position estimation of the unknown node. The experiments in this paper have performed simulation experiments on the number of nodes, the number of anchor nodes, and the communication radius, respectively, and all prove that the new algorithm has a good effect on the localization problem of WSN in 3D terrain.



---

*Source: 9255810-2021-10-11.xml*