1. Introduction
In chemical plants, the unexpected release and dispersion of hazardous chemical materials pose a significant threat to both human health and the natural environment. For example, in India, the release of styrene chemical plants caused the hospitalization of more than 1000 individuals [
1]. Gas sensors are commonly installed in chemical plants to detect gas leakages and prevent the escalation of accidents. These sensors are expected to (a) promptly detect the leak accidents and (b) provide preliminary estimations of the source location. However, uncertainty in the location of the leak source and the variation in wind conditions often lead to diverse leak consequences, presenting challenges to the effective detection of sensor networks. The determination of sensor locations is sophisticated and crucial.
The sensor placement optimization (SPO) problem aims at figuring out the optimal sensor placement with an objective under certain constraints, which are primarily the number of sensors and the candidate sensor locations. The objective is mainly influenced by practical requirements. Until now, various SPO models have been proposed with different objectives. In [
2], the authors constructed a database comprising consequences resulting from various leak sources and proposed a mixed-integer linear programming (MILP) SPO model with minimal expected detection time as the objective. Ref. [
3] incorporated the unavailability of sensors and voting strategies into the MILP model to better align the method with real-world scenarios. Some other risk factors related to gas leaks such as minimal total gas concentration [
4], minimal individual risk [
4], minimal cumulative death probability [
5], and minimal risk value [
6] have also been considered as objectives of SPO in chemical plants. In addition to optimization algorithms, the development of gas sensor designation (e.g., chemoresistive gas detectors [
7]) and the gas phase impurities measurement theorem [
8] have also significantly enhanced the performance of hazardous gas detection in real scenarios.
Source term estimation (STE) aims to determine the parameters of the leak source, which typically include the location and the emission strength. The STE problem is recognized as an ill-posed inverse problem with high non-linearity [
9]. Generally, there are two mainstream approaches in STE [
10]: optimization-based methods and Bayesian inference. Optimization-based approaches usually define a cost function by evaluating the discrepancy between concentration values measured by sensors and those computed by a forward dispersion model. A single optimal solution that minimizes this cost function is determined as the result of STE. In contrast, the Bayesian inference STE evaluates the posterior probability of different source terms. By means of stochastic sampling methods, the posterior probability density function (PDF) of source terms is drawn. The outcome of Bayesian inference STE is the most probable parameters in terms of the posterior PDF. For either of these two methods, the source–receptor relationship is a vital component that provides the capability of quickly predicting the concentration measurements of sensors when a certain source appears. Some popular methods for modelling the source–receptor relationship include the Gaussian plume model, the advection–diffusion equation with its adjoint equation [
11], and data-driven models [
12]. Besides optimization-based methods and Bayesian inference, some studies have also developed STE algorithms based on deep learning. Ref. [
13] developed an STE algorithm based on a convolutional neural network and concentration distribution images. Ref. [
14] proposed a federated STE framework inspired by federated learning. The efficiency of these algorithms has been validated under chemical plant scenes.
In most cases, the concentration measurements of gas sensors form the foundation of STE. A well-designed sensor placement layout can effectively provide spatial–temporal information of the gas concentrations, thereby enhancing the accuracy of STE. Previous research has highlighted the influence of sensor placement on STE. Ref. [
15] compared the STE errors among 10 different sensor placements in an urban neighborhood testing scene. Ref. [
16] proposed an SPO model leveraging the concept of information entropy and demonstrated that the sensor group with higher capability of gathering information performs better on STE. These works extensively investigated the impact of sensor placement on STE. However, it is regrettable that the scales of the test scenes in these works are relatively small, and that validation has not been conducted in complex environments such as chemical plants.
Given the variability in wind condition and the presence of multiple potential leak sources in chemical plants, this research develops an SPO framework with the goal of detecting all potential leak scenarios and improving STE accuracy. The main objectives of this study focus on two aspects: Firstly, an analytical framework combining SPO and STE is established, which proposes a basis for assessing whether sensor placement can achieve accurate STE in a chemical plant. Secondly, an analysis regarding the correlation between sensor placement and STE accuracy is conducted, along with an exploration of the most suitable SPO strategy for STE.
The remaining sections of this paper are organized as follows:
Section 2 introduces the analytical framework, the Bayesian inference STE, and the proposed SPO models.
Section 3 explains the parameters of the numerical experiment.
Section 4 exhibits the results of SPO and STE from the experiments and analyzes the impact of sensor placement on STE errors. Finally, conclusions and future work are presented in
Section 5.
3. Numerical Experiment Settings
3.1. Test Scenes and Leak Scenarios Design
Two scenes were designed for algorithm validation. The first scene, with flat terrain, denoted as
Scene1, has a calculation domain measuring
in length, width, and height, respectively. The primary aim of
Scene1 is to assess the algorithm’s effectiveness; hence, this scene is smaller and contains no obstacles. Nine hypothetical leak sources are uniformly located inside
Scene1 at the height of
. The layout of
Scene1 is shown in
Figure 3a. The second scene, mimicking the layout of a chemical plant, is denoted as
Scene2. The calculation domain of
Scene2 spans
, which is significantly larger than that of
Scene1. Eleven cylindrical storage tanks with heights of 20 m are located, and eleven hypothetical leak sources are defined on each storage tank at a height of
in
Scene2. Inhomogeneous wind fields would be formed under the impact of these obstacles.
Figure 3b exhibits the layout of
Scene2. The locations of leak sources in these scenes are listed in
Table 2. The emission strength of all leak sources is set to a constant 0.5 kg/(m
3·s). The leaked species is propane, which is a commonly used chemical with a molar mass slightly greater than that of air.
Compared to wind speed, the direction of wind more significantly influences the concentration distribution when a leak source is activated. Constrained by computational resources, this study only generates scenarios under varying wind directions while the wind speed is constant. Eight wind directions are chosen uniformly within the range of to , namely, , where is the kth direction of the wind. Here, the angle specifies where the wind blows from. A direction of represents the wind blowing from north to south, and represents it blowing from east to west. The wind speed is set at a constant 2 m/s in Scene1 and 4 m/s in Scene2.
A leak scenario is defined by a specified leak source and a determined wind direction. For each scene, the forward dispersion simulation of all scenarios formed a dataset for SPO, and then STEs were conducted for each scenario. If a scene contains m’ potential leak sources, then leak scenarios will be generated from this scene. Hence, 72 scenarios and 88 scenarios were generated for Scene1 and Scene2, respectively.
3.2. CFD Software and Configuration
Given that the source–receptor relationship in STE is derived from the steady-state advection–diffusion equation, we utilized this equation to simulate the gas dispersion in order to mitigate discrepancies between the forward dispersion model and adjoint equations. The wind field is critical for both forward dispersion and an adjoint equation. Large eddy simulation (LES), which is capable of providing a representation of turbulent structures and dynamics, was utilized to generate wind fields for all leak scenarios.
The open-source software program fire dynamic simulator (FDS) v6.7.9 [
21] was chosen to generate a wind field with effect of gas dispersion for different scenarios. In this experiment, FDS simulates the wind field by solving the Navier–Stokes equation with LES modelling the small-scale eddies. Subgrid-scale eddy coefficients are modeled by Deardorff’s model [
22]. After averaging the obtained wind fields over the time domain, the open-source software program OpenFOAM v1912 [
23] was selected to simulate the forward dispersion by solving the steady-state advection–diffusion equation (Equation (8)), without the consideration of viscosity and turbulence. This operation is carried out to reduce the error between mathematical models of forward dispersion and the adjoint equation. The AC fields of sensors under different wind conditions were also calculated by OpenFOAM by solving adjoint equation expressed as Equation (9). The FDS and OpenFOAM calculations were conducted on a workstation running a Linux OS with an Intel
® Gold 6242R 3.1 GHz CPU and 192 GB of memory. The volume of grids for CFD was approximately 1 m
3. It generally costs about 1.2 h and 3 h for FDS to finish a single scenario in
Scene1 and
Scene2, respectively. The calculations of OpenFOAM were quite fast because the steady-state equations are easy to solve.
Figure 4 illustrates some calculation results from
Scene2. 3.3. Candidate Sensor Locations, SA, and STE
Considering the balancing of SPO performance and computational limitations, 360 and 600 available candidate locations were determined uniformly in the plane at
z = 10 m for
Scene1 and
Scene2, respectively. Details of the candidate locations are illustrated in
Appendix A. To enhance the robustness of the optimization, SA was independently conducted five times for each of the three objectives. The solution yielding the highest score among these five runs was then selected as the optimized outcome for the specific objective.
After SPO, STE was conducted for all scenarios based on the optimized sensor placement. To accelerate the STE algorithm, during the MCMC process, the range of
q is fixed as
(the actual value of
q is 0.5 kg/s). The STE result is identified as the point at which the PDF is maximized for the dimensions
x,
y,
z, and
q. The location error
was defined as the Euclidean distance between estimated and true location, while the error of leak strength
was calculated as the absolute difference. The formulations of these indices are expressed as Equation (11):
The SA and STE algorithms were executed on the same workstation introduced in
Section 3.2. The time consumed by SA increases proportionally with the number of candidate sensors, which varies from 10 min to approximately 1 h. The time required for STE depends on the scale of the scene and the number of sensors. For Scene1, concurrent STE computation for 72 scenarios takes around 1 to 3 h to complete. For Scene2, this time extends to approximately 2 to 6 h.
4. Experiment Results
For both scenes, this section presents the SPO and STE results, along with an analysis of the impact of AS and MC on the error of STE and the exploration on the most suited SPO objective. For ease of reference, the abbreviations used in this section are listed in
Table 3.
4.1. Results in Scene1
4.1.1. SPO Results in Scene1
In Scene1, the number of candidate sensors for SPO is represented by an increasing sequence. This sequence begins at 8, increases by 1 until it reaches 25, and then increases by 5 until reaching 65. In total, 26 elements are contained in this sequence. For each optimized sensor placement, we evaluated the average values of AS and MC over all scenarios, as well as the 75% average of these factors calculated by Equation (10h). The variations of these two factors with changes in the number of sensors are illustrated in
Figure 5. We checked the results and ensured that all optimized sensor placements were capable of detecting all leak scenarios. Additionally, the results show the following:
(1) As the number of candidate sensors increases, average AS increases proportionally for three objectives. Among the three objectives, HMC exhibits the lowest average AS with a noticeable gap. The average AS of MAS-MC is comparable to that of MAS but slightly lower.
(2) In these three objectives, the average MC of HMC surpasses that of MAS-MC, which, in turn, exceeds that of MAS. Additionally, as the average AS reaches a certain threshold, the average MC seems to exhibit a negative correlation with it. This is explainable, as when there are numerous candidate sensors, from an overall perspective across all scenarios, the average AS is bound to increase, while the average MC of each sensor will inevitably experience a certain degree of decline. Generally speaking, these results align with the expectation of these optimization objectives.
4.1.2. STE Results in Scene1
The 78 sensor placements generated by different candidate sensor quantities and three optimization objectives, along with the 72 leak scenarios, constitute a total of 5616 distinct STE situations. The box figures and line plots in
Figure 6 illustrate location and
q errors of these STE situations with different quantities of candidate sensors. Overall, as the quantitation of candidate sensors increases, the STE errors decrease, and the error distributions are more concentrated around mean values. When comparing among three objectives, we noticed that HMC leads to the worst overall STE accuracy, both on location and
q, and that the accuracy of MAS-MC is better than that of MAS. Combined with the SPO result shown in
Figure 5, it can be inferred that the STE accuracy has a proportional correlation with AS, while that correlation with MC is not obvious.
Figure 7 summarizes all 5616 STE situations and divides them into several intervals according to the values of AS and MC, then examines the average and median STE errors of these intervals. The values on the axes in
Figure 7 are the lower limits of each interval. For example, the number 6 on the AS-axis of
Figure 7b (II) is the average STE location error of scenarios with AS values between 6 and 10. From (I) and (III) in
Figure 7a, it is evident that as AS increases, the decrease in the error of STE is noticeable, both in terms of position error and q error. However, (II) and (IV) in the same figure fail to exhibit a monotonic relationship between STE error and MC, and, in particular, the relationship between the
q error and MC is ambiguous. When horizontally comparing different columns along the AS-axis in (II) and (III) of
Figure 7b, it illustrates that the location error decreases significantly as AS increases. When the AS value is very low (e.g., the values of AS as 1 and 2), a negative correlation between the location error and MC occurs; however, under other conditions, this correlation is not noticeable. (IV) and (V) in the same figure show similar results; the only difference is that MC has almost no effect on the STE error of
q.
Figure 7c categorizes all STE situations according to the SPO objectives associated with the sensor placements and draws the distribution in different intervals. From these heatmaps, it can be read that in this simple scene, MAS and MAS-MC achieve a balance between AS and MC, while HMC leads to extreme intervals and thus increases STE errors.
4.2. Results in Scene2
4.2.1. SPO Results in Scene2
Scene1 is a very simple scene that has no obstacles, while
Scene2 is a much more sophisticated one at larger scale and with several cylindrical obstacles inside. These huge obstacles significantly impact the homogeneity of the wind field and greatly extend the coverage area of gas concentration. The numbers of candidate sensors in this scene comprise an increasing sequence that begins at 8, increases by 2 until 20 and then increases by 5 until 110. Similar to
Scene1, the average and 75% average AS and MC are evaluated for each optimized sensor placements, and the results are shown in
Figure 8. The SPO results in this scene are roughly similar to those of
Scene1, while some new features are also presented:
(1) The average AS of three objectives shows little disparity. Although the 75% average AS of HMC still lags behind the other two objectives, the differences between HMC and other objectives are no longer that substantial. This is due to the escalation in the gas coverage area, which makes the deployed sensors much more likely to detect the gas.
(2) The average MC of MAS-MC is lower than that of HMC, while that of MAS is significantly lower than that of the other two objectives. The average MC shows a negative correlation with the average AS. Overall, the SPO results for MAS and MAS-MC are close to expectations. However, the optimization results for HMC exceed expectations as the AS values are not significantly low, even though AS is not included in the objective function of HMC.
4.2.2. STE Results in Scene2
The 75 sensor placements generated by different candidate sensor quantities and three optimization objectives, along with the 88 leak scenarios, constitute a total of 6600 distinct STE situations.
Figure 9 shows the location and
q errors of all STE situations. Due to the increased scene scale, the overall location error is notably higher than that in
Scene1. Also, the correlation between
q error and quantities of candidate sensors is unrecognizable. Therefore, the location errors of STE are emphasized here. Among these three objectives, MAS location errors become the highest. When the numbers of candidate sensors are relatively low (lower than 14), the number of errors in MAS-MC is lower than in HMC. In other cases, the location errors in HMC are the lowest.
The 6600 STE results summarized in
Figure 10 to some extent align with the findings in
Scene1 but also reveal some novel phenomena. From (I) and (II) in
Figure 10a, the average and median location errors gradually decrease as AS increases, and a sharp decline occurs when AS reaches around 30. When it comes to MC, we observe a significant decline when MC is relatively low (lower than approximately
). Then, as MC increases, the location errors decrease gradually. (III) and (IV) of the same figure fail to reveal any relationship between the
q error and AS or MC. In (II) and (III) of
Figure 10b, the colors are darkest in the bottom-left corner, indicating that it is nearly impossible to conduct STE if the values of AS and MC are both low. Additionally, it is noted that the colors in the upper halves of both images are slightly lighter than those in the lower halves, which means lower STE location errors are detected when MC values are higher. The location errors are quite low when AS is extremely high (higher than around 31); however, this is usually not cost-effective for enterprises. The leftmost rows in (IV) and (V) illustrate very high
q errors when only one sensor is activated. Apart from this, little representative information can be extracted from these two subplots.
From
Figure 10c, it can be observed that although there is some clustering in the upper-left corner interval of the graph, the STE situations resulted by HMC do not exhibit the excessively low values of AS observed in
Scene1. The distribution of MAS is relatively concentrated in the lower intervals of the MC-axis, indicating lower MC, while the distribution of MAS-MC is similar to that of HMC. The results reveal that in such complex scenarios, MC should be a key consideration for SPO, while AS can be given less emphasis.
4.3. Discussion
The SPO and STE conducted on Scene1 and Scene2 yielded rich outcomes, including diverse SPO results and a total of 12,216 STE results. These results also demonstrate that the complexity of the scene influences the SPO and STE results. Compared to Scene1, the expansion of scale and the complexity of obstacles in Scene2 result in numerous new features in the experimental outcomes. Due to the closer resemblance of Scene2 to a real chemical plant, we consider the results obtained in this scene to be more representative. From the results, some regularities can be observed:
(1) A negative correlation between the STE location error and the value of AS is observed in both two scenes. However, the STE location errors in Scene2 only show a noticeable reduction when AS reaches approximately 20. In practice, the quantity of candidate sensors is a primary constraint of SPO, and thus the AS values are usually not that large. In such conditions, placing sensors in locations with higher MC is more cost-effective for SPO.
(2) Although a negative correlation between q error and AS is observed in Scene1, the results in Scene2 fail to provide supporting evidence. Actually, since q merely serves as a multiplier in STE as Equation (10), it is relatively challenging to make precise estimates of it through stochastic sampling.
(3) Among the three SPO objectives, HMC leads to the best overall STE performance in Scene2 even though it results in the worst performance in Scene1. The scale of Scene2 and the complexity of obstacles make it relatively easy for sensors to be activated in a gas leak scenario. This prevents AS from being excessively low, despite HMC not incorporating AS as part of the optimization objective. Therefore, when applying the SPO method described in this paper in complex scenes such as chemical plants, it suffices to consider only the MC of sensors to achieve a reduction in STE location error, without emphasizing the values of AS.
(4) The discrepancy between results of Scene1 and Scene2 cautions us to mind the influence of scene complexity on the analysis results when analyzing sensor placements utilizing this analytical framework. Conclusions drawn from simple scenes may not necessarily be generalizable to complex scenes such as chemical plants.
(5) In
Scene1 (
Figure 6), the downward trend of STE location errors slows down when the number of sensors exceeds 17 (with SPO objective as MAS-HC). In Scene2 (
Figure 9), such performance requires that the number of sensors exceeds around 45 (with SPO objective as HMC). In practical scenarios, the total number of sensors also acts as an objective, considering the economic cost.
5. Conclusions and Future Work
This paper proposed an analytical framework to determine sensor locations for enhanced STE and analyzed the SPO strategy in complex scenes such as chemical plants through investigating the impact of sensor placement on STE errors. To obtain rational sensor placements, a mathematical model of SPO is proposed in
Section 3 with HMC, MAS, and MAS-MC as objectives. All these objectives ensure that the sensor placements possess the capability of detecting all potential gas leak scenarios. Subsequently, STE calculations and post-processing are conducted based on sensor placements gained by SPO. In experiments, two test scenes were created, in which CFD, SPO, and STE were sequentially conducted. A total of 12,216 STE results indicated that both AS and MC have a negative correlation with the STE location errors. Specifically, a significant reduction in this error was observed when AS is large. In
Scene1, AS has a greater impact on STE errors compared to MC, and MAS-MC as the objective of SPO yields optimal STE accuracy. In
Scene2, the significant reduction in STE location errors requires AS to be larger than around 20, which is hard to achieve under the constraints of the number of candidate sensors. Moreover, results in
Scene2 revealed that in chemical plant scenes, the objective of SPO should focus on MC rather than AS for enhanced STE. In this experiment, HMC as the objective resulted in lowest overall STE errors. Additionally, the different conclusions drawn from the two scenes discerned the lack of generalizability across scenes with distinct scales and complexities.
The current work still has some limitations. Firstly, although this paper extensively analyzed the impact of AS and MC on STE errors, more research is needed to explore the underlying principles of this impact from a mathematical perspective. Secondly, this study temporally focused on the influence of AS and MC in sensor placement; however, some potential factors like the distance between sensors, and that between sensor and the leak source, might also be critical to the accuracy of STE. It would be meaningful to explore further and propose an improved SPO model. Thirdly, more realistic factors should be included in further experiments, for instance, the settling of species dispersion, the expansion of experimental scene, and the expansion or limitations of candidate sensor locations for SPO. Lastly, the factors affecting the STE errors of q need more exploration. These issues remain to be addressed in future research.