APP下载

Neural network-based source tracking of chemical leaks with obstacles

2021-08-26QiaoyiXuWenliDuJinjinXuJikaiDong

Qiaoyi Xu ,Wenli Du,2, *,Jinjin Xu ,Jikai Dong

1 Key Laboratory of Advanced Control and Optimization for Chemical Processes,Ministry of Education,East China University of Science and Technology,Shanghai 200237,China

2 Shanghai Institute of Intelligent Science and Technology,Tongji University,Shanghai 200092,China

Keywords:Obstacle Optimization Neural networks Feature extraction Source term estimation Computational fluid dynamics (CFD)

ABSTRACT The leakage of hazardous gases poses a significant threat to public security and causes environmental damage.The effective and accurate source term estimation (STE) is necessary when a leakage accident occurs.However,most research generally assumes that no obstacles exist near the leak source,which is inappropriate in practical applications.To solve this problem,we propose two different frameworks to emphasize STE with obstacles based on artificial neural network (ANN) and convolutional neural network (CNN).Firstly,we build a CFD model to simulate the gas diffusion in obstacle scenarios and construct a benchmark dataset.Secondly,we define the structure of ANN by searching,then predict the concentration distribution of gas using the searched model,and optimize source term parameters by particle swarm optimization (PSO) with well-performed cost functions.Thirdly,we propose a one-step STE method based on CNN,which establishes a link between the concentration distribution and the location of obstacles.Finally,we propose a novel data processing method to process sensor data,which maps the concentration information into feature channels.The comprehensive experiments illustrate the performance and efficiency of the proposed methods.

1.Introduction

Multiple chemical reactions exist in the manufacturing process of widely-used products,such as petroleum,electricity and pharmaceuticals.Inevitably,toxic gases,liquids and other byproducts exist in these reactions.Among them,toxic gases are usually colorless and easy to leak into the atmosphere.Once it happens,the ecological environment and human survival will be greatly affected by hazardous gas leakage accidents,for example,approximately 550,000 people were injured after exposed to the leaked methyl isocyanate (MIC) gas in the Bhopal disaster [1].Thus,the emerging demands on the source term estimation (STE)have attracted the attention of many researchers [2,3].As we know,the diffusion of gas is affected by many factors,such as wind speed and humidity,which leads to the time-consuming modeling of diffusion.Hence,traditional STE methods always has certain limitations [4],especially in the case of obstacles.Thus,efficient modeling approaches and precise STE algorithms are crucial to avoid serious disaster.

Regarding modeling,gas diffusion in an ideal atmospheric environment can be effectively predicted by several methods [5].The Gaussian plume model[2,6]is a distortion of the Gaussian dispersion model,which can simulate the continuous release scenarios and dispersion of ground-level heavy gas.Li et al.[3]implemented the Gaussian plume model to fit the measurements of sensor and estimate source terms.However,although the Gaussian plume model has a simple expression and parameter form,it is easily affected by noise,and its prediction is not accurate enough.Moreover,the formula must be improved in accordance with different terrains and meteorological conditions.Therefore,the Gaussian plume model is applicable only to scenarios with stable and uniform concentration distribution or approximately applicable to scenarios with an open and flat terrain and the wind conditions are not low.Computational fluid dynamics(CFD)[7–10]modeling method can approximate fluid flow by solving the differential equation,predict gas diffusion in complex environments accurately,and determine wind velocity.Hanna et al.[11] used the FLACS CFD model to simulate the atmospheric transport and dispersion (AT&D) of dense chlorine clouds.Feng et al.[12] developed a system to simulate the gas concentration distribution of CO2in the flow field on the basis of CFD.The advantage of CFD is that it can provide three-dimensional concentration profiles of gas diffusion changing with time in a complex terrain.However,CFD requires the comprehensive configuration of the model and consumes a large amount of computing time [13],which limits its application in emergencies.Therefore,less time-consuming modeling and forecasting methods play an increasing role in the development of machine learning algorithms.For example,artificial neural network (ANN) can fit complex functions with timevarying data,and it is robust when training over noisy data.Thus,modeling the gas diffusion by using ANN has great advantages over the time-consuming CFD method [14].This method focuses on mapping the relationship between input and output,instead of overemphasizing the mechanisms.Its strong fitting capabilities aid in obtaining satisfactory results.

The combination of modeling and STE is an emerging research field.STE algorithms can be generally divided into three categories:forward simulation,inverse and nonlinear optimization methods[15].Forward methods utilize concentrations measured by sensors to directly estimate source locations on the basis of the dilution factor.Inverse methods start with observed concentrations and then reversely deduces the source location.And nonlinear optimization obtains the optimal estimates based on errors in the concentration forecast by repeatedly running a forward AT&D model,which is widely used in practical problems.Soroush et al.[16]predicted the acid gas absorption in four potassium based amino acid salt solutions using ANN with Levenberg–Marquardt backpropagation algorithm.Reich et al.[17] trained a three-layer feed-forward neural network by feeding the direction and velocity of wind,stability class and gas concentrations to identify the emission parameters and air pollution sources.Ma et al.[18]proposed a machine learning framework with the Gaussian dispersion model for modeling,and particle swarm optimization(PSO)for optimization[19,20]to identify the emission source parameters.A one-step nonlinear PSO–Tikhonov regularization method was developed to solve the inverse problem and estimate the contaminant gas emission source term in[21].Qiu et al.[22]proposed a fast and accurate method for gas diffusion prediction and STE based on ANN,PSO,and expectation maximization algorithm (EM) [23] on obstaclefree areas.They utilized the source strength and the reciprocal of wind speed to calculate Gaussian parameters Gyand Gzas the input of ANN for the concentration prediction of the interest point.Wang et al.[24]used hybrid genetic algorithm for STE,analyzed the effect of different cost functions on the results,and proposed a new cost function named as WSD.This function has achieved excellent performance in estimating the source location and the strength of emission sources.

Recently,Deep learning [25] has made major achievements in many fields,such as AlphaGo [26].In addition,evolutionary optimization algorithms achieve optimal performance on various issues[27–29].Deep neural network(DNN)[30]and convolutional neural network (CNN) [25] are two widely used deep learning models that have achieved satisfactory performance in many applications [31,32].Deep learning also has some applications in the fields of atmospheric diffusion modeling and STE.For example,Cho et al.[33] used random forest classifier combined with DNNs for source tracking.

All the abovementioned methods are applicable to wide,open and flat terrain scenarios with no obstacles.However,in practical applications,it is common that there are buildings and trees near the leakage source.Ignoring obstacles may cause significant prediction errors when modeling and estimating source terms,since the ideal wind distribution in the obstacle-free area will be torn apart when the turbulence appears around the obstacles [34].For example,the Gaussian plume model[3]is based on the continuous point source emissions and the assumption that the concentration distribution obeys normal distribution,which means that its application under obstacles is limited.Hence,prediction errors may be produced if we just ignore the influence of obstacles and consider the wind field homogeneous.Correspondingly,utilizing concentration maps to overcome this limitation is one of the main motivations in this paper.

Here,the main contributions of this paper are summarized as follows:

(1) We build a CFD simulation model of gas leakage with obstacles to observer the characteristics of gas diffusion in obstacle scenarios,and construct a benchmark for subsequent experiments.

(2) To observe the influence of obstacles in terms of the source tracking,we extend and implement a STE system by artificial neural network,radial basis function network and evolutionary optimization algorithm to obstacle case.

(3) A one-step STE method based on CNN is proposed to directly estimate the source terms with the aid of the proposed data processing method.Specifically,our method locates the source by establishing a link between concentration maps,meteorological conditions and emission parameters,which has a simplified workflow and better performance.

The remainder of this paper is arranged as follows.Section 2 introduces the datasets used in experiments and briefly provides the process and results of the forward modeling method.Section 3 presents the workflows of the proposed one-step STE approach by using the CNN algorithm.Section 4 shows the experimental settings and results of the one-step method and a comparison between the forward and one-step methods.Finally,Section 5 presents the conclusions and future directions.

2.Forward AT&D Modeling

In this section,the process of generating the data used in the experiment is given firstly.Subsequently,a forward gas diffusion modeling method based on ANN and an intelligent optimization algorithm is validated and implemented for obstacle case,which not only focus on the diffusion from the source to the sensor,but also focus on STE.

2.1.Datasets

First,we build a CFD simulation dataset for gas diffusion with obstacles.We then introduce a traditional location approach for modeling with an obstacle.

CFD [35] is adapted to simulate a hazardous gas leakage accident,which is based on the fires dynamics simulator (FDS) [36].To simulate the diffusion data of obstacles under turbulence,the large eddy simulation method was used.Collecting the toxic gas leakage dataset by the CFD simulation instead of by field experiments is more safe and efficient,since the installation of physical sensors and the pollution caused by the emission gas can be avoided.

CFD is a relatively accurate method for simulating the concentration distribution.The entire scene is shown in Fig.1.The length,width and height of the scene are 300 m,150 m and 40 m,corresponding to the x,y and z-axis,respectively.The location of the leakage source is fixed and the design coordinate is(50.5,75.5,10).For simplicity,we assume the presence of gas sensors around the obstacle and the measured wind velocity is 0.

Fig.1.Schematic diagram of gas leakage and diffusion with an obstacle.

The wind is along the x axis,and the wind velocity at the height of 10 m is set from 1 m∙s-1to 13 m∙s-1,with a gap of 2 m∙s-1;the strength of emission source is set from 0.1 mol∙mol-1to 1 mol∙mol-1,with a gap of 0.1 mol∙mol-1.Thus,a total of 70 training scenarios are available.After the gas diffusion is stabilized,which means that the concentration values of the leaking gas achieve a certain level of stability,the average concentrations measured by the sensors are used for modeling.

Before modeling,all the gas concentrations measured by the sensors below a certain threshold must be eliminated.This strategy is adopted since the turbulence causes concentration fluctuations,which are clearer in regions with lower concentrations.To address this issue,the interest points with the concentration less than 10-6mol∙mol-1measured by the sensors are excluded.

2.2.AT&D modeling based on ANN

If an obstacle is placed near the source,then the concentration values of the interest points in the obstacle area cannot be observed.We can only set the concentration values in this area to zero instead,which can be seen in Fig.2.Hence,one problem emerged:the concentrations in this area are similar to those in the area far from the source.Therefore,if the model is built on the separate interest points,rather than considering the concentration distribution in the whole space,then the model may not have the ability to distinguish the obstacle and distant area.

To verify the problem,experiments are conducted with ANNbased modeling and PSO-based optimization because that this method is effective in no-obstacle situations [22].Given that an ANN can fit the functions of arbitrary complexity with arbitrary precision[37],the model performance is not limited by the model capability.First,a forward AT&D model is adopted to predict the concentrations of the interest points by ANN,then the source parameters are quantified by PSO.

Refer to previous work,the inputs of ANN,the AT&D dispersion model of gas emission in obstacle scenes,are X,Y,Q and v,and C is selected as the output,where X is the value of x coordinate of the emission source,Y is the value of y coordinate,Q is the emission strength of source,v is the wind velocity,and C represents the concentrations measured by the deployed sensors.The input and output monitoring parameters are 4 and 1,respectively.We can define the process from source parameters to sensors as the forward phase.

Fig.2.Simulated concentration distribution of gas diffusion with one obstacle(the area where the concentration values are 0).

Note that for a limited time,given that the wind velocity at 1 m∙s-1is low,the slow gas diffusion cannot satisfy the requirements of modeling,in which case the data cannot be used for training.Thus,the scenarios with the wind velocity at 1 m∙s-1are deleted,and a total of 60 scenarios are found for the experiment.

Approximately 70% of the experimental data is used as the training set to learn the parameters of ANN,15%of the data is used as the validation set to tune the parameters of ANN and prevent overfitting,and the remaining 15% of the data is used as the test set to evaluate the performance of the selected approach.The Levenberg–Marquardt algorithm is used for the network training.MSE is used to assess the network performance to determine the optimal network.

To meet the complexity needs of obstacle cases,we conduct a simply network search to determine the suitable network structure.The number of hidden layers is set to 2,and the number of neurons in the two hidden layers,s1and s2,are determined by searching in the range of 40 ≤ s1≤50 and 3 ≤ s2≤10,respectively.Then we use mean square error(MSE)to identify the quality of each structure.Finally,when s1=49 and s2=10,the minimal MSE of the concentrations between the actual and predicted data reach the minimum value,at approximately 4.12 × 10-4.Hence,the number of neurons in the two hidden layers is set to 49 and 10.

Once the number of the hidden neurons is determined,we can train the ANN-based diffusion model with the processed data.The performance of a model is determined by the gap between the predicted values and the actual ones on the test dataset,and a narrow gap indicates that the ANN model performs well.Fig.3 shows that the predicted concentrations are distributed around the fitting line y=x.To quantify the performance of the model,we adopt the R square,the fraction of predictions within a factor of two of observations(FAC2),the normalized mean square error(NMSE),and the fractional bias(FB)as evaluation criteria.The R square of the model is about 0.8552,which exceeds 0.85,indicating a satisfactory goodness of fit.FAC2 is 0.8151,which indicates that most predicted concentrations are between the fitting lines y=2x and y=x/2,respectively).The NMSE and FB at 0.7246 and 0.0561,respectively,also show the good performance of the prediction model.

Fig.3.Comparison between the predicted and actual concentrations.The x-axis represents observed concentration value,and y-axis is the model predicted value.The number of points located in the gap of orange and green lines can reflect the performance of gas diffusion model.

2.3.PSO-based STE results

PSO is a population-based optimization algorithm [38] that is widely used to estimate the source terms.In this paper,we emphasize the effects of different cost functions on quantifying the target x=(X,Y,Q)in the scene with an obstacle rather than the theory of PSO.The cost functions play an important role in the optimization algorithm as a learning criterion to evaluate the gap between the actual and the predicted value of the model.Here,we compare the performance of six different cost functions:mean square error(MSE),absolute fractional bias (AFB),normalized root mean squared error (NRMSE),NRMSE with logarithm transformation(LOG_NRMSE),correlation distance (CORR) and WSD.We borrow these functions from [24] and list the definitions in the Appendix.

The selection of cost functions is vital for the STE tasks in obstacle-free situations[24].This strategy is essential to determine whether the same conclusion can be drawn in situations with an obstacle.The mentioned cost functions are used to predict the source locations of 60 designed scenarios.

The experimental results of three target parameters(X,Y,and Q)using ANN and PSO are illustrated in Table 1,both relative and absolute errors between the predicted and actual values are given.As we can see,AFB has the largest errors in terms of X,MSE,NRMSE and LOG_NRMSE have similar performance,CORR has a slightly improvement,and WSD achieves the best prediction performance.In summary,the cost function WSD improves the STE result of X.Similar phenomena can be observed in the STE results of Y and Q.The difference of the relative and the absolute errors is small on Y and Q when MSE,NRMSE,and LOG_NRMSE are used as the cost functions,AFB increases the relative and the absolute errors on Y and Q,CORR slightly increases the two errors of Y but causes Q to fall noticeably,and WSD decreases the two errors of Y but slightly increases those of Q,as shown in Table 1.

Table 1The relative and absolute errors of source term parameters given by different cost functions

In general,we can observe that the PSO achieves acceptable performance in STE tasks because most of the projected values revolve around the real values.The STE results of Y outperform X and Q,and the mean relative error of Y is only 2.076%,whereas the figures of X and Q are 7.648% and 10.695%,respectively.The absolute value of Q is far less than that of X.Thus the performance of PSO on projecting Q is acceptable.

3.CNN-based One-step Modeling

The abovementioned results show that two main limitations exist when ANN and PSO are used for modeling and STE,respectively.First,traditional methods cannot process the sensor data of all scenarios collected at a certain time,hence,the correlation between different interest points cannot be extract by the forward model.Second,the Gaussian plume model cannot calculate the support Gaussian parameters if an obstacle is located around the emission source.

To address the above problems,we propose a one-step STE method in this section,which uses a 2D convolutional network with large model capability for modeling.The methodology,the data pre-processing approach,the configuration of model,and the entire workflow of the one-step method are presented as follows.

3.1.Methodology

CNN is an emerging deep learning algorithm with convolution operation instead of multiplication and achieves many important successes,such as image classification [39],feature extraction[40].CNN is designed to learn the spatial hierarchies of features through stacking convolutional,pooling and fully connected layers,and other optimization layers,such as dropout and batch normalization.

A convolutional layer performs the following operations throughout the input,that is,image array or output of the previous layer,as shown in Fig.4.First,element-wise multiplications between the sub-arrays of an input are performed with the sliding of a filter,which is determined by the stride length.The filter is also called the receptive field or kernel and travels from the leftmost to the bottom-right of the input.The initial weight values of a filter are typically set according to the configurations of the networks,that is,random initialization,and remain the same for all sub-arrays in a certain batch to reduce model parameters.The values are then trained by the selected optimizer,such as minibatch stochastic gradient descent (SGD).Depending on the filter size and stride length,valid padding and same padding are common in convolutional layers.Second,the output feature mapsof the lth layer are calculated by n filters and m input sub-arrays and added with the bias.The operation can be represented as[41]

Fig.4.The illustration of convolution operation.

The pooling layer is then follows,which reduces the spatial size of an input array.This process is often defined as downsampling.Two different pooling options exist.Max pooling obtains the max values from an input array’s subarrays,whereas mean pooling takes the mean values.In this paper,max pooling is adopted in the pooling layer

where Isubis the index matrix of values in the receptive field of the pooling layer.

After the convolutional and pooling layers,fully connected layers follow.Fully connected layer is used for classification in convolutional networks.The operation in this layer can be described as[41]

where M and N are the numbers of neurons in(l-1)th and lth layers,respectively.

3.2.Data preprocessing

Given that 42×25 sensors are set in the FDS simulation,which indicates that 1050 concentration data are measured each second for one scenario,and the figure for 60 scenarios is 63,000 per second,the figure is still over 54,000 after the values below 10-6mol∙mol-1are eliminated.If the number of sensors increases,or the average concentrations for ANN modeling are replaced by the instant diffusion data measured by multiple sensors,then the explosion of data causes modeling difficulties and timeconsuming STE.The performance of the ANN-based gas diffusion model degenerates with the increased sensor density,since most of the observed concentration values are zero,and the entire information obtained by all sensors for modeling is difficult to utilize.To address this issue,we propose a novel data preprocessing method,which folds the flattened data in Section 2.1 as the inputs of the CNN-based STE method.The general process is illustrated by Fig.5 and the details are as follows:

Normalization.For each sensor,the maximum and minimum values of the concentration measured at the location of the sensor are saved.Each concentration value is normalized in accordance with the maximum and minimum concentrations of its corresponding sensor location.The wind velocity is scaled to(0,1)based on its minimum value(3 m∙s-1)and maximum value(13 m∙s-1).A simple example with an assumed gas diffusion at three different time points is given in Fig.6 to elucidate the normalization process.For a certain position,the concentrations of different time steps are normalized to the range of [0,1] according to the maximum and minimum values (see in the red solid circles in Fig.6,maximum 0.33 and minimum 0.30).When the concentrations measured in this position are the same in all scenarios (see the yellow dotted circle in the figure),all of them are set to zero.The concentrations in the area where the obstacle is located are still 0 when normalization.

Data alignment.The alignment of data is the focus of the proposed method.To simultaneously represent the concentrations,the wind speed and other features,and reflect the flow of gas,the concentration data of two adjacent seconds are selected as the first and second channels,respectively.The concentration data in two channels are arranged in accordance with their corresponding sensor positions,noting that the actual dimension is 42 × 25,and the matrix of the wind velocity which is a grid composed of 42 × 25 rectangles is selected as the third feature channel (see Fig.7).

Fig.5.Conversion from one-dimensional concentration data to two-dimensional concentration field data.

Fig.6.A simple example of normalization.

Fig.7.A simple example of the data pre-processing strategy used in the CNN-based one-step STE method.

Fig.8.The visualization of the feature maps.

Mapping.Two-dimensional concentration data are converted into a feature space as the input of CNN model,for example,the data are mapped into RGB space for visualization.The mapped samples of stabilized gas diffusion under six different wind speeds shown in Fig.8 visually illustrate the pollutant concentration fields measured in adjacent two seconds,and the samples become bluer from left to right,thereby indicating that the wind speed increases gradually.The main color of a certain image reflects wind velocity,and the light pixels show that the concentration value is not zero at that location.The obstacle (black block) can be observed,this feature indicates the location information of the obstacles.

The input of the CNN model generated by the preprocessing method are suitable reflections of the overall gas diffusion,which are used to establish the link between the source term parameters and the concentrations.

3.3.Model configuration

Collecting data by FDS and CFD is time-consuming,and the size of the dataset for one-step STE is relatively small.Hence,the use of shadow CNN can alleviate the overfitting problem.Fig.9 illustrates the model structure used in this paper,which contains three feature layers.

Each feature layer is stacked three times by a convolution layer,a batch normalization layer,and a ReLU activation function,as shown in Fig.10.A dropout layer is inserted between the convolutional layer and the batch normalization layer of the last stack.At the end,two fully connected layers with LeakyReLU activation function are placed for the regression of source parameters.The model structure is cost-effective in IoT devices.

In fact,the convolutional layers in the proposed model is a feature extraction module,to explore the influence of deep but timeconsuming models on STE,we also implement experiments using deep residual network[42](ResNet)as the substitute of the feature extraction module.Specifically,we change the number of the output neurons of the last fully-connected layers of ResNet-18 to 3 and use the LeakyReLU activation function in the end.

Fig.9.The structure of the CNN model in the one-step method.

Fig.10.Structure of the feature extraction layer.First,converting the concentration data measured by the sensors and atmospheric parameters into feature maps.Then,using the processed feature maps as the input of the feature extraction layer,the correspondence between the source parameters and the mapped samples can be obtained training.

For all experiments,SGD is selected as the optimizer with a 0.5 momentum,and all the dropout rates are set to 0.1.During training,the learning rate is fixed to 0.1,and the batch size is equal to 64.Furthermore,no pretrained model is used.

3.4.Workflow

Three main steps are used for one-step STE:dataset split,model training and validation and prediction.

Dataset split.After extracting the concentration data,the data preprocessing method mentioned in Section 3.2 can be implemented.Given that the data alignment operation requires twodimensional adjacent seconds of data as one sample,the number of mapped samples after processing is reduced by half to 1800,covering all the scenarios mentioned in Section 2.Entire datasets must be randomly split into a training set and a test set,accounting for 80% (1440 samples) and 20% (360 samples),respectively.In addition,the number of the training samples is the same for each scenario,and the number of samples used for the test is also the same.

Model training.Under the above step,we feed the training set to the defined CNN model and then optimize the gap between the actual source terms and the predicted ones,which means that the source terms are the output.Considering that the network is trained by the diffusion states of gas (see in Fig.8,the processed samples can reflect the flow states of the gas and other parameters),the source term information can be solved directly when the meteorological parameters and the sensor concentrations are known.Numerous instantaneous sensor concentrations for each scenario at a certain time are extracted as the input of the CNN model rather than a stable diffusion state with limited data due to the modeling capability of deep learning algorithms.Large size of the dataset can also alleviate the overfitting problem.With the same (X,Y,V,Q) as the input and different concentrations as the output,the model cannot be built and the PSO method cannot be adopted to estimate source terms.Thus an inverse model is used instead of the forward model.

Prediction.The optimal one-step trained model can find the relationships between mapped inputs and unknown source terms with observed concentrations,because the diffusion distribution is similar under the same atmospheric condition.Therefore,once the wind velocity,atmospheric stability level,observed sensor concentrations and other necessary information are collected,we can inverse the source terms,for example,source location.

4.Experimental Analysis

This study mainly aims to test the feasibility of the proposed one-step method in quantifying the emission source with an obstacle.In this section,the comparison methods and the corresponding scenarios of data are introduced,and the experimental results of prove the efficiency of the one-step method.

4.1.Comparison methods

In this subsection,4 different methods are selected for the comparative discussion and performance study.To be specific,

ANN&PSO.ANN is widely-used for obstacle-free modeling,but its performance needs to be reevaluated in obstacle scenarios.Here,we build a feed-forward neural network with 2 hidden layers for gas diffusion modeling and use PSO for STE.

RBFN&PSO.To identify the influence of diffusion model in twostep method,we replace the ANN by a radial basis function network(RBFN),the structure is taken from[43],and we set the number of centers to 1050.

CNN.The proposed one-step method,using CNN as the feature extraction module,which is defined in Section 3.3.

ResNet.One-step method,using ResNet-18[42]as the backbone for feature extraction.

The experiment platform is Intel(R) Core(TM) i7-8700 CPU@3.20 GHz,and we count the running time of different algorithms.Please note that since the first two methods are implemented by Matlab R2018b [44],while the latter two methods are based on PyTorch framework [45],all four methods are test without using of GPU.

4.2.Data analysis

Fig.11.Source term estimates on test set by CNN-based one-step method.

In Section 2.2,the gas diffusion data obtained by CFD simulation is used in the ANN-based forward AT&D model with the input of known (meteorological and source term) parameters and the output of concentrations of interest points.However,due to the difference between the structure of ANN and CNN,the concentration data cannot be directly fed into the convolutional network.In this case,we extract the observed concentration data of all interest points simultaneously every second,which can be regarded as a set of one concentration field,and then 60 sets of concentration field can be generated for 60 seconds.With a total of 60 different scenarios,a total of 3600 sets of concentration field data are available,that is,3600 sets of concentration field are the input of experimental data for the CNN model,replacing the average concentrations in the ANN model for the experiment.

4.3.Result of CNN-based STE

360 mapped test samples are used to evaluate the accuracy of the model,and the comparison between the observed value and the estimates of source terms is shown in Fig.11.The predicted STE results are consistent with the observed values,which indicates that the data processing method,including normalization,data alignment,and mapping,and the STE modeling based on CNN are effective.The absolute errors of X,Y,and Q between the predicted results and the measurements are about 0.0199,0.0886,and 0.2048 respectively.The relative errors of X,Y,and Q are 0.0065%,0.0062%,and 11.9109% respectively.With a relative error of less than 0.01%,the method has high accuracy in predicting locations(X and Y)due to the increasing amounts of concentration data obtained from different time points.The relative error of Q is slightly higher than that of X and Y because the real value of Q is below 1,and the change range is from 0.1 to 1,both of which are small.The STE accuracy of strength (Q) is still acceptable.According to the above results,the errors between the prediction and the actual values are small,and the performance is satisfactory.This finding proves that the proposed one-step STE method is highly accurate and efficient in locating and quantifying the gas leak source in obstacle scenarios.

4.4.Superiority of one-step method

Although the experimental result in Section 4.3 has shown that the CNN-based one-step STE method performs well in locating the emission source with an obstacle,the experiment that uses the two methods introduced in the paper must be performed to calculate the STE accuracy,to intuitively compare the performance of the two methods.The STE accuracy using traditional AT&D method based on ANN was obtained in Section 2.3.In comparison with the experiment of the two methods,the data of average concentrations are processed and used as the input of the CNN model to obtain the source term predictions.

The average concentrations are simultaneously selected as the first and second channels,and the matrix of the corresponding wind velocity is selected as the third channel.After data preprocessing,the concentrations of the interest points in one scenario correspond to one mapped sample.A total of 60 scenarios with different wind speeds and emission source strengths exist.Hence,a total of 60 mapped samples can be obtained,and 60 sets of source term parameters can be predicted by the one-step method based on CNN.The average relative errors of the STE under six different wind velocities with two different methods are listed in Table 2.The relative errors of X and Y are reduced by about 1000 times,whereas the performance improvement on Q is unclear.This is due to the fact that the real value of Q is from 0.1 to 1 mol∙mol-1,which is difficult to predict,and even a slight change in the predicted value may cause large difference.

The STE results of the different approaches on the average relative errors for all the scenarios are listed in Table 3.As can be found in Table 3,in terms of computation cost,the RBFN &PSO method underperforms the ANN&PSO since we set a large number of centers to obtain acceptable fitting performance,while the performance is relatively less satisfactory.When the feature extraction module is CNN,all the predictions of X and Y perform well,and the relative errors of Q are reduced by about 1%.Given that the CNNbased method also improves the Q by 1% compared with the forward AT&D STE method using the suitable cost function WSD,the improvement of Q is not as significant as that of X and Y.In addition,in some cases,the maximum absolute errors of the STE results of X and Y using the ANN-based method are over 23 m and 7 m (seen in Table 1),respectively,and those using the CNNbased method are below 0.02 m.For comparison,we illustrate the STE results of CNN-based and ResNet-based methods in Fig.12.In the case of ResNet as the feature extraction module,although the mean absolute and the relative errors of X and Y are about 5 times smaller than that of CNN-based method,the significance of performance improvement is extremely small in practical problems since the absolute errors predicted by the CNN-based method are below 10-3.And the relative error of Q’s prediction results also reduced by about 0.5%.Thus,we can conclude that the one-step STE methods outperforms the forward AT&D STE methods in quantifying the emission source with an obstacle,and the ResNet-based model performs slightly better than CNNbased one.However,the total running time of ResNet-based method is nearly 3 times that of CNN-based approach with insignificant performance improvements,which is not suitable in real-time tracking,and the high complexity of ResNet will increase the burden of Internet of Things in practical applications.Therefore,we prefer the shallow CNN for STE to reduce computational time under acceptable performance degeneration.

Table 2The relative errors of source term parameters given by the AT&D STE method using WSD and the CNN-based one-step method under different wind velocity

Table 3The comparison of the relative and absolute errors of source term parameters using the forward AT&D and the one-step methods

Fig.12.The comparison of CNN-based and ResNet-based STE results.

Inverse modeling by CNN is used to directly obtain the source term parameters.Compared with the forward modeling and STE methods using ANN and PSO,respectively,and even with increased experimental data,the prediction results are highly accurate and greatly improved,which proves that the modeling of harmful gas diffusion by using the one-step method is effective.The obstacle position,the wind velocity and the gas flow state are properly obtained.

5.Conclusions

This paper proposes an ANN-based forward method and an innovative CNN-based one-step method to locate and quantify the emission source in obstacle scenarios.For the forward AT&D method,we predict the gas diffusion by ANN and utilize PSO for source parameters identification;for the one-step method,the concentration data are mapped into feature channels appropriately and CNN is adopted to directly estimate the source parameters without establishing a gas diffusion model.

The gas dispersion data of the complex scene with an obstacle can be obtained by simulation,which can guarantee the personnel safety and avoid the high cost of collecting data from a gas leakage accident.Hence,in this paper,CFD simulations are used to collect the experimental data,although the process is slightly timeconsuming.The STE results show that the forward method can locate the emission source with acceptable accuracy,whereas the one-step method can process additional data and estimate the source term parameters with improved precision.

The two proposed methods have certain limitations that must be solved.Both of them are not accurate enough to predict the source term parameters that are beyond the training range,which is an open challenge in machine learning.Thus,the corresponding training data must be obtained according to the different meteorological parameters and the terrain conditions.Furthermore,this paper only performs STE analysis for scenarios with a fixed obstacle.Additional sufficient training data are required for other complex terrain conditions.Note that the dataset used in this paper is collected through CFD simulation,which indicates that,to some extent,the noise exist in the data would not affect the quality of the model during the training phase.Also,changing the location of source is a potential focus that need to be introduced in our feature work,for example,using transfer learning to distillate useful information for other scenes.What’s more,it’s important to validate our method to practical applications.Last but not least,if we use practical data for modeling,it’s necessary to adopt denoising methods for higher performance.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgements

The work was supported by the National Natural Science Foundation of China (Basic Science Center Program:61 988101;21706069), Natural Science Foundation of Shanghai(17ZR1406800)and National Science Fund for Distinguished Young Scholars (61725301).

Appendix

Here,we give the definitions of different objective functions:

(1) where the first term is the concentration measured by the sensor.Mean square error (MSE)

(2) Absolute fractional bias (AFB)

(3) Normalized root mean squared error (NRMSE)

(4) NRMSE with logarithm transformation (LOG_NRMSE)

where ε is set to 0.01.

(5) Correlation distance (CORR)

where R is Pearson correlation coefficient which is calculated as following:

(6) WSD

where FAC2 is the fraction of data for which 0∙5


登录APP查看全文