Abstract
Node localization information plays an important role in wireless sensor networks (WSNs). To solve the problem of low localization accuracy of distance vector hop (DVHop) localization algorithm in wireless sensor networks, an improved localization algorithm called MAOADVHop based on the modified Archimedes optimization algorithm (MAOA) and DVHop is proposed, which can achieve the balance between the localization speed and the localization precision. Firstly, tent chaotic mapping and particle swarm optimization (PSO) algorithm are introduced into Archimedes optimization algorithm to improve the initial population diversity and change the update rules of density and volume, which improve the global convergence ability and convergence speed of the algorithm. Secondly, the MAOA is used to replace the least square part of the DVHop localization algorithm to improve the localization accuracy of the algorithm. Finally, MAOADVHop is verified through four different network environments and compared with DE_DVHop, BOA_DVHop, and DVHop. The simulation results show that the localization speed of the proposed approach is faster than that of DE_DVHop and BOA_DVHop, and the localization error is less than that of DVHop, DE_DVHop, and BOA_DVHop.
1. Introduction
Wireless sensor networks (WSNs) consist of a number of static or mobile sensors in selforganizing and multihop manner, aimed at sending the information detected and processed by the sensor nodes in the coverage area of the network to the users [1, 2]. WSNs integrates MEMS, sensor technology with network communication technology [3] and is widely used in agriculture [4], military [5], environmental protection [6], intelligent transportation [7, 8], and other fields. It has been the focus and highlight of international competition because of the focuses of Industry and Academia [9, 10].
Because the location information of nodes plays an important role in the working process of WSNs [11], localization is an indispensable basic technology [12]. Although the current GPS localization system can accurately locate the target, it is difficult to use satellite positioning information for accurately locating the target in some special places [13, 14]. Therefore, it is very meaningful and challenging work to study the accurate localization algorithm for WSNs.
The rest of this paper is organized as follows: In Section 2, we describe the localization algorithms in WSNs and the main contributions of our work. In Section 3, we improve the Archimedes optimization algorithm (AOA) and compared with the other algorithms. In Section 4, the MAOADVHop localization algorithm is proposed and the the experimental simulation comparison is carried out to verify the performance of the localization algorithm. Finally, we summarize the work of this paper and describe the future work in Section 5.
2. Literature Review
Node localization algorithms in WSNs are mainly divided into rangebased localization algorithm and rangefree localization algorithm [15]. The rangebased localization algorithm mainly included RSSI [16], TOA [17], TDOA [18], and angle of arrival (AOA) [19]. The rangefree localization algorithm included centroid [20], weighted centroid, DVHop, amorphous [21], and APIT localization algorithm [22]. The position accuracy of rangefree localization algorithm can satisfy most of the needs, which is popular among users [23].
The DVHop localization algorithm is one of the most famous rangefree localization algorithms in WSNs [24–26] due to its high robustness and simplicity. But, the DVHop algorithm has a lower localization accuracy in complex environment. Thus, many improved DVHop algorithms have been proposed in recent years.
Messous et al. proposed an improved recursive DVHop localization algorithm for randomly deployed wireless sensor networks, which uses an optimization formula to calculate the average hop count of anchor nodes to obtain better localization accuracy [27]. Shi et al. proposed an improved DVHop scheme based on path matching and particle swarm optimization algorithm, which uses an improved particle swarm optimization algorithm to optimize the location of unknown nodes [28]. Han et al. proposed an improved localization algorithm based on the improved DVHop and differential evolution (DE) algorithm in 2020 [29]. Huang and Zhang proposed a weighted DVHop localization algorithm for wireless sensor networks based on DE algorithm [30]. Lei et al. proposed DVHop localization based on the improved sparrow search algorithm (SSA) in wireless sensor networks in 2020, using the double communication radius method to improve DVHop and the improved sparrow search algorithm to estimate the location of nodes [31]. Huang et al. proposed a threedimensional localization algorithm for WSNs based on improved A and DVHop algorithms [32]. Han et al. proposed a multitarget vector hopping localization algorithm based on differential evolution quantum particle swarm optimization [33].
AOA is an algorithm with fast convergence speed and good global convergence ability [34], but its performance of the global convergence speed can be improved. Thus, a modified AOA (MAOA) with better global convergence ability is proposed. And the MAOA is used to improve the performance of the DVHop algorithm, that is, the MAOADVHop algorithm.
The main contributions of our work in this paper can be summarized as follows.
The Archimedes algorithm is optimized. Firstly, tent chaotic map is introduced into AOA to increase the diversity of the initial population of the algorithm. Secondly, the concepts of social learning and individual cognition in PSO are introduced to update the iterative equations of density and volume in AOA. It accelerates the convergence of density and volume to enhance the convergence speed of the algorithm.
MAOA is tested on several test functions and compared with AOA, DE, butterfly optimization algorithm (BOA) [35], PSO, and marine predator algorithm (MPA). The performance of the improved MAOA is verified.
The paper proposed a WSN localization algorithm based on MAOA and the DVHop algorithm (MAOADVHop). Compared with DVHop, DE_DVHop, and BOA_DVHop, the MAOADVHop has better convergence rate than that of DE_DVHop and BOA_DVHop and has better localization accuracy than that of the DVHop and BOA_DVHop.
3. AOA and MAOA
In this section, Section 3.1 introduces the entire optimization process of AOA. Section 3.2 improves AOA by using the tent chaotic map and the concepts of social learning and individual cognition in PSO, and MAOA is proposed. Section 3.3 verifies the performance of MAOA by comparing with five swarm intelligence optimization algorithms.
3.1. Archimedes Optimization Algorithm
AOA is a metaheuristic algorithm inspired by Archimedes’ principle. Like other populationbased metaheuristic algorithms, AOA begins its searching process through an initial population with random volume, density, and acceleration. The steps of the algorithm are as follows.
Step 1. Initialize population position, volume, density, and acceleration using where denotes the object in population. and , respectively, denote population number and dimensions of the search space. and are the lower and upper bounds of the search space, respectively. denote volume, density, and acceleration of the object, respectively. is a dimensional matrix, which can be randomly calculated by the system function. Then, the individual with the best fitness value and the corresponding , , and were selected.
Step 2. Update the density and volume of iteration of th object using where , respectively, are the global optimal value of density and volume so far.
Step 3. Calculate the parameter and the density decline factor , which are used to balance the local convergence ability and global convergence ability of MAOA. where is maxiterations and is the current iterations. increases with the number of iterations until . where decreases as the number of iterations increases, and the search is transferred to the bounded region that has been identified.
Step 4. If , the phase is exploration phase and collision between objects occurs. Update acceleration using where denote the acceleration, density, and volume of the individual in the iteration, respectively. denote the acceleration, density, and volume of random individuals, respectively.
If , the phase is exploitation phase and no collision between objects. Update acceleration using
Then, normalize the acceleration using
where are the range of normalization and set to 0.9 and 0.1, respectively. denotes the percentage of steps that each agent will change. If the object is far away from global optimum, the value will be high which means that the object is in the exploration phase.
Step 5. If , update the population position using where is a constant equal to 2. Otherwise, if , update the population position using where is a constant equal to 6. , increases with time. is a parameter that changes the direction of motion, calculated using where are used to balance the movement direction of the population to adjust the ability of the algorithm to jump out of the local optimization.
Step 6. Evaluation. Select the individuals with the best fitness and their acceleration, density, and volume based on the updated population. Then, the algorithm proceeds to the next iteration until the iteration reach the maxiterations.
3.2. The Improvement of Archimedes Optimization Algorithm
3.2.1. Tent Chaotic Mapping
Tent chaotic map can improve the population diversity to strength the global search ability of the algorithm [36]. The mathematical expression is shown in
where is the chaos factor, and in here. is the dimension of population.
3.2.2. The Modified Archimedes Optimization Algorithm (MAOA)
Firstly, the paper introduces tent chaotic map into the population initialization phase of AOA. Secondly, referring the concepts of social learning and individual perception in PSO to optimize the density and volume formula of AOA, the paper proposed the MAOA. The steps of MAOA are as follows:
Step 1: initialization. initialize the positions of all objects using
where is the dimension of population and is the number of the population. The and are the lower and upper bounds of the search space, respectively.
Initialize density (), volume (), and acceleration () for the object using
Initialize the optimal position () and corresponding fitness () for the object using
Then, and corresponding to and are selected in the initialized population.
Step 2: update the density and volume of population using
where is the current iteration and represent individual cognitive coefficients and social learning coefficient, respectively. If , there is no individual cognition and the convergence speed of the algorithm is fast but fall into local optimization easily. Step 3, step 4, and step 5 are all same as AOA. After the threestep update iteration, a new population is obtained.
Step 6: evaluate each object using fitness of objective function and remember the best solution found so far. Update the current optimal position of each object and the corresponding . Then, update the global optimal individual and corresponding , and .
3.3. Algorithm Simulation Analysis
In this section, we compared the performance of MAOA with five algorithms, including AOA, BOA, PSO, DE, and MPA by 13 test functions. The global convergence ability and convergence speed of the proposed MAOA are analyzed to verify the optimization ability.
Simulation platform: Windows 10 system using Intel (R) Core (TM) i510210U CPU @16 G RAM, and MATLAB 2018b.
3.3.1. Parameter Setting of MAOA
In the improved algorithm, the parameters including need to be set. According to the analysis of AOA algorithm in reference [23], we choose . The sensitivity of the other four parameters of MAOA is analyzed by unimodal function and multimodal test function .
Setting the parameter and , the test results are shown in Table 1. It is obvious from the test results in Table 1 that the performance of MAOA is the best while .
3.3.2. MAOA Convergence Analysis
We compared the proposed algorithm with AOA, BOA, PSO, DE, and MPA through 13 test functions. The test functions are shown in Table 2, including seven unimodal functions, and six multimodal functions, The dimensions of the test function are all set to 30. To avoid the error resulted by accidental factors, the average value of the results of 100 runs of each algorithm is used to measure the optimization performance of each algorithm. The parameters of each algorithm are shown in Table 3, and the test results are shown in Table 4.
In Table 4, the ‘Mean’ represents the average value of the optimization results and the ‘Std’ represents the standard deviation of the optimization results, and the blackened one is the minimum value. Compared with other algorithms, MAOA outperformed other metaheuristic algorithms for 11 functions including In the process of 100 tests, the standard deviation of the test result of MAOA algorithm is relatively small. This indicates that the stably global convergence ability of the algorithm, so the improvement of AOA is effective and MAOA has better global convergence ability than others.
3.3.3. Complexity Analysis of Algorithm
(1)Complexity analysis of AOA
The time complexity of AOA is given as follows: Assuming that the population size is , the dimension of search space is , and the maximum iteration is . The population density, volume, acceleration, and initialization complexity are all , the fitness value of calculation complexity is . The exploration and exploitation phases update complexity are . To sum up, the time complexity of the whole algorithm is expressed as (2)Complexity analysis of MAOA
The time complexity of MAOA is given as follows: the population, density, volume, , and acceleration initialization complexity are all , and the fitness value of calculation complexity is . The exploration and exploitation phases update complexity are . To sum up, the time complexity of the whole algorithm is expressed as
From Equations (16) and (17), compared with the time complexity of AOA, the time complexity of MAOA only increases . (3)Complexity contrast between AOA and MAOA
AOA and MAOA were optimized over 13 test functions for 30 times, and the total time and the average time per run were compared, and the results are shown in Table 5.
In Table 5, the unit of all data is seconds. The results are shown as follows: the total time of MAOA is longer than that of AOA about 0.115 seconds, and the average time per run of MAOA is longer than that of AOA about seconds. Therefore, the time complexity of MAOA increased is not obvious, compared with that of AOA.
4. MAOADVHop Algorithm
4.1. The Node Localization Algorithm
In this section, an improved localization algorithm, MAOADVHop, is proposed by introducing MAOA into DVHop. The step of the algorithm is shown as follows.
Step 1. Flooding. All anchor nodes broadcast data packets from their locations to their neighbors, and those neighbors of the receiving packet send the new packet to the other neighbors. Finally, we can gain the minimum hop count between every anchor node and every unknown node.
Step 2. Distance estimation between nodes. Equation (18) is used to calculate the average distance per hop: where , and are the location of anchor node and , respectively. denotes the value of minimum hopcount between anchor nodes and . Then, Equation (19) is used to calculate the estimated distance between the anchor node and the unknown node . where denotes the value of minimum hop count between unknown node and the anchor node .
Step 3. It uses MAOA to search the optimal solution of fitness , where represents the estimated location of unknown node and represents the actual location of unknown node . is the number of the anchor node. The estimated position corresponding to the optimal solution is the localization of the unknown node.
The pseudocode of MAOADVHop is shown in Algorithm 1.

4.2. Experimental Results
In this section, the simulation is carried out in the square area and Cshaped area of deploying sensor nodes by random or uniform. The Cshaped area is formed by digging out a rectangular area of in the square area. MAOADVHop is used to estimate the location of the unknown node. The simulation results are shown in Figure 1.
(a)
(b)
(c)
(d)
In Figure 1, the red ‘’ represents the anchor node. The blue ‘○’ represents the estimated location of the unknown nodes. The blue line connects the estimated location and the actual location of the same unknown node and its length is the localization error size. Only considered 2D coordinate planes, all experimental results were run independently for 100 times to calculate the average value. It uses the average localization error (ALE) to measure the localization accuracy.
where and represent the estimate location and the actual location of the unknown node , is the number of unknown nodes, and is the communication radius between nodes.
4.3. Localization Algorithm Analysis
4.3.1. Compared with Different Algorithms
We compared the localization error with DVHop, DE_DVHop, BOA_DVHop, and MAOADVHop in order to measure the performance of the proposed localization algorithm. The parameter settings of MAOADVHop, DE_DVHop, and BOA_DVHop are shown in Tables 6–8.
Experimental analysis is carried out under four different simulation conditions: square random deployment, square uniform deployment, Cshaped random steps, and Cshaped uniform deployment to prove the localization accuracy and convergence speed of the proposed algorithm. The experimental results are shown in Figures 2 and 3.
(a)
(b)
(c)
(d)
From Figures 2 and 3, the average localization error of MAOADVHop is 35% to 71% lower than DVHop and is 3% to 7% lower than BOA_DVHop. The convergence rate of MAOADVHop is faster than both DEDVHop and BOA_DVHop. The localization error curve of MAOADVHop in the four scenarios is relatively smooth, tends to be horizontal after just several iterations, and has a good capability of global optimization. DE_DVHop fell into the local optimal value in a short period of time after 25 iterations. Therefore, the localization performance of MAOADVHop is better than the other three localization algorithms.
4.3.2. Effect of Node Density, Anchor Rate, and Communication Radius on ALE
(1)The effect of node density on ALE
In this section, the experimental area is a square area and the percentage of anchor nodes is 20%. The number of square topology deployment nodes is 80 to 200 and the communication radius is 20 m. Experimental results are shown in Figure 4.
From Figure 4, with the increasing in the number of deployed nodes, the ALES of four localization algorithms are all decreased. Because of the increase in the number of nodes, the connectivity of the network is enhanced, and the estimation distance error between unknown nodes and anchor nodes is reduced. Therefore, the localization accuracy is stronger. (2)The effect of anchor rate on ALE
In this section, the experimental area is a square area and the percentage of anchor nodes is 15% to 35%. The number of square topology deployment nodes is 100, and the communication radius is 20 m. Experimental results are shown in Figure 5.
From Figure 5, with the increasing ratio of anchor nodes, the ALE of four localization algorithms is all decreased. Because of the increasing ratio of anchor nodes, the accuracy of the average distance per hop of the anchor nodes is higher. The estimated distances between the anchor nodes and the unknown nodes are closer to the real distance. And the increase of the number of anchors provides more conditions for the metaheuristic algorithm, so it can estimate the location of unknown nodes more accurately. (3)The effect of communication radius on ALE
In this section, the experimental area is a m square area and the percentage of anchor nodes is 20%. The number of the square topology deployment nodes is 100, and the communication radius is 15 m to 45 m. Experimental results are shown in Figure 6.
In Figure 6, with the increase of communication radius, the ALE of the four localization algorithms decreased. More nodes can communicate in a singlehop way, which reduces the hop value between unknown nodes and anchor points because of the bigger communication radius. The distance between the unknown node and the anchor point is estimated more accurately. And the estimated location of unknown nodes is more close real location. In addition, the localization error of MAOADVHop is the smallest in the four algorithms although communication radius is different.
4.3.3. Timing of Localization
In this section, we analyze the CPU time required of the four localization algorithms. The WSN parameter settings are shown in Table 9. DE_DVHop, BOA_DVHop, DVHop, and MAOADVHop are used to locate the unknown nodes. The CPU time required of each algorithm is shown in Figure 7.
From Figure 7, it is obvious that the time by DVHop is the shortest with 0.4793 seconds, followed by the time used by MAOADVHop, which is 0.9609 seconds. The time required by DE_DVHop and BOA_DVHop is longer, which is about 4 times of DVHop and twice of MAOADVHop. Although the time of DVHop is shorter than MAOADVHop, the localization accuracy of MAOADVHop is much higher than that of DVHop. Therefore, MAOADVHop is the best way to locate unknown nodes in the four localization algorithms.
5. Conclusions and Future Work
5.1. Conclusions
(1)In this paper, a modified Archimedes optimization algorithm (MAOA) is proposed, and seven unimodal functions and six multimodal functions are used to test the convergence speed and the optimization ability of the algorithm. The test results show that the convergence and optimization ability of the MAOA is better than AOA, DE, BOA, PSO, and MPA(2)The paper proposes a localization algorithm based on MAOA and DVHop, called MAOADVHop. The simulation results show that the localization effect of MAOADVHop is better than that of DE_DVHop, BOA_DVHop, and DVHop, such as better localization accuracy and faster speed
5.2. Future Work
This paper only discusses the application of node localization based on the twodimensional plane in WSNs. These factors associated with WSNs that need futuristic attention are listed as follows. (1)More complex spaces: the future work will focus on the study of localization in the threedimensional WSNs(2)Energy consumption: the future work should integrate the routing algorithm with localization in order to reduce the energy consumption, which is helpful of extending the lifetime of WSNs
Data Availability
The simulation program used to support the findings of this study have been deposited in the GitHub repository (https://chengmang1.github.io/data2/).
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
The authors are grateful for the support provided by the Guizhou Provincial Key Laboratory of Internet+Intelligent Manufacturing, Guiyang 550025, China. This work is supported by the National Natural Science Foundation of China (under Grant Nos. 61640014 and 61963009), Innovation group of Guizhou Education Department (No. Qianjiaohe KY[2021]012), Industrial Project of Guizhou province (Grant No. Qiankehe Zhicheng [2022]Yiban017, [2019]2152), Science and Technology Fund of Guizhou Province (No. Qiankehejichu [2020]1Y266), Plan of Guizhou province QiankehePingtai (No. (2017) 5788), and the platform of IOT personnel from Guiyang high technology industry development zone under Grant 2015, postgraduate case library (under Grant No. KCALK201708).