Back to Collision Avoidance

Multi-Agent Formation Control with Inter-Drone Collision Avoidance

Distributed · Peer-Coupled · Three Target Formations

Abstract

Four drones, each with an assigned target slot in a desired formation, navigate from their start positions to the formation while respecting a minimum-separation constraint with each peer. The controller is distributed: every drone runs an attractive-to-slot term plus a peer-repulsion term and clips at a max-speed bound. The page demonstrates two formations the controller solves cleanly (rotated square, horizontal line) and one it does not (cross-swap), making the limitation of distributed peer-repulsion explicit.

Algorithm

For each drone i with position p_i and target slot t_i, the desired velocity is

v_i  =  k_target · (t_i − p_i) / max(‖t_i − p_i‖, 0.5)
        +  Σ over peers j ≠ i with d_ij < r_repel
           k_repel · ( 1/d_ij  −  1/r_repel )  ·  (p_i − p_j) / d_ij
        ,  clipped to ‖v_i‖ ≤ v_max

Implementation: k_target = 1.2, k_repel = 4.0, r_repel = 0.8 m, v_max = 0.6 m/s, integrated by forward Euler at dt = 0.1 s. The attractive term is normalised so that drones do not over-shoot when far from their slot; the repulsive term has the same 1/d² shape as the single-agent potential field on the previous page.

Three Target Formations

Same starting square, three target formations of increasing difficulty. Each panel shows initial positions (faded circles), trajectories (faded lines coloured by drone identity), final positions (diamonds), and target slots (X markers).

Three side-by-side panels showing four drones' trajectories from a starting square: rotated square formation reached in 51 steps, horizontal line in 110 steps, and cross-swap timing out at 400 steps
Target formation Outcome Steps Min separation
rotated squaresuccess512.89 m
horizontal linesuccess1100.89 m
cross-swapdeadlock400 (cap)0.65 m

Cross-swap, where each drone is assigned the slot diagonally opposite its start, is the canonical failure case for distributed-controller formation. Each drone wants to head toward the centre of the swarm, but every other drone repels them on the way, so the four drones converge toward the centre and stall. The repulsive forces sum to zero only when all four are equidistant from the geometric centre, which is a different configuration from the desired formation.

Inter-Drone Separation Over Time

Minimum pairwise distance between drones, plotted over the simulation. The horizontal-line formation passes close to the safety threshold around step 50 as the four drones rearrange themselves; the cross-swap saturates near the threshold and stays there. The rotated-square case has nothing to negotiate. The assignment is collision-free at every moment.

Plot of minimum inter-drone distance over simulation steps for three formation scenarios, with a red dashed safety threshold at 0.4 m