Electrocommunication for weakly electric fish
Andrea Scapin



 This paper addresses the problem of the electro-communication for weakly electric fish. In particular we aim at sheding light on
how the fish circumvent the jamming issue for both electro-communication and active electro-sensing. A real-time tracking algorithm is presented.


Quantum Entanglement, Symmetric Nonnegative Quadratic Polynomials and Moment Problems
    [
    December 30, 2023
=====================================================================================






§ INTRODUCTION


In this paper we address the problem of studying the behaviour of two weakly electric fish when they populate the same environment.
Those kind of animals orient themselves at night in complete darkness by using their active electro-sensing system. They generate a stable, relatively high-frequency, weak electric field and transdermically perceive the corresponding feedback by means of many receptors on its skin. Since they have an electric sense that allows underwater navigation, target classification and intraspecific communication, they are privileged animals for bio-inspiring man-built autonomous systems <cit.>. 
For electro-communication purposes, in processing sensory information, this system has to separate feedback associated with their own signals from interfering sensations caused by signals from other animals. Wave and pulse species employ different mechanisms to minimize interference with EODs of conspecifics. It has been observed that certain wave species, having wave-type electric organ discharge (EOD) waveforms, such as Eigenmannia and Gymnarchus, reflexively shift their EOD frequency away from interfering frequencies of nearby conspecifics, in order to avoid “jamming" each others electrical signals.
This phenomenon is known as jamming avoidance response (JAR) <cit.>. The electro-communication for the weakly electric fish has already been studied in the case of a simplified model consisting of a dipole-dipole interaction <cit.>.



A lot of effort has also been devoted to the electro-sensing problem, that is, the capability of the animal to detect and recognize a dielectric target nearby <cit.>. For the mathematical model of the electric fish described in <cit.>, it has been shown that the fish is able to locate a small target by employing a MUSIC-type algorithm based on a multi-frequency approach. Its robustness with respect to
measurement noise and its sensitivity with respect to the number
of frequencies, the number of sensors, and the distance to the
target have also been illustrated.
The classification capabilities of the electric fish have also been investigated. In particular, invariant quantities under rotation, translation and scaling of the target, based on the generalized polarization tensors (GPTs), have been derived and used to identify a small homogeneous target among other shapes of a pre-fixed dictionary <cit.>. The stability of the identifying procedure has been discussed. The recognition algorithm has been recently extended to sense small inhomogeneous target <cit.>.
In <cit.>, a capacitive sensing method has recently been implemented. It has been shown that the size of a capacitive sphere can be estimated from multi-frequency electrosensory data.
In <cit.>, uniqueness and
stability estimates to the considered electro-sensing inverse problem have been established.




In the present work we designed and implemented a real-time tracking algorithm for a fish to track another conspecific that is swimming nearby. In particular, we showed  that the following fish can sense the presence of the leading fish and can estimate its positions by using a MUSIC-type algorithm for searching its electric organ. We also showed that the fish can locate a small dielectric target which lies in its electro-sensing range even when another fish is swimming nearby, by filtering out its interfering signal and by applying the MUSIC-type algorithm developed in <cit.>.









The paper is organized as follows. In Section 2, starting from Maxwell's equations in time domain we adapt the mathematical model of the electric fish proposed in <cit.> in order to be able to consider many fish with EOD working at possibly different frequencies. We give a decomposition formula for the potential and, as a consequence, we decouple the dipolar signals of the two fish when they have different EOD fundamental frequencies. The amplitude of each signal can be retrieved from the measurements using Fourier analysis techniques.

In Section 3, we use the decomposition formula for the total signal to tackle the problem in the frequency domain. This allows us to employ a non-iterative MUSIC-type dipole search algorithm for a fish to track another fish of the same species nearby. 




In Section 4, we provide a method for a fish to electro-sense a small dielectric target in the presence of many conspecifics. The aim of this section is to locate the target which making use of the dipolar approximation of the transdermal potential modulations. We show that the multi-frequency MUSIC-type algorithm in <cit.> is still applicable after decomposing the total signal.


In Section 5, many numerical simulations are driven. The performances of the real-time tracking algorithm are reported. We show that the algorithms work well even when the measurements are corrupted by noise.






§ THE TWO-FISH MODEL AND THE JAMMING AVOIDANCE RESPONSE


Let Ω be a simply-connected bounded domain. We assume Ω∈ C^2, α for some 0 < α < 1. Given an arbitrary function w defined on ^2 ∖Ω and x ∈Ω,  we define

    w(x)|_±    := lim_t → 0 w(x ±  tν(x)) ,
     w/ν (x)  |_±    := lim_t → 0∇ w(x ±  tν(x)) ·ν(x) ,
 
where ν is the outward normal to Ω.

Let us denote by Γ the fundamental solution of the Laplacian in ^2, that is,

    Γ(x - y) = 1/2πlog x - y ,    x y ∈^2.

The single- and double-layer potentials on Ω, 𝒮_Ω and 𝒟_Ω, are the operators that respectively map any ϕ∈ L^2(Ω) to  

    𝒮_Ω[ϕ] (x)    = ∫_ΩΓ (x,y) ϕ (y)  s_y ,
    𝒟_Ω[ϕ] (x)    = ∫_ΩΓ/ν_y(x, y) ϕ (y)  s_y  .

Recall that for ϕ∈ L^2(Ω), the functions 𝒮_Ω[ϕ] and 𝒟_Ω[ϕ] are harmonic functions in ^2 ∖Ω.

The behaviour of these functions across the boundary Ω is described by the following  relations <cit.>:

    𝒮_Ω[ϕ] |_+    = 𝒮_Ω[ϕ] |_- ,
    ∂𝒮_Ω[ϕ]/∂ν |_±   =   ( ±1/2 I + 𝒦_Ω^*  ) [ϕ] ,
    𝒟_Ω[ϕ] |_±   =   ( ∓1/2 I + 𝒦_Ω ) [ϕ]  ,
    ∂𝒟_Ω[ϕ]/∂ν |_+    = ∂𝒟_Ω[ϕ]/∂ν |_- .

The operator 𝒦_Ω and its L^2-adjoint 𝒦_Ω^* are given by the following formulas:

    𝒦_Ω[ϕ] (x)    := 1/2 π∫_Ω(y - x) ·ν(y)/|x - y|^2ϕ (y)  s_y ,      x ∈Ω,
    𝒦_Ω^*[ϕ] (x)    := 1/2 π∫_Ω(x - y) ·ν(x)/|x - y|^2ϕ (y)  s_y ,      x ∈Ω .




For the sake of simplicity, we consider the case of two weakly electric fish 1 and 2. The extension to the case of many fish is immediate.



Starting from Maxwell's equations in time domain we derive

    ∇· ( σ + _t ) E = - ∇· j_s    ^2 ,

where σ is the conductivity of the medium,  is the electric permittivity, E is the electric field, j_s is a source of current.
Let ω_1 and ω_2 be the fundamental frequencies associated to the oscillations of the electric organ discharge (EOD) of the two fish 1 and 2, respectively. We consider a source term which is of the form

    - ∇· j_s = e^iω_1 t f_1(x) + e^iω_2 t f_2(x) ,

where f_1 = ∑α_j^(1)δ_x_j^(1) and f_2 = ∑α_j^(2)δ_x_j^(2) are the spatial dipoles located inside Ω_1 and Ω_2, respectively. Throughout this paper we assume that the dipoles f_1 and f_2 satisfy the local charge neutrality conditions:

    α_1^(i) + α_2^(i) = 0    i = 1  ;

see <cit.>.
Considering the boundary conditions as in <cit.>, we get the following system of equations:

    Δ u(x,t) = f_1(x) h_1(t)     Ω_1×^+ ,
    Δ u(x,t) = f_2(x) h_2(t)     Ω_2 ×^+ ,
    ∇· (σ(x) + (x) _t  )  ∇  u(x,t) = 0      (^2 ∖Ω_1 ∪Ω_2 ) ×^+ ,
     u|_+ - u |_- = ξ_1 ∂ u∂ν |_+     ∂Ω_1 ×^+, 
     u|_+ - u |_- = ξ_2 ∂ u∂ν |_+     Ω_2 ×^+ ,
    ∂ u∂ν |_- = 0      ∂Ω_1 ×^+ ,  Ω_2 ×^+ , 
     |u(x,t)| = O(|x|^-1)      |x| →∞,   t ∈^+,

where σ_0, _0 are the material parameters of the target D, and ξ_1 and ξ_2 are the effective skin thickness parameters of 𝔉_1 and 𝔉_2, respectively. Here, h_1 and h_2 encode the type of signal generated by the fish.




 §.§ Wave-type fish


For the wave-type fish we have h_1(t) =  e^i ω_1 t and h_2(t) = e^i ω_2 t.


When ω_1 ω_2 the overall signal is the superposition of two periodic signals oscillating at different frequencies.

  If ω_1 ω_2 such that ω_1 , ω_2  0, then the solution u to the equations (<ref>) can be represented as
	
    u(x,t) = u_1(x) e^i ω_1 t + u_2(x) e^i ω_2 t ,

	where u_1 , u_2 satisfy the following transmission problems:
	
    Δ u_1(x) = f_1(x)      Ω_1 ,
    Δ u_1 (x) = 0    Ω_2 ,
    ∇· (σ(x) + i ω_1 (x)  )  ∇  u_1(x) = 0     ^2 ∖Ω_1 ∪Ω_2   ,
     u_1|_+ - u_1 |_- = ξ_1 ∂ u_1∂ν |_+     ∂Ω_1 ,
     u_1|_+ - u_1 |_- = ξ_2 ∂ u_1∂ν |_+     Ω_2 ,
    ∂ u_1∂ν |_- = 0      ∂Ω_1  ,  Ω_2  , 
     |u_1(x)| = O(|x|^-1)      |x| →∞,

	and
	
    Δ u_2(x) = 0     Ω_1 ,
    Δ u_2 (x) = f_2(x)    Ω_2  ,
    ∇· (σ(x) + i ω_2 (x)  )  ∇  u_2(x) = 0     ^2 ∖Ω_1 ∪Ω_2  ,
     u_2|_+ - u_2 |_- = ξ_1 ∂ u_2∂ν |_+     ∂Ω_1 ,
     u_2|_+ - u_2 |_- = ξ_2 ∂ u_2∂ν |_+     Ω_2 ,
    ∂ u_2∂ν |_- = 0      ∂Ω_1  ,  Ω_2  , 
     |u_2(x)| = O(|x|^-1)      |x| →∞.

	


 We substitute (<ref>) into (<ref>). Considering the equation in Ω_1 ×^+ we get
	
    e^i ω_1 tΔ u_1  + e^i ω_2 tΔ u_2 = e^i ω_1 t f_1  .

	Thus
	
    ( Δ u_1 - f_1)  + e^i (ω_2 - ω_1) tΔ u_2 =  0 ,

	which yields Δ u_1 - f_1 = 0  in Ω_1 and Δ u_2 = 0 in Ω_1.
	
	In the same manner, we get the equations satisfied by u_1 and u_2 in Ω_2.
	
	Outside the fish bodies, we have
	
    ∇· (σ +  _t )  ∇  e^i ω_1 t u_1 + ∇· (σ +_t  )  ∇  e^i ω_2 t u_2= 0  ,

	
    e^i ω_1 t∇· (σ +  i ω_1   )  ∇  u_1 +  e^i ω_2 t∇· (σ + i ω_2   )  ∇   u_2 = 0  ,

	that yields ∇· (σ +  i ω_1   )  ∇  u_1 = 0 in ^2 ∖ (Ω_1 ∪Ω_2) and ∇· (σ +  i ω_2   )  ∇  u_2 = 0 in ^2 ∖ (Ω_1 ∪Ω_2).
	
	Finally it is easy to check that the boundary conditions remain unchanged because the time dependency does not appear explicitly.
	



 
	The potentials u_1 and u_2, that respectively solve (<ref>) and (<ref>), have a meaningful interpretation that is based on two different sub-modalities of the electroreception. As a matter of fact, u_1 can be viewed as the potential when the fish 1 is active and 2 is passive, whereas u_2 can be viewed as the potential when the fish 1 is passive and 2 is active. See <cit.>.
	
	
	
Formula (<ref>) tells us that it is possible to study the total field looking separately at these two different oscillating regimes.


The idea is to separate the two signals from the measurements of their superposition. This can be done easily by using signal analysis techniques, see <cit.>.


fig:jamming illustrates the potential before the jamming avoidance response, when the fish emit signals at a certain common frequency,

whereas  fig:submodalities  depicts the two submodalities contained in the total signal u(x,t) after they have switched their EOD frequencies.






 §.§ Pulse-type fish


For the pulse-type fish we have that h_1(t) and h_2(t) are pulse wave. We can assume that they both can be obtained from a standard pulse shape h(t) (see Figure fig:standard_pulse) by means of translation and scaling, i.e.,

    h_1(t) = h(η_1 t - T_1) ,


    h_2(t) = h(η_2 t - T_2) .




For some pulse-type species, as Gymnotoid, the jamming avoidance response is obtained by shortening the duration of the emitted pulse, see <cit.>. In this way, they minimize the chance of pulse coincidence by transient accelerations (decelerations) of their EOD rate. For η_1 , η_2 > 0 large enough such that (h_1) ∩(h_2) = ∅.

Thus, for t_1, t_2 > 0 such that h_1(t_1)  0 and h_2(t_2)  0 we can consider u_1(x) := u(x,t_1) and u_2(x) := u(x,t_2). These time-slices have the following property:


    Δ u_1(x) = f_1(x) h_1(t_1),    x ∈Ω_1 
    Δ u_1(x) = 0  ,    x ∈Ω_2, ,   Δ u_2(x) = 0,    x ∈Ω_1 
    Δ u_2(x) = f_2(x) h_2(t_2) ,    x ∈Ω_2 .

Hence we can achieve a separation of signals.







In the next sections, we will see an important consequence of Proposition <ref>. As a matter of fact 𝔉_1 can track 𝔉_2 by using the measurements of u_2 |_Ω_1, solution to (<ref>), and can detect a small target D by using the measurements of u_1 |_Ω_1.

















§ ELECTRO–COMMUNICATION


The aim of this section is to give a mathematical procedure to model the communication abilities of the weakly electric fish, i.e., the capability of a fish to perceive a conspecific nearby. Assume, for instance, the point of view of the fish 𝔉_1. 
We want 𝔉_1 to estimate some basic features of 𝔉_2,

such as the position of its electric organ. More importantly, by using subsequent estimates, we want to design an algorithm for 𝔉_1 to track 𝔉_2.



For the sake of clarity, we consider the case without the small dielectric target. It is worth emphasizing that the presence of the target is not troublesome since its effect on the tracking procedure is negligible even when the fish are swimming nearby.




When 𝔉_1 gets close to 𝔉_2, both 𝔉_1 and 𝔉_2 experiment the so-called jamming avoidance response and thus their electric organ discharge (EOD) frequencies switch. When the EOD frequencies ω_1 and ω_2 are apart from each other, Proposition <ref> can be applied.

Let u_2 be the solution to the transmission problem (<ref>).
As previously mentioned, the function u_2 can be extracted from the total signal u(x,t) using signal analysis techniques.



We define

    H^u_2(x) =  ( 𝒮_Ω_1 - ξ_1 𝒟_Ω_1 ) [  u_2/ν |_+  ] (x) .

Let us recall the following boundary integral representation: for each  x ∈^2 ∖ ( Ω_1 ∪Ω_2),

    (u_2 - H^u_2)(x)    =  ∫_∂Ω_2 (   ∂ u_2/∂ν |_+(y)  Γ (x,y)- ∂Γ/∂ν_y(x,y)   u_2 |_+(y)   )  d s_y  .

Making use of the Robin boundary condition on Ω_2 and integration by parts yields

    (u_2 - H^u_2)(x) 
       =  ∫_∂Ω_2 (   ∂ u_2/∂ν |_+(y)  Γ (x,y)- ∂Γ/∂ν_y(x,y)   u_2 |_+(y)   )  d s_y
     
       =  ∫_∂Ω_2 (   ∂ u_2/∂ν |_+(y)  Γ (x,y)- ∂Γ/∂ν_y(x,y)   ( ξ_2 ∂ u_2/∂ν |_+(y) +  u_2 |_-(y)  )   )  d s_y  
    
       =  ∫_∂Ω_2∂ u_2/∂ν |_+(y)   ( Γ (x,y)- ξ_2 ∂Γ/∂ν_y(x,y)  )   d s_y  -   ∫_∂Ω_2∂Γ/∂ν_y(x,y) u_2 |_-(y)  d s_y 
    
       =  ∫_∂Ω_2∂ u_2/∂ν |_+  ( Γ - ξ_2 ∂Γ/∂ν )   d s  ±α [ Γ (x-x_1^(2)) - Γ (x-x_2^(2))  ]    .

Therefore, we obtain

    (u_2 - H^u_2)(x) =  ∫_∂Ω_2∂ u_2/∂ν |_+  ( Γ - ξ_2 ∂Γ/∂ν )   d s  ±α [ Γ (x-x_1^(2)) - Γ (x-x_2^(2))  ]    .

Observe that, for x away from the x_1^(i), we can approximate Γ (x-x_2^(2)) - Γ (x-x_1^(2)) as follows:

    [ Γ (x-x_2^(2)) - Γ (x-x_1^(2))   ] ≈±∇Γ (x - x_1^(2) ) · (x_2^(2) - x_1^(2)) = (x - x_1^(2)) · (x_2^(2) - x_1^(2))/x - x_1^(2)^2 .


Consider an array of receptors (x_l)_l=1^M on Ω_1. We aim at solving the inverse source problem of determining the dipole, of 𝔉_2 from the knowledge of the measurements on the skin of 𝔉_1:

    { (u_2 - H^u_2)(x_l)  :  l = 1, ... , N }.

In order to estimate the dipole, we assume that the following single-dipole approximation holds:

    (u_2 - H^u_2)(x_l) ≈(x_l - z) ·𝐩/x_l - z^2   ,

where 𝐩 and z denote respectively the moment and the center of the equivalent dipolar source.

  The single-dipole approximation (<ref>) is  an equivalent representation of a spread source. However, in the presence of several well-separated sources, such approximation is not trustworthy anymore <cit.>. In the case of P ≥ 3 conspecifics we would extract u_1 , ... , u_P components from the total signal, and the single-dipole approximation remains applicable to each one of the components  u_2 , ... , u_P.
















§ ELECTRO–SENSING


Now, suppose to have 1 , 2 as before and a target close to 1.

Let u_1 be the solution to the transmission problem (<ref>), that is,

    Δ u_1(x) = f_1(x)      Ω_1 ,
    Δ u_1 (x) = 0    Ω_2 ,
    ∇· (σ(x) + i ω_1 (x)  )  ∇  u_1(x) = 0     ^2 ∖Ω_1 ∪Ω_2   ,
     u_1|_+ - u_1 |_- = ξ_1 ∂ u_1∂ν |_+     ∂Ω_1 ,
     u_1|_+ - u_1 |_- = ξ_2 ∂ u_1∂ν |_+     Ω_2 ,
    ∂ u_1∂ν |_- = 0      ∂Ω_1  ,  Ω_2  , 
     |u_1(x)| = O(|x|^-1)      |x| →∞,

and let U_1 be the background solution, that solves the problem

    Δ U_1(x) = f_1(x)      Ω_1 ,
    Δ U_1 (x) = 0    Ω_2 ,
    Δ  U_1(x) = 0     ^2 ∖Ω_1 ∪Ω_2   ,
     U_1|_+ - U_1 |_- = ξ_1 ∂ U_1∂ν |_+     ∂Ω_1 ,
     U_1|_+ - U_1 |_- = ξ_2 ∂ U_1∂ν |_+     Ω_2 ,
    ∂ U_1∂ν |_- = 0      ∂Ω_1  ,  Ω_2  , 
     |U_1(x)| = O(|x|^-1)      |x| →∞.

Consider 1,2 the Green's function associated with Robin boundary conditions, that is defined for x ∈^2 ∖ ( Ω_1 ∪Ω_2) by

    - Δ_y 1,2(x,y) = δ_x(y) ,     y ∈^2 ∖Ω_1 ∪Ω_2, 
    1,2(x,y) |_+ -  ξ_1 ∂1,2∂ν_x (x,y)  |_+ = 0  ,     y ∈∂Ω_1 , 
    1,2(x,y) |_+ -  ξ_2 ∂1,2∂ν_x (x,y)  |_+ = 0  ,     y ∈∂Ω_2 , 
     | 1,2(x,y) + 1/2 πlog |y|  | = O(|y|^-1) ,     |y| →∞.

Recall the following boundary integral equation: for each  x ∈^2 ∖ ( Ω_1 ∪Ω_2 ∪ D),

    (u_1 - U_1)(x) =  ∫_∂ D (   ∂ u/∂ν |_+(y)  1,2 (x,y)- ∂1,2/∂ν_y(x,y)   u |_+(y)   )  d s_y ,

where U_1 is the background solution, i.e., the solution without the inhomogeneity D, when the only dipolar source lies inside the body of 𝔉_1, see fig:submodalitiesB.

    (u_1 - U_1)(x) =  (k-1)/k∫_∂ D (   ∂ u/∂ν |_+(y)  1,2 (x,y)   )  d s_y .


Let B be a bounded open set with characteristic size 1. Assume that D = z + δ B, i.e., D is a target located at z which has characteristic size δ. With the same argument as in <cit.>, we obtain the following small volume approximation.
 Suppose dist(∂Ω_1 , z) ≫ 1 and δ≪ 1. Then for any x ∈∂Ω_1, 

    (  ∂ u_1/∂ν - ∂ U_1/∂ν ) (x) = - δ^2 ∇ U_1(z)^T M (λ, B) ∇_y  ( ∂Γ_R^(1,2)/∂ν |_+  ) (x, z)  + O(δ^3),

where T denotes the transpose, M(λ , B) = (m_ij)_i,j ∈{1,2} is the first-order polarization tensor associated with B and contrast  parameter λ, given by

    m_ij  = ∫_∂ B  y_i ( λ I - 𝒦_B^*  )^-1 ( ∂ x_j/∂ν |_∂ B ) (y)  d s_y .


Note that, since the background potential is real, for x ∈∂Ω_1 we have

    ( ∂ u_1/∂ν ) (x) ≈ - δ^2 ∇ U_1(z)^T  M (λ, B) ∇_y  ( ∂Γ_R^(1,2)/∂ν |_+  ) (x, z) .


This last step is crucial to locate the target because U_1 is only approximately known from the measurements and even a very small displacement in the location of 2 can cause an error on the background potential U_1, which is of the same order as the contribution of the target.

On the other hand, when z is not too close to Ω_2, the contribution of 2 contained into ∇ U_1(z) is negligible.
 Therefore, we approximate ∇ U_1(z) ≈∇U_1(z), where U_1 is solution to the problem


    ΔU_1(x) = f_1(x)      Ω_1 ,
    ΔU_1(x) = 0     ^2 ∖Ω_1  ,
    U_1|_+ - U_1 |_- = ξ_1 ∂U_1∂ν |_+     ∂Ω_1 ,
    ∂U_1∂ν |_- = 0      ∂Ω_1  , 
     |U_1(x)| = O(|x|^-1)      |x| →∞.





After post-processing (<ref>) using the following operator

    1  =  1/2 I - 𝒦_Ω_1^* - ξ𝒟_Ω_1/ν ,

see <cit.>, we get

    1 [  ( ∂ u_1/∂ν )   ] (x) ≈δ^2 ∇U_1(z)^T  M (λ, B) ∇_y  ( ∂Γ/∂ν_x |_+  ) (x, z) ,    x ∈Ω_1 .

Therefore, as long as dist(z, Ω_2) ≫ 0, the leading order term of the post-processed measured data is not significantly affected by the presence of 2. 


A MUSIC-type algorithm for searching the position z and a least square method for recovering the imaginary part of the polarization tensor M(λ, B) can be applied, see <cit.>. 




















§ NUMERICAL EXPERIMENTS


With applications in robotics in mind, and for the sake of simplicity, we can assume that the two fish populating our testing environment share the same effective thickness ξ and the same shape, which is an ellipse with semiaxes a = 2 and b = 0.3. Therefore no tail-bending has been taken into account.

For the numerical computations of the direct solutions to the transmission problems involved in the following simulations, we solved the boundary integral system of equations by relying on boundary element techniques. We adapted the codes in <cit.> to our  framework, with many fish populating the same environment.



 §.§ Electro-communication



We perform numerical simulations to show how 1 can locate the position and the orientation of 2 by using a modified version of MUSIC-type algorithm for searching the dipolar source. Firstly, let us observe that accuracy is not improved by using a multi-frequency approach when noisy measurements are considered. Instead, 1 can use a MUSIC-type algorithm based on movement in order to improve the accuracy in the detection algorithm. 
We use the approximation (<ref>).



We consider N_s positions. For each s ∈{1, ... , N_s} let us denote by 𝔉_2^s the fish at the position s. On its skin there are N_r receptors {x_n^s}_n = 1^N_r. 
For each s = 1, ... , N_s, we define the M × 2 lead field matrix A_s as

    𝐀_s(z) =  [  x_1,1^s - z_1/x_1^s - z^2  x_1,2^s - z_1/x_1^s - z^2;                          ⋮                          ⋮; x_M,1^s - z_1/x_M^s - z ^2  x_M,2^s - z_2/x_M^s - z^2 ] .

Let 𝐅 be the Multi-Static Response (MSR) matrix defined as follows

    𝐅 = [     (u_2 - H^u_2)(x_1^1)                        …   (u_2 - H^u_2)(x_1^N_s);                        ⋮                        ⋱                        ⋮;   (u_2 - H^u_2)(x_N_r^1)                        … (u_2 - H^u_2)(x_N_r^N_s);                          ] .

Moreover, we assume that the acquired measurements are corrupted by noise, i.e.,

    𝐅_noisy = 𝐅 + 𝐗 ,

where 𝐗∼𝒩(0, σ_noise^2) is a Gaussian random variable with mean 0 and variance σ_noise^2. In our simulations we set the variance to:

    σ_noise = (𝐅_max - 𝐅_min) σ_0 ,

where σ_0 is a positive constant called noise level, and 𝐅_max and 𝐅_min are the maximal and the minimal coefficient in the MSR matrix 𝐅. 



Let 𝐅^ℜ_noisy be the real part of 𝐅_noisy. Let λ_1 ≥λ_2 ≥ ... ≥λ_N_r be the eigenvalues of 𝐅^ℜ_noisy· ( 𝐅^ℜ_noisy )^T and let Φ_1 , ... , Φ_N_r be the correspondent eigenvectors.  The first eigenvalue is the one associated to the signal source and the span of the eigenvector Φ_1 is called the signal subspace. The other eigenvectors span the noise subspace.

As it is well known, the MUSIC algorithm estimates the location of the dipole by checking the orthogonality between  𝐀_s(z) (<ref>) and the noise subspace projector 𝒫_N <cit.>. This can be done for each position s.

For this purpose, we shall use a modified version of the MUSIC localizer in <cit.>, by simply taking the maximum over the positions:

    ℐ_2(z) = max_s = 1, ... , N_s (  1/λ_min (𝐀_s(z)^T 𝒫_N 𝐀_s(z), 𝐀_s(z) 𝐀_s(z)^T) ) ,

where λ_min( · , · ) indicates the generalized minimum eigenvalue of a matrix pair.

We expect that the MUSIC localizer has a large peak at the location of the equivalent dipole we are searching for. 
Once an estimate z of the true location has been obtained, the dipole moment can be estimated by means of the following formula:

    𝐩_est = ( 𝐀(z)^T 𝐀(z) )^-1𝐀(z)^T Φ_1 .
 
i.e., the least-square solution to the linear system

    Φ_1 =𝐀(z) 𝐩.
 


 



 





 §.§ Tracking



Now we want to show that the dipole approximation that we assumed in the previous subsection is good enough to be used successfully for tracking purposes.


We assume the following setting for the numerical simulations. The fish 1 is swimming along a fixed trajectory. Let us assume that the motion of its electric organ is described by a continuous path F : [t_1,t_N] ^2. Let t_1 < t_2 < ... < t_N be a temporal grid on [t_1,t_N] and let t_j = s_1^j < ... < s_M^j = t_j+1 be a grid on [t_j,t_j+1] for j=1 , ... , N-1. 

At the beginning, when t = t_1, 2 starts following 1. The tracking is performed by estimating the positions of 1 at the nodes of the grid t_1, ... , t_N. Let us denote  by X_n , Y_n and p_n , q_n the positions and the orientations of 2 and 1 at t = t_n, respectively. In order to obtain an estimate Y_n of the position Y_n we can apply Algorithm <ref>, that employs measurements at s_1^n-1 , ... , s_M^n-1 to reduce the effect of the noise. More precisely, the discrete dynamic system that describes the evolution of the positions and orientations of the two fish is as follows:

    X_n = X_n-1 + h_n p_n-1, 
    
    p_n = 𝐑(θ_n) p_n-1,
    
    Y_n = F(t_n) ,
    
    q_n = F'(t_n) ≈F(t_n) - F(t_n-1)/h,

where X_0 and p_0 are the initial data. Let us define T_n-1 := Y_n-1 - X_n-1, the pointing direction. The update of the orientation of 2 is given by an orthogonal matrix associated with a rotation by an angle θ_n, 𝐑(θ_n) ∈ O(2,), and the turning angle is defined as

    θ_n :=  θ_n-1±min ( θ_max , T_n-1 p_n-1 ) .

The numbers h_1 , ... , h_M incorporate the velocity of the tracking fish and should be chosen adaptively, in order to allow a variety of maneuvering capabilities such as acceleration and deceleration, as well as swimming backwards when h_n < 0. In order to prevent both collision and separation, we shall assume the velocity to be a function of the distance between X_n and Y_n. 
θ_max is the maximum turning angle. It is worth mentioning that the choice of θ_max  has a strong impact on the efficiency of the tracking procedure.






















The algorithm  employs a multi-position dipole search that uses M positions in between.  In our numerical simulations, in order to have a real-time tracking procedure, we have set M = 5. We have set θ_max = 10^-1.




 §.§ Electro-sensing



While the fish can sense the presence of other conspecifics at some distance, the range for the active electrosensing is much more short <cit.>.

The effectivity of the estimated position of a small dielectric target inevitably depends on the relative distances among the fish, its conspecifics and the target. However, this seems perfectly reasonable. We have to require 


  * The two fish do not get too close to each other;

  * The small dielectric target D is in the electro-sensing range of 𝔉_1.


If the above qualitative conditions are not met, there is no garantee that we can get accurate results.




We perform many experiments to show that the MUSIC-type algorithm proposed in <cit.> works under the conditions outlined above. Based on approximation (<ref>) we consider the illumination vector

    g(z) =   ( ∇U_1(z) ·∇_z  (Γ/ν_x )(x_1,z), … , ∇U_1(z) ·∇_z  (Γ/ν_x )(x_N_r,z)  )^T ,

and define the MUSIC localizer as follows:

    ℐ_1(z) = 1/|(I - P)g(z)| ,

where g = g/|g| and U_1 is the solution to (<ref>).






































*




§ CONCLUDING REMARKS


In this paper, we have formulated the time-domain model for a shoal of weakly electric fish. We have shown how the jamming avoidance response can be interpreted within this mathematical framework and how it can be exploited to design communication systems, following strategies and active electrosensing algorithms.
In a forthcoming paper, we plan to extend our present approach to develop navigation patterns inspired by the collective behavior of the weakly electric fish.







§ ACKNOWLEDGMENT

 The author gratefully acknowledges Prof. H. Ammari for his guidance and the financial support granted by the Swiss National Foundation (grant 200021-172483).



9
Am7 H. Ammari, An Introduction to Mathematics of Emerging Biomedical Imaging, Math. & Appl.  62. Springer, Berlin, 2008.

Am2 H. Ammari, T. Boulier, and J. Garnier, Modeling active electrolocation in weakly electric fish, SIAM J. Imaging Sci., 6 (2013), 285–321.

Am3 H. Ammari, T. Boulier, J. Garnier, W. Jing, H. Kang, and H. Wang, Target identification using dictionary matching of generalized polarization tensors, Found. Comput. Math., 14 (2014), 27–62. 

Am5 H. Ammari, T. Boulier, J. Garnier, and H. Wang, Shape recognition and classification in electro-sensing, Proc. Natl. Acad. Sci. USA, 111 (2014), 11652–11657.

Am6  H. Ammari, T. Boulier, J. Garnier, and H. Wang, Mathematical modelling of the electric sense of fish: the Role of multi-frequency measurements and movement, Bioinspir. Biomim., 12  (2017),  025002.


Am8 H. Ammari, J. Garnier, H. Kang, M. Lim, and S. Yu, Generalized polarization
tensors for shape description,  Numer. Math. 126 (2014), no. 2,199–224.

Am9 H. Ammari, M. Putinar, A. Steenkamp et al, Identification of an algebraic domain in two dimensions from a finite number of its generalized polarization tensors, Math. Ann. (2018).




p5 C. Assad, Electric field maps and boundary element simulations of electrolocation in
weakly electric fish, PhD thesis, 1997 (California Institute of Technology, Pasadena, CA).

p6 D. Babineau, A. Longtin, and J.E. Lewis, Modeling the electric field of weakly electric
fish, J. Exp. Biol.,  209 (2006), 3636–3651.


maciver Y. Bai, I.D. Neveln, M. Peshkin, and M.A. MacIver, 
Enhanced detection performance in electrosense through capacitive sensing, Bioinspir. Biomim., 11 (2016), 055001. 


faouzi E. Bonnetier, F. Triki, and C.-H. Tsou, On the electro-sensing of weakly electric fish, J. Math. Anal. Appl., 464 (2018),  280–303. 
p7 R. Budelli and  A.A. Caputi, The electric image in weakly electric fish: Perception of
objects of complex impedance, J. Exp. Biol., 203 (2000), 481–492.

bullock T .H. Bullock, R.H. Hamstra, H. Scheich, The jamming avoidance response of high frequency electric fish. J. Comp. Physiol. 77, 1-48 (1972). 

caputi Angel Ariel Caputi, The bioinspiring potential of weakly electric fish, 
Bioinspir. Biomim., 12 (2017), 025004. 

caputi2 A. A. Caputi, Passive and active electroreception during agonistic encounters in the weakly electric fish Gymnotus omarorum, Bioinspir. Biomim. 2016 Oct 21;11(6):065002. 

p8  L. Chen, J.L. House, R. Krahe, and M.E. Nelson, Modeling signal and background components
of electrosensory scenes, J. Comp. Physiol. A Neuroethol Sens Neural Behav. Physiol.,  191 (2005),
331–345.

lund M. Christensen, A. Jakobsson 2010. Optimal Filter Designs for Separating and Enhancing Periodic Signals. IEEE Transactions on Signal Processing. 58(12):5969-5983.

p15 O.M. Curet, N.A. Patankar, G.V. Lauder, and M.A. Maciver, Aquatic manoeuvering with
counter-propagating waves: A novel locomotive strategy, J. R. Soc. Interface 8 (2011), 1041–1050.

donati E Donati et al, Investigation of collective behaviour and electrocommunication in the weakly electric fish, Mormyrus rume, through a biomimetic robotic dummy fish, Bioinspiration & biomimetics 11 (6), 066009.


he B. He, T. Musha, Y. Okamoto, S. Homma, Y. Nakajima and T. Sato, Electric Dipole Tracing in the Brain by Means of the Boundary Element Method and Its Accuracy, in IEEE Transactions on Biomedical Engineering, vol. BME-34, no. 6, pp. 406-414, June 1987. 
helli W. Helligenberg, Theoretical and experimental approaches to spatial aspects of electrolocation, J. Comp. Physiol. A, 103 (1975), 247–272.
helli2 W. Heiligenberg, Principles of Electrolocation and Jamming Avoidance in Electric Fish: A Neuroethological Approach. Studies of Brain Function, Vol. 1. Berlin-New York: Springer-Verlag (1977). 

helli3 The jamming avoidance response in gymnotoid pulse-species: A mechanism to minimize the probability of pulse-train coincidence,
Journal of Comparative Physiology 124(3):211-224 · September 1978. 
 
 
 hoshi N. Hoshimiya, K. Shogen, T. Matsuo, and S. Chichibu, The Apteronotus EOD field: Waveform and EOD field simulation, J. Comp. Physiol. A., 135 (1980), 283–290. 
 
 kramer   B. Kramer,  (1996) Electroreception and communication in fishes.    Progress in Zoology, 42. Gustav Fischer, Stuttgart.
p1 H.W. Lissmann and K.E. Machin, The mechanism of object location in gymnarchus
niloticus and similar fish, J. Exp. Biol., 35 (1958), 451–486.

p9 M.A. Maciver, The computational neuroethology of weakly electric fish: Body
modeling, motion analysis, and sensory signal estimation, PhD thesis, 2001 (University of
Illinois at Urbana-Champaign, Champaign, IL).

p10 M.A. MacIver, N.M. Sharabash, and M.E. Nelson, Prey-capture behavior in gymnotid electric
fish: Motion analysis and effects of water conductivity, J. Exp. Biol., 204 (2001), 543–557.


p3  P. Moller, Electric Fish: History and Behavior, 1995 (Chapman and Hall, London).

mosher J. C. Mosher, P. S. Lewis and R. M. Leahy, "Multiple dipole modeling and localization from spatio-temporal MEG data" in IEEE Transactions on Biomedical Engineering, vol. 39, no. 6, pp. 541-557, June 1992.

p4 M.E. Nelson, Target Detection, Image Analysis, and Modeling, 2005 (Springer-Verlag,
New York).

p11 B. Rasnow, C. Assad, M.E. Nelson, and J.M. Bower, Simulation and measurement of the
electric fields generated by weakly electric fish, Advances in Neural Information Processing
Systems 1, ed Touretzky DS (Morgan Kaufmann Publishers, San Mateo, CA), pp. 436–443, 1989.

scapin A. Scapin, Electrosensing of inhomogeneous targets, to appear on Journal of Mathematical Analysis and Applications (2018).

sekihara  K. Sekihara, D. Poeppel, A. Marantz, H. Koizumi, Y. Miyashita, Noise covariance incorporated MEG-MUSIC algorithm: a method for multiple-dipole estimation tolerant of the influence of background brain activity, in IEEE Transactions on Biomedical Engineering, vol. 44, no. 9, pp. 839-847, Sept. 1997.

p12 G. von der Emde, S. Schwarz, L. Gomez, R. Budelli, and K. Grant, Electric fish measure
distance in the dark, Science, 260 (1993), 1617–1623.

p13 G. von der Emde G, and S. Fetz, Distance, shape and more: Recognition of object features
during active electrolocation in a weakly electric fish, J. Exp. Biol. 210 (2007), 3082–3095.

p14 G. von der Emde, Active electrolocation of objects in weakly electric fish, J. Exp.
Biol., 202 (1999), 1205–1215.

code H. Wang, Shape identification in electro-sensing, https://github.com/yanncalec/SIES.

wwang W. Wang et al, A bio-inspired electrocommunication system for small underwater robots, 2017 Bioinspir. Biomim. 12.

zheng X. Zheng, Artificial lateral line based local sensing between two adjacent robotic fish, Bioinspir. Biomim. 2017 Nov 27;13(1):016002.


