Unmanned aerial vehicle obstacle avoidance method and system
By optimizing the obstacle avoidance path of UAVs through 3D modeling and artificial bee swarm algorithm, combined with the SARSA dynamic algorithm, the problems of recognition accuracy and response speed of obstacle avoidance of UAVs in complex environments are solved, and the safety and intelligence level of obstacle avoidance are improved.
Patent Information
- Application Number
- CN202511074279.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-10-17
AI Technical Summary
When performing missions, drones face the challenge of obstacle avoidance in complex environments, especially when encountering dynamic obstacles or multiple obstacles. Existing sensors have low recognition accuracy and large computational complexity, resulting in errors in system state estimation and making it difficult to quickly send safe and reliable flight control commands.
By combining 3D modeling and artificial bee colony algorithm with SARSA dynamic algorithm, a 3D coordinate system is established. Honey sources are used to represent candidate obstacle avoidance paths. The distance function between the UAV and obstacles and other UAVs is optimized. The obstacle avoidance strategy is optimized by combining real-time state evaluation and reward mechanism.
It improves the accuracy of obstacle recognition, reduces the amount of calculation, can quickly send safe and reliable flight control commands, enhances the obstacle avoidance ability of drones in complex environments, and reduces the risk of mid-air collisions.
Smart Images

Figure CN120803052A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of unmanned aerial vehicle flight obstacle avoidance, and particularly relates to an unmanned aerial vehicle obstacle avoidance method and system. BACKGROUND
[0002] The rapid development of unmanned aerial vehicle technology has enabled its wide application in many fields, including but not limited to geographic mapping, environmental monitoring and logistics distribution. Despite this, unmanned aerial vehicles still face challenges in complex environments when performing tasks, especially in situations that require autonomous obstacle avoidance. Currently, the obstacle avoidance technology of unmanned aerial vehicles mainly relies on various sensors to perceive the surrounding environment, such as ultrasonic waves, infrared and laser radars, etc. These sensors can provide basic information about obstacles, but have limitations in terms of detection range, anti-interference capability and data fusion. When encountering dynamic obstacles or multiple obstacles, the identification time is long and not accurate, which can easily lead to errors in system state estimation. Therefore, it is of great significance for unmanned aerial vehicle obstacle avoidance to improve the identification accuracy of obstacles, reduce the computational load, and quickly send safe and reliable flight control commands. SUMMARY
[0003] The present application aims to solve at least one of the technical problems in the background art, and provides an unmanned aerial vehicle obstacle avoidance method and system.
[0004] To achieve the above-mentioned purpose, the present application provides an unmanned aerial vehicle obstacle avoidance method, comprising: establishing a three-dimensional model of the flying unmanned aerial vehicle and the surrounding environment to obtain a corresponding three-dimensional coordinate system, and obtaining a candidate obstacle avoidance path of the unmanned aerial vehicle in the three-dimensional coordinate system; based on the artificial bee colony algorithm, each honey source corresponds to a candidate obstacle avoidance path, the candidate obstacle avoidance path is represented as a minimum optimization problem, and a distance function between one of the unmanned aerial vehicles and obstacles and other unmanned aerial vehicles is obtained; confirming the constraint conditions of the unmanned aerial vehicle in the obstacle avoidance process based on the distance function; initializing the positions of N honey sources, and obtaining a moving obstacle avoidance path of the unmanned aerial vehicle through multiple rounds of loop iteration.
[0005] According to one aspect of the present application, the three-dimensional model of the flying unmanned aerial vehicle and the surrounding environment is established to obtain a corresponding three-dimensional coordinate system, and a candidate obstacle avoidance path of the unmanned aerial vehicle is obtained in the three-dimensional coordinate system, comprising: a three-dimensional model of the flying unmanned aerial vehicle group and the surrounding environment is established in real time to obtain a corresponding three-dimensional coordinate system, and the origin of the three-dimensional coordinate system is taken as the starting point of the flight planning of the unmanned aerial vehicle; A target point of the UAV flight is determined, obstacles between the original point and the target point are taken as segmentation points, three parallel lines parallel to three axes are made through each segmentation point, respectively Xi, Yi and Zi, a point is randomly selected on each parallel line, a new point Wi is formed by the vector sum of the three points, wherein i=1, 2, …, and a plurality of new points Wi are combined to form a candidate obstacle avoidance path L=(W1, W2, …, Wi).
[0006] According to an aspect of the present application, the artificial bee colony algorithm is used, each bee source corresponds to a candidate obstacle avoidance path, the candidate obstacle avoidance path is represented as a minimum optimization problem, a distance function between one of the UAVs and obstacles and other UAVs is obtained, and includes: In the artificial bee colony algorithm, each bee source corresponds to a candidate obstacle avoidance path, the distance of the candidate obstacle avoidance path is denoted by D, the candidate obstacle avoidance path is represented as a minimum optimization problem in the form of f(L)=min(D+RQ+UP), wherein min(D+RQ+UP) is a minimum value, R and U are penalty interval values {0, 1}, Q is a distance function between one of the UAVs and obstacles, P is a distance function between one of the UAVs and other UAVs, R is related to Q and P, when the distance of Q and P is 0, the penalty value is 1, when the distance of Q is greater than the position of one UAV body, the penalty value is 0, and when the distance of P is greater than the position of half UAV body, the penalty value is 0.
[0007] According to an aspect of the present application, the distance function is used to confirm the constraint condition of the UAV in the obstacle avoidance process, and includes: Q≥Qmin; P≥Pmin; V≤Vmax; Max{D / V}≤tmax; Wherein Qmin represents the minimum distance between the obstacles and the UAV, Pmin represents the minimum distance between the UAVs, V represents the speed of one of the UAVs, Vmax represents the maximum speed of one of the UAVs, and tmax represents the maximum time for one of the UAVs to avoid obstacles and reach the target point.
[0008] According to an aspect of the present application, the positions of N bee sources are initialized, and the moving obstacle avoidance path of the UAV is obtained through multiple rounds of loop iteration, and includes: The candidate obstacle avoidance path L is initialized through L=Yj+rand(0, 1)(Mj-Yj), wherein Mj and Yj are the upper limit and the lower limit of the value of the jth key obstacle avoidance point, and rand is a random number between 0 and 1; Employing bee stage: the employed bee selects the honey source, and searches the neighborhood twice before and after, and if the positions of the two optimal honey sources are the same, the candidate obstacle avoidance path is updated into L; if the positions of the two optimal honey sources are different, the fitness of each honey source is compared, and the scout bee is recruited according to the roulette method; Observation bee stage: a candidate obstacle avoidance path L represented by an employed bee is selected to obtain an intermediate candidate obstacle avoidance path W={w1…wn}; wherein w1…wn are coordinate points of the intermediate candidate obstacle avoidance path; Real-time state evaluation and action selection: the SARS dynamic algorithm receives the long-term planning information provided by the bee colony algorithm in real time, and combines the current flight state and constraint conditions of the unmanned aerial vehicle to evaluate the candidate obstacle avoidance path L of the current state; Environment interaction and reward calculation: the unmanned aerial vehicle executes the action according to the candidate obstacle avoidance path L evaluated at present, enters a new flight state, and receives an immediate reward; Adaptive obstacle avoidance strategy optimization: the SARS dynamic algorithm adjusts the obstacle avoidance strategy according to the action value function updated when the unmanned aerial vehicle executes the action based on the candidate obstacle avoidance path L, so as to maximize the expected return. Based on the real-time feedback position, speed and distance information and the long-term planning information, the unmanned aerial vehicle continuously learns and improves the obstacle avoidance strategy to adapt to the environmental changes, and obtains the mobile obstacle avoidance path of the unmanned aerial vehicle. In order to achieve the above purpose, the application also provides an unmanned aerial vehicle obstacle avoidance system, comprising: The candidate obstacle avoidance path acquisition module establishes a three-dimensional model of the flying unmanned aerial vehicle and the surrounding environment, obtains a corresponding three-dimensional coordinate system, and obtains the candidate obstacle avoidance path of the unmanned aerial vehicle in the three-dimensional coordinate system; The unmanned aerial vehicle distance calculation module obtains the distance function between one unmanned aerial vehicle and obstacles and other unmanned aerial vehicles based on the artificial bee colony algorithm, and represents the candidate obstacle avoidance path as a minimum optimization problem; The unmanned aerial vehicle obstacle avoidance constraint condition determination module confirms the constraint conditions of the unmanned aerial vehicle in the obstacle avoidance process based on the distance function; The mobile obstacle avoidance path acquisition module initializes the positions of the N honey sources, and obtains the mobile obstacle avoidance path of the unmanned aerial vehicle through multiple rounds of iterative cycles.
[0009] In order to achieve the above purpose, the application also provides an electronic device, which comprises a processor, a memory, and a computer program stored on the memory and executable on the processor, and the computer program is executed by the processor to realize the unmanned aerial vehicle obstacle avoidance method as described above.
[0010] In order to achieve the above purpose, the application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the unmanned aerial vehicle obstacle avoidance method as described above.
[0011] According to the scheme of the present application, for one or more unmanned aerial vehicles, each unmanned aerial vehicle is equipped with a ranging and visual sensor and a communication device for detecting obstacles in the surrounding environment and communicating with other unmanned aerial vehicles in the cluster; driven by the path planning and effective obstacle avoidance problem characteristics of the unmanned aerial vehicle in different environments, an effective global, local and dynamic obstacle avoidance method of the unmanned aerial vehicle is proposed by combining the improvement of the basic artificial bee colony algorithm with the dynamic algorithm, while the autonomous learning ability of the unmanned aerial vehicle is enhanced.
[0012] The present application models the unmanned aerial vehicle and the surrounding environment during flight, especially reasonably models the obstacles in the environment and other unmanned aerial vehicles in the cluster, determines the target and plans the task model of the unmanned aerial vehicle; The present application converts the obstacle avoidance problem of the unmanned aerial vehicle into a minimum optimization problem (combination constraint condition), proposes an effective reinforcement mechanism for different types of obstacle avoidance environments according to experience knowledge, and proposes an efficient artificial bee colony algorithm; the obstacle avoidance information is obtained by using the artificial bee colony algorithm, the dynamic algorithm is added, and the current flight function is evaluated; by using the flight information and state information, the efficient and intelligent autonomous obstacle avoidance ability is formed through continuous training.
[0013] According to the scheme of the present application, the present application can solve the problems of long recognition time, inaccuracy and easy system state estimation error for local and global recognition when encountering dynamic obstacles or multiple obstacles. The obstacle recognition accuracy is improved, the calculation amount is reduced, safe and reliable flight control commands can be quickly sent for obstacle avoidance control of the unmanned aerial vehicle, the unmanned aerial vehicle can more intelligently process the obstacle avoidance problem in the complex environment, the response speed of the unmanned aerial vehicle to the sudden obstacle is improved, and the safety of the flight process is enhanced, and the potential risk of air collision is reduced. BRIEF DESCRIPTION OF DRAWINGS
[0014] Figure 1 A flowchart schematically showing an unmanned aerial vehicle obstacle avoidance method according to an embodiment of the present application. DETAILED DESCRIPTION
[0015] The present application will now be discussed with reference to example embodiments. It should be understood that the discussed embodiments are merely to enable those of ordinary skill in the art to better understand and thus implement the present application, and are not intended to imply any limitation on the scope of the present application.
[0016] As used herein, the term “comprising” and variations thereof are to be construed as meaning “including, but not limited to”. The term “based on” is to be construed as “based at least in part on”. The terms “one embodiment” and “an embodiment” are to be construed as “at least one embodiment”.
[0017] Figure 1The flowchart of the obstacle avoidance method for a UAV according to one embodiment of the present invention is schematically shown. Figure 1 As shown, in this embodiment, the drone obstacle avoidance method includes: A three-dimensional model is built for the flying UAV and its surrounding environment to obtain the corresponding three-dimensional coordinate system, and candidate obstacle avoidance paths for the UAV are obtained in the three-dimensional coordinate system; Based on the artificial bee colony algorithm, each honey source corresponds to a candidate obstacle avoidance path. The candidate obstacle avoidance path is expressed as a minimum optimization problem (minimum distance optimization problem), and the distance function between one UAV and the obstacle and other UAVs is obtained; Confirm the constraints of the drone during obstacle avoidance based on the distance function; Initialize the locations of N nectar sources and obtain the obstacle avoidance path of the drone through multiple rounds of iteration.
[0018] Furthermore, according to one embodiment of the present invention, a three-dimensional model is established for the flying UAV and its surrounding environment to obtain a corresponding three-dimensional coordinate system, and a candidate obstacle avoidance path for the UAV is obtained in the three-dimensional coordinate system, including: A 3D model of the flying drone swarm and its surrounding environment is built in real time to obtain the corresponding 3D coordinate system, and the origin of the 3D coordinate system is used as the starting point for drone flight planning; Determine the target point of the drone's flight, take the obstacle between the origin and the target point as the segmentation point, and draw three parallel lines parallel to the three axes through each segmentation point, namely Xi, Yi and Zi. Randomly select a point on each parallel line, and the vector sum of the three points forms a new point Wi, where i=1,2..., and multiple new points Wi are combined to form a candidate obstacle avoidance path L=(W1, W2...Wi).
[0019] Furthermore, according to one embodiment of the present invention, based on the artificial bee colony algorithm, each honey source corresponds to a candidate obstacle avoidance path, and the candidate obstacle avoidance path is expressed as a minimum optimization problem. The distance function between one of the UAVs and the obstacle and other UAVs is obtained, including: In the artificial bee colony algorithm, the scale of the honey source is set to SN, and each honey source corresponds to a candidate obstacle avoidance path. The distance of the candidate obstacle avoidance path is represented by D. The candidate obstacle avoidance path is expressed as a minimum optimization problem using the formula f(L)=min(D+RQ+UP), where min(D+RQ+UP) is the minimum value, R and U are penalty interval values {0, 1}, Q is the distance function between one of the UAVs and the obstacle, P is the distance function between one of the UAVs and the other UAVs, R is related to Q and P, and when the distance between Q and P is 0, the penalty value is 1. When the distance between Q is greater than the position of one UAV body, the penalty value is 0, and when the distance between P is greater than the position of half the UAV body, the penalty value is 0.
[0020] Further, according to an embodiment of the present application, the constraint condition of the UAV in the obstacle avoidance process is confirmed based on a distance function, comprising: Q≥Qmin; P≥Pmin; V≤Vmax; Max{D / V}≤tmax; wherein Qmin represents the minimum distance of the obstacle from the UAV, Pmin is the minimum distance between the UAV and the UAV, V is the speed of one of the UAVs, Vmax represents the maximum speed of one of the UAVs, and tmax represents the maximum time for one of the UAVs to avoid obstacles and reach the target point.
[0021] Further, according to an embodiment of the present application, the position of the N hives is initialized, and the moving obstacle avoidance path of the UAV is obtained through multiple rounds of loop iteration, comprising: The candidate obstacle avoidance path L is initialized by L=Yj+rand(0,1)(Mj-Yj), wherein Mj and Yj are the upper limit and lower limit of the value of the jth key obstacle avoidance point, and rand is a random number between 0 and 1; The employed bee stage: the employed bee selects the hive, and searches the neighborhood twice before and after, such as the optimal hive position before and after twice, then the candidate obstacle avoidance path is updated to L; if the positions of the optimal hives before and after are different, the fitness of each hive is compared, and the employed bee recruits the onlooker bee according to the roulette method; The onlooker bee stage: a planning candidate obstacle avoidance path L represented by an employed bee is selected to obtain an intermediate candidate obstacle avoidance path W={w1…wn}; wherein w1…wn are coordinate points of the intermediate candidate obstacle avoidance path; Real-time state evaluation and action selection: the SARS dynamic algorithm receives the long-term planning information provided by the bee colony algorithm in real time, and combines the current flight state and the constraint condition of the UAV to evaluate the candidate obstacle avoidance path L of the current state; Environment interaction and reward calculation: the UAV executes the action according to the candidate obstacle avoidance path L evaluated at present, enters a new flight state, and receives the immediate reward; Adaptive obstacle avoidance strategy optimization: the SARS dynamic algorithm adjusts the obstacle avoidance strategy according to the action value function updated when the UAV executes the action based on the candidate obstacle avoidance path L, so as to maximize the expected return. Based on the real-time feedback of the position, speed and distance information and the long-term planning information, the UAV continuously learns and improves the obstacle avoidance strategy to adapt to the environmental changes, so as to obtain the moving obstacle avoidance path of the UAV.
[0022] According to the above scheme of the present application, for one or more unmanned aerial vehicles, each unmanned aerial vehicle is equipped with a ranging and visual sensor and a communication device for detecting obstacles in the surrounding environment and communicating with other unmanned aerial vehicles in the cluster; driven by the path planning and effective obstacle avoidance problem characteristics of the unmanned aerial vehicle in different environments, an effective global, local and dynamic obstacle avoidance method of the unmanned aerial vehicle is proposed by combining the improvement of the basic artificial bee colony algorithm with the dynamic algorithm, while the autonomous learning ability of the unmanned aerial vehicle is enhanced.
[0023] The present application models the unmanned aerial vehicle and the surrounding environment during flight, especially reasonably models the obstacles in the environment and other unmanned aerial vehicles in the cluster, determines the target and plans the task model of the unmanned aerial vehicle; The present application converts the obstacle avoidance problem of the unmanned aerial vehicle into a minimum optimization problem (combination constraint condition), proposes an effective reinforcement mechanism for different types of obstacle avoidance environments according to experience knowledge, and proposes an efficient artificial bee colony algorithm; the obstacle avoidance information is obtained by using the artificial bee colony algorithm, the dynamic algorithm is added, and the current flight function is evaluated; by using the flight information and state information, the efficient and intelligent autonomous obstacle avoidance ability is formed through continuous training.
[0024] According to the above scheme of the present application, the present application can solve the problems of long recognition time, inaccuracy and easy system state estimation error for local and global recognition when encountering dynamic obstacles or multiple obstacles. The obstacle recognition accuracy is improved, the calculation amount is reduced, and safe and reliable flight control commands can be quickly sent for obstacle avoidance control of the unmanned aerial vehicle. The unmanned aerial vehicle can more intelligently process the obstacle avoidance problem in a complex environment, improve the response speed of the unmanned aerial vehicle to sudden obstacles, thereby enhancing the safety of the flight process and reducing the potential risk of air collision.
[0025] Further, in order to achieve the above object, the present application also provides an unmanned aerial vehicle obstacle avoidance system, comprising: The candidate obstacle avoidance path acquisition module establishes a three-dimensional model of the flying unmanned aerial vehicle and the surrounding environment, obtains the corresponding three-dimensional coordinate system, and obtains the candidate obstacle avoidance path of the unmanned aerial vehicle in the three-dimensional coordinate system; The unmanned aerial vehicle distance calculation module is based on the artificial bee colony algorithm, each honey source corresponds to a candidate obstacle avoidance path, the candidate obstacle avoidance path is represented as a minimum optimization problem, and the distance function between one unmanned aerial vehicle and obstacles and other unmanned aerial vehicles is obtained; The unmanned aerial vehicle obstacle avoidance constraint condition determination module determines the constraint condition of the unmanned aerial vehicle in the obstacle avoidance process based on the distance function; The moving obstacle avoidance path acquisition module initializes the positions of the N honey sources, and obtains the moving obstacle avoidance path of the unmanned aerial vehicle through multiple rounds of loop iteration.
[0026] Further, according to an embodiment of the present application, a three-dimensional model of the flying unmanned aerial vehicle and the surrounding environment is established, and a corresponding three-dimensional coordinate system is obtained, and a candidate obstacle avoidance path of the unmanned aerial vehicle is obtained in the three-dimensional coordinate system, including: A three-dimensional model of the flying unmanned aerial vehicle group and the surrounding environment is established in real time, and a corresponding three-dimensional coordinate system is obtained, and the origin of the three-dimensional coordinate system is taken as a starting point of flight planning of the unmanned aerial vehicle; A target point of the unmanned aerial vehicle flight is determined, and an obstacle between the origin and the target point is taken as a segmentation point, and three parallel lines parallel to three axes are made through each segmentation point, respectively, Xi, Yi and Zi, and a new point Wi is randomly selected on each parallel line, wherein i=1, 2……, and a plurality of new points Wi are combined to form a candidate obstacle avoidance path L=(W1, W2………Wi).
[0027] Further, according to an embodiment of the present application, based on the artificial bee colony algorithm, each honey source corresponds to a candidate obstacle avoidance path, and the candidate obstacle avoidance path is represented as a minimum optimization problem, and a distance function between one unmanned aerial vehicle and obstacles and other unmanned aerial vehicles is obtained, including: In the artificial bee colony algorithm, the size of the honey source is set to SN, each honey source corresponds to a candidate obstacle avoidance path, and the distance of the candidate obstacle avoidance path is represented by D, and the candidate obstacle avoidance path is represented as a minimum optimization problem by formula f(L)=min(D+RQ+UP), wherein min(D+RQ+UP) is the minimum value, R and U are penalty interval values {0, 1}, Q is a distance function between one unmanned aerial vehicle and obstacles, P is a distance function between one unmanned aerial vehicle and other unmanned aerial vehicles, R is related to Q and P, and when the distance of Q and P is 0, the penalty value is 1, when the distance of Q is greater than the position of one unmanned aerial vehicle body, the penalty value is 0, and when the distance of P is greater than half the position of one unmanned aerial vehicle body, the penalty value is 0.
[0028] Further, according to an embodiment of the present application, based on the distance function, the constraint conditions of the unmanned aerial vehicle in the obstacle avoidance process are confirmed, including: Q≥Qmin; P≥Pmin; V≤Vmax; Max{D / V}≤tmax; Wherein Qmin represents the minimum distance of the obstacle from the unmanned aerial vehicle, Pmin is the minimum distance between the unmanned aerial vehicles, V is the speed of one unmanned aerial vehicle, Vmax represents the maximum speed of one unmanned aerial vehicle, and tmax represents the maximum time for one unmanned aerial vehicle to avoid obstacles and reach the target point.
[0029] Further, according to an embodiment of the present application, the positions of the N hives are initialized, and a moving obstacle avoidance path of the UAV is obtained through a multi-round loop iteration, comprising: The candidate obstacle avoidance path L is initialized through L=Yj+rand(0,1)(Mj-Yj), wherein Mj and Yj are upper and lower limits of the value of the jth key obstacle avoidance point, and rand is a random number of (0,1); The employed bee selects a hive, and searches the neighborhood twice before and after, and if the positions of the two optimal hives are the same, the candidate obstacle avoidance path is updated into L; if the positions of the two optimal hives are different, the fitness of each hive is compared, and the employed bee recruits the onlooker bee according to the roulette method; The onlooker bee stage: a planning candidate obstacle avoidance path L represented by an employed bee is selected to obtain an intermediate candidate obstacle avoidance path W={w1…wn}; Wherein w1…wn are coordinate points of the intermediate candidate obstacle avoidance path; Real-time state evaluation and action selection: the SARS dynamic algorithm receives the long-term planning information provided by the bee colony algorithm in real time, and combines the current flight state and constraint conditions of the UAV to evaluate the candidate obstacle avoidance path L of the current state; Environment interaction and reward calculation: the UAV executes the action according to the candidate obstacle avoidance path L evaluated at present, enters a new flight state, and receives an immediate reward; Adaptive obstacle avoidance strategy optimization: the SARS dynamic algorithm adjusts the obstacle avoidance strategy according to the action value function updated when the UAV executes the action based on the candidate obstacle avoidance path L, so as to maximize the expected return. Based on the real-time feedback of the position, speed and distance information and the long-term planning information, the UAV continuously learns and improves the obstacle avoidance strategy to adapt to the environmental changes, and obtains the moving obstacle avoidance path of the UAV. According to the above scheme of the present application, one or more UAVs are provided with range finding and visual sensors and communication equipment for detecting obstacles in the surrounding environment and communicating with other UAVs in the cluster; the path planning and effective obstacle avoidance problem characteristics of the UAV in different environments are used as the driving force, the improved basic artificial bee colony algorithm is combined with the dynamic algorithm, and the self-learning ability of the UAV is strengthened, and an effective global, local and dynamic obstacle avoidance method of the UAV is proposed.
[0030] The present application models the UAV and the surrounding environment during flight, especially reasonably models the obstacles in the environment and other UAVs in the cluster, determines the target and plans the task model of the UAV; The unmanned aerial vehicle obstacle avoidance problem is converted into a minimum optimization problem (combination constraint condition) according to experience knowledge, effective reinforcement mechanisms are proposed for different types of obstacle avoidance environments, and an efficient artificial bee colony algorithm is proposed.
[0031] According to the above scheme of the present application, the problem that the identification time is long, inaccurate and prone to cause system state estimation error when encountering dynamic obstacles or multiple obstacles, local and global recognition is solved. The obstacle recognition accuracy is improved, the calculation amount is reduced, and the safe and reliable flight control command can be quickly sent to control the unmanned aerial vehicle to avoid obstacles. The unmanned aerial vehicle can more intelligently process the obstacle avoidance problem in a complex environment, improve the response speed of the unmanned aerial vehicle to sudden obstacles, thereby enhancing the safety of the flight process and reducing the potential risk of air collision.
[0032] Further, in order to achieve the above purpose, the present application further provides an electronic device, comprising a processor, a memory and a computer program stored on the memory and executable on the processor, and the computer program is executed by the processor to realize the unmanned aerial vehicle obstacle avoidance method as described above.
[0033] Further, in order to achieve the above purpose, the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the unmanned aerial vehicle obstacle avoidance method as described above.
[0034] Those skilled in the art can realize that the modules and algorithm steps described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0035] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the above-described device and equipment can refer to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0036] In the embodiments of the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the described apparatus embodiment is merely schematic. For example, the division of the modules is merely a logical function division. For another example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or modules, and can be in electrical, mechanical or other forms.
[0037] The modules illustrated as separated components can or can not be physically separated, and the components illustrated as modules can or can not be physical modules, i.e., can be located in one place, or can be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0038] In addition, each functional module in the embodiments of the present application can be integrated into a processing module, or each module can be physically present alone, or two or more modules can be integrated into one module.
[0039] If the functions are realized in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods performed by the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, and various other media that can store program codes.
[0040] The above description is merely the preferred embodiments of the present application and the explanation of the applied technical principles. Those skilled in the art should understand that the scope of the application disclosed in the present application is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combinations of the above technical features or equivalent features without departing from the inventive concept. For example, the above features can be replaced with the technical features disclosed in the present application (but not limited to) having similar functions to form technical solutions.
[0041] It should be understood that the size of the serial number of each step in the summary and embodiments of the present application does not absolutely mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Claims
1. A drone obstacle avoidance method, characterized in that: include: A three-dimensional model is built for the flying UAV and its surrounding environment to obtain the corresponding three-dimensional coordinate system, and candidate obstacle avoidance paths for the UAV are obtained in the three-dimensional coordinate system; Based on the artificial bee colony algorithm, each honey source corresponds to a candidate obstacle avoidance path. The candidate obstacle avoidance path is expressed as a minimum optimization problem to obtain the distance function between one UAV and the obstacle and other UAVs. Confirm the constraints of the drone during obstacle avoidance based on the distance function; Initialize the locations of N nectar sources and obtain the obstacle avoidance path of the drone through multiple rounds of iteration.
2. The obstacle avoidance method for a UAV according to claim 1, characterized in that: The process of establishing a three-dimensional model of the flying UAV and its surrounding environment, obtaining a corresponding three-dimensional coordinate system, and obtaining a candidate obstacle avoidance path for the UAV in the three-dimensional coordinate system includes: A 3D model of the flying drone swarm and its surrounding environment is built in real time to obtain the corresponding 3D coordinate system, and the origin of the 3D coordinate system is used as the starting point for drone flight planning; Determine the target point of the drone's flight, take the obstacle between the origin and the target point as the segmentation point, and draw three parallel lines parallel to the three axes through each segmentation point, namely Xi, Yi and Zi. Randomly select a point on each parallel line, and the vector sum of the three points forms a new point Wi, where i=1,2..., and multiple new points Wi are combined to form a candidate obstacle avoidance path L=(W1, W2...Wi).
3. The obstacle avoidance method for a UAV according to claim 2, characterized in that: Based on the artificial bee colony algorithm, each honey source corresponds to a candidate obstacle avoidance path. The candidate obstacle avoidance path is expressed as a minimum optimization problem to obtain the distance function between one UAV and the obstacle and other UAVs, including: In the artificial bee colony algorithm, each nectar source corresponds to a candidate obstacle avoidance path. The distance of the candidate obstacle avoidance path is represented by D. The candidate obstacle avoidance path is expressed as a minimum optimization problem using the formula f(L)=min(D+RQ+UP), where min(D+RQ+UP) is the minimum value, R and U are penalty interval values {0, 1}, Q is the distance function between one of the UAVs and the obstacle, P is the distance function between one of the UAVs and the other UAVs, R is related to Q and P. When the distance between Q and P is 0, the penalty value is 1. When the distance to Q is greater than the position of one UAV body, the penalty value is 0. When the distance to P is greater than the position of half the UAV body, the penalty value is 0.
4. The obstacle avoidance method for a UAV according to claim 3, characterized in that: The constraint conditions for determining the drone's obstacle avoidance process based on the distance function include: Q≥Qmin; P≥Pmin; V≤Vmax; Max{D / V}≤tmax; Among them, Qmin represents the minimum distance between the obstacle and the drone, Pmin is the minimum distance between drones, V represents the speed of one drone, Vmax represents the maximum speed of one drone, and tmax represents the maximum time for one drone to avoid obstacles and reach the target point.
5. The obstacle avoidance method for a UAV according to claim 4, characterized in that: The process of initializing the locations of N honey sources and obtaining the obstacle avoidance path of the drone through multiple rounds of iterations includes: Initialize the candidate obstacle avoidance path L by L = Yj + rand (0, 1) (Mj - Yj), where Mj, Yj are the upper and lower limits of the j-th key obstacle avoidance point, and rand is a random number in (0, 1); Hired bee stage: Hired bees select a nectar source and search its neighborhood twice. If the locations of the two optimal nectar sources are the same, the candidate obstacle avoidance paths are updated in L. If the locations of the two optimal nectar sources are different, the fitness of each nectar source is compared, and the hired bees recruit observer bees according to the roulette wheel method. Observer bee stage: select a planned candidate obstacle avoidance path L represented by an employed bee, and obtain the intermediate candidate obstacle avoidance path W={w1…wn}; where w1…wn are the coordinate points of the intermediate candidate obstacle avoidance path; Real-time state evaluation and action selection: The SARSA dynamic algorithm receives the long-term planning information provided by the swarm algorithm in real time, and evaluates the candidate obstacle avoidance path L for the current state based on the current flight state and constraints of the UAV. Environment interaction and reward calculation: The drone performs actions based on the currently evaluated candidate obstacle avoidance path L, enters a new flight state, and receives immediate rewards; Adaptive obstacle avoidance strategy optimization: The SARSA dynamic algorithm adjusts the obstacle avoidance strategy to maximize the expected return based on the updated action value function when the UAV performs actions based on the candidate obstacle avoidance path L. Based on real-time feedback of position, speed and distance information as well as long-term planning information, the UAV continuously learns and improves the obstacle avoidance strategy to adapt to environmental changes and obtain the UAV's mobile obstacle avoidance path.
6. UAV obstacle avoidance system, characterized by: include: The candidate obstacle avoidance path acquisition module builds a three-dimensional model of the flying UAV and its surrounding environment, obtains the corresponding three-dimensional coordinate system, and obtains the candidate obstacle avoidance path of the UAV in the three-dimensional coordinate system; The UAV distance calculation module is based on the artificial bee colony algorithm. Each honey source corresponds to a candidate obstacle avoidance path. The candidate obstacle avoidance path is expressed as a minimum optimization problem to obtain the distance function between one UAV and the obstacle and other UAVs. The UAV obstacle avoidance constraint determination module confirms the constraint conditions of the UAV during the obstacle avoidance process based on the distance function; The mobile obstacle avoidance path acquisition module initializes the positions of N honey sources and obtains the mobile obstacle avoidance path of the drone through multiple rounds of loop iteration.
7. An electronic device, characterized in that The invention comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for avoiding obstacles of a drone as claimed in any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the drone obstacle avoidance method according to any one of claims 1 to 5 is implemented.