AHybrid Algorithm for Gas Source Locating Based on Unmanned Vehicles in Dynamic Gas Environment

A new method for locating hazardous gas source based on unmanned vehicles is presented in this paper. Based on the gas sensors and unmanned vehicles, the research on the gas source location algorithm, using the gas concentration of several detection sites as heuristic information, is carried out. When the available information is less, such that the gas diffusion model is unknown, the algorithm can locate the gas leakage source quickly. +e proposed algorithm combines particle swarm optimization (PSO) and Nelder–Mead simplex method. Compared with the standard PSO, the proposed algorithm has fewer iterations and faster convergence speed. Finally, the feasibility of the algorithm is verified by digital simulation experiments.


Introduction
In recent years, many hazardous gas leakages have occurred, causing serious economic losses. How to locate the leakage source quickly and accurately is the key to deal with this kind of emergencies. Many studies have been carried out in this area by researchers in various countries, and many different methods have been put forward. Among them, the active olfactory method based on mobile robot system and sensor system is a popular research in this field. In 2002, Hayes divided the problem of using mobile robots to discover gas sources into three subtasks: plume finding, plume tracking, and source declaration [1]. Since there is no gas concentration information in the process of plume finding, traversal search strategy and random search strategy are generally used. e process of plume tracking is to search the position of gas source step by step by using the heuristic information such as gas concentration. Source declaration is the process of finding a maximum concentration point and then confirming it as the gas source. In the early studies, most scholars have used the gas concentration gradient to locate the gas source. However, the actual gas environment is more complex, and it is difficult to achieve good results in the actual environment by relying solely on the gas concentration gradient. A few scholars have proposed model-based method for locating gas source. However, this method is highly dependent on environmental information and is difficult to apply in different environments. e main problem with these methods is that the propagation of gas is usually dominated by turbulence rather than diffusion [2]. e structure of plume in turbulent environment is very complex, and the study of gas source location in turbulent environment is more challenging.
With the continuous development of random optimization algorithms, the application of the random algorithms has unique advantages in nonlinear optimization problems and provides a new research direction for gas source location [3]. Many researchers have used random algorithms to solve the problem of gas source location and have achieved important results. In this paper, the gas source location by unmanned vehicles based on PSO is studied, and a gas source location algorithm combining PSO and Nelder-Mead simplex method (NMSM) is presented. Based on the gas concentration sensors and unmanned vehicle system, the algorithm can use limited environmental information to locate the gas source in a dynamic gas field. PSO is a classical swarm intelligence algorithm, which has good optimization ability in solving complex optimization problems. Marques et al. used PSO to control multiagent for searching odor sources [4]. e paper points out that the standard PSO algorithm is better than gradient-based algorithms (GRD) and biased random walks (BRW). However, the paper does not consider the ability of a single unmanned vehicle to locate the gas. e work in this paper is different from the previous work. e method in this paper can be used to locate the gas source using a single unmanned vehicle; the performance of this method is better when the number of unmanned vehicles is less. e efficiency of standard PSO for gas source location is unstable in dynamic gas field. e change of gas concentration sometimes causes serious local oscillation of particles. One of the popular research fields is using hybrid algorithm to locate hazardous gases. e introduction of Nelder-Mead simplex method can effectively reduce the redundant oscillation of particles. e research of this paper is based on the hybrid algorithm combining PSO and NMSM; the unmanned vehicle system with gas concentration sensor is used to locate the gas leakage source quickly with limited information. Compared with the standard PSO for seeking gas source, using this algorithm has a better stability and less iterations. e study has some enlightening significance for gas leakage source location.

Global Search Method.
e global search method is used in the plume finding phase to locate the gas field as soon as possible before obtaining any gas concentration information. In this paper, the Z-shaped traversal search method is used. e method can ensure the search speed and success rate when the appropriate step size is set. e unmanned vehicle detects the gas concentration once after moving one step and changes the direction when it moves to the boundary of the search area. When the detected concentration value reaches the sensor threshold, the global search ends and the local search begins. (PSO). PSO was first proposed by Kennedy and Eberhart in 1995 [5]. In search space, n particles represent n individuals. Each particle has two attributes of position and velocity. e current position of the particle is a candidate solution of the optimization problem. e velocity of the particle is an update direction of the solution.

Particle Swarm Optimization
e mathematical description of PSO is as follows: in D-dimensional search space, the number of particles is n.
e position of the i-th particle is represented by the vector x i � (x i1 , x i2 , . . ., x iD ), and the velocity of the i-th particle is represented by the vector v i � (v i1 , v i2 , . . ., v i D ). e optimal position of the i-th particle is pbest i � (p i1 , p i2 , . . ., p iD ); the global optimal position of the particle swarm is gbest � (g 1 , g 2 , . . . , g D ).
e velocity and position of the particles are updated according to the following formula: where ω is a nonnegative number, which is called inertia weight, c 1 and c 2 are acceleration factors. r 1 and r 2 are random numbers between [0, 1]. T is the current iterate number. e initial position and velocity of the particle swarm are generated randomly, and then the position and velocity are updated iteratively according to the formula until the solution satisfying the condition is found or the total iteration number is reached. In this paper, the linear inertia weight decline strategy proposed by Shi and Eberhart is adopted [6,7], and its update formula is where T is the total iteration number of the algorithm. ω max and ω min are the maximum and minimum of inertia weight, respectively. In this paper, the algorithm generates n detection sites as the positions of n particles in each iteration, and the unmanned vehicle detects the gas concentration of n sites as the fitness of the n particles. e long-distance movement of the unmanned vehicles will increase the time of gas source location. A smaller range of the velocity of particles should be set to ensure that the vehicles has a smaller moving distance in each iteration. In the PSO initialization phase, the gas concentration at the initial positions of n particles is detected to assign the n individual and global optimal positions. Too many detection sites in each iteration will increase the locating time, so it is more appropriate to have four to six particles. Increasing the number of vehicles can reduce the number of sites that each vehicle needs to detect in each iteration. When using m vehicles for gas source location, each vehicle detects n sites in each iteration. rough wireless communication technology, the position with the historical highest concentration detected by all the vehicles is regarded as the global optimal position gbest. e site with maximum concentration detected by each vehicle is taken as the individual optimal position pbest 1 , pbest 2 , . . ., pbest m . e updating formula of the velocity and position of the i-th site detected by the j-th vehicle is represents the velocity of the i-th detection site of the j-th vehicle. pbest j � (p j1 , p j2 , . . ., p jD ) represents the highest concentration site detected by j-th vehicle. When one of the vehicles first finds the location of the gas source, the algorithm ends. e standard PSO may exhibit serious oscillations in the dynamic gas field. Nelder-Mead simplex method is introduced to guide the particles to jump out of the oscillations.

Nelder-Mead Simplex
Method. NMSM was first proposed by Nelder and Mead in 1965 [8]. is method can complete the optimization process directly according to the function value, without the derivative information of the objective function. Because the algorithm is effective and the program is simple, the algorithm is widely used in the field of low-dimensional function optimization [9].
In D-dimensional search space, a geometry is composed of D + 1 D-dimensional vertices X 1 , X 2 , . . ., X D+1 . e worst vertex is denoted by X w and the centroid of all vertices except X w is denoted by X c . e search direction is from X w to X c . Four operations are used in the basic NMSM: reflection, expansion, outer contraction, and inner contraction.
In this paper, the NMSM is modified to guide particles out of local oscillation. After each iteration of PSO, the execution conditions of the simplex method are judged once. e method is executed under the following conditions: where t is the current iterate number and f(t) and f(t − k) are the optimal fitness of PSO at present and t − k generation, respectively. e threshold ε is between [0, 1]. f diff is the difference between the optimal fitness of two adjacent iterations.
In the simplex method modified in this paper, the reflection operation is used to guide the particles. When the optimal fitness of continuous k iteration of PSO accords with the conditions of implementing the simplex method, the n detection sites of the t − k generation of PSO are operated. e point with the highest concentration of gas in the n sites is denoted by x h , the site with the lowest concentration is denoted by x l , and the nearest site to the average position of n sites is denoted by x a . e center point of x h and x a is denoted by x c . e new site from reflection operation is denoted by x r , as shown in Figure 1. e formula for x r is Set a maximum distance for each move of the unmanned vehicles to avoid x r being too far away. If the gas concentration of x r is greater than the detected maximum gas concentration, the global optimal solution of PSO is updated to x r . Otherwise, the global optimal solution is unchanged. If the gas concentration of x r is greater than the current worst particle fitness, the position of the worst particle is updated to x r . Determine whether the individual optimal position of the particle needs to be updated. After the simplex algorithm is completed, the next iteration of PSO algorithm is carried out until the termination condition is satisfied. e flowchart of PSO-NMSM hybrid algorithm is shown in Figure 2.

Problem Description.
Suppose that, in a certain range of plane environment, m unmanned vehicles equipped with gas concentration sensor are used for gas source search. e problem can be described as follows.
(a) ere is a gas leakage source with unknown coordinates in a two-dimensional rectangular domain of L x × L y . (b) ere is a continuous and dynamic gas concentration field near the gas leakage source, and the concentration value is the largest at the coordinate of the leakage source. (c) e coordinate of each detection site is represented by (x, y). e concentration value C (x, y) of the coordinate can be detected when the vehicles arrive at the detection site. Each site and its concentration value will be recorded. (d) e coordinates and concentration values are calculated by the algorithm to obtain the next detection site until the vehicles find the leakage source.
In this paper, we use the classical Gaussian puff model to simulate the gas diffusion process [10]. Under the action of wind with random factors, the puff drifts at a certain direction and speed in the two-dimensional rectangular flat land of 100 m × 200 m, forming a gas diffusion model with variable wind direction and speed. e concentration of the gas source reaches the order of 10 −4 kg/m 3 . e experiment simulates the diffusion process of the puff in 0 to 250 minutes. e unmanned vehicles start searching for the gas leakage source after the source continued to leak for 150 minutes, as shown in Figure 3. e puff continued to diffuse during the vehicles search, ignoring the concentration change caused by the vehicles. e digital simulation experiment is based on MATLAB environment. e search area is divided into rectangular areas which are 200 units long and 100 units wide, and the unit scale of coordinate grid is 1 m. e moving speed of the vehicles reference to the speed of the search and rescue robot, which is set as 2.2 m/s. e response time of the gas concentration sensor is set to 5 s, and the vehicles are stationary when measuring the concentration of the sites.

Simulation of Seeking the Source for Single Unmanned
Vehicle. In the plume tracking phase, the unmanned vehicle detects four detection sites in each iteration of PSO (m � 1, n � 4). Z-shaped traversal search method is used in the plume finding phase, and PSO-NMSM hybrid algorithm is used in the plume tracking phase. All detection sites are connected in sequence with straight lines, which can be used as a diagram of the vehicle's motion path, as shown in Figures 4(a) and 4(b). In this simulation, the iteration number of the algorithm was 15, 139 detection sites were detected by the vehicle, and the locating time was 1023.9 s. Among them, 72 sites were detected during the plume finding phase, and the finding time was 531.2 s. Sixty-seven sites were detected during the plume tracking phase, and the   Mathematical Problems in Engineering tracking time was 492.7 s. For comparison, we also performed experiments using standard PSO with the same experimental scenario. Figure 4(c) shows that the vehicle using standard PSO may fail into oscillation for a long time.
e global optimum fitness curve shows that the hybrid algorithm proposed in this paper can jump out of the oscillation faster than the standard PSO when the vehicle is trapped in the oscillation. Figure 5 shows the global optimum fitness curves for the two algorithms.
To verify the performance improvement of the algorithm, five groups of experiments were performed on standard PSO algorithm and PSO-NMSM hybrid algorithm. Each group repeated the simulation 20 times. e average iteration number, minimum iteration number, maximum iteration number, average locating time, minimum locating time, and maximum locating time of each group were counted. e data are shown in Tables 1  and 2. Compared with standard PSO, the average iteration number is reduced by 27.6%, and the average locating time is reduced by 12.2%. NMSM can improve the performance of standard PSO when it performs poorly. e maximum locating time of each group is reduced by 23.6% on average. e hybrid algorithm is more stable and more suitable for gas source location.

Simulation of Seeking the Source for Two Unmanned
Vehicles.
e hybrid algorithm proposed in this paper can also be applied to gas source location using multiple unmanned vehicles. We studied gas source location using two unmanned vehicles. At the same position on the boundary of the search area, two unmanned vehicles search in different directions using the Z-shaped search method. Each vehicle detects two detection sites in each iteration of PSO (m � 2, n � 2). e parameter settings for unmanned vehicles and gas sensors remain unchanged. e simulation process is shown in Figure 6. In this simulation, the iteration number of the algorithm was 21, 216 detection sites were detected by the vehicles, and the locating time was 781.3 s. Among them, 122 sites were detected during the plume finding phase and   the finding time was 454.3 s; 94 sites were detected during the plume tracking phase, and the tracking time was 327.0 s. We also performed five groups of experiments for gas source location using two unmanned vehicles, each group repeated the simulation 20 times, and the data are shown in Table 3. Compared with experiments using single vehicle, the total locating time is reduced by 31.7% and the plume tracking time is reduced by 45.3% on average. Increasing the number of unmanned vehicles is one of optimization methods for gas source location.

Conclusion
In this paper, the gas leakage source location by unmanned vehicles in a dynamic gas field based on PSO is studied, and PSO combined with Nelder-Mead simplex method is presented. e hybrid algorithm is more suitable for the problem of gas source location and provides a new way to solve this problem. As a classical swarm intelligence algorithm, PSO has unique advantages in gas source location. e algorithm does not rely on wind direction information and concentration gradient information. It is not limited by function constraints, such as continuity and differentiability. PSO can memorize the individual and global optimal solutions, thus ensuring that the vehicles can return quickly after leaving the gas field, without additional consideration of the problem of plume rediscovery [11]. e algorithm has a good reliability when the gas model is unknown and the available information is less. However, in a dynamic gas field, especially when a single vehicle is used to locate the gas source, standard PSO may produce severe oscillations. e hybrid algorithm with NMSM can overcome the disadvantage of the standard PSO in gas source location.
Compared with standard PSO, the PSO combined with the Nelder-Mead simplex method presented in this paper shows obvious improvement and innovation in gas source location. e introduction of NMSM effectively reduces the oscillation phenomenon. e experimental results show that the iteration number is reduced, the stability of the algorithm is improved, and the locating time of the vehicles is shorter. e algorithm has fewer detection sites and reduces the influence of long response time of gas sensor. e algorithm proposed in this paper can be applied to the gas source location by a single unmanned vehicle. It also has a pretty good performance when the number of vehicles is less. e algorithm guarantees that each vehicle has good separate locating capability. If one or more vehicles fail in the gas source location of multi-unmanned vehicles, the normal vehicles are less affected and can continue to complete the gas source location. e research on this hybrid algorithm still needs to be further improved. For example, the occasional severe oscillations that cannot be overcome by simplex method will lead to long locating time. e simulation experiment also needs to be done in a more complex environment. At present, the hybrid algorithm can be realized by the existing technology of unmanned vehicles and gas sensors [12], and the gas source locating system needs to be tested in real gas field.
Data Availability e raw/processed data required to reproduce these findings cannot be shared at this time as the data also form part of an ongoing study.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.