Echolocating Bat Swarm Simulation

<h2><b>Swarm Cohesion in Bats Emerges from Stable Temporal Loops</b></h2><p><br></p><p dir="ltr">This repository contains all simulation code and analysis tools used in the above study</p><p dir="ltr">Available at: <a...

Full description

Saved in:
Bibliographic Details
Main Author: Ravi Umadi (21663149) (author)
Published: 2025
Subjects:
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:<h2><b>Swarm Cohesion in Bats Emerges from Stable Temporal Loops</b></h2><p><br></p><p dir="ltr">This repository contains all simulation code and analysis tools used in the above study</p><p dir="ltr">Available at: <a href="https://www.biorxiv.org/content/10.1101/2025.07.05.663265v1" rel="noreferrer" target="_blank">https://www.biorxiv.org/content/10.1101/2025.07.05.663265v1</a></p><p dir="ltr">Also, see the corresponding GitHub repo for the latest code <a href="https://github.com/raviumadi/Swarming_Dynamics" rel="noreferrer" target="_blank">https://github.com/raviumadi/Swarming_Dynamics</a></p><h2>Overview</h2><p><br></p><p dir="ltr">I present a biologically grounded model of swarm dynamics in echolocating bats, where each agent operates asynchronously using echo-timed feedback from its nearest neighbour. The codebase includes:</p><p><br></p><ul><li>Asynchronous swarm simulation (`simulateEcholocationSwarm_async.m`)</li><li>Single-agent biosonar control (`simulateEcholocationWings_singleStep.m`)</li><li>Parameter grid execution scripts</li><li>Analysis and plotting tools for visualisation and summary statistics</li></ul><p><br></p><p dir="ltr">The model demonstrates how closed-loop sensory–motor control using echo delays alone enables stable, decentralised group coordination in dense aggregations.</p><p><br></p><h2>File Structure</h2><p><br></p><h3>Simulation Core</h3><p><br></p><ul><li>`simulateEcholocationSwarm_async.m`</li></ul><p dir="ltr">Main simulation function. Models the fully asynchronous swarm using local echo-timed feedback.</p><p><br></p><ul><li>`simulateEcholocationWings_singleStep.m`</li></ul><p dir="ltr">Computes biosonar loop parameters (call rate, delay, echo response) for a single agent.</p><p><br></p><h3>Execution Scripts</h3><p><br></p><ul><li>`grid_sim_parallel_runs.m`</li></ul><p dir="ltr">Batch runner for simulation across a grid of conditions (e.g., varying `k_r` and initial velocity). Uses `parfor` for parallel execution.</p><p><br></p><ul><li>`method_demo.m`</li></ul><p dir="ltr">Basic method demonstration with equations - plot.</p><p><br></p><h3>Analysis and Visualisation</h3><p><br></p><ul><li>`analyse_swarm_results.m`</li></ul><p dir="ltr">Parses output logs and extracts collision events, behavioural statistics, and performance metrics.</p><p><br></p><ul><li>`grid_run_summary_plot.m`</li></ul><p dir="ltr">Generates figures and heatmaps summarising condition-dependent outcomes (collision rates, velocity adaptation, etc).</p><p><br></p><ul><li>`swarm_trajectory_plot.m`</li></ul><p dir="ltr">Visualises 3D trajectories and behaviours of agents in the swarm.</p><p><br></p><h2>Dependencies</h2><p><br></p><ul><li>MATLAB R2021a or later</li><li>Parallel Computing Toolbox (for parallel execution)</li><li>May require other toolboxes depending on your version and license of MATLAB.</li><li>Script functions are stored in `fcn`</li></ul><p><br></p><h2>Running a Simulation</h2><p><br></p><ol><li>Define simulation parameters in `sim_conditions_grid.csv` or construct a parameter grid in `grid_sim_parallel_runs.m`.</li><li>Execute the simulation script. All output is stored as `.mat` files with condition-specific filenames.</li><li>Use analysis tools to extract and visualise results.</li></ol><p dir="ltr"><i>> grid_sim_parallel_runs</i></p><h2>Other Material</h2><p><br></p><ul><li>A supplementary swarm propagation visualisation animation is included.</li><li>`tex` folder contains LaTeX table outputs used in the preprint.</li></ul><p><br></p><h2>License</h2><p><br></p><p dir="ltr">This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).</p><p><br></p><p><br></p>