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 (DV-Hop) localization algorithm in wireless sensor networks, an improved localization algorithm called MAOADV-Hop based on the modified Archimedes optimization algorithm (MAOA) and DV-Hop 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 DV-Hop localization algorithm to improve the localization accuracy of the algorithm. Finally, MAOADV-Hop is verified through four different network environments and compared with DE_DV-Hop, BOA_DV-Hop, and DV-Hop. The simulation results show that the localization speed of the proposed approach is faster than that of DE_DV-Hop and BOA_DV-Hop, and the localization error is less than that of DV-Hop, DE_DV-Hop, and BOA_DV-Hop.

1. Introduction

Wireless sensor networks (WSNs) consist of a number of static or mobile sensors in self-organizing 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 MAOADV-Hop 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 range-based localization algorithm and range-free localization algorithm [15]. The range-based localization algorithm mainly included RSSI [16], TOA [17], TDOA [18], and angle of arrival (AOA) [19]. The range-free localization algorithm included centroid [20], weighted centroid, DV-Hop, amorphous [21], and APIT localization algorithm [22]. The position accuracy of range-free localization algorithm can satisfy most of the needs, which is popular among users [23].

The DV-Hop localization algorithm is one of the most famous range-free localization algorithms in WSNs [2426] due to its high robustness and simplicity. But, the DV-Hop algorithm has a lower localization accuracy in complex environment. Thus, many improved DV-Hop algorithms have been proposed in recent years.

Messous et al. proposed an improved recursive DV-Hop 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 DV-Hop 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 DV-Hop and differential evolution (DE) algorithm in 2020 [29]. Huang and Zhang proposed a weighted DV-Hop localization algorithm for wireless sensor networks based on DE algorithm [30]. Lei et al. proposed DV-Hop localization based on the improved sparrow search algorithm (SSA) in wireless sensor networks in 2020, using the double communication radius method to improve DV-Hop and the improved sparrow search algorithm to estimate the location of nodes [31]. Huang et al. proposed a three-dimensional localization algorithm for WSNs based on improved A and DV-Hop 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 DV-Hop algorithm, that is, the MAOADV-Hop 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 DV-Hop algorithm (MAOADV-Hop). Compared with DV-Hop, DE_DV-Hop, and BOA_DV-Hop, the MAOADV-Hop has better convergence rate than that of DE_DV-Hop and BOA_DV-Hop and has better localization accuracy than that of the DV-Hop and BOA_DV-Hop.

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 population-based 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 max-iterations 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 max-iterations.

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 three-step 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) i5-10210U 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. MAOADV-Hop Algorithm

4.1. The Node Localization Algorithm

In this section, an improved localization algorithm, MAOADV-Hop, is proposed by introducing MAOA into DV-Hop. 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 hop-count 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 MAOADV-Hop is shown in Algorithm 1.

1: Procedure MAOADV-Hop;
2: Initialization: total number of nodes , percentage of anchor nodes, communication radius ;
3: Network deployment nodes to generate simulated
network topology;
4:  Calculate the hop-count value according to the shortest path algorithm;
5: for to
6:   for to
7:     for to
8:       if short_path()+short_path()<short_path();
9:        short_path()=short_path()+short_path();
10:             end
11:            end
12:          end
13: end
14:  Calculate the average distance Hop-size of each hop using Equation (18);
15:  Calculate the estimated distance from the anchor node to the unknown node using Equation (19);
16:  Initialize the parameters at the population level of MAOA algorithm using (12)─(14);
17: for : Max_iter
18:  Calculate using Equation (3) and calculate density decline coefficient using Equation (4);
19:  for
20:   Update and using Equation (15);
21:   if
22:      Update using Equation (5) and calculate using Equation (8);
23:   else
24:    Update using Equation (6) and calculate using Equation (9);
25:   end
26: Apply boundary constraints to and calculate the fitness of ;
27: The optimal position of each object is selected and assigned to , and the corresponding fitness is assigned to;
28:  Select the best fitness minimum value, the corresponding position ;
29: end
30:  The best individual is the location of the unknown node.
31: end
4.2. Experimental Results

In this section, the simulation is carried out in the square area and C-shaped area of deploying sensor nodes by random or uniform. The C-shaped area is formed by digging out a rectangular area of in the square area. MAOADV-Hop is used to estimate the location of the unknown node. The simulation results are shown in Figure 1.

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 DV-Hop, DE_DV-Hop, BOA_DV-Hop, and MAOADV-Hop in order to measure the performance of the proposed localization algorithm. The parameter settings of MAOADV-Hop, DE_DV-Hop, and BOA_DV-Hop are shown in Tables 68.

Experimental analysis is carried out under four different simulation conditions: square random deployment, square uniform deployment, C-shaped random steps, and C-shaped uniform deployment to prove the localization accuracy and convergence speed of the proposed algorithm. The experimental results are shown in Figures 2 and 3.

From Figures 2 and 3, the average localization error of MAOADV-Hop is 35% to 71% lower than DV-Hop and is 3% to 7% lower than BOA_DV-Hop. The convergence rate of MAOADV-Hop is faster than both DE-DV-Hop and BOA_DV-Hop. The localization error curve of MAOADV-Hop in the four scenarios is relatively smooth, tends to be horizontal after just several iterations, and has a good capability of global optimization. DE_DV-Hop fell into the local optimal value in a short period of time after 25 iterations. Therefore, the localization performance of MAOADV-Hop 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 single-hop 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 MAOADV-Hop 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_DV-Hop, BOA_DV-Hop, DV-Hop, and MAOADV-Hop 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 DV-Hop is the shortest with 0.4793 seconds, followed by the time used by MAOADV-Hop, which is 0.9609 seconds. The time required by DE_DV-Hop and BOA_DV-Hop is longer, which is about 4 times of DV-Hop and twice of MAOADV-Hop. Although the time of DV-Hop is shorter than MAOADV-Hop, the localization accuracy of MAOADV-Hop is much higher than that of DV-Hop. Therefore, MAOADV-Hop 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 DV-Hop, called MAOADV-Hop. The simulation results show that the localization effect of MAOADV-Hop is better than that of DE_DV-Hop, BOA_DV-Hop, and DV-Hop, such as better localization accuracy and faster speed

5.2. Future Work

This paper only discusses the application of node localization based on the two-dimensional 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 three-dimensional 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 Qiankehe-Pingtai (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).