Indoor Drone Formation Control via UWB Localization

The demand for multi-drone collaborative operations has surged alongside the widespread application of drone technology across various industries. A particularly compelling application is the formation drone light show, which requires exquisite precision and synchronization. While outdoor formations can rely on GPS or BeiDou navigation systems, these technologies fail indoors due to signal blockage and multipath interference, leading to unreliable or unavailable positioning data. This fundamental limitation hinders the development of sophisticated indoor formation drone light show applications and other coordinated tasks in constrained environments like warehouses, factories, or large event halls. To address the critical need for precise indoor formation flight, our research focuses on utilizing Ultra-Wideband (UWB) localization technology as the cornerstone for drone swarm coordination algorithms. We have developed and tested an indoor formation flight system using quadcopter drones equipped with UWB modules, demonstrating a viable pathway for enabling complex, GPS-denied aerial displays and operations.

Satellite-based positioning systems, while effective outdoors, are unsuitable for indoor formation drone light show scenarios. Their signals are attenuated and reflected by walls and ceilings, causing significant errors, complete dropouts, and an inability to provide the centimeter-level accuracy required for safe, close-proximity flight. UWB technology offers a potent solution. It operates by transmitting data using extremely short, nanosecond-duration pulses across a very wide bandwidth (typically >500 MHz). This fundamental characteristic grants UWB several advantages for indoor localization: high time-domain resolution allowing precise time-of-arrival measurements, resilience to multipath interference (as the direct path signal can be distinguished from reflections), and low power spectral density enabling coexistence with other wireless services.

Fundamentals of UWB Ranging and Localization

The core of any formation control system is the ability for agents to know their own and each other’s positions. UWB enables this through precise distance measurement and geometric positioning algorithms.

UWB Two-Way Ranging (TWR)

The foundational concept is measuring the distance between two UWB modules (called nodes). A common and robust method is Two-Way Ranging. Consider two modules, Node A and Node B. The process begins with Node A transmitting a poll message at time \( T_{A1} \). Node B receives this message at its local time \( T_{B1} \). After a known processing delay, Node B transmits a response message at time \( T_{B2} \). Node A finally receives this response at time \( T_{A2} \). The round-trip time, excluding B’s processing time, is calculated. The time of flight (\( T_{tof} \)) of the signal is:

$$
T_{tof} = \frac{(T_{A2} – T_{A1}) – (T_{B2} – T_{B1})}{2}
$$

Given the speed of light (\( c \)), the distance (\( S \)) between the two nodes is:

$$
S = c \cdot T_{tof}
$$

This method synchronizes only the clocks within a single message exchange, reducing long-term clock drift errors and forming the basis for peer-to-peer distance measurement within a drone swarm.

TDOA-based Localization Algorithm

For absolute positioning within a defined space, a fixed infrastructure of UWB anchors is used. A common algorithm is Time Difference of Arrival (TDOA). In this scheme, a mobile tag (on the drone) emits a single UWB signal. Multiple stationary anchors at known coordinates receive this signal. The position of the tag is derived not from absolute arrival times (which would require precise synchronization between the tag and all anchors), but from the *differences* in arrival times between anchor pairs.

The constant difference in distance from the tag to two anchors defines a hyperboloid surface. In 3D space, the tag must lie on the intersection of multiple such hyperboloids. With four or more anchors, a unique 3D position fix can be obtained. This is why TDOA is also called the hyperbolic positioning algorithm.

Let the coordinates of four anchors be \( A(x_1, y_1, z_1) \), \( B(x_2, y_2, z_2) \), \( C(x_3, y_3, z_3) \), and \( D(x_4, y_4, z_4) \). Let the unknown tag position be \( P(x, y, z) \). The measured distances from the tag to each anchor are \( r_1, r_2, r_3, r_4 \). The relationship is given by the set of spherical equations:

$$
\begin{aligned}
r_1^2 &= (x – x_1)^2 + (y – y_1)^2 + (z – z_1)^2 \\
r_2^2 &= (x – x_2)^2 + (y – y_2)^2 + (z – z_2)^2 \\
r_3^2 &= (x – x_3)^2 + (y – y_3)^2 + (z – z_3)^2 \\
r_4^2 &= (x – x_4)^2 + (y – y_4)^2 + (z – z_4)^2
\end{aligned}
$$

However, in TDOA, we measure time differences, not absolute distances. By subtracting one equation from another (e.g., using anchor A as a reference), we eliminate the \( r_1 \) term and form hyperbolic equations. For instance, the equation derived from the difference between anchors A and B is:

$$
r_{2,1} = r_2 – r_1 = \sqrt{(x – x_2)^2 + (y – y_2)^2 + (z – z_2)^2} – \sqrt{(x – x_1)^2 + (y – y_1)^2 + (z – z_1)^2}
$$

Where \( r_{2,1} \) is proportional to the measured time difference \( \Delta t_{2,1} \) multiplied by the speed of light (\( c \cdot \Delta t_{2,1} \)). Solving this system of nonlinear hyperbolic equations (typically via linearization methods like Least Squares) yields the tag’s 3D coordinates \( (x, y, z) \). This method is efficient as the tag broadcasts only once, and all anchors listen, making it highly scalable for a formation drone light show with many drones.

The following table summarizes key indoor positioning technologies, highlighting UWB’s advantages for drone formation control:

>High multipath resistance, high update rate, cm-level precision potential.

>Uses existing infrastructure.

>Low power, ubiquitous.

>No infrastructure needed, provides dense map.
>Computationally intensive, sensitive to lighting (visual), drift over time.

Technology Principle Accuracy Advantages Disadvantages for Drone Formation
UWB Time-of-Flight / TDOA 10-30 cm Requires infrastructure (anchors), limited range (~100m).
Wi-Fi RSSI Fingerprinting / Trilateration 3-15 m Low accuracy, unstable signal, poor multipath handling.
Bluetooth (BLE) RSSI Trilateration 2-5 m Low accuracy, sensitive to environment.
Visual/LiDAR SLAM Feature Matching / Laser scanning cm-level

Indoor Drone Formation System Architecture

Our implemented system integrates UWB localization with multi-rotor drone control to achieve coordinated flight. The architecture is designed to be modular and scalable, suitable for evolving a simple two-drone test into a complex formation drone light show.

Hardware Components

The system comprises several key hardware elements, summarized below:

>”X” or “+” configuration frame, brushless motors, ESCs, propellers.

>Low-level stabilization, attitude control, motor mixing.
>Open-source autopilot (e.g., Pixhawk, APM).

>Decawave DWM1000 or Qorvo DW3000 modules, positioned at known room coordinates.

>Same UWB module as anchors, configured as a tag.

>Bridge between UWB tag and flight controller.
>STM32, Arduino, or similar. Parses position data and generates flight commands.

>Mission planning, monitoring, and high-level command.
>Mission Planner, QGroundControl, or custom software (Nassistant).

Component Role Specification / Model
Quadcopter Platform Flight vehicle.
Flight Controller
UWB Anchors (4+) Fixed infrastructure for TDOA.
UWB Tag Mobile node attached to each drone for positioning.
Microcontroller (MCU)
Ground Control Station (GCS)

The core workflow is as follows: The UWB tag on each drone periodically broadcasts its unique signal. The fixed anchors receive these signals and calculate their time differences. A central positioning engine (running on a server or one of the anchors) uses the TDOA algorithm to compute the 3D coordinates of every tag in real-time. These coordinates are then wirelessly transmitted back to the respective drones. An onboard MCU on each drone receives its own position, compares it to its assigned target position within the formation, and generates corrective pitch, roll, yaw, and throttle commands. These commands are sent to the flight controller via a standard protocol (e.g., MAVLink), which executes them to adjust the drone’s motors and achieve the desired movement.

Formation Control Strategy: Leader-Follower

To manage the complexity of controlling multiple drones, we adopted the well-established leader-follower strategy. This method treats the formation as a quasi-rigid body. A single entity, the leader, defines the formation’s trajectory. All other drones (followers) are tasked with maintaining a predefined geometric offset (distance and bearing) relative to the leader.

In our implementation, we innovated by employing a “virtual leader.” Instead of designating a physical drone as the leader, we used a software-generated trajectory or a manually controlled UWB tag as the reference point. This virtual leader’s coordinates \( P_L(t) = (x_L(t), y_L(t), z_L(t)) \) are broadcast to all follower drones. Each follower \( i \) has a predefined offset vector \( \Delta_i = (\delta x_i, \delta y_i, \delta z_i) \) defined in the formation’s body frame. The follower’s target position \( P_{T_i}(t) \) is:

$$
P_{T_i}(t) = P_L(t) + R(\psi_L(t)) \cdot \Delta_i
$$

Where \( R(\psi_L(t)) \) is a 2D rotation matrix based on the virtual leader’s current yaw angle \( \psi_L(t) \). This allows the formation to rotate and move as a cohesive unit. The control objective for each follower’s MCU is to minimize the position error \( e_i(t) \):

$$
e_i(t) = P_{T_i}(t) – P_{actual_i}(t)
$$

A Proportional-Integral-Derivative (PID) controller is commonly used to translate this position error into velocity or acceleration commands for the flight controller. The follower drone adjusts its motors to reduce \( e_i(t) \) to zero, thereby locking into its assigned slot in the formation. This approach dramatically simplifies the control problem for a formation drone light show, as only the virtual leader’s path needs to be choreographed.

System Integration and Experimental Validation

The practical realization of this system involved significant software and hardware integration work, followed by iterative flight testing.

Software Communication Protocol

A critical challenge was ensuring robust, low-latency communication between the UWB positioning system and the drone’s flight controller. The raw data from the UWB positioning engine needed to be packaged, transmitted, parsed, and acted upon reliably. We developed a lightweight, custom communication protocol between the MCU and the flight controller. The MCU, connected to the UWB tag via UART, continuously listens for position update frames. Upon receiving a valid frame containing the drone’s own \( (x, y, z) \) coordinates, it executes the following control logic:

  1. Calculate Target Position: Retrieve the virtual leader’s latest position and the drone’s assigned offset to compute \( P_{T_i} \).
  2. Compute Error: \( e_i = P_{T_i} – P_{actual_i} \).
  3. PID Control: Apply PID control to the error vector to generate velocity setpoints in North, East, and Down (NED) coordinates.
    $$ \vec{V}_{sp} = K_p \cdot \vec{e} + K_i \cdot \int \vec{e} \, dt + K_d \cdot \frac{d\vec{e}}{dt} $$
  4. Command Transmission: Package these velocity setpoints into MAVLink messages (e.g., SET_POSITION_TARGET_LOCAL_NED) and send them to the flight controller via a second UART or serial connection.

Experimental Procedure and Tuning

The validation followed a structured, safety-first procedure to incrementally build up to full autonomous formation flight. The key steps are consolidated below:

>In Mission Planner, tune Position (P) gains for the velocity controller. Increase P until the drone responds quickly to position errors without oscillation. Adjust Derivative (D) gain to dampen overshoot.

>Program a simple geometric path (circle, square) for the virtual leader’s coordinates. Alternatively, use a hand-held UWB tag to record a manual path.

>Set a fixed offset (e.g., 2m north). Command follower to hold this offset while virtual leader moves. Monitor position error \( e_i \) in GCS and fine-tune PID gains for smooth following.

>Introduce a second follower with a different offset. Ensure communication and computation can handle multiple agents. Observe and manage inter-drone spacing.

>Test dynamic behavior.
>Command the formation to change shape by updating offset vectors \( \Delta_i \) in flight. Test speed changes of the virtual leader. The visualization software (like Nassistant) is crucial here to monitor the real-time trajectories of all drones and the leader, confirming that the formation maintains integrity during maneuvers.

Phase Objective Actions & Tuning
1. Single Drone Hover Tuning Achieve stable, precise position hold using UWB.
2. Virtual Leader Path Definition Create a repeatable reference trajectory.
3. Single Follower Test Validate leader-follower logic with one drone.
4. Multi-Follower Expansion Scale the formation.
5. Formation Maneuvers

During tuning, the visualization software proved indispensable. It displayed real-time 2D/3D plots of all UWB tag positions, allowing us to directly see the follower’s trajectory (red line) attempting to track the virtual leader’s path (blue line) with the defined offset. Deviations, oscillations, or lag were immediately apparent, guiding our PID gain adjustments. The primary metrics were steady-state position error (should be within 10-30 cm of the target) and the absence of destructive oscillations during aggressive maneuvers.

Key Findings and Challenges

The system successfully demonstrated basic indoor formation flight. Drones were able to establish and maintain geometric shapes (line, V-shape) while following a moving virtual leader. However, several challenges specific to UWB-based indoor formation were identified:

  1. Anchor Geometry and Coverage: The accuracy of TDOA is highly dependent on the geometric deployment of the anchors. Poor geometry (e.g., all anchors in a straight line) leads to dilution of precision (DOP) and large position errors. Anchors must be placed to surround the flight volume for good 3D coverage.
  2. Communication Latency: The entire loop—tag broadcast, TDOA calculation, data transmission to drone, MCU processing, flight controller response—introduces latency. For slow formations, this is manageable. For a high-speed, dynamic formation drone light show, this latency must be minimized through optimized hardware and protocols.
  3. Obstruction and NLOS: While UWB handles multipath well, non-line-of-sight (NLOS) conditions, where the direct signal path between tag and anchor is physically blocked, cause large, unpredictable errors. This is a critical safety concern for indoor flight.
  4. Scalability: As the number of drones increases, the UWB channel must handle more simultaneous tag broadcasts. Time-division multiple access (TDMA) schemes are often used in UWB systems to manage this, but they can limit the maximum update rate for large swarms.

Conclusion and Future Directions for Formation Drone Light Shows

This research validates UWB localization as a highly effective enabling technology for indoor drone formation control. By solving the fundamental problem of precise, real-time positioning in GPS-denied environments, it unlocks the potential for a new generation of applications, most notably the indoor formation drone light show. The leader-follower strategy, coupled with a virtual leader, provides a manageable framework for choreographing complex aerial displays where drones can form intricate, moving patterns with high spatial accuracy.

The future evolution of this technology for professional formation drone light show applications lies in addressing the current challenges and enhancing system capabilities. Key research directions include:

  • Sensor Fusion: Integrating UWB with onboard sensors like inertial measurement units (IMUs), optical flow, or miniature depth cameras. An Extended Kalman Filter (EKF) can fuse these data streams to provide smoother, higher-rate position estimates, reduce the impact of temporary UWB dropouts (NLOS), and improve overall robustness.
  • Advanced Formation Algorithms: Moving beyond simple leader-follower to behavior-based or consensus-based swarm algorithms. These allow for more resilient formations where there is no single point of failure (the leader) and enable emergent, self-organizing behaviors.
  • Dynamic Collision Avoidance: Integrating real-time, distributed obstacle avoidance algorithms. For a safe indoor formation drone light show, drones must not only hold their position but also actively avoid each other and static obstacles if the planned paths deviate due to disturbances.
  • Precision at Scale: Developing next-generation UWB protocols and multi-antenna systems (AOA – Angle of Arrival) to maintain centimeter-level accuracy and high update rates for swarms of hundreds of drones, pushing the boundaries of what is possible in an artistic formation drone light show.

In conclusion, the fusion of robust UWB positioning with agile multi-rotor platforms forms a powerful foundation. The path from a laboratory prototype to a commercial-grade indoor formation drone light show system is clear, requiring further refinement in reliability, scalability, and intelligent control. This technology promises to transform indoor spaces into canvases for dynamic, illuminated aerial artistry and revolutionize other fields such as automated inventory management, collaborative construction, and emergency response indoors.

Scroll to Top