To validate the LMQPDV-hop, we compared it to some classic rang-free localization algorithms (i.e., such as DV-hop, Centroid, and Grid_Scan) along with the localization algorithms based on SIAs (i.e., WPDV-hop [
16], PSOPF [
17], CuckooDV-hop [
28] and MMQPDV-hop [
27]) in terms of location errors and convergence speeds. To comprehensively evaluate the new localization algorithm, we arranged two groups of experiments and two groups of simulations: Experiment 1 was conducted to compare the proposed LMQPSO to other SIAs used by the other SIA based algorithms on four internationally recognized standard benchmark functions (dimensions are 30). For comparison, four other SIAs were used, namely, PSO1 used by WPDV-Hop, PSO2 used by PFPSO, CS used by CuckooDV-hop, and MMQPSO used by MMQPDV-hop. Experiment 2 was performed to evaluate the convergence speed of the above 5 SIAs when they are applied to WSNs. To make a fair comparison in this experiment, we used the same fitness function (i.e., Equation (31)) on the same WSN topology (WSN#1 with 60 anchors). Simulation 1 WAS carried out to evaluate the effect of the number of anchor and the communication range on location error. In Simulation 1, LMQPDV-hop was compared to seven other well-known localization methods, namely DV-hop, Centroid, Grid_scan, WPDV-hop, PSOPF, CuckooDV-hop and MMQPDV-hop, in both the regular sensor area (WSN#1) and the irregular sensor area (WSN#2). In Simulation 2, we compared the localization results of all these eight localization methods used in Simulation 1. In this simulation, the anchor proportion was 30% and the communication range was set to 250.
It is worth noting that in Simulation 1 and Simulation 2, different numbers of anchors in WSN#1 and WSN#2 signifies different WSN topologies, in which the new number of anchors and unknown nodes need to be randomly re-deployed. This is because the total number of all nodes is fixed in the same WSN, and thus the new anchor number also indicates a new unknown node number, which, in turn, means a new network deployment. For this reason, each different anchor number on the x axis in Figures 7–18 actually represents a different WSN topology.
In order to reduce statistical errors in these experiments and simulations, each algorithm was tested independently multiple times and the mean value (Mean), the standard deviations (SD) in all the runs were calculated as the statistics for the performance measures. The Mean represents the global convergence of the algorithm, and the SD represents the stability of the algorithms.
All the experiments and simulations were done in Matlab platform on Win 7 with Intel core i3-2100 Dual-Core CPU (3.10 GHz) and 4 GB RAM.
6.1. Experiment 1
We conducted several experiments to evaluate the performance of LMQPSO and compare it to other optimal algorithms.
Firstly, four well-known test functions were used to evaluate LMQPSO, which have been widely adopted in benchmarking optimization algorithms, namely Sphere, Rastrigin, Rosenbrock, and Griewank, and their detailed information is as follows:
- (1)
Sphere
- (2)
Rastrigin
- (3)
Rosenbrock
- (4)
Griewank
Among these functions, both Sphere and Rosenbrock are unimodal functions, which are used to evaluate the solution quality and convergence speed of the optimization algorithm. Rastrigin and Griewank are both multimodal functions which are used to test the global searching ability of optimization algorithm.
The parameters used for this test were: Function dimension D = 30, number of iterations
PGen = 3000. The simulation results in
Figure 5a–c illustrate the evolution of the optimal fitness of these algorithms.
For
f1 (Sphere),
Figure 5a,b show that the search improvement of the LMQPSO was the best one. LMQPSO performed best and consistently provided the global result, whereas nothing else could achieve that. The LMQPSO demonstrated the best performance.
For
f2 (Rastrigin), as illustrated in
Figure 5c,d, although both LMQPSO and MMQPSO can find the global solution, LMQPSO has a faster convergence speed. In other words, LMQPSO still had the best performance.
The best performance on f1 and f2 demonstrates that LMQPSO had good exploration and exploitation capabilities, yet fast convergence. The main contributions were our wonderful algorithm’s framework, the particle update rule and the fast search rule.
f3 (Rosenbrock) is unimodal in a search space, but it can be treated as a multimodal function in high-dimensional cases. It is difficult for
f3 to achieve global optimum. As
Figure 5e shows, none of these optimization algorithms can find the global solution. As shown in
Table 2, although CS achieved the best result among these competitive algorithms, the difference between CS and LMQPSO is not obvious. However, as can be seen from
Figure 5f, LMQPSO had the fastest convergence speed and the converge speed was much faster than CS. The rapid convergence of LMQPSO is mainly due to our new fast search rule.
f4 (Griewank) is a rotated multimodal function. It can be used to test the capability of exploring global optimal solution of proposed algorithms. As shown in
Figure 5g and
Table 2, both MMQPSO and LMQPSO can achieve the global optimum.
Figure 5h shows that LMQPSO achieved better value than MMPSO in each iteration. In addition,
Figure 5h also illustrates that LMQPSO slightly led to local minimum solution (iteration between 20 and 35), but the Lévy flight and MA mechanism can help it jump out the local optimum quickly.
Figure 5g,h demonstrate that LMQPSO is the fastest to find the global optimum, which means that LMQPSO can overcome the shortcomings of converging to the local optimum and improve the global search ability.
Table 2 shows the global mean values and the standard deviation of the five solutions during 10 rounds experiments. It can be observed that LMQPSO almost achieved the best solution on all functions excluding
. These comparisons confirm that the improvements we made to the original QPSO, which include the introduction of MA and Lévy flight mechanism, designing the fast search rule, indeed made LMQPSO perform better than other SIAs in most of the test functions. The reason is that our improvements offered LMQPSO the ability of avoiding local optima and sped-up the convergence. More specifically, this is due to our improvements’ contribution to the capability improvement of diversity and jumping out of likely local optima.
6.3. Simulation 1
In this simulation, the number of anchor was set to the following values: 10, 20, 30, 20, 40, 50, 60, 70, 80. R was fixed to 300.
Figure 7,
Figure 8,
Figure 9,
Figure 10,
Figure 11,
Figure 12,
Figure 13,
Figure 14,
Figure 15 and
Figure 16 illustrate the effect of the number of anchors on the location error in eight localization schemes. These schemes, namely, LMQPDV-hop, MMQPDV-hop, CuckooDV-hop, PFDV-hop, WPDV-hop, DV-Hop Grid-scan and Centroid, were executed in WSN#1 and WSN#2.
Figure 17,
Figure 18,
Figure 19 and
Figure 20 illustrate the influences of the communication range and the number of anchor on the location error for only LMQPDV-hop.
Table 3 and
Table 4 give the average number of unresolved nodes (URN) for each localization scheme. In this case, a sensor node was unresolved sensor when its position could not be obtained using localization scheme.
For WNS#1, as shown in
Figure 7, with the increase of the number of anchor, the location error curves of these schemes appear to gradually decline, except DV-hop and Centroid. The curves of DV-hop and Centroid appear to randomly fluctuate as the anchor number increased and the location error with the bigger number of anchors in these two curves was even larger than that with the smaller number. This is because the localization result of these two schemes depends heavily on the coordinates of the anchors rather than the number of anchors. When the coordinates of the anchors around an unknown node changed in these two schemes, the localization result of unknown node was changed immediately. However, in this simulation, a different number of anchors mean different random coordinates of anchors. In other words, the localization results of DV-hop and Centroid were changed at any time as the number of anchor changed. Moreover, a different number of anchors also mean different network topology. If some very unsatisfactory topologies are met unluckily by these two schemes, their location error maybe lead to an unreasonable phenomenon, that is, a larger number of anchors leads to a larger location error. Therefore, the curves in
Figure 7 and
Figure 8 appear to randomly jitter as the number of anchor increases. For the other localization schemes, the localization results depend not only on the coordinates of anchors, but also on the number of anchors. Thus, the curves in
Figure 7 and
Figure 8 show an overall decline along with the increasing number of anchors.
Among all these schemes, the location error of LMQPDV-hop was the smallest, and the fluctuation amplitude of its curve was also the smallest, which indicates that LMQPDV-hop had the best results and robustness.
For the irregular WSN scenario (WSN#2), the comparison results are shown in
Figure 8. First, the location error of each scheme was significantly larger than that in WSN#1. Second, similar to WSN#1, the location error of LMQPDV-hop was still the smallest. Unlike WSN#1, the two non-SIA based methods (Grid-scan and Centroid) were ranked second and third. Unexpectedly, the location error of MMQPDV-hop was the largest. After more careful inspection, the non-SIA-based schemes had better localization accuracy than the SIA-based ones, except for LMQPDV-hop. This phenomenon can also be considered, as non-DV-hop-based schemes perform better than DV-hop-based ones, except for LMQPDV-hop. The main reason is that for DV-hop-based (or SIA-based) schemes, the C-shape non-deployment area created a huge error when calculating the average hop distance of the anchors. Here, the non-deployment area means that there was no communication between the two anchors in the area, i.e., the distance between the two anchors can be considered as infinite. The error of the average hop distance resulted in the error of the estimated distances calculated by Equation (24). Therefore, location error is generated when the estimated distance with the error is used to determinate the coordinate of an unknown node. In general, SIA-based schemes should have better localization result than least-squares-based one (used by DV-hop), but the MQPDV-hop is an exception. This is because MMQPSO, used by MQPDV-hop, prematurely fell into the local optimum during the process of optimization, and thus made its localization accuracy greater than DV-Hop. Besides, Centroid and Grid-Scan are anchor-intensive schemes, that is, the more anchors near the unknown node, the more accurate the localization results are.
For regular WSN#1, it can be seen from
Figure 9,
Figure 11,
Figure 13 and
Figure 15 that LMQPDV-hop achieved the highest localization accuracy with the same number of anchors regardless of the communication range. For the irregular WSN#2, it can be seen from
Figure 10,
Figure 12,
Figure 14 and
Figure 16 that LMQPDV-hop still kept the best performance except in the following two cases: R = 250 in
Figure 14, and R = 300 and the anchor proportion = 40% in
Figure 16.
Now we analyze the first case. As shown in
Figure 14, LMQPDV-hop had better localization accuracy than other DV-Hop-based methods (including DV-Hop), whereas compared to the non-DV-Hop-based ones (i.e., Centroid and Grid-Scan), LMQPDV-hop achieved the highest accuracy in half of these eight scenarios (i.e., 5%, 15%, 20%, and 30%). At the same time, we also made a horizontal comparison with WSN #1 in the same WSN scenario (i.e.,
Figure 13). The localization accuracy of LMQPDV-hop was significantly higher than that of the Centroid and Grid-Scan, which also means that the C-shape non-deployment area will greatly affect the optimization result of LMQPSO.
Figure 14 illustrates that LMQPDV-hop still outperformed others in most cases.
WSN #2, in other words, our new optimization algorithm LMQPSO still worked well in WSN#2. At the same time, we also noticed a detail in
Figure 14. In the scenarios where the localization accuracy of LMQPDV-hop was not dominant, the location errors of other DV-hop-based schemes also showed similar deviations trends for the LMQPDV-hop. The reason is that the topology was randomly generated during deployment, and the non-uniform deployment of anchors (e.g., far away from the C-shape non-deployment area) made the average distance hop larger, thereby affecting the optimization of localization results.
For the second case, the localization accuracy of our scheme was only not the highest when the anchor proportion was 40% (it was still the second highest). The most likely reason is that the LMQPSO in our scheme rarely fell into the local optimum and could not jump out, which means that our scheme could not find the best localization results.
Table 3 and
Table 4 show the scalability of all eight schemes in WSN#1 and WSN#2. As can be seen from
Table 3 and
Table 4, DV_hop-based schemes could find the coordinates of all the nodes in any case, regardless of their localization accuracy. But for non-DV-hop-based schemes (i.e., Centroid and Grid-scan), there were a certain number of unresolved nodes with small anchor proportions and communication ranges. Coincidentally, Centroid and Grid-scan had the same value of unresolved nodes, which indicates that these two schemes were essentially similar. Both
Table 3 and
Table 4 show that the number of URN decreased with the increase of anchor proportion and R, and the number of URN in WSN#2 was more serious than that in WSN#1.
More specifically, for WSN#1, when the anchor proportion ≤10% and R ≤ 250, Centroid and Grid-scan not only obtained the worst localization results, but also kept URNs. Obviously, an anchor proportion = 5% is better than an anchor proportion = 10%.
In contrast with WSN#1, for WSN#2, when anchor proportion were 5% and 10%, URNs existed in all the R values. Unlike WSN#1, even when anchor proportions increased to 15% and 20%, there were still URNs with R = 150. Notably, the number of URN with anchor proportion = 5% and R = 150 (i.e., 101) was almost half of all the nodes (i.e., 200). The main reason is that these URN could not find enough reference anchors because of the existence of the C-shap non-deployment area, especially for small number of anchor and R.
Now, let us study the influences of the following two factors, namely the communication rang and the number of anchors, on the localization result of LMQPDV-hop.
Figure 17 and
Figure 18 show the influence of the communication rang. It is important to note that for the same communication rang in WSN#1 and WSN#2, the location errors with different anchor proportions can not be used to compare, because they were not obtained in the same network topology.
For WSN#1, we can see from
Figure 17 that with the same anchor proportion, the longer the communication range is, the smaller the location error is. This is because a longer communication range means that an unknown node can find more anchors around it, which can improve the localization accuracy obviously.
For WSN#2,
Figure 18 also illustrates the same conclusion as
Figure 17, that is, that a longer communication range means a smaller location error. The main difference between them is that the location error in the regular WSN (i.e., WSN#1) was smaller than that in the irregular WSN (i.e., WSN#2), especially for R > 200. This is because the C-shape non-deployment area affected the average hop distance of anchor, which in turn affected the LMQPSO to find the optimized result.
Additionally, it should be noted that, as can be seen from
Figure 17 and
Figure 18, when the communication range of the node extended from 200 to 250, the localization accuracy was sharply improved. The reason is that when the communication range of nodes reaches or even exceeds 25% of the length of the sense target area, an unknown nodes can find enough anchors around it, which means a small error in the average hop distance and fewer hop counts. Both these factors can help the unknown node reduce the error in its estimated distances to anchors. And this, in turn, helped our localization scheme reduce the location error during our new LMQPSO optimization process. In addition, the location error with R = 300 seems to be only slightly smaller than R = 250 in WSN#1. The reason is that the number of anchors found by an unknown node may be sufficient when R = 250. However,
Figure 18 shows that in WSN#2, R = 300 had a larger advantage than R = 250. This is because the C-shape non-deployment area enhanced the effectiveness of the communication range as the communication range increased from 250 to 300.
Figure 19 and
Figure 20 show the influence of the number of anchors. Unlike
Figure 17 and
Figure 18, here, the anchors of WSN#1 and WSN#2 were chosen as follows: First, all the nodes were only randomly deployed once in WSN#1 and WSN#2. After deployment, each node is static and own its actual coordinate. Then, a certain number of nodes were randomly selected as anchors, and the rests acted as unknown nodes. In this way, the WSN topology of the first deployment remained the same throughout the selection process. All the anchor proportions in
Figure 19 and
Figure 20 were chosen randomly from the same WSN topology. Therefore, the location results for these different anchor proportions can be compared. As
Figure 19 and
Figure 20 show, the location errors in both WSN#1 and WSN#2 were decline as the anchor proportion increased, especially when the anchor proportion increased from 5% to 25%, the location error decreased sharply. This is because more anchors means a higher accuracy of the average hop distance and a fewer hop count, which can significantly reduce the error of the estimated distance from the unknown node to the anchors. Then, when these more accurate estimated distances were used to determinate the coordinates of the unknown nods, the location error could be reduced to improve the positioning accuracy.
At the same time, it also can be observed that the location errors in WSN#1 were smaller than that in WNS#2. The reason for this is that the C-shap non-deployment area affected the localization result.