Drone swarms

Exploring decentralized swarm behaviour

The idea for this simulation comes from the EDF STEALTH project, which aims to develop methods and tools for enabling UAV swarms to operate in GNSS-denied environments.

Inspired by this problem, I wanted to explore whether a simple first-order control algorithm could help a distributed swarm maintain its formation without relying on a centralized authority. The simulation deliberately uses a simplified model, focusing on the interplay between natural drift, imperfect measurements, and asynchronous local control.

Each drone is assigned a preferred planar drift velocity, randomly chosen at the beginning of the simulation. This term represents persistent effects such as wind, mechanical imperfections, or errors in the control and sensing loop. At each time step, a further random perturbation is added to this drift velocity, representing smaller and more rapidly varying disturbances. The resulting target velocity is then used in a relaxational random-walk process, modelled as an Ornstein-Uhlenbeck process, to update the drone's actual velocity and position.

With the swarm logic disabled, these independent disturbances naturally cause the formation to disperse. The default drift is intentionally relatively large to make this effect visible; in a real system, I expect the uncontrolled drones to remain in formation for longer.

When the swarm logic is enabled, each drone independently estimates the correction needed to maintain the formation. One possible engineering implementation would be to use ultra-wideband (UWB) two-way ranging to measure the distances to neighbouring drones, together with a small antenna array to estimate their approximate bearings. The measurements are performed asynchronously, so each drone updates its control command independently rather than relying on a centralized controller.

The measured distances and bearings are compared with the desired formation geometry to determine a corrective velocity. This control contribution is added to the drone's natural drift and passed through the same relaxational dynamics as the uncontrolled motion. The resulting behaviour illustrates the limits of the simple distributed controller: maintaining the formation becomes increasingly difficult as the drift velocity or bearing error increases, while very small swarms provide fewer relative measurements and therefore less geometric redundancy.