1. Introduction
The leakage and dispersion of flammable, explosive, toxic gases pose significant safety risks to industrial operations as well as everyday life. The rapid and precise identification and localization of gas leak sources, followed by prompt intervention, are crucial in mitigating these risks. Gas source localization generally refers to the process of “actively” discovering and tracking gas diffusion plumes through sensor networks or mobile robots. It entails continuously searching to ultimately determine the location and relevant parameters of gas leakage source. Gas leak source localization based on sensor networks typically requires sensors which have been settled at the environment in advance [Reference Juffry, Kamarudin, Adom, Miskon, Kamarudin, Zakaria, Mamduh and Abdullah1]. These sensors collect information about gas leaks in the environment [Reference Denglong, Weigao and Wei2], which is then used as initial conditions for models to perform source localization [Reference Lin, Zhou, Hu, Sun, Zhang and Wang3]. This method has a relatively low cost, but its accuracy is limited because it heavily relies on the pre-deployed sensor network [Reference Jia and Kikumoto4]. Additionally, it fails to integrate well with surrounding environmental information and may even waste some environmental data. However, these issues can be effectively addressed by robot active olfactory method, and this method boasts excellent maneuverability.
Robot Active Olfaction method involves single or multiple robots actively searching for gas leak source by combining environmental information on plume diffusion. Compared to sensor networks, this approach offers advantages such as flexibility, real-time capability, and autonomy, making it a research hotspot in the field of gas source localization. Bio-inspired algorithms [Reference Junqi, Yehao, Yunzhe, Cheng, Di, Abdullah and Mengchu5] in robotic active sensing methods were first applied to the field of gas source localization, bringing highly effective and successful search techniques observed in nature into search algorithms. When perceptual cues (such as odors) are available, enhancing the robot’s mobility system and sensor performance allows the searcher to move more effectively toward the source [Reference Shunsuke, Mayu, Daisuke and Koh6]. Intermittent perception caused by the discontinuity of concentration gradients in three-dimensional gas diffusion and the sparsity of gas environments renders gradient search algorithms no longer applicable [Reference Jin, Zhang, Jiang and Tian7]. Bio-inspired algorithms, on the other hand, can make corresponding action responses based on observed gas concentration fields [Reference Ge, Feng, Ma, Dai, Wang and Ye8], thus effectively addressing aforementioned issues. Among many bio-inspired algorithms, Whale Optimization Algorithm (WOA) is commonly used in localization studies due to its unique search strategy, simple parameter settings, adaptability to various problems, fast convergence speed, and straightforward algorithmic structure, which makes it easy to integrate with robots. Yet, WOA faces the pressing issue of local optima that needs to be addressed. Many scholars have enhanced the search capability of WOA by introducing perturbations to solve this problem. Common improvements include adjustments and optimizations to algorithm parameters [Reference Hemeida, Alkhalaf, Senjyu, Ibrahim, Ahmed and Bahaa-Eldin9] as well as objective functions [Reference Liu, Zhou, Shen and Luo10]. In gas source localization problems, the objective function is usually fixed [Reference Liang and Zhang11,Reference Xuezhen, Shanpei, Xiaoqing, Xingjun, Kun and Jiming12]. Researchers often choose to perturb the algorithm parameters instead. Cheng et al. [Reference Luo, He, Li, Zeng and Liang13] installed disturbances to the parameters of WOA including perturbations to weighting factors using information entropy, which helps to evenly distribute the whale individuals and avoid local optima. However, this method requires additional experiments and adjustments to determine optimal perturbation parameters and mechanisms, increasing the complexity of algorithm design and implementation, as well as the computational load. Luo et al. [Reference Li, Yu, Fu and Wang14] introduced a filtering mechanism to perturb individual weights at different stages, which reduced the number of parameters that need to be selected. But this approach may result in excessive perturbation, leading to an imbalance between environment exploration and local search, and potentially degrading the quality of the solutions. Li et al. [Reference Fan, Hao and Sun15] utilized a Levy flight perturbation strategy to update the positions of the whale population, which can induce mutations in individuals with poor development capabilities. Meanwhile, this approach is still prone to getting trapped in local optima. Bio-inspired algorithms can enhance global search capabilities by adding perturbation terms, which optimizes the search path to some extent. However, the aforementioned approaches suffer from low localization accuracy, susceptibility to local optima, and high computational complexity when addressing sparse gas environments.
Sparse gas environment problem can be effectively addressed by information-directed strategy, a cognitive search strategy [Reference Loisy and Eloy16]. This strategy demonstrates robustness under conditions of significant sparsity [Reference Hutchinson, Liu and Chen17]. Current research primarily focuses on improving and extending sequential Monte Carlo framework. One key extension is utilizing particle filters within this framework, reducing dependence on grid partitioning, and allowing the inclusion of source intensity in parameter space [Reference Liu, Jiang, Zhang, Pan and Wang18]. Application of particle filters improves fault tolerance of the algorithm [Reference Abdurrahman and Hakan19]. However, subsequent issue of particle depletion causes robots to repeat searches within a certain range. Following improvement scheme has been applied to particle filter (PF) algorithm: Yilmaz et al. [Reference Wu, Shao, Zhang and Zheng20] proposed a multi-stage localization method that uses a large-scale localization approach based on PF. This method employs a similarity measure obtained through a correlation entropy criterion to determine when and how to transition from large-scale localization to precise localization. While it achieves high localization accuracy, it also has a high computational complexity. Wu et al. [Reference Jin, Mu, Feng and Hei21] proposed a distributed particle filtering method for conducting combined gas measurements with a single robot, utilizing the conditional information entropy gradient to determine the robot’s movements. This approach successfully completed the task of gas source localization with multiple robots. However, the issues of prolonged search time and particle depletion were not addressed. Jin et al. [Reference Xinxing, Bo, Jian, Yuquan and Chenglong22] aimed to resolve the issue of particle depletion in nonlinear systems by optimizing the importance density function, but the lack of optimization for particle distribution leads to a wastage of some environmental information. Information-directed strategies for addressing particle depletion issues offer strong fault tolerance and can reduce the impact of gas turbulence on measurement results when using single or multiple robots for searching. However, current improvements overlook the fact that particle groups rely on particle filtering convergence and lack specific methods to guide particle group movement, resulting in slow convergence speeds and high computational demands.
To address the aforementioned issues, a novel hybrid information-based PF-WOA algorithm (IPF-WOA) is proposed. This algorithm combines PF with WOA, using a random inertia perturbation term to increase local search precision, ultimately achieving accurate and efficient localization of gas leakage sources. The remainder of this paper is organized as follows: Section 2 presents principles and debates the unique aspects that show the novelty of IPF-WOA. Section 3 implements source identification part of IPF-WOA. Section 4 provides flowchart and pseudocode of IPF-WOA. Section 5 shows simulation results of IPF-WOA are presented and compared with experiments. Finally, Section 6 draws conclusions and outlines prospects for future development.
2. Information-based hybrid plume tracking strategy with PF and WOA
To effectively realize plume discovery and tracking in Robot’s Active Olfactory method, this section proposes improved parts of plume discovery stage and the plume tracking stage, which are as follows: In plume discovery stage, an improved Z-shape search method is adopted to discover the plume. In the phase of plume tracking, a novel hybrid information-based PF-WOA algorithm is introduced as a plume tracking strategy. In this strategy, gas diffusion space is divided into several three-dimensional grids to calculate the sum of information entropy of particles falling into each grid, to guide robot direction. An improved WOA is used to make particles converge to gas source, and PF algorithm is used to avoid the local extremum problem.
2.1. Plume discovery
The improved Z-shaped plume discovery method is used for plume discovery. Plume discovery method which combines Zigzag search and rectangular comb search has higher search efficiency and success rate. Assuming the robot is regarded as a point, without disturbance to plume when moving forward. Robot moves windward in a zigzag with a certain angle [Reference Jun, Luyao and Ruirui23] until any suspicious gas is discovered, this searching method is inspired by silkworm moth and other organisms [Reference Mirjalili and Lewis24]. In a plane of 3D gas diffusion model, robot searches for the plume by flying against the wind at a certain angle and moving in fixed steps (0.5 units) on a plane at a specific height. Robot moves windward at a certain angle with a certain step length for finding plume. Robot bounces back to searching area with a certain angle to continue searching, if the wall collision count reaches a certain threshold without detecting a plume, it is considered that there is no plume in that plane. Then robot returns to starting position, increases a certain height in Z-direction, and begins a new search in a new plane. When gas concentration measured by robot is greater than the threshold value, it is considered that robot has found plume, and algorithm returns robot position and measurement concentration at that point.
2.2. 3D plume search algorithm based on information entropy particle filtering
PF algorithm is mainly used to estimate the state of dynamic systems, especially nonlinear or non-Gaussian systems. Its principle involves progressively approaching the probability distribution of true state through updating, sampling, and resampling. The basic steps are as follows: initialization, predicting current state of particles, importance sampling and resampling; moving particles and updating, etc. In this study, PF algorithm based on information entropy is extended to 3D space, and plume tracking problems on X-axis, Y-axis, and Z-axis are also considered. Gas diffusion model can be described as follows:
where $Q$ represents release rate of the gas release source, $K$ represents gas diffusion rate, taken as 6 m/s, $r$ represents the distance between gas source and robot position, $y_{s}$ represents Y-axis coordinate of the particle’s position, $y_{r}$ represents Y-axis coordinate of robot’s position, ${\unicode[Arial]{x03BB}}$ represents intermediate variable, its expression is as follows Eq. (2), $\tau$ represents the gas particle lifetime, $v$ for wind speed.
Particle’s weight is expressed by Eq. (3), which is unnormalized:
where $w_{k-1}^{(i)}$ represents the ${i}$ th particle’s normalized weight at previous time step, $C_{s,k}^{(i)}$ represents predicted concentration of the $i$ th particle at time $k$ , and $C_{r}^{k}$ represents concentration measured by robot at time $k$ . Expression for normalized particle weights is given by Eq. (4):
Sequential importance sampling will inevitably lead to particle degradation phenomenon, which means that some particles’ weights become very small after continuous iteration, so that their role in posteriori probability estimation is negligible., resulting in a sharp decline in the performance of filter. In this study, effective sample size $Neff$ is usually used to represent degradation degree of particles. A larger $Neff$ value indicates that the particle weights are more evenly distributed, resulting in higher particle diversity. Conversely, a smaller $Neff$ value indicates that the particle weights are concentrated on a few particles, resulting in lower diversity. The expression is shown in Eq. (5):
It is necessary to resample particles when $Neff$ is less than a settled threshold. The basic idea is to replicate particles with significant weight and discard particles with very low weight while keeping total number of particles, N, constant. Threshold value $N$ is generally 30% to 50% in particle total counts.
Information entropy algorithm is another algorithm required in plume tracking phase. Information entropy is used to describe the uncertainty toward information source. The greater the information entropy is, the greater uncertainty will be. Moving towards the maximum direction of information entropy can reduce the uncertainty faster, maximize information gain, make posterior estimation more certain, and finally locate gas source. In this study, robot motion control is denoted as $M_{r}$ , let $M_{r}=\{\textit{forward},\textit{backward},left,\textit{right},up,down\}$ , whose elements indicate actions moving forward, backward, up, down, towards left and right from the current position. Updating formula of robot’s route can be described as follows:
where $[\begin{array}{ccc} x_{k+1}, & y_{k+1}, & z_{k+1} \end{array}]^{T}$ and $[\begin{array}{ccc} x_{k}, & y_{k}, & z_{k} \end{array}]^{T}$ represent robot position before and after updating, respectively, and $[\begin{array}{ccc} dx_{k+1}, & dy_{k+1}, & dz_{k+1} \end{array}]^{T}$ represents robot motion increment. Corresponding motion increment can be expressed as Eq. (7):
where ${\unicode[Arial]{x03BB}} _{\mathrm{r}}$ represents length of the moving step, taken as 0.2.
The maximum direction of information entropy can be described as Eq. (8), where $H(m_{r,k})$ refers to Shannon entropy.
However, in later iterations, robot will search repeatedly in the same area since system gains virtually no information for particle updates. To avoid this situation, reward function can be described as follows:
where $m_{k}^{(j)}$ represents candidate planning points, 6 possible motion directions correspond to 6 candidate planning points. Therefore, the value of $j$ ranges from 1 to 6. The values of $a$ and $b$ should be greater than 0. $(\rho r{\lambda _{r}})^{-1}$ represents the score of each trajectory point that falls into the $\rho r\lambda _{r}$ region. Where, $\rho \in S_{\rho }$ , $S_{\rho }=\{0.4,2,4\}$ , while $C_{\rho r{\lambda _{r}}}(\hat{p}_{k+1}^{(j)})$ represents those points’ score, $\sum _{\rho r\in S_{\rho }}(\rho r{\lambda _{r}})^{-1}C_{\rho r{\lambda _{r}}}(\hat{p}_{k+1}^{(j)})$ can therefore represents total score of repetitive trajectory points around target point. This method effectively avoids robot from repeatedly searching in the same region and reducing search duration.
2.3. Improved whale optimization guiding strategy for particle movement
WOA is a swarm intelligence optimization algorithm proposed by Mirjalili, an Australian researcher, in 2016, after observing the foraging behavior of whales [Reference Chunbo, Yuwei, Xuelong, Yalan and Du25]. In this study, the improved WOA is used to facilitate particle motion and ensure thorough exploration while convergence to the position where gas source is most likely to exist. WOA has a simple structure and only a few parameters are required for adjusting. In the standard WOA, there are three searching modes for whale swarm: encircling prey, random search for prey, and spiral search for prey.
Consider the particle swarm position as the position of a whale swarm, whale optimization facilitates particle motion. Whale positions correspond to X, Y, and Z coordinates of particle positions. Head whale position with the largest fitness is the particle position with largest particle weight. Using linear weight factor $a$ , instead, which converges slowly, a nonlinear weighting factor is given by Eq. (10):
During position updating, if the motion mode of encircling prey or spiral search for prey is selected, updated position will be related to head whale position. So perturbing head whale position randomly during updating procedure for each whale position, will impact on expanding searching area while improving search accuracy and avoiding local extremum problems. In this study, a disturbance term, denoted as $\mathrm{wt}$ , is added to head whale position. This term has been modified to suit the combination of WOA and PF algorithms.
Firstly, before each iteration, particles are sorted in ascending order based on their weights. They are then divided into three parts, and the averages of these parts are calculated, denoted as $W_{av1}, W_{av2}\text{ and }W_{av3}$ ( $W_{av1}\lt W_{av2}\lt W_{av3}$ ). Next, each particle weight at current position is compared with $\mathrm{W}_{\mathrm{av}1}, \mathrm{W}_{\mathrm{av}2}\text{ and }\mathrm{W}_{\mathrm{av}3}$ . The following four scenarios are considered:
-
• Weight of the $j$ th particle at time $t$ , marked as $W_{j}^{t}$ , if $\mathrm{W}_{\mathrm{j}}^{\mathrm{t}}$ falls within concentration interval $[0,W_{av1}]$ , disturbance term is randomly selected from range in $wt\in (0.3,0.6)$ or $wt\in (1.3,1.6)$ . There is a 50% probability for each of the two intervals, allowing for an expanded search range.
-
• If $W_{j}^{t}\in (W_{av1},W_{av2})$ , disturbance term is randomly selected from the range in $wt\in (0.6,1.3)$ to avoid local extremum problem.
-
• If $W_{j}^{t}\in [W_{av2},W_{av3})$ , disturbance term for the fittest whale position is set as $wt\in (0.8,1.2)$ , enable a more detailed search.
-
• If $W_{j}^{t}\in [W_{av3},1)$ , $wt=1$ , it means that particle has a good fitness level, and no additional disturbance is required.
Considering the impact of wind, when perturbing whale in optimal position during each iteration, more perturbations should be made at upwind direction. So, for the first three cases, when updating particle positions in upwind direction, the minimum disturbance term interval for head whale is subtracted by 0.1, and the maximum value is subtracted by 0.2. By employing this random inertia disturbance term, search area is expanded the while local extremum problem is avoided. Additionally, in this study, the fittest whale position is selected based on historical probability. When $\mathrm{a}$ is less than a certain threshold, let ${wt}=1$ for accelerating convergence.
3. Source confirmation for calculating mass flux
In two-dimensional space, delineation method, multiple confirmation method, and concentration threshold method are often used to confirm gas source. However, in 3D space, due to computational complexity, gas source is confirmed by calculating the sum of mass fluxes on each side at the grid. The mass flux is calculated when robot arrives at prey position where particles converge. Gas mass flux discretion is shown in Eq. (11):
where $W$ represents volume of the $j$ th grid, $\rho$ represents gas density, $\vec {v}$ represents velocity vector, $S$ represents gas flow cross-sectional area, and $C$ represents gas concentration.
The gas flow cross-sectional area is determined by grid area, while the mixed gas density $\rho$ , gas concentration $C$ , and velocity vector $\vec {v}$ are computed using Fluent software. Starting from particle convergence position, robot moves a certain step length towards six sides from the cubic grid. If the sum of mass fluxes, which are measured and accumulated by robot, exceeds a certain threshold, it can be considered that robot has found gas source.
4. A novel hybrid information-based PF-WOA algorithm
In the procedure of IPF-WOA algorithm, gas diffusion model is firstly exported from Fluent software as robot measurement data. Then the algorithm gets into plume discovery phase, gas concentration information and wind direction information are combined for plume finding. After that, the algorithm gets into plume tracking phase. Particle positions are randomly initialized while weights and probabilities are initialized with average values. Subsequently, particle weights are calculated, and robot moves toward the maximum entropy direction with a certain step length. Then, importance sampling is performed to avoid particle degradation phenomenon, and resampling is conducted based on a calculated value to prevent particle dissipation caused by importance sampling. WOA facilitates particle motion and alliteratively approach optimal particle’s position. When the maximum distance between particles is less than threshold for two consecutive times, it is considered as the algorithm converges and then returns optimal particle position. Finally, in source conformation phase, the cumulative mass flux of the grid at robot’s location is calculated to determine whether gas source has been correctly identified.
In this algorithm, robot’s position is simplified to a point, and the disturbance to gas plume caused by robot’s movement is not considered. Theoretically, IPF-WOA algorithm is applicable to gas source localization problems for all unconstrained mobile robots in three-dimensional space. Assuming the number of particles is $n$ and there are $m$ iterations, the time complexity of the IPF algorithm is $O(mn)$ . Since the IPF-WOA algorithm uses WOA to guide particle convergence, and the time complexity of each iteration is linearly additive, the time complexity of the hybrid algorithm remains $O(mn)$ . Flowchart and pseudo code of IPF-WOA algorithm are shown in Figure 1 and Figure 2, respectively.
5. Case study
To comprehensively evaluate IPF-WOA algorithm performance, experiments are conducted using multiple gas dispersion models and compared horizontally with various algorithms.
5.1. Introduction to the simulation environment
In the simulation environment, experiments were conducted using the Windows 11 operating system and Spyder software from Anaconda. The gas concentration data measured by the robot in the experiment was provided by CFD simulation data exported from Fluent software. Fluent is a renowned CFD computation software under ANSYS, known for its high computational accuracy and efficiency. It employs finite element principles for gas concentration field computation and can provide various data including wind speed, gas concentration, gas density, etc. The version of Fluent used in this experiment is 2021R1.
5.2. Performance evaluation of the improved WOA algorithm
To evaluate the performance of the improved Whale Optimization Algorithm (IWOA), 10 benchmark test functions from IEEE CEC2017 competition were used. These 10 benchmark functions are unimodal problems, with dimensions selectable from 2D, 10D, 50D, and 100D; in this case, the tests were conducted in 10 dimensions. Comparative algorithms include original WOA algorithm [Reference Chunbo, Yuwei, Xuelong, Yalan and Du25], DCOA algorithm [Reference Jolen, Christoforos, Larion, Lev, Tatyana, Sergey, Alexander and Igor26], and BICMA-ES algorithm [Reference Jin, Zhang, Jiang and Tian27]. These comparison algorithms are relatively new swarm intelligence algorithms that are widely applied and excel in single-peak function optimization. Their performance is stable and outstanding. For both IWOA and WOA algorithms, population size was set to 100, with 100 iterations. Parameter settings for COA algorithm followed those specified in the corresponding paper, so as CMA-ES algorithm but with 1000 iterations. Each algorithm was run 25 times, and the mean and standard deviation of optimal fitness values are shown in Table I:
The best results in Table I are highlighted in bold. It can be observed that for datasets C01, C02, C04, C06, C08, C09, and C10, the IWOA algorithm shows the best average values and standard deviations, indicating that IWOA algorithm has accurate and stable search effects on these datasets. Additionally, IWOA algorithm performs well in terms of average fitness on dataset C07, suggesting that it can filter out certain interference, with WOA algorithm having the smallest standard deviation on this dataset due to its excellent stability. However, IWOA algorithm performs poorly on datasets C03 and C05, where DCOA and BICMA-ES algorithms show the best average values, while WOA algorithm exhibits the best stability. This is because such functions have high coupling, but such issues are not encountered in practical source-seeking processes.
Friedman test is a non-parametric statistical test used to compare the median differences among multiple related samples. The test was conducted separately for the average values and standard deviations. The computed TF values are 12.36 and 18.36, respectively, with corresponding p-values of 0.00624 and 0.0004. Since the p-values for both tests are much smaller than 0.05, it indicates that there are very significant differences in the results of different algorithms across various datasets. To make these differences more apparent, a subsequent Nemenyi test will be performed. Nemenyi test is a method for multiple comparisons typically conducted after Friedman test. When Friedman test shows significant differences, Nemenyi test is used to determine which specific groups differ from each other. This method calculates the average rank for each group and then computes the critical difference (CD) value. If the difference in average ranks between two groups exceeds the CD, it is considered that there is a significant difference between those groups.
The subsequent Nemenyi test produced the following CD (Critical Difference) diagrams:
Figure 3(a) shows the results of Nemenyi test for average values, with the X-axis representing the average ranks of algorithms across different datasets and the Y-axis representing the different algorithms. From the figure, it can be seen that IWOA algorithm ranks highest, followed by DCOA, WOA, and BICMA-ES. This indicates that IWOA algorithm performs the best in terms of accuracy for unimodal function optimization. Figure 3(b) presents Nemenyi test results for standard deviations, with the X-axis and Y-axis having the same meanings as in Figure 3(a). The algorithm ranking is IWOA, WOA, DCOA, and BICMA-ES, which shows that IWOA algorithm is the most stable across multiple optimization runs. In summary, IWOA algorithm demonstrates significant advantages over other algorithms in terms of both mean performance and stability.
5.3. Construction of a 3D gas diffusion model based on KDTree CFD method
Fluent software is used to calculate turbulent flow field full of gas. Firstly, SpaceClaim software is used to establish a rectangular indoor model with a size of 10 m × 20 m × 5 m. Gas source center located in (4.5 m, 3.5 m, 1.2 m). Then, model is imported into Mesh software for grid partitioning, average quality of grid cells after partitioning is 0.83671, average orthogonal quality is 0.769, while average feature length is 122.14 mm. From the data above, it can be seen that grid quality is trustworthy.
After the grid is imported into Fluent, XZ plane at Y = 0 is settled as air inlet, and XZ plane at Y = 20 is settled as air outlet, with a wind speed taken as 1 m/s. Gas mixture of C2H5OH and H2O is released from gas source, with 20% C2H5OH accounting. Realizable κ-ε model is used for steady-state simulation calculation, then calculation results are imported into CFD-Post software. Schematic diagram of gas diffusion model displayed by the software is shown in Figure 4:
Export the calculation result file in ASC II format by using Fluent, which includes all node coordinate position information, velocity vector component information in X, Y, and Z directions, C2H5OH mass concentration, and gas density of each node. The file is converted into an Excel format file for subsequent processing.
Due to prolonged time required for sequentially browsing and traversing each node’s data to find matching particle positions, a KDTree (K-Dimensional Tree) is employed to expedite browsing speed. A KDTree is a tree data structure used to store instances in k-dimensional space for efficient retrieval. Each node in the tree represents a binary tree for k-dimensional points. Assuming there are “n” data points, time required for sequentially traversing all data points would be $o(n)$ , while using KDTree method, computational consumption is reduced to $o(\mathit{\log } n)$ , significantly reducing computational time of the algorithm.
5.4. Simulation results of source localization
Gas diffusion model used for simulation is consistent with the example in Section 5.3. Assuming initial position of robot is located at (9 m, 15 m, 2 m), the simulation starts with a Z-shaped search. Robot’s searching trajectory is illustrated in Figure 5, where red cross represents starting point, cyan line represents robot’s movement trajectory, orange pentagram indicates discovered plume position, and blue dots represent points robot has passed through. Robot identifies plume position as (5.58 m, 8.77 m, 2 m), with a gas concentration of 0.0062 at that location through the algorithm. From the figure, it can be seen that the robot moves in a zigzag pattern, successfully locating the plume after thoroughly searching the plane.
Search area is divided into 1000 grids of dimensions 1 m×1 m×1 m each. Robot’s next movement direction is planned by calculating total Shannon entropy of particles falling into each grid. Simulation results from plume tracking phase are depicted in Figure 6, where the robot advances in steps taken as 0.2 m. Blue dots represent particle positions, black dots denote robot’s position, and robot’s trajectory is connected by red line segments.
5.5. Impact of environmental parameters on IPF-WOA algorithm
In this algorithm, initial particle counts have an impact on source location accuracy, success rate, and iteration count. Running the algorithm with different initial particle numbers for 50 iterations each, source location success rate, total iteration count, Euclidean distance from gas source, maximum iteration count, and minimum iteration count are presented in Table II. It can be observed that when particle number is 300, the number of successful source-seeking instances is the highest, and the accuracy is the greatest. When the number of particles is 100, the number of iterations is the least. This is because as particle number increases, the number of successful source location instances gradually rises, and Euclidean distance gradually decreases. However, due to increased computational resources consumed by a larger particle count, average total iteration count and minimum iteration count also increase. Similarly, with the increase in particle number, IPF-WOA algorithm can more quickly find optimal particle position, leading to a corresponding decrease in the maximum iteration count.
Among environmental factors, wind speed has a certain impact on iteration counts of the algorithm. In this experiment, a gas diffusion model with wind speeds ranging from 1 to 10 m/s was simulated. CFD calculations were performed using Fluent, and the results were exported to serve as gas concentrations measured by the robot. As wind speed increases, the change in source-seeking accuracy for cases with 100, 200, and 300 particles is illustrated in Figure 6. Each wind speed scenario is run 20 times.
From Figure 7, it can be observed that as wind speed increases, source localization accuracy shows an improving trend for particle numbers of 200 and 300. However, when particle number is 100, source localization accuracy is unstable. This is mainly due to the insufficient number of particles, which has a certain impact on global search capability.
Since total iterations include plume tracking phase and source conformation phase, in order to reflect the wind speed impact on particle convergence better, only iterations during plume tracking phase are counted. Similarly, each type of wind speed and particle counts runs 20 times, and comparison results between average iteration counts and wind speeds are shown in Figure 8:
It can be seen from Figure 8 that the lower wind speed is, the more iteration counts will be.
From Figure 9, it can be observed that as robot continuously moves towards the maximum entropy grid, the maximum entropy increases. This guides robot towards gas source location until particle convergence and information entropy of grid reaches its maximum value. Wind speed impact on entropy is not significant.
When there are 200 particles and wind speeds of 3, 5, 7, and 9 m/s, the gas concentration measured by the robot during each movement is shown in Figure 10. In the figure, Y-axis represents the concentration of leaked gas in the air measured by robot during each movement, and X-axis represents the number of iterations, which corresponds to the number of times robot moves forward. Each iteration of the algorithm equates to one step forward for robot. The figure illustrates gas concentration measured by robot each time it moves forward. On the Y-axis of Figure 10 is the gas concentration measured by robot at each movement, and on the X-axis is iteration number. The algorithm advances the robot one step with each iteration. From Figure 10, it can be seen that at wind speeds of 3 and 9 m/s, IPF-WOA confirms finding gas source after 21 iterations. At wind speeds of 5 and 7 m/s, confirmation occurs after 22 iterations. Gas source concentration is 20%. It’s evident that upon reaching gas source location, the measured gas concentration increases significantly, with corresponding large fluctuations in gas mass flux. Confirming gas source involves calculating the gas mass flux and comparing it with a threshold.
5.6. Comparison of different algorithms
To verify the robustness of IPF-WOA algorithm, two following models are established: gas source is centered in (8.6 m, 1.8 m, 0.8 m) and (1.8 m,1.5 m,1 m), gas concentration data are calculated by Fluent, other settings are consistent with those described in Section 6.2. Schematic diagrams of the two gas diffusion models are shown in Figure 11(a) and (b), respectively. The former is named model A and the latter is named model B.
For Model A and Model B, when initial particle counts are taken as 300, robot motion trajectories are shown in Figure 12.
Due to variations in robot motion among different algorithms, the number of iterations is compared only when the particle count is 300, 600, and 900, respectively, for each swarm intelligence algorithm to find and converge to optimal particle position. The gas diffusion models, denoted as Model A and Model B, are used for comparison. IPF-WOA algorithm is compared against HGWO algorithm [Reference Bangyal, Hameed, Alosaimi and Alyami28], DEGWO algorithm [Reference Yancang and Xiangyu29], WE-PSO algorithm [Reference Liu, Zhang, Guo, Chen and Liu30], and Improved Lion Algorithm based on Information Entropy (IIL) [Reference Bouwer, MacQuarrie, Gil, Slippers and Allison31,Reference Sidan, Shurui and Yan32], and the basic IPF algorithm [Reference Jin, Mu, Feng and Hei21]. Parameter settings for each algorithm are kept consistent with those specified in their respective papers.
To evaluate robustness of the algorithms, each algorithm has been run 50 times under different gas diffusion models and initial particle counts. All algorithm simulation results are compared in Table III, which includes successful source detections counts (Success_num), source localization accuracy (measured by Euclidean distance in meters, where a smaller value indicates higher accuracy), average iteration count(Aver_i), maximum iteration count(Max_i), and minimum iteration count(Min_i). The optimal values for each simulation result are highlighted in bold. It can be observed that proposed IPF-WOA algorithm demonstrates good robustness and performs well in gas source locating with both models.
IPF-WOA demonstrates excellent performance in terms of Success_num, source localization accuracy, average iteration count, and maximum iteration count. In the case of Model A with 900 particles, IIL algorithm exhibits a lower average iteration count. This is because IIL algorithm utilizes information entropy to assess the step size of cubs, which accelerates convergence and benefits local search. However, it reduces the guidance force of head lions on lion swarm, resulting in a lower Success_num. Concerning the minimum iteration count, WE-PSO algorithm performs better. This is because the initial distribution of particles significantly affects algorithm’s performance, and WE-PSO algorithm utilizes WELL method for particle swarm initialization, which speeds up convergence. However, with fewer iterations, it is prone to getting trapped in local optima, and initialization effect is unstable. In terms of maximum iteration count, its performance is not ideal. Regarding the stability of iteration counts, IPF-WOA algorithm still holds its advantage.
Compared to the basic IPF algorithm, IPF-WOA algorithm incorporates IWOA algorithm to guide particle convergence, significantly reducing the number of iterations and improving search efficiency. The addition of a random inertia perturbation term further enhances the hybrid algorithm’s ability to strengthen local search capabilities while avoiding getting trapped in local optima. This is reflected in a notable improvement in both success rate and accuracy of source-seeking.
In summary, the comparison of 5 simulation results shows that IPF-WOA algorithm has more advantages.
5.7. Validation of algorithms using experimental dataset
The present experiment utilizes a public dataset provided by Bouwer et al. [33]. Blank group dataset is selected as gas diffusion model. This model releases carbon dioxide gas in a stable flow velocity space with a size in 3 m × 2 m × 2 m, a total of 175 measurement points are settled in the space. Due to gas plume tending to stabilize from the 7th to the 44th second, these data are taken to calculate average concentration at each point as gas diffusion model. Missing information types such as wind speed in the original dataset are provided by Fluent. To correspond with data exported by Fluent, carbon dioxide concentration data at other grid nodes were calculated using interpolation based on the original 175 data points. This interpolated data was then used as gas concentration measurements for the robot. Assuming gas source position as origin and initial robot position is (3.5,1,0.6). Searching results proposed by IPF-WOA algorithm and other four algorithms are shown in Table IV, with a particle size of 300,600,900 and 50 runs each.
From Table IV, it can be seen that the IPF-WOA algorithm exhibits optimal source-seeking performance when the number of particles is 300, 600, or 900. This is because the improved PF algorithm within the IPF-WOA algorithm has a high fault tolerance rate in the face of complex real-world three-dimensional turbulent gas environments. It can disregard erroneous gas concentration data caused by turbulent fields, thereby improving the success rate and accuracy of localization. The IWOA algorithm enhances local search capabilities while avoiding local optima, reducing the number of iterations and time required for gas source localization. Compared to the basic IPF algorithm, the success rate, accuracy, and efficiency of source-seeking have all improved. In summary, these results affirm that IPF-WOA algorithm can still maintain a good success rate in source location with real dataset, fewer iterations are required compared to the other algorithms, and the algorithm’s capability to efficiently localize gas sources within 3D environments.
6. Conclusion
This paper proposes the IPF-WOA algorithm, investigates the impact of environmental parameters on the algorithm, and compares the proposed method with other algorithms. This algorithm not only has research and application value in gas leak source localization but also holds potential application value in areas such as earthquake disaster personnel rescue, forest fire source detection, and counter-terrorism bomb disposal. Firstly, KDTree is utilized to retrieve concentration information from the three-dimensional gas dispersion models output by CFD simulation software, serving as the basis for the robot’s actual gas concentration measurements. Then, the IPF-WOA algorithm is employed to move the robot and calculate the gas mass flux to confirm the output gas source location. In the experimental section, statistical tests are first used to compare IWOA algorithm with original WOA, DCOA, and BICMA-ES algorithms. Influence of different wind speeds on IPF-WOA algorithm is investigated, demonstrating its ability to successfully locate gas source with high success rates, accuracy, and speed across various gas dispersion models (Models A and B). Subsequently, within the same three-dimensional gas dispersion model, IPF-WOA algorithm is compared with IEPF-R, IPSO, WE-PSO, and IIL algorithms. Finally, the performance of IPF-WOA algorithm is tested using publicly available datasets as experimental data. Experimental results demonstrate that IPF-WOA algorithm outperforms other algorithms in both positioning accuracy and iteration count. It can effectively achieve precise localization of hazardous gas leakage sources and can further extend its applicability to other localization problems.
The existing IPF-WOA algorithm performs excellently in small-scale search spaces (range from meters to tens of meters), making it suitable for most chemical gas leak scenarios. Even in large-scale search spaces (range from hundreds of meters to several kilometers), it can enhance source-seeking efficiency by narrowing the search area during the plume-searching phase. In different gas environments, whether it is free diffusion, weak turbulence, or strong turbulence, the algorithm has a certain degree of fault tolerance and can effectively perform gas source localization tasks. Additionally, in complex scenarios with obstacles, IPF-WOA can be optimized by superimposing multiple positive and negative sources, and robots with obstacle avoidance capabilities can be used for faster searches. This algorithm is suitable for any robot capable of autonomous movement in a three-dimensional environment, using data measured by sensors onboard the robot to locate gas releasing source.
Current issues and improvement directions for the algorithm include the following:
-
1. With a smaller number of particles, iteration counts may increase, potentially extending the time required for source-seeking. It is essential to focus on optimizing the computational efficiency of IPF-WOA algorithm and developing its real-time application capabilities, enabling it to respond quickly and adapt to environmental changes in real-world environments during emergencies.
-
2. This study treats robot as a point and ignores the disturbance to gas plume caused by robot’s movement. In real-world environments, it is necessary to develop airflow disturbance models tailored to different search robots and integrate these models with gas diffusion model. Additionally, this algorithm can be extended to multi-robot systems to further improve the efficiency and accuracy of source localization.
Author contributions
L. W. completed the conceptual part of Chapter 2, including the review and editing of the methodology and software. Her work involved an in-depth analysis of the research background and related theories, as well as evaluating and modifying the code, laying a solid foundation for the smooth progress of the research. ZY. R. was responsible for collecting and organizing materials, ensuring the accuracy and completeness of the data collection and preprocessing, and drafting the initial manuscript. Y. Z. primarily handled the rewriting and editing of the manuscript, making multiple revisions to improve the quality and logic of the paper, ensuring academic standards and accuracy of expression. SR. F. was responsible for obtaining resources and funding. He provided the necessary resource support for the research and successfully applied for relevant research funds, ensuring the smooth conduct of the study. All four authors reviewed the manuscript, proofreading and editing its content and format. Each author has read and agreed to the final published version of the manuscript. Each author played a crucial role in the research process, making indispensable contributions to the successful writing of the paper.
Financial support
This work was supported by National Natural Science Foundation of China (Grant no. 42075129).
Competing interests
The authors have no competing interests to declare that are relevant to the content of this article.
Ethical approval
Not applicable.