1. Introduction
In complex natural environments such as mountains and forests, there are many blind spots in manual inspection. UAV inspection solves the problem that traditional ground inspection mode is affected by terrain, manpower and equipment performance [
1] and cannot be carried out efficiently in complex dynamic environments. UAVs have the characteristics of full coverage and flexible mobility, which can make up for the shortcomings of manual inspection. When a single UAV operates alone in a complex dynamic environment, its sensor field of view is limited. This makes it difficult to effectively inspect moving targets or targets that are occluded. Moreover, a single UAV has poor endurance [
2]. It cannot perform long-term, large-area inspection tasks. It also lacks dynamic obstacle avoidance capability. In complex dynamic environments, UAV multi-unit collaborative inspection technology has emerged. UAV multi-unit collaborative inspection technology improves the robustness, inspection efficiency and inspection coverage of UAV multi-unit inspection through task dynamic allocation, multi-unit information sharing and trajectory collaborative optimization [
3]. When UAVs perform collaborative inspection tasks, they need to have strong dynamic adjustment ability and real-time obstacle avoidance ability. The UAV inspection mission covers a variety of scenarios such as environmental monitoring, power inspection, and emergency response. It is necessary to dynamically allocate sub-tasks based on the priority of the inspection mission, the target type, and the characteristics of the sensors carried, and to optimize the trajectory [
4]. When planning the trajectory of multi-UAV collaborative inspection, it is necessary to comprehensively consider the kinematic constraints, communication constraints, sensor constraints, and flight safety of the UAV. At the same time, it is necessary to achieve a balance between global optimization and local response and avoid the situation of computational delay caused by the centralized control of multiple UAVs [
5]. Model Predictive Control (MPC) is a rolling time domain optimization method. It solves the constrained optimization problem by predicting the dynamics of the system in the future fixed time domain. It has strong adaptability to complex dynamic environments. Applying the MPC method to the trajectory planning of multi-UAV collaborative inspection can improve the adaptability of multi-UAV collaborative inspection to complex dynamic environments.
In order to achieve the best path planning effect for UAVs, Ahmadi et al. [
6] studied the UAV path planning method for automated delivery systems that considers the influence of wind. This method constructs a mathematical model for UAV delivery by using the gravitational wind influence coefficient to simulate the motion state of UAVs under complex weather conditions; it constructs an optimization model by combining multiple dimensions such as delivery time, energy consumption, and equipment load, so that UAVs can automatically estimate the endurance time and generate the optimal delivery path under strong headwind conditions. However, the introduction of wind parameters will improve the nonlinear characteristics of the model, and this method relies too much on meteorological forecast data and sensor detection data, which is prone to path planning deviation due to the lack of sensor data. Alqudsi et al. [
7] studied the path guidance method for autonomous swarm UAVs in a dynamically constrained environment. This method uses the improved A* algorithm and dynamic window algorithm to enable the swarm to generate the optimal path quickly in a complex environment. There is no single control node in the swarm. When random UAVs are disturbed or malfunction, other UAVs can reorganize the task allocation through information interaction methods. Through autonomous decision-making based on local information, the dependence on central control is reduced. However, local planning methods such as dynamic window algorithm are prone to path generation results that are too tortuous due to inertial constraints, which affects the path guidance efficiency. Rinaldi et al. [
8] combined sound tracking with deep deterministic policy gradient algorithm to realize path planning in urban UAV inspection tasks. This method uses sound tracking technology to capture and process sound signals in real time and accurately locates the sound source by analyzing the sound reflection characteristics and propagation path; based on the sound source location determination result, the path planning result is generated by deep deterministic policy gradient algorithm. However, this method needs to introduce external noise in the path planning process, and the deep deterministic policy gradient algorithm is prone to overestimating the Q value, which affects the accuracy of UAV path planning. Shahbazi et al. [
9] combined the optimal fuzzy fractional control method and the near-end policy optimization method to realize the path planning of quadcopter UAV. This method introduces fractional derivative and integral operators to more accurately describe the dynamic characteristics of UAV, uses fuzzy rules to dynamically adjust control parameters, and solves the problem of unstable policy update in traditional reinforcement learning by setting the pruning objective function and trust domain mechanism, and can adapt to the real-time changes in dynamic obstacles. However, when adjusting the control parameters, this method relies too much on the completeness of the fuzzy rule library and it is very easy to affect the path planning result due to unreasonable fuzzy rule design.
Based on this, this paper studies the UAV multi-aircraft collaborative inspection track planning method in complex dynamic environments, providing theoretical support for UAV collaborative inspection in complex dynamic environments.
2. UAV Multi-Aircraft Collaborative Inspection Track Planning Method
2.1. UAV Motion Model Construction
By constructing a UAV motion model, the flight motion law of the UAV is accurately presented, providing a theoretical basis for subsequent UAV multi-aircraft collaborative inspection track planning. When constructing the UAV motion model, factors such as UAV mass, inertia, aerodynamic characteristics and control response delay are ignored [
10]. The UAV three-dimensional space motion model is constructed using the assumption of an ideal flight control system as follows:
In Formula (1), the state vector corresponds to the UAV’s plane position, heading angle, flight speed and turning rate at a certain moment; and are the expected speed and expected turning rate of the UAV flight control system, respectively; and are the execution delay time constant of the UAV speed and turning rate.
The control input
must satisfy the following maneuver constraints:
In the above formula, is the nominal cruise speed of the UAV; and are the maximum speed adjustment range and minimum turning radius of the UAV, respectively.
When the UAV is running in a complex dynamic environment, its sensors and control system adopt a discretized working mode. The continuous time motion model of Formula (1) cannot meet the inspection requirements of the UAV [
11]. Therefore, the motion model of Formula (1) is discretized by Euler integral method to obtain the state update equation of the UAV in a complex dynamic environment as follows:
In Formula (4), is the sensor sampling period.
The sensor sampling period needs to be consistent with the data interaction frequency of UAVs collaboration to ensure the synchronization of formation information and the real-time update of trajectory [
12]. The motion model is used as the basic controlled object model of the MPC method to provide a model basis for multi-aircraft collaborative inspection trajectory planning.
2.2. Inspection Trajectory Tracking Planning Model Based on Model Predictive Control Method
When planning the multi-aircraft collaborative inspection trajectory of UAVs, the open-loop optimization method cannot resist the dynamic environmental disturbance and the multi-aircraft formation coordination deviation. Therefore, the MPC method is introduced to carry out closed-loop control of trajectory planning to achieve accurate tracking and real-time correction of the trajectory. The MPC method uses the global planned trajectory as the UAV’s tracking reference command to fine-tune the UAV’s flight state and improve the dynamic response speed of the inspection trajectory planning [
13].
and
represent the UAV state variables composed of UAV flight speed, angle of attack, pitch rate, pitch angle, engine power and trajectory angle and the output variables containing the desired flight speed and desired trajectory angle [
14], and
represents the control variables containing throttle control and elevator deflection. Combining the flight mechanics and discrete control characteristics of UAVs, the controlled object of the UAV is discretized according to the sampling period, and the state space equation is as follows:
In Formula (5), and are the discrete input matrix and the discrete state matrix, respectively; is the discrete output matrix.
In order to suppress the influence of environmental or state changes during UAV flight and improve the flight stability of UAV [
15], the expressions of UAV state increment and inspection trajectory planning control increment are defined as follows:
In order to eliminate steady-state tracking error by using integral link [
16], augmented state variable
is introduced, and the integral augmented state space equation corresponding to UAV is obtained as follows:
In Formula (7), , , are the augmented matrix.
Based on Formula (7), augmented recursion is performed to obtain the unified prediction expression of the UAV state variables in the prediction time domain as follows:
In Formula (8), represents the augmented state at the th moment predicted based on the state at the th moment.
The state prediction value of the UAV is derived based on the augmented state mapping of the UAV, and its expression is as follows:
Based on the state and output prediction derivation of the above integral augmented model, the dynamic motion law of the UAV multi-aircraft collaborative system in the MPC prediction time domain is clarified [
17]. The current UAV state is obtained through the sensor. Subsequently, it is only necessary to construct the optimization target of the inspection trajectory tracking planning around the control increment sequence and solve the optimal control command that satisfies the constraints. This greatly reduces the online computation overhead of UAV multi-aircraft collaboration in complex dynamic environments and ensures the real-time performance of inspection trajectory planning.
In order to simultaneously ensure the tracking accuracy and control stability of UAV multi-aircraft collaborative trajectory [
18], the MPC quadratic optimization objective function is constructed as follows:
In Formula (10), is the optimization objective at time ; is the reference track; is the UAV state prediction output; and are the positive definite weighted matrix that balances the tracking error and the cost of control increment.
Combining the maneuverability and flight safety requirements of UAVs, the expressions for applying hard constraints on input, input increment and output to Formula (10) are as follows:
In Formula (11), and are the lower limit and upper limit threshold of the control quantity in the control time domain, respectively; and are the lower limit and upper limit threshold of the control increment in the control time domain, respectively; and are the lower limit and upper limit threshold of the final output, respectively.
The objective function constructed by Formula (10) is a standard quadratic programming problem. It is solved by the original dual method combined with linear constraints. The UAV multi-machine cooperative state is refreshed at the next moment and rolled optimization is performed again to balance the solution efficiency and the real-time performance of multi-machine cooperation, thereby improving the performance of UAV multi-machine cooperative inspection trajectory planning in complex dynamic environments.
2.3. Modeling of Complex Dynamic Environment for Trajectory Planning Considering Sudden Threats
Considering the complex dynamic environment of UAV multi-aircraft collaborative inspection, a complex dynamic environment model for trajectory planning considering sudden threats is constructed to clarify the distribution law of static obstacles and dynamic threats in UAV multi-aircraft collaborative inspection, so that the trajectory planning results are more in line with the actual dynamic complex scene and avoid the conflict between the planned trajectory and the environment. In the trajectory planning of UAV multi-aircraft collaborative inspection in complex dynamic environment, static terrain obstacles and sudden threats during flight need to be considered at the same time [
19]. The mission environment and sudden threats are modeled separately to construct a complete environmental constraint system for UAV inspection, and to provide constraint input for the objective function of subsequent inspection trajectory planning.
In complex dynamic environment, the actual inspection scene of UAV is mostly complex terrain such as mountains and hills. Static mountain obstacles are the main natural threats of UAV inspection. If the trajectory planning does not consider the terrain undulation, it is very easy to cause a collision accident. In order to simulate the complex terrain of the inspection area, a static obstacle model was constructed based on the mountain peaks. The height field expression is as follows:
In Formula (12), and are the obstacle number and its vertical height respectively; and are the plane projection coordinates of any point and the center position coordinates of the obstacle respectively; and are the slope extension coefficients of the obstacle in the axis direction and axis direction respectively; is the terrain height corresponding to the projection point.
The Digital Elevation Model (DEM) data for the experimental area was obtained from LiDAR drone aerial surveying (flight altitude: 120 m, point cloud density: 15 points/m2), which was processed to generate a 1 m × 1 m raster elevation map. The parameters of the mountain peak model, including the center position, height, and slope extension coefficient, are obtained by fitting the mountain-like terrain using the least-squares method. Specifically, local elevations in the DEM are fitted to the form of Equation (12) to determine each set of parameters.
In the MPC prediction model, this paper treats wind speed and wind direction as spatio-temporally varying random fields, with wind speed considered a measurable disturbance obtained in real time via airborne anemometers or ground-based weather station data. A feedforward compensation term is incorporated into the prediction equation. Uncertainty is addressed through a robust variant of MPC, which accounts for wind speed error margins within the prediction time horizon.
In addition to fixed static terrain obstacles, sudden dynamic threats may also be encountered during the inspection process. These threats have the characteristics of randomness and temporality. If they are not modeled and avoided in advance, they will seriously threaten the safety of the inspection [
20]. Common sudden threats include sudden weather disturbances, temporary radar detection, and floating objects in the air. Due to the variety of actual sudden threats, it is difficult to describe them accurately with a unified analytical formula. The expression of a three-dimensional spherical threat area is simplified as follows:
In Formula (13), is the coordinate of the center position of the threat sphere; is the safety influence radius of the sudden threat; is the coordinate of any point in space.
The coordinate of the center position of the threat sphere can change dynamically with time to simulate the movement of the threat. The UAV needs to stay outside the sphere to achieve real-time avoidance of sudden threats.
2.4. Constraints and Objective Function Settings for UAV Multi-Aircraft Collaborative Inspection Trajectory Planning
Combining UAV flight mechanical constraints, MPC constraints, terrain constraints and multi-aircraft collaborative rules, a total objective function integrating single-aircraft performance and formation safety is constructed, a reference trajectory is generated and transmitted to the MPC method, and the adaptability of UAV multi-aircraft collaborative inspection trajectory planning to complex dynamic environments is improved.
2.4.1. Core Constraints
(1) Flight altitude constraint.
If the UAV’s flight altitude is too high, the inspection imaging accuracy will be reduced. If it is too low, it will easily touch terrain obstacles. Therefore, a reasonable altitude range needs to be set. The minimum and maximum flight altitudes are pre-set based on the terrain information of the inspection area to adapt to the undulating terrain environment and meet the requirements of the inspection task. The flight altitude of the UAV in each flight path segment must meet the following expression:
In Formula (14), is the minimum safe flight altitude; is the maximum allowable flight altitude; is the height of the th trajectory point.
(2) Pitch angle constraint.
If the pitch angle of the UAV is too large, it will not only exceed the mechanical load limit, but also cause the fuselage to become unstable, affecting the coordination stability of the multi-aircraft formation. Therefore, the pitch angle variation range needs to be strictly limited. Although the UAV has good maneuverability, due to the mechanical structure limitation and the safety requirements of multi-aircraft coordination, the pitch angle
of the UAV in each flight path segment must meet the following expression:
In Formula (15), is the maximum allowable pitch angle.
To further quantify the degree of pitch angle violation, a piecewise pitch angle cost function
is constructed to limit pitch angles exceeding the safe range. Its expression is as follows:
In Formula (16), is the pitch angle penalty factor.
(3) Horizontal turning angle constraint.
When the horizontal turning angle of the UAV is too large, it increases its flight resistance, which can easily lead to a tortuous flight path, or even a collision between UAVs in formation. The horizontal turning angle constraint of the UAV formation is set as follows:
In Formula (17), is the horizontal turning angle of the th trajectory point; is the maximum allowable horizontal turning angle.
Construct a horizontal turning angle cost function
to penalize illegal turning behavior. Its expression is as follows:
In Formula (18), is the horizontal turning angle penalty factor.
(4) Terrain constraints.
To avoid collisions between the UAV and static terrain, in addition to altitude constraints, a terrain safety margin must be set to ensure that the trajectory altitude is always higher than the corresponding terrain altitude. In complex terrain inspection scenarios, each trajectory segment must meet the following terrain constraints:
In Formula (19), is the altitude of the th trajectory; is the terrain altitude of the corresponding trajectory segment; is the terrain safety altitude margin.
To prevent terrain collisions, a rigid obstacle avoidance cost function
is set as follows:
Once the UAV’s flight path touches the terrain obstacle area, the illegal flight path is directly abandoned.
(5) Multi-aircraft collision avoidance constraint.
When flying in formation, the UAVs are prone to collisions if the distance between them is too small. Therefore, it is necessary to set a safe distance threshold, construct a collision avoidance cost function, and ensure the safety of the formation space. The collision avoidance constraint function is set as follows:
In Formula (21), is the number of UAVs; is the real-time distance between UAVs; is the formation safety distance.
2.4.2. Objective Function for Multi-Aircraft Collaborative Optimization of UAVs
(1) Flight range cost.
The flight range directly determines the time and energy consumption of the inspection task. It is the core indicator for measuring the inspection efficiency. Shortening the flight range can effectively improve the economy of multi-aircraft collaborative inspection. In multi-aircraft collaborative inspection tasks, flight distance is the core indicator for evaluating track efficiency. The calculation method of flight distance cost is as follows:
In Formula (22), is the length of a single track segment; is the total number of track segments. represents the instantaneous total current of the UAV power system, and its magnitude directly reflects the energy consumption increase associated with maneuvering. In this paper, we used a power test bench to characterize the current variation patterns during hovering, cruising, and various flight attitudes. By incorporating this current data into the range cost, we established a weighted energy consumption target, enabling flight path planning that balances flight efficiency and energy efficiency.
(2) Comprehensive cost function of a single UAV.
By integrating flight distance cost
, pitch angle attitude penalty
, horizontal turning angle cost
, and terrain constraint
, the comprehensive cost function of a single UAV track is constructed as follows:
In Formula (23), , , , are the non-negative weight coefficient.
(3) Cluster overall objective function.
Integrating single-machine performance and formation safety requirements, construct an objective function for global optimization of the cluster to achieve global optimization of multi-machine collaborative trajectory. The objective function is set as follows:
In Formula (24), and are the optimization weight coefficients for balancing single-machine trajectory performance and formation collision avoidance safety, respectively.
The solution of Formula (24) serves as the optimization objective for global trajectory planning. This transforms the inspection trajectory planning problem into a constrained optimization problem. Based on the objective function from
Section 2.4, we consider constraints on flight altitude, attitude, terrain, obstacle avoidance, and formation safety. The optimal global reference trajectory is then generated. This reference trajectory is fed as a tracking command into the MPC framework described in
Section 2.2. Within the MPC, its own optimization objective is minimized to achieve tracking. This ensures high-precision, high-stability tracking of the global reference trajectory. Hard constraints on inputs and outputs are satisfied throughout. During actual flight, the MPC continuously updates control commands through rolling time domain optimization, effectively suppressing external dynamic disturbances and model mismatch errors. When a sudden threat is detected, it quickly performs online correction and replanning of the local trajectory. By generating a multi-aircraft cooperative reference trajectory through global optimization, and utilizing the MPC method to achieve a collaborative working mode of closed-loop tracking and online adjustment, the global optimality and safety of the inspection trajectory are ensured, while also possessing strong anti-interference and dynamic adaptability capabilities. This achieves the organic integration of multi-aircraft cooperative inspection trajectory planning and tracking control.
The computational resources for the method described in this paper are as follows:
Ground station: Intel i7-12700 CPU, 32 GB RAM, used for generating global reference flight paths. Using a sequential quadratic programming (SQP) solver (CasADi framework), a single solution takes approximately 4–6 s for 3 UAVs and 100 waypoints and is completed offline prior to takeoff.
Airborne Jetson Orin NX (NVIDIA, Santa Clara, CA, USA): 6-core ARM CPU + 1024-core GPU, used for MPC online rolling optimization. Each UAV operates independently with a control cycle of 20 ms (50 Hz). The solver uses the lightweight osqp-eigen library, with a single solution time of <5 ms.
The computational organization is as follows:
Global Layer (Centralized): The ground station solves the global optimization problem in Equation (24) based on static terrain, preset target points, and static obstacles, generates reference flight paths for each UAV, and uploads them to each UAV via a 4 G module.
Local Layer (Distributed): Each UAV independently runs MPC to track its own reference flight path. Multi-UAV collision avoidance constraints (Equation (21)) are implemented via a distributed consensus protocol: every 10 ms, each UAV broadcasts its predicted trajectory; if the distance to a neighboring UAV is detected to be less than the safety threshold, a collision avoidance penalty term is added to its respective MPC optimization, without the need for central coordination.
Sudden Threat Response Layer (Distributed): When any UAV detects a dynamic threat via its visual sensors, it broadcasts the threat’s position and motion vector to the formation. All UAVs treat this as a dynamic obstacle in their MPC predictions and independently perform local trajectory re-planning.
3. Experimental Analysis
To verify the effectiveness of the researched method for multi-drone collaborative inspection planning in complex dynamic environments, the method was applied to a complex mountainous and hilly terrain. This terrain included static mountain obstacles and dynamic sudden threats, simulating temporary weather disturbances and airborne objects. Three inspection target points were preset, requiring the drone formation to complete full coverage inspection and precise positioning of the target points. Three industrial-grade hexacopter drones were selected for physical flight testing, equipped with high-definition visible light sensors, GPS, Beidou positioning modules, and airborne flight control units. The experimental environment of the drone formation is shown in
Figure 1.
The parameter settings of the UAVs used in the experiment are shown in
Table 1.
The initial parameter settings of the UAV cluster are shown in
Table 2.
The control system used in this paper is integrated as follows:
Development Platform: The PX4 open-source flight controller (version 1.14) is used as the underlying flight controller, running on Pixhawk 6C hardware.
Computing Platform: An NVIDIA Jetson Orin NX (NVIDIA, Santa Clara, CA, USA) (8 GB RAM) is mounted on the aircraft, running Ubuntu 20.04 + ROS2 Humble, responsible for MPC rolling optimization and multi-aircraft cooperative decision-making.
Integration Method: The MPC tracking and planning model proposed in this paper runs as a ROS2 node on the Jetson, receiving global reference trajectories sent by the ground station and interacting with the PX4 flight controller’s MAVROS communication interface via UDP. The MPC node calculates desired velocity and heading angle commands (at a frequency of 50 Hz) and sends them to the PX4 position controller for execution. Collision avoidance constraints in multi-drone coordination are enforced by sharing predicted trajectories via inter-drone WiFi broadcasting (5.8 GHz, latency < 20 ms).
Ground Station: Used for offline optimization of global reference trajectories and real-time injection of sudden threats to simulate dynamic obstacle trajectories.
In-house Development Components: The MPC tracking controller, multi-drone cooperative decision-making module, and energy consumption model parameter identification tool were developed in-house; the underlying flight control and communication protocols utilize open-source frameworks.
The trajectory planning results of multi-machine collaborative inspection of UAVs obtained by the method in this paper are presented in three-dimensional and two-dimensional perspectives, respectively, as shown in
Figure 2.
Analysis of
Figure 2 shows that the three drones started from a parallel starting point and flew towards the dispersed target points, maintaining a stable longitudinal formation distance, avoiding the risk of collision between drones, and meeting the safety requirements of multi-drone collaborative inspection. The flight path altitude smoothly transitioned from the initial altitude to the target altitude, satisfying both the terrain safety altitude constraint and ensuring the inspection imaging accuracy, demonstrating the effective integration of altitude constraints and terrain obstacle avoidance. The 3D trajectory is smooth and continuous without drastic attitude changes, indicating that the proposed method generates a globally optimal reference trajectory while achieving high-precision and high-stability trajectory tracking through MPC, suppressing control abrupt changes and model errors. When traversing multiple gray obstacle areas, the trajectory achieves collision-free detours through local real-time corrections, demonstrating the reliable obstacle avoidance capability of the proposed method in complex dynamic environments and its ability to effectively cope with sudden threats. The UAV trajectories do not intersect or overlap, maintaining parallelism and exhibiting good formation operation order. The proposed method fully considers UAV altitude, attitude, and terrain constraints, effectively addressing dynamic obstacles and model disturbances in the environment. The proposed method can generate smooth and safe trajectories in complex dynamic environments.
In order to further verify the UAV multi-machine collaborative inspection trajectory planning of the method in this paper, the trajectory lengths of the method in this paper when performing different inspection tasks are statistically analyzed; all comparison methods (References [
6,
7,
8]) were tested under identical terrain data, static mountain obstacle locations and elevations, dynamic threat trajectories, and meteorological conditions. During the experiments, weather conditions were set as follows: wind speed < 3 m/s (Force 2), no precipitation, visibility > 5 km, and temperature 22 ± 3 °C. The motion trajectories of the dynamic threats were controlled by a predefined script to ensure consistency in the time of appearance, position, and movement speed of the threats in each experiment. Each method was run 10 times, and the average success rate was calculated. The statistical results are shown in
Figure 3.
Analysis of
Figure 3 shows that the proposed method has the shortest average trajectory length, verifying its extremely high reliability in inspection trajectory planning. The proposed method sets a multi-UAV cooperative optimization objective function with multiple constraints, fully considering formation safety and obstacle avoidance constraints, and can obtain the global shortest path planning result for multi-UAV cooperative operation, effectively shortening the UAV inspection range and reducing UAV flight time and energy consumption. The path length of the proposed method exhibits only minimal fluctuations, indicating that it maintains good optimization performance across different task scenarios and retains reliable planning performance even with changes in the number of tasks or the environment. In contrast, the path planning results generated by the comparative method tend to produce redundant detours, leading to increased path lengths. The proposed method, by combining MPC and multi-constraint optimization methods, searches for the shortest path for the UAV while avoiding obstacles, effectively balancing the safety and efficiency of UAV flight. Experimental results verify that the proposed method can cover more inspection points in a shorter time, reduce UAV battery consumption through a smaller average path length, effectively improve the UAV’s operating radius and endurance, and provide reliable efficiency assurance for complex tasks such as large-scale, long-distance inspections.
The success rate of dynamic obstacle avoidance in UAV multi-aircraft collaborative inspection trajectory planning using the method in this paper is statistically analyzed. The methods in references [
6,
7,
8] are selected as comparison methods. The statistical results are shown in
Figure 4.
Analyzing the experimental results in
Figure 4, the proposed method has the best dynamic obstacle avoidance performance, with a dynamic obstacle avoidance success rate consistently above 99.9%, and the curve exhibits minimal fluctuations, maintaining a near 100% obstacle avoidance success rate. The dynamic obstacle avoidance success rate of the method in reference [
8] is slightly lower than that of the method in this paper, indicating that the method has certain shortcomings in response capability when facing dynamic threats that move rapidly in complex dynamic environments. The obstacle avoidance success rate of the method in reference [
7] is between 99.5% and 99.7%. This method has a high fault tolerance rate when facing sudden dynamic threats, but there are some cases of distance approach or response lag, which reduces its dynamic obstacle avoidance success rate. The obstacle avoidance success rate of the method in reference [
6] is between that of the method in reference [
7] and the method in reference [
8]. This method lacks a robust compensation mechanism in complex dynamic environments, and the obstacle avoidance success rate decreases with the increase in inspection distance and inspection time. When the method in this paper generates the initial trajectory of UAV multi-aircraft collaboration through global optimization objective function, it fully considers the activity range of UAVs that have dynamic threats. Therefore, it can complete the obstacle avoidance path planning of UAVs in advance and use the rolling time domain optimization method of the MPC method to perceive the environmental changes around UAVs in real time. When the dynamic threat in the environment where the UAV is located deviates from the preset trajectory, this method can increase the safe distance between the UAV and the dynamic threat by fine-tuning the local trajectory and reduce the error accumulation in the UAV obstacle avoidance process.
To evaluate the mean squared error (MSE) of trajectory tracking for multi-drone collaborative inspection route planning using the method described in this paper, the MSE was calculated based on actual drone position data and interpolated points on the global reference trajectory corresponding to the same timestamps. The position data integrated GPS and an onboard inertial navigation system (INS), fused via an extended Kalman filter (EKF) with a sampling frequency of 50 Hz. An RTK base station was set up at the center of the experimental area to ensure centimeter-level global positioning. The statistical results are shown in
Figure 5.
The points in
Figure 5 correspond to the instantaneous MSE calculated from samples taken every 10 m along the entire inspection flight path; the final curve represents the average of 10 independent experiments. Analyzing the experimental results in
Figure 5, the mean square error of trajectory tracking of the proposed method is always the lowest in the entire inspection path range, which is significantly better than the methods in references [
6,
7,
8]. The mean square error of trajectory tracking of the proposed method is stable in the range of 0.02–0.04 km, with minimal fluctuation and a smooth curve. The mean square error of trajectory tracking of the method in reference [
7] is about 0.06–0.08 km; the error of the method in reference [
6] is about 0.08~0.11 km; the error of the method in reference [
8] increases continuously with the inspection distance, gradually increasing from 0.05 km to more than 0.12 km, and has the worst overall performance. The error curve of the proposed method fluctuates smoothly without obvious peaks, indicating that the MPC rolling optimization mechanism can effectively suppress error accumulation and maintain excellent control stability and robustness when facing model mismatch and environmental disturbances. The comparative method lacks online correction capability in complex dynamic environments, resulting in a high mean square error of trajectory tracking, which cannot meet the needs of inspection trajectory planning. The proposed method can effectively control the tracking error at a low level throughout the entire inspection process, meeting the needs of UAV inspection over long distances and for long periods, and providing a guarantee for reliable inspection of UAVs in complex dynamic environments, demonstrating that the proposed method has a strong anti-disturbance capability. The proposed method combines trajectory optimization with the MPC method, effectively suppressing the tracking error caused by environmental disturbances and providing a high-precision trajectory tracking guarantee for multi-UAV collaborative inspection.
4. Conclusions
Research on UAV multi-aircraft collaborative inspection trajectory planning under complex dynamic environments is conducted, and the following conclusions are drawn:
(1) By constructing a three-dimensional motion model of the UAV, an integral augmented MPC inspection trajectory tracking planning model, a complex environment constraint model and a multi-aircraft collaborative optimization objective function, the trajectory planning is transformed into a constrained rolling optimization problem, thus achieving the organic unity of global optimality and engineering feasibility.
(2) This method can strictly meet the constraints of flight altitude, pitch angle, horizontal turning angle, terrain obstacle avoidance and multi-aircraft formation collision avoidance, with no collisions and no violations throughout the process, ensuring the inherent safety of the inspection operation. While avoiding static obstacles and dynamic threats, the generated track is smooth and continuous with a shorter path length, which significantly improves the inspection efficiency and energy economy compared with the comparison method.
(3) The mean square error of trajectory tracking of the proposed method can be stabilized in the range of 0.02–0.04 km, and the error fluctuation is extremely small, which can effectively suppress environmental disturbances and has a strong anti-interference capability. This method has strong adaptability to complex dynamic environments and can meet the inspection needs of complex inspection scenarios. It is significantly better than the comparison method in terms of inspection efficiency, trajectory tracking accuracy and anti-disturbance ability, and has good prospects for engineering applications.
(4) However, this method still has certain limitations. For example, it simplifies sudden threats into uniform motion within a spherical region, whereas in real-world environments, the movement patterns of threats such as birds and other drones are more complex. Additionally, sensor detection is subject to delays and noise, necessitating the introduction of probabilistic models for further study.
It should be noted that the model developed in this paper includes multiple engineering parameters (such as penalty factors and weight coefficients), whose optimal values depend on the specific aircraft model and operational environment. Therefore, parameter tuning and optimization must be performed through hardware-in-the-loop simulation and actual flight testing prior to practical deployment. Furthermore, the control cycle of the MPC method must be adapted to the onboard computing capacity and communication latency. In this paper, a control frequency of 50 Hz was achieved on the Jetson Orin NX. For platforms with more limited computational resources, reducing the prediction time window or adopting an explicit MPC precalculation strategy may be considered.