Distributed multi-unmanned aerial vehicle deadlock prevention method and system based on sub-target mode switching
By adopting a distributed multi-UAV anti-deadlock method based on sub-target mode switching, dynamically allocating flight priorities and combining multiple collision avoidance modes, the deadlock problem in multi-UAV collaborative operations is solved, improving response speed and space utilization efficiency in complex environments and ensuring flight safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG UNIV
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-26
Smart Images

Figure CN122284673A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of UAV trajectory planning technology, and particularly relates to a distributed multi-UAV anti-deadlock method and system based on sub-target mode switching. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Currently, drones, with their core advantages of flexible movement, convenient deployment, and high operational efficiency, have achieved large-scale deployment and widespread application in many fields such as logistics and distribution, disaster relief, agricultural planting, and urban transportation, becoming core equipment in the field of low-altitude intelligent operations. As the demands of various industries for drone operation tasks become increasingly complex and diversified, multi-drone collaborative operation modes are gradually becoming the industry mainstream, and their application scenarios are constantly expanding towards more complex environments, more stringent constraints, and higher collaboration densities.
[0004] Currently, distributed multi-UAV trajectory planning technology has shown excellent performance in single-UAV obstacle avoidance and basic collision avoidance between UAVs. However, in complex operational scenarios with congested areas and limited space, especially regarding the deadlock problem that is prone to occur during multi-UAV collaboration, existing technologies still have many insurmountable shortcomings, such as: (1) Most existing multi-UAV deadlock solutions adopt a single approach. Even some improved solutions that use mode switching mechanisms have failed to achieve efficient use of site space resources and have obvious shortcomings in core technical indicators such as solution efficiency, flight safety assurance, and adaptability to complex environments.
[0005] (2) Especially in complex scenarios with extremely limited space and dense distribution of obstacles, existing solutions generally suffer from slow response speed, overly conservative planning paths, high failure rate of deadlock recovery, and are even prone to livelock. Summary of the Invention
[0006] To overcome the shortcomings of the prior art, this invention provides a distributed multi-UAV anti-deadlock method and system based on sub-target mode switching, which can efficiently solve the multi-UAV deadlock problem for different highly complex flight scenarios, thereby meeting the quality requirements of multi-UAV collaborative operations.
[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: The first aspect of this invention provides a distributed multi-UAV anti-deadlock method based on sub-target mode switching.
[0008] A distributed multi-UAV deadlock prevention method based on sub-target mode switching includes: An online distributed planning method is adopted to generate the initial flight trajectories of multiple UAVs by combining a pre-set dynamic model with environmental obstacle information; Based on the real-time distance of each drone to its corresponding preset target point, flight priority is dynamically allocated with priority given to drones that are closer to the target point. By determining whether the predicted distance between any two drones within a preset future time is less than a preset deadlock prediction threshold, deadlock prediction is performed on the trajectory ends of each drone generated by the current replanning. When a drone is at risk of deadlock, a deadlock prevention process based on sub-target mode switching is executed: for drones without deadlock risk, trajectory planning is performed according to preset priorities; for drones with deadlock risk, the sub-target mode determination process determines the mode used for deadlock prevention, so as to achieve collaborative deadlock avoidance among multiple drones until a safe flight state without deadlock risk is restored.
[0009] Furthermore, the allocation of flight priorities is achieved through a priority quantization function, which is expressed as: ; in, Indicates drone exist The priority quantization function value at time, where a larger priority quantization function value indicates a higher priority; Indicates drone The coordinates of the planned target point Indicates drone exist Real-time location coordinates at any given moment; A preset distance threshold is used to distinguish between two operating states of the drone: approaching the target scene and moving away from the target scene.
[0010] Furthermore, when performing deadlock prediction on the trajectories of each UAV generated by the current replanning, if any two UAVs satisfy the deadlock prediction formula, then these two UAVs are determined to be at risk of deadlock; wherein, the deadlock prediction formula is specifically expressed as: ; in, and They represent drones and drones exist The position coordinates at the end of the time trajectory Represents the discrete time step coefficient. Indicates the discrete time step; and They represent drones and drones The radius of the body, This represents the preset deadlock prediction threshold.
[0011] Furthermore, for drones without deadlock risk, trajectory planning is performed according to preset priorities, including: during path replanning, low-priority drones treat higher-priority drones as dynamic obstacles, and by sensing the expected flight trajectory of higher-priority drones in real time, they ensure that their planned paths always avoid the trajectory area expected by higher-priority drones.
[0012] Furthermore, the sub-target mode determination process includes four modes: FORWORD mode, RIGHT mode, UPDOWN mode, and BACK mode. Among them, FORWORD mode represents the normal driving mode, RIGHT mode represents the right-hand rule mode, UPDOWN mode represents the up-and-down staggered driving mode, and BACK mode represents the priority-based yielding mode.
[0013] Furthermore, the implementation of the sub-target mode determination process includes: in the initial stage, all drones are in FORWORD mode; when any two drones are at risk of deadlock, the mode of these two drones is first switched to RIGHT mode; if the deadlock problem is resolved, the drones are switched back to FORWORD mode and fly to the trajectory target point; otherwise, the drones are switched to UPDOWN mode; if the deadlock problem is resolved, the drones are switched back to FORWORD mode and fly to the trajectory target point.
[0014] Furthermore, the implementation of the sub-target mode determination process also includes: if the deadlock problem is not resolved after switching to UPDOWN mode, then the priority determination process is started, that is, by comparing the priority functions of the two drones, the drone with higher priority is switched back to FORWORD mode, while the drone with lower priority is switched to BACK mode and retreats to a safe area; after the drone with higher priority passes through the conflict area, the drone with lower priority is switched back to FORWORD mode and continues to travel towards the trajectory target point.
[0015] The second aspect of this invention provides a distributed multi-UAV anti-deadlock system based on sub-target mode switching.
[0016] A distributed multi-UAV anti-deadlock system based on sub-target mode switching includes: The initial flight trajectory planning module is configured to use an online distributed planning method to generate the initial flight trajectories of multiple UAVs by combining a preset dynamic model with environmental obstacle information. The flight priority dynamic allocation module is configured to dynamically allocate flight priority based on the real-time distance of each UAV to the corresponding preset target point, with priority given to the nearest target point. The deadlock prediction module is configured to: predict deadlock at the end of the trajectory of each UAV generated by the current replanning by determining whether the predicted distance between any two UAVs within a preset future time is less than a preset deadlock prediction threshold. The sub-target mode switching module is configured to execute an anti-deadlock process based on sub-target mode switching when a drone is at risk of deadlock: for drones without deadlock risk, trajectory planning is performed according to preset priorities; for drones with deadlock risk, the sub-target mode determination process determines the mode used for deadlock prevention, so as to achieve collaborative deadlock avoidance among multiple drones until a safe flight state without deadlock risk is restored.
[0017] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of the distributed multi-UAV anti-deadlock method based on sub-target mode switching as described in the first aspect of the present invention.
[0018] The fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the distributed multi-UAV anti-deadlock method based on sub-target mode switching as described in the first aspect of the present invention.
[0019] The above one or more technical solutions have the following beneficial effects: (1) This invention constructs a deadlock prevention mechanism based on sub-target mode switching. This mechanism changes the limitation of single-rule fixed processing in the prior art. It can adaptively select collision avoidance rules according to the complexity of the scene, thereby making full use of horizontal, vertical and time dimension resources, and significantly improving space utilization efficiency and solution efficiency. At the same time, this invention realizes dynamic scheduling of "near target point priority" and "active degradation after arrival" through priority quantization function, which can avoid UAVs that have reached the target point occupying the airspace for a long time.
[0020] (2) The present invention adopts a deadlock prediction method based on the trajectory end at a future preset time, which can identify deadlock risks in advance and improve response speed. At the same time, the three-layer progressive switching logic can ensure that the UPDOWN mode is used to utilize the vertical space when the horizontal space is narrow, and the BACK mode is used to retreat the low priority when the vertical space is also limited, so as to avoid the path being too conservative. In addition, the low priority UAV treats the high priority UAV as a dynamic obstacle and actively avoids it when planning, which can effectively prevent livelock.
[0021] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0022] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0023] Figure 1 This is a flowchart of the distributed multi-UAV anti-deadlock method based on sub-target mode switching in Embodiment 1 of the present invention.
[0024] Figure 2 This is a flowchart of the sub-target mode switching in Embodiment 1 of the present invention.
[0025] Figure 3 This is a simulation result diagram of the obstacle environment experiment in Embodiment 1 of the present invention. Detailed Implementation
[0026] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0027] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0028] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0029] The overall approach proposed in this invention is as follows: This invention provides a distributed multi-UAV deadlock prevention method based on sub-target mode switching. After generating an initial trajectory using environmental information, this method dynamically allocates flight priorities based on the real-time distance of each UAV to its own target point, and predicts deadlock risks in advance using a preset distance judgment formula. When a deadlock risk is detected, a strategy based on sub-target mode switching is triggered. This strategy flexibly integrates three conflict avoidance rules—right-hand rule, staggered movement, and priority yielding—to address the characteristics of different complex flight scenarios. By dynamically switching between the three collision avoidance modes, deadlock between UAVs is effectively avoided, and each UAV is accurately guided to a safe target waypoint without deadlock risk.
[0030] Example 1 This embodiment discloses a distributed multi-UAV anti-deadlock method based on sub-target mode switching.
[0031] like Figure 1 As shown, the distributed multi-UAV anti-deadlock method based on sub-target mode switching includes: Step S1: Using an online distributed planning method, the initial flight trajectories of multiple UAVs are generated by combining a preset dynamic model with environmental obstacle information; Step S2: Based on the real-time distance of each UAV to the corresponding preset target point, dynamically allocate flight priority according to the principle of prioritizing the closest target point; Step S3: By determining whether the predicted distance between any two drones within a preset future time is less than a preset deadlock prediction threshold, deadlock prediction is performed on the trajectory ends of each drone generated by the current replanning. Step S4: When a drone is at risk of deadlock, execute the deadlock prevention process based on sub-target mode switching: For drones without deadlock risk, perform trajectory planning according to preset priority; for drones with deadlock risk, determine the mode to be used for deadlock prevention through the sub-target mode determination process, so as to achieve collaborative deadlock avoidance among multiple drones until the safe flight state without deadlock risk is restored.
[0032] Based on the above process, this invention can efficiently solve the deadlock problem of multiple UAVs in various highly complex flight scenarios, thereby meeting the quality requirements of multi-UAV collaborative operations. To facilitate understanding of the technical solution of this invention, the specific implementation methods of this invention will be further explained and described below.
[0033] In step S1, an online distributed planning method is used to generate the initial flight trajectories of multiple UAVs by combining a preset dynamic model with environmental obstacle information.
[0034] The online distributed planning method used in this process has a core model of "independent planning by a single agent + global environment sharing". Specifically, multiple drones are regarded as independent planning agents. Each drone has its own independent planning module and does not need to rely on the unified scheduling of a central control node. It only needs to share obstacle information of the global scene, its own starting point and target point information to complete the path planning independently. The planning process of each drone is independent and executed in parallel. Information exchange only occurs in the subsequent conflict detection stage, so as to achieve the goal of "distributed decision-making and parallel planning" and improve the overall efficiency of path planning of multiple drones.
[0035] In the specific implementation process, the initial flight trajectories of multiple drones are generated by combining a pre-set drone dynamics model and actual obstacle information in the scene. This process is divided into four steps, which are applied in parallel to each drone: Step S1-1: Information initialization and preprocessing.
[0036] First, each drone is configured with independent planning parameters to define its own starting point and target point, and the starting point and target point are converted into standard coordinates in the global coordinate system. At the same time, the actual obstacle information in the scene is imported, the obstacles are digitally processed, and structured data such as the spatial position and size of the obstacles are generated to establish a grid occupancy model of the obstacles.
[0037] In addition, by loading a pre-set UAV dynamics model, the constraint range of the state vector and control input vector, as well as the specific parameters of the state transition function, are defined to ensure that the states of the trajectory points generated by the UAV during the initial path search are all feasible states, providing a constraint basis for subsequent path searches.
[0038] The UAV dynamics model preset in this invention is a six-degree-of-freedom rigid body dynamics model for multi-rotor UAVs, in order to provide a unified kinematic constraint basis for "independent planning by a single agent" in distributed planning. The specific definition and parameters of the model are as follows: 1) State vector: defined as ,in, Here are the position coordinates of the UAV in the global coordinate system. For the linear velocity of the drone, For the roll, pitch, and yaw angles of the drone, The value range of the above state variables is determined by the angular velocity of the UAV; the range of values is determined by preset constraint thresholds based on the actual operational performance of the UAV (such as flight altitude). linear velocity ), to ensure the status of trajectory points is feasible.
[0039] 2) Control input vector: defined as ,in, For the total lift of the drone, , , The control torques for roll, pitch, and yaw are respectively set to upper limits for the amplitude of the control input vectors, matching the power output capability of the UAV.
[0040] 3) State transition function: Constructed based on the Newton-Euler equations, satisfying... ,in, It is a nonlinear continuous state transition function, specifically in the form of: ; ; ; ; In the formula, For the overall quality of the drone, The vector of gravitational acceleration. Here is the attitude rotation matrix. The vertical unit vector. This is the air drag coefficient matrix. This is the transformation matrix between attitude angle and angular velocity. Here is the rotational inertia matrix of the UAV. .
[0041] 4) Model Loading and Application: Before trajectory planning, the fixed parameters of the above model ( , , The model preloads constraints (position, speed, control input upper limit) and threshold values (position, speed, control input upper limit) into the independent planning module of each UAV. During the initial trajectory search, the model verifies whether the state variables of each candidate path point meet the constraints, and only retains feasible path points that meet the model constraints.
[0042] The design of this model matches the core logic of the original solution, which is "distributed decision-making and parallel planning". Each UAV can independently call the model to complete the feasibility verification of its own trajectory without the need for unified configuration by a central control node, thus adapting to the technical requirements of online distributed planning.
[0043] Step S1-2: Explore the feasible search space.
[0044] Based on the scene range and obstacle grid occupancy model, a 3D grid map required for planning is constructed, and the scene space is discretized into a series of uniform grid nodes, each grid node corresponding to a possible path point. At the same time, according to the constraints of the dynamic model, nodes in the grid map that meet the UAV flight state constraints are marked, infeasible nodes occupied by obstacles are excluded, and nodes that exceed the UAV state constraints (such as altitude and speed not meeting the requirements) are excluded, forming an initial feasible search space.
[0045] In this invention, the grid occupancy model is a three-dimensional digital grid representation model of obstacles in the operational scenario. It forms the basis for constructing the feasible search space for UAVs. The core of this model is to discretize the continuous three-dimensional operational space into regular grids, and characterize the spatial distribution of obstacles through the "occupied / unoccupied" state of the grids, which is A. The algorithm path search provides structured environmental information, and the model construction, judgment, and storage are as follows: 1) Prerequisites for model construction: Based on the preprocessed obstacle structured data (spatial location, size, and geometry) in step S1-1, a three-dimensional mesh space proportional to the actual operational scenario is constructed using a global coordinate system as a reference. The mesh division precision can be adaptively adjusted according to the scenario complexity (e.g., a fine mesh is used for dense obstacle scenarios, and a coarse mesh is used for sparse scenarios). The side length of the mesh cell is denoted as l (a preset fixed value that meets the radius requirements of the UAV body). To avoid obstacle avoidance errors caused by insufficient mesh accuracy.
[0046] 2) 3D mesh generation rules: Along the global coordinate system , , The grid is uniformly divided along the axis, with each grid cell being a regular hexahedron and uniquely identified as follows. ( , , They are respectively , , (Grid index along the axis), each grid cell corresponds to a sub-region in the actual space, and its spatial range is... .
[0047] 3) Occupation Status Determination Rule: For each grid cell, geometric intersection detection is used to determine whether it is in an "occupied state" (obstacles exist) or an "unoccupied state" (no obstacles, feasible space): If a grid cell has spatial intersection with the geometry of any obstacle (including complete coverage and partial overlap), the grid is considered occupied and marked with a state value of 1, indicating that the area is impassable. If a grid cell has no spatial intersection with any obstacle, and the spatial parameters (such as height and position) of the area meet the constraints of the UAV dynamics model, the grid is considered unoccupied and marked with a state value of 0, indicating that the area is a feasible flight space. If a grid cell has no obstacles but exceeds the constraints of the UAV dynamics model (e.g., its height is below a certain value), the grid cell is considered unoccupied and marked with a state value of 0, indicating that the area is a feasible flight space. If the value is 0, it is considered an invalid grid, marked as state value 2, and is also excluded from the feasible search space.
[0048] 4) Model Storage and Sharing: The mesh-based model is stored as a three-dimensional array, with the array's dimensions being... , , The grid indices along the axis are consistent, and the array elements are the grid state values (0 / 1 / 2). This model serves as global environmental information and is shared with the independent planning modules of all UAVs in distributed planning, ensuring that the path search of each UAV is based on a unified environmental representation.
[0049] 5) Model compatibility with the original solution: This model is a three-dimensional grid model, which can accurately represent the distribution of obstacles in the vertical direction (z-axis). It is highly compatible with the three-dimensional obstacle avoidance logic of the UPDOWN staggered mode in the original solution. It can provide clear spatial location information of obstacles for the drone's altitude adjustment and avoid new conflicts with obstacles when staggering vertically.
[0050] The construction of the grid occupancy model described above transforms the abstracted obstacle structured data in the original step S1-1 into a discretized environment model that can be directly called by the path search algorithm. This is the core technical means to realize the construction of the feasible search space for UAVs.
[0051] Steps S1-3, A Algorithm path search.
[0052] Each drone individually calls A The algorithm performs path search within the constructed feasible search space: starting from the initialized starting point and ending at the target point, it calculates the evaluation function for each feasible node, and filters and expands adjacent nodes according to the ascending order of evaluation function values. This continues until a series of continuous grid nodes are obtained, which serve as the initial discrete path points for the UAV.
[0053] Steps S1-4: Parallel generation of multiple drones and output of results.
[0054] Because of the use of an online distributed planning method, the above three steps of multiple drones are executed in parallel. Each drone independently generates its own initial discrete path points without exchanging information with each other or considering path conflicts and collision avoidance. After all drones have completed the path search, the initial discrete path point set of each drone is output, forming the initial flight trajectory of multiple drones, which provides basic data for subsequent conflict detection, collision avoidance optimization and other processes.
[0055] In step S2, flight priority is dynamically allocated based on the real-time distance of each UAV to the corresponding preset target point, with priority given to the closest target point.
[0056] The drones follow the principle of "priority to the nearest target point," giving higher priority to drones that are closer to their target point so that they can quickly complete their current target planning tasks. When a drone reaches its preset target point, the system automatically lowers the priority of that drone to prevent it from occupying the airspace for a long time, reduce interference with the flight paths of other drones that have not completed their tasks, and thus improve the operating efficiency of the entire multi-drone collaborative system.
[0057] The priority dynamic adjustment strategy can be represented by the following priority quantization function: ; in, Indicates drone exist The priority quantization function value at time, where a larger priority quantization function value indicates a higher priority; Indicates drone The coordinates of the planned target point Indicates drone exist Real-time location coordinates at any given moment; A preset distance threshold is used to distinguish between two operating states of the drone: approaching the target scene and moving away from the target scene.
[0058] This priority quantization function allows a drone to be assigned a higher priority as it gets closer to its target point when the distance is greater than a distance threshold. Conversely, when the distance is less than or equal to the threshold, the drone is considered to have reached the target, and its priority value decreases with decreasing distance. Compared to drones further away from the target, drones approaching the target have a lower priority. This design effectively prevents drones that have reached their target from blocking the flight paths of other drones.
[0059] In step S3, based on the convex hull property of Bernstein polynomials, deadlock prediction is achieved by verifying whether the distance between the convex hulls of the trajectories satisfies the collision constraint. That is, by judging whether the predicted distance between any two UAVs within a preset time in the future is less than the preset deadlock prediction threshold, deadlock prediction is performed on the trajectory ends of each UAV generated by the current replanning.
[0060] After obtaining the initial trajectory for each UAV according to step S1, deadlock prediction is performed on the end of the trajectory generated by the current replanning. Considering that the initial trajectory has already passed the collision avoidance check and met the safe collision avoidance constraints, it is only necessary to perform deadlock prediction on the end of the trajectory generated by the current replanning, that is, to predict the deadlock in the future. Is there a risk of deadlock at the end of the time trajectory? These are the discrete time step coefficients. is the discrete time step.
[0061] The core logic of deadlock prediction is: iterate through any two drones. and drones By judging the future The presence of deadlock risk is predicted by whether the distance between the ends of the time trajectories is less than a certain threshold. The mathematical expression for this is as follows: ; in, and They represent drones and drones exist The position coordinates at the end of the time trajectory; and They represent drones and drones The radius of the body, This represents the preset deadlock prediction threshold.
[0062] If any two drones satisfy the above inequality, a deadlock risk exists between them, requiring the use of the deadlock solution based on sub-target mode switching proposed in this invention to ensure safe and smooth execution of the flight mission. For drones without deadlock risk, trajectory planning is performed according to the set priority rules. Specifically, during path replanning, the low-priority drone treats the high-priority drone as a dynamic obstacle. By sensing the predicted flight trajectory of the high-priority drone in real time, it ensures that its planned path always avoids the predicted trajectory area of the high-priority drone, thereby maintaining the flight safety and orderliness of the system.
[0063] In step S4, when a drone is at risk of deadlock, a deadlock prevention process based on sub-target mode switching is executed: for drones without deadlock risk, trajectory planning is performed according to a preset priority; for drones with deadlock risk, the sub-target mode determination process determines the mode used for deadlock prevention, so as to achieve collaborative deadlock avoidance among multiple drones until a safe flight state without deadlock risk is restored.
[0064] Construct a sub-target pattern set containing four modes: FORWORD, RIGHT, UPDOWN, and BACK. FORWORD represents normal driving mode, RIGHT represents right-hand rule mode, UPDOWN represents staggered driving mode, and BACK represents priority-based yielding mode. Specifically: 1) FORWORD mode.
[0065] FORWORD mode is the default operating mode for drones. In this mode, the drone flies normally towards the target point along the preset path according to the initial trajectory generated in step S1, without performing any collision avoidance adjustments.
[0066] 2) RIGHT mode.
[0067] RIGHT mode is based on the right-hand rule for collision avoidance. When there is a risk of deadlock between two drones, the two drones are controlled to make a yaw adjustment to the right of their respective flight directions at a certain angle, thereby avoiding collision through path offset.
[0068] 3) BACK mode.
[0069] BACK mode is a priority-based retreat mode. Based on the priority assigned in step S2, deadlock is resolved by having a low-priority drone retreat. Specifically, the low-priority drone retreats to a preset safe area, and after the high-priority drone passes through the conflict area, the low-priority drone resumes normal flight.
[0070] 4) Updow mode.
[0071] UPDOWN mode is a staggered vertical movement mode. Two drones at risk of deadlock prioritize the economy and safety of trajectory planning. Based on the position of their target points, they formulate adjustment strategies. If there is a difference in the height of their preset target points, the drone with the lower target point will descend while the other drone ascends simultaneously, achieving staggered vertical movement. If the preset target point heights are the same, the drone farther from its target point will descend while the other drone ascends simultaneously, completing staggered vertical movement. The ascent and descent heights are set according to airspace height constraints and safety redundancy to avoid new conflicts with obstacles or other drones after adjustment.
[0072] Furthermore, the implementation of the sub-target pattern determination process includes: like Figure 2 As shown, in the initial stage, all drones are in FORWORD mode. When the deadlock prediction module detects a deadlock risk between any two drones, it first switches the mode of these two drones to RIGHT mode and begins to attempt to veer to the right to resolve the conflict. If this mode can resolve the deadlock problem, the two drones switch back to FORWORD mode and continue to fly towards the target point. If this mode still detects a deadlock due to factors such as narrow environmental passages, it switches to UPDOWN mode and implements a staggered passage strategy based on vertical altitude. In UPDOWN mode, the two drones attempt to travel at different altitudes in a staggered manner. Similarly, if this mode can resolve the deadlock issue, both drones switch to FORWORD mode and continue towards the target point. If the deadlock is still detected in this mode due to environmental altitude limitations or other reasons, a priority determination process is initiated. The priority functions of the two drones are compared, and the drone with the higher priority is switched back to FORWORD mode, while the drone with the lower priority is switched to BACK mode and retreats to a safe area. After the drone with the higher priority passes through the conflict area, the drone with the lower priority switches back to FORWORD mode and continues to travel towards the target point on the trajectory.
[0073] like Figure 3 The figure shown is a simulation result diagram of the obstacle environment experiment set in this embodiment, wherein, Figure 3 The black blocks represent obstacles, and the different colored curves represent the planned flight paths of different drones. The circles on the curves represent the drone's real-time position during planning, and the circles indicate the end point of each current trajectory. The end of the trajectory curve without a circle represents the starting point of each trajectory. From Figure 3As can be seen, during flight, no collisions occurred between drones or between drones and obstacles using the method of this invention, and no deadlock occurred between drones. Therefore, the method proposed in this invention can solve the deadlock problem in multi-drone trajectory planning tasks within a small area, improving the intelligence, efficiency, and safety of multi-drone trajectory planning.
[0074] The method provided by this invention innovatively integrates multiple modes: for UAVs at risk of deadlock, it adaptively switches operating modes based on their priority levels. Through the coordinated switching of three modes—right-hand rule passage, staggered vertical and horizontal passage, and priority yielding—it achieves safe collision avoidance for multiple UAVs, effectively solving the deadlock problem in distributed architectures and ensuring the safety of multi-UAV collaborative flight. Compared with existing single methods such as right-hand rule and priority planning, the mode switching strategy proposed in this invention has stronger environmental adaptability and flexibility. By dynamically adapting to different environmental constraints through multiple modes, it can shorten the deadlock resolution time. At the same time, it integrates the rapid decision-making advantages of heuristic rules and the spatial adaptability of local coordination scheduling, making full use of the spatial feasible domain of the scene, safely and efficiently avoiding potential deadlock problems in trajectory planning, significantly enhancing the robustness and reliability of multi-UAV systems in complex spatially constrained environments, enhancing the system's safety and intelligence, and achieving a synergistic unity of flight flexibility and operational safety. It has clear engineering application scenarios and practical value.
[0075] Example 2 This embodiment discloses a distributed multi-UAV anti-deadlock system based on sub-target mode switching.
[0076] A distributed multi-UAV anti-deadlock system based on sub-target mode switching includes: The initial flight trajectory planning module is configured to use an online distributed planning method to generate the initial flight trajectories of multiple UAVs by combining a preset dynamic model with environmental obstacle information. The flight priority dynamic allocation module is configured to dynamically allocate flight priority based on the real-time distance of each UAV to the corresponding preset target point, with priority given to the nearest target point. The deadlock prediction module is configured to: predict deadlock at the end of the trajectory of each UAV generated by the current replanning by determining whether the predicted distance between any two UAVs within a preset future time is less than a preset deadlock prediction threshold. The sub-target mode switching module is configured to execute an anti-deadlock process based on sub-target mode switching when a drone is at risk of deadlock: for drones without deadlock risk, trajectory planning is performed according to preset priorities; for drones with deadlock risk, the sub-target mode determination process determines the mode used for deadlock prevention, so as to achieve collaborative deadlock avoidance among multiple drones until a safe flight state without deadlock risk is restored.
[0077] Example 3 The purpose of this embodiment is to provide a computer-readable storage medium.
[0078] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the distributed multi-UAV anti-deadlock method based on sub-target mode switching as described in Embodiment 1 of this disclosure.
[0079] Example 4 The purpose of this embodiment is to provide an electronic device.
[0080] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the distributed multi-UAV anti-deadlock method based on sub-target mode switching as described in Embodiment 1 of this disclosure.
[0081] The steps and methods involved in the apparatuses of Embodiments 2, 3, and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0082] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0083] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A distributed multi-UAV anti-deadlock method based on sub-target mode switching, characterized in that, include: An online distributed planning method is adopted to generate the initial flight trajectories of multiple UAVs by combining a pre-set dynamic model with environmental obstacle information; Based on the real-time distance of each drone to its corresponding preset target point, flight priority is dynamically allocated with priority given to drones that are closer to the target point. By determining whether the predicted distance between any two drones within a preset future time is less than a preset deadlock prediction threshold, deadlock prediction is performed on the trajectory ends of each drone generated by the current replanning. When a drone is at risk of deadlock, a deadlock prevention process based on sub-target mode switching is executed: for drones without deadlock risk, trajectory planning is performed according to preset priorities; For drones at risk of deadlock, a sub-target mode determination process is used to determine the mode for preventing deadlock, so as to achieve collaborative deadlock avoidance among multiple drones until a safe flight state without deadlock risk is restored.
2. The distributed multi-UAV anti-deadlock method based on sub-target mode switching as described in claim 1, characterized in that, The allocation of flight priorities is achieved through a priority quantization function, which is expressed as: ; in, Indicates drone exist The priority quantization function value at time, where a larger priority quantization function value indicates a higher priority; Indicates drone The coordinates of the planned target point Indicates drone exist Real-time location coordinates at any given moment; A preset distance threshold is used to distinguish between two operating states of the drone: approaching the target scene and moving away from the target scene.
3. The distributed multi-UAV anti-deadlock method based on sub-target mode switching as described in claim 1, characterized in that, When performing deadlock prediction on the trajectories of each UAV generated by the current replanning, if any two UAVs satisfy the deadlock prediction formula, then these two UAVs are considered to have a deadlock risk; wherein, the deadlock prediction formula is specifically expressed as: ; in, and They represent drones and drones exist The position coordinates at the end of the time trajectory Represents the discrete time step coefficient. Indicates the discrete time step; and They represent drones and drones The radius of the body, This represents the preset deadlock prediction threshold.
4. The distributed multi-UAV anti-deadlock method based on sub-target mode switching as described in claim 1, characterized in that, For drones without deadlock risk, trajectory planning is performed according to preset priorities. This includes: during path replanning, low-priority drones treat higher-priority drones as dynamic obstacles and, by sensing the predicted flight trajectories of higher-priority drones in real time, ensure that their planned paths always avoid the predicted trajectory areas of higher-priority drones.
5. The distributed multi-UAV anti-deadlock method based on sub-target mode switching as described in claim 1, characterized in that, The sub-target mode determination process includes four modes: FORWORD mode, RIGHT mode, UPDOWN mode, and BACK mode. FORWORD mode represents the normal driving mode, RIGHT mode represents the right-hand rule mode, UPDOWN mode represents the staggered driving mode, and BACK mode represents the priority-based yielding mode.
6. The distributed multi-UAV anti-deadlock method based on sub-target mode switching as described in claim 5, characterized in that, The implementation of the sub-target mode determination process includes: in the initial stage, all drones are in FORWORD mode; when any two drones are at risk of deadlock, the mode of these two drones is first switched to RIGHT mode. If the deadlock problem is resolved, the drones are switched back to FORWORD mode and fly to the trajectory target point; otherwise, the drones are switched to UPDOWN mode. If the deadlock problem is resolved, the drones are switched back to FORWORD mode and fly to the trajectory target point.
7. The distributed multi-UAV anti-deadlock method based on sub-target mode switching as described in claim 6, characterized in that, The implementation of the sub-target mode determination process also includes: if the deadlock problem is not resolved after switching to UPDOWN mode, the priority determination process is started, that is, by comparing the priority functions of the two drones, the drone with higher priority is switched back to FORWORD mode, while the drone with lower priority is switched to BACK mode and retreats to a safe area; after the drone with higher priority passes through the conflict area, the drone with lower priority is switched back to FORWORD mode and continues to travel towards the trajectory target point.
8. A distributed multi-UAV anti-deadlock system based on sub-target mode switching, characterized in that, include: The initial flight trajectory planning module is configured to use an online distributed planning method to generate the initial flight trajectories of multiple UAVs by combining a preset dynamic model with environmental obstacle information. The flight priority dynamic allocation module is configured to dynamically allocate flight priority based on the real-time distance of each UAV to the corresponding preset target point, with priority given to the nearest target point. The deadlock prediction module is configured to: predict deadlock at the end of the trajectory of each UAV generated by the current replanning by determining whether the predicted distance between any two UAVs within a preset future time is less than a preset deadlock prediction threshold. The sub-target mode switching module is configured to: when a drone is at risk of deadlock, execute an anti-deadlock process based on sub-target mode switching: for drones without deadlock risk, perform trajectory planning according to preset priorities; For drones at risk of deadlock, a sub-target mode determination process is used to determine the mode for preventing deadlock, so as to achieve collaborative deadlock avoidance among multiple drones until a safe flight state without deadlock risk is restored.
9. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the distributed multi-UAV anti-deadlock method based on sub-target mode switching as described in any one of claims 1-7.
10. An electronic device, comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the distributed multi-UAV anti-deadlock method based on sub-target mode switching as described in any one of claims 1-7.