{'fraction_non_alphanumeric': 0.04193987907689688, 'fraction_numerical': 0.013284509920803883, 'mean_word_length': 4.47099930118798, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Mathematical modelling of the electric sense of fish: the role of multi-frequency measurements and movement

Understanding active electrolocation in weakly electric fish remains a challenging issue. In this article we propose a mathematical formulation of this problem, in terms of partial differential equations. This allows us to detail two algorithms: one for localizing a target using the multi-frequency aspect of the signal, and antoher one for identifying the shape of this target. Shape recognition is designed in a machine learning point of view, and take advantage of both the multi-frequency setup and the movement of the fish around its prey. Numerical simulations are shown for the computation of the electric field emitted and sensed by the fish; they are then used as an input for the two algorithms.


Introduction
In order to build a proper artificial electric sense, it is essential to understand how it works in biology. In this regard, the study of active electrolocation in weakly electric fish is crucial. Indeed, from an electric potential of about 1 mV oscillating at about 1-10 kHz, weakly electric fish are able to recognize an object in their surrounding (for a review, see [37] and references therein). Hence, they are undoubtly a source of great inspiration for neuro-ethology, underwater robotics, signal processing, as well as applied mathematics.
Several species of fish share this remarkable sense. They are classified in various families, all belonging to two different orders: Gymnotiforms in South America, and Mormyriforms in Africa. Moreover, according to the time representation of their Electric Organ Discharges (EODs), they are also divided into two types: wave-type species (such as Apteronotus albifrons) and pulse-type species (e.g. Gnathonemus petersii ). Known for several centuries, the electrogenesis and electroreception abilities of the wider set of species called electric fish have been studied extensively [25]. In 1958, Lissmann and Machin showed that for the weakly electric fish, this ability is used for electrolocation instead of hurting preys [32]. Furthermore, they gave the physical principles on which relies this electric sense: using cylinders in the water tanks of their Gymnarchus niloticus, they showed that these objects disturb the self-emitted electric field like an electric dipole. The electroreceptors allow the fish to distinguish such a difference, which in turn is a clue for electrolocation. However, one important question remains: how to estimate the location of the object from the measurement of this difference? Experimental, modelling and numerical approaches have been carried since this discovery by Lissman and Machin. From behavioral studies, we now know that these fish are able to estimate the distance [48], recognize the shape [47], and the electric capacitance and conductivity [46] of an object in their surrounding. In these studies, a fish is placed in front of two doors, each one hiding a different object. The fish is then trained to chose one of the two objects, in a reward/punish setup. More theoretically, the electric dipole formula has been investigated in more details. Indeed, Bacher in 1983 [13] argued that the electric dipole formula given by Lissmann and Machin did not explain the phase shift observed when the electric premittivity of the object differs from the electric permittivity of the water, although this phase difference is measured acurately by some species such as in the Eigenmannia genus [41]. Then, in 1996 Rasnow [39] solved this issue by considering a complex-valued conductivity; he also extended the range of shapes on which the dipolar approximation can be applied. From the numerical simulation point of view, various works have been carried since the 70's, for example finite differences schemes in 1975 by Heiligenberg [26] and finite elements in 1980 by Hoshimiya et al. [27]. In the latter, a simplified geometry of fish was used: it was represented as an ellipse, divided into two areas (the low conductive and thin skin, and the body). Their aim was to optimize the non-uniform values of the skin's conductivity, and by optimizing it according to experimentally measured field, they conclude that the tail region is more conductive than the head region. These models were then improved, as can be seen in [12,33,36]. Finally, in the 90's Chris Assad considered a boundary element method to solve this numerical simulation issue [10]. His model took into account the highly resistive and thin skin, as well as the time dependance of the EOD. He compared his model to several in vivo experiments involving different species of fish [40].
Those advances in the field of neuro-ethology inspired researchers in robotics to develop underwater probes and sensors in order to effectively navigate with the help of this electric sense. Mainly two teams gather the most research about this stimulating subject: one in Nantes lead by Frédéric Boyer [16], and another in Chicago lead by Malcolm MacIver [34]. Just to mention a few of their studies, they face important challenges such as target location [30,43], shape recognition [14,29], autonomous (or reactive) navigation [18], or docking [17]. We leave the interested reader to these articles and the references therein for a more complete review of this area. Let us mention however that for these works, there is a need for more quantitative assessments of the electric sense: how precisely an object disturb the electric field, and how to compute back its location and shape.
Mathematically speaking, this is called an inverse problem, as opposed to a forward problem. The latter would be to compute the electric field surrounding the fish, knowing everything about the object (position, shape, material). On the contrary, the inverse problem here is to recover as much information as possible about the object from the knowledge of the electric field at the surface of the fish's skin. Given the low frequencies of emission (see Section 2.1), this problem lies in the domain of Electrical Impedance Tomography (EIT). EIT is a non-invasive imaging technique in which an image of the conductivity or permittivity of a medium is inferred from surface electrode measurements. It is studied as a non-invasive imaging technique, in particular for medical imaging, non-destructive testing, or geophysical probing (see reviews in [15,22]). In the mathematical literature it is also known as Calderón's problem from Calderón's pioneer contribution [21]. This type of problem is ill-posed, in the sense that existence, uniqueness, or continuity of the solution is not guaranteed [45]. The resolution of the inverse problem is often formulated as a minimization problem, which consists in minimizing the error between the measured data and the synthetic data obtained by solving numerically the forward problem with a candidate object. It requires careful discretization and regularization and sometimes numerically intensive calculations, however, it is known to be sensitive to noise and to have poor spatial resolution [15,19].
Since 2010, our team has been working on the mathematical modelling of active electrolocation. Indeed, having heard about that the electric fish are able to solve -in some way -the Calderón's problem raised our curiousity. In other words, the problem of recovering the object from what the fish can feel is a very difficult problem, thus making it even more fascinating as the fish seem to perform better than the most recent medical EIT devices which typically consist of a few tens of electrodes only. Hence, we wanted to have equations governing the electric field surrounding the fish (i.e. a model of the forward problem), so that we could imagine original solutions of the inverse problem. Our inspiration largely took its source in the aformentioned works, and relevent references will be done throughout the text. The aim of this article is to summarize our works on target location estimation [1] and shape identification [3], as well as making connections between our theoretical studies and what it is intended to model. We will show that it is possible to extract some information about the object in a quite robust and straightforward manner, even with less than one hundred electrodes. We wanted to make accessible some mathematical concepts that could be useful to researchers in biology and robotics, in order to engage further discussion and collaboration.
The outline of this paper is as follows. In Section 2, we derive the equations governing the electric field emitted by the fish and show numerical simulations. In Section 3, we explain the localization (Section 3.2) and shape recognition (Section 3.3) algorithms, which both rely on a formula called dipolar approximation (Section 3.1).

Forward Problem
Let us consider the model depicted in Figure 1. The body of the fish is modelled as a domain Ω ⊂ R d , where d ∈ {2, 3}. For the sake of clarity, we plot the results for d = 2 in this paper. This mathematical model is of course extremely simplified compared to the complexity of a fish revealed by biology, but our objective is to extract the few ingredients that are sufficient to explain the fish electric sense, as was done for example in the numerical simualtions of Hoshimiya et al. [27].
The goal is to recover the object D, another set of R d which is away from Ω. The localization is explained in Section 3.2 whereas the shape identification is shown in Section 3.3.
In this section, we focus on the so-called forward problem: what are the equations governing the transdermal electric current (E − E 0 ) · ν on ∂Ω (Section 2.1 and Section 2.2), and how can we compute it numerically (Section 2.3)?
The results presented here can be found with more mathematical details in [1].

Quasi-Static Approximation
In this subsection we show that, given the low frequency of the electric field, it can be derived as a complex-valued electric potential.
From this point, let us precise that we will work in the frequency domain, so that time derivatives will be simplified by Fourier transform. It has an impact of what we are modelling exactly, i.e. from now on we can only discuss about wavetype species such as Apteronotus albifrons. For example, after discretization, we would have a discrete set of frequencies (the fundamental and its harmonics), see for example [24, fig. 12.3] for such a transform in Eigenmannia virescens. These frequencies are known to remain centred on a specific frequency unless their dominance status changes, or the temperature or pH of the water varies [23].
Having this in mind, let us start with the Maxwell system: where ε (resp. µ) is the electric permittivity (resp. the magnetic susceptibility) of the medium and ω is the frequency. The sources are ρ (density of electric charges) and j s (density of electric current). Whereas the former are null, the latter need to be considered carefully. Indeed, the current density comes from the electric organ of the fish. It is usually a long filament at the posterior part of the body [37]. In any case, it can be modelled as a distribution contained into the body: supp(j s ) ⊂ Ω. Finally, the electrical current j i in (2.4) is the one induced by Ohm's law, where σ is the conductivity of the medium. The electro-quasistatic (EQS) approximation states that, if the wavelength λ is large compared to the typical length of the problem L, then E can be considered as irrotationnal, i.e. the right-hand side of (2.3) is neglected [28]. In other words, if λ L, then ∇ × E ≈ 0. In nature emission frequencies are always below 10kHz [38], which means that λ is always larger than 10km, which is much larger than L if we consider it as the typical size of the fish; indeeed, the electrolocation range is known to be one body-length at maximum [37]. Hence, the EQS approximation is very well suited in our case and thus we can write ∇ × E = 0 instead of (2.3). Then, it follows that there exists a frequencydependent, complex-valued potential u such that E = ∇u. (2.6) Taking the divergence of (2.4), we finally obtain where we have defined f = −∇ · j s as the source coming from the electric organ, and k(ω) = σ + iεω as the complex-valued conductivity; this complex-valued conductivity is the same idea that was used by Rasnow in [39].
To conclude, the equation (2.7) is the one governing the transdermal electric current. If we note U the potential associated to the background electric field (E 0 = ∇U ), the transdermal electric current stated in Figure 1 (2.8)

Boundary Conditions
Now that we have the partial differential equations governing the electric field, given in (2.7), let us focus on the boundary conditions. They strongly depend on the distribution of the conductivity, k(ω), which can be modelled as piecewise constant: k w in the water, k D in the object, k b in the body of the fish, and k s in the skin. Note that since the water, the body, and the skin are not dielectric materials, we have (k w ) = (k b ) = (k s ) = 0.
Hence, two boundary conditions appear to matter: at the surface of the object ∂D and over the skin ∂Ω.
1) The boundary conditions at the surface of the object can be addressed easily. Indeed, the piecewise constant conductivity imposes the following jump relations for x ∈ ∂D [4] u(x − ) = u(x + ), (2.10) The notation x ± means the inner/outer limit at the boundary of ∂D. More precisely, for a function w defined on R d , one has where ν is the outward normal unit vector of ∂D.
2) The boundary conditions over the skin are a bit more complicated (see Figure 2). This is due to the fact that, compared to the water which has a conduc- tivity of the order of 0.01S · m −1 [35], the skin is very resistive (10 −4 S · m −1 [20]) and the body is very conductive (1S · m −1 ) [42]. In other words, one has Futhermore, the skin is very thin: if we denote its thickness by δ, we have [49] δ ≈ 100µm L, where L was defined as the body length in Section 2.1. In [1] we have shown in the case d = 2 that, when δ/L 1 and k s /k w 1 , but δk w /(Lk s ) is of order one (or smaller), we have the following effective relation for x ∈ ∂Ω: where ξ = δk w /k s is called the effective thickness in Assad's work [10]. Indeed, equation (2.13) is exactly the same as the one used in his model. On the other side the limit k b /k w 1 gives To get a well-posed problem, we should add the far field condition u(x) = O(|x| 1−d ) as |x| → ∞, if the problem is formulated in an open medium, or any prescribed condition corresponding to the experimental configuration.

Numerical Simulations
Taken altogether, we have to solve a system composed by the partial differential equation (2.7) with boundary conditions (2.9), (2.10), (2.13), and (2.14). Hence, u is solution of the following system and the background solution U is given by wherek(ω) is equal to k b in the body of the fish Ω, and k w outside, i.e. in the water.
Using layer potential representations for the solutions of the systems (2. 15-2.19) and (2.20-2.22), we have developed a MATLAB script for their numerical approximations 1 , using boundary element methods like in Assad's thesis [10]. In Figure 3, we have plotted the solutions u and U when d = 2, the body Ω is an ellipse, the object D is a disk, and the source f is a dipole.

Inverse Problem
In the previous section, we have derived the equations governing the transdermal electric current at the surface of the skin, and we have shown results of numerical simulations. In this section, we show the two main results of our studies: how to localize the object D based on the knowledge of ∂u ∂ν − ∂U ∂ν (Section 3.2), and how to recognize its shape when the fish has already memorized several objects (Section 3.3). These methods are based on a dipolar approximation of the solution u, which is explained in Section 3.1.

Dipolar Approximation
The dipolar approximation states that if D is small enough, the difference u − U can be expressed as the electric potential coming from an electric dipole centered in D. In this subsection we only present this result numerically, in order to make things more intuitive. For a complete proof of the formula in this context, see [1]; for a more detailed review of the dipolar approximation in general, see the book [5].
Let us get back to the example in Section 2.3. In Figure 4, we have plotted the difference u − U . Qualitatively, we can see that this electric potential looks like the one emitted by an electric dipole coming from D. Quantitatively, we have shown in [1] that, if D is small enough and sufficiently away from Ω, then the fish feels a distorsion that is similar to the one produced by a dipole p D . More precisely, we have

Distance, in cm
where z is the center of mass of D and G is the Green function for the Lapla-Distance, in cm . The vector p D is called the equivalent dipole, and it is given by where M(k D (ω), D) is a d × d complex-valued matrix that depends only on the shape D of the object and its complex conductivity k D (ω), called the first-order polarization tensor [5]. This matrix maps the illuminating electric field ∇U (z) to the equivalent dipole p D . When the conductivity k D (ω) is real, in other words when (k D (ω)) = 0 and thus ω does not play any role anymore, one can find an ellipse or ellipsoid E such that This means that the equivalent dipole would always be the same as the equivalent dipole of this ellipse or ellipsoid E. This latter is then called the equivalent ellipse [5]. Note, however, that when k D (ω) is frequency-dependent, the information that can be extracted is much richer. For single-frequency data, it is only possible to identify a few characteristics of the object. When multi-frequency data are available, it is possible to get a lot of information about the object from the frequency dependence of the observed first-order polarization tensors. The need for multi-frequency data that we exhibit is in agreement with the complex emission patterns (pulse and wave) by fish.

Localization
In this subsection, we show that the multi-frequency aspect of the measurements are sufficient to localize an object with precision. For the sake of simplicity we focus our attention on the example that gave Figures 3-4 in dimension d = 2.
Indeed, the particular case of D being a disk is easier since we have [5] where |D| denotes the volume of D and I 2 is the identity matrix. 2 Hence, equation (3.1) becomes which is equivalent to Lissman-Machin [32] or Rasnow [39] formulas, showing that (3.1) is a generalization of these latters. Hence, from (3.5) we can easily extract ∇U (z) · ∇G(x − z). The reason why we can recover the location z of D is that the function z → ∇U (z) · ∇G(x − z) is one-to-one. Therefore, it is possible to build an imaging functional from the measured data, i.e. a function z s → I(z s ) that has a strong peak at z s = z (see Figure 5).

Shape Recognition
Once the object D is located (i.e. we know z), we would like to extract M(k D (ω), D) from the measurements. Indeed, we know that this polarization tensor contains all the necessary information about the shape of D [7]. More precisely, the function ω → M(k D (ω), D) uniquely determines D in some class of domains. However, it is not straighfoward to determine D from M(k D (ω), D). In other words, the shape recognition problem has been reduced to a simpler, however still difficult, inverse problem: determine the shape of the object from the observed first-order polarization tensors.
To solve this inverse problem we got inspired by the behavioral studies (for example [48]) described in the introduction. Indeed, instead of trying to compute a shape from the measurements, we wanted to use classification and machine learning techniques. For example, let us suppose that the fish has already encountered several shapes D l , p = 1, . . . , L (such as the shapes plotted in Figure 6), and that it knows all the polarization tensors M(k D l (ω j ), D l ), where ω j are the different frequencies emitted by the electric organ.  Figure 6: A dictionnary of shapes, used to identify the object D. The distance units here are arbitrary. Note that these shapes are often encountered in experimental studies [47] showing that the fish are able to recognize shapes.
It is not possible to extract M(k D (ω), D) from one single measure of ∂u ∂ν − ∂U ∂ν ; instead, we use the fact that the fish actively swim around their prey when hunting, leading to particular swimming patterns called probing motor acts [44]. Extracting M(k D (ω j ), D) from (3.1) measured for several fish's positions is then a simple linear system [3]. Hence, D can be identified as In Figure 7, one can see the performance of this technique in terms of robustness against measurement noise. Note that the number 64 of electrodes is not very large in the numerical simulations, but 10 frequencies and 20 different positions of the fish around the object are exploited: the different positions allow for good extraction of the polarization tensors, and the different frequencies allow for good classification of the object given the estimated polarization tensors. That is how robustness is achieved, and this remark may be of interest for the design of EIT devices.

Conclusion and Perspectives
In this short review, we aimed at summarizing our main results on the mathematical modelling of active electrolocation. After deriving the partial differential  Figure 7: Performance of classification with respect to measurement noise. Each point represent the probability of correct detection, infered after 10 5 realisations of the same experiment, consisting of the fish swimming around the object on a circular trajectory. The first-order polarization tensors M(k D (ω), D) were extracted for 10 frequencies (from 1kHz to 10kHz). Then these tensors where compared to the dictionnary presented in Figure 6. On the x-axis, the strength of the measurement noise is indicated, in percentage of ∂u ∂ν − ∂U ∂ν . Measurement noise was modeled as a white Gaussian random process for each point, with standard deviation as what we call the strengh. Originally published in [3]. equations and their boundary conditions, we have shown numerical simulations of the forward problem. Then, based on the dipolar approximation, we have detailed our localization algorithm and our shape recognition process. These latters are made possible thanks to multi-frequency measurements. Moreover, shape recognition additionally needs movement of the fish. Note that our model is an extremely simplified version of what actually happens in real life; our aim was to extract the relevant features of the problem in order to be able to make a generalization for other topics, such as medical imaging or robotics. More realistic simulations and algorithms of target location active electro-sensing can be found for example in [12,11,31]. Shape identification remains an open challenge, although some algorithms begin to emerge in the robotic community [14,29].
Since the publication of our two algorithms, several directions of research have been taken. First, we have extended the shape recognition algorithm to the time-domain formulation of the problem [9], and to the echolocation problem (as observed in dolphins and bats for example) [8]. Then, we have used wavelets methods in order to improve the accuracy of recognition [6]. And finally, we have raised the question of tracking a moving object [2].