Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Enhanced sparrow search algorithm with DV-Hop for high-precision fire sensor localization in underground spaces

Abstract

Fire monitoring in underground spaces is critical for emergency response, yet traditional localization methods like DV-Hop suffer from significant localization errors due to hop count ambiguity and premature convergence in optimization. To address these issues, we propose an Enhanced Sparrow Search Algorithm with Improved DV-Hop (ESSADV-Hop) method. The method incorporates a golden ratio-based communication radius division strategy to refine hop count granularity and an enhanced sparrow search algorithm with Gaussian perturbations to escape local optima. Experimental results show that ESSADV-Hop reduces the average localization error by 55.7% compared to DV-Hop (from 0.2910 to 0.1288) and outperforms other variants by 11.74%∼23.05% in accuracy, demonstrating its effectiveness for fire sensor localization in complex underground environments.

1 Introduction

Underground spaces in cities, such as subway stations, underground shopping centers, and parking lots, pose significant fire risks [1]. When a fire occurs, smoke spreads rapidly due to the complex structure of these buildings, making rescue operations more challenging [2]. Therefore, it is critical to choose the most appropriate technical approach for fire localization in underground spaces. Existing fire localization techniques primarily consist of range-based localization algorithms and range-free localization algorithms [3].

The range-based localization algorithms mainly include received signal strength indicator (RSSI) [4], time of arrival (TOA) [5], time difference of arrival (TDOA) [6], and angle of arrival (AOA) [7]. In addition, RSSI, TOA, and TDOA algorithms suffer from relatively large localization errors in complex environments due to signal propagation may be affected by other factors. In addition, the signal propagation of the AOA is difficult to control exactly in complex environments. At the same time, the localization error is defined as the normalized euclidean distance between estimated and actual node positions, which is normalized by communication radius.

The range-free localization algorithms mainly include center of gravity algorithm [8], convex programming algorithm [9], and DV-Hop algorithm [10]. Among these, DV-Hop is widely adopted due to its low power consumption and strong adaptability to heterogeneous environments [11]. At present, the improvement of DV-Hop is divided into two types. Improve the hop count or hop distance of DV-Hop to enhance the localization accuracy. For example, Li et al. [12] proposed a novel DV-Hop algorithm based on dual communication radius and used it for sensor node localization. Kaushik et al. [13] proposed a 3-D DV-Hop algorithm based on the information of nearby nodes and used it for sensor node localization. Cao et al. [14] proposed an improved DV-Hop localization algorithm based on nodes negotiation and multi communication radius. Mohanta et al. [15] proposed an orthogonal learning CTO-based DV-Hop localization algorithm for three-dimensional wireless sensor networks. Shi et al. [16] proposed an improved DV-Hop algorithm. The localization accuracy is improved by the swarm intelligence algorithm. Cui et al. [17] proposed a localization algorithm based on improved DV-Hop and DE. Zhou et al. [18] introduced bacterial foraging optimization to the DV-Hop, which achieved significantly higher positioning accuracy than the basic DV-Hop. OuYang et al. [19] proposed an improved adaptive genetic algorithm to handle the aforementioned problem and used a modified evaluation function to reduce the error of distance measurement in a topological structure. Peng et al. [20] proposed an adaptive chaotic slime mold algorithm to optimize node localization in wireless sensor networks. Fute et al. [21] proposed FPSOTS and RSSI methods to evaluate inter-sensor distances. Yu et al. [22] proposed a gray wolf localization algorithm based on beetle antennae search.

Although the DV-Hop has been successfully applied in many fields, this method also suffers from the problem of low localization accuracy. According to the characteristics of node localization optimization problem for fire monitoring, we propose an improved DV-Hop algorithm (IDV-Hop) based on enhanced sparrow search algorithm (ESSADV-Hop). The method mainly includes three key points.

1) For fire sensor nodes in complex underground spaces, the DV-Hop roughly marks the hop count between the nodes as one hop when the nodes are within the communication radius, which results in a low localization accuracy of the nodes. Therefore, we use a golden ratio method to divide the communication radius of the fire sensor nodes to refine the hop counts between the nodes.

2) In order to further enhance the localization accuracy of fire-sensor nodes, we introduce an enhanced sparrow search algorithm (ESSA). Specifically, ESSA incorporates Gaussian perturbations with adaptive position updates to evade local optima and thus reduce node localization errors.

3) Finally, we first adopt the IDV-Hop to make a preliminary estimation of the fire sensor node position. The fire sensor node localizations are then passed to the ESSA algorithm. Then, the ESSA algorithm is used to further optimize the fire sensor node localization and calculate the position error. In addition, existing hybrid methods rely on fixed communication radius, failing to adaptively refine hop count resolution in complex underground space. On the contrary, ESSADV-Hop subdivides the communication radius and implements the correction of the hop count, which can effectively reduce the localization error.

Section 2 introduces the DV-Hop and sparrow search algorithm. In section 3, we analyze and improve the algorithm. Section 4 compares and analyzes the performance of the algorithms. Section 5 summarizes this work.

2 Algorithm introduction

2.1 DV-Hop algorithm

The traditional DV-Hop can be divided into three stages: determining the minimum hop count, calculating the average hop distance, and estimating the unknown node. The procedure for DV-Hop is as follows.

1) The beacon node broadcasts the data table containing its unique ID, position information, and initial hop count of 0 to other nodes in the communication range by flooding, and each node only saves the minimum hop count between other nodes around it.

2) After multiple floods, the anchor node obtains the minimum hop count and position information between the anchor node and other surrounding anchor nodes, and calculates the average hop distance Hopm according to Eq (1).

(1)

where and denote the positions of the anchor nodes m and n, respectively. The hmn denotes the minimum hop count between anchor nodes m and n. The Hopm is the average hop distance of anchor node m. Then, the estimated distance dum between the unknown node and the anchor node can be expressed as in Eq (2).

(2)

where dum denotes the estimated distance from the unknown node u to the anchor node m. The hum represents the minimum hop count from the unknown node u to the anchor node m.

3) The position of unknown node is calculated by the least square method.

2.2 Sparrow search algorithm

The sparrow search algorithm (SSA) is derived from the foraging and anti-predation behaviors of sparrow, which is composed of discoverers, followers, and watchers [23,24]. The discoverer is responsible for finding foraging areas and directions. The follower then uses the discoverer’s information to obtain food, and the watcher makes a safe judgment about the area where the sparrow population is located. Due to its faster convergence rate and higher solution accuracy, SSA has been applied to node localization optimization problems for fire monitoring to improve node localization accuracy.

Assuming that there exists a D-dimensional search space with N sparrows. The position of sparrow i at the t-th iteration represents a candidate solution (, , ), where T is the maximum number of iterations. In the SSA algorithm, the discoverer can guide the sparrow population to search for food sources according to Eq (3).

(3)

where is the new position of crow i at the -th iteration. The α and Q denote a random number. The L indicates a matrix of in which every element is 1, is warning value, and is the safe value. When R2<ST, it indicates that the feeding area of the sparrow is safe, and the current discover can expand the range to search for food. When , it indicates that the sparrow’s feeding area is not safe and they need quickly fly to a safe area.

Next, the follower obtains food from the information of the discoverer, and the position update formula is as follows Eq (4).

(4)

where is the worst position at the tth iteration, is the optimal position at the t + 1−th iteration, and the A +  represents a matrix of in which every element is 1 or -1. When , it indicates that the each sparrow is very hungry and needs to fly quickly to an area with abundant food.

Finally, the watcher makes safe judgments about the area of the sparrow population described in Eq (5).

(5)

where is the optimal position at the tth iteration. The β denotes the step size control parameter, is a random number, and fi represents a fitness value of sparrow i. The fg and fw are the current global optimal and worst fitness values, respectively. The τ is the smallest constant so as to avoid zero-division-error.

3 Analysis and improvement of algorithm

In this section, we analyze the error of the DV-Hop algorithm and propose an improved version called IDV-Hop. To further enhance the localization accuracy of fire nodes, we introduce the ESSA algorithm to optimize the IDV-Hop.

3.1 Error analysis of DV-Hop

In DV-Hop, all nodes within radius R are recorded as 1-hop regardless of actual distance (e.g., nodes B, C, D in Fig 1). This ignores distance variance, leading to inflated average hop-distance error. Our method resolves this via fractional hop counts.

As shown in Fig 1, assuming that the anchor node A communicates with nodes B, C, and D, the hop counts of node A with nodes B, C, and D are all 1. Moreover, the distances AB, AC, and AD differ so much that the actual distance between nodes with hop count 1 is not equal to the communication radius. Hence, this mechanism of hop count generates errors.

3.2 Hop count correction of DV-Hop

Based on the error analysis of the DV-Hop, it can be seen that roughly recording the number of hops as 1-hop affects the localization accuracy due to the large difference in the distance between nodes. Therefore, we use the strategy of symmetry and equal contraction of the golden ratio method to divide the communication radius, i.e., the communication radius is reduced by 0.618 times each time, and the golden division point is taken as the number of hops to reduce the localization error. The detailed steps of the golden ratio method are as follows:

Step 1: Define the golden ratio parameter. Let the golden ratio . The communication radius R is divided into P levels, where the division point for each level calculated based on the golden ratio ϕ.

Step 2: Calculate division points. For each level P, the division point posp is calculated as Eq (6).

(6)

where P represents the total division levels.

Step 3: Hop count record. According to the actual distance dis between nodes, the hop count h is calculated as Eq (7):

(7)

where, p( )indicates the current level and P is the total division levels.

As shown in Fig 2, take R = 50, P = 3. We use the golden ratio method to divide the communication radius R into three times, marking the partitioned point a,b as the golden ratio point. The calculation of dividing point di and hop count h is as follows:

thumbnail
Fig 2. The golden ratio method divides the communication radius.

https://doi.org/10.1371/journal.pone.0338706.g002

1) The calculation of dividing point. The , , and .

2) Hop count record. If , then . If , then . If , then .

By dividing the communication radius by the golden ratio method, the hop count can be recorded more accurately, and the positioning error can be effectively reduced. Specifically, if two nodes are within the communication radius, DV-Hop records the hop count as 1, otherwise 0. In contrast, the golden ratio method is used to divide the communication radius into multiple levels (e.g., P = 3), with each level corresponding to a different hop count (e.g., 1, 0.618, and 0.382). The golden ratio ensures symmetry and proportional scaling during radius division. Its mathematical property guarantees consistent geometric contraction, refining hop-count granularity while preserving topological relationships between nodes.

3.3 Improvement of SSA

In the node localization optimization for fire monitoring, the SSA is prone to miss the search for optimal fire sensor nodes and only search for fire sensor nodes within a small range, which makes the node localization accuracy low.

It can be seen from Eq (3) that when R2<ST, the value of tends to 0 as the number of iterations increases. Fig 3 and Fig 4 show the change trend of sparrow discover position before and after improvement, respectively. As shown in Fig 3, the position of each sparrow is getting smaller after each iteration, and its convergence to the optimal solution is by moving close to the zero point. Thus, this strategy has strong local search capability around zero, but is prone to miss the optimal solution at non-zero and get stuck in local optima. As shown in Fig 4, the improvement strategy can update the position from both positive and negative directions of itself, which improves the search space of the sparrow algorithm, shown in Eq (8).

(8)(9)(10)
thumbnail
Fig 3. Trends in sparrow discover position before improvement.

https://doi.org/10.1371/journal.pone.0338706.g003

thumbnail
Fig 4. Trends in sparrow discover position after improvements.

https://doi.org/10.1371/journal.pone.0338706.g004

where tt is calculated in Eq (9), and a in Eq (9) is described in Eq (10).

The follower of the sparrow will converge to 0 during the iteration and its position update pattern has a jump, which results in skipping the optimal solution. Therefore, we introduce a Gaussian perturbation strategy in the follower position update to improve the algorithm’s ability to find the optimal solution, describe in Eq (11).

(11)(12)

where in Eq (12) is the mean value and is the variance.

3.4 The execution flow of ESSADV-Hop

ESSADV-Hop is a node localization optimization method that combines IDV-Hop and ESSA. While hybrid methods combining DV-Hop with swarm intelligence algorithms (e.g., DE [17] and BFO [18]) have improved localization accuracy, they still face critical limitations:

1) Coarse hop count granularity due to fixed communication radius division, leading to persistent errors in distance estimation.

2) Premature convergence caused by inadequate exploration-exploitation balance in optimization algorithms.

The procedure is divided into the following steps. Firstly, the node parameters are initialized, and the communication radius is divided into multiple levels (e.g., P = 4) by using golden ratio, and the hop number between nodes is refined to reduce positioning error. Then, IDV-Hop is used for coarse localization to compute the initial distance between the unknown node and the beacon node, and the result is passed to ESSA. ESSA dynamically optimizes node localizations to avoid getting trapped in local optima through bidirectional search finder, Gaussian perturbation follower, and adaptive localization update strategy. In the iteration process, the sum of the differences between the actual distance and the estimated distance is used as the fitness function, and the position of the sparrow population is continuously updated until the maximum number of iterations is reached, and the optimal estimated position of the unknown node is finally output. Algorithm 1 is a pseudo-code for ESSADV-Hop.

Algorithm 1. The pseudo-code of ESSADV-Hop.

3.5 Time complexity of ESSADV-Hop

The time complexity is a crucial metric for evaluating the execution efficiency of algorithms. The computational complexity of evolutionary optimization algorithms refers to the number of operations involved in addition, subtraction, multiplication, and division during algorithm execution.

The time complexity of ESSADV-Hop consists of two components: IDV-Hop and ESSA. The gold ratio method in IDV-Hop refines hop counts with a complexity of , while the least squares method has a time complexity of O(n3). For ESSA, the time complexity of population initialization is . The time complexity of the ESSA after iteration is . Thus, the total time complexity of ESSADV-Hop is . In addition, the total time complexity of DV-Hop is O(n3)). The GA and PSO methods have similar complexity with . In summary, ESSADV-Hop has one more time complexity O(n3) than GA and PSO.

4 Comparison with different algorithms

In this section, we perform experiments on a PC configured with an Intel(R) Core(TM) i7-12700K CPU @ 3.61GHz and 32GB of RAM, and the programming software is Matlab R2020a. In Sec. 4.1, we compare IDV-Hop with DV-Hop. In Section 4.2, various algorithms are presented for experimental comparison. We assume that the size of the underground space is 100m * 100m. The algorithm uses Eq (13) as the objective function to calculate the fitness value, and uses Eq (14) to calculate the localization error of unknown nodes.

(13)

where fitness is the fitness value of fire sensor nodes. The (x,y) and are the positions of anchor node and unknown node, respectively.

(14)

where the is the actual coordinates of the unknown node, the is the estimated coordinates of the unknown node, UNA is the number of unknown node, R is the communication radius, and the error is the localization error. In simulations, actual coordinates are predefined for validation. ESSA optimizes estimated positions using distances dum from IDV-Hop, without prior knowledge of .

4.1 Selection and validation of IDV-Hop algorithm

4.1.1 Effect of communication radius on localization error.

We assume that 100 fire sensor nodes are randomly deployed in underground spaces, including 30 anchor nodes, 70 unknown nodes, and the communication radius ranging from 20 to 50. The results are shown in Fig 5.

thumbnail
Fig 5. Localization error of different communication radius.

https://doi.org/10.1371/journal.pone.0338706.g005

As can be seen from Fig 5, with the increase of the level P, the average localization error gradually decreases, which indicates that the more levels of communication radius division, the more accurate the hop count between fire sensor nodes and the lower the localization error. Under the same series (e.g. P = 4), the average localization error decreases with the increase of communication radius, indicating that the larger the communication radius, the more neighbor nodes of each fire sensor node, and the stronger the connectivity of the fire sensor network.

4.1.2 Effect of number of anchor nodes on localization error.

We assume that 100 fire sensor nodes are randomly deployed in underground spaces. The communication radius of all nodes is 30 and the range of anchor nodes is 5 to 35. The results are shown in Fig 6.

thumbnail
Fig 6. Localization error of different number of beacon nodes.

https://doi.org/10.1371/journal.pone.0338706.g006

As shown in Fig 6, the average localization error gradually decreases as the increase of the level P, which indicating the subdivision of the communication radius can make the hop count between the fire sensor nodes more accurate. When P = 4, the average localization error decreases with the increase of the number of beacon nodes, indicating that the more the number of beacon nodes, the more accurate the algorithm estimates the localization of unknown fire sensor nodes.

To summary, the average localization error of the algorithm decreases with the increase of the level P, and the average localization error is the lowest when P = 4. Therefore, we choose the level P = 4 to divide the communication radius.

4.1.3 Verification of IDV-Hop algorithm.

To verify the effectiveness of the IDV-Hop, this section introduces the DV-Hop for comparison, and the two algorithms are simulated 200 times, respectively. We assume that 100 fire sensor nodes are randomly deployed in underground spaces, the communication radius is 30 m, the beacon nodes are 30, and the unknown nodes are 70. The results are shown in Fig 7.

As shown in Fig 7, the average localization error of DV-Hop and IDV-Hop algorithms is 0.2970 and 0.1288, respectively, which is an improvement of 56.63 percent, indicating that IDV-Hop can effectively reduce the localization error by the golden ratio method. From the fluctuation point of view, the localization errors of both algorithms fluctuate to some extent. In contrast, IDV-Hop shows less fluctuations, indicating that its localization results are more stable and reliable. Therefore, IDV-Hop shows better performance than DV-Hop in terms of average localization error and stability, which validates the effectiveness of the golden ratio method.

4.2 Algorithm performance

In this section, we combine seagull optimization algorithm (SOA) [25], SSA, sand cat swarm optimization (SCSO) [26], and reptile search algorithm (RSA) [27] algorithms with DV-Hop to form SOADV-Hop, SSADV-Hop, SCSODV-Hop, and RSADV-Hop algorithms. In addition, we introduce genetic algorithm (GA) [28], particle swarm optimization (PSO) [29], goat optimization algorithm (GOA) [30], and polar lights optimizer (PLO) [31] methods to test. Finally, we compare these algorithms with DV-Hop, IDV-Hop and ESSADV-Hop.

4.2.1 Effect of communication radius on localization error.

To test the impact of different communication radius on the localization error, we assume that 100 fire sensor nodes are randomly deployed in underground spaces, with a total number of anchor nodes of 30 and the communication radius R ranging from 20 to 50. Fig 8 represents the effect of communication radius on localization error.

thumbnail
Fig 8. Effect of communication radius on localization error.

https://doi.org/10.1371/journal.pone.0338706.g008

As shown in Fig 8, when , the average localization error of ESSADV-Hop is always kept at a low level, and the fluctuation of the localization error is relatively small with the R increases, showing better stability and adaptability. Secondly, compared with other hop-based algorithms (e.g., DV-Hop, SSADV-Hop), the localization error of ESSADV-Hop is significantly reduced. In addition, compared with some optimization algorithms (e.g., GA, PSO), ESSADV-Hop also has obvious advantages in terms of localization error. Although these optimization algorithms can find the solution closer to the real position through iterative search, the computational complexity is usually high, they may fall into the local optimal solution in some cases. In summary, ESSADV-Hop achieves excellent performance in terms of low localization error, better stability, and strong adaptability, and has significant advantages over other algorithms.

4.2.2 Effect of total number of nodes on localization error.

In order to test the effect of the total number of nodes on the localization error, we assume that the total number of randomly deployed fire sensor nodes in urban underground spaces is between 50 and 300. The number of anchor nodes accounts for 30% of the total number of nodes, and the communication radius is 30. Fig 9 represents the effect of total number of nodes on localization error.

thumbnail
Fig 9. Effect of variable total number of nodes on localization error.

https://doi.org/10.1371/journal.pone.0338706.g009

As shown in Fig 9, the localization errors of most algorithms show a decreasing trend as the increase of the total number of nodes. This result suggests that increasing the number of nodes in the network helps improve localization accuracy, as more nodes provide richer position information and more accurate distance estimates. As the number of nodes increases, the localization error of ESSADV-Hop decreases by 79.4 percent, showing stable convergence. Compared to the other algorithms, IDV-Hop reduces the error by only 79.7%, but the absolute error is still 2.3 times higher, and the PSO algorithm has a fluctuating error of 24.3%. In particular, after 200 nodes, the error curve of ESSADV-Hop tends to be flat, which demonstrates its good anti-jamming capability. In addition, in a high-density network (300 nodes) scenario, the localization error of ESSADV-Hop is 87.6% lower than that of the traditional algorithm and 87.2% higher than that of the intelligent optimization algorithm. Thus, this experiment demonstrates that ESSADV-Hop is suitable for large-scale and high-density deployment in IoT scenarios, providing a new technological path for accurate localization.

4.2.3 Effect of number of anchor nodes on localization error.

To test the effect of the number of anchor nodes on localization error, we assume that 100 fire sensor nodes are randomly deployed in underground spaces. The number of anchor nodes ranging from 10 to 40 and the communication radius R is 30.

As shown in Fig 10, the localization error of ESSADV-Hop is the lowest in different anchor scales, and steadily decreases with the increase of anchor nodes. When the anchor node is increased from 10 to 40, the error decreases from 0.122 to 0.0685, a decrease of 43.9%, which is significantly better than the DV-Hop (19.4%) and the IDV-Hop (34.9%). In the low anchor density (10 nodes) scenario, the localization error of ESSADV-Hop is 0.122, which is 65.5% lower than DV-Hop and 45.7% higher than SSADV-Hop (0.2247). Compared with the meta-heuristic algorithm, its accuracy is more than 70% higher than GA (0.4061). In addition, compared with the intelligent optimization algorithm, the error of ESSADV-Hop at 40 nodes is 21.4% that of PSO (0.3197) and 41.4% that of GOA (0.1654), which verifies the dual advantages of its computational efficiency and accuracy. In general, the localization error of ESSADV-Hop under all the number of anchor nodes is significantly lower than that of other algorithms. This result indicates that ESSADV-Hop is more accurate and stable in both distance estimation and node localization computation. As the number of anchor nodes increases, the localization error of ESSADV-Hop decreases more significantly, which further demonstrates its efficiency.

4.2.4 Effect of signal interference on localization error.

For the effect of signal interference on localization error, a shadow model [32] is introduced into Eq (13) in this section for experimental testing, see Eq (15). In addition, we assume that 100 fire sensor nodes are randomly deployed in underground spaces. The number of anchor nodes is 30 and the communication radius R is 30. The results are shown in Table 1.

(15)

where PLr(dis) is the signal intensity of the base station receiving the unknown node and denotes the signal intensity of the base station receiving the anchor node d0. The s represents the proportional factor of path length and path loss. The dis0 is the distance between the anchor node and the base station and dis is the distance between the unknown node and the base station. The δ is Gaussian noise with a mean of 0.

As shown in Table 1, in the case of no signal interference, ESSADV-Hop has the best localization error of 0.0758, which is 68.5% higher than that of traditional DV-Hop (0.298). IDV-Hop (0.1267) and GOA (0.1914) rank second and third. When is introduced, the localization error of all algorithms increases, but ESSADV-Hop still maintains the lowest error of 0.0943, showing strong anti-jamming characteristics, while the localization error of DV-Hop increases by 82.2% (0.5442). When the interference parameter δ changes from 0 to 2, the localization error fluctuation of ESSADV-Hop is only 0.0185 (0.0758 → 0.0943), and that of IDV-Hop is 0.0036, showing the best stability. In contrast, SCSODV-Hop (0.088) and GA (0.1737) are significantly affected by interference, indicating that their robustness is insufficient. Otherwise, compared to DV Hop, OLSTM DVHop [33] and HCDV Hop [34], ESSADV-Hop have reduced their positioning errors by 52.78%, 10%, and 68.5%, respectively. Therefore, ESSADV-Hop has more advantages.

In addition, DV-Hop (0.181s) and IDV-Hop (0.1506s) keep the running time to a minimum and are suitable for scenarios with high real-time requirements. Although ESSADV-Hop (1.9971s) is 10 times more time-consuming than traditional algorithms, it still has efficiency advantages over other improved algorithms such as SCSODV-Hop’s 3.5226s. ESSADV-Hop has the fastest convergence times of 30, which is 66.3% higher than SSADV-Hop (89 times). PLO (83 times) and GOA (37 times) performed moderately, while SCSODV-Hop (36 times) had the lowest convergence efficiency, DV-Hop and IDV-Hop are exact algorithms, so there are no convergence times. ESSADV-Hop is more efficient in parameter optimization mechanism design.

Convergence analysis: The convergence times metric c provides a key indicator for evaluating the search efficiency of the optimization algorithms. A lower convergence time indicates a faster speed for the algorithm to find the optimal solution. As shown in Table 1, ESSADV-Hop converges in only 30 iterations, which is substantially faster than other meta-heuristic algorithms such as SSADV-Hop (89 times), RSADV-Hop (56 times), and SCSODV-Hop (36 times). This result provides direct empirical evidence that the proposed enhancements to the Sparrow Search Algorithm—namely, the bidirectional search strategy for discoverers and the Gaussian perturbation applied to followers—are highly effective. These mechanisms enhance the global exploration capability, prevent the algorithm from being trapped in local optima at an early stage, and thus significantly accelerate the convergence process. Although PSO (42 times) and GOA (37 times) exhibit convergence times close to ESSADV-Hop, the localization error column demonstrates that the solution quality they achieve upon convergence is far inferior to that of ESSADV-Hop. This demonstrates that ESSADV-Hop achieves the best balance between convergence speed and solution accuracy, converging not only faster but also to a superior solution.

The variance metric () in c provides further insight into the statistical robustness and stability of each algorithm. A lower variance indicates more consistent and reliable performance across multiple simulations. It is evident that ESSADV-Hop not only achieves the lowest mean localization error across all interference conditions but also demonstrates the smallest variance ( = 0.1), underscoring its exceptional stability. In contrast, algorithms with higher variances, such as GA and PLO (both = 0.25), exhibit considerable performance fluctuations, rendering their outcomes less predictable and reliable in practical deployments.

To further substantiate the superiority of the proposed ESSADV-Hop algorithm from a statistical perspective, we conducted the Wilcoxon signed-rank test on the localization errors obtained from all simulation runs. The results, summarized in Table 2, provide rigorous statistical evidence for our claims. The null hypothesis for each test posited no significant performance difference between ESSADV-Hop and a comparator algorithm. The exceptionally small p-values allow us to confidently reject this null hypothesis. The ’Significance’ column provides an immediate visual assessment of the strength of this evidence, following standard statistical conventions: three asterisks ‘***’ denote a p-value < 0.001, indicating a highly significant difference; two asterisks ‘**’ denote p < 0.01, indicating a very significant difference; and a single asterisk ‘ ’ denotes p < 0.05, indicating a significant difference. As shown in Table 2, the comparisons against most algorithms reached the highest level of significance ‘***’, while the comparison with IDV-Hop was also statistically significant ‘**’. This, combined with the unanimous ‘+’ outcomes, demonstrates that the performance improvement of ESSADV-Hop is statistically robust and unlikely to have occurred by chance.

thumbnail
Table 2. Statistical significance test (p-values) of localization error: ESSADV-Hop versus other algorithms.

https://doi.org/10.1371/journal.pone.0338706.t002

4.2.5 Effect of obstacle occlusion on localization error.

To further validate the algorithm’s performance in non-ideal environments with signal obstructions (e.g., pillars and walls in underground spaces), we introduce obstacles and employ a log-normal shadowing model to simulate realistic signal attenuation and multipath effects [35]. The path loss is modeled in Eq (16).

(16)

where γ is the path loss exponent, and is a zero-mean Gaussian random variable with standard deviation σ (in dB), representing the shadowing effect caused by obstacles. In our simulations, we set for scenarios with obstacles and for the obstacle-free baseline to create a challenging yet realistic comparative environment.

The experimental results are summarized in in Table 3. The key findings are analyzed as follows:

thumbnail
Table 3. Performance comparison under obstacle occlusion scenarios.

https://doi.org/10.1371/journal.pone.0338706.t003

Baseline Performance:Under obstacle-free conditions, the proposed ESSADV-Hop achieves the lowest localization error of 0.0758, reaffirming its superior accuracy in ideal settings, as consistently demonstrated in previous experiments.

Robustness to Obstacles:The introduction of obstacles increases the localization error for all algorithms, as evidenced by the values in the ’with obstacles’ column. However, the degree of performance degradation varies significantly. The ’error increase’ column quantifies this robustness. ESSADV-Hop exhibits the smallest error increase at +24.4%, significantly lower than DV-Hop (+71.8%) and SSADV-Hop (+66.7%). This minimal performance loss underscores the robustness of our method. The refined hop-count granularity in IDV-Hop makes it less sensitive to large distance estimation errors caused by single-hop signal fluctuations, while the global search capability of ESSA can compensate for initial errors introduced by the obstructed environment.

Stability in Non-Ideal Environments: The Standard Deviation metric under obstructed conditions measures the stability of each algorithm. ESSADV-Hop again demonstrates the best stability with the lowest standard deviation of 0.018, indicating that its performance is consistently reliable across multiple simulation runs with random shadowing effects. In contrast, algorithms like RSADV-Hop and PSO show higher standard deviations, implying less predictable and stable outcomes in such complex environments.

In summary, this experiment conclusively demonstrates that ESSADV-Hop not only excels in ideal conditions but also maintains its performance advantage with the highest level of robustness and stability in the presence of signal obstructions, a common challenge in real-world underground deployments.

5 Conclusion

The proposed ESSADV-Hop effectively addresses the limitations of traditional DV-Hop in fire sensor node localization by integrating three key innovations. First, by integrating the golden ratio method into DV-Hop, the communication radius is divided into four levels (P = 4), reducing the average localization error by 55.7% (from 0.2910 to 0.1288) compared to the original DV-Hop. This refinement effectively mitigates the hop-count ambiguity due to the communication radius. Second, the modified sparrow search algorithm introduces Gaussian perturbations and bidirectional position updates for both discoverers and followers to prevent premature convergence. Experimental results demonstrate that ESSADV-Hop achieves an average localization error below 0.05 under static conditions, outperforming SSADV-Hop, RSADV-Hop, and other variants by 11.74% ∼ 23.05%. Finally, with a communication radius of 50 and 30% beacon nodes, ESSADV-Hop maintains sub-0.05 error even in large-scale networks (200–300 nodes), proving its adaptability to dense and heterogeneous underground environments. For future work, we will investigate four issues.

1) Validating the algorithm in multi-floor underground structures (e.g., subways and parking lots) with vertical dimension considerations.

2) Adapting the ESSADV-Hop algorithm for dynamic fire scenarios by incorporating real-time environmental changes (e.g., smoke diffusion and node mobility).

3) Designing lightweight variants of ESSADV-Hop to address its increased computational complexity and energy consumption. While the current version prioritizes localization accuracy, its higher computational cost compared to DV-Hop may limit deployment in very large-scale or resource-constrained wireless sensor networks. Future work will focus on strategies such as distributed computing, model simplification, and hybrid scheduling to optimize the trade-off between accuracy, computational efficiency, and energy consumption.

4) Integrating multi-modal sensor data (e.g., thermal imaging for fire source detection and gas sensors for smoke analysis) to enhance environmental perception and localization robustness.

References

  1. 1. Kinateder M, Comunale B, Warren WH. Exit choice in an emergency evacuation scenario is influenced by exit familiarity and neighbor behavior. Safety Science. 2018;106:170–5.
  2. 2. Rendón Rozo K, Arellana J, Santander-Mercado A, Jubiz-Diaz M. Modelling building emergency evacuation plans considering the dynamic behaviour of pedestrians using agent-based simulation. Safety Science. 2019;113:276–84.
  3. 3. Yanfei J, Kexin Z, Liquan Z. Improved DV-Hop location algorithm based on mobile anchor node and modified hop count for wireless sensor network. Journal of Electrical and Computer Engineering. 2020;2020:1–9.
  4. 4. Al-Fuqaha A, Guizani M, Mohammadi M, Aledhari M, Ayyash M. Internet of Things: a survey on enabling technologies, protocols, and applications. IEEE Commun Surv Tutorials. 2015;17(4):2347–76.
  5. 5. Almamori A, Mohan S. Estimation of Channel State Information (CSI) in Cell-Free Massive MIMO Based on Time of Arrival (ToA). Wireless Pers Commun. 2020;114(2):1825–31.
  6. 6. Le T-K, Ho KC, Le T-H. Rank properties for matrices constructed from time differences of arrival. IEEE Trans Signal Process. 2018;66(13):3491–503.
  7. 7. Moghaddasi J, Djerafi T, Wu K. Multiport Interferometer-Enabled 2-D Angle of Arrival (AOA) Estimation System. IEEE Trans Microwave Theory Techn. 2017;65(5):1767–79.
  8. 8. Poladyan H, Bubon O, Teymurazyan A, Senchurov S, Reznik A. Gaussian position-weighted center of gravity algorithm for multiplexed readout. Phys Med Biol. 2020;65(16):165003. pmid:32408285
  9. 9. Ye JJ, Yuan X, Zeng S, Zhang J. Difference of convex algorithms for bilevel programs with applications in hyperparameter selection. Math Program. 2022;198(2):1583–616.
  10. 10. Gui L, Xiao F, Zhou Y, Shu F, Val T. Connectivity dased DV-Hop localization for Internet of Things. IEEE Trans Veh Technol. 2020;69(8):8949–58.
  11. 11. Gui L, Huang X, Xiao F, Zhang Y, Shu F, Wei J, et al. DV-Hop localization with protocol sequence based access. IEEE Trans Veh Technol. 2018;67(10):9972–82.
  12. 12. Li T, Wang C, Na Q. Research on DV-Hop improved algorithm based on dual communication radius. J Wireless Com Network. 2020;2020(1):1–10.
  13. 13. Kaushik A, Lobiyal DK, Kumar S. Improved 3-dimensional DV-hop localization algorithm based on information of nearby nodes. Wireless Netw. 2021;27(3):1801–19.
  14. 14. Cao Y, Qian Y, Wang Z. DV-Hop based localization algorithm using node negotiation and multiple communication radii for wireless sensor network. Wireless Netw. 2023;29(8):3493–513.
  15. 15. Mohanta TK, Das DK. A three-dimensional wireless sensor network with an improved localization algorithm based on orthogonal learning class topper optimization. Ann Telecommun. 2023;78(7–8):475–89.
  16. 16. Shi Q, Xu Q, Zhang J. An improved DV-Hop scheme based on path matching and particle swarm optimization algorithm. Wireless Pers Commun. 2018;104(4):1301–20.
  17. 17. Cui L, Xu C, Li G, Ming Z, Feng Y, Lu N. A high accurate localization algorithm with DV-Hop and differential evolution for wireless sensor network. Applied Soft Computing. 2018;68:39–52.
  18. 18. Zhou C, Yang Y, Wang Y. DV-Hop localization algorithm based on bacterial foraging optimization for wireless multimedia sensor networks. Multimed Tools Appl. 2018;78(4):4299–309.
  19. 19. Ouyang A, Lu Y, Liu Y, Wu M, Peng X. An improved adaptive genetic algorithm based on DV-Hop for locating nodes in wireless sensor networks. Neurocomputing. 2021;458:500–10.
  20. 20. Peng D, Gao Y. Localization algorithm for anisotropic wireless sensor networks based on the adaptive chaotic slime mold algorithm. Neural Comput & Applic. 2023;35(36):25291–306.
  21. 21. Tagne Fute E, Nyabeye Pangop D-K, Tonye E. A new hybrid localization approach in wireless sensor networks based on particle swarm optimization and tabu search. Appl Intell. 2022;53(7):7546–61.
  22. 22. Yu X, Huang L, Liu Y, Zhang K, Li P, Li Y. WSN node location based on beetle antennae search to improve the gray wolf algorithm. Wireless Netw. 2022;28(2):539–49.
  23. 23. Xue J, Shen B. A novel swarm intelligence optimization approach: sparrow search algorithm. Systems Science & Control Engineering. 2020;8(1):22–34.
  24. 24. Yue Y, Cao L, Lu D, Hu Z, Xu M, Wang S, et al. Review and empirical analysis of sparrow search algorithm. Artif Intell Rev. 2023;56(10):10867–919.
  25. 25. Dhiman G, Kumar V. Seagull optimization algorithm: theory and its applications for large-scale industrial engineering problems. Knowledge-Based Systems. 2019;165:169–96.
  26. 26. Seyyedabbasi A, Kiani F. Sand Cat swarm optimization: a nature-inspired algorithm to solve global optimization problems. Engineering with Computers. 2022;39(4):2627–51.
  27. 27. Abualigah L, Elaziz MA, Sumari P, Geem ZW, Gandomi AH. Reptile Search Algorithm (RSA): a nature-inspired meta-heuristic optimizer. Expert Systems with Applications. 2022;191:116158.
  28. 28. Holland JH. Genetic algorithms. Sci Am. 1992;267(1):66–72.
  29. 29. Wang D, Tan D, Liu L. Particle swarm optimization algorithm: an overview. Soft Comput. 2017;22(2):387–408.
  30. 30. Nozari H, Abdi H, Szmelter-Jarosz A. Goat optimization algorithm: a novel bio-inspired metaheuristic for global optimization. arXiv preprint 2025. https://arxiv.org/abs/250302331
  31. 31. Yuan C, Zhao D, Heidari AA, Liu L, Chen Y, Chen H. Polar lights optimizer: algorithm and applications in image segmentation and feature selection. Neurocomputing. 2024;607:128427.
  32. 32. Bianchi V, Ciampolini P, De Munari I. RSSI-based indoor localization and identification for ZigBee wireless sensor networks in smart homes. IEEE Trans Instrum Meas. 2019;68(2):566–75.
  33. 33. Rehman A, Mahmood T, Alahmadi TJ, Almasoud AS, Saba T. Energy efficient and robust node localization in WSNs using LSTM optimized DV hop framework to mitigate multihop localization errors. Sci Rep. 2025;15(1):14827. pmid:40295584
  34. 34. Liu G, Qian Z, Wang X. An improved DV-Hop localization algorithm based on hop distances correction. China Commun. 2019;16(6):200–14.
  35. 35. Ashhar K, Noor-A-Rahim MD, Khyam MO, Soh CB. A narrowband ultrasonic ranging method for multiple moving sensor nodes. IEEE Sensors J. 2019;19(15):6289–97.