In recent years, quadcopter unmanned aerial vehicles (UAVs) have gained significant attention due to their agility, reliability, and versatility in applications such as disaster monitoring, geological surveys, and agricultural protection. However, when operating in formations, quadcopters face challenges in maintaining efficient trajectories, especially as task complexity increases. This often leads to prolonged flight times, increased risk of collisions, and reduced battery life. Existing methods, such as those based on consensus theory and sliding mode control or multi-step particle swarm algorithms, have shown limitations in responsiveness and optimization effectiveness. To address these issues, we propose a novel approach for quadcopter formation trajectory optimization using an adaptive coyote algorithm. This method focuses on constructing a kinematic model of the quadcopter formation, setting constraints, planning paths with repulsive force functions, and minimizing errors between desired and actual distances to enhance flight efficiency.
The foundation of our approach lies in building a kinematic model for the quadcopter formation. We begin by analyzing the forces acting on the quadcopters using dual coordinate systems: a body frame and an inertial frame. The body frame origin is at the quadcopter’s center of mass, with axes aligned along the arms supporting the rotors, while the inertial frame is fixed at the takeoff point. This setup allows us to describe the quadcopter’s attitude and spatial position accurately. The attitude angles in the body frame are derived from the dynamics of the quadcopter, considering rotational inertia and control inputs. The equations for the attitude angles are as follows:
$$ \dot{\phi} = \frac{l U_2 + q r (I_y – I_z)}{I_x} $$
$$ \dot{\theta} = \frac{l U_3 + p r (I_z – I_x)}{I_y} $$
$$ \dot{\psi} = \frac{l U_4 + p q (I_x – I_y)}{I_z} $$
Here, \( I_x, I_y, I_z \) represent the moments of inertia along the respective axes, \( l \) is the distance from the center of mass to the rotor, \( U_2, U_3, U_4 \) are control inputs, and \( p, q, r \) denote angular velocities. The kinematic model for the quadcopter formation’s position in the inertial frame is then expressed as:
$$ \dot{x} = \frac{U_1 (\cos\phi \sin\theta \cos\psi + \sin\phi \sin\psi)}{m} $$
$$ \dot{y} = \frac{U_1 (\cos\phi \sin\theta \sin\psi – \sin\phi \cos\psi)}{m} $$
$$ \dot{z} = \frac{U_1 (\cos\phi \cos\theta – m g)}{m} $$
In these equations, \( \dot{x}, \dot{y}, \dot{z} \) are the approximate spatial positions, \( U_1 \) is the primary control input, \( m \) is the mass of the quadcopter, and \( g \) is gravitational acceleration. This model captures the linear and rigid-body motions essential for trajectory optimization in quadcopter formations.

To ensure the kinematic model aligns with desired performance, we establish constraints based on the state variables of the quadcopter formation. The state variable \( D_{ki} \) is defined to relate actual and approximate positions over time nodes:
$$ D_{ki} = \frac{(\dot{y} + \dot{z}) P’_{k}(\tau_k) + P_k(\tau_k)}{\dot{x} (\tau_k – \tau_i)} $$
where \( P_k(\tau_i) \) is the actual value, \( P’_{k}(\tau_k) \) is the approximate value, \( \tau_k \) is the actual node, and \( \tau_i \) is the varying node. The constraints are set to maintain consistency in the quadcopter’s operational states, as shown below:
$$ X(\tau_f) = X(\tau_0) + \frac{t_f – t_0}{2} \sum_{k=1}^{2} \omega_k X(\tau_0) $$
$$ J = D_{ki} + \frac{t_f – t_0}{2} \sum_{k=1}^{2} \omega_k X_k $$
In these expressions, \( X(\tau_f) \) and \( X(\tau_0) \) represent the terminal and initial states, \( t_f \) and \( t_0 \) are the final and initial flight times, \( \omega_k \) is a weighting coefficient, \( J \) is the performance index function, and \( X_k \) denotes the state value at a specific time. These constraints ensure that the quadcopter formation adheres to predefined operational limits, facilitating stable and efficient flight.
Path planning for the quadcopter formation involves accounting for safe distances between quadcopters and obstacles. We introduce a repulsive force function based on danger zones to prevent collisions and maintain formation integrity. The repulsive force \( F \) is defined as:
$$ F = \begin{cases}
+\infty, & l_c(X,J) \in [0, R_Q] \\
b \left( \frac{1}{\rho_o} – \frac{1}{l_c(X,J)} \right)^2, & l_c(X,J) \in [R_Q, R_Q + \rho_o] \\
0, & l_c(X,J) \in [R_Q + \rho_o, +\infty)
\end{cases} $$
Here, \( b \) is the horizontal position of the quadcopter formation, \( R_Q \) is the radius of the formation zone, \( \rho_o \) is a weight parameter, and \( l_c(X,J) \) is the distance function between two points. This function ensures that quadcopters maintain a safe distance from danger zones, with infinite force applied if they are too close, a quadratic repulsive force in a buffer zone, and no force beyond that. The path planning then derives the flight speed and yaw angle:
$$ v = \frac{F}{m} \delta t $$
$$ \phi_1 = \frac{\pi}{2} F – \arctan\left( \frac{f_{qx}}{f_{qy}} \right) $$
where \( v \) is the flight speed, \( \delta t \) is the flight path, \( \phi_1 \) is the yaw angle, and \( f_{qx} \) and \( f_{qy} \) are the forces in the x and y directions, respectively. This approach allows the quadcopter formation to dynamically adjust its trajectory based on environmental factors.
The core of our optimization method is the adaptive coyote algorithm, which minimizes the error between the desired and actual distances of the quadcopter formation. The error \( e \) is computed as:
$$ e = X – \frac{t_k – t_{k-1}}{2} f(v, \phi_1, t_k, t_{k-1}) $$
where \( t_k \) and \( t_{k-1} \) are successive flight times. If \( e \) exceeds a predefined threshold, the algorithm iteratively adjusts the flight angles and speeds, updates the path, and adds discrete points to the trajectory until the error is minimized. This process ensures that the quadcopter formation follows an optimal path, reducing flight time and improving efficiency. The adaptive nature of the coyote algorithm allows it to handle dynamic changes in the formation’s environment, making it highly suitable for real-time quadcopter applications.
To validate our method, we conducted simulation experiments using six identical quadcopters. The initial parameters were constrained, and the quadcopters were required to hover at terminal positions. We compared our approach with existing methods, focusing on flight time to reach a planned position of 50 meters. The simulation parameters are summarized in the table below:
| Simulation Parameter | Value |
|---|---|
| Mass of Quadcopter (kg) | 0.087 |
| Length of Quadcopter (m) | 0.12 |
| Gravitational Acceleration (m/s²) | 9.8 |
| Moment of Inertia (I_x) (kg·m²) | 1.3186 × 10⁻⁴ |
| Moment of Inertia (I_y) (kg·m²) | 1.19696 × 10⁻⁴ |
| Moment of Inertia (I_z) (kg·m²) | 1.7998 × 10⁻⁴ |
| Angular Velocity Coefficient (N·m·s²/rad²) | 9.3054 × 10⁻³ |
The experiments were performed in a MATLAB environment with TOMLAB software, using an i3 processor at 2.93 GHz and 2 GB of RAM. The trajectory of the quadcopter formation was planned as shown in the figure, illustrating the path from start to end positions. Results demonstrated that our method achieved an average flight time of approximately 8 seconds to reach the planned position in the x, y, and z directions, whereas other methods exceeded 10 seconds. This significant reduction in flight time highlights the efficiency of our adaptive coyote algorithm in optimizing quadcopter formation trajectories. The improved performance is attributed to the algorithm’s ability to dynamically adjust paths and minimize errors, ensuring that the quadcopters maintain optimal spacing and avoid collisions.
In conclusion, our proposed method for quadcopter formation trajectory optimization, based on the adaptive coyote algorithm, effectively addresses the challenges of prolonged flight times and collision risks. By constructing a detailed kinematic model, setting appropriate constraints, and employing a repulsive force function for path planning, we achieve a robust optimization process. The adaptive coyote algorithm reduces errors between desired and actual distances, leading to faster and more efficient flights. Experimental results confirm that our approach outperforms existing methods, with an average flight time of 8 seconds, demonstrating its potential for enhancing quadcopter operations in various applications. Future work will focus on further refinements to achieve even better optimization outcomes, such as incorporating real-time environmental data and expanding to larger quadcopter formations.
