Speed-Weighted Adaptive Flocking for Sailing Swarms under Dynamic Environmental Forcing

Supplementary Material for SAB 2026

Pranav Kedia¹², Aaron Gan³, Hannah J. Williams¹⁴⁵, Andreagiovanni Reina¹²⁵, Heiko Hamann¹²

¹ Centre for the Advanced Study of Collective Behaviour, Konstanz, Germany ² Dep. of Computer and Information Science, University of Konstanz, Germany ³ University of Pittsburgh, Pittsburgh, USA ⁴ Department of Biology, University of Konstanz, Konstanz, Germany ⁵ Max Planck Institute of Animal Behavior, Konstanz, Germany


Abstract

Collective behavior models such as aggregation and flocking usually assume self-propelled robots that can directly execute their desired speed and direction of motion. Autonomous sailing robots violate this assumption: their motion is shaped by wind-dependent propulsion, restricted headings, and spatially varying wind conditions. We introduce SailSwarmSwIM, a reduced-order simulator for autonomous sailing robot swarms, and a speed-weighted Couzin controller that accounts for each robot’s transient motion constraints. Across four wind conditions, moderate slow-neighbor weighting (small positive γ) improves polarization, reduces close encounters, and tightens cohesion, while strong weighting in either direction reveals distinct failure modes.


Paper and Code

ResourceLink
Preprint (PDF)Download
Simulator sourcegithub.com/praked/SailSwarmSwIM
Hardware platform (Aqua Flash)overhead video below

Reproducibility

Install

# Editable / dev install (recommended for reproducing the sweep)
git clone https://github.com/praked/SailSwarmSwIM.git
cd SailSwarmSwIM
pip install -e .

A plain install is also available:

pip install git+https://github.com/praked/SailSwarmSwIM.git

Default parameters

These are the values used throughout the paper (also given in Table 1 of the main text):

ParameterValueMeaning
N10number of robots
Lh35 marena half-size
dt1 ssimulation step
T300 srun horizon
R0central diskinitial spawn radius
αng45°no-go half-angle
rrep4 mrepulsion radius
rori10 morientation radius
ratt18 mattraction radius
dnear1.0 munsafe-proximity threshold (logging)
dsafe1.5 mhard-repulsion safety threshold
kp0.4luffing proportional gain
ε0.1regularization in Eq. (6)
γsweep [−2, 10]speed-weighting exponent
seeds50per (controller, wind) cell
wind{5, 10} m/s × {steady, gusty}four conditions

Speed-Weighted Couzin Controller — Pseudocode

The controller computes a desired social heading per robot, then projects it through the sailing-feasibility layer (no-go cone + tacking). The repulsion term is never speed-weighted; only orientation and attraction are.

Input:  robot i at position pᵢ, heading ψᵢ, speed vᵢ
        neighbors  j ∈ Nᵢ with (pⱼ, ψⱼ, vⱼ)
        zones      rrep < rori < ratt
        exponent   γ        (slow-fast axis)
        constant   ε > 0    (regularization)
 
# 1. Partition neighbors by distance
for j in Nᵢ:
    dᵢⱼ = ‖pⱼ − pᵢ‖
    r̂ᵢⱼ = (pⱼ − pᵢ) / dᵢⱼ
    êⱼ  = (cos ψⱼ, sin ψⱼ)
 
R = { j : dᵢⱼ <  rrep }       # repulsion
O = { j : rrep ≤ dᵢⱼ < rori } # orientation
A = { j : rori ≤ dᵢⱼ < ratt } # attraction
 
# 2. If any neighbor in R, repulsion overrides
if R ≠ ∅:
    d_social = −Σ_{j∈R} r̂ᵢⱼ                          # Eq. (5), uniform
else:
    # 3. Speed-weighted social vector (Eq. 6 + 7)
    for j in O ∪ A:
        wᵢⱼ = 1 / (vⱼ + ε)^γ
    o_γ = Σ_{j∈O} wᵢⱼ · êⱼ
    a_γ = Σ_{j∈A} wᵢⱼ · r̂ᵢⱼ
    d_social = o_γ + a_γ
 
# 4. Map social vector to a desired heading
ψ* = atan2(d_social.y, d_social.x)
 
# 5. Project onto sailing-feasible cone (Eqs. 3–4)
δ = wrap(ψ* − θ_w(pᵢ, t))
if |δ| < α_ng:                # inside no-go cone
    ψ̃ = θ_w(pᵢ, t) + sign(δ) · α_ng    # snap to close-hauled, tack
else:
    ψ̃ = ψ*
 
# 6. Sail luffing for speed equalization (Eq. 8)
#    Drives fast boats toward neighborhood mean speed.
v̄ = mean({vⱼ : j ∈ Nᵢ})
τᵢ = clip(1 − kp · max(0, vᵢ − v̄), 0, 1)
power_factor = 1 − (βᵢ / 180°)² · (1 − τᵢ)
 
# 7. Hand off to low-level sailing dynamics
return  desired_heading = ψ̃,  sail_trim = τᵢ

The interpretation of γ is:

γBehaviorEffect
γ < 0fast-neighbor followingheading dominated by quickest movers
γ = 0uniform Couzin (with luffing)classical zonal weighting
0 < γ ≲ 0.3operating regimeimproves all three metrics in all four winds
γ ≳ 1slow-neighbor anchoringcohesion gains, alignment cost
γ → 10over-anchoringflock compact but disordered

Extended Results: 5 m/s Wind Conditions

The main text plots the γ-sweep for the two 10 m/s environments (Fig. 2). For completeness, the corresponding panels for the 5 m/s steady and 5 m/s + gusts environments are below. Same convention: median paired difference relative to the uniform Couzin baseline over 50 seed-matched runs, with IQR error bars; red markers are significant under Holm-corrected Wilcoxon (p < 0.05).

ΔΦ and ΔC vs γ for 5 m/s wind conditions Effect of speed-weighting on alignment and safety in the 5 m/s environments. Each panel shows the median paired difference relative to the uniform Couzin baseline over 50 seed-matched runs; error bars show the interquartile range. Positive ΔΦ indicates improved alignment, while negative ΔC indicates fewer unsafe proximity events.

Per-seed steady-state distributions, 5 m/s Per-seed steady-state distributions for alignment and safety in the 5 m/s environments. Each box summarizes one value per seed over t ∈ [100, 300] s across 50 runs.

Convex-hull area sweep

ΔA_hull vs γ across all four wind conditions Median paired ΔAhull as a function of γ for all four wind conditions. Negative is better. Note the asymmetric failure modes: at γ = −2 the flock stretches (largest in 10 m/s + gusts); at γ = 10 cohesion reverses sign and the flock disperses under steady 10 m/s wind.


Wind Field Details

The wind field is w(x, y, t) = w_base(t) + w_gust(x, y, t):

  • Steady conditions (5 m/s, 10 m/s) — w_gust ≡ 0. Wind direction is fixed for the duration of the run.
  • Gusty conditionsw_gust is a spatially correlated perturbation with bounded magnitude and slowly drifting direction, evaluated locally per robot. Two mechanically identical robots can therefore experience different apparent winds and consequently different feasible speeds. The wind enters the controller only through the realized speeds vⱼ of neighbors (used in Eq. 6) and through the no-go projection (Eq. 4); the social rule itself has no explicit knowledge of the wind field.

Hardware: Aqua Flash Sailboat

The simulator is calibrated against the Aqua Flash autonomous sailing platform deployed on Lake Constance. The overhead video below shows live sailing maneuvers — including tacking through the no-go cone — that the SailSwarmSwIM dynamics layer is designed to capture in reduced-order form.

Sailing Maneuvers on Lake Constance by Aqua Flash sailboat robot (Overhead View)


Acknowledgments

This work has been supported by the DFG under Germany’s Excellence Strategy, EXC 2117 – 422037984.


Contact

For questions on the simulator or the experiments, please open an issue on github.com/praked/SailSwarmSwIM or get in touch.