---
title: 'FiReFly: Fair Distributed UAV Planning'
url: https://www.emergentmind.com/topics/firefly
type: topic
---

# FiReFly: Fair Distributed UAV Planning

FiReFly is a fair and distributed receding horizon motion planning framework for teams of UAVs in which fairness is injected directly into multi-robot motion planning through the distribution of energy expenditures, while mission success and safety are preserved. In the formulation introduced in "FiReFly: Fair Distributed Receding Horizon Planning for Multiple UAVs" [2508.14381], the central problem is not merely reach-avoid planning, but fair allocation of control effort among robots with competing interests, using distributed optimization for open-loop planning and safe controllers for online execution.

## 1. Problem setting and conceptual scope

FiReFly addresses multi-UAV reach-avoid missions in settings where robots share airspace and can have competing interests over resource usage. The specific resource treated in the paper is energy expenditure. The framework is therefore built around the proposition that multi-robot motion planning should optimize not only feasibility and collision avoidance, but also some explicit notion of fairness in how the costs of mission completion are distributed across the team [2508.14381].

The planner is receding-horizon and distributed. At each planning step, the robots compute fair reference trajectories over a finite horizon, and execution then proceeds one step at a time. This structure places FiReFly in the class of online, repeatedly replanned controllers rather than one-shot offline trajectory optimizers. The distributed aspect is essential: each robot solves a local surrogate problem using the most recent information about the others’ plans, exchanges its updated plan, and repeats this process until convergence.

The safety problem is treated separately from the fairness problem. The paper explicitly notes that direct joint optimization of fairness and collision avoidance is computationally hard because the safety constraints are non-linear. FiReFly therefore decouples the two layers: a fair open-loop planner computes reference controls under mission constraints while ignoring collisions for tractability, and a safety module adjusts those controls online as little as possible to enforce obstacle avoidance, inter-robot separation, and goal progress [2508.14381].

A plausible implication is that FiReFly is best understood as a layered architecture rather than a monolithic optimizer: fairness determines the nominal motion plan, while safety determines the admissible executed motion.

## 2. Fairness objectives and energy-based formulations

The paper defines four fairness metrics, all minimized as objective functions in the motion planner. Two are based on normalized energy expenditure and two are based on energy surge variance [2508.14381].

For robot \(k\), normalized energy is defined as

$$
e_k := \frac{\|u_k\|^2}{\underline{e}_k} = \frac{1}{\underline{e}_k} \sum_t u_k[t]^2 ,
$$

where \(\underline{e}_k\) is the energy used by robot \(k\) on its own. From this quantity, the first fairness objective is the variance of normalized energy across the team:

$$
f_1(u) := \mathrm{Var}(\mathbf{e}) = \frac{1}{N}\sum_k \left(e_k - \frac{1}{N} \mathbf{1}^T \mathbf{e}\right)^2 .
$$

The paper states that perfect fairness is achieved when all \(e_k\) are equal, in which case \(f_1(u)=0\). A regularized variant trades fairness against aggregate energy use:

$$
f_2(u) = f_1(u) + \beta u^T Q u ,
$$

with \(\beta > 0\) and \(Q\) positive definite.

The second pair of objectives concerns energy surges. If \(M\) is a surge threshold, energy surge for robot \(k\) is

$$
z_k = \sum_{t=1}^{H_k} \left( |e_k[t] - e_k[t-1]| - M \right) .
$$

Variance in energy surge is then

$$
f_3(u) = \mathrm{Var}(\mathbf{z}) = \frac{1}{N}\sum_k \left(z_k - \frac{1}{N} \mathbf{1}^T \mathbf{z}\right)^2 ,
$$

with the regularized form

$$
f_4(u) = f_3(u) + \beta u^T Q u .
$$

These four objectives clarify that fairness in FiReFly is not an abstract ethical criterion; it is an optimization criterion instantiated as variance reduction over energy-related quantities. This suggests a deliberately operational notion of fairness: the method does not attempt to infer preferences or utilities, but instead equalizes measurable motion-planning costs.

## 3. Distributed receding-horizon planning algorithm

At each planning step, FiReFly solves a constrained optimization problem over the control sequence \(u\). In the paper’s formulation, the planner minimizes one of the fairness objectives \(f_1,f_2,f_3,f_4\) subject to linear dynamics, box-constrained inputs, terminal goal constraints, and consistency with previously executed controls [2508.14381]:

$$
\begin{align}
\min_{u} \quad & f(u) \\
\text{s.t.}~~ & s_k[t'+1] = \mathbf{A}_k s_k[t'] + \mathbf{B}_k u_k[t']~\forall~k, t' \\
              & u_k \in U_\text{box}~~\forall k \\
              & p_k[H_k] \in G_k ~~\forall k \\
              & u[t'] = u^{\leq t-1}[t']~\text{for}~0\leq t'\leq t-1 .
\end{align}
$$

The distributed solver is iterative. Each robot uses the most recent plans of the others, solves a local surrogate problem, updates its own contribution, and exchanges the updated plan. The paper states that each local subproblem is a convex optimization and that strong convexity and convergence are proven in the appendix. The overall loop is then embedded inside a receding-horizon controller.

The operational structure can be summarized exactly as given in the paper’s algorithmic description:

```pseudo
For t = 1 to H:
    1. Distributed fair planning (Alg. 1) => u^{fair}
    2. Solve safety controller for u^{safe}[t]
    3. Apply u^{safe}[t], update prefix, advance state.
End
```

This decomposition has two notable consequences. First, fairness is enforced at the planning level rather than as a post hoc evaluation metric. Second, because the planner is distributed, the framework is compatible with settings “without a central authority,” which the paper identifies as an implementation advantage.

## 4. Safety layer: Control Barrier Functions and Control Lyapunov Functions

FiReFly’s safety layer computes a minimally modified control input relative to the fair reference control. Obstacle avoidance and inter-robot separation are expressed through Control Barrier Functions, while progress toward the goal is expressed through a Control Lyapunov Function [2508.14381].

For obstacle avoidance, the paper defines

$$
h^o(s[t]) = \min_{k,o} \|p_k[t] - c_o\|^2 - r_o^2 ,
$$

and for inter-robot separation,

$$
h^c(s[t]) = \min_{k,j} \|p_j[t] - p_k[t]\|^2 - d_s^2 .
$$

These are combined as

$$
h(s[t]) = \min(h^o(s[t]), h^c(s[t])) .
$$

For goal reaching, the Control Lyapunov Function is

$$
V(s_k[t]) = \max_{k} \|s_k[t] - c_g \|^2 - r_g^2 .
$$

The executed safe control is then computed through the quadratic program

$$
u^{safe}[t] = \arg\min_{u[t],\delta} \|u[t] - u^{fair}[t]\|^2 + \delta^2
$$

subject to the CBF and CLF constraints.

This formulation is central to FiReFly’s architecture. The planner is allowed to optimize fairness without directly encoding non-linear collision constraints, and the safety controller then projects the fair control into the safe admissible set while penalizing deviation from the fair plan. The paper reports both centralized safe control and distributed safe control variants, with distributed safety integration performing better in the obstacle experiments.

A plausible implication is that fairness in FiReFly is always contingent: it is optimized first, but only insofar as it remains compatible with safety corrections at execution time.

## 5. Experimental results, runtime, and scalability

The paper evaluates FiReFly in simulated reach-avoid missions using two principal studies: an obstacles experiment with \(N=5\) UAVs and a scalability experiment varying team size from \(7\) to \(50\) UAVs [2508.14381].

In the obstacles experiment, the reported metrics are mission success rate and fairness improvement over a non-fair baseline. The paper states that FiReFly with distributed safe control achieves **100% mission success and always improved fairness** over a non-fair baseline across up to \(5\) obstacles. It also states that FiReFly with centralized safe control is less robust as the number of obstacles increases. The summary interpretation given in the paper is that both safety and fairness benefit from explicit fairness optimization, with the best results obtained using distributed safety integration.

In the scalability experiment, the paper reports that real-time performance is achievable up to \(15\) UAVs, with the fair planning step in \(<0.01\) s and the safety step in \(<0.03\) s per step. It further reports that scaling to \(50\) UAVs remains practical, though with trade-offs: runtime grows, fairness improvement flattens for very large teams such as \(20\) or \(50\), and tighter convergence in planning can recover some fairness at the price of much higher runtime. Mission success stays near \(100\%\) for all tested team sizes.

The paper also compares FiReFly to FairFly, describing FiReFly’s distributed online approach as orders of magnitude faster and noting that FairFly times out above \(15\) UAVs.

| # UAVs | FiReFly Fair Plan (mean, s) | FiReFly Safe Ctrl (mean, s) |
|---|---:|---:|
| 7 | 0.005 | 0.011 |
| 15 | 0.010 | 0.021 |
| 50 | 0.014 | 0.053 |

The corresponding FairFly means listed in the paper are \(35.742\) s for \(7\) UAVs, \(109.711\) s for \(15\) UAVs, and TIMEOUT \((>300\ \text{secs})\) for \(50\) UAVs. These figures establish the paper’s principal empirical claim: fair online planning need not preclude millisecond-scale control updates, at least for the simulated linear-dynamics setting studied in FiReFly.

## 6. Implementation details, interpretation, and limitations

The implementation reported in the paper uses Python with JAXopt for local distributed solves and MOSEK for central QP-based safe control. Simulations were run on high-performance clusters, although the reported per-step compute times are described as fast enough for onboard or embedded feasibility up to moderate team sizes [2508.14381]. The paper further identifies convergence tolerance \(\eta\) and replanning frequency as the main controls over the fairness-quality/runtime trade-off.

The authors present FiReFly as the first framework to provide distributed, scalable, safe, and fair multi-robot motion planning based on online optimization of resource equity. Within the article’s own scope, the most important substantive claim is that explicit fairness optimization can improve not only fairness itself but also mission success rates relative to a non-fair planner, especially in congested environments.

The paper also delineates several future directions: extension to more sophisticated nonlinear or quadrotor dynamics, heterogeneous teams with diverse UAV models and energy profiles, robustness to modeling errors and their effect on fairness, and fairness notions for resources other than energy. These are not part of the demonstrated system, but they define the immediate research frontier around the method.

A recurring source of confusion is nomenclature. The literature contains multiple unrelated systems named FireFly, Firefly, or FIREFLY in areas such as spectral fitting, FPGA acceleration, visualization, optimization, and divertor design. In this context, **FiReFly** refers specifically to the fair distributed receding horizon planner for multiple UAVs introduced in 2025 [2508.14381]. This naming overlap suggests that citations by title or arXiv identifier are essential when discussing the method in interdisciplinary settings.

Source: https://www.emergentmind.com/topics/firefly