Skip to main content
PLOS One logoLink to PLOS One
. 2022 Nov 28;17(11):e0278167. doi: 10.1371/journal.pone.0278167

Experimental identification of individual insect visual tracking delays in free flight and their effects on visual swarm patterns

Md Saiful Islam 1,*, Imraan A Faruque 1
Editor: Antony R Humphries2
PMCID: PMC9704579  PMID: 36441727

Abstract

Insects are model systems for swarming robotic agents, yet engineered descriptions do not fully explain the mechanisms by which they provide onboard sensing and feedback to support such motions; in particular, the exact value and population distribution of visuomotor processing delays are not yet quantified, nor the effect of such delays on a visually-interconnected swarm. This study measures untethered insects performing a solo in-flight visual tracking task and applies system identification techniques to build an experimentally-consistent model of the visual tracking behaviors, and then integrates the measured experimental delay and its variation into a visually interconnected swarm model to develop theoretical and simulated solutions and stability limits. The experimental techniques include the development of a moving visual stimulus and real-time multi camera based tracking system called VISIONS (Visual Input System Identification from Outputs of Naturalistic Swarms) providing the capability to recognize and simultaneously track both a visual stimulus (input) and an insect at a frame rate of 60-120 Hz. A frequency domain analysis of honeybee tracking trajectories is conducted via fast Fourier and Chirp Z transforms, identifying a coherent linear region and its model structure. The model output is compared in time and frequency domain simulations. The experimentally measured delays are then related to probability density functions, and both the measured delays and their distribution are incorporated as inter-agent interaction delays in a second order swarming dynamics model. Linear stability and bifurcation analysis on the long range asymptotic behavior is used to identify delay distributions leading to a family of solutions with stable and unstable swarm center of mass (barycenter) locations. Numerical simulations are used to verify these results with both continuous and measured distributions. The results of this experiment quantify a model structure and temporal lag (transport delay) in the closed loop dynamics, and show that this delay varies across 50 individuals from 5-110ms, with an average delay of 22ms and a standard deviation of 40ms. When analyzed within the swarm model, the measured delays support a diversity of solutions and indicate an unstable barycenter.

Introduction

Insects are model systems for resource-constrained micro air vehicles operating in group and swarm applications. Although these naturalistic swarms rely on limited sensory and neural feedback structures and lack a traditional engineered communication network, they achieve coordinated flight maneuvers in near proximity to neighbors and amidst changing neighbors in unstructured environments [13]. Vision is one of the few sensing modalities whose quantified bandwidth, range, and sensitivity could provide realtime feedback to modulate these flight paths, and the relatively large fraction of insect neural material dedicated to visual processing suggests that visual control may be an important tool for implicit communication [46]. The exact mechanisms that are used to facilitate this interconnection are not yet known. Many theoretical swarm models and analyses remain disconnected from experimental studies on naturalistic swarms, which limits the ability of these parallel efforts to inform each other [7, 8]. In particular, the effect of latencies such as sensory processing delay in biological (or computational in robotic) swarm experiments has not been adequately connected to theoretical developments.

This study develops an experimental tool based on a flight arena equipped with a visual stimulus system (Stimulus design) and a real-time insect tracking routine called Visual Input System Identification from Outputs of Naturalistic Swarms (VISIONS) for insects in free flight (Tracking system), and uses this tool to experimentally identify the visual processing and feedback delay across different insects. The identified delays are measured at the individual insect level, and probability distributions are experimentally quantified for the measured delays ((System identification). The swarm level effect of these delay distributions are then connected to recent progress in theoretical swarm communications analysis and a implemented in a simulated swarm environment (Analysis & simulation). The analysis and simulation indicate that three characteristic patterns may be generated by a collection of insects visually navigating relative to each other with such delays, and identify the Gaussian delay distribution range needed to generate stable swarm (Results and discussion).

Previous work & background

Experiments for insects’ visuomotor response

The effects of environmental stimuli examining insect flight behavior and motions during visually-dominated behaviors like obstacle avoidance, landing on a wall or proboscis, and flower tracking have previously focused most on the role of ambient and external illumination levels [911]. By high-speed videography, it was observed free-flying fruit flies generating quick turns through modest wing alterations and discussed methods for a one-parameter open loop paradigm for free-flying insects under a visual display [12]. To adapt for rapid changes in body orientation, dipterans and bees adjust the amplitude and angle of their wing stroke asymmetrically [1315]. Nocturnal sweat bees do not change their flight speed while landing in a tunnel [16]. Later work showed that diurnal insects like bumblebees and hornets reduce their flight speed and take progressively more circuitous paths as the light intensity decreases [17], however nocturnal bees Megalopta were able to maintain flight speed with decreasing light intensity, including a spatial summation mechanism to explain their nighttime heightened sensitivity [18]. Flower tracking investigations on Manduca sexta utilizing a moving flower at various frequencies indicate tracking performance during feeding and energy expenditure, revealing that flower movement direction has a stronger effect on tracking performance than the target’s movement frequency [19]. When flying in the wind, the unsteady flight of a hawkmoth in the wake of a 3D printed robotic flower displays larger tracking overshoot and a reduced order dynamic system [20] and a flower tracking experiment was used to quantify the change in their flight behavior under various light conditions, with flower tracking behavior represented by a simple temporal delay at various light intensities [21]. By adjusting light intensity, a system identification approach was utilized to find a brightness-dependent delay term in the transfer function, resulting in a dynamic model for each Hawkmoth variant that included a combination of species-dependent scaling parameters and processing delays [22]. There is evidence to suggest the internal delay time may have a dependency on swarm sizes in mosquitoes tracking a moving marker [23] and by task; in robber fly predation and obstacle avoidance tasks, different time delays (30 and 90 ms) for proportional navigation and obstacle avoidance rule were observed [24].

While experimental research is beginning to understand the need to quantify internal delays due to insect sensing and feedback, these previous studies are limited to reporting a single average delay across all animals and do not yet account for the heterogeneity of delay across the population or the effect of such delays on neighbor-coordinated behaviors.

Camera based tracking technologies

Animal movement study has benefited greatly from availability of electronic cameras to reconstruct animal positions. Early automated tools for tracking insects like “Ethovision” and “Trackit” relied on color cameras and chrominance differences to segment foreground and background [25, 26]. “Flydra” achieved real-time tracking and allowed the use of monochrome cameras without the need for chrominance-based segmentation by assuming a fixed background scene and using intensity based segmentation [27]. This technology began to move to other schooling animals, with parallel improvements in outdoor starling tracking applying trifocal cameras began to bring this technology outside the lab, assuming homogeneous sky through a fixed background assumption [28]. Other animals began to be tracked, like fish and mice position tracking from post-processed videos with “IdTracker”, [29], and automotive traffic [30], both relying on a static background assumption. “Toxtrac” tracked salmon, zebrafish, and cockroaches using a fixed background assumption, and similarly relied on a static background with a well-lit subject [31], as did infrared tracking approaches on ants at 2 Hz update rate [32]. Further, visual tracking conducted in a naturalistic settings often results in lighting changes that negatively affect tracking approaches [29, 31].

For studies involving an insect or collection of insects tracking a visual stimulus, the appearance of visual stimulus in the background is necessary for precise timing measurements (as will be discussed in the next subsection). Recent works allow limited noisy backgrounds [33, 34], and many tracking problems are still completed manually [35]. Animal flight studies have progressed with the help of high-speed imaging systems that allow researchers to monitor the detailed kinematic behavior of animals during flight [36]. Using artificial markers on the wings wing deformations can be measured and quantified with high speed videography [37, 38]. Because of the small wing sizes, rapid frequency flapping, and unpredictable movements in near proximity to the insect body, wing kinematics characterization and reconstruction remain a challenging task even with high-speed videography [39, 40]. Recent improvements in high speed visual tracking digitizing wing motions have integrated mechanisms to handle dynamic backgrounds and occlusions [41] such as the moving average [42] and Kalman filter [43, 44] techniques, and these approaches have each shown value in real-time visual tracking for robust visual tracking system identification.

System identification

System identification techniques are applicable to experimental manipulations in which an input and output stimulus pair must be used to discover a set of unknown underlying dynamics. These experiments generally involve prescribing inputs that perturb a system (sometimes referred to as a ‘black box’) with known input signals and recording the resulting output variables [45]. This identification problem is often solved in both time and frequency domains [46]. Frequency domain analysis includes the ability to generate non-parametric identifications, applicability to classical control-system design methodologies and modeling of flying qualities, noise robustness, and reduced dimensionality for model parameter estimations [47, 48]. For a linear dynamic model estimate, a diverse set of methods based on frequency domain identification are available, such as equation error [49], filter and output error [46], and spectral estimation [50]. The relative maturity of such models has resulted in applications to insect flight behaviors such as chasing mates [51], saccade turns [52], obstacle avoidance [53], speed control [10], navigation [54], and flight stabilization [5557].

Theoretical swarm models with delay

Swarm models

Mathematical descriptions of collective motions of multi-agent biological systems, including bacterial colonies, slime molds, locusts, and fish, have become available in the last few decades [5860]. These models range from continuous approximations and kinetic theory models to models at the individual level, with interaction mechanisms generally consisting of attractive and repulsive forces [6163] that move the particles. Aerial insect sensory systems are implemented at the individual level, which lends itself to treating each biological or mechanical individual as a discrete particle. This structure is consistent with individual models like the evolvable heading Vicsek [64] and evolvable-velocity Cucker-Smale [65] models. Both of which are composed of a set of differential equations (each representing a single agent’s dynamics) networked together by some idealized sensing and interaction rule. Rigorous proofs are available to show sufficiency of particular rules to lead to flocking-like behaviors showing velocity convergence.

Bifurcation analysis

In differential equation analysis, a bifurcation parameter can be used to understand when a dynamic system exhibits distinct changes in behavior, such as stability or topological structures such as saddle points [66]. Modulating a single bifurcation parameter may achieve distinct behavioral characteristics using pitch fork, Hopf, and transcritical bifurcation types [67]. Different swarming patterns of spacecrafts by attraction and repulsive potentials through dynamic system theory can be obtained [68, 69].

Recent progress on theoretical delays

Despite the availability of rigorous proofs for sufficiency (e.g. [65]), the theoretical models have often relied on a high level of instantaneous connectivity that may be impractical in nature or robotic implementations. The theoretical effects of delay in such a network of interaction rules has previously been investigated primarily numerically by distributing delays among agents and applying a mean field analysis [70]. Only recently are these effects beginning to be understood theoretically by extending the Cucker-Smale model to include the effects of time delay, which provides a path to understanding the effects of sensor and communication delays in swarm networks. Communication weights and a Lyapunov approach are used to determine an upper bound on time delays for velocity convergence for the Cucker Smale model [71].

An upper bound on the size of time delays is now available as a sufficient condition for flocking behaviors [72]. These effects of fixed time delays have recently been applied to both first and second order swarm models with fixed time delays [73] in theoretical and numerical simulation. Bifurcation analysis applied to the swarm network problem with delay as the bifurcation parameter can yield insights into the delay structures that affect collective motion behaviors [74]. To overcome the existing mean field theory’s predictability limitations, stability analysis of ring and rotating patterns in a delay coupled swarm is carried out utilizing the bifurcation parameter [75].

Contribution of this paper

Despite the progress in different tracking experiments on animals, there is a lack of archival literature directly connecting experimentally measured delays in swarming-capable animals to the theoretical structures available. It remains unknown to what degree visuomotor tracking delays vary across individuals in a population (or even whether they might be better be modeled as fixed or heterogeneous), and whether these individual delays support or conflict with current understanding of visual swarming. A primary contribution of this work is to address these gaps between theory and experiment by providing: (a) an experimental quantification of how individual insect visuomotor delays vary over population, and (b) a theoretical and simulation analysis of the effect of these delays on visually connected swarms, illustrating the achievable shapes and stability regions and the need for delay modeling.

Materials and methods

Experimental data collection

We prepared a rectangular acrylic enclosure of 15 × 10 × 10 inch dimensions, as illustrated in (Fig 1a and 1b). Honeybees were collected from a research beehive and placed inside the enclosure at 72°F. The experiment required constructing two pieces of equipment: a visual stimulus input and a real-time tracking system. The experiment moves the stimulus in the X axis of the world coordinate, while the insect flying in the working volume tracks it and we record its trajectories by the tracking system. The insects track the light intermittently rather than continuously (S1 Video), and this visual tracking study analyses the periods of tracking. Tracking sections S in a trajectory were identified automatically as follows,

S=[ΔT(q)...ΔT(q+g)],g30,q=1,...,k-30, (1)

where k is the total number of points. ΔT(m) is the absolute difference of every pair of points defined by ΔT(m) = |T1(m) − T2(m)| < ησ. T1(m) and T2(m) are continuous trajectory point m of X coordinates of the stimulus and bee. The tracking tolerance ηγ was used to specify the desired tracking accuracy. S=[S11,S21,...Sg1S12,S22,...Sg2] is the identified section containing g tracking point pairs where S(1...g)1 and S(1...g)2 are stimulus and bee points respectively.

Fig 1. (a) Diagram of tracking system, (b) physical implementation, (c) input stimulus circuit design.

Fig 1

Stimulus design

The visual light stimulus is provided via a two-sided rectangular LED display, each of them contains 16 by 32 (width × height) LEDs with a refresh rate of 100 Hz. A Linux computer and a Raspberry Pi microcontroller are used to generate a programmable image on the LED panel. Fig 1c depicts the two Adafruit dotstar LED displays, one 74aN174 level shifter, and a Raspberry Pi microprocessor, as well as their wiring. Our stimulus was a synchronized vertical green light with a height of 2 by 8 inches (width×height), and a brightness of 2200 lux (measured at the center point between the two opposing lights), as seen in Fig 1b. The stimulus is moved by a sum of sinusoidal frequencies that changed the location of the vertical bar along the world coordinate’s X axis.

Tracking system

Three synchronized cameras (Flea mono cameras) record the bees’ flight paths at 50–120 frames per second. Fig 1a shows the cameras set on three tripods with angular separations varying from 50 to 90 degrees. The raw images (1280x1024) collected by these cameras are transported to a central Linux computer through USB3 connections. The ROS platform’s Python-based program runs in real time and may also be used for recording and analysis offline. The main flowchart for the tracking system is shown in Fig 2, and the major processes are discussed below.

Fig 2. Flowchart of tracking system.

Fig 2

2d centroids detection

After obtaining raw photos from the cameras, we distinguish the foreground from the background. When the background varies slightly, the moving average technique is appropriate. The initial background is found by taking average of first few frames. Then, the background Et(i, j) for each new frame at time t is updated as

Et(i,j)=(1-ημ)Et-1(i,j)+ημFt(i,j), (2)

where i and j denote the pixel coordinates that change in every frame, and Ft(i, j) is the current frame at time t. The background change is controlled by the weight ημ, which determines how much the background of the next frame should differ from the present one. Calculating the binary difference between the current frame Ft(i, j) and the estimated background Et(i, j) yields the foreground by

K(i,j)={0,|Ft(i,j)-Et(i,j)|<ηα1,|Ft(i,j)-Et(i,j)|ηα. (3)

If the difference between each pixel coordinate of Ft(i, j) − Et(i, j) is smaller than the predefined threshold value ηα, we will consider that pixel point to be zero (dark) in image K(i, j). The threshold ηγ may be automatically determined by

ηα=ηλ.1nh.nv.i=1nhj=1nv|Ft(i,j)-Et(i,j)|, (4)

where nh, nv are the number of image pixels in horizontal and vertical directions of the image and ηλ is the coefficient of inhibition. The value of ηα ranges between 10 and 30. The images may still have some noise. To get rid of the unwanted elements “Gaussian blurring” and “morphological closure” are applied by opencv image processing toolbox where Gaussian kernel acts as a low pass filter to eliminate high frequency components and morphological closure helps to fill small gaps in the images. After the stimulus and insect have been segmented, we calculate the area size, two-dimensional center position (centroid), shapes, and other metrics. Occasional frames may be missed owing to overlaps or occlusion. Using the discrete Kalman filter [43], each insect centroid position can be predicted when there are any missing frames. Detailed information about the Kalman filtering method is described in appendix (section Kinematic filtering). These 2D centroids are required in the next stage.

2D to 3D conversion

3D position from the 2D measured positions of all cameras can be calculated by camera calibration matrices. The intrinsic and extrinsic calibration parameters for each of camera are found using the Svoboda multi camera calibration toolbox [76]. During the Matlab execution of this toolbox, a red laser light in the working volume must be moved. Using these calibration matrices and previously tracked 2D points, we employ the linear triangulation approach to obtain 3D points. For each camera model j, the linear triangulation equation is stated as follows

[vijP3j-P2juijP3j-P1j........]Oi=0, (5)

where (uij,vij) is 2D point i of jth camera, Oi is the 3D point and Pnj is the nth row of the calibration matrix P3×4 of camera j. Combining perspective projection expressions for multiple cameras yields a homogeneous system of linear equations; at least two cameras are required to solve this system of equations via singular value decomposition. The combination of 2D points acquired from the cameras can be used to calculate 3D points. The 3D point then is re-projected back to the 2D point by the calibration matrices. A tolerance ηψ on the re-projection error between the true and re-projected 2D points is used to specify the desired precision.

System identification

In the frequency domain, tracking trajectories may be described by gain, phase, and coherence. The gain depicts the insect’s amplitude in relation to the stimulus in each frequency component. To translate the trajectory from time domain to frequency domain, we apply the Fourier transform (FFT). Tracking error e(s) may be computed by reference to ideal tracking (gain 1, phase 0) as

e(s)=||G(s)-(1+0j)||, (6)

where G(s) is the transfer function containing gain and phase for each frequency s = point. Coherence γ2(s) is calculated from the spectral power density of an input and output signal pair (x, y) by the following equation as

γ2(s)=|Sxy(s)|2Sx(s)Sy(s), (7)

where Sxy(s) denotes the cross spectral power density and Sx(s) and Sy(s) represent the auto power spectral density of the stimulus (input) and bee (output) coordinates, respectively. The coherence between the stimulus and the bee trajectory is used to determine the degree of linear connection throughout the frequency range with 1 denoting a purely linear system relationship and 0 denoting no linear relationship. For this investigation, we assumed a linear relationship between the stimulus and the bee trajectories up to a coherent frequency with a coherence value greater than 0.7.

The FFT transform outputs a discrete time frequency domain signal up to the Nyquist frequency (12δt). To improve the resolution over a targeted frequency range identified from the coherence, Chirp Z transform (CZT) [77] was applied. CZT is a generalization of discrete Fourier transform (DFT) and samples the Z plane via spiral arcs (straight lines in the S plane), whereas the DFT samples the complex Z plane at equally spaced points along the unit circle. We consider this CZT frequency domain data of the stimulus D1(s) and bee D2(s) trajectories to examine the flight dynamics of the tracking trajectories. We conduct the system identification technique across several possible pole zero combinations (2–4 poles and 1–4 zeros) of transfer functions Ge(s) and varying time delays τi ∈ [0, 200] ms. A processing delay τi could be modeled as a pure tracking delay (eτis) or linear approximation (11+τis) in the transfer function. We included both delay structures in the system identification framework to compare the results. The identified transfer function model is found from the minimum absolute difference between true and model transfer functions over region of coherence, which is presented as

minτi,Ge|H^(s)-Ge(s)M(s,τi)|s=jω,ω=arg{γ2(s)>0.7}, (8)

with delay model structure M(s,τi)={e-sτi,11+τis}. Here, H^(s) represents the measured frequency domain data that was derived by dividing the frequency domain versions of the bee and stimulus trajectories, denoted by H^(s)=D2(s)D1(s). The system identification method is depicted as a flowchart in Fig 3. Three fit criteria FIT, MSE (mean square error) and FPE (final prediction error) [45] are used to determine the best dynamics model. The FIT and MSE criteria are defined by

FIT=100×(1-||y-ym||||y-mean(y)||), (9)
MSE=1ni=1n[y(i)-ym(i)]2. (10)

where y is the true output, ym is the model’s predicted output and n is number of data points. To find the FPE, we have considered an ARX (auto-regressive with exogenous input) model as

y(t)+a1y(t-1)+....+any(t-na)=b1u(t-1)+...+bnu(t-nb)...+w(t), (11)

where na, nb, w(t) are the number of poles, number of zeros and white noise term respectively. The estimated parameters are θ = [a1, a2, ...., anb1, b2, ...., bn]T and regression matrix is ϕ = [−y(t − 1).....−y(tna)u(t − 1).....u(tnb)]T. The prediction error is e(t, θ) = y(t) − ϕTθ. FPE is described by

FPE=det(1L1Le(t,θ)e(t,θ)T)(1+dL1-dL), (12)

where L is the number of values in the estimate data set and the number of estimated parameters is represented by d.

Fig 3. Flowchart of system identification.

Fig 3

Swarm model

Our experiment extracts single bee tracking dynamics, and we build a hypothetical swarm of visually interconnected insects from those delays and transfer functions. Each swarm agent individual has a distinct communication latency, consistent with the individual reaction time measurements. A delay-based factor among the insects may impact group behaviors, and we included a coupling strength to allow one to consider multiple swarm shapes.

Swarm dynamics

We consider a second order (position and velocity) dynamic system model for N agents communicating with each other agents with some heterogeneous processing delays. These delays are heterogeneous i.e, each agent has distinct delay. The dynamic model based on 2D or 3D position xi and velocity vi may be written in either as

dxidt=vi, (13)
mdvidt=-iAa(xij,τij)-iAr(xij,Br,Cr)-βvi, (14)

where ∇iAa(xij, τij) and ∇iAr(xij, Br, Cr) are an attractive and repulsive potential respectively, specified as

Aa(xij,τij)=-12ρ(i=1,ijN(xi(t)-xj(t-τij))-r)2+14(i=1,ijN(xi(t)-xj(t-τij))-r)4, (15)
Ar(xij,Br,Cr)=i=1,ijNBre-|xi(t)-xj(t-τij)|Cr. (16)

Here, τij is the delay from agent i to agent j. xij is inter-agent distance of agent i to agent j with some time delay τij and is denoted by xij = xi(t) − xj(tτij). ρ is inter-agent coupling strength and we assume each agent goes to r distance from the origin. Br and Cr are the amplitude and applied distance of repulsive potential. β is the coefficient of friction. For notational convenience, let Xi=i=1,ijN(xi(t)-xj(t-τij)). The magnitude of the movement I is written as

I=-ρ(||1NXi||-r)+(||1NXi||-r)3, (17)

and the attractive potential gradient is

iAa=[Icos(θ)Isin(θ)], (18)

where cos(θ)=Xi(1)||1NXi|| and sin(θ)=Xi(2)||1NXi||, and Xi(1) and Xi(2) are the first and second coordinates of Xi respectively. The solution x(t) = {x1(t), x2(t), ...., xN(t)} and v(t) = {v1(t), v2(t), ...., vN(t)} tend to consensus for Xm(t) and Vm(t) which are defined by

Xm(t)=maxi,j||xi(t)-xj(t)||andVm(t)=maxi,j||vi(t)-vj(t)||, (19)

when finite displacement and velocity convergence happens among agents. Mathematical representation of a finite displacement and velocity convergence can be written as

supt>0Xm(t)<+andlimtVm(t)=0. (20)

The center of mass of the swarm RC can be defined as

RC=1Ni=1Nxi. (21)

To find the position stability of the swarm, the swarm center norm can be taken as ||RC||=RCX2+RCY2, where RCX, RCY are the X and Y coordinates of the swarm center respectively.

For the simulation described in Analysis & simulation, each agent’s position output xi then passes through its identified transfer function Gei(s). If the identified transfer function is Gei=ans2+a1s+..+a01+b1s+...bnsn, then the filtered position x¯i(t) will be,

x¯i(t)=a0xi(t)+...+anxi(t-n)-b1x¯i(t-1)-....-bnx¯i(t-n). (22)

Linear stability

Stability at long range is characterized by the attraction potention (the underlying mathematical theory to show this is included in Appendix section “Long range attraction”). Linear analysis characterises the system’s local stability properties. The long range dynamics (attraction potential) may be rewritten as

ddt[xivi]=[vi-iAa-βvi], (23)

at equilibrium xi˙=0, vi˙=0, and v0 = 0, Aa(x0) = 0 at the equilibrium point (x0, v0). This occurs when Xi = r if ρ < 0 and Xi=r,r±ρ if ρ > 0. The system eigenvalues may be obtained via the Jacobian matrix J, given by

J=[01-2Xi2Aa-β]=[01J21-β], (24)

where J21 can take on three values depending on ρ and equilibrium points Xi. The constant r in this case represents the distance from the origin.

J21={ρ,ifρ<0Xi=rρ,ifρ>0Xi=r-2ρ,ifρ>0Xi=r±ρ. (25)

When J21 = ρ, the eigenvalues will be λ=-β/2±12β2+4ρ and ρ < 0 is sufficient to ensure the eigenvalues have negative real part and the equilibrium is stable. When ρ > 0, at least one positive real eigenvalue exists and the equilibrium is unstable. For J21 = −2ρ, the equilibrium is Xi=r±ρ and the eigenvalues are λ=-β/2±12β2-8ρ. Stability of this equilibrium requires β > 0 and ρ > 0.

The attraction potential can be used as a pitch fork bifurcation equation with ρ as the bifurcation parameter and forms different stable conditions depending on the sign of ρ. This is a supercritical pitchfork bifurcation in which ρ bifurcates into two local equilibria from a single equilibrium. Table 1 shows the linear stability based on the sign of ρ. This stability analysis finds that there are three possible swarm patterns that may be generated using the bifurcation parameter. The theoretical analysis does not consider the effects of delays. Our expectation is that the time delays as a whole stabilize or destabilize the formation of the swarm shape which is shown in the simulation.

Table 1. Equilibrium position and stability.
Coupling ρ Equilibrium Xi 2AaXi2 Stability
< 0 r >0 Stable min
> 0 r <0 Unstable max
r+ρ >0 Stable min
r-ρ >0 Stable min

Results and discussion

An example insect trajectory and its analysis is shown in the experimental section. We have done similar approach to perform system identifications in all other insects. The simulation section demonstrates how changing the bifurcation parameter may produce various swarm configurations. Later, the simulation result demonstrates the impact of identified time delays and transfer functions on the swarm center position.

Experimental

The input stimulus was generated by eight different sinusoidal signals whose frequency range is 0.1–1.7 Hz and a bee’s response is shown in Fig 4. Using the tracking system 3D position data was found. The parameters of the tracking system used in the experiment are shown in Table 2. The bee tracked the light stimulus intermittently. Fig 5a shows stimulus and bee position in 3D and from the X,Y,Z coordinates in Fig 5b it can be seen that the insect tracked the X axis stimulus movement. Tracking sections are shaded in gray. After obtaining the tracking sections of X coordinates we concatenated them and performed frequency domain transformation. For this trajectory, the concatenated trajectories of stimulus D1(t) and bee D2(t), and their magnitude |Di(s)|, dB and phase ∠Di(s) converted by the FFT transform are shown in Fig 5c. Now we want to see the transfer function of the system by considering stimulus D1(s) as input and D2(s) as output. Its transfer function H^FFT(s) stays close to zero over a frequency range of 0–0.1Hz. The transfer function will have unity gain if the insect responds to the stimulus in an ideal situation. Gain exceeding 0dB indicates the insect’s trajectory overshoots the stimulus movement, while gain of 0dB indicates that the bee travels proportionate to the stimuli. The phase component describes the synchronized activity of the insect and the stimuli. The bee’s delay in responding to the target is indicated by a negative phase (lag). Using coherence we can identify tracking performance over a frequency range. The coherence plot of Fig 6a shows that the input and output have a strong linear relationship up to 0.1 Hz (as quantified by γ2 > 0.7) and its error e(s) is small (<5dB) in this range. The number of points in this range, however, is less than 20. To improve the resolution in the region of high coherence, the CZT transform was used. The CZT frequency upper limit, shown in Fig 6b, was set to 0.2 hz to increase resolution in the dominant frequency range. The frequency response function H^CZT(s) from the CZT was then used to find the best matched transfer function model.

Fig 4.

Fig 4

(a). Tracking trajectory of bee (red) and stimulus (blue) and “Tracking” text indicates tracking period, (b). their 3d trajectories.

Table 2. Properties and thresholds taken for the data collection.

δt η γ η α ϵx, ϵy, ϵa η μ η ψ
0.02 0.1 10 0.5 0.1 0.5

Fig 5. (a) 3D plot of bee and stimulus, (b) X, Y, Z coordinates and tracking sections (gray color), (c) concatenated trajectories, magnitude and phase of Di, i = 1, 2.

Fig 5

Fig 6. (a) Magnitude |H^FFT(s)| in dB, phase <H^FFT(s) in °, coherence γ2(s) and tracking error e(s), (b) FFT and CZT magnitude plots of D1(s) and D2(s), (c) magnitude and phase of H^CZT(s).

Fig 6

As seen by the FIT error statistics presented in Table 3, a 2 pole, 1 zero transfer function with 21 ms processing latency (transport delay) was the best fit for this example trajectory. The identified model system transfer function and true transfer function plots for this example are shown in Fig 6c, and measured y(s) and simulated ym(s) frequency domain output are represented in Fig 7a.

Ge(s)=e-.021s-.285s+9.204s2+2.098s+8.098 (26)

When a transfer function model was fit to the frequency range of the experimental frequency responses having high coherence, best-fit model in terms of pure tracking delay and linear approximation was seen in Table 4. When identifying the system dynamics, the uncertainty of the transfer function parameters was also obtained. The pure delay model outperformed the linear delay model and was used in the subsequent analysis. The pole zero histogram of the identified transfer functions shown in Fig 7b indicate the three-pole structure was the dominant structure found (82% of insects); and a majority of insects (57%) showed a transfer function with three poles and two zeros. As with the example insect, the identification was insensitive to the choice of fit criteria (eg, max(FIT), min(MSE), min(FPE)) across the 50 insects measured in this study. The individual delay values varied over the dataset, and the relative frequency of the identified delays is shown in Fig 7c.

Table 3. Model structure and performance for an example insect (best fit highlighted).

Model Order Fit FPE MSE Delay (ms)
2 poles, 1 zero 92.95% 0.1073e−3 9.343e−3 21
3 poles, 2 zeros 60.96% 0.003156 0.002878 15
4 poles, 3 zeros 83.25% 0.6179e−3 0.5297e−2 2

Fig 7. (a) Magnitude and phase of true y(s) and simulated output ym(s), (b) histogram of pole zero combination, (c) delay distribution of 50 insects and normalized Gaussian distribution.

Fig 7

Table 4. Comparison of pure delay and linear approximation.

Delay model Best FIT trials Mean FIT Standard deviation
Pure delay 36 85.45 8.54
Linear approximation 14 82.16 9.28

Analysis & simulation

When coupling strength ρ is used as a pitch fork bifurcation parameter, a visually-interacting swarm is able to produce both stable and unstable modes, as quantified by linear stability analysis. The achievable parameter values and pattern shapes are summarized in Table 5, which shows the effect of varying ρ on resulting formations (the variation in number of agents N was for visualization and did not affect on the structure).

Table 5. Multi-agent behaviors formation.

Pattern N ρ r B r C r β
Ring 30 -4 3 1 0.5 10
Double Ring 50 1.5 3 1 0.5 10
Cluster 50 -4 0 1 0.5 10

The visually-interconnected swarm simulations showed a diversity of achievable patterns consistent with theoretical predictions in which ρ was varied to establish the cluster form. The simulations may be conducted in 2D and 3D, with no theoretical impact. Here, we present 2D simulations for computational and presentation simplicity. Parallel 3D cluster formation is illustrated in the appendix (e.g., Fig 8). In both cases, the existence of stable behavior depends on coupling strength ρ. The choice of ρ = −4 creates a single ring structure. As ρ decreases to 1.5, the ring’s stable equilibrium becomes unstable and it bifurcates into two rings. Simulations conducted with the same initial positions Fig 9(a) for 10 seconds and varying parameter values illustrate this effect, as shown for three cases in S2 Video and (Fig 9b–9d). According to the Eq (20), the simulated agents’ position and velocity meet the consensus conditions after a period of time, as seen in (Fig 9e and 9f).

Fig 8. (a) Initial condition of 50 agents (b) cluster shape formation after 10 seconds.

Fig 8

Fig 9. (a) Initial position of agents, (b) cluster shape, (c) ring shape, (d) double ring shape, (e) and (f) consensus of position and velocity for cluster.

Fig 9

Effect of identified delays

We investigated the effect of delays on the swarm center. The more naturalistic cluster shape was used to evaluate the swarm’s center of mass (barycenter) position stability under varying interaction delays. The simulation was run under different positive interaction delays based on a Gaussian distribution N(τ>0|μ,σ), which is defined as N(τ>0|μ,σ)=1σ2πe-12(τ-μσ)2, where mean μ and standard deviation σ were varied. Plotting the mean μ and standard deviation σ illustrates two distinct stable and unstable areas. As illustrated in Fig 10a, the black points represent the unstable behavior and the green points are for the stable behavior. A third order polynomial was sufficient to describe the boundary between the stable and unstable regions.

Fig 10. (a) Gaussian stability area for different mean and standard deviation (gray color indicates stable area, green and black points represent stable and unstable regions respectively), (b) experimental delays show unstable behavior, (c) norm of swarm center ||Rc|| for different cases.

Fig 10

In this simulation, interaction delays for each participant in a visually interconnected swarm is assigned a delay randomly from the measured distribution. Because the measured delay histogram approximates a normalized Gaussian distribution with mean μ = 22 and standard deviation σ = 40 ms located in the unstable region of Fig 10a, our analysis indicates the simulation using measured delays will have an unstable center of mass. We also wanted to simulate using the actual experimental delays. Fig 10b shows the simulation result using the experimental measured delays for 10 seconds. In Fig 10c, the norm of swarm centers ||Rc|| are shown for all three cases: no delay, Gaussian delays in stable region, and experimental delays. The ||Rc|| for measured delays shows position instability, while the delay free case and delays within stable area of Fig 10a show position stability of ||Rc||.

Effect of both identified delays and transfer functions

We also conducted a simulation including both the identified individual transfer functions as well as the delays, which shows cluster shape formation in the stable region shown in Fig 11. The inclusion of individual agent transfer functions changes the location of the swarm center rather than the overall shape of the swarm. Finally we applied the identified transfer functions and delay variation and its swarm center position is shown in Fig 10c.

Fig 11. (a) Initial condition of 20 agents, (b) cluster shape with measured delays, (c) cluster shape with both identified transfer functions and delays, (d) swarm center position.

Fig 11

Conclusion

In this study, individual honeybees tracked a visual light stimulus and the visuomotor delay in their closed loop tracking was measured. We developed a real-time camera-based tracking system called VISIONS that track honeybee 3D position and induced them to follow a moving light target. A system identification technique was applied to identify the closed loop tracking dynamics between light stimulus motion and insect body motion, and quantify the delay between the stimulus and animal trajectories, separating the effects of open loop plant (locomotion) from visuomotor feedback dynamics. The measured honeybee sensorimotor delays were used to find a delay distribution across population, showing that insect visual sensorimotor delays in a tracking task are heterogeneous across population.

To understand the implications of the measured delays on visual communication and identified dynamic systems, we then integrated the measured delays and dynamic systems into a visually interacting swarm model. Analysis on this model indicates the range of achievable swarm patterns (cluster, ring, double-ring) and conditions needed for center of mass’s position stability of each mode, and simulation illustrates these achievable behaviors and stability regions for both theoretical and measured delays. The analysis and simulation indicate that while the processing delays measured in solitary conditions support three relative shapes, these delays lie in a region associated with an unstable center of mass position and are thus sufficient to support coordinated relative motion but not center of mass position stabilization. This finding suggests that visually interconnected peer insects may be able to to achieve relative configurations but that the measured visual interconnection structure does not support stabilizing the swarm’s overall center of mass position. An important distinction is that this study considers conspecific peers and not the effect of other visual targets or stimulus, which may play a role in the group’s position. In the absence of external targets or a form of delay modulation (compensation), this analysis and lack of barycenter position stiffness suggests that swarm center of mass position may drift, an important result to completing swarm theory descriptions and informing experiments that investigate solitary and swarm motions in flying insects.

Appendix

This appendix section includes details of kinematic filtering, long range attraction, and an example of 3D simulation.

Kinematic filtering

Position pk and velocity vk at time k of each agent are

pk=pk-1+vk-1δt+12ak-1(δt)2,k=1,2,3... (27)
vk=vk-1+ak-1(δt), (28)

where δt and ak are the time step and acceleration respectively. A kinematic model is described as

xk=[pkvk]=[1δt01][pk-1vk-1]+[(δt)22δt]ak. (29)

We applied this filter to image coordinates expressed in 2D image frame coordinates. Let px and py represent the positions, vx and vy represent the velocity and ax and ay indicate the acceleration in the horizontal and vertical directions of the image frames. Overall, the model may be expressed as

xk=[pkxpkyvkxvky]=A[pk-1xpk-1yvk-1xvk-1y]+B[ak-1xak-1y];A=[10δt0010δt00100001],B=[(δt)2200(δt)22δt00δt] (30)
xk=Axk-1+Buk-1;xk-1=[pk-1xpk-1yvk-1xvk-1y],uk-1=[ak-1xak-1y] (31)
y(t)=Cx(t);C=[10000100], (32)

where A, B and C are state, input and output matrices respectively. Co-variance matrices of process noise Ex and measurement noise Ez are considered statistically by Gaussian noise with normal probability distribution. The process noise covariance matrix Ex can be found from the standard deviation of position and velocity. The standard deviation of position in X and Y direction (ϵx, ϵy) can be obtained by the standard deviation of acceleration ϵa multiplied by (δt)22 and the standard deviation of velocity (ϵvx, ϵvy) can be obtained by standard deviation of acceleration ϵa multiplied by δt. Ex and Ez are illustrated as

Ex=[ϵx20ϵxϵvx00ϵy20ϵyϵvyϵvxϵx0ϵvx200ϵvyϵy0ϵvy2]=[(δt)440(δt)3200(δt)440(δt)32(δt)320(δt)200(δt)320(δt)2]ϵa2, (33)
Ez=[ϵx200ϵy2]. (34)

The prediction matrix P(t) and integrated x^-(t) are applied as

Pk-=APk-1+AT+Ex, (35)
x^k-=Ax^k-1++Buk-1. (36)

In the correction step, the Kalman gain K is obtained as

Kk=Pk-CT(CPk-CT+Ez)-1. (37)

Finally, we update the P+(t) and x^+(t) by

Pk+=(I-KkC)Pk-, (38)
x^k+=x^k-+Kk(yk-Cx^k-). (39)

Long range attraction

At long distance the repulsive potential have negligible effect on the swarm model. The distance between every agent i to other agent j is taken by U = |xi(t) − xj(tτij)|. From Eq (14) we can write

mdvidt=-dAadU-dArdU-βvi, (40)
mVdvidU=-dAadU-BrCre-UCr-βvi. (41)

Let S=Ur, Eq (41) becomes

1rmVdvidS=-dAar.dS+BrCre-rCrS-βvi. (42)

At long distance r > >Cr, hence Drr0, BrCre-rCrS is

limCrr0BrCre-SCrr=0. (43)

Thus at long distance the repulsive force vanishes, and the attraction potential characterizes long range stability analysis.

3D simulation

3D Cartesian coordinates in Eq 18 must be considered in order to simulate the swarm model in three dimensions. Here, a 3D simulation of 50 agents is illustrated using the parameters ρ = −4, r = 0, Br = 1, Cr = .5, β = 10, and random initial conditions. This cluster swarm formation shows that the swarm model works in both 2D and 3D environments.

Supporting information

S1 Video. Video of tracking example.

Intermittent tracking trajectory labeled in yellow text.

(MP4)

S2 Video. Video of pattern shape formation.

Cluster shape, ring, double ring by changing bifurcation parameter.

(MP4)

Abbreviations

Aa(xij, τij)

Attractive potential

Ar(xij, Br, Cr)

Repulsive potential

B r

Amplitude of the repulsive potential

C r

Applied distance of repulsive potential

d

Number of estimated parameters

D 1

Stimulus trajectory

D 2

Insect trajectory

e(s)

Tracking error

e(t, θ)

Prediction error

E t

Background of the current frame

FIT

Final prediction error

F t

Current frame

G(s)

Transfer function

Ge(s)

Estimated transfer function

I

Magnitude of movement

J

Jacobian matrix

K

Foreground of the current frame

M(s, τi)

Delay model

MSE

Mean square error

N

Number of agents

n λ

Coefficient of inhibition

n α

Threshold for segmentation

n γ

Tracking threshold

n μ

Background weight

n ψ

Tolerance of error of the re-projected points

n a

Number of poles in the transfer function

n b

Number of zeros in the transfer function

n h

Number of image pixels in horizontal direction

n v

Number of image pixels in vertical direction

P

Calibration matrix of camera

R C

Center of mass of the swarm

S

Tracking section

Sx(s)

Power spectral density of signal x

Sxy(s)

Cross power spectral density of signal x and y

v i

Velocity of the swarm agent

V m

Velocity convergent

w(t)

White noise

X

X axis of the world frame

x i

Position of the swarm agent

X i

Sum of distance from agent i to all other agent j

x ij

Inter agent distance between agent i to agent j

X m

Finite displacement

Y

Y axis of the world frame

y m

Model predicted output

N

Gaussian distribution

H^(s)

Measured frequency domain data

x¯i

Filtered position of agent

Δ(T)(m)

Absolute difference between two point pairs

γ2(s)

Coherence signal

δt

Sampling time interval

θ

Estimated transfer function parameters

ρ

Coupling strength

τ ij

Time delay from agent i to j

φ

Regression matrix

ϵ a

Standard deviation of acceleration

ϵ x

Standard deviation of position in horizontal axis

ϵ y

Standard deviation of position in vertical axis

Data Availability

All trajectories and stimulus files are available from the figshare database (https://doi.org/10.6084/m9.figshare.19493642.v1; https://doi.org/10.6084/m9.figshare.19493597.v1).

Funding Statement

Faruque, Office of Naval Research, N0014-19-1-2216, www.onr.gov The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

References

  • 1. Couzin ID, Krause J, James R, Ruxton GD, Franks NR. Collective Memory and Spatial Sorting in Animal Groups. Journal of Theoretical Biology. 2002;218(1):1–11. doi: 10.1006/jtbi.2002.3065 [DOI] [PubMed] [Google Scholar]
  • 2. Krause J, Ruxton GD, Krause S. Swarm intelligence in animals and humans. Trends in Ecology & Evolution. 2010;25(1):28–34. doi: 10.1016/j.tree.2009.06.016 [DOI] [PubMed] [Google Scholar]
  • 3. Kelley DH, Ouellette NT. Emergent dynamics of laboratory insect swarms. Scientific Reports. 2013;3(1):1073. doi: 10.1038/srep01073 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4. Robie AA, Straw AD, Dickinson MH. Object preference by walking fruit flies, Drosophila melanogaster, is mediated by vision and graviperception. The Journal of experimental biology. 2010;213(Pt 14):2494–2506. doi: 10.1242/jeb.041749 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5. Anderson D, Perona P. Toward a Science of Computational Ethology. Neuron. 2014;84(1):18–31. doi: 10.1016/j.neuron.2014.09.005 [DOI] [PubMed] [Google Scholar]
  • 6. Mönck HJ, Jörg A, von Falkenhausen T, Tanke J, Wild B, Dormagen D, et al. BioTracker: An Open-Source Computer Vision Framework for Visual Animal Tracking. CoRR. 2018;abs/1803.07985. [Google Scholar]
  • 7. Topaz CM, Bertozzi AL. Swarming Patterns in a Two-Dimensional Kinematic Model for Biological Groups. SIAM Journal on Applied Mathematics. 2004;65(1):152–174. doi: 10.1137/S0036139903437424 [DOI] [Google Scholar]
  • 8. Usherwood J, Stavrou M, Lowe J, Roskilly K, Wilson A. Flying in a flock comes at a cost in pigeons. Nature. 2011;474:494–7. doi: 10.1038/nature10164 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9. Baird E, Srinivasan MV, Zhang S, Cowling A. Visual control of flight speed in honeybees. Journal of Experimental Biology. 2005;208(20):3895–3905. doi: 10.1242/jeb.01818 [DOI] [PubMed] [Google Scholar]
  • 10. Fry SN, Rohrseitz N, Straw AD, Dickinson MH. Visual control of flight speed in Drosophila melanogaster. Journal of Experimental Biology. 2009;212(8):1120–1130. doi: 10.1242/jeb.020768 [DOI] [PubMed] [Google Scholar]
  • 11. Farina WM, Varjú D, Zhou Y. The regulation of distance to dummy flowers during hovering flight in the hawk moth Macroglossum stellatarum. Journal of Comparative Physiology A. 2004;174:239–247. [Google Scholar]
  • 12. Fry SN, Rohrseitz N, Straw AD, Dickinson MH. TrackFly: Virtual reality for a behavioral system analysis in free-flying fruit flies. Journal of Neuroscience Methods. 2008;171(1):110–117. doi: 10.1016/j.jneumeth.2008.02.016 [DOI] [PubMed] [Google Scholar]
  • 13. Ristroph L, Bergou AJ, Ristroph G, Coumes K, Berman GJ, Guckenheimer J, et al. Discovering the flight autostabilizer of fruit flies by inducing aerial stumbles. Proceedings of the National Academy of Sciences. 2010;107(11):4820–4824. doi: 10.1073/pnas.1000615107 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14. Vance JT, Faruque I, Humbert JS. Kinematic strategies for mitigating gust perturbations in insects. Bioinspiration and Biomimetics. 2013;8(1):016004. doi: 10.1088/1748-3182/8/1/016004 [DOI] [PubMed] [Google Scholar]
  • 15. Faruque IA, Humbert JS. Wing motion transformation to evaluate aerodynamic coupling in flapping wing flight. Journal of Theoretical Biology. 2014;363:198–204. doi: 10.1016/j.jtbi.2014.07.026 [DOI] [PubMed] [Google Scholar]
  • 16. Theobald JC, Coates MM, Wcislo WT, Warrant EJ. Flight performance in night-flying sweat bees suffers at low light levels. Journal of Experimental Biology. 2007;210(22):4034–4042. doi: 10.1242/jeb.003756 [DOI] [PubMed] [Google Scholar]
  • 17. Reber T, Vähäkainu A, Baird E, Weckström M, Warrant E, Dacke M. Effect of light intensity on flight control and temporal properties of photoreceptors in bumblebees. J Exp Biol. 2015;218(Pt 9):1339–1346. [DOI] [PubMed] [Google Scholar]
  • 18. Baird E, Fernandez DC, Wcislo WT, Warrant EJ. Flight control and landing precision in the nocturnal bee Megalopta is robust to large changes in light intensity. Frontiers in Physiology. 2015;6. doi: 10.3389/fphys.2015.00305 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19. Sprayberry JDH, Daniel TL. Flower tracking in hawkmoths: behavior and energetics. Journal of Experimental Biology. 2007;210(1):37–45. doi: 10.1242/jeb.02616 [DOI] [PubMed] [Google Scholar]
  • 20. Matthews M, Sponberg S. Hawkmoth flight in the unsteady wakes of flowers. Journal of Experimental Biology. 2018;221(22). [DOI] [PubMed] [Google Scholar]
  • 21. Sponberg S, Dyhr JP, Hall RW, Daniel TL. Luminance-dependent visual processing enables moth flight in low light. Science. 2015;348(6240):1245–1248. doi: 10.1126/science.aaa3042 [DOI] [PubMed] [Google Scholar]
  • 22. Stöckl AL, Kihlström K, Chandler S, Sponberg S. Comparative system identification of flower tracking performance in three hawkmoth species reveals adaptations for dim light vision. Philos Trans R Soc Lond B Biol Sci. 2017;372 (1717). doi: 10.1098/rstb.2016.0078 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23. Jain P, Singh OP, Butail S. Dynamics of mosquito swarms over a moving marker; 2020. [Google Scholar]
  • 24. Fabian ST, Sumner ME, Wardill TJ, Gonzalez-Bellido PT. Avoiding obstacles while intercepting a moving target: a miniature fly’s solution. Journal of Experimental Biology. 2022;225(4). doi: 10.1242/jeb.243568 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25. Noldus LP, Spink AJ, Tegelenbosch RA. EthoVision: a versatile video tracking system for automation of behavioral experiments. Behav Res Methods Instrum Comput. 2001;33(3):398–414. doi: 10.3758/BF03195394 [DOI] [PubMed] [Google Scholar]
  • 26. Fry SN, Müller P, Baumann HJ, Straw AD, Bichsel M, Robert D. Context-dependent stimulus presentation to freely moving animals in 3D. Journal of Neuroscience Methods. 2004;135(1):149–157. doi: 10.1016/j.jneumeth.2003.12.012 [DOI] [PubMed] [Google Scholar]
  • 27. Straw AD, Branson K, Neumann TR, Dickinson MH. Multi-camera Realtime 3D Tracking of Multiple Flying Animals; 2010. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28. Attanasi A, Cavagna A, Del Castello L, Giardina I, Grigera TS, Jelić A, et al. Information transfer and behavioural inertia in starling flocks. Nature Physics. 2014;10(9):691–696. doi: 10.1038/nphys3035 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29. Pérez-Escudero A, Vicente-Page J, Hinz RC, Arganda S, de Polavieja GG. idTracker: tracking individuals in a group by automatic identification of unmarked animals. Nat Methods. 2014;11(7):743–748. doi: 10.1038/nmeth.2994 [DOI] [PubMed] [Google Scholar]
  • 30. Chen BH, Huang SC. An Advanced Moving Object Detection Algorithm for Automatic Traffic Monitoring in Real-World Limited Bandwidth Networks. IEEE Transactions on Multimedia. 2014;16(3):837–847. doi: 10.1109/TMM.2014.2298377 [DOI] [Google Scholar]
  • 31. Rodriguez A, Zhang H, Klaminder J, Brodin T, Andersson PL, Andersson M. ToxTrac: A fast and robust software for tracking organisms. Methods in Ecology and Evolution. 2018;9(3):460–464. doi: 10.1111/2041-210X.12874 [DOI] [Google Scholar]
  • 32. Mersch DP, Crespi A, Keller L. Tracking Individuals Shows Spatial Fidelity Is a Key Regulator of Ant Social Organization. Science. 2013;340(6136):1090–1093. doi: 10.1126/science.1234316 [DOI] [PubMed] [Google Scholar]
  • 33. Sridhar VH, Roche DG, Gingins S. Tracktor: Image-based automated tracking of animal movement and behaviour. Methods in Ecology and Evolution. 2019;10(6):815–820. doi: 10.1111/2041-210X.13166 [DOI] [Google Scholar]
  • 34. Dell AI, Bender JA, Branson K, Couzin ID, de Polavieja GG, Noldus LPJJ, et al. Automated image-based tracking and its application in ecology. Trends in Ecology & Evolution. 2014;29(7):417–428. doi: 10.1016/j.tree.2014.05.004 [DOI] [PubMed] [Google Scholar]
  • 35. Gomez-Marin A, Paton JJ, Kampff AR, Costa RM, Mainen ZF. Big behavioral data: psychology, ethology and the foundations of neuroscience. Nat Neurosci. 2014;17(11):1455–1462. doi: 10.1038/nn.3812 [DOI] [PubMed] [Google Scholar]
  • 36. Swartz SM. Advances in animal flight studies. Canadian Journal of Zoology. 2015;93(12):v–vi. doi: 10.1139/cjz-2015-0117 [DOI] [Google Scholar]
  • 37. Koehler C, Liang Z, Gaston Z, Wan H, Dong H. 3D reconstruction and analysis of wing deformation in free-flying dragonflies. Journal of Experimental Biology. 2012;215(17):3018–3027. doi: 10.1242/jeb.069005 [DOI] [PubMed] [Google Scholar]
  • 38. Walker SM, Thomas ALR, Taylor GK. Photogrammetric reconstruction of high-resolution surface topographies and deformable wing kinematics of tethered locusts and free-flying hoverflies. Journal of The Royal Society Interface. 2009;6(33):351–366. doi: 10.1098/rsif.2008.0245 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39. Bomphrey RJ, Walker SM, Taylor GK. The Typical Flight Performance of Blowflies: Measuring the Normal Performance Envelope of Calliphora vicina Using a Novel Corner-Cube Arena. PLOS ONE. 2009;4(11):1–10. doi: 10.1371/journal.pone.0007852 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40. Bomphrey RJ, Nakata T, Henningsson P, Lin HT. Flight of the dragonflies and damselflies. Philosophical Transactions of the Royal Society B: Biological Sciences. 2016;371(1704):20150389. doi: 10.1098/rstb.2015.0389 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41. Ahmed I, Faruque IA. High Speed Visual Insect Swarm Tracker (Hi-VISTA) used to identify the effects of confinement on individual insect flight. bioRxiv. 2022. doi: 10.1101/2021.12.31.474665 [DOI] [PubMed] [Google Scholar]
  • 42. Guezouli L, Belhani H. Automatic Detection of Moving Objects in Video Surveillance. In: 2016 Global Summit on Computer Information Technology (GSCIT); 2016. p. 70–75. doi: 10.1109/GSCIT.2016.14 [DOI] [Google Scholar]
  • 43. Kalman RE. A New Approach to Linear Filtering and Prediction Problems. Journal of Basic Engineering. 1960;82(1):35–45. doi: 10.1115/1.3662552 [DOI] [Google Scholar]
  • 44.Li Q, Li R, Ji K, Dai W. Kalman Filter and Its Application. In: 2015 8th International Conference on Intelligent Networks and Intelligent Systems (ICINIS); 2015. p. 74–77.
  • 45.Ljung L. System Identification: Theory for the User. Prentice Hall information and system sciences series. Prentice Hall PTR; 1999. Available from: https://books.google.com/books?id=nHFoQgAACAAJ.
  • 46.Klein V, Morelli EA. Aircraft System Identification: Theory and Practice. AIAA education series. American Institute of Aeronautics and Astronautics; 2006. Available from: https://books.google.com/books?id=SC90QgAACAAJ.
  • 47. Klein V. Estimation of aircraft aerodynamic parameters from flight data. Progress in Aerospace Sciences. 1989;26(1):1–77. doi: 10.1016/0376-0421(89)90002-X [DOI] [Google Scholar]
  • 48. Morelli EA. Real-Time Parameter Estimation in the Frequency Domain. Journal of Guidance, Control, and Dynamics. 2000;23(5):812–818. doi: 10.2514/2.4642 [DOI] [Google Scholar]
  • 49. McKelvey T. Frequency Domain Identification. IFAC Proceedings Volumes. 2000;33(15):7–18. doi: 10.1016/S1474-6670(17)39719-7 [DOI] [Google Scholar]
  • 50. Tischler M. System Identification Methods for Aircraft Flight Control Development and Validation. Advances in Aircraft Flight Control. 1997;. [Google Scholar]
  • 51. Egelhaaf M, Kern R. Vision in flying insects. Curr Opin Neurobiol. 2002;12(6):699–706. doi: 10.1016/S0959-4388(02)00390-2 [DOI] [PubMed] [Google Scholar]
  • 52. Bender JA, Dickinson MH. Visual stimulation of saccades in magnetically tethered Drosophila. Journal of Experimental Biology. 2006;209(16):3170–3182. doi: 10.1242/jeb.02369 [DOI] [PubMed] [Google Scholar]
  • 53. Beyeler A, Zufferey JC, Floreano D. Vision-based control of near-obstacle flight. Autonomous Robots. 2009;27(3):201. doi: 10.1007/s10514-009-9139-6 [DOI] [Google Scholar]
  • 54. Srinivasan MV. Honeybees as a model for the study of visually guided flight, navigation, and biologically inspired robotics. Physiol Rev. 2011;91(2):413–460. doi: 10.1152/physrev.00005.2010 [DOI] [PubMed] [Google Scholar]
  • 55. Windsor SP, Bomphrey RJ, Taylor GK. Vision-based flight control in the hawkmoth <i>Hyles lineata</i>. Journal of The Royal Society Interface. 2014;11(91):20130921. doi: 10.1098/rsif.2013.0921 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56. Faruque IA, Muijres FT, Macfarlane KM, Kehlenbeck A, Humbert JS. Identification of optimal feedback control rules from micro-quadrotor and insect flight trajectories. Biological Cybernetics. 2018;112(3):165–179. doi: 10.1007/s00422-017-0742-x [DOI] [PubMed] [Google Scholar]
  • 57. Billah MA, Faruque IA. Bioinspired Visuomotor Feedback in a Multiagent Group/Swarm Context. IEEE Transactions on Robotics. 2021;37(2):603–614. doi: 10.1109/TRO.2020.3033703 [DOI] [Google Scholar]
  • 58. Okubo A. Dynamical aspects of animal grouping: swarms, schools, flocks, and herds. Advances in biophysics. 1986;22:1–94. doi: 10.1016/0065-227X(86)90003-1 [DOI] [PubMed] [Google Scholar]
  • 59.Reynolds CW. Flocks, herds and schools: A distributed behavioral model. In: Proceedings of the 14th annual conference on Computer graphics and interactive techniques; 1987. p. 25–34.
  • 60. Ling H, Mclvor GE, van der Vaart K, Vaughan RT, Thornton A, Ouellette NT. Costs and benefits of social relationships in the collective motion of bird flocks. Nature ecology & evolution. 2019;3(6):943–948. doi: 10.1038/s41559-019-0891-5 [DOI] [PubMed] [Google Scholar]
  • 61.Khatib O. Real-time obstacle avoidance for manipulators and mobile robots. In: Proceedings. 1985 IEEE International Conference on Robotics and Automation. vol. 2; 1985. p. 500–505.
  • 62. Rimon E, Koditschek DE. Exact robot navigation using artificial potential functions. IEEE Transactions on Robotics and Automation. 1992;8(5):501–518. doi: 10.1109/70.163777 [DOI] [Google Scholar]
  • 63. Gazi V. On Lagrangian dynamics based modeling of swarm behavior. Physica D Nonlinear Phenomena. 2013;260:159–175. doi: 10.1016/j.physd.2013.06.010 [DOI] [Google Scholar]
  • 64. Vicsek T, Czirók A, Ben-Jacob E, Cohen I, Shochet O. Novel Type of Phase Transition in a System of Self-Driven Particles. Phys Rev Lett. 1995;75:1226–1229. doi: 10.1103/PhysRevLett.75.1226 [DOI] [PubMed] [Google Scholar]
  • 65. Cucker F, Smale S. Emergent Behavior in Flocks. IEEE Transactions on Automatic Control. 2007;52(5):852–862. doi: 10.1109/TAC.2007.895842 [DOI] [Google Scholar]
  • 66. Liao X, Wu Z, Yu J. Stability switches and bifurcation analysis of a neural network with continuously delay. IEEE Transactions on Systems, Man, and Cybernetics—Part A: Systems and Humans. 1999;29(6):692–696. doi: 10.1109/3468.798076 [DOI] [Google Scholar]
  • 67. Guo S, Li J. Bifurcation theory of functional differential equations: a survey. Journal of Applied Analysis and Computation. 2015;5:751–766. doi: 10.11948/2015057 [DOI] [Google Scholar]
  • 68.Bennet D, McInnes CR. Spacecraft formation flying using bifurcating potential fields. In: 59th International Astronautical Congress. Glasgow, Scotland; 2008.Available from: https://strathprints.strath.ac.uk/7331/.
  • 69. Bennet DJ, McInnes CR. Distributed control of multi-robot systems using bifurcating potential fields. Robotics and Autonomous Systems. 2010;58(3):256–264. doi: 10.1016/j.robot.2009.08.004 [DOI] [Google Scholar]
  • 70. Lindley B, Mier-Y-Teran-Romero L, Schwartz IB. Randomly Distributed Delayed Communication and Coherent Swarm Patterns. IEEE Int Conf Robot Autom. 2012;. doi: 10.1109/ICRA.2012.6224993 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 71. Pignotti C, Trélat E. Convergence to consensus of the general finite-dimensional Cucker-Smale model with time-varying delays; 2017. [Google Scholar]
  • 72. Choi Y, Li Z. Emergent behavior of Cucker–Smale flocking particles with heterogeneous time delays. Applied Mathematics Letters. 2018;86:49–56. doi: 10.1016/j.aml.2018.06.018 [DOI] [Google Scholar]
  • 73. Himakalasa A, Wongkaew S. Stability analysis of swarming model with time delays. Advances in Difference Equations. 2021;2021(1):217. doi: 10.1186/s13662-021-03379-9 [DOI] [Google Scholar]
  • 74. Szwaykowska K, Romero LMyT, Schwartz IB. Collective Motions of Heterogeneous Swarms. IEEE Transactions on Automation Science and Engineering. 2015;12(3):810–818. doi: 10.1109/TASE.2015.2403253 [DOI] [Google Scholar]
  • 75. Hindes J, Edwards V, Kamimoto S, Triandaf I, Schwartz IB. Unstable modes and bistability in delay-coupled swarms. Phys Rev E. 2020;101:042202. doi: 10.1103/PhysRevE.101.042202 [DOI] [PubMed] [Google Scholar]
  • 76. Svoboda T, Martinec D, Pajdla T. A Convenient Multicamera Self-Calibration for Virtual Environments. Presence. 2005;14(4):407–422. doi: 10.1162/105474605774785325 [DOI] [Google Scholar]
  • 77. Rabiner L, Schafer R, Rader C. The chirp z-transform algorithm. IEEE Transactions on Audio and Electroacoustics. 1969;17(2):86–92. doi: 10.1109/TAU.1969.1162034 [DOI] [Google Scholar]

Decision Letter 0

Antony R Humphries

1 Aug 2022

PONE-D-22-10206Experimental identification of individual insect visual tracking delays in free flight and their effects on visual swarm patternsPLOS ONE

Dear Dr. Islam,

Thank you for submitting your manuscript to PLOS ONE. After careful consideration, we feel that it has merit but does not fully meet PLOS ONE’s publication criteria as it currently stands. Therefore, we invite you to submit a revised version of the manuscript that addresses the points raised during the review process. Both reviewers recommended major revision of the manuscript, and gave detailed comments on the points to address in the revision. Please address all of their comments in your revision of this work.

Please submit your revised manuscript by Sep 15 2022 11:59PM. If you will need more time than this to complete your revisions, please reply to this message or contact the journal office at plosone@plos.org. When you're ready to submit your revision, log on to https://www.editorialmanager.com/pone/ and select the 'Submissions Needing Revision' folder to locate your manuscript file.

Please include the following items when submitting your revised manuscript:

  • A rebuttal letter that responds to each point raised by the academic editor and reviewer(s). You should upload this letter as a separate file labeled 'Response to Reviewers'.

  • A marked-up copy of your manuscript that highlights changes made to the original version. You should upload this as a separate file labeled 'Revised Manuscript with Track Changes'.

  • An unmarked version of your revised paper without tracked changes. You should upload this as a separate file labeled 'Manuscript'.

If you would like to make changes to your financial disclosure, please include your updated statement in your cover letter. Guidelines for resubmitting your figure files are available below the reviewer comments at the end of this letter.

If applicable, we recommend that you deposit your laboratory protocols in protocols.io to enhance the reproducibility of your results. Protocols.io assigns your protocol its own identifier (DOI) so that it can be cited independently in the future. For instructions see: https://journals.plos.org/plosone/s/submission-guidelines#loc-laboratory-protocols. Additionally, PLOS ONE offers an option for publishing peer-reviewed Lab Protocol articles, which describe protocols hosted on protocols.io. Read more information on sharing protocols at https://plos.org/protocols?utm_medium=editorial-email&utm_source=authorletters&utm_campaign=protocols.

We look forward to receiving your revised manuscript.

Kind regards,

Antony R Humphries, Ph.D.

Academic Editor

PLOS ONE

Journal Requirements:

When submitting your revision, we need you to address these additional requirements.

1. Please ensure that your manuscript meets PLOS ONE's style requirements, including those for file naming. The PLOS ONE style templates can be found at 

https://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf and 

https://journals.plos.org/plosone/s/file?id=ba62/PLOSOne_formatting_sample_title_authors_affiliations.pdf

2. Thank you for stating the following in the Acknowledgments Section of your manuscript: 

This work was supported in part by ONR Young Investigator Award N00014-19-1-2216.

However, funding information should not appear in the Acknowledgments section or other areas of your manuscript. We will only publish funding information present in the Funding Statement section of the online submission form. 

Please remove any funding-related text from the manuscript and let us know how you would like to update your Funding Statement. Currently, your Funding Statement reads as follows: 

Faruque, Office of Naval Research, N0014-19-1-2216, www.onr.gov

The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

Please include your amended statements within your cover letter; we will change the online submission form on your behalf.

[Note: HTML markup is below. Please do not edit.]

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #1: Partly

Reviewer #2: Partly

**********

2. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: Yes

Reviewer #2: Yes

**********

3. Have the authors made all data underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: Yes

**********

4. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: Yes

Reviewer #2: Yes

**********

5. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: The topic of the manuscript is of scientific interest, but the

manuscript requires a major revision in my view.

The authors perform systematic experiments with the aim of identifying

visual/motor control delays of bees when bees track a moving visual

stimulus. The delay is part of a complete linear system identification

of the bee (modelled as a transfer function of a linear dynamical

system). The goal is to use the thus identified delay to determine its

influence on swarming and maneuvers of swarms. So, the authors also

insert these identified delays into a bee swarming model and observe

that the resulting delays would destabilize the swarm's configuration.

The current version has a few major problems that should be addressed

in a revision.

Major issues

* It appears that the transfer function is identified in the frequency

domain entirely from frequency components <0.2Hz (so, phenomena on a

time scale of ~5sec or longer). The identified delay is, however,

~40ms (max 100ms). This strikes me as a discrepancy. The errors

measured (3 measures were used, called Fit, FPE, MSE) should be

mapped back into uncertainties of the coefficients in the

identified/fitted transfer function G to demonstrate that the delays

are significantly different from zero (expressed via some

confidence intervals). As the delays are so extremely small, they

would likely be well approximated by a inverse linear expansion of

the exponential function (exp(-s)=1/(1+s)), and could thus be

incorporated into the denominator.

* The connection between the experiments performed to gather data and

the simulations is tenuous. The identified transfer function

for each bee implies a certain (linear) dynamical system (2nd or,

mostly, 3rd order, with delay). But it appears that this linear

model was not used in the model at all except for the delay. It

would also be a stretch to argue whether the delays and transfer

function coefficients measured for an isolated bee (is that

correct?) tracking a light strip can be applied to a bee's dynamics

in a swarm, where it would have to track the various targets

represented by the repulsive and attractive potentials (eqs 24, 25).

A question related to the tenuous connection: why are 2d models used

when the experiment goes to great length to extract a 3d trajectory?

* The description of the data processing steps is exceedingly

difficult to follow. There is a large number of inconsistencies in

notation and there is an unevenness in the level of detail given

(some steps are described in great detail while other, equally

important ones, are jumped over). In my list of minor issues I list

a few of the points where I had difficulty following. The list is

not complete, though, such that the authors should revise this

section aiming for more clarity.

Minor issues:

* p5,eq1: is T_j(m) in R^3 or is this a number? Further, Delta T

appears to be a function of a single integer below eq1, but of g+1

integers in eq1. THis makes the definition of S_{g x 2} unclear.

* In eq2 D(i,j) appears on both sides of the equations, so the

equation should be simplified to D(i,j)=E(i,j). I suspect, however,

that the D(i,j) on the left-hand side is the D(i,j) of the next time

step. It would be helpful to include time as an argument because

that would also clarify if in eq3 the updated D(i,j) is used or the

D(i,j) from the previous time step.

After the explicit formulas (2-4) a single sentence "apply Gaussian

blur and morphological closure" skips over much more substantial

transformations.

* Eq7 has several strange features. It appears to be a differential

equation, dot x(t)=Ax(t-1)+Bu(t), with an enormous delay equal to 1

(measured in seconds?). The quantities p_t and v_t are not explained

and the relationship between x and p,v is not defined. I suspect

that eq7 is not a differential equation but a time step of length

delta t. Correspondingly, should the first term be A x(t-delta t)? A

similar correction may have to be applied to eqs (5,6)?

* The term u in eq7 is never defined. I suspect that the Kalman filter

is applied to the model of straight flight where measurement data

corrects the model (in effect providing the acceleration a(t))? I

could not understand the description. If eq7 is not a differential

equation, one may have to use the Kalman filter for discrete time

stepping.

* In eq15 the notation S_3^j is unclear, S_j appears to be a row of a

3x4 matrix, so is a 1x4 (row) vector. How can one take a power of

this vector? The term P_2^j is not defined at all.

* Fig5c seems to suggest that the windows in which the bee is

determined to be tracking are glued together before further data

processing. Is this justified? This could have a large effect on the

delay estimate.

* The equations on p8 contain several undefined terms: G(s) is the

transfer function of what? Later G(s)e^(st au) is mentioned without

specifying what tau is.

The minimisation in eq18 is not clear: what class of G_e is

minimised over and what is tau?

* which norm is used in eq(19)?

* there is no index i in the terms of the sum in eq20.

* Is the quantity e a function of two variables (t,theta) as suggested

in eq(21) or one variable (t) as seen below eq(21)?

* Below eq(27) X_i is is a vector, as established in the sentence. But

then X_i shows up in the denominator defining cos theta. How do we

divide by a vector here?

* In eq(26) a quantity epsilon shows up, while in eq(24) we have rho. Are they the same?

* In eq(29) sup_{t>0} V_m(t)=0 is the same as demanding that V_m(t)=0

for all t>0 (since V_m is non-negative). Do you mean

lim sup_{t\\to\\infty} V_m=0?

* In eqs(31,32) the undefined quantities V and X show up. Are all

these quantities (U,V,X) implicitly having the index i,j?

* It is unclear how the delays are taken care of in the stability

computation in eq(36). They appear to have taken into account in the

final results (as they make a difference in stability). Again, as

the delays are small, the approximation

x(t-tau) ~ x(t) - tau x'(t)

would likely be accurate compared to the experimental uncertainty.

* For the simulation the delays are assumed to have Gaussian

distribution. This does not make sense as it would imply that delays

could be negative. Sigma not much smaller than mu.

Reviewer #2: The authors measure and analyze the effects of time delays in swarms of insects.

First, they extract a characteristic distribution of delays from individual honeybee trajectories that respond to an applied visual stimulus. Then, they input the measured distribution into a swarming model which shows a variety of collective behaviors depending on coupling and distribution parameters, etc. Overall, the work addresses an important problem (the need for quantifying delays in real autonomous mobile systems and the inclusion of such effects in theoretical swarming models. The experimental portion, in particular, is very interesting and convincing. But, the manuscript needs to be significantly rewritten. Very many sections are unclear and easy to misinterpret, especially in terms of analysis. Specific comments and questions are stated below, which should be addressed before publication:

1. In the section “Kinematic tracking”, the control input u(t) is not defined. It seems to be the acceleration, but this is not explained.

2. Equation (7) is a discrete-time system with time-step $\\delta t$, yes? If so, the time-derivative over-dot is probably a typo? Also, only two spatial dimensions are assumed, why not three? The latter fact is explained later, but commentary should be added in this section to orient the reader.

3. Since you describe noise, Equations (6) and (8) should presumably have additive Gaussian white noise terms for example, per the canonical formulation of Kalman filtering.

4. Where does the state-space noise come from in Equation (9)? There needs to be a noise amplitude somewhere, like in E_{z}.

5. The notation in Equation (11) is confusing. Shouldn't the aprioir estimate at the current time depend on x^{+}(t-\\delta t): the aposteriori estimate at the past time...? Overall the mix of discrete and continuous in this section is unclear.

6. There is a parentheses missing in Equation (13).

7. In Equation (16), the notation is confusing. Is "i" imaginary or "j"?

8. Just above Equation (17), is the assumption of linearity (between visual stimulus and trajectory-response) a good approximation? If so, how was that quantified?

9. Equation (21): This is a general formula. It would be more interpretable, if you used the actual variables in the current fitting/estimation problem.

10. There is no self-propulsion in Equations (22-23). Hence, if no neighbors are present, then the agents *stop* due to friction. Is that right? Without some tendency to keep moving, the “swarming” system seems like an inert, equilibrium system, not an active matter system relevant for swarming…Please comment.

11. What is x_{ij}....? It is defined implicitly, though ambiguously, in Equation (25).

12. In Equation (24), shouldn't each quantity within the "sums" be squared, individually? Ditto with the fourth power. Typically, potential functions (at least in physically-inspired models) are pairwise. This phrasing seems to generate cross terms, which is a bit strange.

13. In the section "Long range attraction,” the derivation seems like an unnecessary use of formalism. The repulsive potential is exponentially damped, whereas attraction (for example) is infinite range-- the polynomial functions grow to infinity as the distance does. I would just state the fact that you are looking in the regime of long-range attraction where pairwise distances are >> Dr.

14. X_{i} being constant means that agent "i" is a constant distance from the swarm center of mass, yes? If so, add some commentary and explanation, etc. near Equation (36).

15. The Jacobain for the full swarm should have N*times the dimension of Equation (36). It seems like you are studying the linear stability with respect to perturbations in each agent (treated separately, as localized perturbations)...Probably, this is the same as a mean-field analysis, which is sometimes accurate and sometimes not. To judge, we need to see comparisons to full-swarm simulations. On that point, see for instance https://link.aps.org/doi/10.1103/PhysRevE.101.042202, which formally analyzes delay effects in self-propelled swarming systems. The authors should consider citing this work since it addresses delay-induced instability in swarms beyond the mean-field analysis that they present, and would give the present work some cover in terms of pointing to more detailed treatment, etc.

16. Where does time delay enter into the picture (in the Linear Stability section)? It is not clear at this point. In fact, time delay will not just change stability of the solutions mentioned, but may change the solutions all together. If this is neglected, fine, but the assumption needs to be stated.

17. The section “Results and Discussion” has almost no commentary. It is disorienting to read. The figures are just plopped down, one after another. Please consider rewriting this section.

18. It seems like time-delay effects were only simulated in the swarming model, not formally analyzed (e.g., in the linear stability calculation). Is that correct? For one, if delay was included in the stability analysis, we should see an infinite dimensional stability spectrum, satisfying a transcendental equation with an infinite number of solutions.

**********

6. PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: No

Reviewer #2: No

**********

[NOTE: If reviewer comments were submitted as an attachment file, they will be attached to this email and accessible via the submission site. Please log into your account, locate the manuscript record, and check for the action link "View Attachments". If this link does not appear, there are no attachment files.]

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, https://pacev2.apexcovantage.com/. PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Registration is free. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email PLOS at figures@plos.org. Please note that Supporting Information files do not need this step.

PLoS One. 2022 Nov 28;17(11):e0278167. doi: 10.1371/journal.pone.0278167.r002

Author response to Decision Letter 0


23 Sep 2022

Response to reviewers

Reviewer 1

Major issues :

R1C1: It appears that the transfer function is identified in the frequency domain entirely from frequency components <0.2Hz (so, phenomena on a time scale of ~5sec or longer). The identified delay is, however, ~40ms (max 100ms). This strikes me as a discrepancy. The errors measured (3 measures were used, called Fit, FPE, MSE) should be mapped back into uncertainties of the coefficients in the identified/fitted transfer function G to demonstrate that the delays are significantly different from zero (expressed via some confidence intervals). As the delays are so extremely small, they would likely be well approximated by a inverse linear expansion of the exponential function (exp(-s)=1/(1+s)), and could thus be incorporated into the denominator.

Author response: Thank you for your observations. We’ll address your three points in turn:

Point 1 (delay observability): We concatenated the tracking sections and the tracking data length in Fig. 5(c) of the revised paper is approximately 22 seconds. Each identification used recorded data exceeding 15 seconds.

A fixed time delay of time tau appearing in a control loop may be represented with a transfer function G(s) = e^(−tau*s), which has a Bode plot with unity gain and decreasing phase, as illustrated in the figure (right). At these low frequencies, the slope of this phase delay is nearly constant, which is helpful in the identification process. While we would love it if the insects had tracked the signals at higher frequencies, we were limited to the behaviors we could reliably induce, and the delay was nonetheless the most well-identified aspect, which is why it became a focus of the paper.

Point 2 (error/uncertainty): Parameter uncertainty analysis is a good idea, and we did find the uncertainty of the identified transfer function in terms of the identified parameter covariances–. For example, the covariance matrix of the identified parameters in the (1 zero, 2 poles, delay) case is showed in Table 1 (in Response to Reviewers file).

Table. 1: Covariance matrix of the identified zero, poles and delay parameters

(The diagonal term in a covariance matrix indicates the variance of each parameter.) We found a box plot of uncertainty variance from the entire data set, which is displayed in Fig. 1

Fig 1. Variance of parameters uncertainty of model structures

where the bottom and top represent the 25th and 75th percentiles, respectively, and the center point is the median. Although we computed and studied these, we do not consider the uncertainties to be of particular interest because the focus of this study is to determine how time delays in the agents affects swarm behaviors. Please see also the response of R1C2.

Point 3 (delay model structure): We considered the delay to be pure tracking delay. The delay term does not change the gain in the transfer function but adds phase proportional to frequency. We appreciate your suggestion to also consider approximating the delay terms by using the linear expansion. We have now added this method to the identification and compared the fit results over all trajectories.

The table (in Response to Reviewers file) shows that most (36) of the trajectories considering pure delay term give the better FIT percentage. The average of FIT percentage is 81.45 %. On the other hand 14 trajectories give better FIT for linear approximation. Having verified this, we are confident that the pure delay model gives the best result and the paper continues to rely on it; however, we have expanded the method to include this additional analysis.

Author action: In the revised version, we have added this comparison in Table. 4, and expanded the system identification section to consider both delay models.

R1C2: The connection between the experiments performed to gather data and the simulations is tenuous. The identified transfer function for each bee implies a certain (linear) dynamical system (2nd or, mostly, 3rd order, with delay). But it appears that this linear model was not used in the model at all except for the delay. It would also be a stretch to argue whether the delays and transfer function coefficients measured for an isolated bee (is that correct?) tracking a light strip can be applied to a bee's dynamics in a swarm, where it would have to track the various targets represented by the repulsive and attractive potentials (eqs 24, 25).

A question related to the tenuous connection: why are 2d models used when the experiment goes to great length to extract a 3d trajectory?

Author response:

Point 1 (identified transfer function): Thank you for the important points you mentioned. Yes, the delays were only used on the swarm model. In our experiment the identified dynamic system is not the primary outcome of the study. One reason for that is that the dynamics may show sensitivity to the tracking threshold; eg, if one considers only sections with perfect tracking, the transfer function in this ideal case would approach gain close to 1. In that case, only the phase delay associated with the visual reaction time remains. To provide robustness to the tracking threshold, the identified delay is the focus of this study. Numerous previous studies focusing on insect tracking data also focus on identifying tracking delays exclusively ([https://royalsocietypublishing.org/doi/10.1098/rstb.2016.0078, https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.882.6246). There is a significant amount of analysis remaining to fully describe the delayed behavior.

However, your suggestion to understand whether the identified dynamics support the same conclusions is helpful, and we followed it to incorporate the identified transfer functions in the simulation. We passed each agent’s integrated position in the identified dynamic system G_e(s). The overall behavior of the swarm remains, with some changes in the swarm center position. Our basic idea was that when multiple bees fly together they have heterogeneous delays (meaning of delays variation). It is difficult to say that the bees follow this swarm model having attractive and repulsive potentials, in fact we have related work showing the astonishing degree to which previously published swarm models fail to predict the recorded trajectories of insect swarms. At this early stage of swarm system identification, optimizing these poorly understood model structures will require a focused effort that has removed the effects of delays. Accordingly, we concentrated on how the measured delays could influence an example of swarm behavior.

Point 2: The swarm dynamic model may be readily posed in both 2d and 3d cases with no meaningful difference. As we solved delay differential equations using Matlab dde23 functions for many agents, the simulation time to complete the scope of this study in 3D exceeds workstation capabilities and would have required engaging high performance computing, without any expected theoretical difference. Instead we showed the 2d simulations in the manuscript for easier computation. Nonetheless, to verify this is the case, we have now completed several of these 3D simulations, and the behavior remains as expected.

Action taken: We have incorporated the identified dynamic systems with the delays in a new simulation section. We added a subsection “Effect of delays and transfer function” in the simulation section to show the results of adding transfer functions in the simulation.

In the revised manuscript, we clarified that the dynamic model also applies for 3D case in the analysis and simulation section, and we added Fig.11 in the appendix section to illustrate the 3D behavior.

R1C3: The description of the data processing steps is exceedingly difficult to follow. There is a large number of inconsistencies in notation and there is an unevenness in the level of detail given (some steps are described in great detail while other, equally important ones, are jumped over). In my list of minor issues I list a few of the points where I had difficulty following. The list is not complete, though, such that the authors should revise this section aiming for more clarity.

Author response: Thank you for your efforts to understand the data processing steps despite having ambiguities.

Action taken: We have rewritten the data processing steps to make it easier and balance the level of detail throughout the whole section. We have edited most of the notations and made a symbol list in the updated manuscript. We have also moved the “Kinematic tracking” section in the appendix.

Minor issues:

R1C4: p5,eq1: is T_j(m) in R^3 or is this a number? Further, Delta T appears to be a function of a single integer below eq1, but of g+1 integers in eq1. THis makes the definition of S_{g x 2} unclear.

Author response: Thank you for catching this issue. Here T_j(m) is a number not R^3. T_j (m) is the mth point of the X coordinates of stimulus and bee. Yes, Delta T is a function of a single integer. However, in equation 1 the output of Delta T is a vector of g+1 integers for both the stimulus and bee. If there are g points in a section, the matrix will have g rows and 2 columns.

Action taken: We have rewritten the equation to avoid confusion.

R1C5: In eq2 D(i,j) appears on both sides of the equations, so the equation should be simplified to D(i,j)=E(i,j). I suspect, however, that the D(i,j) on the left-hand side is the D(i,j) of the next time

step. It would be helpful to include time as an argument because that would also clarify if in eq3 the updated D(i,j) is used or the D(i,j) from the previous time step.

After the explicit formulas (2-4) a single sentence "apply Gaussian blur and morphological closure" skips over much more substantial transformations.

Author response: Thank you for your suggestions to improve equation 2.

Yes, the updated background D(i,j) and current frame E(i,j) are used in equation 3.

Thanks for noticing the later part where details of the Gaussian blur and morphological closure are absent.

Action taken: We have added the time argument in equation 2 and also clarified the equation 3. We have also written some sentences regarding Gaussian blur and morphological enclosure and details how we applied these techniques.

R1C6: Eq7 has several strange features. It appears to be a differential equation, dot x(t)=Ax(t-1)+Bu(t), with an enormous delay equal to 1 (measured in seconds?). The quantities p_t and v_t are not explained and the relationship between x and p,v is not defined. I suspect that eq7 is not a differential equation but a time step of length delta t. Correspondingly, should the first term be A x(t-delta t)? A similar correction may have to be applied to eqs (5,6)?

Author response: Thank you for your effort to understand the equation 7. This is a discrete Kalman filter model. Here the x(t-1) is the state at one step previous time. Yes, the relationship between x and p, v was absent. The correction in equation 5 and 6 should also be applied.

Action taken: Kinematic tracking section was rewritten to avoid any confusions. We have added the discrete time step argument k instead of time t in the equation 5, 6 and 7. The relationship between x and p, v was showed. Equation 5, 6 and 7 are also rewritten also.

R1C7: The term u in eq7 is never defined. I suspect that the Kalman filter is applied to the model of straight flight where measurement data corrects the model (in effect providing the acceleration a(t))? I could not understand the description. If eq7 is not a differential equation, one may have to use the Kalman filter for discrete time stepping.

Author response: Thank you for your observation. Yes, the u was not defined explicitly. Your assumption is right. This is basically acceleration. Equation 7 is not a differential equation, it is the state space form of the states. We realize it should be clearer.

Action taken: In the revision, the Kinematic tracking section is rewritten considering the above mentioned issues. We rewrote equation 7 in a form that we believe will be easier to understand.

R1C8: In eq15 the notation S_3^j is unclear, S_j appears to be a row of a 3x4 matrix, so is a 1x4 (row) vector. How can one take a power of this vector? The term P_2^j is not defined at all.

Author response: Thank you for your patience for trying to understand. S_3^j is the 3rd row of calibration matrix S of camera j. Yes, S_3 appears to be a row of 34 matrix and it is 14 (row) vector. I am afraid if you find power in this (S_3^j) notation. Here, j simply indicates the camera number. As it has multiple cameras, so the 3rd row of each calibration matrix is different. The term P_2^j is a typo. It should be S_2^j which means 2nd row of j camera’s calibration matrix.

Action taken: We have fixed the typo and written a clearer description of the notation S_3^j, S_2^j to avoid any misinterpretation.

R1C9: Fig5c seems to suggest that the windows in which the bee is determined to be tracking are glued together before further data processing. Is this justified? This could have a large effect on the delay estimate.

Author response: Thank you for this point. The bees track the stimulus intermittently. To increase the amount of data contained in each analysis, we did concatenate trajectories. This is a standard technique in system identification (described in textbooks by Tischler & Remple, Klein & Morelli, and Ljung, for example), which when done appropriately, will provide more data points and improve the identification. The justification is more straightforward in the frequency domain, while time domain approaches have more sensitivity to discontinuities. In this study, the stimulus and bee points were found from the images at the same time, reducing the impact of stimulus and bee’s trajectories discontinuities.

R1C10: The equations on p8 contain several undefined terms: G(s) is the transfer function of what? Later G(s)e^(st au) is mentioned without specifying what tau is.

The minimisation in eq18 is not clear: what class of G_e is minimised over and what is tau?

Author response: Thank you for catching this. Here G(s) is the transfer function of the stimulus and bee trajectory obtained from their frequency domain transformation. The G(s) and time delay tau are not known. Our goal is to estimate the transfer function and time delay.

Our system identification approach finds the best possible transfer function G_e and time delay tau_i by minimizing the difference between measured and estimated frequency domain data.

Action taken: In the revised manuscript, we have tried to remove the confusion by editing the equation 18 and rewritten the section.

R1C11: which norm is used in eq(19)?

Author response: Thank you for the question. This is L-2 norm or Euclidean norm.

Action taken: We have added the norm type in the description in the revised version.

R1C12: there is no index i in the terms of the sum in eq20.

Author response: Thank you for the observation. Yes, we should add the index i in the equation.

Action taken: We have rewritten the equation by adding the index i, now in equation 10.

R1C13: Is the quantity e a function of two variables (t,theta) as suggested in eq(21) or one variable (t) as seen below eq(21)?

Author response: Thank you for the question. Here e is a two variable (t, theta) function.

Action taken: In the revised version, we have written e as two variable function everywhere. And we extended the description of the formula to make it easier to read.

R1C14: Below eq(27) X_i is is a vector, as established in the sentence. But then X_i shows up in the denominator defining cos theta. How do we divide by a vector here?

Author response: Thank you for pointing this issue. We forgot to give norm sign there. It should be L2 norm of X_i. So the denominator of the cos(theta) and sin(theta) would be (1/N)*||X_i||.

Action taken: We have solved this issue by putting norm sign in the denominator of cos and sin variable in equation 27 (now equation 18).

R1C15: In eq(26) a quantity epsilon shows up, while in eq(24) we have rho. Are they the same?

Author response: Thank you for identifying the typo. Yes, both are same. So in the equation 26, it should be rho.

Action taken: In the revised manuscript, we changed epsilon to rho in equation 26 (now equation 17).

R1C16: In eq(29) sup_{t>0} V_m(t)=0 is the same as demanding that V_m(t)=0 for all t>0 (since V_m is non-negative). Do you mean lim sup_{t\\to\\infty} V_m=0?

Author response: Thank you for your observation. Yes, your assumption is right. As time goes to infinity the V_m tends to zero. It makes more sense if we put a limit there. Then we believe the supremum term does not require.

Action taken: We have added limit in the velocity convergence term of equation 29, now in equation 20.

R1C17: In eqs(31,32) the undefined quantities V and X show up. Are all these quantities (U,V,X) implicitly having the index i,j?

Author response: Thanks for the observing the undefined terms. We apologize for the typos here. All X should be U and it is the distance between agent i to agent j. Yes, U and V have implicit i,j and i index respectively.

Action taken: In the revised manuscript we have corrected the typos. In the equation 32 (now equation 42), we replaced X by U term. As V is the velocity, we replaced it with v_i.

R1C18: It is unclear how the delays are taken care of in the stability computation in eq(36). They appear to have taken into account in the final results (as they make a difference in stability). Again, as the delays are small, the approximation x(t-tau) ~ x(t) - tau x'(t) would likely be accurate compared to the experimental uncertainty.

Author response: Thank you for mentioning an important point. Here the linear stability of local behavior using the bifurcation parameter indicates stable and unstable equilibria. This theoretical analysis is not sufficient to fully characterize how delays affect the behavior. We only can get different eigenvalues (stable and unstable) of the Jacobian matrix which produces swarm patterns all together. Instead, we applied the experimental delays in simulation to determine how delays affect swarming behaviors.

Action taken: We have added few sentences in the linear stability section mentioning the idea to use bifurcation and how delays can affect global behavior.

R1C19: For the simulation the delays are assumed to have Gaussian distribution. This does not make sense as it would imply that delays could be negative. Sigma not much smaller than mu.

Author response: Thank you for your point. You can see in the Fig 7c, the Gaussian distribution fit (mean 22 ms, standard deviation 40 ms) shows positive delays part on the experimental histogram. For our simulation we have only taken the positive delays from Gaussian distribution.

Action taken: We edited the definition of Gaussian distribution N(tau|mu,sigma). In the definition we have clearly written about the positive delays taken in the simulation and changed the notation N(tau>0 |mu, sigma) to make it correct.

Reviewer 2

R2C1: In the section “Kinematic tracking”, the control input u(t) is not defined. It seems to be the acceleration, but this is not explained.

Author response: You are correct, the u was not defined explicitly, and it is acceleration. As detailed in the response to R1C7, we have corrected this.

R2C2: Equation (7) is a discrete-time system with time-step $\\delta t$, yes? If so, the time-derivative over-dot is probably a typo? Also, only two spatial dimensions are assumed, why not three? The latter fact is explained later, but commentary should be added in this section to orient the reader.

Author response: I appreciate your observation.. Yes, equation 7 is a discrete time system. This is a typo: time derivative. The Kalman filter algorithm is applied the 2D centroid points in each camera’s image plane coordinates, hence the 2-D points.

Action taken: We have rewritten the kinematic tracking section describing the discrete Kalman filter. Typos have been fixed in the revised version. In response to R1C3, the kinematic tracking section has also been moved to the appendix.

R2C3: Since you describe noise, Equations (6) and (8) should presumably have additive Gaussian white noise terms for example, per the canonical formulation of Kalman filtering.

Author response: Thank you for suggestions. We considered Gaussian noise in the process and measurement noise covariances which have effects on the prediction and correction steps of Kalman filtering.

Action taken: We have reworked the section on Kalman filtering in the updated manuscript.

R2C4: Where does the state-space noise come from in Equation (9)? There needs to be a noise amplitude somewhere, like in E_{z}.

Author response: Thank you for the question. The process noises E_x and E_z come from the standard deviation of position and velocity which can be obtained from the standard deviation of acceleration σ_a multiplied by (δt)^2/2 and (δt) respectively.

Yes, there should be noise amplitude with the time step in the process noise in equation 9.

Action taken: We have updated the description of how we applied these process noises in the Kalman filtering portion of the revised manuscript. We have added the standard deviation of acceleration sigma_a in equation 9 (now in equation 33).

R2C5: The notation in Equation (11) is confusing. Shouldn't the a priori estimate at the current time depend on x^{+}(t-\\delta t): the aposteriori estimate at the past time...? Overall the mix of discrete and continuous in this section is unclear.

Author response: Thank you for your effort to understand the equation despite having continuous and discrete mixing. Yes, the apriori estimate at the current time x^-_k should depend on x^+_(k-1) the a posteriori of the past time and the acceleration term.

Action taken: We have rewritten the equation using only discrete term in the revised version. It is now presented in equation 36.

R2C6: There is a parentheses missing in Equation (13).

Author response: Thank you for catching this point.

Action taken: We added the missing parentheses.

R2C7: In Equation (16), the notation is confusing. Is "i" imaginary or "j"?

Author response: Thank you for noticing this.

Action taken: Both i and j are imaginary in equation 16. To avoid confusion we have written consistent j for imaginary in both places.

R2C8: Just above Equation (17), is the assumption of linearity (between visual stimulus and trajectory-response) a good approximation? If so, how was that quantified?

Author response: Thank you for your response. Coherence measures the degree of linear dependency of two signals by testing for similar frequency components. If two signals correspond to each other perfectly at a given frequency, the magnitude of coherence is 1. If they are totally unrelated, coherence will be 0. For this analysis, a coherence value exceeding 0.7 (Remple/Tischler textbook) was used to identify stimulus and bee trajectories having a linear relationship.

Action taken: In the revised version, we have added details of coherence before this equation to make clearer to the reader.

R2C9: Equation (21): This is a general formula. It would be more interpretable, if you used the actual variables in the current fitting/estimation problem.

Author response: Thank you for your observation. We have considered an ARX (autoregressive with exogenous input) model as x[n] + a_1*x[n-1] +...a_n*x[n-n_a] = b_1*u[n-1] + b_2*u[n-2]+....b_n*u[n-n_b] + e[n], here e[n] is the white noise term.

The estimated parameters theta = [a_1 a_2 …..a_n b_1 b_2 ……b_n]^T. The regression matrix is phi[n] = [-x[n-1] …. -x[n-n_a] u[n-1] …. u[n-n_b]]^T. The prediction error can be written as e(t,\\theta_J) = x[n] - \\phi[n]^T*\\theta. Then the FPE can be obtained from the equation 21.

Action taken: In the revised manuscript we have added all these details of the equation 21 (now equation 12) which we think is more interpretable.

R2C10: There is no self-propulsion in Equations (22-23). Hence, if no neighbors are present, then the agents *stop* due to friction. Is that right? Without some tendency to keep moving, the “swarming” system seems like an inert, equilibrium system, not an active matter system relevant for swarming…Please comment.

Author response: Thank you for your comment. Yes, there is no self propulsion term in the swarm model. We considered only the friction term and interaction among each agent to move forward. Hence, if there are no neighboring agents, agents will not move.

R2C11: What is x_{ij}....? It is defined implicitly, though ambiguously, in Equation (25).

Author response: Thank you for getting this point. The term x_{ij} is denoted by x_i(t) - xj(t-\\tau_{ij}).

Action taken: We have written explicitly the term x_{ij} to avoid any ambiguities.

R2C12: In Equation (24), shouldn't each quantity within the "sums" be squared, individually? Ditto with the fourth power. Typically, potential functions (at least in physically-inspired models) are pairwise. This phrasing seems to generate cross terms, which is a bit strange.

Author response: Thank you for the observations. Yes, typically aggregation potential function use interagent distance as a function of exponential or power law (different powers). However, in our case as we have calculated at first the sum of inter agent distance then subtracted r from that. This whole term is then second and fourth powered to pose the attraction. We see the cross terms do not provide any problems because equations 17 and 18 show how the potential function uses the positions of the agents.

R2C13: In the section "Long range attraction,” the derivation seems like an unnecessary use of formalism. The repulsive potential is exponentially damped, whereas attraction (for example) is infinite range-- the polynomial functions grow to infinity as the distance does. I would just state the fact that you are looking in the regime of long-range attraction where pairwise distances are >> Dr.

Author response: Thank you for the observations. Your assumption is right that the repulsive potential is exponential damped which means when the distance is large it would tends to zero. We could only state this fact however, we thought it would be helpful to prove this using some mathematical argument.

Author action: We have moved this section to the Appendix.

R2C14: X_{i} being constant means that agent "i" is a constant distance from the swarm center of mass, yes? If so, add some commentary and explanation, etc. near Equation (36).

Author response: Thank you for the observations. Here, agent “i” is in a constant distance means it has constant distance from the origin.

Author action: We have added some comments for this near equation 36 (now equation 24).

R2C15: The Jacobain for the full swarm should have N*times the dimension of Equation (36). It seems like you are studying the linear stability with respect to perturbations in each agent (treated separately, as localized perturbations)...Probably, this is the same as a mean-field analysis, which is sometimes accurate and sometimes not. To judge, we need to see comparisons to full-swarm simulations. On that point, see for instance https://link.aps.org/doi/10.1103/PhysRevE.101.042202, which formally analyzes delay effects in self-propelled swarming systems. The authors should consider citing this work since it addresses delay-induced instability in swarms beyond the mean-field analysis that they present, and would give the present work some cover in terms of pointing to more detailed treatment, etc.

Author response: Thank you for your valuable insights. Yes, full swarm would contain the agent number N* times the equation. However, we only analysis here the individual level behaviors which does not include N. Using mean field analysis we may not predict the swarm behaviors as a whole accurately when time delayed effect arise. This paper is really a helpful to see the delay effects on ring and rotational patterns of a swarm model.

Action taken: We have cited this paper in the revised manuscript.

R2C16: Where does time delay enter into the picture (in the Linear Stability section)? It is not clear at this point. In fact, time delay will not just change stability of the solutions mentioned, but may change the solutions all together. If this is neglected, fine, but the assumption needs to be stated.

Author response: Thank you for your response. Yes, it is neglected here. Linear stability analysis only shows that bifurcation parameter can generate three swarm shapes-ring, cluster and double ring by developing stable and unstable modes. The time delay effect on the swarm is not considered in the linear stability analysis. The time delays play a crucial role to make the swarm stable or unstable all together which is showed in the simulation.

Action taken: In the revision we have stated this assumption clearly in the linear stability section.

R2C17: The section “Results and Discussion” has almost no commentary. It is disorienting to read. The figures are just plopped down, one after another. Please consider rewriting this section.

Author response: Thank you for the suggestions. We wanted to show the step by step procedures.

Action taken: In the revised manuscript, we have edited the section.

R2C18: It seems like time-delay effects were only simulated in the swarming model, not formally analyzed (e.g., in the linear stability calculation). Is that correct? For one, if delay was included in the stability analysis, we should see an infinite dimensional stability spectrum, satisfying a transcendental equation with an infinite number of solutions.

Author response: Thank you for your observation. Yes, your assumption is right. The time delay effect on the swarm was considered in simulation, not analyzed theoretically. Yes, one possible way to consider delay in the stability analysis of a swarm model is via the characteristic solution of the linearized system. In this case, this approach will yield a transcendental equation that contains an infinite number of solutions.

Attachment

Submitted filename: Response to reviewers.pdf

Decision Letter 1

Antony R Humphries

11 Nov 2022

Experimental identification of individual insect visual tracking delays in free flight and their effects on visual swarm patterns

PONE-D-22-10206R1

Dear Dr. Islam,

We’re pleased to inform you that your manuscript has been judged scientifically suitable for publication and will be formally accepted for publication once it meets all outstanding technical requirements.

Within one week, you’ll receive an e-mail detailing the required amendments. When these have been addressed, you’ll receive a formal acceptance letter and your manuscript will be scheduled for publication.

An invoice for payment will follow shortly after the formal acceptance. To ensure an efficient process, please log into Editorial Manager at http://www.editorialmanager.com/pone/, click the 'Update My Information' link at the top of the page, and double check that your user information is up-to-date. If you have any billing related questions, please contact our Author Billing department directly at authorbilling@plos.org.

If your institution or institutions have a press office, please notify them about your upcoming paper to help maximize its impact. If they’ll be preparing press materials, please inform our press team as soon as possible -- no later than 48 hours after receiving the formal acceptance. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information, please contact onepress@plos.org.

Kind regards,

Antony R Humphries, Ph.D.

Academic Editor

PLOS ONE

Additional Editor Comments (optional):

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. If the authors have adequately addressed your comments raised in a previous round of review and you feel that this manuscript is now acceptable for publication, you may indicate that here to bypass the “Comments to the Author” section, enter your conflict of interest statement in the “Confidential to Editor” section, and submit your "Accept" recommendation.

Reviewer #1: All comments have been addressed

Reviewer #2: All comments have been addressed

**********

2. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #1: Yes

Reviewer #2: Yes

**********

3. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: Yes

Reviewer #2: Yes

**********

4. Have the authors made all data underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: Yes

**********

5. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: Yes

Reviewer #2: Yes

**********

6. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: The authors have convincingly responded to the major issues I raised in their "Response to Reviewers" and incorporated corresponding imporvements into their manuscript. All concrete minor issues raised have been addressed.

Reviewer #2: The authors have addressed the comments and critiques of both referees. The manuscript is significantly more clear and easy to follow. I still think that two distinct papers, in this case, for theory and experiment might be better, but I understand the authors' arguments for combining them. Hence, I recommend publication.

**********

7. PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: No

Reviewer #2: No

**********

Acceptance letter

Antony R Humphries

16 Nov 2022

PONE-D-22-10206R1

Experimental identification of individual insect visual tracking delays in free flight and their effects on visual swarm patterns

Dear Dr. Islam:

I'm pleased to inform you that your manuscript has been deemed suitable for publication in PLOS ONE. Congratulations! Your manuscript is now with our production department.

If your institution or institutions have a press office, please let them know about your upcoming paper now to help maximize its impact. If they'll be preparing press materials, please inform our press team within the next 48 hours. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information please contact onepress@plos.org.

If we can help with anything else, please email us at plosone@plos.org.

Thank you for submitting your work to PLOS ONE and supporting open access.

Kind regards,

PLOS ONE Editorial Office Staff

on behalf of

Prof. Antony R Humphries

Academic Editor

PLOS ONE

Associated Data

    This section collects any data citations, data availability statements, or supplementary materials included in this article.

    Supplementary Materials

    S1 Video. Video of tracking example.

    Intermittent tracking trajectory labeled in yellow text.

    (MP4)

    S2 Video. Video of pattern shape formation.

    Cluster shape, ring, double ring by changing bifurcation parameter.

    (MP4)

    Attachment

    Submitted filename: Response to reviewers.pdf

    Data Availability Statement

    All trajectories and stimulus files are available from the figshare database (https://doi.org/10.6084/m9.figshare.19493642.v1; https://doi.org/10.6084/m9.figshare.19493597.v1).


    Articles from PLOS ONE are provided here courtesy of PLOS

    RESOURCES