You are on page 1of 11

Atmospheric Environment 157 (2017) 27e37

Contents lists available at ScienceDirect

Atmospheric Environment
journal homepage: www.elsevier.com/locate/atmosenv

Locating hazardous gas leaks in the atmosphere via modified genetic,


MCMC and particle swarm optimization algorithms
Ji Wang a, Ru Zhang a, Yuting Yan a, Xiaoqiang Dong a, b, Jun Ming Li a, *
a
Key Laboratory for Thermal Science and Power Engineering of Ministry of Education, Department of Thermal Engineering, Tsinghua University, Beijing
100084, China
b
The State Key Laboratory of NBC Protection for Civilian, Beijing, 102205, China

h i g h l i g h t s

 A three-stage leak source localization method for hazardous gases was developed.
 1. Quick preliminary source inversion with a modified genetic algorithm.
 2. Determination of a search zone using Markov Chain Monte Carlo sampling.
 3. Robots search with guaranteed convergence particle swarm optimization.
 Leak source was localized within 1.0 m with measurement error smaller than 2.0.

a r t i c l e i n f o a b s t r a c t

Article history: Hazardous gas leaks in the atmosphere can cause significant economic losses in addition to environ-
Received 18 October 2016 mental hazards, such as fires and explosions. A three-stage hazardous gas leak source localization
Received in revised form method was developed that uses movable and stationary gas concentration sensors. The method cal-
4 March 2017
culates a preliminary source inversion with a modified genetic algorithm (MGA) and has the potential to
Accepted 7 March 2017
Available online 10 March 2017
crossover with eliminated individuals from the population, following the selection of the best candidate.
The method then determines a search zone using Markov Chain Monte Carlo (MCMC) sampling, utilizing
a partial evaluation strategy. The leak source is then accurately localized using a modified guaranteed
Keywords:
Source inversion
convergence particle swarm optimization algorithm with several bad-performing individuals, following
Hazardous gas leak selection of the most successful individual with dynamic updates. The first two stages are based on data
Genetic algorithm collected by motionless sensors, and the last stage is based on data from movable robots with sensors.
Markov Chain Monte Carlo The measurement error adaptability and the effect of the leak source location were analyzed. The test
Particle swarm optimization results showed that this three-stage localization process can localize a leak source within 1.0 m of the
source for different leak source locations, with measurement error standard deviation smaller than 2.0.
© 2017 Elsevier Ltd. All rights reserved.

1. Introduction collected by stationary sensors mainly contains optimization al-


gorithms and probability distribution sampling. Optimization al-
Atmospheric hazardous gas leaks can cause serious damage, gorithms includes pattern searches, simplex optimization,
such as explosions and asphyxiation. Therefore, methods are simulated annealing algorithms, genetic algorithms (GA) and
needed to quickly localize any leaks (i.e. source inversion). At pre- evolutionary algorithms. Rege used artificial neural networks for
sent, there are two methods to localize the leak source, which are source inversion (Rege and Tock, 1996; Reich et al., 1999), but this
calculation localization with data collected by stationary sensors algorithm requires large amounts of data for training. Thomson
and dynamic search by movable robots. et al. (2007). used a simulated annealing method for source
The calculation methods used for source inversion with data inversion to search for several leak sources. Zheng et al. (Zheng and
Chen, 2010). used a pattern search algorithm for source inversion.
Recently, GA showed strong applicability in dealing with nonlinear
complex source inversion problems. Allen et al. (2007). showed
* Corresponding author.
that GA can be used for source inversion through analogue
E-mail address: lijm@tsinghua.edu.cn (J.M. Li).

http://dx.doi.org/10.1016/j.atmosenv.2017.03.009
1352-2310/© 2017 Elsevier Ltd. All rights reserved.
28 J. Wang et al. / Atmospheric Environment 157 (2017) 27e37

simulations and experiments with a forward diffusion model as actively searching for possible leak sources and has drawn much
well as a backward acceptance model. Haupt et al. (2009). then attention. The spiral search method proposed by Hayes (Hayes
modified GA to solve multidimensional problems, such as source et al., 2002), the upwind rectilinear search method proposed by
inversion. They optimized the GA calculation, taking into account Russell et al. (2003), and the widely used zigzag ergodic search
the wind direction and velocity. More details of the application of method (Li et al., 2006; Balkovsky and Shraiman, 2002; Farrell et al.,
the GA for source inversion have been described by other re- 2003) all try to search all possible locations, but all require a mount
searchers (Yang et al., 2008; Khlaifi et al., 2009). Long et al. (2010). of time to find the leak source. Data types collected by robots are
analyzed the sensitivity of GA source inversion results to the data used to divide the plume traversal methods into Chemotaxis,
collected by sensors via simulation. Cervone et al (Cervone et al., Anemotaxis and Infotaxis methods. The Chemotaxis method is
2010; Cervone and Franzese, 2011). used an evolutionary algo- based on the gas concentration and mainly includes the airship
rithm for source inversion by independently setting the mutation algorithm given by Ishida et al. (1999). as well as the E. coli algo-
rate of every dimension. The evolutionary process in their model rithm (Holland and Melhuish, 1996). The Anemotaxis method
was based on machine learning, which extended the traditional (Lilienthal et al., 2006) refers to an upwind search, including the
evolutionary algorithm. Rodriguz et al (Rodriguez et al., 2011). multistage search algorithm (Ishida et al., 1996), plume central
studied the impact of sensor characteristics on GA source inversion upwind search algorithm (Russell et al., 1995), and silk moth al-
results. Cantelli et al. (2015). employed a multiple source optimi- gorithm (Russell et al., 2003). The Infotaxis method (Vergassola
zation GA along with Gaussian plume model to retrieve the loca- et al., 2007) refers to searches using entropy-based information
tions and emission rates of several pollutant sources, which verified on the concentration and wind information. A single robot can only
the possibility of GA for multi-source inversion. However, GA address a simple steady one-leak-source problem (Russell, 2004),
methods may experience premature convergence and high so most search strategies are based on multiple robots, including
computational costs, which were not considered by the Particle Swarm Optimization (PSO) (Kennedy, 2011; Li et al., 2008),
researchers. Ant Colony Optimization (ACO) (Dorigo et al., 2006; Zou and Luo,
Optimization algorithms can give one potential solution, though 2008), the Particle Filter Algorithm (Li et al., 2011) and the Evolu-
they may not be accurate due to measurement errors and inaccu- tionary Gradient Algorithm (Lochmatter et al., 2007). However,
rate diffusion models. Probability distribution sampling can provide these plume traversal algorithms still have some limitations, such
a zone with a high probability of including the leak, which seems to as a high computational expense, low error adaptability, and low
be more appropriate. This method mainly refers to Monte Carlo localization accuracy.
sampling. Sohn et al. (2000; 2002; 2003). successfully located a For the calculation method with data collected by stationary
leak source in a building by using the likelihood probability as the sensors, optimization algorithms (mainly GA) and probability dis-
adaptive value of Bayesian Monte Carlo (BMC) sampling method. tribution sampling (mainly MCMC) are strongly dependent on the
However, Qian et al. (2003). criticized the Monte Carlo methods due diffusion model, which is always inaccurate due to the complex
to their low sampling proficiency and long computation time. conditions during accidents. On the other hand, both GA and MCMC
Johansson et al (Johannesson et al., 2004). proposed a BMC source need a long computational time to get the reliable prediction.
inversion scheme and analyzed the usage of the Markov Chain Reducing the population size of GA may reduce the calculation time
Monte Carlo (MCMC) and Sequential Monte Carlo (SMC) methods. but can reduce the results accuracy meanwhile. A initial sampling
Chow et al. (2008). then expanded the scale to a city and used a point close to actual solution can reduce the calculation time of
better prior model based on the fluid dynamics. Senocak et al. MCMC, however it is hard to be found. Movable robots equipped
(2008). also improved Johansson's model, modifying the likeli- with concentration sensors can enter the accident zone and
hood function by taking into account prior knowledge. Marzouk actively search for the leak source. However, the robots need a long
et al. (2007). used a polynomial chaos expansion for the sampling time to accurately locate the leak source if the diffusion zone is
process, which is faster than random sampling. Keats et al. (2007). large. Therefore, a combined method using the data collected by
used prior knowledge of the source-sensor relationship to accel- both stationary and movable sensors may eliminate the disadvan-
erate the calculation. They concluded that a random diffusion factor tages of GA, MCMC and robot search to accurately and quickly
is a better empirical coefficient in the prior diffusion model because localize the leak source, which is the main work given by this paper.
it avoids the impact of inaccuracies in the diffusion model. Delle Specifically, the error adaptability of the localization method is
et al (Delle Monache et al., 2008). studied the pollution accident in analyzed for every step and the whole process.
Algeciras, Spain in 1998 with a Bayesian inference model combined
with MCMC. They certified that the BMC method can be used for
source inversion at the continental scale. Yee et al (Yee, 2008). 2. Methods and analysis
claimed that the combination of BMC and MCMC can be used to
solve the turbulent diffusion problem in both the Euler and 2.1. Leak field generation
Lagrange coordinate systems. They (Yee et al., 2008) also used the
reversible jumping sampling method in MCMC to address multi- The leak field is created based on a two-dimensional Gaussian
source problems with an unknown number of sources. Guo et al. plume model. The gas concentration was calculated as:
(2009). used MCMC for an unsteady source inversion based on " #( " #
data generated by the unsteady adjoint transport model. Keats et al. Q0 ðy  y0 Þ2 ðz  z0 Þ2
Cðx; y; zÞ ¼ exp  exp 
(2010). increased the accuracy of the MCMC method by employing 2puDy Dz 2D2y 2D2z
moving sensors whose locations were arranged based on infor- " #)
mation derived from the entropy theory. ðz þ z0 Þ2
þ exp  (1)
The localization method using movable robots was also studied 2D2z
by researchers. Movable robots equipped with sensors can search
for the leak source based on information regarding the wind and where C(x, y, z) is the gas concentration at (x, y, z), Q0 is the mass
gas concentrations. Hayes et al. (2002). divided this process into the flow rate of the gas leaking from location (x0 ; y0 ; z0 ), u is the wind
Plume Finding, Plume Traversal and Odor Source Declaration speed, and Dy and Dz are the standard deviations of a statistically
stages. The most important part is plume traversal, which refers to normal plume in the lateral and vertical dimensions, respectively,
J. Wang et al. / Atmospheric Environment 157 (2017) 27e37 29

which were developed by Briggs (1973) for stable (F) Pasquill Sta- Table 1
bility Class (Pasquill, 1961) Leak source and wind speed information.

( Source ID x0 y0 z0 Q0 u
Dy ¼ 0:04xð1 þ 0:0001xÞ0:5 #1 50 m 25 m 0 m 10,434 g/s 2.0 m/s
(2)
Dz ¼ 0:016xð1 þ 0:0003xÞ0:5 #2 250 m 25 m 0 m 10,434 g/s 2.0 m/s
#3 450 m 25 m 0 m 10,434 g/s 2.0 m/s
The test zone shown in Fig. 1 contained n ¼ 121 concentration #4 650 m 25 m 0 m 10,434 g/s 2.0 m/s
sensors spaced on a 1000  1000 m2 field at the same height z0 as
the leak source. The leak source and wind speed information are
listed in Table 1. The wind direction is positive along x axis as shown
in Fig. 1. The measured values smaller than the sensors’ sensitivity
(assumed to be 106 g/m3) are neglected. It is assumed that z0 and u
are known before the leak accident, so the localization process
seeks to determine x0, y0 and Q0.

2.2. Overview of the localization methods

Fig. 2 shows the whole localization process described in this


paper. The data collected by the motionless concentration sensors
is analyzed in the first two stages, and the concentration data
collected by the movable robots is used to conduct the MGC-PSO
calculation, which guides the search process of robots. For the
first stage, a possible leak source is given by MGA calculation from
the whole concerned zone. This possible leak source is used as the
initial sampling point of MCMC sampling, which gives a search
zone with high possibility of containing the actual leak source. For
the last stage, the movable robots enter this zone and accurately
localize the leak source with MGC-PSO algorithm.

2.3. Preliminary MGA estimate


Fig. 2. Localization process overview.
2.3.1. Algorithm introduction
A traditional GA needs a large population size and long
computational times to obtain optimal results, so it is not appro- The computational flow is shown in Fig. 3, and all of the pa-
priate for emergency situations. Reducing the population size will rameters used in the current MGA calculation are shown in Table 2,
reduce the computational time, and the result may not be the where a is crossover rate, b is maternal inheritance rate, S is the
actual leak source, but rather some local extrema. number of iterations that are performed when the update of the
Thus, the traditional GA was modified to obtain a better result best individual Pbest stops, Smax is the upper limit of S, g is follow
with less computational time as follows: rate, Pnew-1 and Pnew-2 are the new individuals after the crossover.
Each individual represents one possible leak source, with the
(1) Collect the eliminated individuals in every iteration and give leak location expressed as (x0, y0) and the leak mass flow rate
them a crossover chance with the individuals in the good expressed as Q0. Its own leak field is obtained by substituting these
gene pool. values into equation (1). The evaluation method for the individual
(2) When the best individual update stops, lead all of the in- compares the concentrations in its leak field with the measured
dividuals to follow the best individual and search for better values at all of the sensor locations. The effect of the order of
individuals from the point at which the current best indi- magnitude of the data was eliminated by non-dimensionalizing to
vidual stands. calculate the difference between the predicted and measured
values:
2 32
X
n i
Cmeasure i
 Cpredict
E¼ 4  5 (3)
i¼1 max Cmeasure ; Cpredict
i i

i
where Cpredict i
is the predicted concentration and Cmeasure is the
measured concentration at location i, where a sensor was installed.
One individual is better than another if its E is smaller. The better
individual then has a higher probability to be accepted into the
good gene pool.

2.3.2. Comparison of MGA and the traditional GA


The traditional GA contains three key processes of selection,
crossover and mutation. These processes require calculations
among all of the individuals, which means that their time com-
Fig. 1. Leak field and concentration sensors for leak source #3. plexities are all O (H), where H is the population size. Therefore, the
30 J. Wang et al. / Atmospheric Environment 157 (2017) 27e37

Fig. 3. MGA algorithm.

time complexity of GA is: which will not increase the time complexity of crossover. Thus,
MGA has a similar time complexity (i.e., computational expense) as
TðGAÞ ¼ MðTselect þ Tcrossover þ Tmutation Þ ¼ OðH  MÞ (4) GA.
Table 3 and Table 4 present the computational results with GA
where M refers to the number of iterations. Similarly, the time and MGA. Fig. 4 shows the predicted leak location and mass flow
complexity of MGA is: rate variation with the iteration number for a population size of
  100. The data in Tables 3 and 4 are obtained by repeating the
TðMGAÞ ¼ M Tselect þ Tcollectbadgene þ Tcrossover þ Tmutation calculation for 100 times and calculating the average relative
standard deviation (RSD) for x0, y0 and Q0.
¼ OðH  MÞ Table 3 shows that the GA results are primarily influenced by the
(5)

where Tcollect-bad-gene refers to the process of choosing individuals Table 3


from the bad gene pool and has the same time complexity of se- GA computational results with different population sizes and numbers of iterations
for leak source #1.
lection, crossover and mutation. The following and searching pro-
cesses are only operations on the individuals in the bad gene pool, HM RSD of x0 RSD of y0 RSD of Q0

100  500 105.54% 15.04% 23.92%


300  500 100.12% 10.36% 20.54%
Table 2 500  500 84.84% 20.32% 17.75%
Current MGA calculation parameters. 700  500 64.76% 6.40% 12.60%
300  1000 79.92% 9.96% 20.25%
Parameter a b g Smax Hmax q
300  2000 63.18% 6.40% 11.68%
Value 0.6 0.3 0.5 20 3000 0.3 300  4000 76.60% 15.32% 21.77%
J. Wang et al. / Atmospheric Environment 157 (2017) 27e37 31

Table 4
MGA and GA computational results with different population sizes and numbers of iterations for leak source #1.

HM MGA GA

RPE of x0 RPE of y0 RPE of Q0 RPE of x0 RPE of y0 RPE of Q0

80  2000 2.18% 0.32% 0.53% 404.40% 33.40% 63.59%


90  2000 2.06% 0.28% 0.42% 251.69% 105.68% 43.37%
100  2000 2.08% 0.32% 0.53% 189.02% 65.96% 32.76%
100  3000 0.32% 0.04% 0.19% 203.38% 89.55% 31.20%
100  4000 0.28% 0.04% 0.08% 177.38% 25.22% 42.05%

Fig. 4. Leak source location (x0, y0) and leak mass flow rate, Q0, results with N ¼ 100 for leak source #1.

population size. The computational accuracy increased with the problem and finds the correct result with a smaller population.
increasing population size, but it changed little when the number of
iterations was increased from 500 to 4000 with a population size 2.3.3. MGA error adaptability
H ¼ 300, which indicates that the calculation may have obtained The error adaptability of the optimization algorithm needs to be
incorrect local extrema. Fig. 4a also illustrates that the GA calcu- tested because of measurement errors and the inaccuracy of the
lation did find an incorrect local extremum after only 10 iterations Gaussian plume model. White Gaussian noise was added to the
when the population size was 100. Therefore, the traditional GA measured concentrations to represent the errors with the
needs a large population to increase the computational accuracy, measured concentrations as calculated by:
which will increase the computational expense. As a conclusion,
" #( " #
the traditional GA is not suitable for this highly nonlinear problem Q0 ðy  y0 Þ2 ðz  z0 Þ2
due to its high prediction error. Cmeasure ¼ exp  exp 
2puDy Dz 2D2y 2D2z
As shown in Table 4, MGA, with a similar time complexity O " #)
(H  M) as GA, obtains a better result with the relative prediction ðz þ z0 Þ2 h  i
errorss (RPE) of the location and mass flow smaller than 3%. The þ exp   1 þ N 0; s 2
wge (6)
2D2z
population size has little effect on the MGA results for populations
larger than 80, which is different from the GA results. Fig. 4b shows
where N (0, s2wge ) is a random number in a normal distribution with
that the MGA result moves slightly closer to the actual leak source a standard deviation of swge.
within 2000 iterations. Thus, MGA avoids the false extrema-value
Fig. 5 shows the resulting errors obtained by the MGA from the
32 J. Wang et al. / Atmospheric Environment 157 (2017) 27e37

Fig. 5. MGA errors with various white Gaussian noise errors for different leak sources.

actual leak source with different measurement errors for different " ! , ! #
leak sources. The errors in both the leak location and Q0 increase X
n X
n
a ¼ min di di ;1 (8)
with increasing white Gaussian noise error. In reality, the mea-
i¼1 new i¼1 old
surement error is primarily from the inaccuracy of the leak field
model. No prediction model can be accurate, especially with com- where e is the relative measurement error, including the system
plex situations. Therefore, MGA or any other GA algorithm cannot error and random error, which needs to be estimated based on the
accurately predict the leak location with large errors, which can experience before sampling (e ¼ 0.35 in the current research). The
happen in real situations. However, MGA can be used within a large subscripts new and old refer to the new sample and previous
leak zone to reduce the search area for a preliminary estimate of the sample. The sample with the higher acceptance rate has a higher
leak location. The leak source location has little impact on the possibility of being accepted by the sample library.
resulting errors when the measurement error standard deviation is
smaller than 2.5. However, with a measurement error standard
deviation of 3.0, the resulting error for leak source #3 and #4 are 2.4.1.2. MCMC sampling methods. Three sampling methods,
larger than #1 and #2. That is due to the different numbers of Metropolis-Hasting (Hastings, 1970), Gibbs (Geman and Geman,
sensors affected by the plume. 1993) and Adaptive-Metropolis (Haario et al., 2001) sampling,
were evaluated for MCMC sampling. The Metropolis-Hasting al-
2.4. MCMC search zone determination gorithm works by iteratively generating a sequence of samples, in
which the next sample is dependent only on the current sample
2.4.1. Algorithm introduction (thus making the sample sequence into a Markov chain). In the
MCMC methods are algorithms that are used to sample a Gibbs sampling algorithm, sample generation is conducted inde-
probability distribution to construct a Markov chain. A reliable pendently for each dimension, which means that the sampling only
initial sampling point close to the true values for the MCMC in- alters one dimension that is chosen randomly in each iteration. The
creases the sampling efficiency and reduces the computational Adaptive-Metropolis algorithm modifies the sampling generation
time (see section 2.4.2). While MGA can give this good initial method by iteratively changing the covariance matrix.
sampling point from a large scale of test zone, so the preliminary The details of these three sampling methods are given in Table 5,
estimation of the leak source obtained by MGA is used as the initial where Y is the leak source sample and i refers to x0, y0 or Q0. The
MCMC sampling point. The MCMC method primarily includes next sample, Ytþ1, is generated based on the current sample Yt. cov0
sampling and evaluation. is the covariance matrix for the sampling of the leak source, which
is initiated artificially as:
2.4.1.1. Sample evaluation methods. As with the individual evalua-  
 covðx0 Þ 0 0 
tion method in MGA, each MCMC sample represents a possible leak  
cov0 ¼  0 covðy0 Þ 0 
 (9)
source, including the leak location (x0, y0) and leak mass flow rate  0 0 covðQ0 Þ 
Q0, with its leak field having been obtained using Equation (1). The
evaluation method for one sample is represented by its acceptance In the current research, cov(x0) ¼ cov(y0) ¼ 5 m corresponds to
rate a, which is calculated as: the location of one sample, cov(Q0) ¼ 100 g/s corresponds to the

8  2  
>
> i i
 ln Cpredict when i
max Cmeasure i
; Cpredict < 0:1
>
> ln Cmeasure
>
>  ;  
>
>
< 2e2 i
or min Cmeasure i
; Cpredict > 10
di ¼ (7)
>
>  2
>
>
>
> i
Cmeasure i
 Cpredict
>
>
:  ; under other conditions
2e2
J. Wang et al. / Atmospheric Environment 157 (2017) 27e37 33

Table 5
Details of the Metropolis-Hasting, Gibbs and Adaptive-Metropolis sampling algorithms.

Algorithm Sample generation Adjusting while iterating

Metropolis-Hasting Ytþ1~N(Yt,cov0) cov0 ¼ cov0/2 when h < 0.2 after Burn-in


Gibbs Yi,tþ1~N(Yi,t,covi,0) cov0 ¼ cov0/2 when h < 0.2 after Burn-in

Adaptive-Metropolis Ytþ1~N(Yt,covt) cov0 ; t < t0
covt ¼
lcovðY0 ; Y1 ; ,,,Yt Þ þ εlI; t > t0

leak mass flow rate, h is the proportion of accepted samples from Table 7
the last 1000 samplings, covt is the covariance for the current MCMC sampling success rate with different sampling algorithms for leak source #1.
sampling with l ¼ 2.42/d, ε ¼ 0.01, and d is the problem dimension s2wge Metropolis-Hasting Gibbs Adaptive -Metropolis
(i.e., 3 in the current research, including x0, y0 and Q0).
0.25 94.0% 100.0% 100.0%
In one MCMC calculation, the sample generation and evaluation
0.30 77.0% 94.0% 94.0%
are repeated for 40,000 times and Burn-in is set to be 30,000. The 0.35 74.0% 87.0% 93.0%
last 2000 samples are collected, which gives a predicted range of x0, 0.40 70.0% 73.0% 90.0%
y0 and Q0, representing a search zone for movable robots. 0.45 63.0% 64.0% 77.0%

2.4.2. The effect of the initial sampling point


The initial sampling point means the first sample given by users search area in this study. However, the sampling success rate was
to start MCMC sampling, which includes the guessed leak source too low for actual applications when the standard deviation of the
location and leak mass flow rate. For this highly non-linear prob- measurement error was larger than 0.40. Thus, a special partial
lem, the initial sampling point badly affects MCMC efficiency and evaluation strategy was proposed to increase the error adaptability.
computational time, as shown in Table 6.
In Table 6, a MCMC calculation is defined as a good one if its
2.4.4. Partial evaluation strategy
average predicted location of the last 100 samplings is within 10 m
of the actual leak source. The good MCMC rate was obtained by Only a portion of the measured data were used in the evaluation
process for each sampling to reduce the impact of the high mea-
independently conducting MCMC calculation for 100 times and
noting the number of good MCMC calculations. For the good MCMC surement errors. As described in Section 2.1, 121 concentration
measurements could be used to evaluate each sampling. However,
calculations, recording the minimum number of samplings they
need to generate a sample whose predicted location is within 10 m each MCMC sampling calculation used only a fraction (represented
as 4) of the measured values that were picked randomly to calcu-
of the actual leak source and calculating the average of these values,
we get the average minimum number of samplings. late the acceptance rate, a. In this research, 4 ¼ 70% when 85
measurements (represented by j) were used to evaluate the MCMC
It can be clearly seen that the increasing deviation of the initial
sampling point from the corresponding values of the actual leak sample. Thus, Equation (8) was changed to:
source reduces the good MCMC rate and increases the average 20 1 ,0 1 3
minimum number of samplings. Therefore, a bad initial sampling X X
a ¼ min4@ pi A @ pi A ; 15 (10)
point may cause the failure of MCMC sampling calculation and the j j
new old
increase of computing time. So, a good initial sampling point ob-
tained from MGA calculation can ensure the success and high speed This MCMC sampling process was conducted independently for
of MCMC sampling. K times. In this way, one measurement could be neglected at least
once if K was large enough, which reduced the impact of extremely
2.4.3. Comparison of different MCMC sampling methods inaccurate data.
Table 7 shows the sampling success rates of the Metropolis- Table 8 shows the results of this partial evaluation strategy for
Hasting, Gibbs and Adaptive-Metropolis sampling methods for various conditions. Comparing these results with the results in
different measurement errors. The success rate was obtained by Table 7 shows that the sampling success rate is much higher with
independently conducting MCMC calculations 100 times and the Adaptive-Metropolis algorithm when using this strategy. When
noting the time at which the actual leak source appears within its the measurement error standard deviation is less than 1.50, the
predicted range. The calculation started from (x0 ¼ 50.8 m, sampling success rate is higher than 95%. Even when the error
y0 ¼ 24.0 m, Q0 ¼ 9434.0 g s1). The MCMC sampling success rate
decreases with increasing measurement error for all of the sam- Table 8
pling methods. The Adaptive-Metropolis algorithm produces the Sampling success rate of MCMC with the partial evaluation strategy and Adaptative-
best results, so this sampling algorithm was used to predict the Metropolis algorithm for leak source #1.

s2wge K Sampling success rate

Table 6 0.45 20 100.0%


The effect of initial sampling point on Metropolis-Hasting MCMC sampling for leak 0.95 20 100.0%
source #1. 1.50 20 95.0%
2.00 20 80.0%
Initial sampling Good MCMC Average minimum number of
2.50 20 95.0%
pointðx0 ; y0 ; Q0 Þ rate samplings
3.00 20 85.0%
(850.0e400.0 4000.0) 20.0% 3829 2.00 15 75.0%
(600.0200.0 5000.0) 93.3% 1850 2.00 20 80.0%
(300.0e150.0 6000.0) 100.0% 1358 2.00 25 90.0%
(200.0100.0 7000.0) 100.0% 483 2.00 30 95.0%
(80.0 0.0 9000.0) 100.0% 281 2.00 35 100.0%
34 J. Wang et al. / Atmospheric Environment 157 (2017) 27e37

standard deviation is higher than 2.0, the sampling success rate can Table 9
be increased to 100% by increasing the number of independent Error adaptability of the standard PSO and MGC-PSO algorithms for leak source #1.

MCMC sampling trials, K. This can be accomplished using parallel s2wge Standard PSO MGC-PSO
computations without increasing the computational time. Iterations Success rate Iterations Success rate

0.5 320 100.0% 160 100.0%


2.5. Accurate localization with MGC-PSO 1.0 361 100.0% 166 100.0%
1.5 378 100.0% 149 100.0%
After the search zone is provided by MCMC sampling in Section 2.0 389 98.0% 155 100.0%
4, movable robots with concentration sensors can start searching 2.5 409 99.0% 142 100.0%
3.0 422 98.0% 175 100.0%
for the leak source. All of the data collected by the robots are
recorded and analyzed to arrange their movement directions and
velocities with the help of the MGC-PSO algorithm. This process
does not require the leak field model in Equation (1). best-performing robot, z, is set to this robot and all of the
robots in the “optimal group” follow the new robot z using
Equation (13).
2.5.1. MGC-PSO introduction
(6) If the best-performing robot is updated a specified number of
The MGC-PSO algorithm is based on the Guaranteed Conver-
times, increase r to increase the search area. Otherwise,
gence Particle Swarm Optimization (GC-PSO) algorithm presented
decrease r to increase the localization accuracy.
by Bergh et al. (Bergh and Engelbrecht, 2002). The GC-PSO calcu-
(7) Repeat steps (4), (5) and (6) until the robots in the “optimal
lates the velocity of the current best-performance particle to in-
group” gather at one position (r < 104) and the best-
crease the importance of the current most likely location. However,
performing robot has not been updated for 30 iterations. If
this requires more search time when several extrema exist in the
less than 100 iterations have been computed, repeat steps
leak field. The current algorithm picks several poorly performing
(4), (5) and (6) to avoid the search, stopping at step (3).
particles to follow the best particle in a search for the current most
probable location. The most likely location is updated as the robots
The parameters L1, L2 and w can be calculated by several
move. The MGC-PSO procedure is:
methods, as proposed by Shi and Eberhart (1998, 1999) and
Ratnaweera et al. (2004). After many tests, the parameters in the
(1) Initialize the algorithm parameters, including the number of
current study were set as:
robots and their initial positions and velocities.
(2) Start searching with the standard PSO algorithm with the 2t
robot velocities and positions changed according to: L1 ¼ 2:5  (14)
tmax
   
vtþ1
i ¼ wvti þ L1 R1 ptsb  pti þ L2 R2 pigb  pti (11)
2t
L2 ¼ 0:5 þ (15)
tmax
ptþ1
i
¼ pti þ vtþ1
i
(12)
w ¼ 0:4 þ 0:5  ½0:2  Nð0; 1Þ þ Uð0; 1Þ (16)
wherevti and vtþ1
i
are the velocities of robot i at times t and tþ1,
respectively; pti and ptþ1
i
are the positions of robot i at times t and where t is time and tmax is the limit on the search time.
tþ1, respectively; ptsb is the optimal position with the highest
concentration detected by robot i during the search; pigb is the
optimal position with the highest concentration detected by all of 2.5.2. MGC-PSO error adaptability
the robots during the search; w is the inertial weighting factor; L1 Table 9 compares the search results of MGC-PSO with those of
and L2 are learning factors from the individual robots and the robot the standard PSO algorithm, which has the parameters given by
swarm, respectively; and R1 and R2 are random numbers. Equations (11) and (12). The success rate was calculated similarly to
that in Table 7. Thirty robots were used to search a zone of 0  x 
(3) When the globally optimal position (i.e., the position with 200 m and 0  y  200 m. The measurement errors from the
the highest concentration) is determined, the robot swarm sensors installed on the robots was represented by white Gaussian
stops changing for 10 iterations, and the robot occupying the noise as before.
globally optimal position is marked as z. Pick m badly per- The MGC-PSO has a 100% success rate within 200 iterations
forming robots (i.e., those with the lowest detected con- when s2wge  3.0. The standard PSO also has a high success rate, but
centrations) to join the “optimal group” with robot z. needs more iterations to finish the search.
(4) The robot velocities in the “optimal group” are calculated as: Table 10 shows the effect of the number of robots on the MGC-
PSO results. At least 25 robots are needed to ensure a 100% success
vtþ1
i ¼ pti þ pzb þ wvti þ r½1  2  Uð0; 1Þ (13) rate. The increased number of robots does not reduce the number of
iterations.
where vtþ1
i
is the velocity of particle i in the “optimal group” at time
tþ1, pzb is the global optimal position detected by robot z, and r is
the search scope factor related to the size of the search area. All of Table 10
Effect of the number of robots on the MGC-PSO results for leak source #1.
the recorded information collected by the robots in the “optimal
group” is shared within the group, while the other robots not in the Robot quantity Iterations Success rate
“optimal group” continue searching with the standard PSO 20 149 99.0%
algorithm. 25 170 100.0%
30 175 100.0%
(5) If a concentration larger than the current largest value is 35 167 100.0%
40 169 100.0%
detected by a robot not in the “optimal group”, the current
J. Wang et al. / Atmospheric Environment 157 (2017) 27e37 35

Table 11
Calculated results and time costs using all three stages for different leak sources.

Leak source First stage result Second stage result Third stage result

MGA/m Time cost/s MCMC/m Time cost/s MGC-PSO/m MGC-PSO


iterations

#1 (82.72, 18.93) 278.34 x: (9.18, 232.67) 1272.21 (50.17, 24.98) 131


y: (3.43, 46.81)
#2 (258.47, 29.78) 255.55 x: (186.47, 324.79) 1026.04 (250.00, 24.99) 151
y: (17.78, 40.01)
#3 (456.7, 19.13) 234.79 x: (332.80,898.90) 1418.48 (450.01, 25.00) 165
y: (5.58,108.99)
#4 (645.62, 19.04) 206.41 x: (517.79, 956.81) 1284.85 (650.01, 25.00) 162
y: (2.79, 53.59)

Table 12
Error adaptability of the three stage localization process for leak source #1.

s2wge First stage result/m Second stage result/m Third stage result/m Success rate

0.0 (50.00, 25.00) x: (7.01, 101.80) (50.00, 25.00) 100.0%


y: (17.89, 29.57)
0.5 (49.98, 25.00) x: (10.42, 130.30) (50.01, 25.00) 100.0%
y: (16.37, 34.49)
1.0 (49.93, 25.01) x: (1.05, 196.21) (50.01, 25.00) 100.0%
y: (17.26, 38.40)
2.0 (82.72, 18.93) x: (9.18, 232.67) (50.17, 24.98) 100.0%
y: (3.43, 46.81)
3.0 (96.11, 4.28) x: (15.43, 247.89) (50.43, 24.99) 100.0%
y: (13.24, 48.82)

3. Results and discussion gas leak source in the atmosphere with (1) a preliminary estimate
using the MGA algorithm, (2) identification of the search zone by
Table 11 shows the localization results and time costs for the the MCMC algorithm (which are both based on the gas concen-
leak field introduced in Section 2.1. All of the sensors were assumed tration data collected by the motionless sensors), and (3) accurate
to have measurement errors of s2wge ¼2.0. The initial MGA popula- localization by the MGC-PSO algorithm based on the concentration
tion was 100, with 4 ¼ 70% and K ¼ 40 for the partial MCMC sensors mounted on movable robots.
evaluation. The MGC-PSO search had 30 robots. The computing 1. For stage (1), a traditional GA was modified by allowing
time of the first two stages were obtained using a computer with an crossover for eliminated individuals and by having the population
Intel(R) Core(TM) i5-3450 CPU @ 3.10 GHz and 4.00 GB memory. All follow the best individual for specific conditions. MGA has the same
the calculations were conducted without parallel computations, time complexity as the traditional GA and better error adaptability.
which means the computing time may be reduced by employing However, MGA cannot accurately predict the location when there
parallel computation. The time cost of the third stage depends on are large measurement errors.
the moving velocities of the robots, which can be determined in 2. For stage (2), MCMC with the Adaptive-Metropolis sampling
actual application, so only the number of iteration is given. The final algorithm was used to determine the search zone for the movable
locations determined by the robots were all within 0.01 m of the robots. A partial evaluation strategy was used to improve the
actual leak sources. Thus, the search process was successful even MCMC error adaptability. This algorithm has a high success rate,
with a very large measurement error. However, it can be seen that even with large measurement errors.
the search zone given by MCMC in stage 2 failed to contain the 3. For stage (3), the Guaranteed Convergence PSO algorithm was
actual leak source located at (650, 25) for leak source #4. Therefore, modified by letting several low-performance robots follow the
the effect of the leak source location in the test zone still need to be most successful robot and by updating the most successful robot.
further analyzed and applicable concentration sensors placing MGC-PSO enables the robots to successfully localize a leak source
strategies can be given for different leak field. with large measurement errors when at least 20 robots are used.
Table 12 illustrates the error adaptability of the localization 4. This three-stage localization process can localize a leak source
process. All of the values in the table were obtained by repeating within 1.0 m of the source, for different leak source locations with
the localization process 100 times and calculating their average. measurement error standard deviations smaller than 2.0.
The success rates indicate the number of final predicted locations 5. The first two stages used a leak field calculation model, so the
within 1.0 m of the actual leak source. As the measurement error model accuracy will affect the localization results. Thus, the leak
increased, the leak source location predicted by the MGA was far model should be modified for specific situations to reduce the
from the actual location and the MCMC search area was increased. prediction error to less than 300%.
However, after the search by the movable robots equipped with the
MGC-PSO algorithm, the leak source was still localized within an
error of less 1.0 m. Acknowledgements

This work was supported by the National Basic Research Pro-


4. Conclusions gram of China (No. 2011CB706900) and the National Natural Sci-
ence Foundation for Creative Research Groups of China (No.
This study describes a three step process to localize a hazardous 51321002).
36 J. Wang et al. / Atmospheric Environment 157 (2017) 27e37

Nomenclature Bergh, F.V.D., Engelbrecht, A.P., 2002. A new locally convergent particle swarm
optimiser. IEEE Int. Conf. Syst. 3, 6.
Briggs, G.A., 1973. Diffusion Estimation for Small Emissions, vol. 79. Atmospheric
Cov covariance Turbulence and Diffusion Laboratory, p. 83. NOAA, ATDL Contribution File.
C hazardous gas concentration (g/m3) Cantelli, A., D'orta, F., Cattini, A., Sebastianelli, F., Cedola, L., 2015. Application of
d relative difference between the predicted and measured genetic algorithm for the simultaneous identification of atmospheric pollution
sources. Atmos. Environ. 115, 36e46.
values Cervone, G., Franzese, P., 2011. Non-Darwinian evolution for the source detection of
D standard deviations of a statistically normal plume (m) atmospheric releases. Atmos. Environ. 45 (26), 4497e4506.
e relative measurement error Cervone, G., Franzese, P., Grajdeanu, A., 2010. Characterization of atmospheric
contaminant sources using adaptive evolutionary algorithms. Atmos. Environ.
E sum of d at all the measured locations 44 (31), 3787e3796.
H MGA population size Chow, F.K., Kosovic, B., Chan, S., 2008. Source inversion for contaminant plume
j number of measured values randomly picked for the dispersion in urban environments using building-resolving simulations. J. Appl.
Meteorology Climatol. 47 (6), 1553e1572.
MCMC Delle Monache, L., Lundquist, J.K., Kosovic, B., Johannesson, G., Dyer, K.M.,
K number of MCMC repetitions with fraction 4 of the Aines, R.D., Chow, F.K., Belles, R.D., Hanley, W.G., Larsen, S.C., 2008. Bayesian
measured data points inference and Markov chain Monte Carlo sampling to reconstruct a contami-
nant source on a continental scale. J. Appl. Meteorology Climatol. 47 (10),
L learning factor in PSO 2600e2613.
M number of iterations Dorigo, M., Birattari, M., Stutzle, T., 2006. Ant colony optimization. IEEE Comput.
MAE mean absolute error Intell. Mag. 1 (4), 28e39.
Farrell, J.A., Pang, S., Li, W., Arrieta, R., 2003. Chemical plume tracing experimental
n number of motionless concentration sensors
results with a REMUS AUV. Proc. Oceans 962e968.
N normal distribution Geman, S., Geman, D., 1993. Stochastic relaxation, Gibbs distributions and the
O order of magnitude Bayesian restoration of images*. J. Appl. Statistics 20 (5e6), 25e62.
p position Guo, S., Yang, R., Zhang, H., Weng, W., Fan, W., 2009. Source identification for un-
steady atmospheric dispersion of hazardous materials using Markov Chain
P individual in the genetic algorithm Monte Carlo method. Int. J. Heat Mass Transf. 52 (17), 3955e3962.
Q mass flow rate (g/s) Haario, H., Saksman, E., Tamminen, J., 2001. An Adaptive Metropolis Algorithm.
Q0 leak source mass flow rate (g/s) Bernoulli, pp. 223e242.
Hastings, W.K., 1970. Monte Carlo sampling methods using Markov chains and their
R random number applications. Biometrika 57 (1), 97e109.
RSD relative standard deviation Haupt, S.E., Beyer-Lout, A., Long, K.J., Young, G.S., 2009. Assimilating concentration
S number of iterations to stop the updating of the best observations for transport and dispersion modeling in a meandering wind field.
Atmos. Environ. 43 (6), 1329e1338.
individual in MGA Hayes, A.T., Martinoli, A., Goodman, R.M., 2002. Distributed odor source localiza-
t time (s) tion. IEEE Sensors J. 2 (3), 260e271.
T time complexity Holland, O., Melhuish, C., 1996. Some adaptive movements of animats with single
symmetrical sensors. Animals Animats 4 (6), 55e64.
u wind speed (m/s) Ishida, H., Kagawa, Y., Nakamoto, T., Moriizumi, T., 1996. Odor-source localization in
U uniform distribution the clean room by an autonomous mobile sensing system. Sensors Actuators B
v velocity (m/s) Chem. 33 (1), 115e121.
Ishida, H., Nakamoto, T., Moriizumi, T., 1999. Gas/odor plume tracing robot. Sensors
w inertial weight factor in PSO
update 6 (1), 397e418.
x x location (m) Johannesson, G., Hanley, B., Nitao, J., 2004. Dynamic Bayesian Models via Monte
x0 x location of leak source (m) Carlo-an Introduction with Examples. Lawrence Livermore National Laboratory.
y y location (m) UCRL-TR-207173.
Keats, A., Yee, E., Lien, F.-S., 2007. Bayesian inference for source determination with
y0 y location of leak source (m) applications to a complex urban environment. Atmos. Environ. 41 (3), 465e479.
Y leak source sample in MCMC Keats, A., Yee, E., Lien, F.-S., 2010. Information-driven receptor placement for
contaminant source determination. Environ. Model. Softw. 25 (9), 1000e1013.
Kennedy, J., 2011. Particle Swarm Optimization. In Encyclopedia of Machine
Greek symbols Learning. Springer, pp. 760e766.
a acceptance rate of new samples in MCMC Khlaifi, A., Ionescu, A., Candau, Y., 2009. Pollution source identification using a
b maternal inheritance rate coupled diffusion model with a genetic algorithm. Math. Comput. Simul. 79
(12), 3500e3510.
g following rate to the best individual in MGA Li, W., Farrell, J.A., Pang, S., Arrieta, R.M., 2006. Moth-inspired chemical plume
d problem dimension, i.e., 3 in the current research, tracing on an autonomous underwater vehicle. IEEE Trans. Robotics 22 (2),
including x0, y0 and Q0 292e307.
Li, F., Meng, Q.-H., Bai, S., Li, J.-G., Popescu, D., 2008. Probability-PSO algorithm for
ε constant for Adaptive-Metropolis Sampling multi-robot based odor source localization in ventilated indoor environments.
h proportion of accepted samples for the last 1000 MCMC In: International Conference on Intelligent Robotics and Applications,
samplings pp. 1206e1215.
Li, J.-G., Meng, Q.-H., Wang, Y., Zeng, M., 2011. Odor source localization using a
q MGA and GA mutation rate mobile robot in outdoor airflow environments with a particle filter algorithm.
l constant for Adaptive-Metropolis Sampling Aut. Robots 30 (3), 281e292.
r search scope factor in MGC-PSO Lilienthal, A.J., Loutfi, A., Duckett, T., 2006. Airborne chemical sensing with mobile
robots. Sensors 6 (11), 1616e1678.
s standard deviation
Lochmatter, T., Raemy, X., Martinoli, A., 2007. Odor Source Localization with Mobile
4 proportion of measured data randomly picked for the Robots.
MCMC Long, K.J., Haupt, S.E., Young, G.S., 2010. Assessing sensitivity of source term esti-
mation. Atmos. Environ. 44 (12), 1558e1567.
Marzouk, Y.M., Najm, H.N., Rahn, L.A., 2007. Stochastic spectral methods for efficient
Subscripts Bayesian solution of inverse problems. J. Comput. Phys. 224 (2), 560e586.
Wge White Gaussian Error Pasquill, F., 1961. The estimation of the dispersion of windborne material. Meteorol.
Mag. 90 (1063), 33e49.
Qian, S.S., Stow, C.A., Borsuk, M.E., 2003. On monte carlo methods for Bayesian
References inference. Ecol. Model. 159 (2), 269e277.
Ratnaweera, A., Halgamuge, S.K., Watson, H.C., 2004. Self-organizing hierarchical
Allen, C.T., Haupt, S.E., Young, G.S., 2007. Source characterization with a genetic particle swarm optimizer with time-varying acceleration coefficients. Ieee
algorithm-coupled dispersion-backward model incorporating SCIPUFF. J. Appl. Trans. Evol. Comput. 8 (3), 240e255.
Meteorology Climatol. 46 (3), 273e287. Rege, M.A.W., Tock, R., 1996. A simple neural network for estimating emission rates
Balkovsky, E., Shraiman, B.I., 2002. Olfactory search at high Reynolds number. Proc. of hydrogen sulfide and ammonia from single point sources. J. Air & Waste
Natl. Acad. Sci. 99 (20), 12589e12593. Manag. Assoc. 46 (10), 953e962.
J. Wang et al. / Atmospheric Environment 157 (2017) 27e37 37

Reich, S.L., Gomez, D., Dawidowski, L., 1999. Artificial neural network for the and Predicting Contaminant Dispersion in Buildings. Lawrence Berkeley Na-
identification of unknown air pollution sources. Atmos. Environ. 33 (18), tional Laboratory.
3045e3052. Sohn, M., Sextro, R., Gadgil, A., Daisey, J., 2003. Responding to sudden pollutant
Rodriguez, L.M., Haupt, S.E., Young, G.S., 2011. Impact of sensor characteristics on releases in office buildings: 1. Framework and analysis tools. Indoor Air-
source characterization for dispersion modeling. Measurement 44 (5), international J. Indoor Air Qual. Clim. 13 (3), 267e276.
802e814. Thomson, L.C., Hirst, B., Gibson, G., Gillespie, S., Jonathan, P., Skeldon, K.D.,
Russell, R.A., 2004. Locating underground chemical sources by tracking chemical Padgett, M.J., 2007. An improved algorithm for locating a gas source using in-
gradients in 3 dimensions. In: 2004 IEEE/RSJ International Conference on verse methods. Atmos. Environ. 41 (6), 1128e1134.
Intelligent Robots and Systems, pp. 325e330. Vergassola, M., Villermaux, E., Shraiman, B.I., 2007. ‘Infotaxis’ as a strategy for
Russell, R.A., Thiel, D., Deveza, R., Mackay-Sim, A., 1995. A robotic system to locate searching without gradients. Nature 445 (7126), 406e409.
hazardous chemical leaks. In: 1995 IEEE International Conference on Robotics Yang, X., Yang, Z., Yin, X., Li, J., 2008. Chaos gray-coded genetic algorithm and its
and Automation, pp. 556e561. application for pollution source identifications in convectionediffusion equa-
Russell, R.A., Bab-Hadiashar, A., Shepherd, R.L., Wallace, G.G., 2003. A comparison of tion. Commun. Nonlinear Sci. Numer. Simul. 13 (8), 1676e1688.
reactive robot chemotaxis algorithms. Robotics Aut. Syst. 45 (2), 83e97. Yee, E., 2008. Theory for reconstruction of an unknown number of contaminant
Senocak, I., Hengartner, N.W., Short, M.B., Daniel, W.B., 2008. Stochastic event sources using probabilistic inference. Boundary-layer Meteorol. 127 (3),
reconstruction of atmospheric contaminant dispersion using Bayesian infer- 359e394.
ence. Atmos. Environ. 42 (33), 7718e7727. Yee, E., Lien, F.-S., Keats, A., D’amours, R., 2008. Bayesian inversion of concentration
Shi, Y., Eberhart, R., 1998. A modified particle swarm optimizer. Evol. Comput. Proc. data: source reconstruction in the adjoint representation of atmospheric
1998 IEEE Int. Conf. Evol. Comput. Proc. 69e73. diffusion. J. Wind Eng. Industrial Aerodynamics 96 (10), 1805e1816.
Shi, Y., Eberhart, R.C., 1999. Empirical study of particle swarm optimization. Proc. Zheng, X., Chen, Z., 2010. Back-calculation of the strength and location of hazardous
1999 Congr. Evol. Comput. 3, 1945e1950. IEEE. materials releases using the pattern search method. J. Hazard. Mater. 183 (1),
Sohn, M.D., Small, M.J., Pantazidou, M., 2000. Reducing uncertainty in site charac- 474e481.
terization using Bayes Monte Carlo methods. J. Environ. Eng. 126 (10), 893e902. Zou, Y., Luo, D., 2008. A modified ant colony algorithm used for multi-robot odor
Sohn, M.D., Reynolds, P., Gadgil, A.J., Sextro, R.G., 2002. Rapidly Locating Sources source localization. Int. Conf. Intelligent Comput. 502e509.

You might also like