Unmanned aerial vehicle flight path planning and optimizing method based on fuzzy control

Through the drone track planning method based on fuzzy control, the track is optimized in real time, and the problem of local optimal solutions in the existing technology is solved, and the safe and efficient navigation of the drone is achieved.

CN119225391APending Publication Date: 2024-12-31YANAN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411277797.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Existing drone track planning algorithms are prone to fall into local optimal solutions and it is difficult to determine the optimal track, especially in actual applications where the flight space range is large, the parameters are many, and the parameters are directly related to each other.

Method used

Using the drone track planning method based on fuzzy control, the reference track is generated through the first preset algorithm, and obstacles are detected in real time during flight, and the heading angle is adjusted according to the depth value and motion direction of the obstacles. and flight speed, optimized track.

Benefits of technology

It avoids the defects of local optimal solutions, can quickly obtain the optimal track, ensure the safe navigation of the drone, and is suitable for uncertain and unknown fields. It does not require model construction in advance, with small calculations and good robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225391A_ABST
    Figure CN119225391A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of unmanned aerial vehicle control, and provides an unmanned aerial vehicle flight path planning and optimizing method based on fuzzy control, which comprises the following steps: generating a reference flight path of an unmanned aerial vehicle based on a first preset algorithm; when a new obstacle image is detected, new obstacle feature points are extracted, the depth value of the obstacle is obtained according to the feature points and a second preset algorithm, and the obstacle is identified according to the depth value of the obstacle; according to the movement of the at least two feature points in the image and the movement of the unmanned aerial vehicle in the flight process, the distance between the unmanned aerial vehicle and the obstacle is obtained; and according to the distance between the unmanned aerial vehicle and the obstacle and based on a preset fuzzy controller rule, obtaining a course angle change quantity and a flight speed change quantity, optimizing the reference track according to the course angle change quantity and the flight speed change quantity, and further continuing to fly according to the optimized track. The flight path of the unmanned aerial vehicle can be reliably planned and optimized, and safe flight of the unmanned aerial vehicle is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of UAV control technology, and in particular to a UAV trajectory planning and optimization method based on fuzzy control. Background Art

[0002] Unmanned aircraft, also known as drones, are unmanned aircraft that are controlled by radio remote control equipment and / or preset programs. Drones have the advantages of small size, low cost, low loss and high maneuverability. Therefore, they are widely used in express delivery services, urban management, security and explosion prevention, agriculture, meteorology, electricity, disaster relief and video shooting.

[0003] UAV trajectory planning refers to optimizing the flight trajectory of a UAV based on the mission requirements and flight area characteristics of the UAV. This technology is an important issue in realizing the efficient application of UAVs in various fields. There are already solutions for UAV trajectory planning in the existing technology, such as:

[0004] The literature uses the Dijkstra algorithm based on the Voronoi diagram to find the optimal trajectory of the UAV. This method approximates the threat area of ​​each UAV as a point and selects the intersection of the perpendicular midpoints between the threat points as the trajectory point. This method can make the UAV trajectory avoid the threat point to a certain extent.

[0005] Based on the trajectory planning strategy of the ant colony algorithm, the literature designed a group space evolved by the ant colony algorithm and a belief space composed of the optimal solution of the group space. The two spaces evolve simultaneously and promote each other, thereby obtaining the UAV trajectory.

[0006] However, it is found in practice that due to the large flight space range, many parameters and the direct correlation between the parameters in the actual application of UAVs, the algorithms disclosed in the above literature are prone to fall into local optimal solutions, and even make it impossible to determine the optimal trajectory. Summary of the invention

[0007] The embodiment of the present application provides a UAV trajectory planning and optimization method based on fuzzy control to solve the above-mentioned problems in the prior art.

[0008] A first aspect of an embodiment of the present application provides a UAV trajectory planning and optimization method based on fuzzy control, comprising: Generate a reference track of the UAV based on a first preset algorithm; Drive the drone to fly along the reference track and detect in real time whether there are new obstacle images in the preset area ahead during flight; When a new obstacle image is detected, new obstacle feature points are extracted, and the depth value of the obstacle is obtained according to the feature points and the second preset algorithm. The obstacle is identified according to the depth value of the obstacle, and the identification result is sent to the background database for storage and / or display, so that relevant personnel can conduct remote monitoring or decision-making; According to the movement of at least two feature points in the image and the movement of the drone during the flight, the distance between the drone and the obstacle is obtained by a preset formula; The distance between the UAV and the obstacle, as well as the equivalent angle formed by the current movement direction of the UAV and the line connecting the UAV and the obstacle are taken as input variables, and based on the preset fuzzy controller rules, the output variables of heading angle change and flight speed change are obtained. The reference track is optimized according to the heading angle change and flight speed change, and then the flight continues according to the optimized track.

[0009] Furthermore, the generating of the reference track of the UAV based on the first preset algorithm comprises the following steps: Step 11, divide the track planning space into n equal parts on the x-axis to obtain n track node coordinate parameters, and set the relevant parameters; Step 12, set the number of iterations t=0, and initialize the particle swarm position matrix based on the constraints; Step 13: Calculate the fitness value of each particle and compare the current fitness value of each particle with the historical optimal fitness value p i , if the current value is less than p i , then the position and fitness value of the current particle are updated to the historical optimum, and the global optimum p of the group with the minimum fitness of all particles is determined g , if the current global optimum is less than the historical global optimum, then update the historical global optimum; Step 14, determine whether the end condition is met; if the constraint condition is met, go to step 112, otherwise, go to step 15; Step 15, set the number of particle swarm i=0; Step 16, set particle dimension j=0; Step 17, update the particle's velocity and position. If the current velocity|v ij |≥|V max |, then take |v ij |=|V max |, the direction remains unchanged; Step 18, let particle dimension j = j + 1, if j>n, go to step 19; otherwise, go to step 17; Step 19, let the number of particles i=i+1, if i>N, go to step 110; otherwise, go to step 16; Step 110, check the validity of the updated particles, and reinitialize if they are invalid; Step 111: If the difference between the global optimal fitness value of the last iteration and the current iteration is less than the preset accuracy control parameter, the current global optimal p is retained. g , and reinitialize the particle swarm position at the same time; Step 112, the number of iterations t=t+1, if t>T max , go to step 113; otherwise, go to step 13; Step 113, the iteration ends and an optimal p is selected g , as the reference track.

[0010] Furthermore, the number of iterations t=0 is set, and the particle swarm position matrix is ​​initialized based on the constraint conditions, wherein the particle swarm position matrix is ​​expressed by the following formula:

[0011] In the above formula, Respectively represent the track nodes of the i-th particle The coordinates of .

[0012] Furthermore, the number of iterations t=0 is set, and the particle swarm position matrix is ​​initialized based on the constraint conditions, wherein the constraint conditions are that the flight track nodes are all outside the obstacle area, the track segment has no intersection with the obstacle area, and the adjacent track segments satisfy the maximum turning angle.

[0013] Furthermore, the determination as to whether a termination condition is met may include the termination condition being that a maximum number of iterations is reached or the optimal value converges to a specified accuracy.

[0014] Furthermore, the driving drone flies along the reference track and detects in real time during flight whether there is a new obstacle image in the preset area ahead, wherein a camera is set at the front end of the drone to obtain whether there is a new obstacle image in the preset area ahead.

[0015] Furthermore, when a new obstacle image is detected, new obstacle feature points are extracted, and the depth value of the obstacle is obtained according to the feature points and the second preset algorithm, the obstacle is identified according to the depth value of the obstacle, and the identification result is sent to the background database for storage and / or display, so as to provide remote monitoring or decision-making for relevant personnel, wherein the depth value of the obstacle is obtained according to the feature points and the second preset algorithm, and specifically includes the following steps: Step 31, calculating the number of samples M to be selected according to the number of feature points and the number of obstacles; Step 32: randomly select two feature point samples and calculate the depth value Z using a preset formula i ; Step 33, use other feature points in the image and two sample points to calculate the depth value. If the depth mean is equal to Zi If the difference is less than the threshold, the feature point is considered to be an interior point, the number of interior points is accumulated, and steps 31 to 33 are repeated until the processing of M groups of samples is completed; Step 34, selecting the optimal inlier point set according to the number of inliers and the variance of the depth error, and using these inlier point data to calculate the final depth value; Step 35, repeating steps 31 to 34 to find new inner points among the outer points until the number of feature points meets a preset threshold; Step 36: Determine the depth value of the obstacle by the average depth value of all internal points in each obstacle area.

[0016] Furthermore, according to the movement of at least two feature points in the image and the movement of the drone during the flight, the distance between the drone and the obstacle is obtained by a preset formula, wherein the preset formula is expressed by the following formula:

[0017] In the above formula, is the motion of known feature points in the image; for the movement of drones; is the distance between the UAV’s movement and the two feature points in the image; D is the distance between the UAV and the obstacle.

[0018] Furthermore, the distance between the UAV and the obstacle, and the equivalent angle formed by the current movement direction of the UAV and the line connecting the UAV and the obstacle are used as input variables, and based on the preset fuzzy controller rules, the output variables of the heading angle change and the flight speed change are obtained, and the reference track is optimized according to the heading angle change and the flight speed change, and then the flight continues according to the optimized track, wherein the current movement direction of the UAV and the equivalent angle formed by the line connecting the UAV and the obstacle are , calculated by the following formula:

[0019] In the above formula, a is the number of obstacles within the detection range, is the horizontal angle of the ith obstacle, is the angular resolution of the camera.

[0020] Furthermore, the preset fuzzy controller rules are set as a fuzzy controller rule table, and then the output variables heading angle change and flight speed change are obtained by looking up the table.

[0021] A second aspect of an embodiment of the present application provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.

[0022] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0023] A fourth aspect of the present application provides a computer program product, which, when executed on a terminal, enables the terminal to execute the steps of the method described in the first aspect.

[0024] It can be seen from the above that the embodiment of the present application generates a reference track of the UAV based on the first preset algorithm and executes the flight plan according to the reference track. During the flight, it is inevitable to encounter new obstacles that have not been identified and processed by the first preset algorithm. Fuzzy control is very suitable for uncertain and unknown fields. It does not require pre-construction of models, does not rely on current environmental information, has low computational complexity, and has good robustness. Through the preset fuzzy controller rules, the heading angle change and the flight speed change can be quickly obtained, and then the reference track is optimized according to the heading angle change and the flight speed change. This not only avoids the defect that the track optimization algorithm in the prior art is prone to fall into the local optimal solution, but also can quickly obtain the optimal track to ensure the safe navigation of the UAV. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0026] Figure 1 It is a flowchart of a UAV trajectory planning and optimization method based on fuzzy control provided in an embodiment of the present application; Figure 2 It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0028] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0029] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0030] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0031] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0032] In a specific implementation, the terminal described in the embodiments of the present application includes, but is not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch screen displays and / or touch pads).

[0033] In the following discussion, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and / or joystick.

[0034] The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disk burning application, a spreadsheet application, a game application, a telephone application, a video conferencing application, an email application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital camcorder application, a web browsing application, a digital music player application, and / or a digital video player application.

[0035] Various applications that can be executed on the terminal can use at least one common physical user interface device such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within corresponding applications. In this way, the common physical architecture of the terminal (e.g., the touch-sensitive surface) can support various applications with user interfaces that are intuitive and transparent to the user.

[0036] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0037] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0038] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for fuzzy control-based UAV trajectory planning and optimization provided in an embodiment of the present application. Figure 1 As shown, a UAV trajectory planning and optimization method based on fuzzy control includes the following steps:

[0039] Step 1, generating a reference track of the UAV based on a first preset algorithm; Step 2: drive the drone to fly along the reference track and detect in real time whether there are new obstacle images in the preset area ahead during flight; Step 3: when a new obstacle image is detected, new obstacle feature points are extracted, and the depth value of the obstacle is obtained according to the feature points and the second preset algorithm, the obstacle is identified according to the depth value of the obstacle, and the identification result is sent to the background database for storage and / or display, so that relevant personnel can conduct remote monitoring or decision-making; Step 4, according to the movement of at least two feature points in the image and the movement of the drone during the flight, the distance between the drone and the obstacle is obtained by a preset formula; Step 5, taking the distance between the UAV and the obstacle, and the equivalent angle formed by the current movement direction of the UAV and the line connecting the UAV and the obstacle as input variables, and based on the preset fuzzy controller rules, obtaining the output variables of the heading angle change and the flight speed change, and optimizing the reference track according to the heading angle change and the flight speed change, and then continuing to fly according to the optimized track.

[0040] Obviously, since the reference track of the UAV is generated based on the first preset algorithm and the flight plan is executed according to the reference track, it is inevitable to encounter new obstacles that have not been identified and processed by the first preset algorithm during the flight; fuzzy control is very suitable for uncertain and unknown fields. It does not require advance model construction, does not rely on current environmental information, has low computational complexity, and has good robustness. Through the preset fuzzy controller rules, the heading angle change and the flight speed change can be quickly obtained, and then the reference track is optimized according to the heading angle change and the flight speed change. This not only avoids the defect that the track optimization algorithm in the prior art is prone to fall into the local optimal solution, but also can quickly obtain the optimal track to ensure the safe navigation of the UAV.

[0041] In the embodiment of the present application, step 1, generating a reference track of the UAV based on the first preset algorithm, may include the following steps: Step 11: divide the trajectory planning space into n equal parts on the x-axis to obtain n trajectory node coordinate parameters, and set relevant parameters, for example, set the number of particle swarms N, the maximum speed V max and the maximum number of iterations T max wait; Step 12, set the number of iterations t=0, and initialize the particle swarm position matrix based on the constraints; Step 13: Calculate the fitness value of each particle and compare the current fitness value of each particle with the historical optimal fitness value p i , if the current value is less than p i , then the position and fitness value of the current particle are updated to the historical optimum, and the global optimum p of the group with the minimum fitness of all particles is determined g , if the current global optimum is less than the historical global optimum, then update the historical global optimum; Step 14, determine whether the end condition is met; if the constraint condition is met, go to step 112, otherwise, go to step 15; Step 15, set the number of particle swarm i=0; Step 16, set particle dimension j=0; Step 17, update the particle's velocity and position. If the current velocity|v ij |≥|V max |, then take |v ij |=|V max |, the direction remains unchanged; Step 18, let particle dimension j = j + 1, if j>n, go to step 19; otherwise, go to step 17; Step 19, let the number of particles i=i+1, if i>N, go to step 110; otherwise, go to step 16; Step 110, check the validity of the updated particles, and reinitialize if they are invalid; Step 111: If the difference between the global optimal fitness value of the last iteration and the current iteration is less than the preset accuracy control parameter, the current global optimal p is retained. g , and reinitialize the particle swarm position at the same time; Step 112, the number of iterations t=t+1, if t>T max , go to step 113; otherwise, go to step 13; Step 113, the iteration ends and an optimal p is selected g , as the reference track.

[0042] Obviously, in the embodiment of the present application, since the difference between the global optimal fitness value of the last iteration and the current iteration is set to be compared with the preset precision control parameter, and the precision control parameter can be adjusted as needed, the algorithm has better versatility and adaptability, and can effectively avoid falling into the local optimum; At the same time, since the maximum number of iterations is set to judge the end condition, the output result of the reference track can be adjusted by setting the maximum number of iterations, so that the reference track continuously approaches the optimal track.

[0043] Specifically, in step 12, let the number of iterations t=0, and initialize the particle swarm position matrix based on the constraint conditions, where the particle swarm position matrix can be expressed by the following formula:

[0044] In the above formula, The track nodes of the i-th particle are recorded respectively Coordinates in the two-dimensional planning space; for a particle swarm with a population of N, its position information is represented by a matrix, and each row vector of the matrix represents the position coordinate of a particle (that is, a complete track). Since there are N particles in total, the corresponding matrix has N rows.

[0045] For example, the constraint conditions may be that all flight track nodes are outside the obstacle area, the track segment has no intersection with the obstacle area, and adjacent track segments satisfy the maximum turning angle.

[0046] For example, the end condition may be reaching the maximum number of iterations T max Or the optimal value converges to the specified accuracy.

[0047] In an embodiment of the present application, step 2 is to drive the drone to fly along a reference track, and detect in real time during flight whether there is a new obstacle image in a preset area in front. A camera can be set at the front end of the drone to obtain the presence of a new obstacle image in the preset area in front through the camera.

[0048] Obviously, since a camera is set at the front end of the drone for obstacle detection, it can not only achieve the effect of obstacle detection, but also setting a camera has the characteristics of small size, low power consumption, good concealment, etc., which is very suitable for use on drones.

[0049] In the embodiment of the present application, in step 3, when a new obstacle image is detected, new obstacle feature points are extracted, and the depth value of the obstacle is obtained according to the feature points and the second preset algorithm, the obstacle is identified according to the depth value of the obstacle, and the identification result is sent to the background database for storage and / or display, so as to provide remote monitoring or decision-making for relevant personnel, wherein the depth value of the obstacle is obtained according to the feature points and the second preset algorithm, which may specifically include the following steps: Step 31, calculating the number of samples M to be selected according to the number of feature points and the number of obstacles; Step 32: randomly select two feature point samples and calculate the depth value Z using a preset formula i ; Step 33, use other feature points in the image and two sample points to calculate the depth value. If the depth mean is equal to Z i If the difference is less than the threshold, the feature point is considered to be an interior point, the number of interior points is accumulated, and steps 31 to 33 are repeated until the processing of M groups of samples is completed; Step 34, selecting the optimal inlier point set according to the number of inliers and the variance of the depth error, and using these inlier point data to calculate the final depth value; Step 35, repeating steps 31 to 34 to find new inner points among the outer points until the number of feature points meets a preset threshold; Step 36: Determine the depth value of the obstacle by the average depth value of all internal points in each obstacle area.

[0050] Obviously, since there may be multiple obstacles in the field of view, the depth of each obstacle is different. Therefore, the depth value Z is calculated by randomly selecting two feature point samples. i , and use this as a reference value to continuously distinguish between inner points and outer points, so as to screen out the set of all inner points in each obstacle area, and determine the depth value of the obstacle according to the set of all inner points in the obstacle area. The depth value can effectively improve the accuracy of obstacle recognition.

[0051] In the embodiment of the present application, in step 4, according to the movement of at least two feature points in the image and the movement of the drone during the flight, the distance between the drone and the obstacle is obtained by a preset formula, wherein the preset formula can be expressed by the following formula:

[0052] In the above formula, is the motion of known feature points in the image; for the movement of drones; is the distance between the UAV’s movement and the two feature points in the image; D is the distance between the UAV and the obstacle.

[0053] In the embodiment of the present application, step 5, the distance between the UAV and the obstacle, and the equivalent angle formed by the current movement direction of the UAV and the line connecting the UAV and the obstacle are used as input variables, and based on the preset fuzzy controller rules, the output variables of the heading angle change and the flight speed change are obtained, and the reference track is optimized according to the heading angle change and the flight speed change, and then the flight continues according to the optimized track, wherein the current movement direction of the UAV and the equivalent angle formed by the line connecting the UAV and the obstacle are , can be calculated by the following formula:

[0054] In the above formula, a is the number of obstacles within the detection range, is the horizontal angle of the ith obstacle, is the angular resolution of the camera.

[0055] Specifically, the preset fuzzy controller rules can be set as a fuzzy controller rule table, and then the output variables heading angle change and flight speed change are obtained by looking up the table. The fuzzy controller rule table can be: Table 1 Fuzzy controller rules table

[0056] For ease of understanding, the following is an example based on the above table. For example, when the input variable D is "N", When it is "LS", the output variable flight speed change "VS", the heading angle change "TRB", that is, when the UAV is close to an obstacle and the angle between the current heading angle and the line connecting the UAV and the obstacle is small, it is necessary to slow down and reduce the heading angle to make the UAV turn right at a low speed, thereby generating a new track to avoid the obstacle.

[0057] Figure 2 2 is a structural diagram of a terminal provided in an embodiment of the present application. As shown in the figure, the terminal 2 of the embodiment includes: at least one processor 20 ( Figure 2 Only one is shown in the figure), a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, wherein the processor 20 implements the steps of any of the above-mentioned method embodiments when executing the computer program 22.

[0058] The terminal 2 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 2 may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art will appreciate that Figure 2 It is only an example of terminal 2 and does not constitute a limitation on terminal 2. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.

[0059] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0060] The memory 21 may be an internal storage unit of the terminal 2, such as a hard disk or memory of the terminal 2. The memory 21 may also be an external storage device of the terminal 2, such as a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), etc. equipped on the terminal 2. Further, the memory 21 may also include both an internal storage unit of the terminal 2 and an external storage device. The memory 21 is used to store the computer program and other programs and data required by the terminal. The memory 21 may also be used to temporarily store data that has been output or is to be output.

[0061] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0062] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0063] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0064] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0065] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0066] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0067] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0068] The present application implements all or part of the processes in the above-mentioned embodiment method, and may also be implemented through a computer program product. When the computer program product runs on a terminal, the terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0069] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A UAV trajectory planning and optimization method based on fuzzy control, characterized in that: include: Generate a reference track of the UAV based on a first preset algorithm; Drive the drone to fly along the reference track and detect in real time whether there are new obstacle images in the preset area ahead during flight; When a new obstacle image is detected, new obstacle feature points are extracted, and the depth value of the obstacle is obtained according to the feature points and the second preset algorithm. The obstacle is identified according to the depth value of the obstacle, and the identification result is sent to the background database for storage and / or display, so that relevant personnel can conduct remote monitoring or decision-making; According to the movement of at least two feature points in the image and the movement of the drone during the flight, the distance between the drone and the obstacle is obtained by a preset formula; The distance between the UAV and the obstacle, as well as the equivalent angle formed by the current movement direction of the UAV and the line connecting the UAV and the obstacle are taken as input variables, and based on the preset fuzzy controller rules, the output variables of heading angle change and flight speed change are obtained. The reference track is optimized according to the heading angle change and flight speed change, and then the flight continues according to the optimized track.

2. The UAV trajectory planning and optimization method based on fuzzy control according to claim 1 is characterized in that: The method of generating a reference track of the UAV based on the first preset algorithm comprises the following steps: Step 11, divide the track planning space into n equal parts on the x-axis to obtain n track node coordinate parameters, and set the relevant parameters; Step 12, set the number of iterations t=0, and initialize the particle swarm position matrix based on the constraints; Step 13: Calculate the fitness value of each particle and compare the current fitness value of each particle with the historical optimal fitness value p i , if the current value is less than p i , then the position and fitness value of the current particle are updated to the historical optimum, and the global optimum p of the group with the minimum fitness of all particles is determined g , if the current global optimum is less than the historical global optimum, then update the historical global optimum; Step 14, determine whether the end condition is met; If the constraint condition is met, go to step 112, otherwise, go to step 15; Step 15, set the number of particle swarm i=0; Step 16, set particle dimension j=0; Step 17, update the particle's velocity and position. If the current velocity|v ij |≥|V max |, then take |v ij |=|V max |, the direction remains unchanged; Step 18, let particle dimension j = j + 1, if j>n, go to step 19; Otherwise, go to step 17; Step 19, let the number of particles i=i+1, if i>N, go to step 110; Otherwise, go to step 16; Step 110, check the validity of the updated particles, and reinitialize if they are invalid; Step 111: If the difference between the global optimal fitness value of the last iteration and the current iteration is less than the preset accuracy control parameter, the current global optimal p is retained. g , and reinitialize the particle swarm position at the same time; Step 112, the number of iterations t=t+1, if t>T max , go to step 113; otherwise, go to step 13; Step 113, the iteration ends and an optimal p is selected g , as the reference track.

3. The UAV trajectory planning and optimization method based on fuzzy control according to claim 2 is characterized in that: The number of iterations is set to 0, and the particle swarm position matrix is ​​initialized based on the constraint conditions, wherein the particle swarm position matrix is ​​expressed by the following formula: In the above formula, Respectively represent the track nodes of the i-th particle The coordinates of .

4. The UAV trajectory planning and optimization method based on fuzzy control according to claim 2 is characterized in that: The number of iterations is set to 0, and the particle swarm position matrix is ​​initialized based on the constraint conditions, wherein the constraint conditions are that all flight track nodes are outside the obstacle area, the track segment has no intersection with the obstacle area, and adjacent track segments satisfy the maximum turning angle.

5. The UAV trajectory planning and optimization method based on fuzzy control according to claim 2 is characterized in that: The determination of whether an end condition is met may include that a maximum number of iterations is reached or the optimal value converges to a specified accuracy.

6. The UAV trajectory planning and optimization method based on fuzzy control according to claim 1 is characterized in that: The driving drone flies along the reference track and detects in real time whether there is a new obstacle image in a preset area ahead during flight, wherein a camera is arranged at the front end of the drone to obtain whether there is a new obstacle image in the preset area ahead through the camera.

7. The UAV trajectory planning and optimization method based on fuzzy control according to claim 1 is characterized in that: When a new obstacle image is detected, new obstacle feature points are extracted, and the depth value of the obstacle is obtained according to the feature points and the second preset algorithm, the obstacle is identified according to the depth value of the obstacle, and the identification result is sent to the background database for storage and / or display, so as to provide remote monitoring or decision-making for relevant personnel, wherein the depth value of the obstacle is obtained according to the feature points and the second preset algorithm, and specifically includes the following steps: Step 31, calculating the number of samples M to be selected according to the number of feature points and the number of obstacles; Step 32: randomly select two feature point samples and calculate the depth value Z using a preset formula i ; Step 33, use other feature points in the image and two sample points to calculate the depth value. If the depth mean is equal to Z i If the difference is less than the threshold, the feature point is considered to be an interior point, the number of interior points is accumulated, and steps 31 to 33 are repeated until the processing of M groups of samples is completed; Step 34, selecting the optimal inlier point set according to the number of inliers and the variance of the depth error, and using these inlier point data to calculate the final depth value; Step 35, repeating steps 31 to 34 to find new inner points among the outer points until the number of feature points meets a preset threshold; Step 36: Determine the depth value of the obstacle by the average depth value of all internal points in each obstacle area.

8. The UAV trajectory planning and optimization method based on fuzzy control according to claim 1 is characterized in that: According to the movement of at least two feature points in the image and the movement of the drone during the flight, the distance between the drone and the obstacle is obtained by a preset formula, wherein the preset formula is expressed by the following formula: In the above formula, is the motion of known feature points in the image; for the movement of drones; is the distance between the UAV’s movement and the two feature points in the image; D is the distance between the UAV and the obstacle.

9. The UAV trajectory planning and optimization method based on fuzzy control according to claim 1 is characterized in that: The distance between the UAV and the obstacle, and the equivalent angle formed by the current movement direction of the UAV and the line connecting the UAV and the obstacle are used as input variables, and based on the preset fuzzy controller rules, the output variables of the heading angle change and the flight speed change are obtained, and the reference track is optimized according to the heading angle change and the flight speed change, and then the flight continues according to the optimized track, wherein the current movement direction of the UAV and the equivalent angle formed by the line connecting the UAV and the obstacle are , calculated by the following formula: In the above formula, a is the number of obstacles within the detection range, is the horizontal angle of the ith obstacle, is the angular resolution of the camera.

10. The unmanned aerial vehicle trajectory planning and optimization method based on fuzzy control according to claim 9 is characterized in that: The preset fuzzy controller rules are set as a fuzzy controller rule table, and then the output variables heading angle change and flight speed change are obtained by looking up the table.

Citation Information

Patent Citations

  • Unmanned-plane fuzzy-control flight method

    CN104133482A

  • Unmanned aerial vehicle flight control method, system and device and storage medium

    CN113759985A

  • Method and apparatus for generating optimal path for an unmanned aerial vehicle

    US20210287556A1