A method for generating flight trajectories of distributed swarm UAVs in complex and unknown environments
Through the multi-layer trajectory planning structure, high-quality local flight trajectories are generated, which solves the problem of maintaining formation and safety of swarm drones in complex environments, and achieves efficient formation flight and obstacle avoidance capabilities.
Patent Information
- Application Number
- CN202210254926.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-15
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-03-15
AI Technical Summary
It is difficult for existing swarm UAVs to maintain formation and flight safety at the same time when flying in formation in a complex and unknown environment, and traditional methods can easily lead to trajectory oscillation or reduced coordination when obstacles exist.
Adopting a multi-layer trajectory planning structure, including user demand initialization, global trajectory planning, front-end reference trajectory generation, back-end trajectory optimization and re-planning inspection, high-quality local flight trajectories are generated through distributed methods to ensure that the UAV can operate in complex environments Maintain formation formation and avoid obstacles safely.
It has achieved high-quality, high-precision, and high-flexibility swarm UAV formation flight in a complex and unknown environment, ensuring the real-time and safety of flight trajectories, and has a high degree of flexibility to adapt to different levels of formation task priorities.
Smart Images

Figure CN114610066B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cooperative control of unmanned aerial vehicles, and in particular to a method for generating flight trajectories of a distributed cluster of unmanned aerial vehicles in a complex and unknown environment. Background Art
[0002] In recent years, the autonomous navigation technology of UAVs has become increasingly mature, but single UAVs still have shortcomings such as small single-machine payload, short flight time, and low system fault tolerance when performing tasks. Cluster UAVs have enhanced their ability to perform tasks through multi-machine redundant systems, effectively making up for the above-mentioned shortcomings. Therefore, the development of cluster UAV technology is imminent.
[0003] Among swarm drone technologies, there is a type of technology called swarm drone formation flight, that is, according to the mission requirements, swarm drones maintain a certain formation flight. This approach can significantly improve the collaborative ability of swarm drones to perform specific tasks. It has many applications in the military and civilian fields. For example, maintaining a circular formation can improve the cluster's perception of the same signal source, and maintaining a straight-line formation can improve the cluster's coverage.
[0004] When swarm drones perform formation navigation tasks in complex and unknown environments, they need to ensure at least the following three points: a. Maintain the formation of the drone cluster; b. Ensure flight safety in complex and unknown environments; c. Have the ability to switch formations during flight. Swarm drones understand the real-time status of themselves and the cluster through mutual communication, and adjust their own flight trajectory according to the real-time status to maintain the formation of the drone cluster. Taking into account the communication delay and insufficient onboard computing power, the calculation of the flight trajectory needs to adopt a rough to detailed guiding ideology. Through a multi-layer trajectory planning framework, different flight requirements are considered in different frameworks. For flight requirements that continue the entire mission, such as formation flight, they can be given priority in each layer of the planning framework, and for flight requirements with strong instantaneity, such as obstacle avoidance, they can be given priority in the flight trajectory planning actually executed in the last layer. Influenced by the literature [1] Inspired by the above idea, the swarm UAV formation flight trajectory generation framework has the ability to flexibly handle formation flight in complex and unknown environments. At the same time, due to the design of the multi-layer trajectory planning framework, swarm UAVs can complete high-quality, high-precision, and high-flexibility formation flight missions under the premise of greatly reducing computing resource consumption.
[0005] At present, many methods have been proposed in the field of swarm formation flying, such as virtual structure method, navigation function method, reaction behavior method and local feedback control method based on consistency theory, etc. However, most of these methods can only realize UAV swarm formation flying in open scenes without external obstacles.
[0006] In complex environments, the difficulty of formation flying missions increases significantly, mainly because each UAV must maintain the desired formation while also meeting the safety of cluster flight. One method is to achieve obstacle avoidance and formation maintenance of UAVs at the same time by designing feedback control laws. [2] In , Han et al. proposed a formation flight controller using a complex Laplace matrix as feedback gain. During the flight, the size of the formation is determined by the leader (leader), who controls the size of the overall formation to enable the cluster to complete a specific flight task, such as passing through a narrow gap. [3] In , Zhao proposed a control law based on the leader-follower framework, which can make the UAV formation undergo affine transformation according to the changes in the environment. Most feedback control methods adopt the leader-follower framework, but this mode makes the formation parameters controlled only by the leader. Once the leader fails, the flight of the entire cluster will fail.
[0007] Compared with the above-mentioned leader-follower framework, the decentralized strategy can better cope with the situation where some drones in the cluster fail. [4] In , Alonso-Mora et al. divided the trajectory planning of clustered UAVs into two stages. The first stage is to calculate the optimal formation parameters and the corresponding UAV-target point allocation relationship based on the current map information. The second stage is that each UAV independently performs local trajectory planning to reach the assigned target point based on the calculation results of the first stage. This method can achieve the avoidance of obstacles by UAV clusters, but because the formation requirements are not considered in the second stage, the real-time performance of the formation is very poor. [5] In , Zhou et al. used a virtual structure method and combined it with an artificial potential field method to generate collision-free formation flight trajectories. However, since local optimal points are prone to appear in the superimposed artificial potential field, the UAV cluster using this method is prone to trajectory oscillation or even deadlock during flight, and the optimality of the overall trajectory cannot be guaranteed. [6] In , Pary et al. proposed a method of using distributed model predictive control to achieve cluster formation flight. This method mainly maintains the geometric formation by imposing relative position constraints on drones. During the flight, once obstacles appear in the environment and the relative position requirements of drones cannot be met, the framework will abandon the formation coordination requirements to meet the safety of flight. Although this passive mechanism can ensure obstacle avoidance, it greatly reduces the coordination of the cluster system.
[0008] References:
[0009] [1]X.Zhou,Z.Wang,X.Wen,J.Zhu,C.Xu,and F.Gao,“Decentralized spatial-temporal trajectory planning for multicopter swarms,”arXiv preprint arXiv:,2021
[0010] [2]Z.Han,L.Wang,and Z.Lin,“Local formation control strategies withundetermined and determined formation scales for co-leader vehiclenetworks,”in 52nd IEEE Conference on Decision and Control.IEEE,2013,pp.7339–7344.
[0011] [3]S.Zhao,“Affifine formation maneuver control of multiagentsystems,”IEEE Transactions on Automatic Control,vol.63,no.12,pp.4140–4155,2018.
[0012] [4]J.Alonso-Mora,E.Montijano,M.Schwager,and D.Rus,“Distributedmulti-robot formation control among obstacles:A geometric and optimizationapproach with consensus,”in 2016 IEEE international conference on roboticsand automation(ICRA).IEEE,2016,pp.5356–5363.
[0013] [5] D. Zhou, Z. Wang, and M. Schwager, "Agile coordination and assistivecollision avoidance for quadrotor swarms using virtual structures," IEEE Transactions on Robotics, vol.34, no.4, pp.916–923, 2018.
[0014] [6] R. Van Parys and G. Pipeleers, “Distributed model predictive formation control with inter-vehicle collision avoidance,” in 2017 11th Asian Control Conference (ASCC). IEEE, 2017, pp. 2399–2404. Summary of the invention
[0015] In view of the shortcomings of the prior art, the present invention aims to provide a method for generating flight trajectories of a distributed cluster of UAVs in a complex and unknown environment.
[0016] In order to achieve the above object, the present invention adopts the following technical solution:
[0017] The method for generating flight trajectories of distributed swarm UAVs in complex unknown environments includes the following five steps:
[0018] (1) User demand initialization: Before the start of the automatic navigation task, the user needs to define the parameters of the swarm UAV formation according to the task type, including the number of UAVs, the desired formation formation, the target endpoint of the cluster geometric center, and the initial allocation of formation tasks; after the user completes the definition, the swarm UAVs will be distributed and started according to the user's definition to perform subsequent tasks;
[0019] (2) Global trajectory: First, without considering obstacles, a global trajectory connecting the current position of the UAV and the target position is generated as the guiding trajectory for the formation flight of the swarm UAVs under ideal conditions. Based on the global trajectory, the local endpoint reached after the set time from the current position is selected as the final state of the subsequent trajectory planning. After obtaining the local endpoint set of the swarm UAVs, it is determined whether the formation task allocation is optimal under the local endpoint set. If it is optimal, the subsequent steps are started with the task allocation corresponding to the current local endpoint set. If it is not optimal, the formation tasks are reallocated and the subsequent steps are started with the optimal task allocation corresponding to the calculated local endpoint set.
[0020] (3) Front-end reference trajectory: First, the current position and local end point of the UAV are used as the first and last states to perform a front-end multi-topology path search. After sampling and pruning, the topology path in the complex environment is obtained. Then, based on the optimal formation indicator, the topology with the best formation in the multi-topology path is selected, and a high-order continuous front-end reference trajectory is generated based on the optimal topology.
[0021] (4) Performing back-end optimization on the front-end reference trajectory generated in step (3): In order to generate high-quality local trajectories, a multi-objective trajectory optimization problem is constructed, and the similarity factors of UAV obstacle avoidance and formation flight are considered at the same time. The number of optimization variables is reduced in the form of discrete trajectories to ensure the real-time optimization solution. After obtaining the back-end optimized trajectory, it is checked again whether it is safe. If it is safe, the trajectory is executed. If it is not safe, the consideration of the formation flight similarity factor is weakened, and the optimization is performed again until a safe trajectory is obtained, and then the trajectory is executed.
[0022] (5) Replanning trajectory check: Since the effective field of view of the drone’s sensor is limited, the flight trajectory may collide with obstacles that have just entered the sensor’s field of view. Therefore, a check frequency of 1 millisecond is used to determine whether the trajectory collides with environmental obstacles. If there is a danger, the process returns to step (2) for trajectory replanning. At the same time, based on the rolling optimization strategy, the updated local endpoint will be allocated according to the global trajectory during replanning.
[0023] Furthermore, the specific process of step (1) is as follows:
[0024] In the user demand initialization step, it is necessary to define the number of cluster drones N, which means that the cluster has N drones, and each drone is numbered i = 1, 2, ..., N; a graph structure is used to describe the formation of the drones, and an undirected fully connected graph G = (V, E) is defined, where V: = {1, 2, ..., N} represents the set of vertices, Represents a set of edges; in graph G, vertex i represents the position coordinate p of the i-th drone i , edge i,j Represents the relationship between the i-th UAV and the j-th UAV; it is also necessary to define the end point coordinates p of the cluster geometric center g , and the end point coordinates of each drone are calculated by its position in the formation, p i,g =p g +Δp i.o , where Δp i.o represents the displacement of the ith UAV relative to the geometric center of the cluster in the ideal formation. Finally, the initial allocation of formation tasks needs to be defined. For a cluster of N UAVs, the formation task set is A = {A 1,…,A N}, A i Represents the formation allocation of the i-th UAV, that is, the i-th UAV corresponds to the relative position in the formation.
[0025] Furthermore, the specific process of step (2) is as follows:
[0026] First, without considering obstacles, a trajectory connecting the current state of the drone and the global end point is planned; the trajectory is represented by a piecewise polynomial, and a three-dimensional trajectory with M segments is defined as:
[0027]
[0028] Where t is the current time, t k is the trajectory time of the kth trajectory;
[0029] The k-th segment trajectory is represented by a high-order polynomial:
[0030]
[0031] Where c is the coefficient of the piecewise polynomial, T is the time distribution of the piecewise polynomial, T k is the total time of the kth polynomial, β(t) is the time primitive; when planning the global trajectory, in order to provide more appropriate direction guidance and time distribution for subsequent trajectory optimization, the global trajectory takes into account the energy consumption and total flight time of the UAV flight trajectory, and solves the following optimization problem:
[0032]
[0033] stp(0)=p 0
[0034] p(T)=p g
[0035] Among them, p 0 is the current position coordinate of the UAV, and m is the order corresponding to the control input;
[0036] After obtaining the global trajectory, different local planning areas are set according to the actual application scenario and the sensor's sensing range, and the intersection of the global trajectory and the local planning area is solved, which is the local end point;
[0037] Find the local endpoint position of each drone in the cluster on the global trajectory and store it as a vector h, and store the position of each drone in the expected formation as a vector s; before generating the local trajectory, it is necessary to adjust the local endpoint to a local target point that meets the expected formation according to h and s, and assign tasks to each drone according to the adjusted local target point. Therefore, the calculation needs to be divided into two parts: formation alignment and formation task assignment;
[0038] When regenerating a local target point that meets the desired formation according to the local end point, only the translation and scaling of the desired formation are considered, but the rotation of the formation is not considered;
[0039] The coordinates of the desired formation after translation and scaling, that is, the aligned coordinates, are recorded as q, and we have:
[0040] q j =αs j +d
[0041] where s j represents the coordinate point of the jth position in the desired formation, j = 1, 2, ..., N, α is the scaling factor, and d is the translation vector; after the given alignment, the Euclidean distance from the aligned coordinates to the coordinates of each local endpoint is recorded as the cost term:
[0042]
[0043] The cost function of the allocation problem is constructed based on this cost term, and the corresponding integer programming problem is:
[0044]
[0045]
[0046]
[0047] x ij ={0,1},i,j=1,...,N
[0048] where x ij To assign variables, when x ij =1 means that the i-th UAV is assigned to the j-th coordinate in the formation; the specific process is:
[0049] First, based on the local end point position h and the desired formation s, restructure the integer programming problem:
[0050]
[0051]
[0052] Then, the allocation algorithm is used to solve the above integer programming problem to obtain the optimal allocation X* and the corresponding minimum cost function value K*;
[0053] Then, the parameters s and s are calculated as follows: s , and d s ;
[0054]
[0055] Calculate the parameters α* and d* for optimal alignment:
[0056]
[0057]
[0058] At this point, the alignment parameters α*, d* and the optimal allocation X* have been found, and the optimal alignment coordinates are:
[0059] q * =α * s+d *
[0060] After obtaining the optimal alignment coordinates, they can be assigned to each UAV as a local target point according to X*; at this time, the local target point is optimized by the local terminal position of each UAV queried on the global trajectory, so that it can meet the geometric distribution of the expected formation.
[0061] Furthermore, the specific process of step (3) is as follows:
[0062] In the front-end reference trajectory generation step, the front-end multi-topology path search is first performed based on the current position of the drone and the local target point. After sampling and pruning, the topological path in the complex environment is obtained.
[0063] Furthermore, in step (3), the topological path generation specifically adopts the probabilistic roadmap method, and the steps are as follows:
[0064] (1) Initialize the sampling tree, set the sampling space according to the sampling start point and the sampling end point, and add the sampling start point and the sampling end point into the sampling tree;
[0065] (2) Determine whether the total number of sampling points is less than the set threshold. If so, end the process; otherwise, continue. Randomly sample a sampling point in the sampling space and determine whether it is in the obstacle. If so, repeat step (2). If not, proceed to step (3).
[0066] (3) Determine whether the sampling point can be connected to the nodes in the sampling tree without collision. Collision-free connection means that the line connecting the sampling point and the node does not pass through obstacles. If not, add the sampling point to the sampling tree and repeat step (2). If yes, proceed to step (4);
[0067] (4) For sampling points that can be connected to nodes in the sampling tree without collision, it is necessary to determine whether they can replace the nodes in the current sampling tree. The judgment criterion is whether the path length formed by the sampling point and its neighboring nodes is less than the path length formed by the original node and the same neighboring nodes. If so, the sampling point is used to replace the node in the current sampling tree, and step (2) is repeated.
[0068] Furthermore, in step (3), the specific steps of generating a topological path in a complex environment are as follows:
[0069] 1) First, perform a breadth-first search on the sampling tree to find all paths connecting the search start point and the search end point. Then, perform topological judgment on these paths, classify the paths belonging to the same topology into one category, and retain the shortest path among them;
[0070] 2) Prune the retained path. Since the original path is obtained after a finite number of samplings, it cannot be guaranteed that the shortest path under the topology is obtained. During the pruning process, a ray is sent from the search starting point to the original path until the ray hits an obstacle. The previous ray is used as part of the pruned path. This cycle is repeated until the end point of the ray reaches the search end point. The path pruning is completed.
[0071] 3) Finally, several pruned topological paths are obtained, and these paths are judged to be the same topological paths. If two paths are the same topological paths, the shortest path is retained. The definition of judging whether they are the same topological paths is: given two paths ξ 1 (r) and ξ 2 (r), where r represents the parameterization of the path and r∈[0,1], if two paths satisfy ξ 1 (0) = ξ 2 (0),ξ 1 (1) = ξ 2 (1), that is, they have the same starting point and end point, and for Connection If there is no obstacle, the two paths are topological paths, otherwise they are topological paths of different types;
[0072] 4) Based on the flight distance, the shortest path is selected from the several topological paths obtained in step 3) as the reference trajectory.
[0073] Furthermore, the specific process of step (4) is as follows:
[0074] The back-end trajectory optimization is based on the front-end reference trajectory, while taking into account the factors of safe obstacle avoidance and formation flight of the UAV, to form an unconstrained optimization problem, and the optimization solution is used to obtain a higher quality trajectory; the unconstrained optimization problem of the constructed back-end trajectory is as follows:
[0075]
[0076] Among them, the piecewise polynomial coefficient c and the time distribution T are optimization variables, the subscript J represents a certain objective function or constraint penalty term, λ represents the corresponding weight coefficient, and the subscripts {e, a, o, f, b, h} represent the energy cost term, the total trajectory time term, the safety obstacle avoidance constraint term, the formation similarity term, the mutual collision avoidance term between clusters, and the dynamic feasibility term, respectively; then, the above optimization problem is iteratively optimized based on the gradient information, and finally a high-quality trajectory with a safe, collision-free and maintainable formation is generated for the current UAV.
[0077] The beneficial effects of the present invention are as follows: the present invention proposes a general trajectory planning framework for formation flight of cluster UAVs in complex unknown environments. The framework adopts a multi-layer trajectory planning structure, and generates high-quality formation flight trajectories of cluster UAVs in a distributed manner through a multi-layer architecture such as user demand initialization, global trajectory planning, front-end reference trajectory planning, back-end trajectory optimization, and re-planning status check. Compared with other current methods, the method of the present invention is based on the idea of trajectory planning from rough to fine, and generates local flight trajectories through multi-layer trajectory planning. While ensuring the high quality of local trajectories, it also ensures real-time performance and can cope with complex unknown environments. In addition, the structure of multi-layer trajectory planning is highly flexible, and the priorities of formation flight are allocated at different levels, which is convenient for users to define formation tasks, and has guiding significance for practical engineering applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 This is a schematic diagram of the principle of the method in Example 1 of the present invention;
[0079] Figure 2 This is a fully connected schematic diagram of the formation of a swarm of drones in Example 1 of the present invention;
[0080] Figure 3 Schematic diagram of the relationship between the global trajectory and the local trajectory in Example 1 of the present invention;
[0081] Figure 4 This is a schematic diagram of the optimal cluster local endpoint formation alignment and formation allocation in Example 1 of the present invention;
[0082] Figure 5 This is a schematic diagram of topological path search in Example 1 of the present invention;
[0083] Figure 6 This is a schematic diagram of the topological path pruning effect in Example 1 of the present invention;
[0084] Figure 7 Schematic diagram of the results of the large-scale cluster heart-shaped formation flight simulation experiment in Example 2 of the present invention. DETAILED DESCRIPTION
[0085] The present invention will be further described below in conjunction with the accompanying drawings. It should be noted that this embodiment is based on the technical solution and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to this embodiment.
[0086] Example 1
[0087] This embodiment provides a method for generating flight trajectories of distributed cluster UAV formations in complex and unknown environments. The method is based on the idea of trajectory planning from coarse to fine, and ultimately generates high-quality local flight trajectories through multi-layer trajectory planning, which is used for generating flight trajectories of cluster UAV formations in complex environments.
[0088] like Figure 1 As shown, the method mainly includes the following five steps:
[0089] (1) User demand initialization: Before the start of the automatic navigation task, the user needs to define the parameters of the swarm drone formation according to the task type. This is the only user interaction in the entire task process. After the user completes the definition of the number of drones, the desired formation formation, the target end point of the cluster geometric center, and the initial allocation of the formation task, the swarm drones will be distributed and started according to the user's definition to perform subsequent tasks;
[0090] (2) Global trajectory: First, global trajectory planning is performed, that is, without considering obstacles, a global trajectory connecting the current position of the UAV and the target position is quickly generated as the guiding trajectory for cluster formation flight under ideal conditions; based on the global trajectory, the local endpoint reached after flying from the current position for a set time is selected as the final state of the subsequent trajectory planning. After obtaining the local endpoint set of the cluster UAVs, it is determined whether the formation task allocation is optimal under the local endpoint set. If it is optimal, the subsequent steps are started with the task allocation corresponding to the current local endpoint set. If it is not optimal, the formation task is redistributed, and the subsequent steps are started with the optimal task allocation corresponding to the calculated local endpoint set;
[0091] (3) Front-end reference trajectory: First, the current position and local end point of the UAV are used as the first and last states to perform a front-end multi-topology path search. After sampling and pruning, the topology path in the complex environment is obtained. Then, based on the optimal formation indicator, the topology with the best formation in the multi-topology path is selected, and a high-order continuous front-end reference trajectory is generated based on the optimal topology.
[0092] (4) Performing back-end optimization on the front-end reference trajectory generated in step (3): In order to generate high-quality local trajectories, a multi-objective trajectory optimization problem is constructed, and the similarity factors of UAV obstacle avoidance and formation flight are considered at the same time. The number of optimization variables is reduced in the form of discrete trajectories to ensure the real-time optimization solution. After obtaining the back-end optimized trajectory, it is checked again whether it is safe. If it is safe, the trajectory is executed. If it is not safe, the consideration of the formation flight similarity factor is weakened, and the optimization is performed again until a safe trajectory is obtained, and then the trajectory is executed.
[0093] (5) Replanning trajectory check: Since the effective field of view of the drone’s sensor is limited, the flight trajectory may collide with obstacles that have just entered the sensor’s field of view. Therefore, a check frequency of 1 millisecond is used to determine whether the trajectory collides with environmental obstacles. If there is a danger, the process returns to step (2) for trajectory replanning. At the same time, based on the rolling optimization strategy, the updated local endpoint will be allocated according to the global trajectory during replanning.
[0094] Specifically, the specific process of step (1) is:
[0095] In the user demand initialization step, it is necessary to define the number of cluster drones N, which means that the cluster has N drones, and each drone is numbered i = 1, 2, ..., N; a graph structure is used to describe the formation of the drones, and an undirected fully connected graph G = (V, E) is defined, where V = {1, 2, ..., N} represents the set of vertices. Represents a set of edges; in graph G, vertex i represents the position coordinate p of the i-th drone i , edge i,j Represents the relationship between the i-th UAV and the j-th UAV; it is also necessary to define the end point coordinates p of the cluster geometric center g , and the end point coordinates of each drone are calculated by its position in the formation, that is, p i , g =p g +Δp i.o , where Δp i.o represents the displacement of the ith UAV relative to the geometric center of the cluster in the desired formation. Finally, the initial allocation of formation tasks needs to be defined. For a cluster of N UAVs, the formation task set is A = {A 1 ,…,A N}, A i Represents the formation allocation of the i-th UAV, that is, the relative position of the i-th UAV in the formation.
[0096] Figure 2 This is an example diagram of a drone formation when N=5.
[0097] In this embodiment, the specific process of step (2) is:
[0098] First, without considering obstacles, a trajectory connecting the current state of the drone and the global end point is planned. The trajectory is represented by a piecewise polynomial, and a three-dimensional trajectory with M segments is defined as:
[0099]
[0100] Where t is the current time, t k is the trajectory time of the kth trajectory;
[0101] The k-th segment trajectory is represented by a high-order polynomial:
[0102]
[0103] Where c is the coefficient of the piecewise polynomial, T is the time distribution of the piecewise polynomial, T k is the total time of the kth polynomial, β(t) is the time primitive; when planning the global trajectory, in order to provide more appropriate direction guidance and time distribution for subsequent trajectory optimization, the global trajectory takes into account the energy consumption and total flight time of the UAV flight trajectory, and solves the following optimization problem:
[0104]
[0105] stp(0)=p 0
[0106] p(T)=p g
[0107] Among them, p 0 is the current position coordinate of the UAV, and m is the order corresponding to the control input.
[0108] After obtaining the global trajectory, different local planning areas are set according to the actual application scenario and the perception range of the sensor, and the intersection of the global trajectory and the local planning area is solved, which is the local end point.
[0109] Figure 3 The diagram shows the relationship between the global trajectory and the local trajectory. The method of this embodiment defines the local end point as the intersection of the global trajectory and the local perception range, but when optimizing the trajectory at the back end, the local end point needs to be adjusted to obtain the local target point, which is the actual end point of the local trajectory.
[0110] On the global trajectory, the local endpoint position of each drone in the cluster is found and stored as a vector h, and the position of each drone in the desired formation is stored as a vector s. Before generating the local trajectory, the local endpoint needs to be adjusted to a local target point that meets the desired formation according to h and s, and tasks are assigned to each drone according to the adjusted local target point. Therefore, the calculation needs to be divided into two parts: formation alignment and formation task assignment.
[0111] When the method of this embodiment regenerates the local target point that meets the expected formation according to the local end point, only the translation and scaling of the expected formation are considered, and the rotation of the formation is not considered. In this case, the alignment problem and the allocation problem can be optimized at the same time, wherein the optimal solution of the alignment problem can be obtained analytically without the need for iterative alignment-allocation process to approach the optimum.
[0112] The coordinates of the desired formation after translation and scaling, that is, the aligned coordinates, are recorded as q, and we have:
[0113] q j =αs j +d
[0114] where s j represents the coordinate point of the jth position in the desired formation, j = 1, 2, ..., N, α is the scaling factor, and d is the translation vector. After the alignment is given, in this embodiment, the Euclidean distance from the aligned coordinates to the coordinates of each local end point is recorded as the cost item:
[0115]
[0116] The cost function of the allocation problem is constructed based on this cost term, and the corresponding integer programming problem is:
[0117]
[0118]
[0119]
[0120] x ij ={0,1},i,j=1,...,N
[0121] where x ij To assign variables, when x ij =1 means that the i-th UAV is assigned to the j-th coordinate in the formation. The specific process is:
[0122] First, based on the local end point position h and the desired formation s, restructure the integer programming problem:
[0123]
[0124]
[0125] Then, an allocation algorithm, such as the Hungarian algorithm, is used to solve the above integer programming problem to obtain the optimal allocation X* and the corresponding minimum cost function value K*.
[0126] Then, the parameters s and s are calculated as follows: s , and d s .
[0127]
[0128] Calculate the parameters α* and d* for optimal alignment:
[0129]
[0130]
[0131] At this point, the alignment parameters α*, d* and the optimal allocation X* have been found, and the optimal alignment coordinates are:
[0132] q * =α * s+d *
[0133] After obtaining the optimal alignment coordinates, they can be assigned to each UAV as a local target point according to X*. At this time, the local target point is optimized by the local terminal position of each UAV queried on the global trajectory, so that it can meet the geometric distribution of the desired formation. Figure 4 Shown is a schematic diagram of the optimal cluster local endpoint formation alignment and formation allocation.
[0134] Furthermore, in this embodiment, the specific process of step (3) is as follows:
[0135] In the front-end reference trajectory generation step, the front-end multi-topology path search is first performed based on the current position of the drone and the local target point. After sampling and pruning, the topological path in the complex environment is obtained.
[0136] Figure 5 This is a schematic diagram of topological path search. The topological path generation specifically adopts the probabilistic roadmap method, and the steps are as follows:
[0137] (1) Initialize the sampling tree, set the sampling space according to the sampling start point and the sampling end point, and add the sampling start point and the sampling end point into the sampling tree;
[0138] (2) Determine whether the total number of sampling points is less than the set threshold. If so, end the process; otherwise, continue. Randomly sample a sampling point in the sampling space and determine whether it is in the obstacle. If so, repeat step (2). If not, proceed to step (3).
[0139] (3) Determine whether the sampling point can be connected to the nodes in the sampling tree without collision. Collision-free connection means that the line connecting the sampling point and the node does not pass through obstacles. If not, add the sampling point to the sampling tree and repeat step (2). If yes, proceed to step (4);
[0140] (4) For sampling points that can be connected to nodes in the sampling tree without collision, it is necessary to determine whether they can replace the nodes in the current sampling tree. The judgment criterion is whether the path length formed by the sampling point and its neighboring nodes is less than the path length formed by the original node and the same neighboring nodes. If so, the sampling point is used to replace the node in the current sampling tree, and step (2) is repeated.
[0141] The environmental topological path connecting the starting point and the end point is constructed by the above-mentioned probabilistic roadmap method. The specific steps for generating the topological path in a complex environment are as follows:
[0142] 1) First, perform a breadth-first search on the sampling tree to find all paths connecting the search start point and the search end point. Then, perform topological judgment on these paths, classify the paths belonging to the same topology into one category, and retain the shortest path among them;
[0143] 2) Prune the retained paths, such as Figure 6 As shown in the figure, since the original path is obtained after a finite number of samplings, it cannot be guaranteed that the shortest path under the topology is obtained. During the pruning process, a ray is sent from the search starting point to the original path until the ray hits an obstacle. The previous ray is used as part of the pruned path, and the cycle continues until the end point of the ray reaches the search end point, and the path pruning is completed.
[0144] 3) Finally, several pruned topological paths are obtained, and these paths are judged whether they are topological paths. If two paths are topological paths, the shortest path is retained. The definition of judging whether two paths are topologically identical is: given two paths ξ 1 (r) and ξ 2 (r), where r represents the parameterization of the path and r∈[0,1], if two paths satisfy ξ 1 (0) = ξ 2 (0),ξ 1 (1) = ξ 2 (1), that is, they have the same starting point and end point, and for Connection If there is no obstacle, the two paths are the same topological paths, otherwise they are different topological paths.
[0145] 4) Based on the flight distance, the shortest path is selected from the several topological paths obtained in step 3) as the reference trajectory.
[0146] The back-end trajectory optimization is mainly based on the front-end reference trajectory, while taking into account factors such as safe obstacle avoidance and formation flight of the drone, to form an unconstrained optimization problem, and the optimization solution is used to obtain a higher quality trajectory. The unconstrained optimization problem of the back-end trajectory constructed by the method of this embodiment is in the following form:
[0147]
[0148] The piecewise polynomial coefficient c and time distribution T are optimization variables, the subscript J represents a certain objective function or constraint penalty term, λ represents the corresponding weight coefficient, and the subscripts {e, a, o, f, b, h} represent the energy cost term, the total trajectory time term, the safety obstacle avoidance constraint term, the formation similarity term, the mutual collision avoidance term between clusters, and the dynamic feasibility term. Afterwards, the above optimization problem is iteratively optimized based on the gradient information, and finally a high-quality trajectory with safe, collision-free and maintainable formation is generated for the current UAV.
[0149] Compared with other current methods, the method in this embodiment is based on the idea of trajectory planning from coarse to fine, and generates local flight trajectories through multi-layer trajectory planning. While ensuring the high quality of local trajectories, it also ensures real-time performance and can cope with complex unknown environments. In addition, the structure of multi-layer trajectory planning is highly flexible, and the priority of formation flight is allocated at different levels, which is convenient for users to define formation tasks, and has guiding significance for practical engineering applications.
[0150] Example 2
[0151] In order to verify the performance of the method described in Example 1 in dealing with large-scale cluster irregular formation flight tasks, a heart-shaped formation consisting of ten drones was designed in the simulation environment experiment part. At the same time, 300 cylindrical obstacles and 80 circular obstacles were placed in a space of 80m×20m. Figure 7 As shown, the UAV cluster flew in a heart-shaped formation from left to right, passing through a very dense obstacle area. Screenshots were taken during the flight at a spacing of 20 m. It can be seen that the irregular heart shape was always maintained well throughout the flight. From the flight trajectory of the UAV cluster, it can be seen that each UAV encountered many obstacles during the flight. However, under the control of the method in Example 1, the UAVs maintained the heart-shaped formation during the flight while avoiding obstacles. This fully demonstrated the versatility and robustness of the method in Example 1, and excellently completed such a large-scale cluster irregular formation flight simulation experiment.
[0152] For those skilled in the art, various corresponding changes and modifications can be made according to the above technical solutions and concepts, and all of these changes and modifications should be included in the protection scope of the claims of the present invention.
Claims
1. A method for generating flight trajectories of distributed swarm drones in complex and unknown environments. It is characterized in that It includes the following five steps: (1) User demand initialization: Before the start of the automatic navigation task, the user needs to define the parameters of the swarm UAV formation according to the task type, including the number of UAVs, the desired formation formation, the target endpoint of the cluster geometric center, and the initial allocation of formation tasks; after the user completes the definition, the swarm UAVs will be distributed and started according to the user's definition to perform subsequent tasks; (2) Global trajectory: First, without considering obstacles, a global trajectory connecting the current position of the UAV and the target position is generated as the guiding trajectory for the formation flight of the swarm UAVs under ideal conditions. Based on the global trajectory, the local endpoint reached after the set time from the current position is selected as the final state of the subsequent trajectory planning. After obtaining the local endpoint set of the swarm UAVs, it is determined whether the formation task allocation is optimal under the local endpoint set. If it is optimal, the subsequent steps are started with the task allocation corresponding to the current local endpoint set. If it is not optimal, the formation tasks are reallocated and the subsequent steps are started with the optimal task allocation corresponding to the calculated local endpoint set. (3) Front-end reference trajectory: First, the current position and local end point of the UAV are used as the first and last states to perform a front-end multi-topology path search. After sampling and pruning, the topology path in the complex environment is obtained. Then, based on the optimal formation indicator, the topology with the best formation in the multi-topology path is selected, and a high-order continuous front-end reference trajectory is generated based on the optimal topology. (4) Performing back-end optimization on the front-end reference trajectory generated in step (3): In order to generate high-quality local trajectories, a multi-objective trajectory optimization problem is constructed, and the similarity factors of UAV obstacle avoidance and formation flight are considered at the same time. The number of optimization variables is reduced in the form of discrete trajectories to ensure the real-time optimization solution. After obtaining the back-end optimized trajectory, it is checked again whether it is safe. If it is safe, the trajectory is executed. If it is not safe, the consideration of the formation flight similarity factor is weakened, and the optimization is performed again until a safe trajectory is obtained, and then the trajectory is executed. (5) Replanning trajectory check: Since the effective field of view of the drone’s sensor is limited, the flight trajectory may collide with obstacles that have just entered the sensor’s field of view. Therefore, a check frequency of 1 millisecond is used to determine whether the trajectory collides with environmental obstacles. If there is a danger, the process returns to step (2) for trajectory replanning. At the same time, based on the rolling optimization strategy, the updated local endpoint will be allocated according to the global trajectory during replanning.
2. The method according to claim 1, It is characterized in that The specific process of step (1) is as follows: In the user demand initialization step, it is necessary to define the number of cluster drones N, which means that the cluster has N drones, and each drone is numbered i = 1, 2, ..., N; the formation of the drones is described by a graph structure, and an undirected fully connected graph G = (V, E) is defined, where V: ={1, 2, ..., N} represents the set of vertices, represents a set of edges; In graph G, vertex i represents the position coordinate p of the i-th drone i , edge i,j Represents the relationship between the i-th UAV and the j-th UAV; it is also necessary to define the end point coordinates p of the cluster geometric center g , and the end point coordinates of each drone are calculated by its position in the formation, p i,g =p g +Δp i.o , where Δp i.o represents the displacement of the ith UAV relative to the geometric center of the cluster in the ideal formation. Finally, the initial allocation of formation tasks needs to be defined. For a cluster of N UAVs, the formation task set is A = {A 1 , ..., A N }, A i Represents the formation allocation of the i-th UAV, that is, the i-th UAV corresponds to the relative position in the formation.
3. The method according to claim 1, It is characterized in that The specific process of step (2) is as follows: First, without considering obstacles, a trajectory connecting the current state of the drone and the global end point is planned; the trajectory is represented by a piecewise polynomial, and a three-dimensional trajectory with M segments is defined as: Where t is the current time, t k is the trajectory time of the kth trajectory; The k-th segment trajectory is represented by a high-order polynomial: Where c is the coefficient of the piecewise polynomial, T is the time distribution of the piecewise polynomial, T k is the total time of the kth polynomial, β(t) is the time primitive; when planning the global trajectory, in order to provide more appropriate direction guidance and time distribution for subsequent trajectory optimization, the global trajectory takes into account the energy consumption and total flight time of the UAV flight trajectory, and solves the following optimization problem: s.t.p(0)=p 0 p(T)=p g Among them, p 0 is the current position coordinate of the UAV, and m is the order corresponding to the control input; After obtaining the global trajectory, different local planning areas are set according to the actual application scenario and the sensor's sensing range, and the intersection of the global trajectory and the local planning area is solved, which is the local end point; Find the local endpoint position of each drone in the cluster on the global trajectory and store it as a vector h, and store the position of each drone in the expected formation as a vector s; before generating the local trajectory, it is necessary to adjust the local endpoint to a local target point that meets the expected formation according to h and s, and assign tasks to each drone according to the adjusted local target point. Therefore, the calculation needs to be divided into two parts: formation alignment and formation task assignment; When regenerating a local target point that meets the desired formation according to the local end point, only the translation and scaling of the desired formation are considered, but the rotation of the formation is not considered; The coordinates of the desired formation after translation and scaling, that is, the aligned coordinates, are recorded as q, and we have: q j =αs j +d where s j represents the coordinate point of the jth position in the desired formation, j = 1, 2, ..., N, α is the scaling factor, and d is the translation vector; after the given alignment, the Euclidean distance from the aligned coordinates to the coordinates of each local end point is recorded as the cost term: The cost function of the allocation problem is constructed based on this cost term, and the corresponding integer programming problem is: x ij ={0,1},i,j=1,...,N where x ij To assign variables, when x ij =1 means that the i-th UAV is assigned to the j-th coordinate in the formation; the specific process is: First, based on the local end point position h and the desired formation s, restructure the integer programming problem: Then, the allocation algorithm is used to solve the above integer programming problem to obtain the optimal allocation X* and the corresponding minimum cost function value K*; Then, the parameters s and s are calculated as follows: s , and d s ; Calculate the parameters α* and d* for optimal alignment: At this point, the alignment parameters α*, d* and the optimal allocation X* have been found, and the optimal alignment coordinates are: q * =α * s+d * After obtaining the optimal alignment coordinates, they can be assigned to each UAV as a local target point according to X*; at this time, the local target point is optimized by the local terminal position of each UAV queried on the global trajectory, so that it can meet the geometric distribution of the expected formation.
4. The method according to claim 1, It is characterized in that The specific process of step (3) is as follows: In the front-end reference trajectory generation step, the front-end multi-topology path search is first performed based on the current position of the drone and the local target point. After sampling and pruning, the topological path in the complex environment is obtained.
5. The method according to claim 4, It is characterized in that In step (3), the topological path generation specifically adopts the probabilistic roadmap method, and the steps are as follows: (1) Initialize the sampling tree, set the sampling space according to the sampling start point and the sampling end point, and add the sampling start point and the sampling end point into the sampling tree; (2) Determine whether the total number of sampling points is less than the set threshold. If so, end the process; otherwise, continue. Randomly sample a sampling point in the sampling space and determine whether it is in the obstacle. If so, repeat step (2). If not, proceed to step (3). (3) Determine whether the sampling point can be connected to the nodes in the sampling tree without collision. Collision-free connection means that the line connecting the sampling point and the node does not pass through obstacles. If not, add the sampling point to the sampling tree and repeat step (2). If yes, proceed to step (4); (4) For sampling points that can be connected to nodes in the sampling tree without collision, it is necessary to determine whether they can replace the nodes in the current sampling tree. The judgment criterion is whether the path length formed by the sampling point and its neighboring nodes is less than the path length formed by the original node and the same neighboring nodes. If so, the sampling point is used to replace the node in the current sampling tree, and step (2) is repeated.
6. The method according to claim 5, It is characterized in that In step (3), the specific steps of generating a topological path in a complex environment are as follows: 1) First, perform a breadth-first search on the sampling tree to find all paths connecting the search start point and the search end point. Then, perform topological judgment on these paths, classify the paths belonging to the same topology into one category, and retain the shortest path among them; 2) Prune the retained path. Since the original path is obtained after a finite number of samplings, it cannot be guaranteed that the shortest path under the topology is obtained. During the pruning process, a ray is sent from the search starting point to the original path until the ray hits an obstacle. The previous ray is used as part of the pruned path. This cycle is repeated until the end point of the ray reaches the search end point. The path pruning is completed. 3) Finally, several pruned topological paths are obtained, and these paths are judged to be the same topological paths. If two paths are the same topological paths, the shortest path is retained; The definition of judging whether it is a topological path is: given two paths ξ 1 (r) and ξ 2 (r), where r represents the parameterization of the path and r∈[0,1], if two paths satisfy ξ 1 (0) = ξ 2 (0),ξ 1 (1) = ξ 2 (1), that is, they have the same starting point and end point, and for Connection If there is no obstacle, the two paths are topological paths, otherwise they are topological paths of different types; 4) Based on the flight distance, the shortest path is selected from the several topological paths obtained in step 3) as the reference trajectory.
7. The method according to claim 1, It is characterized in that The specific process of step (4) is as follows: The back-end trajectory optimization is based on the front-end reference trajectory, while taking into account the factors of safe obstacle avoidance and formation flight of the UAV, to form an unconstrained optimization problem, and the optimization solution is used to obtain a higher quality trajectory; the unconstrained optimization problem of the constructed back-end trajectory is as follows: Among them, the piecewise polynomial coefficient c and the time distribution T are optimization variables, the subscript J represents a certain objective function or constraint penalty term, λ represents the corresponding weight coefficient, and the subscripts {e, a, o, f, b, h} represent the energy cost term, the total trajectory time term, the safety obstacle avoidance constraint term, the formation similarity term, the mutual collision avoidance term between clusters, and the dynamic feasibility term, respectively; then, the above optimization problem is iteratively optimized based on the gradient information, and finally a high-quality trajectory with a safe, collision-free and maintainable formation is generated for the current UAV.
