Keywords

1 Introduction

Rivers and lakes sustain a large bio-diversity of animals and plants and play a major role in supplying freshwater to cities and agriculture fields. A chemical spill in such environments can cause a negative impact on the balance of the ecosystem by introducing harmful substances into the water stream. The dispersion of the contaminants through the moving current originates an odour plume that can endanger humans and living organisms. Odour Source Localisation (OSL) is the task responsible for finding the origin of such polluting events which is extremely relevant to allow for fast interventions and avoid further risks to the environment. This process is usually carried out by a static sensor network or by mobile sensors that have advantage of sampling at different locations and adapting their trajectory to track a chemical plume toward its source [1].

The process of OSL with mobile sensors has attracted significant interest from the research community and is typically composed of three distinct tasks: (1) searching the active plume region, (2) tracking the plume towards its source after odour traces are found, and (3) confirming the source location. Bio-inspired search strategies employ different movement patterns triggered from actual perceptions of the chemical parameters or also from flow information [2]. In natural environments, turbulence originates fluctuating and intermittent odour detections, causing these reactive approaches to lose performance since the agent does not perceive the plume during significant periods of time. In situations where odour encounters are scarce, cognitive strategies guided by information-theoretic concepts, such as Infotaxis [3] are preferable to reactive or bio-inspired approaches [4]. They rely on two key components: (1) a probabilistic Bayesian inference belief of the source parameters that can be approximated with a grid or a Particle Filter, and (2) a movement decision based on the expected uncertainty reduction of the source belief at admissible positions. The expected uncertainty reduction, or by other others, the expected gain of information if the robot moved to a possible position, is quantified with a cost function employing an information metric such as Shannon Entropy (S) [3] or the Kullback-Leibler (KL) divergence [5]. A relevant topic within information-driven decision making is the development of cost functions that produce an efficient balance between exploration and exploitation. The original Infotaxis cost function is composed by an exploitation term represented by the probability of finding the source after the next movement position and an exploration term determined from the expected uncertainty reduction if the source is not found. The former term only has a significant weight when the agent is close to the expected source position, which means that the overall search is determined based on the exploration term. This conclusion led to the proposal of a modified Infotaxis cost function which only uses the former exploration term [6]. In an attempt to increase the directness of the search toward the expected source location, a form of Free Energy (FE) was proposed in [7] where a fixed “temperature” parameter adjusts the balance between the exploitation term represented through the distance between the agent position and the expected source location, and the exploration term quantified by the Entropy of the source belief. Song et al. [8] proposed an improved version of this cost function by replacing the fixed parameter with a dynamic temperature value obtained from the trace of the covariance matrix of a Particle Filter estimation process, which shifts the weight of both terms according to the uncertainty of the belief map. A different line of work seeks to guide the agent toward the position that promotes the highest divergence between the actual and the expected probability density function (PDF), quantified by KL divergence [5]. However, it is still unclear how this approach generates non-identical search patterns from Entropy or Free Energy difference minimisation. Moving to the position of maximum divergence should generate similar behaviours as to moving to the position that minimises the difference of Entropy [9, 10], but to the best of the authors’ knowledge, in the context of OSL, a comparison between both strategies under realistic conditions is still absent. While thoroughly evaluated under simulated environments or controllable conditions such as wind tunnels [11], field validations are still scarce. More recently, a few studies employed UAVs as the searching agents [5, 12], but aquatic environments are often overlooked. Some field tests with the goal of locating chemical sources do exist but do not employ info-theoretic strategies [13, 14]. The informative path planning technique proposed by Stankiewicz et al. [15] has the potential to be used in OSL applications, however, the main objective is to generate water quality models, while the information-driven search strategy from Flashpohler et al. [16] makes use of bathymetric data from a shallow coral area for validation instead of chemical readings from an odour plume.

This work aims to fill the knowledge gap about experimental validation of cognitive search strategies by comparing the performance of three different cost functions and their efficiency with a real field experiment in a natural water stream. A static surface platform acts as a chemical pollutant source, emitting a controlled amount of non-pollutant saline solution to a river, while a small ASV equipped with a conductivity probe acts as the searching agent performing all the necessary computations onboard. The main contributions of this paper are: (1) - Performance analysis of three well-known information metrics (Entropy, KL, FE) under realistic field conditions; (2) - Efficiency evaluation of cognitive search strategies with a real field experiment in a natural water stream.

2 Information-Theoretic Framework for Odour Source Localisation

Consider a mobile agent moving in known locations \(\textbf{p}_t = (x,y) \in \mathbb {R}^2\) at the water surface with the capability to sense the water at time \(t \ge 0\) s for chemical measurements \(c(\textbf{p},d, t)\) at different depths d. Furthermore, assume a bounded workspace \(\varOmega \) with water flowing in a dominant direction \(\textbf{u}\), and a source in an unknown position \((x_s,y_s,d)\) releasing a chemical pollutant at an unknown rate Q. It is assumed that the source and measurement depth are at the same level, restricting the search to a 2D space. The goal is to estimate the source location \((x_s,y_s)\) from a set of measurements across the workspace. The agent starts searching for odour traces from a random position located downstream of the suspicious source. The searching strategy consists in moving upstream with zig-zag motion patterns until detecting traces of the target substance as proposed by Marjovi et al. [17]. After a first detection (\({x}'\), \({y}'\)), the agent switches to one of the cognitive search strategies studied in this work. Those strategies use a Bayesian inference belief and an information-theoretic decision making (Fig. 1) to guide the searching agent. This work aims to evaluate the performance of the decision making process for different cost functions.

Fig. 1.
figure 1

OSL framework

2.1 Dispersion Model

Dispersion models are fundamental tools to reason about the olfactory observations a robot acquires along its mission. This work adopts a Gaussian plume model (1) which provides an analytical solution of the advection-diffusion equation for a point source, located at position \((x_s,y_s)\) in a Cartesian coordinates frame, releasing at constant rate Q, with average water \(\bar{u}\) flowing steadily in the direction \(u_d\) with speed \(u_s\) and assuming an infinite space.

$$\begin{aligned} \mathcal {M}=\frac{Q}{\pi \bar{u} \sigma _{y} \sigma _{z} } \exp \left( \frac{-(y-y_s)^{2}}{2\sigma _{y}^{2}} \right) \end{aligned}$$
(1)

The lateral and vertical dispersion coefficients, \(\sigma _{y}\) and \(\sigma _{z}\) respectively, are functions of the downstream distance (x) to the source , modelled as:

$$\begin{aligned} \sigma _{y}^2 = 2 D_y (x-x_s)/u_s \qquad \sigma _{z}^2 = 2 D_z (x-x_s)/u_s \end{aligned}$$
(2)

Assuming a laminar flow these parameters can be considered equal (\(\sigma _z = \sigma _y\)). The coordinates are rotated \(u_d\) degrees (flow direction) in order to aligned the model with the actual flow.

2.2 Inference

In order to continuously update a belief of the potential source, observed data is reasoned through Bayesian inference. It is subsequently used to influence the movement decision of the searching agent, which makes this step a critical factor within the localisation process. Following the same trend of recent works [12], the process of obtaining a posterior PDF of a state vector \(\theta _{t}\) given a set of observations \(c_{1:t}\) as in:

$$\begin{aligned} P(\theta _t|c_{1:t}) \propto P(c_{1:t}|\theta _{t-1}) P(\theta _{t-1}) \end{aligned}$$
(3)

is approximated with a Particle Filter [18] with a group of N weighted particles \(\mathcal {O}_t := \{\theta _{t}^{j=1:N},w_{t}^{j=1:N}\}\), including all the parameters from the dispersion model within the state vector as in \(\theta _t = [x_s, y_s, Q, D_y, u_s, u_d]\).

The likelihood of the observed data given the actual hypothesis \(P(c_{1:t}|\theta _{t-1})\) is evaluated with a normal distribution taking the form [19]:

$$\begin{aligned} P(c_{1:t}|\theta _{t-1}^{j=1:N}) \propto \exp \left( -\frac{1}{2}.\sum _{i=1}^{k} \left( \frac{(c_i - \mathcal {M}( \textbf{p}_{i}, \theta _{t-1}^j))^2}{\sigma _m^2 + \sigma _d^2} \right) \right) \end{aligned}$$
(4)

where k represents the number of observed values, \(\sigma _d \propto g_{1} \mathcal {M}( \textbf{p}_{i}, \theta _{t-1}^j)\) the standard deviation of measurement errors proportional to the predicted concentration with a constant \(g_1\) and \(\sigma _m\) the standard deviation accounting for model errors.

2.3 Decision Making

The decision making process tries to optimise the search, guiding the agent towards the most informative positions, which are the ones that minimise the expected uncertainty about the source. This uncertainty is quantified with the so-called information utilities between the actual and future posterior PDF. First, a number of possible future positions \(N_{a_p}\) are generated from discrete movement steps [3]. For each of those positions \(a_p\), a future PDF is obtained considering the actual knowledge of the source parameters and the dispersion model, allowing to compute the most informative movement position. For this step, this work follows a similar approach to [5] where, for each possible future position, \(N_z\) future concentration values are generated by drawing \(N_z\) weighted particles from the actual PDF. For each future observation, the weights are updated, and the information utility is computed with the new weights \(\hat{w}\). The total expected information \(\mathcal {E}\) is the average of the information utility from all future observation values as in \(\mathcal {E}(a_p) \approx \frac{1}{N_z} \sum _{m=1}^{N_z} \mathcal {F}(\hat{w}^{(m,j)})\) where \(\mathcal {F}\) is the utility function to be evaluated with the future observations and respective future weights. As previously stated, three information metrics are evaluated: Entropy, KL and FE. Shannon Entropy was the first information metric used in the context of OSL with a grid-based belief [3]. It quantifies the uncertainty about a given information with form:

$$\begin{aligned} S \approx -\sum _{j=1}^{N} w^j\ln (w^j) \end{aligned}$$
(5)

Relative Entropy (6), also known as the KL divergence, is a measure of how much a future distribution at instance \(k+1\) diverges from the actual distribution k. The lower the values, the more identical the distributions are.

$$\begin{aligned} KL = \sum _{i=1}^{N} \hat{w}_{k+1}^{(i,m)} \ln \frac{\hat{w}_{k+1}^{(i,m)}}{w_{k}^{(i)}} \end{aligned}$$
(6)

The FE principle takes the original form of \(FE = W + T S\) where W represents the potential energy, and T is the temperature that balances the relationship between the expected value W and the uncertainty S. Following the same approach as Song et al. [20], the term W is represented by the distance between the robot and the estimated source, the term T the trace of the covariance matrix \(\textbf{R}\) from the posterior PDF and S as the Entropy, given by:

$$\begin{aligned} FE = \sum _{j=1}^{N} w^{j} \left\| a_p - \theta _{x_s,y_s}^{j} \right\| ^{\alpha _1} - tr(\textbf{R})^{\alpha _2} S \end{aligned}$$
(7)

with \(\alpha _1\) and \(\alpha _2\) the weights that control the balance between both terms.

Fig. 2.
figure 2

Testing section of Mondego River near the University of Coimbra.

3 Testing Environment

The experiments were performed in a section of the Mondego River near the Engineering Campus of the University of Coimbra (Fig. 2). It has a large variety of river features, such as shallow waters and sandy banks forming small isles in the middle of the river bed. The testing section has a length of approximately 70 m per 60 m of width and an average depth of 2 m. The measured conductivity value of clean water was \(4700~\mu S/m\) (baseline), the water temperature was at \(22^\circ C\) and the flow speed at approximately 1.5 m/s. A pollution event is simulated with a solution of salted water emitted at a constant rate of 1 l/min with a peristaltic pump from a floating platform. The solution is a mixture of 1 kg of salt for 4 l of water, with each reservoir having a total volume of 30 l, allowing 30 min of experimental time. The salted water produces a realistic non-pollutant odour plume easily distinguished from clean water with a conductivity sensor. The negative point is the higher density of the solution, which causes the plume to spread towards the riverbed as it moves further down flow. A considerable high emission rate is also required to generate a detectable plume at a significant distance from the source position. The OSL mission is performed with a small ASV composed of two floaters with a Bluerobotics T200 thruster attached at each one, having an overall dimension of 0.85\(\,\times \,\)0.55 m. It can localise itself with a Global Navigation Satellite System (GNSS) module, configured in real-time kinematic positioning mode. The platform’s motion is controlled by a Pixhawk 4 autopilot maintaining a moving speed of 0.5 m/s between goals positions. The high-level mission is provided by an Orange Pi 3 single board computer (SBC) running a Robot Operating System (ROS) framework. The platform uses a sonar to measure the depth of the river basin and an Atlas Scientific conductivity probe to detect the salted plume at a sample rate 2 Hz. The algorithms were coded with Python programming language and optimised with Numba JIT compiler.

Table 1. OSL parameters and Priors.

3.1 Evaluation Metrics

A first experiment was performed with the agent starting downriver at approximately 80 m from the source, where the first odour encounter occurred at about 40 m. Due to the amount of time the experiment took (approximately 35 min), and considering the available volume of saline solution, the initial starting distance was fixed at 30 m from the source. By detecting traces of odour during the first crossflow movement, the plume search time is reduced, allowing more experimental time for cognitive search. A total of six reservoirs of the target solution were available, enabling four trials to be performed for each cost function, which makes the results not statistically significant. Moreover, to avoid losing potential data between movement locations and achieve a faster search strategy, at the possible cost of higher localisation error, all the observations during the last movement segment between positions are used instead of stopping the agent to collect and average data. The search ends with the uncertainty dropping below a certain threshold and the agent located within 6 m of distance from the estimated position. For a better initialisation of the water speed and direction states, an initial prior was estimated using the platform’s GNSS localization by stopping it during short periods and letting it move with the water flow. The remaining parameters of the OSL framework and initial priors (\({u_s}'\), \({u_d}'\)) are summarised in Table 1. The following metrics were evaluated for each strategy:

  1. 1.

    Localisation error: The error between the estimated and true source position. The state vector contains six fields, but for this work, the main interest lies in the source position;

  2. 2.

    Success rate: An experiment is considered successful if the located source is within 10 m of error from the true source position;

  3. 3.

    Exploration/exploitation ratio: A decision is considered exploitative if the chosen \(a_p\) location falls within a section of \(\pm 67.5^{\circ }\) in the direction of the true source position. Otherwise, the decision is considered explorative.

  4. 4.

    Distance efficiency: Ratio from the azimuthal distance between the starting position to the true source location and the total travelled distance;

  5. 5.

    Computation time: The time spent by inference and decision making processes;

  6. 6.

    Search efficiency: The minimum required time to travel between the starting and true source positions divided by the total extent of the experiment.

4 Experimental Results

The cognitive strategies were able to successfully locate the true source position in most of the trials. Similar to Loisy et al. [21], the cognitive search is started after the first traces of odour are found, enabling the inference process to be initialised with enhanced prior information. The particles (location states) are initialised from the agent position towards the upflow direction, considerably narrowing the search space.

Fig. 3.
figure 3

Left column: Trajectory and measured concentrations for one experiment of each information metric (Entropy, KL, FE from top to bottom). Right column: Evolution of the estimation with the associated uncertainty for each of the respective experiments.

The left column from Fig. 3 show the trajectories of one experiment for each information utility. It can be seen the magnitude of the concentration values increasing as the agent moves closer to the source position, as well as a narrower active region. This characteristic makes the process increasingly difficult since odour encounters are restricted to a small section in the crossflow direction. Another visible feature common to all three metrics is the tendency of the agent to perform exploratory behaviours, with a significant number of crossflow movements, during the first stages of the search. It can be explained by the lower magnitude of the measured concentration values and higher intermittency, which requires additional exploration to improve the knowledge of the source parameters. The right column of the same figure demonstrates the evolution of the estimated source location and respective uncertainty regarding the true source parameters. As the process evolves, the error and the spread of the estimated states reduce until reaching a value near the true source. Only closer to the source does the uncertainty of estimation reduces considerably, a common feature of all metrics.

Fig. 4.
figure 4

Analysis of metrics’ performance: (a) Localisation error, (b) Exploration/exploitation ratio, (c) Computation times, (d) Success rate, travel and search efficiency.

From Fig. 4a, it can be seen that entropy has the best results in terms of localisation accuracy with a mean error of 5 m across the experiments, with KL and FE producing higher mean localisation errors of approximately 11 m. The primary source of mean localisation error lies in the estimation of \(y_s\) state, stretching the dispersion of the particles towards the upflow direction (Fig. 5). A possible explanation is the use of multiple instantaneous observations from the last movement segment in the inference process, which contributes to higher uncertainty while reasoning with the source hypothesis.

In terms of exploration/exploitation ratio (Fig. 4b), KL has the highest exploration percentage with 54.7\(\%\), Entropy is the most balanced metric with \(\sim \)50\(\%\) for each behaviour, and FE produces the most exploitative behaviour, as expected, with 65.7\(\%\). This additional term of FE contributed to the least travelled distance of all three metrics (approximately half of KL), but the negative point is the worst success rate compared with Entropy and KL. The higher exploitative term may lead the agent towards the source too soon, where further exploration was needed, trapping the search in regions with no odour encounters, resulting in failure. The adjustable gains in the cost function are also a drawback towards field implementations since it requires a specific tuning to balance the exploration and exploitation behaviour, which may not be the most efficient for different scenarios.

Fig. 5.
figure 5

Particles convergence. Left: Successful experiment; Right: failed experiment.

By analysing computation times (Fig. 4c), one can conclude that the decision making step is by far the most demanding operation of the search process. It is even more meaningful for FE metric with a significantly higher computational cost when compared with Entropy and KL. It is worth mentioning again that all algorithms and additional functionalities are running onboard the ASV. While significantly lower times can be achieved with more capable SBCs or processing units, the main conclusion to be drawn here is the computational weight of the decision making process towards the whole search strategy. Evaluating the results from an efficiency point of view (Fig. 4d), while FE has the best efficiency in terms of travelled distance, the lower success rate, higher computational cost, and consequently significantly higher decision time make it the least efficient method of the three. Entropy and KL have identical success rates and travel efficiency (with KL having a slightly worst travel efficiency), but Entropy’s slightly lower computational cost makes it the most efficient search strategy. Analysing the experiments that were unable to locate the source within an acceptable range, two different failure scenarios were identified: (1) the filter converged towards a location that was distant from the true source position, and (2) the filter was not able to converge to a position, with the particles spread out over a large area as it can be seen in the right image from Fig. 5. The left image from the same figure shows a successful experiment with the particles converging towards a region in the vicinity of the true source location. In short, one can conclude both Entropy and KL generate similar search strategies with near-identical localisation results.

5 Conclusions

This work aimed to improve the knowledge toward OSL field experiments by performing and evaluating cognitive search strategies in a natural water stream with a small ASV. All of the three cost functions were able to locate the source within an acceptable margin of error successfully. Entropy and KL generated similar search trajectories, although KL had a slightly larger exploration ratio and, consequently, longer travel distances. FE was more efficient in terms of travelled distance, but its higher “greedy” nature due to the additional exploitation term also led to a lower success rate. A possible explanation is the weight adjustment between both terms (exploration and exploitation) that plays a major role in the performance of this cost function and is difficult to tune in natural environments where the conditions are not known in advance. As expected, the decision-making step proved to be the most computational-heavy process of the whole search strategy, with FE the most demanding cost function. This increase in computational effort did not traduce in a better performance overall, as previously stated since the success rate was lower than the other two cost functions. Efforts should be made towards researching decision strategies that require less computational effort and can still adapt to the dynamic nature of the environment, which is critical for searching agents with limited processing capabilities.