Intelligent Mobile Wireless Network for Toxic Gas Cloud Monitoring and Tracking

Intelligent wireless networks that comprise self-organizing autonomous vehicles equipped with punctual sensors and radio modules support many hostile and harsh environment monitoring systems. This work’s contribution shows the benefits of applying such networks to estimate clouds’ boundaries created by hazardous toxic substances heavier than air when accidentally released into the atmosphere. The paper addresses issues concerning sensing networks’ design, focussing on a computing scheme for online motion trajectory calculation and data exchange. A three-stage approach that incorporates three algorithms for sensing devices’ displacement calculation in a collaborative network according to the current task, namely exploration and gas cloud detection, boundary detection and estimation, and tracking the evolving cloud, is presented. A network connectivity-maintaining virtual force mobility model is used to calculate subsequent sensor positions, and multi-hop communication is used for data exchange. The main focus is on the efficient tracking of the cloud boundary. The proposed sensing scheme is sensitive to crucial mobility model parameters. The paper presents five procedures for calculating the optimal values of these parameters. In contrast to widely used techniques, the presented approach to gas cloud monitoring does not calculate sensors’ displacements based on exact values of gas concentration and concentration gradients. The sensor readings are reduced to two values: the gas concentration below or greater than the safe value. The utility and efficiency of the presented method were justified through extensive simulations, giving encouraging results. The test cases were carried out on several scenarios with regular and irregular shapes of clouds generated using a widely used box model that describes the heavy gas dispersion in the atmospheric air. The simulation results demonstrate that using only a rough measurement indicating that the threshold concentration value was exceeded can detect and efficiently track a gas cloud boundary. This makes the sensing system less sensitive to the quality of the gas concentration measurement. Thus, it can be easily used to detect real phenomena. Significant results are recommendations on selecting procedures for computing mobility model parameters while tracking clouds with different shapes and determining optimal values of these parameters in convex and nonconvex cloud boundaries.


Introduction
Modern industry produces substances whose volatilization causes a severe threat to the environment. Many of these hazardous substances form gas clouds heavier than air when accidentally released into the atmosphere. As a result, the gas cloud changes its shape, which is usually irregular, moves and covers a larger area with time. Toxic gases usually endanger humans [1]. The strategic step for conducting a situational assessment is to create a sensing system to determine a gas-covered area with a concentration greater than the safe value [2]. regularity of the distribution. Therefore, methods that determine the direction of motion based on the exact value of the measured concentration can give outstanding results in simulators and fail in the real world. In our system, sensor readings are reduced to two values, namely the gas concentration below or greater than the safe value, to decrease its sensitivity to the accuracy of gas concentration measurements.
To sum up, this work's main contribution is to present the general overview of the system for detection of a heavy gas cloud in a working space W, detection of its boundary, and its estimation and tracking. The algorithms for motion planning and cooperation of the sensing devices used at each stage of the gas cloud exploration are presented and discussed. The system can be used for disaster management using unmanned vehicles or drones equipped with sensors. The data collected by the sensors and transmitted to the emergency management center will allow creating emergency awareness, supporting the evacuation of people from the endangered area, supporting the rescue teams conducting operational activities, and neutralizing a toxic spill.
The presented results extend the work described in [11]. The paper [11] addresses the problem of cloud boundary detection and estimation. In this paper, a brief overview of algorithms for cloud boundary detection and estimation is provided. The attention is paid to the most challenging task, namely, a boundary of slowly moving cloud tracking. The main contribution is a novel algorithm for convex and nonconvex gas cloud boundary tracking and five procedures for tuning the algorithm's parameters. An exhaustive simulation study that shows the effectiveness of these procedures depending on the considered scenario is presented. Finally, we provide recommendations for the choice of a procedure, respectively, for a given cloud shape.
The rest of the paper is structured as follows. Section 2 presents the survey of the application of MANETs to monitor and truck phenomena clouds. Section 3 provides a formulation of the problem to be solved and the model of a network composed of smart wireless sensing devices. Section 4 describes the concept of a three-stage strategy for heavy gas cloud monitoring and tracking and computing schemes for online motion trajectories calculation. A comparative study of a few variants of procedures for tuning model parameters is presented in Section 5. Finally, Section 6 concludes the paper and highlights future research directions. The Appendix A provides a list of notations used that is standard across all of the sections.

Related Work
The problem of developing effective and valuable strategies for detecting, estimating and tracking boundaries using collaborating static and mobile sensing devices has been studied in recent years by many researchers. Various techniques have been investigated, implemented and tested through simulation and in testbeds constructed of real devices. Shu et al. in [12] discuss the research directions for existing and future gas leakage source detection and boundary estimation schemes with wireless sensor networks. The authors of [13] present a survey of selected approaches for monitoring phenomena clouds. They can be classified concerning various criteria, such as a task to be performed, equipment used and expected network configuration, sensing and control strategies, communication and computing algorithms, and the accuracy of utilized gas dispersion models. A significant problem addressed in the literature is the resilience of the monitoring network to failures and insufficient energy resources. Imran and Ko in [14] present an energy-efficient method for detecting and estimating continuous objects spread over a large area by a failure-prone network. Improving the accuracy of boundary estimation while reducing the energy consumption is considered in [15].
This paper focuses on mobile sensing networks for phenomena-cloud boundary estimation and tracking. In general, we can distinguish simple systems built of a single mobile sensor or more complex systems comprised of a team of sensing devices. The simple systems for gas cloud boundary tracking are described in [16,17]. Wang et al. in [16] propose the algorithm for boundary estimation and tracking using a gas concentration gradient. A single moving platform equipped with the punctual sensor explores the sensing scene and constantly measures the gas concentration. The concentration gradient and consequently a new position of the platform are calculated based on these measurements. The algorithm for control the motion of a single unmanned underwater vehicle (UUV) equipped with sensors is presented and examined in [17]. Similarly to [16], both the initial detection of the cloud boundary and the tracking procedures are based on calculating the toxic substance concentration gradient. Moreover, the current speed measured by a dedicated sensor is taken into account in motion trajectory calculation. The proposed control algorithm was validated in the natural water reservoir with a dyeing substance imitating the toxic one. The paper [18] addresses the problem of boundary tracking for the mobile robot with uncertain dynamics and external disturbances. Sun et al. present and evaluate an adaptive control system using a radial basis function neural network to approximate a nonlinear function containing the uncertain model terms and toxic substance concentration gradient. Simulation results illustrate the stability of the system.
Another group of systems is networks built from cooperating or non-cooperating devices. The scheme for data gathering by multiple autonomous and non-cooperating underwater vehicles is described and discussed in [19]. In this approach, each device's target position is determined autonomously. The current positions of other team members do not influence this device's position calculation. A similar approach with multiple autonomous vehicles used to track boundaries is described in [20].
Many researchers address the problem of boundary tracking by a team of cooperating vehicles. Singh et al. in [21] describe a simple mechanism for unmanned vehicle cooperation. It is composed of two phases: first, mobile devices that form the network explore roughly the whole area of interest, then the initial shape of a boundary is discovered. In the second phase, each node follows the boundary to increase the accuracy of the initial estimation. Singh et al. demonstrate that their strategy can be easily adapted to a network consisting of multiple devices. In the case of a wide sensing area, it can be divided into subregions that are equally assigned to all nodes. Data collected by all nodes are gathered by a selected node that estimates the boundary's shape. Next, the estimated boundary is divided into parts that are assigned to nodes, respectively, for further investigation. This approaches' main drawback is that each device has to cover a long distance in the case of a vast cloud. Triandaf and Schwartz in [22] present a method for calculating the motion path for the formation of communicating sensors. The aim of all sensors is to follow a time-dependent concentration gradient. The algorithm allows the sensors to move in space in a non-stationary environment. It can be used for finding and tracking the boundary of any stable surface. The common feature of the solutions proposed in [23,24] is the concept of nominating a leader of the whole formation. This leader is selected from the group of devices located close to the cloud boundary. The objective of the sensing system described in [23] is to detect and track a wildfire border. It is assumed that network nodes measure the temperature of the air. The Rothermel model describing a spreading fire and the Kalman filter to detect a boundary in a sensing space are used to develop an algorithm for the motion control of all sensing devices. Unfortunately, because the Rothermel model is directly used to calculate all sensing devices' target positions, this computing scheme can not be quickly adapted to other use cases. In [24], a team of four mobile robots is used to track the boundary of a phenomena cloud. A concentration gradient is used to calculate the target positions of all robots. At every time step, all devices equipped with punctual sensors measure the concentration of substances, and the concentration gradient is calculated. All devices' target positions are calculated, solving the optimization problem with the performance function dependent on the concentration gradient. The application of algorithms for motion planning based on the concentration gradient and the concept of a virtual potential field [7], which are widely used in mobile robotics, is presented in [25]. Both techniques were verified and validated through simulation of the underwater oil spill tracking by unmanned underwater vehicles.
An alternative approach to tracking heavy gas clouds is to apply accurate models of the phenomena and use computer simulation to predict cloud dynamics and environmental risk. The heavy gas dispersion simulators SLAB [26] and Fluidyn-PANACHE [27] are commonly used. In [1], rapid assessment of exposure to chlorine released from a train derailment is described. However, to estimate the area covered by the heavy gas cloud, additional data and measurements have to be provided, i.e., landform, wind direction and strength, and obstacles presence. The quality of the cloud's boundary estimation is usually sensitive to the accuracy of these data.
Reviewing the literature shows that most of the proposed gas cloud tracking systems built from mobile sensing devices use accurate gas concentrations in a sensing space and centralized schemes for node position calculation. The disadvantages of such an approach are discussed in Section 1. Therefore, our research focused on developing a solution that does not utilize the concentration gradient and implements the distributed mobility model.

Problem Formulation and Model of a Mobile Wireless Sensing Network
The aim is to design a sensing network composed of intelligent mobile wireless devices to explore an unknown environment to detect the toxic gas cloud, detect its boundaries, and finally, monitor and track the boundary of the evolving and moving cloud. Consider a network comprised by a set V of mobile sensing devices (network nodes) In the above formulas, E denotes the set of active direct connections between each pair of devices D i , and D j , i = j, (D i , D j ) is a bidirectional link. Each D i is equipped with the radio transceiver with radio range r t and a positioning system (GPS). Its position is described by a reference point x i = [x i 1 , x i 2 , x i 3 ], which is the location of its antenna. d i j = ||x i − x j || is the Euclidean distance between D i and D j . Assume that each node D i can freely change both its position and role in a network according to its knowledge about the environment and the network topology.
Each D i uses a punctual sensor to measure the gas concentration g at a given point in a workspace W every regular time interval ∆t. For the sake of simplicity, it is assumed that each sensor at time t returns one of two values • g(x, t) = 1: the gas concentration exceeds the threshold valueḡ, • g(x, t) = 0: otherwise.
This approach does not use a concentration gradient. Therefore, local disturbances in gas concentration can be ignored.
Each D i can move with the speed v i ∈ [v i min , v i max ] in a desirable direction. The common direction in motion planning is to apply an artificial potential function V that can be viewed as a landscape where the device moves from a high-value state to a low-value state. A value of this function can be viewed as energy and its gradient as a force. V can be constructed as a sum of repulsive and attractive potentials, i.e., V(d) = V − (d) + V + , where d denotes a distance between a given device and other devices in a network or obstacles in the working space. The meaning of V − (d) and V + is straightforward; the obstacle repels the device, the target point attracts it. Hence, the sum of both these influences draws the device to the target position while deflecting it from obstacles.
In our research, we have adopted a network connectivity-maintaining, virtual force mobility model described in [28] to calculate motion trajectories of platforms carrying sensors. In this model, a simple artificial potential function drawing on the Lennard-Jones potential used in liquid crystals is applied to model the interactions between moving devices and their displacement calculation. The function V i j that models the interactions between two devices D i and D j is as follows where d i j denotes the reference distance between D i and D j . The total potential between D i and all other m objects in the working space, i.e., other sensing devices and obstacles in the working space and target position, can be expressed as follows where i j > 0 denotes the weighting factor determining the importance of the impact of the object j on D i . Moreover, since the external communication system can be broken or suffer from congestion in the disaster area, it is assumed that the distance between the selected, critical pairs of nodes should not be greater than the specified safe distance that guarantees permanent connectivity in a network.
The task is to calculate the optimal positions of all D i , i = 1, . . . , N at given time steps for a given application scenario. From Equation (4), it is obvious that in the reference positions of all D i , namely such that d i j = d i j , an optimal network topology is obtained.

An Overview of a Method for Heavy Gas Cloud Monitoring and Tracking
The application scenario considered in this paper is heavy gas cloud detecting and monitoring. Figure 1 shows a typical heavy gas cloud. Due to its dispersion characteristics, heavy gas forms a cloud with the largest cross-section at its base. In situational awareness tasks, determining the extent of contamination and delineating the area at risk is critical. Moreover, in most heavy gas propagation simulators, the cloud moves over a flat area and ignores local terrain and obstacles, which also cause changes in gas density. Therefore, although our virtual force motion model allows motion trajectories to be determined in three-dimensional space, the research presented in this paper focuses on the two-dimensional and obstacle-free workspace.
Consider the self-organizing network defined in Equations (1)- (5). Assume the sensing devices (network nodes) D i (i = 1, . . . , N) do not have any information about the environment, particularly the cloud location. However, they can exchange data with each other about their positions and the measured gas concentrations. Based on this information, they autonomously determine the direction and speed of movement in a workspace. The limitation of the number of sensor readings g(x, t) to two values (0 and 1) allows fast detection of the cloud boundary. Changing the reading value indicates crossing the boundary.
Our heavy gas cloud monitoring method is composed of three main steps executed sequentially.
• Stage 1: workspace exploration to search for a gas cloud. • Stage 2: cloud exploration to detect its boundary. • Stage 3: permanent exploring and tracking of a cloud boundary.
All network nodes perform at regular intervals ∆t of gas concentration measurements and exchange information about their locations and current sensors readings. Then, based on the obtained data, an optimal new target position of each device is calculated.

Stage I: Gas Cloud Detection
A team of N sensing devices D i , i = 1, . . . , N is used to explore the sensing scene W to search for a gas cloud. The device D 1 is responsible for maintaining the connectivity with the base station (BS)-the system's central station. Other devices enable constant communication with D 1 using multi-hop transmission. Hence, all D i , i = 1, . . . , N create the coherent searching network that maintains continuous connectivity with BS.
The first stage begins with setting the target point c in the workspace. It is randomly selected. The device closest to the point c is elected to be a temporary leader D leader of the team. D leader is forced to move in the direction of c, the other nodes are forced to follow D leader . A new position of D leader is calculated every ∆t solving the following optimization problem with reference distance d i c > 0 closed to 0. Other devices follow the D leader . They move in formation. The process is repeated until the cloud is detected by at least one sensing device D k ∈ V. Then D k continues its movement, and the remaining devices are attracted to D k . Their displacements are calculated as follows with positive reference distance d i k ≈ 0. The cloud can move and change its shape over time. All D i measure the gas concentration every ∆t and in the case of g(x i , t) = 0, they move towards the cloud. The first stage ends when sensors of at least two devices detect gas concentration higher thanḡ ( Figure 2a).
Then, the location Ψ of the gas cloud center is estimated based on data received from devices located inside the cloud.
where V + denotes a set of devices located inside the cloud. The number of devices with positive sensor readings increases in time. Ψ is updated based on new data received from all these devices.

Stage 2: Gas Cloud Boundary Detection
The second stage aims to extract the cloud from the environment, namely, detect its boundary, not explore its inside. The boundary is defined as a curve dividing the workspace W into two regions, respectively, with a gas concentration greater and lower than a given concentration thresholdĝ. The optimal solution of Stage 2 is an even coverage of the cloud boundary with sensors. Hence, the target positions of all devices should be on the cloud boundary. To solve this task, we have to elbow sensing nodes, repulse them from the center of the cloud Ψ, and force them to move and take the target positions. The complexity of the problem grows in the case of vast clouds and an insufficient number of sensing devices. We developed and validated through simulations two computing schemes, centralized and distributed ones. In the centralized method, one node in a network is nominated for a network head D H ∈ V. Each device D i , i = 1, . . . , N repetitively calculates its target position in W, solving the optimization problem In the above formulas, i Ψ ≥ 0 and i j ≥ 0 denote weighting factors determining the importance of the impact of, respectively, the center of the cloud Ψ and the neighboring node D j on the new position of D i . d i Ψ and d i j are real Euclidean distances between x i and, respectively, Ψ and x j after a network transformation. d i Ψ and d i j are the reference distances between x i and, respectively, Ψ and x j . These distances are repetitively calculated by the leader of a network D H .
N is a set of neighboring nodes of the node D i and r t is the radio range.
In contrast to the centralized method, a clustering-based technique is proposed. The In each cluster V m , m = 1, . . . , M one node is nominated for a cluster head D H m ∈ V m . Moreover, we select one cluster head to be the head of the whole network, D H ∈ {D H 1 , . . . , D H M }. All cluster heads are responsible for maintaining permanent connectivity with D H . All members of a given cluster have to maintain permanent connectivity with its cluster head. Hence, each network node repetitively calculates its target position in W, solving the optimization problem where In the above formulas, i k denotes a weighting factor determining the importance of the impact of the centroid of a cluster V k , d i k an actual Euclidean distance between x i and a centroid of k-th cluster (c k ). IC m denotes a set of indexes of two clusters closest to the m-th cluster that contains D i . d i k is an average distance between centroids of two clusters with indexes from IC m increased by a slight distance margin w 2 .
The calculation scheme and algorithm for selecting clusters for the set IC m are described in detail in [11]. Moreover, the authors of [11] present the results of the comparative study of two computing schemes: centralized and distributed. After numerous simulations, some improvements to the cluster-based algorithm that speed up the target positions calculations and do not affect the final result were introduced. Since the task of cluster leaders D H m , m = 1, . . . , M is limited to maintaining communication, the optimization problem (12) that has to be solved by each D H m can be simplified to the following one A sample result of the clustering-based algorithm is depicted in Figure 2b. The paper [29] defines criteria for sensing network topology assessment and describes the algorithm that can be used to temporarily detect optimal topology and complete the second stage of the computing scheme. In general, stage 2 is completed when devices are almost evenly distributed on the boundary of the cloud, Figure 2c. The set of these devices' locations can be used to discover a given gas cloud boundary's shape.

Stage 3: Gas Cloud Boundary Tracking
The final aim is to explore and track the gas cloud and report changes to its boundary over time. Let us assume that both nodes and clusters are almost evenly dispersed on the area covered by the phenomena; Figure 2c and Stage 3 starts. Each cluster head D H m , m = 1, . . . , M selects one node from m-th cluster members. Let us denote it D P m , where D P m ∈ V m , and m is a cluster number. This node aims to move along the boundary over time to discover its current shape, Figure 2d. Other members of cluster m follow D P m , m = 1, . . . , M. They serve as a communication link to the network head D H , which collects data from all network nodes.

Node D P m Selection
Let us consider the cluster V m . One can distinguish two situations (Figure 3). Some members of the m-th cluster are located on a boundary (Figure 3a). The set of nodes located on a boundary at time t is defined as follows where ∆t out denotes a fixed time period. The node most advanced in a clockwise direction is selected to play the role of D P m .
(a) (b) Otherwise, when all cluster m-th members are located inside the cloud, the node furthest from the cluster head D H m is nominated for D P m (Figure 3b). The distance between a given node D i ∈ V m and D H m is calculated in hops, i.e., number of relay nodes.

Motion Trajectory Calculation
Both D P m , m = 1, . . . , M and other members of clusters repetitively calculate their target positions in W, solving the optimization problems with performance measures defined respectively to their roles in the sensing network.
Let us start from the leaders of tracking teams D P m , m = 1, . . . , M displacements calculation. Two points that influence these nodes' motion trajectories can be defined, i.e., centroid of the cloud Ψ (9) and the point χ ⊂ W that forces the node to follow the cloud boundary. Hence, we obtain two functions V P m Ψ and V P m χ that model the interactions between each D P m and, respectively, Ψ and χ. The method for determining point χ is shown in Figure 4. Two cases are considered, the first one with the current position of D P m outside the cloud (Figure 4a) and the second one with D P m inside the cloud (Figure 4b).
(a) (b) Finally, a new position of D P m is calculated every ∆t, solving the following optimization problem.
where d P m Ψ and d P m χ denote an actual Euclidean distances between D P m and, respectively, the estimated centroid of the cloud Ψ and point χ. d P m Ψ and d P m χ are reference distances between D P m and points Ψ and χ. Note that the cloud is in motion. Each node D P m , m = 1, . . . , M is forced to move inside or outside the cloud depending on the sensor reading. Hence, the motion trajectories oscillate around the cloud boundary. To force oscillations, the reference distances d P m Ψ in Equation (16) are defined as follows where V + denotes the set of devices located inside the cloud. Other members of the clusters D i ∈ V m , m = 1, . . . , M (including D H m ) aim to maintain connectivity between nodes D P m and D H . They are relay nodes in communication between D P m and D H . It is evident that each node D i ∈ V m , D i = D P m is forced to follow D P m . Hence, its new position is calculated every ∆t, solving the optimization problem.
where d i P m denotes an Euclidean distance between D i ∈ V m and D P m , d i P m is a reference distance between D i and D P m . r t is the radio transmission range.

Weighting Factor Calculation
Several parameters have to be identified in the optimization task (16). To simplify the model, we assumed without loss of generality d P m = d P m χ = d P m Ψ and Ψ = 1. Hence, the optimization problem (16) is reduced to the following one and only coefficient χ must be tuned. The impact of χ on the recommended motion direction of the node D P m is depicted in Figure 5. The recommended motion direction should be fit to the shape of a given boundary. Figure 6 presents the examples of various shapes of the cloud boundary and adequate directions of D P m displacements. Assume τ z , z = 1, 2, . . . , denote time stamps of D Pm detector state changes (g(x P m , τ z ) = g(x P m , τ z − ∆t)) and τ z+1 − τ z = k z · ∆t, where k z is a number of sensor readings taken since the last change of the detector state. Five methods for the weighting parameter χ in Equation (19) updating every ∆t, i.e., at time steps t = τ z + ∆t, τ z + 2∆t, . . . , τ z + (k z − 1)∆t, z = 1, 2, . . . , were proposed and tested. The input data contains a list of historical values of χ and a list of historical bivalent sensor readings. The following items present the algorithms for adjusting the factor in the periods between subsequent sensor readings changes, i.e., τ z+1 − τ z , z = 1, 2, . . . ,.
Variant I A constant value of the weighting factor in the whole tracking horizon.
Variant II Decreasing the value of the weighting factor over time (the closer the device to the cloud boundary, the slower it moves). The new value of χ is calculated based on the previous one, starting from the predefined value) where l ∈ (0, 1).

Variant III
The initial value of χ for time stamps τ z , z ≥ 3 is calculated as a linear combination of a predefined constant value and value of χ at the time stamp of the same change of sensor state in the past.
where α ∈ (0, 1) is an experimentally adjusted model parameter and χ a predefined constant value. z−2 χ is a value of the factor calculated at time stamp τ z−1 − ∆t. The scaling factor is decreased according to the Equation (20).

Variant IV
(0) χ = χ at time stamps τ z , z < 3. At time stamps τ z , z ≥ 3 the initial value of χ is calculated according to the following formula where τ z−1 − τ z−2 = k z−2 · ∆t, b > 0 is a constant value used to increase the speed of node D P m . The scaling factor is decreased according to the Equation (20).
Variant V Modification of variant IV by replacing the fixed b with the variable b. This variable is updated every τ z , z = 1, 2, . . .. It is calculated as follows where ∆b > 0 is a fixed value and b z−2 a value of the variable b calculated at τ z−1 − ∆t. Finally, the initial value of the factor χ at time stamps τ z , z ≥ 3 is calculated according to the following formula Next, the scaling factor is decreased according to the Equation (20).

Nonconvex Boundary Tracking
The problem arises in the case of tracking the cloud boundary with concave sections. The possible target positions are limited to the quarter determined by the range of motion of D P m , Figure 7a. Therefore, it may take a long time to cover the border accurately, even if the value of factor χ is close to zero, (Figure 7b). Hence, to improve the quality and speed up the concave sections tracking, the following correction procedure is proposed. In the case of χ < min , where min is a predefined threshold value, the point χ is relocated. Its position is replaced by a new one calculated by rotating the original one by the angle r π 2 , r ∈ {−3, −2, −1, 1, 2, 3} in a clockwise direction relative to the position of D P m . Then, the optimization problem (19) is solved, and new positions of leaders of tracking teams D P m , m = 1, . . . , M are calculated. The parameter r is calculated according to Algorithm 1.

Experimental Study
The computing scheme for detecting and tracking heavy gas clouds was tested and evaluated through simulation. Many of the experiments were designed and conducted to tune the parameters of the developed algorithms for sensing devices' motion planning and evaluate the efficiency of developed sensing networks. The sensing networks comprising intelligent wireless mobile devices were implemented in the MobASim simulation platform [30]. MobASim is a software environment for prototyping and simulation of wireless ad hoc networks in two-dimensional space. For the experiments, a simple box model of an instantaneous heavy gas cloud [31] that hazard analysts widely adopt was implemented. It provides a convenient and efficient method for atmospheric dispersion modeling.

Quality and Performance Metrics
Three metrics to measure the quality and efficiency of developed algorithms were defined, i.e., (i) the accuracy of the boundary estimation, (ii) the time used to discover the boundary, (iii) frequency of boundary-crossing.
Compact sensors' coverage of the boundary of the cloud is the most crucial requirement. To evaluate this requirement, the widely used accuracy measure acc was proposed Let us assume that t circle denotes a lap time of the gas cloud by the sensing device D P m . Subsequent target positions of D P m are calculated every ∆t. Hence t circle = L · ∆t, where L is the number of calculated positions. Let us use linear interpolation. The input data set consists of L target positions of D P m . Finally, we can approximate the cloud boundary and use it to estimate the area covered by the cloud. Figure 8 shows the result for the circular gas cloud covering the part of the given working space. Then, we can calculate the values of TP (true positive), TN (true negative), FN (false negative) and FP (false positive) in Equation (25). TP and TN denote the correctly recognized area by our sensing devices, respectively, inside and outside the cloud, while FN and FP denote incorrectly recognized areas. It is evident that the greater the acc measure, the better the approximation of the boundary. In general, it is desirable for the sensing device to cross the boundary as frequently as possible. It means that the devices are still within the narrow margin of the boundary. Hence, the corresponding measure f crossing can be defined The linear interpolation better approximates the boundary of the cloud when there is a higher f crossing . Finally, a cloud boundary exploration time t circle should be as short as possible.
An indicator q that aggregates all described metrics has been introduced to simplify the sensing network performance evaluation where w t > 0, w f > 0 and w acc > 0 are parameters that indicate the importance of given measures.

Scenario Description
The testing scenario was a synthetic network comprised of 16 sensing devices designed to detect and track the chlorine cloud resulting from an immediate leak. All devices were equipped with radio transceivers with a maximum transmit power equal to −10 dBm (transmission range r t = 162.86 m), sensors measuring gas concentration every ∆t = 1 s and moving platforms with a maximum speed 15 ms. In all experiments, the network was divided into four autonomous clusters. In general, the subnetworks trucked the cloud independently, and the only binding element was the center of cloud Ψ. The following values of parameters in indicator q (27) were fixed: w t = 3, w f = 1 and w acc = 2.
Five simulation scenarios were tested: Cloud 1, a gas cloud with a circle-shaped border, Cloud 2, a gas cloud with an ellipse-shaped border, Cloud 3, a gas cloud with a mixed border, partially circle-shaped and partially ellipse-shaped, and two gas clouds, i.e., Cloud 4 and Cloud 5, with nonconvex borders. The average values of performance metrics acc, f crossing , t circle and q calculated by leaders of all clusters are presented in the tables. All figures illustrate motion trajectories of device D P m from the same selected cluster. Consecutive points show successive D P m positions in the workspace (800 × 800 m). At this localization, D P m measured the gas concentration. Colors indicate the values of χ used to calculate these points. Various shades of five colors: violet ( χ ∈ [0.1, 2.5) ), blue ( χ ∈ [2.5, 5.0)), green ( χ ∈ [5.0, 7.5)), yellow ( χ ∈ [7.5, 10)), red ( χ ≥ 10) are used.

Model Parameters Tuning-Circle and Ellipse Shaped Clouds
The first set of experiments were designed to examine and compare the performance and efficiency of the developed sensing network for various values of parameters χ , b, ∆b, l and α that have to be arbitrarily selected by the user and the weighting factor χ in Equation (19) calculated according to I-V variants described in Section 4.3.3. The aim was to test the sensitivity of the developed algorithm for boundary tracking of these parameters and to determine the values of all mentioned parameters and a variant of the χ updating procedure that guarantees high-quality boundary estimation. The results of simulations conducted for two different shapes of gas clouds, namely scenarios Cloud 1 and Cloud 2, are presented in Tables 1-4 Tables 2 and 4 show the values of all metrics described in Section 5.1. The best ones are marked in green. Figures 9 and 10 depict the motion trajectories (positions in time) of the selected device D P m calculated for various variants of the χ updating procedure and circle-shaped and ellipse-shaped clouds. Table 1. Values of parameters used to calculate the optimal weighting factor χ ; indicator q, simulation scenario Cloud 1.  Table 3. Values of parameters used to calculate the optimal weighting factor χ ; indicator q, simulation scenario Cloud 2.  It can be seen that, in general, the best values of all metrics were obtained for two variants of the weighting factor χ updating, namely IV and V for both simulation scenarios. However, variant IV was the best with respect to the indicator q aggregating all metrics, although the time used to circle the cloud was slightly longer than in the case of variant III. The optimal values of parameters χ are lower for ellipse-shaped cloud boundary. A higher value of χ increases the time for the device to return to the cloud region when the radius of the curvature of the cloud decreases rapidly. Moreover, it can be observed that each device needs more time to circle the ellipse-shaped cloud than the circle-shaped one. In general, tracking an ellipse-shaped cloud is a more difficult task.

Model Parameters Adjusting-Convex Clouds
The second set of experiments was designed to check how the model parameters tuned for networks tracking gas clouds with circle and ellipse-shaped boundaries can be adjusted to networks tracking gas clouds with a mixed border, partially circle shaped and partially ellipse-shaped (scenario Cloud 3). Two series of experiments were conducted. The aim was to compare the quality of boundary tracking in two cases (i) the weighting factor χ in Equation (19) calculated for values of parameters collected in Table 1, (ii) χ calculated for values of parameters collected in Table 3. The results are presented in Tables 5 and 6.  Table 1  Table 3  Table 1  Table 3  Table 1  Table 3  Table 1  Table 3  Table 1 Table 6. Successive D P m positions during cloud boundary tracking calculated for two variants of χ updating procedures and two sets of parameters from Tables 1 and 3; simulation scenario Cloud 3. Table 1  Table 3  Table 1  Table 3 (a) (b) (c) (d) Table 1  Table 3  Table 1  Table 3 (e) (f) (g) (h) Table 6. Cont. Table 1  Table 3 (i) (j)

Variant V
As can be seen, all results of boundary tracking are, in general, acceptable. However, better accuracy of the boundary estimation was obtained using values of parameters tuned for the ellipse-shaped cloud. It is clearly illustrated in Table 6. Similar to previous experiments described in Section 5.3, the highest value of the indicator q was obtained for variant IV of the χ updating procedure. The time taken to circle the gas cloud was the shortest in the case of variant III. However, it should be noted that much worse results in comparison to those presented in Section 5.3 were achieved for variant V. It can be concluded that the presented approach is sensitive to model parameters. Hence, the number of parameters should not be too large as it is difficult to identify them for various shapes of clouds. Variant V can be successfully applied in tracking clouds with a big radius of curvature.

Model Parameters Adjusting-Nonconvex Clouds
The experiments discussed in the two previous sections were conducted for convex clouds. Let us consider a nonconvex cloud with an irregular, nonconvex boundary, as presented in Figure 11, Cloud 4. A series of simulations were conducted for three variants of the χ updating procedure and parameters from Table 1. Table 7 shows the values of metrics obtained for three variants of χ updating. Worse results were obtained than in scenarios with convex boundaries. It can be concluded that variant V of the χ updating procedure is suitable only when the boundary has a shape with a constant radius of curvature. In the case of two other variants, the results are very similar, and the decision to choose one of them requires prioritizing the criteria. When fast detection of the boundary is crucial, variant III is recommended. In addition, simulations were performed in which χ was calculated for parameters from Table 3. The results were a bit better, i.e., acc = 0.962 and q = 3.2. The last series of experiments aimed to test the efficiency of the correction procedure described in Section 4.4. The results of simulations for the application scenario Cloud 5, i.e., a cloud with multiple concave parts of its boundary, are presented in Table 8 and Figure 12. The weighting factor χ was calculated according to Equation (22) Figure 12b can be compared to the one calculated when the correction for concave parts of boundaries is disabled (Figure 12a). It can be seen that the correction procedure significantly improves the accuracy of cloud boundary estimation for very irregularly shaped clouds.

Conclusions
The paper summarizes the research results concerned with designing and developing distributed sensing systems for heavy gas cloud monitoring. This system comprises autonomous unmanned vehicles, equipped with punctual sensors, radio transceivers and GPS modules that spontaneously create a network of devices that adapt to achieve goals. The paper describes a three-stage strategy for boundary detection, estimation and tracking. In this approach, the optimal motion trajectories for all sensing devices' discovering the current shape of the boundary are calculated based on the data collected from sensing vehicles and the models for target position calculation that incorporates artificial potential functions. The effectiveness was tested through extensive simulations. The presented results of experiments show that the design of an efficient sensing system for phenomena clouds should account for trade-offs between detection accuracy and computational complexity, measurement quality and equipment cost, communication reliability and network load. The challenge for the designer of this type of network is to develop efficient algorithms for online calculating of motion trajectories of sensing nodes and determine the optimal values of model parameters. This paper presents such an algorithm and examines the quality of various computing schemes for its parameter tuning. Simulation experiments showed the sensitivity of the proposed system to the model parameters and the need to select a procedure for tuning the coefficients of the optimization task to a particular scenario. Nevertheless, even for nonconvex clouds with irregular shapes, satisfactory results were obtained for calculated values of model parameters. Moreover, the simulation results demonstrated that using only a rough measurement to indicate that the threshold concentration value was exceeded can detect and track a gas cloud boundary. Calculating new sensor positions only based on the information about exceeding the safe gas concentration value makes our sensing system less sensitive to the quality of the gas concentration measurement. Because of the inaccuracy of actual sensors, such an approach may be better suited to real-world applications. Moreover, it can be easily adapted to detect other phenomena clouds, namely oil spill and wildfires, etc. To sum up, the simulation results corroborate our analysis and confirm that mobile ad hoc networks can be successfully used to monitor dynamic phenomena, create situation awareness and support rescue teams.
The research in that domain will be continued. The future work will focus on the experiments conducted on more complex and realistic scenarios with more detailed toxic gas dispersion models and workspace with obstacles. The goal is to test the sensitivity of our system on the speed of boundary evolvement and the impact of the obstacles on the quality of gas concentration measurement, radio communication and, consequently, the effectiveness of our monitoring system. Moreover, we plan to develop and investigate a version of the system to operate in a three-dimensional workspace. It will allow extending the possibilities of applications to monitor other phenomena such as oil spills, wildfire, moving groups of people. Ψ, Ψ an estimated gas cloud center and its weighting factor χ, χ a point forcing a device to follow the cloud boundary and its weighting factor