- The paper introduces a PDE-based optimization framework integrating CLFs and CBFs to enforce safe density control for robotic swarms.
- It compares centralized and Voronoi-partitioned feedback controllers that adapt to stochastic disturbances and localization errors in real time.
- Counterintuitively, results show that sparser swarms maintain safety more effectively than densely clustered formations.
Safe Swarm Density Control via PDE-Constrained Optimization with State Constraints
Introduction
The paper addresses safety-critical density control for robotic swarms via a PDE-based optimization framework that incorporates control Lyapunov functions (CLFs) and control barrier functions (CBFs). The core contribution is a suite of optimization-based controllers—some centralized, some Voronoi-partitioned and thus scalable—that regulate the spatial density of stochastic swarms while ensuring safety with respect to state constraints, all under the macroscopic evolution dictated by the Fokker-Planck equation. Both theoretical guarantees and strong empirical results are provided, demonstrating the limitations of conventional optimal control schemes in realistic settings with noise and the superior safety performance of the proposed OBC approaches. Notably, the analysis and experiments yield the counterintuitive result that sparser, less clustered swarms more easily and robustly satisfy safety specifications—a point with practical and conceptual import for large multi-agent systems.
The underlying system models each robot's motion as a stochastic process with deterministic drift and additive Wiener noise, leading to swarm evolution governed by the Fokker-Planck PDE over the spatial density. Control design aims to steer this density towards a target distribution (e.g., for coverage or aggregation), subject to hard safety constraints (i.e., bounded probability mass in hazardous or restricted regions).
The classic optimal control (OC) approach formulates a global, state-constrained problem with an energy/density-tracking cost. However, this open-loop controller suffers from practical drawbacks—primarily, non-robustness to disturbances and noise arising from the fact that it computes only an initial feedback plan and doesn't adjust in real-time to noisy measurements. The paper proposes several feedback (OBC) methods that recompute optimal controls at every timestep using the current density estimate.

Figure 1: Four control strategies for three robots: OC (global open-loop), SV-OBC (feedback over the swarm distribution), RV-OBC (agent-wise uniform commands), and RV-OBC-V (Voronoi-distributed feedback), each illustrated with hazard (red) and target (gold).
Control Architectures and Theoretical Guarantees
Optimal Control (OC)
The OC implementation translates the continuous-time, infinite-dimensional, state-constrained stochastic process control problem into a solvable PDE system via Pontryagin's principle and Lagrangian relaxation of constraints. However, discontinuities at active constraint boundaries induce numerical instabilities. More fundamentally, once the initial density is used to compute the control field, subsequent robot measurements and disturbances are ignored, precluding closed-loop corrections and causing the controller to underestimate the safety risk near hazards.
Swarm Velocity OBC (SV-OBC)
The SV-OBC applies a feedback loop by solving, at each timestep, a quadratic program over a spatial control field with input and density constraints embedded as CLF and CBF inequalities. The spatial field is projected onto robot locations to produce implementable commands. This framework admits a convex formulation with strong feasibility and invariance guarantees, as shown via discretization lemmas and convex optimality. It is effective for moderate noise but can admit robot-level safety failures when localization errors misalign the robot's belief and the actual unsafe set.

Figure 2: SV-OBC in a challenging edge case—despite the swarm density remaining safe at the aggregate level, robot-level uncertainty can breach the unsafe region depending on actual localization noise realization.
Robot Velocity OBC (RV-OBC)
To eliminate robot-level safety mismatches, RV-OBC moves from a global control field to individual agent-wise control inputs, essentially solving for N uniform controls over robot-wise PDFs. The closed-loop quadratic program ensures that the CBF constraint is satisfied on the collective density at every step. Theoretical results derive a sufficient condition—parameterized by moments of the density, localization precision, and motion noise—for the forward invariance of the safe set. This is provably robust to both localization and actuation noise under realistic parameter selections.
Voronoi-accelerated OBC (RV-OBC-V)
A further speedup is achieved by employing a Voronoi decomposition: each robot optimizes only over its spatial cell. This greatly reduces computational complexity (permitting real-time scalability to large teams) while marginally sacrificing global accuracy. Theoretical upper bounds are derived for Lyapunov and barrier function errors incurred by the partition approximation, showing that the error diminishes as the robots are more spatially separated.
Simulation and Experimental Results
Single-Robot Regimes
Extensive Monte Carlo simulations highlight the failings of OC: the controller overestimates safety near hazard boundaries, as the resetting of PDFs due to fresh localization measurements is ignored. SV-OBC and especially RV-OBC always maintain the safety barrier above threshold. Control effort and density-tracking are quantitatively evaluated—RV-OBC spends more energy near the target due to uniform field execution but avoids all constraint violation events.

Figure 3: Simulation scenario with single robot, target density (green PDF), and unsafe region (red), providing ground for evaluating all controller variants.






Figure 4: Qualitative time evolution—OC (left) diffuses to avoid constraints but underestimates real-time risk; SV-OBC (right) adapts locally and enforces safety more robustly.



Figure 5: Single agent: (top) control energy, (middle) safety barrier, (bottom) Lyapunov value—SV-OBC and RV-OBC outperform OC in safety and error minimization.
Multi-Robot and Scalability
With six agents, both RV-OBC and the Voronoi-accelerated variant RV-OBC-V satisfy safety invariance and converge rapidly to target densities, but RV-OBC-V achieves wall-clock runtimes that are essentially independent of team size, validating the scalability claim.



Figure 6: Six robots: control energy, safety barrier, and target error, averaged across 100 simulations—RV-OBC-V achieves near-identical safety with lower computation cost.












Figure 7: Simulation snapshots over time for RV-OBC (top) and RV-OBC-V (bottom). Voronoi partition allows per-robot cell assignment, with boundary misassignments sometimes possible when agents are extremely close, but safety maintained overall.

Figure 8: Empirical runtime vs. agent count—RV-OBC-V features sublinear scaling, while RV-OBC's cost grows rapidly with team size.
Physical Robot Experiments
A six-robot testbed with real localization and actuation noise validates the approach. The Voronoi-partitioned controller is shown to robustly avoid the (virtual) hazard and achieve the target aggregation, with minor fluctuations due to real-world uncertainties. Safety is maintained throughout, and Voronoi approximations of Lyapunov and barrier values track the true values accurately except when the swarm clusters unusually closely.












Figure 9: Experimental trajectories—robots (blue), true-and-measured positions, Voronoi boundaries (black), unsafe region (red), and target (gold); robots detour hazard region robustly.


Figure 10: Experimentally measured Lyapunov and barrier functions: Voronoi-based estimates (used online) closely track ground-truth, with minor deviations as robots become spatially dense.
Key Results and Claims
- Strong quantitative results demonstrate that the Voronoi-partitioned OBC enforces safety strictly in the presence of realistic sensor and actuator noise, where classical OC fails regardless of numerical tuning.
- Mathematical analysis proves that safety is easier to guarantee for sparse swarms: as agents become less clustered, both the quality of Voronoi partitioning and the accuracy of density estimation improve, and local safety constraints become less coupled. The bounds show that sparser multi-agent deployments minimize the probability of constraint violations.
- Scalability is achieved: RV-OBC-V actuates thousands of grid points with constant time complexity per agent per step.
- Contradicts conventional wisdom that denser, more synchronized swarming is always preferable—a result with implications for coverage, search-and-rescue, and distributed monitoring applications.
Implications and Future Directions
The methods developed in this work advance safety guarantees for stochastic density control in multi-agent systems beyond the current literature on PDE-constrained optimal control, by closing the practical gap between theoretical guarantees and implementability in the presence of both process noise and measurement resets.
Practically, these controllers are suitable for deployment in safety-critical swarm robotics contexts such as wildfire mitigation, dynamic search-and-rescue missions, and agricultural monitoring, where state-constrained navigation must be robust to the realities of real-world sensorimotor uncertainties.
Theoretically, future developments may further extend these results to non-uniform agent types, heterogeneous noise, continuous-time measurements, or more complex constraint sets (e.g., time-varying hazard regions, nonconvex safe sets). Distributed and hybrid implementations, leveraging asynchronous communication or hierarchical coverage architectures, also present promising directions.
Conclusion
This paper provides a rigorous and effective set of controllers for safety-critical density regulation in stochastic swarm systems governed by the Fokker-Planck equation. By integrating CLF and CBF techniques in both centralized and scalable Voronoi-partitioned optimization loops, it formally and empirically demonstrates robust safety preservation where classical OC fails, and challenges prevailing dogma about swarm density and safety. The results establish new benchmarks for the practical deployment and theoretical understanding of safety in large-scale, noisy multi-robot systems.
Reference:
"It Is Much Safer to Be Sparse than Connected'': Safe Control of Robotic Swarm Density Dynamics with PDE-Optimization with State Constraints" (2604.15516)