Author: Ravi Umadi Affiliation: Technical University of Munich License: CC BY-NC-SA 4.0
This toolkit was developed for the research article:
Widefield Acoustics Heuristic: Advancing Microphone Array Design for Accurate Spatial Tracking of Echolocating Bats
Published article: https://doi.org/10.1186/s12862-025-02441-4
If you use this toolkit, please also cite:
Ravi Umadi. (2025). Array WAH: Microphone Array Design Tool V1.1.0. Zenodo.
https://doi.org/10.5281/zenodo.15691371
Array WAH is a MATLAB-based simulation and analysis toolkit designed for designing, simulating, and benchmarking 3D microphone array geometries for precise acoustic localisation of ultrasonic bat calls.
It supports:
- Virtual bat call simulation
- Frequency-dependent propagation
- Time Difference of Arrival (TDOA) multilateration
- 3D grid sweep error mapping
- Statistical and visual analyses of localisation performance
The toolkit supports multiple array geometries, including:
- Tetrahedron
- Planar Square
- Pyramid
- Octahedron
- Custom Geometry
Array WAH models the entire localisation chain:
Simulated bat calls are generated using two biologically relevant signal types:
FM calls are created as quadratic down-sweeps from a starting frequency f0 to an ending frequency f1 over a duration d. These mimic broadband echolocation signals produced by many insectivorous bats.
Key features:
- Quadratic chirp generation using MATLAB’s chirp() function.
- Hanning window applied to taper onset and offset, minimising spectral leakage.
- A spectral shaping filter (optional) is included in the code for more naturalistic bandwidth control.
- An optional Doppler shift is applied by resampling the chirp to simulate relative motion between the bat and the microphone.
- Zero-padding is added before and after the signal based on a user-specified tail percentage of the call duration.
CF calls are generated as pure tones at a single frequency f1 over the duration d, typically used to simulate calls of species like horseshoe bats (Rhinolophus) or Hipposideros.
Features:
- Sinusoidal tone generation at a fixed frequency f1.
- Hanning window applied to prevent sharp transitions.
- Doppler resampling is supported for simulating motion.
- Zero-padding is added on both sides as with FM calls.
Both FM and CF calls optionally include a Doppler-induced time scaling, simulating the compression or dilation of the waveform due to relative radial motion between the emitter and the microphones. This is controlled via the velocity parameter.
Signals experience frequency-dependent atmospheric attenuation and geometric spreading. Delays are applied using fractional delay filters.
Each mic receives a scaled and delayed version of the original call, according to its distance and orientation relative to the source.
Cross-correlation is used to estimate relative time delays between each mic and a reference.
Using the TDoA vector, nonlinear least squares is used to estimate the 3D source position via multilateration.
The process is repeated over a 3D grid of source locations. Positional and angular errors are computed and saved.
- 3D scatter plots
- Histograms and boxplots
- Contour maps across elevation slices
- Statistics
Array_WAH/
│
├── src/ # All class definitions
│ ├──wah_analyzer.m
│ ├──mic_array_configurator.m
│ ├──BatCallLocaliser.m
│
├── configs/ # Saved mic array configurations (auto-generated)
├── results/ # Output CSVs and figures
│ └── figures/
│
├── simulate_batcall_localisation.m # Simulates calls and saves localisation results
├── demo_wah_analyzer.m # Loads CSVs and performs statistical analysis
├── demo_mic_array_configurator.m # Demo for mic_array_configurator
├── demo_test_single_point.m # Run a single point analysis for test mic configration and source location
├── effect_of_source_motion.m # Demonstrates source velocity effect on localisation accuracy of two call types.
├── startup.m # Adds src/ to path and checks dependencies
├── LICENSE
└── README.md
run startup.mThis script:
- Adds
src/to path - Verifies required toolboxes
run simulate_batcall_localisation.mGenerates TDOA-based localisation results over a 3D grid for each array config.
run demo_wah_analyzer.mLoads results and:
- Separates inliers/outliers
- Generates visualisations
- Performs ANOVA and Tukey tests
run demo_mic_array_configurator.mrun demo_test_single_point.m| Toolbox | Required |
|---|---|
| Signal Processing Toolbox | ✅ |
| Statistics and Machine Learning Toolbox | ✅ |
| Curve Fitting Toolbox |
If any are missing, install via:
matlab.addons.install('toolboxName.mltbx')This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license (CC BY-NC-SA 4.0).
✔️ Free to use and modify
❌ No commercial use
📝 Please attribute: "Ravi Umadi, Array WAH (2025)"
This project is part of my ongoing research and technological development into field-deployable, portable MCU-based multichannel microphone arrays. I thank my supervisor and colleagues at the Lehrstuhl für Zoologie at Weihenstephan.
- My work on BATSY4-Pro, codebase https://github.com/raviumadi/Embedded_Ultrasonics
- The preprint of BATSY4-Pro Multichannel Ultrasound Field Recorder is now available at : 10.1101/2025.08.11.669530
Please open an issue or pull request on GitHub.