Multi-rotor unmanned aerial vehicle path planning method based on improved magnetic bacterium optimization algorithm

By improving the magnetic bacteria optimization algorithm and combining front-end optimization strategies, the efficiency and reliability problems in drone path planning are solved, shorter and smoother path planning is achieved, avoiding local optimal solutions, and improving drone path planning is improved global optimization performance.

CN119002512AActive Publication Date: 2024-11-22YUNNAN MINZU UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411101336.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-11-22
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

The existing drone path planning algorithms have limitations in efficiency and reliability, and are prone to falling into local optimal solutions, with many path redundancy and inflection points, resulting in limited efficiency and reliability in practical applications.

Method used

Using the improved magnetic bacteria optimization algorithm (IMBOA), it is improved through front-end feasible path search and back-end path optimization, including initial bacterial population generation based on the starting and end-point orientation, obstacle density adjustment, magnetosome competition evolution strategy, bidirectional line of sight inspection and Fusing forward and reverse paths, as well as cubic spline fitting, to optimize the drone path.

Benefits of technology

Significantly shorten the path length, reduce the number of inflection points, reduce the number of drone position changes, improve the efficiency and reliability of path planning, avoid local optimal solutions, and generate shorter and smoother paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119002512A_ABST
    Figure CN119002512A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-rotor unmanned aerial vehicle path planning method based on an improved magnetic bacterium optimization algorithm. The method comprises the steps of front-end feasible path search, rear-end path optimization and improvement and path fitting. The path planning method can reduce the pose change frequency of the unmanned aerial vehicle, reduce the energy consumption in the flight process and improve the flight efficiency in allusion to the problems of concave traps and path inflection points possibly encountered by the unmanned aerial vehicle in a complex environment. According to the improved algorithm, in different static environments, the path length is effectively shortened, the number of inflection points is reduced, the number of pose changes of the unmanned aerial vehicle is reduced, a shorter and smoother path is obtained, energy consumption in the flight process is reduced, and the flight efficiency of the unmanned aerial vehicle is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the application of intelligent optimization algorithms in the field of unmanned aerial vehicle path planning, in particular to a multi-rotor unmanned aerial vehicle path planning method based on an improved magnetic bacteria optimization algorithm. Background Art

[0002] With the rapid development of drone technology, drones have been widely used in post-disaster rescue, cluster flight light shows, complex mountain patrols and other scenarios. In these applications, efficient path planning technology plays a vital role in the efficiency and safety of drone missions. Drone path planning technology can be regarded as a constrained optimization problem that needs to consider multiple constraints such as path length, time, energy consumption, number of posture changes, obstacle avoidance, etc.

[0003] Although a variety of algorithms have been applied to UAV path planning, such as sampling-based algorithms and search-based algorithms, the existing technologies still have some limitations. For example, the traditional magnetic bacteria optimization algorithm (MBOA) has good performance in single-objective optimization problems, but it has problems such as redundant path points, easy to fall into concave traps, and many path turning points in UAV path planning. These problems limit the efficiency and reliability of the algorithm in practical applications.

[0004] In summary, in view of the shortcomings of the existing technology, technical personnel in this field urgently need an improved UAV path planning method, which should be able to improve the efficiency of path search, reduce redundant points and turning points in the path, avoid the UAV from falling into a local optimal solution, and improve the global optimization performance of path planning. Summary of the invention

[0005] The present invention aims to solve the problems of efficiency and reliability of drone path planning in the prior art. To this end, the present invention discloses a multi-rotor drone path planning method based on an improved magnetic bacteria optimization algorithm (IMBOA). Compared with the prior art, the path planning method can more effectively shorten the path length, reduce the number of inflection points, reduce the number of drone posture changes, achieve shorter and smoother path planning, and significantly improve the efficiency and reliability of drone path planning.

[0006] The object of the present invention is to achieve a multi-rotor UAV path planning method based on an improved magnetic bacteria optimization algorithm through the following technical solutions, the method comprising: Step 1. Load the 2D grid map of the drone’s surroundings, set the start and end points of the drone’s flight mission, and initialize the IMBOA algorithm parameters.

[0007] Step 2. Perform a front-end feasible path search, read the map obstacle information in a two-dimensional matrix, and use an algorithm enhancement strategy to obtain a set of feasible path points; the algorithm enhancement strategy includes an initial bacterial population generation strategy based on the starting and end points, a strategy for flexibly adjusting feasible path screening factors according to obstacle density, and a magnetosome competition evolution strategy.

[0008] Step 3. Perform back-end path optimization and improvement. Use a two-way sight-line check algorithm to check the feasible path point set and map obstacle information. Then, use the forward and reverse path fusion strategy to obtain the final path point set. Finally, use curve fitting to obtain the final path. The two-way sight-line check algorithm includes a forward sight-line check algorithm and a reverse sight-line check algorithm. The forward and reverse sight-line checks significantly reduce the number of turning points in the path and shorten the length of the path.

[0009] Step 4. Use cubic spline curves to fit the path to make the final path smoother, reduce the number of changes in the drone's posture, and reduce energy consumption during flight.

[0010] The step 2. performs a front-end feasible path search, and uses an algorithm enhancement strategy to obtain a set of feasible path points and map obstacle information, including the following steps: 201. Performs "initial bacterial population generation based on the orientation of the starting point and the end point", taking into account the relative direction of the starting point and the end point to generate an optimized initial path and accelerate the convergence of the algorithm. Specifically, according to the relative position and direction of the starting point and the end point of the drone, the magnetosome value in the magnetic bacterial population is initialized, so that the initial exploration is more biased towards the target direction, thereby improving the quantity and quality of the initial feasible path.

[0011] a. First, define the coordinates of the starting point and the end point of the drone, let P start =(x start ,y start ) and P end =(x end ,y end ) are the coordinates of the starting point and the end point of the UAV respectively.

[0012] b. Calculate the positional relationship between the starting point and the end point of the drone, and determine the directional relationship between the two using formula (1), where θ is the angle between the starting point and the end point.

[0013] Optionally, the setting x1=xx end , y1=yy end , and substitute it into Formula 1 to calculate the position relationship between the starting point and the end point of the drone, as follows Figure 2 As shown in the figure, according to the value of θ, when the drone is in Figure 2 When the system starts to select the next waypoint, it selects different waypoint update strategies according to the relationship between the starting point and the end point.

[0014] c. According to the directional relationship between the starting point and the end point, such as Figure 2 The area around the starting point is divided into 8 regions, each of which corresponds to a different exploration strategy, as shown in Table 1.

[0015] Table 1 Determine the UAV position update strategy based on the starting point area d. When the bacterial population is initialized, the magnetosome parameter matrix x of each bacterium is an M×N matrix, where M is the size of the bacterial population, N is the number of magnetosomes inside each bacterium, and the value of the magnetosome matrix is ​​between 0 and 1.

[0016] e. Initialize the value of the magnetic field strength B and the values ​​of coefficients C1 and C2 in the calculation formula of the interaction energy, and set the maximum number of iterations.

[0017] f. Generate a distance matrix using the interaction distance calculation formula (3) between bacteria, and use this distance matrix and the definition of interaction energy to calculate the interaction energy of each magnetosome.

[0018] C(X i , X r )=norm||X i -X r || (3) Optionally, the expression (4) for defining the distance matrix and the interaction energy is a formula for calculating the interaction energy.

[0019] g. Calculate the torque based on the interaction energy and the magnetic field strength, and calculate the total magnetic moment through the torque, and then update the magnetosome parameters of each bacterium to generate an initial magnetic bacterial population based on the starting and ending directions.

[0020] Optionally, the expression for calculating the torque based on the interaction energy and the magnetic field strength is the interaction energy calculation formula (5), and the magnetic moment vector matrix expression (6) is obtained through formula (5).

[0021] Optionally, the expression (7) for calculating the total magnetic moment through the torque is a formula for calculating the interaction energy.

[0022] V ij =x ij +m ls ×rand (7) h. The selection of the next path point of the drone is determined by the value x(i, 1) of the first magnetosome in each bacterial body in the bacterial population and num DirectSubstitute the value of the variable calculated by formula (2) to determine, i represents the i-th bacterium in the population, and 1≤i≤M, where ii represents the index of the bacterium in the population.

[0023] 202. Implement the strategy of "flexibly adjusting the feasible path screening factor according to the density of obstacles" to dynamically adjust the path screening factor according to the density of obstacles in the environment around the drone to reasonably set the upper limit of the feasible path. Increase the value of this factor in an environment with dense obstacles to reduce the search space and improve the search efficiency. The method of dynamically adjusting the feasible path screening factor α according to the density of obstacles includes the following steps: a. Determine the starting coordinates of the drone (x s ,y s ) and the end point coordinates (x e ,y e ).

[0024] b. Calculate the straight-line distance D from the starting point to the end point. The formula is:

[0025] c. Calculate the obstacle density β, which is defined as the number of obstacle grids N in the drone’s surrounding environment obs and the number of obstacle-free grids N free The ratio of ρ = N obs / (N obs +N free .

[0026] d. According to the obstacle density β, dynamically adjust the feasible path screening factor α, the formula is:

[0027] Optionally, the number of obstacle grids in the surrounding grid map is occnum1, and the number of obstacle-free grids is occnum2, then

[0028] e. Use the adjusted feasible path screening factor α to calculate the maximum feasible path length L max , the formula is L max =D·α.

[0029] 203. The "magnetosome competition evolution strategy" is adopted to adjust the magnetosomes in different ways for bacteria with different path lengths. For bacteria with path lengths longer than the maximum feasible path, the magnetosome parameters are updated to enhance the global search capability; for bacteria with path lengths shorter than the maximum feasible path, the magnetosome parameters of the optimal bacteria are adjusted to enhance the local search capability and avoid falling into the local optimal solution.

[0030] The magnetosome competition evolution strategy is introduced to enhance the local search capability of the algorithm, avoid the algorithm from falling into the local optimal solution, and accelerate the convergence speed of the algorithm: Optionally, the algorithm convergence conditions are as follows: (1) when the algorithm reaches the maximum number of iterations; (2) the number of bacterial populations is M, and when the number of first-class paths a1 accumulates to M times during the algorithm iteration process.

[0031] a. The magnetosome competition evolution strategy divides the paths generated after iteration into three categories, and adopts different evolution strategies for the magnetosomes corresponding to the different categories of paths, including: (a) The first type of path: a path that reaches the end point and has a path length less than α×A, where A is the distance from the start point to the end point and α is a feasible path screening factor that is adjusted according to the density of obstacles. The magnetosome parameters of the bacterial individuals corresponding to the first type of path will be retained and fine-tuned to improve the search accuracy of the algorithm.

[0032] Optionally, the update requirement of the first type of path fine-tuning is controlled by mp1, where mp1=0.1.

[0033] (b) The second type of path: a path that reaches the end point but has a path length greater than α×A. The magnetosome values ​​of the bacteria corresponding to the second type of path are partially updated by setting the probability mp and combining the random number rand(1). If there is an update requirement, the formula x(m, N) = x(m, q1) + (x(xell best , q1)-x(m, q1))×rand(1), where x(m, N) represents the magnetosome parameters of the current bacterium m, x(cell_best, q1) represents the corresponding magnetosome parameters of the optimal bacterium, and cell_best is the index of the bacterium with the best path in the current iteration round.

[0034] Optionally, the determination condition for whether there is an update requirement is rand(1)>mp, and the update degree of the second type of path is controlled by mp2, where mp2=0.9.

[0035] (c) The third type of path: the path that does not reach the end point. The magnetosome values ​​of the corresponding bacterial individuals will be replaced to enhance the exploration of new solution space.

[0036] Optionally, the process of replacing the magnetosome value of the bacterial individual corresponding to the third type of path is as follows: plan1, plan2, and plan3 are matrices with row a1 and 3 columns, row a2 and 3 columns, and row a3 and 3 columns, respectively. The value of the first column is an index value, which can be used to determine the number of bacteria in the cell population corresponding to this path, so as to find the magnetosome value of the bacteria corresponding to each path. The value of the second column is a Boolean value. If it is 1, it means that the end point has not been reached, and if it is 0, it means that the end point has been reached. The data in the third column represents the length of the path.

[0037] The specific steps of path classification are as follows: (1) Assign the values ​​of a1, a2, and a3, which represent the number of three types of paths, to zero, and assign the value of 1 to the variable i, which is used to loop through the dis matrix.

[0038] (2) If dis(i, 1) = 0, dis(i, 2) < P ath max , then dis(i, 3) = 1, indicating that the path is a first-class path. At this time, the following operations are performed: a1 = a1+1, plan1(a1, 1) = i, plan1(a1, 2) = dis(i, 1), plan1(a1, 3) = dis(i, 2).

[0039] (3) If dis(i, 1) = 0, dis(i, 2) < P ath max , then dis(i,3)=2, indicating that the path is a first-class path. At this time, the following operations are performed: a2=a2+1, plan2(a2,1)=i, plan2(a2,2)=dis(i,1), plan2(a2,3)=dis(i,2).

[0040] (4) If dis(i, 1) ≠ 0, then dis(i, 3) = 3, indicating that the path is a third-category path. In this case, the following operations are performed: a3=a3+1, plan3(a3,1)=i, plan3(a3,2)=dis(i,1), plan3(a3,3)=dis(i,2).

[0041] b. If no first-class path is generated in a certain iteration, the magnetosome values ​​of all bacteria are updated again until at least one first-class path is generated to ensure that the algorithm can continue to approach the global optimal solution.

[0042] 204. The generated paths are evaluated and classified. According to whether the path reaches the end point and the comparison result of the path length and the product of the screening factor α obtained by adjusting the obstacle density and the distance A from the starting point to the end point, the paths are divided into different categories, and different magnetosome update strategies are adopted accordingly.

[0043] 205. Ensure that there is at least one first-class path, that is, a path that reaches the end point and has a path length less than α*A. If no first-class path is generated during the iteration, re-update the magnetosome values ​​of all bacteria until at least one first-class path is generated.

[0044] The step 3. performs back-end path optimization and improvement, including the following steps: 301. "Two-way sight check": Twsda first performs forward sight check and reverse sight check based on the path point set searched by the front-end IMBOA and the map obstacle information, and identifies a set of key path points, named place11 and place12.

[0045] a. Forward line of sight inspection process: Assume that the two-dimensional grid map of the current environment of the drone is map1, and the feasible path set finally obtained by the front-end path search strategy is place1. Where map1 is an N×N matrix, N is a constant real number and its elements are 0 or 1; It is a matrix with s rows and two columns. The first column represents the x-coordinates of the feasible path points, and the second column represents the y-coordinates of the feasible path points.

[0046] The initial feasible path point set is place1 = {g1, g2, ..., g i ,…,g24}, a total of 24 path points. i ={x i ,y i}.

[0047] b. The reverse sight check process is as follows: (1) Select two points from the initial path place1, named p1 and p2. Initially, p1 = g1 and p2 = g2. Connect p1 and p2 with a straight line. Store the starting point g1 in place11.

[0048] (2) Determine whether there is an obstacle between points p1 and p2. If there is no obstacle on the line between the two points, store point p2 in temp1.

[0049] (3) Then let p2 be the next path point in place1, and continue the operation of step (2) until the second point is the end point, that is, p2 = g24.

[0050] (4) After the operation of steps (2) and (3) is completed, Figure 3 The temporary matrix value obtained by this initial path in a is as follows: temp1 = {g2, g3, g4, g5, g6, g7, g8} Then store the last point in temp1 into place11. That is, store point g8 in place11.

[0051] (5) Let p1 be the last point in temp1, where p1=g8, and then let p2 be the next point of p1 in place1, where p2=g9. At the same time, clear the temporary matrix temp1 to prepare for the next storage.

[0052] (6) Then repeat steps (2) to (5) until the end point appears in place11.

[0053] At this point, the forward sight check of the initial path place1 is completed. The path points after the forward sight check are as follows: p;ace11 = {g1, g8, g13, g16, g17, g24} The schematic diagram of the path point set palce11 is shown in Figure 3 In Figure b, after the forward line of sight check, the number of path points is reduced from 24 to 6, of which 3 turning points and 18 redundant path points are removed.

[0054] The reverse sight check process is as follows: (1) Select two points from the initial path place1 and name them p3 and p4. Initially, p3 = g24 and p2 = g23. Connect p3 and p4 with a straight line. Store the end point g3 in place12.

[0055] (2) Determine whether there is an obstacle between points p3 and p4. If there is no obstacle on the line between the two points, store point p4 in temp2.

[0056] (3) Then let p4 be the previous path point in place1, and continue the operation of step (2) until the second point is the starting point, that is, p4 = g1.

[0057] (4) After the operation of steps (2) and (3) is completed, Figure 3 The temporary matrix value obtained by this initial path in a is as follows: temp2 = {g24, g23, g22, g21, g19, g18, g17, g16, g15} Then store the last point in temp2 into place12. That is, point g15 is stored in place12.

[0058] (5) Let p3 be the last point in temp2, where p3=g15, and then let p4 be the next point of p3 in place1, where p4=g14. At the same time, clear the temporary matrix temp2 to prepare for the next storage.

[0059] (6) Then repeat steps (2) to (5) until the starting point appears in place12.

[0060] At this point, the reverse sight check of the initial path place1 is completed. The path points after the reverse sight check are as follows: place12 = {g24, g15, g13, g5, g1} The schematic diagram of the path point set Palce12 is shown in Figure 3 In Figure c, after the reverse line of sight check, the number of path points is reduced from 24 to 5, of which 4 turning points and 19 path points are removed.

[0061] Compare the paths obtained by the forward sight check and the reverse sight check, see Figure 3 In d, we can find that the two paths have their own advantages. If the advantages of the two paths can be integrated, a better feasible path can be obtained. The key to achieving the integration of positive and negative paths is to find the intersection point formed by the positive and negative paths. One is the only intersection point of the intersection, and the other is the countless intersection points of the collinear parallel intersection. In the second case, the endpoints of the collinear parallel intersection are solved and retained.

[0062] 302. "Forward and reverse path fusion": Use the forward and reverse path fusion strategy to process the key path point sets place11 and place12 to obtain the final path point set. This step aims to combine the advantages of forward and reverse line of sight checks and optimize the distribution of path points.

[0063] a. The input data of the forward and reverse path fusion part includes the raster map matrix map1 of the drone's surrounding environment, the key path point matrix place11 obtained by the forward key point screening algorithm, and the key path point matrix place12 obtained by the reverse key point screening algorithm. The final output is the path key point matrix path3 obtained by fusing the advantages of the key point path matrix place11 and place12. The specific process of path fusion is as follows: The specific process of forward and reverse path fusion is as follows: (1) First, copy the key point matrix place11 obtained from the forward sight check and the key point matrix place12 obtained from the reverse sight check to the matrices path1 and path2 respectively, and copy path2 to the matrix path2 cope ,Right now

[0064] (2) Reverse the order of the path points in path2, that is, let path2 = {g1, g5, g13, g15, g24}.

[0065] (3) Find the common path points of the two matrices path1 and path2, as well as the index values ​​of these common path points in the matrix path1. Because path1 = {g1, g8, g13, g16, 17, g24}, and path3 = {g1, 0, g13, 0, 0, g24}, the common elements of the two matrices are g1, g13, g24, and these common elements are the first, third, and sixth points in path1, respectively. Then, store these common elements in the matrix path3 in the order of their indexes in path1, i.e. At the same time In this way, we obtain the matrix path3 containing common elements arranged in the order of path1, and path3 = {g1, 0, g13, 0, 0, g24}.

[0066] (4) Read the first two path points of path1 and path2, namely g1 and g8 and g1 and g5 respectively.

[0067] (5) Then use these four path points to construct the six vectors AB, AC, AD and CD, CA, CB. Let A = g1, B = g8, C = g1, D = g5, then:

[0068] (6) After obtaining the six vectors in formula (10), the positional relationship between the two line segments from point g1 to point g8 and from point g1 to point g5 represented by the two vectors AB and CD is determined by performing a cross product operation on the six vectors. First, the result of the cross product of the six vectors is calculated according to formula (11). Then, according to the values ​​of result1, result2, result3, and result4 calculated above, substitute them into formula (12), as follows: Among them, flag1 and flag2 are constant real numbers. Then, the positional relationship between the two line segments from point g1 to point g8 and from point g1 to point g5 actually represented by the two vectors AB and CD can be determined based on the values ​​of flag1 and flag2.

[0069] (7) If flag1 and flag2 are both less than 0, it means that the two line segments are in a cross-intersection relationship and there is a unique intersection point. The schematic diagram of the intersection of AB and CD is shown in Figure 4 , at this time, the intersection coordinates need to be calculated and stored in path3. The calculation method and process of the intersection are as follows: Assumptions Figure 4 The coordinates of point A are (X A , YA ), the coordinates of point B are (X B , Y B ), the coordinates of point C are (X C , Y C ), the coordinates of point D are (X D , Y D ), then: In formula (13), slope1 is the slope of line segment AB, and slope2 is the slope of line segment CD.

[0070] In formula (14), intercept1 and intercept2 are the intercepts of the straight line where line segment AB and line segment CD lie and the coordinate axis Y.

[0071] Formula (15) is the intersection point of AB and CD, Inter1 = [Intersection X , Intersection Y ].

[0072] Then determine the index value of the point corresponding to point B in the matrix path1. Assuming that the current index value is i, path3(i) = Inter1 = [Intersection X , Intersection Y ].

[0073] (8) If the condition in step 7 is not met, determine whether result1 is equal to result2 and whether result3 is equal to result4. If both conditions are met, it means that AB and CD are collinear. Then, determine whether the size relationship of the coordinates of the four points A, B, C, and D satisfies the four logical expressions of formula (16) at the same time.

[0074] If the four logical expressions of formula (16) are satisfied at the same time, the relationship between line segments AB and CD is as follows: Figure 5 As shown, AB and CD are parallel and intersecting, and there are multiple intersection points.

[0075] Then determine the index value of the point corresponding to point B in the matrix path1. Assuming that the current index value is i, path3(i)=[X D , Y D ].

[0076] (9) Keep the first two path points g1 and g8 read from path1 unchanged, then read the path point index in path2 and add 1, and repeat steps (5) to (8) until the path point read from path2 is the second to last point and the last point in matrix path2.

[0077] (10) When the path point in path2 read is the second to last point and the last point in the matrix path2, add 1 to the path point index in path1 read, and repeat steps (5) to (9) until the path point in path1 read is the second to last point and the last point in the matrix path1. So far, the path relationship judgment of the positive and negative paths has been completed, and we have obtained a matrix path3 containing the common points, intersection points and partially overlapping points of the positive and negative paths. The path3 matrix cannot be used directly at present. Special points must be eliminated. After these special points are eliminated according to the judgment conditions, the final fused path is obtained.

[0078] (11) To remove special points in path3, first calculate the number of rows in path3 and store the number of rows in the variable col3. Then define two index variables for special point statistics, named Ind4 and Ind5, and their initial values ​​are both zero. Here, Ind4 is a column vector and Ind5 is an integer variable.

[0079] (12) Let i=1, and i∈{1, 2, ..., col3}, where i is the index of traversing path3.

[0080] (13) Determine whether path3(i, 1) and path3(i, 2) are both zero. If this condition is met, the coordinates corresponding to path3(i, :) are special points and should be removed. Let Ind5 = Ind5 + 1, Ind4 (Ind5) = i, where the Ind4 column vector is the number of rows corresponding to the points to be removed in the path3 matrix.

[0081] (14) Let i = i + 1, and repeat step (18) until i = col3. This completes the statistics of special points in path3.

[0082] (15) After completing the special point statistics, determine whether Ind5 is equal to zero. If it is equal to zero, set path3(Ind4,:)=[ ]. This command successfully removes the special points in path3.

[0083] (16) After removing the special points, path3(col3,:)=path(col1∶2). The path3 matrix is ​​the final feasible key path matrix after path fusion and removal of special points. The next step is to perform curve fitting on the path points in the path3 matrix.

[0084] 303. "Cubic B-spline curve fitting": Perform cubic B-spline curve fitting on the optimized path point set to obtain a final path that is smoother and more in line with the flight dynamics characteristics of the drone.

[0085] The step 4. using a cubic spline curve to perform path fitting comprises the following steps: The generated path is smoothed using cubic B-spline curve fitting technology to generate a smoother drone flight path that better meets flight requirements (ensuring that the drone has better dynamic and kinematic characteristics at the turning points of the path): determine the key path points, which are obtained by screening and fusion of the front-end IMBOA search and the back-end Twsda algorithm, and then use these key points to construct a cubic B-spline curve to smooth the path. The mathematical expression is: In the formula, C(t) represents the fitted cubic B-spline curve, B 3i (t) is the cubic B-spline benchmark function, P i is the i-th control point in the set of key path points, and n is the total number of control points. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] Figure 1 Flowchart diagram; Figure 2 Schematic diagram of tracing grid based on magnetosome values ​​of cell population and surrounding obstacle-free objects; Figure 3 Schematic diagram of the overall backend path optimization part; Figure 4 Schematic diagram of the intersection of line segments; Figure 5 Schematic diagram of the intersection of line segment AB and line segment CD; Figure 6 The optimal paths searched by the two methods were compared in the first iteration of one of the 100 repeated experiments; Figure 7 Reverse sight check flow chart; Figure 8 The effect diagram of forward and reverse sight line inspection on the original path; Fig. 9 Illustration of sparse and dense obstacle environments; Fig.10Comparison of the optimal paths of different algorithms in one of the 100 experiments; Fig.11 Statistics of the number of various paths in one iteration of different algorithms in 100 experiments; Fig.12 Statistics of the optimal path length of a certain algorithm iteration process in 100 experiments; Fig.13 Two-way sight line inspection effect diagram. DETAILED DESCRIPTION

[0087] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0088] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0089] Example 1 Verifies the effectiveness of the initial bacterial population generation strategy based on the orientation of the starting point and the end point. In this example, MBOA and IMBOA are compared. When the bacterial population is 30, c1=0.01, c2=0.01, B=0.001, the starting point is a yellow grid with coordinates (2, 2), and the end point is a red grid with coordinates (31, 31), the initial path length is compared on a 30*30 grid map with 214 obstacle grids evenly distributed. That is, the obstacle density is: 214 / 900=23.78%. This obstacle density is already a "dense obstacle environment" in this industry. The initial path comparison experimental effect diagram and experimental data analysis in this more complex environment are shown in FIG. Figure 6 and Table 2.

[0090] Table 2 The average number of initial paths of MBOA and IMBOA after 100 repeated experiments under the above parameters Since the starting point is (2, 2), the end point is (31, 31), the number of obstacle grids is 214, and the number of blank grids is 686, so Figure 2 The feasible path screening factor in the environment Therefore, the maximum feasible path length of the IMBOA algorithm is: so Figure 6 The first type of path in the environment is defined as the path that reaches the end point and the path length is less than path maxThe second type of path is defined as a path that reaches the end point but has a path length greater than path max The third type of path is defined as the path that fails to reach the end point.

[0091] By analyzing Figure 6 It can be seen that since this method introduces more preference guidance to search the direction of the end point in the process of searching the initial feasible path, the optimal path searched by this method at the beginning is not only shorter in length than the original algorithm, but also has fewer turning points than the original algorithm. It can be seen from Table 2 that the proportion of the first-class path in the initial path searched by IMBOA at the end of the first iteration is 51.77%, which is 21.30% more than the first-class path of MBOA. The proportion of the third-class path in the initial path searched by IMBOA at the end of the first iteration is 11.63%, which is 3.07% less than the third-class path of MBOA. It is proved that setting different UAV position update strategies according to the different starting and ending positions of the UAV greatly improves the quality of the initial path of the algorithm.

[0092] Example 2 Verifies the effectiveness of the algorithm strategy for flexibly adjusting the feasible path screening factor according to the obstacle density Let the starting point coordinate be P start =(start x , start y ), the end point coordinate is P end =(end x , end y ), then the distance from the starting point to the end point is Then, this method assumes a feasible path screening factor α according to the different obstacle densities. If the obstacle density in the environment is large, the value of α is appropriately increased. Let the obstacle density be β, the number of obstacle grids in the surrounding environment grid map be occnum1, and the number of unobstructed grids be occnum2.

[0093] Then: β=occ n um2 / (occ n um1+occ n um2) Fig. 9 a is an environment with sparse obstacles. In this environment, P start =(1,1),P end =(8,8), so A = 9.8995; occnum1 = 7, occnum2 = 57, so Fig. 9 Medium A environment Therefore, the upper limit of the length of the final feasible path in environment a is: α×A=11.1153.

[0094] Fig. 9 b is an environment with dense obstacles. In this environment, P start =(1,1),P end =(8,8), so A = 9.8995; occnum1 = 15, occnum2 = 49, so Fig. 9 Medium B environment Therefore, the upper limit of the length of the final feasible path in environment b is: α×A=1.3062×9.8995=12.9307.

[0095] Example 3 Verification of the effectiveness of the magnetosome competition evolution strategy algorithm enhancement strategy under three paths The comparative experimental results of Example 1 verified the effectiveness of the "initial bacterial population generation strategy based on the starting and ending positions". In Example 3, the map environment and algorithm parameters in Example 1 were continued to be used to conduct subsequent experiments to verify the feasibility and effectiveness of the "magnetosome competition evolution strategy" in this method. 100 experiments were conducted, and the experimental results are shown in Fig.10 , Fig.11 , Fig.12 ,The experimental data statistics are shown in Table 3.

[0096] According to the experimental parameters in Example 1, IMBOA performs path search based on the magnetosome value of each bacterium in the bacterial population in combination with the "position update strategy". Since the number of bacteria in the population is , 30 paths will be generated after each bacterium in the bacterial population completes the path search. Then, the maximum feasible path length path under this parameter environment is calculated based on the obstacle density and the straight-line distance between the starting point and the end point. max . Then, these 30 paths are classified and counted according to the definition of the three types of paths in Example 1, and a1, a2, and a3 are used to represent the number of the three types of paths respectively. At the same time, two parameters mp1 and mp2 are set to control the update intensity of the magnetosome values ​​in the bacteria corresponding to the first type of path and the second type of path. In this embodiment, the maximum number of algorithm iterations for each experiment is set to 500 times; this experiment has two situations as the basis for judging whether the algorithm stops: (1) When the algorithm reaches the maximum number of iterations, the algorithm stops and outputs the optimal path searched by the iterative process; (2) The number of bacterial populations is M. When the number of the first type of paths a1 accumulates to M times during the algorithm iteration process, it means that the algorithm has converged. At this time, it can also stop running and output the optimal path searched by the iterative process.

[0097] Since the first type of path is already a feasible path to the destination and its path length is less than the maximum feasible path length path in the current obstacle environment maxTherefore, the magnetosome parameters of this type of bacteria need to be fine-tuned. Fine-tuning the magnetosome values ​​of bacteria corresponding to the first type of path can improve the search accuracy of the algorithm, and to a certain extent can prevent the algorithm from falling into the local optimal solution, allowing the algorithm to search for a better feasible path.

[0098] The process for fine-tuning such bacteria is as follows: (1) First, the size of the first type of path update probability mp1 is set. In the experiment of this embodiment, mp1=0.1.

[0099] (2) Generate random numbers r1 and q1, where r1∈{1, 2, ..., M}, M is the number of bacteria in the population, in this embodiment, M=30; q1∈{1, 2, ..., num occ}, num occ is the number of magnetosomes in each bacterium, which is equal to the value of the blank grid in the map environment. Since the number of blank grids in the map used in this embodiment is 686, num occ =686.

[0100] (3) Generate a random number rand, which is a constant real number between 0 and 1. If rand>mp1, then x ij =x r1j (17) Otherwise x ij =x iq1 +(x cbestq1 -x iq1 )*rand(1) (18) Where cbest is the best bacterium in the current iteration; rand(1) is a random number uniformly distributed in the interval (0, 1); in this step, the moment of the bacterium will migrate to adjust the moment of other bacteria. Formula (17) strengthens the local search capability. Formula (18) will make some randomly selected bacteria far away from the best bacteria close to the best.

[0101] Although the second type of path reaches the end point without collision, its path length is greater than the maximum feasible path length path in the current obstacle environment. max There is still a lot of room for improvement in this type of path, so the magnetosome parameters of this type of bacteria need to be adjusted to a large extent. A significant adjustment of the magnetosome parameters of the bacteria corresponding to the second type of path can improve the search breadth of the algorithm, taking into account both global search and local search, which helps the algorithm to search for better feasible paths. The process of fine-tuning this type of bacteria is the same as the update process of the first type of bacteria, except that mp2 is set to 0.9, so that the bacteria corresponding to the second type of path can adjust the magnetosome more according to formula (18). This enhances the global search capability and at the same time enhances the diversity of feasible solutions.

[0102] The third type of path is a path where planning fails completely. For this type of bacteria, the magnetosome values ​​must be completely replaced. Replacing the magnetosome values ​​of bacteria in the third type of path improves the global search capability of the algorithm. The specific process is as follows: All the magnetosome parameters of bacteria corresponding to the third type of path are replaced, and the replacement formula is: x i =m ls ×(rand(1, num occ )-1)×rand(1,num occ ) (19) Among them, m ls is randomly selected from the magnetic moment vector matrix Ml; l∈{1,2,…,M}s∈{1,2,…,num occ}; rand(1, num occ ) is a uniformly distributed number with num occ dimensional random vector.

[0103] pass Fig.10 It can be seen that the "magnetosome competition evolution strategy" effectively enhances the algorithm's global and local search capabilities by reasonably classifying the paths generated in each iteration and adopting different degrees of magnetosome update strategies for paths of different qualities, avoiding the algorithm from falling into local optimality, and finally searching for a path that is shorter and has fewer redundant nodes than the original algorithm path. Fig.11 , Fig.12 It can be seen that the use of the "magnetosome competition evolution strategy" to update the magnetosome value of the bacterial population realizes the information transmission and sharing between different types of bacteria. The third type of path is more at the beginning, but the third type of path is significantly evolved during the iteration, and more evolved into the second type of path or even the first type of path; at the same time, because IMBOA can search for a better path from the beginning, IMBOA meets the convergence condition with a small number of iterations, which also verifies the feasibility and effectiveness of the algorithm enhancement strategies proposed in the front-end path search of this method. Finally, through 100 repeated experiments and data statistics, MBOA needs an average of 273.2090 iterations to meet the algorithm convergence conditions, while IMBOA meets the algorithm convergence conditions with an average of 98.5710 iterations, and the number of iterations is reduced by 63.92% on average. At the same time, the average length of the optimal path found by MBOA in 100 repeated experiments is 51.7839m, and that found by IMBOA is 44.4268m, both of which are lower than the maximum feasible path length of the map environment, but IMBOA finds a shorter path than MBOA, with an average path length reduction of 14.21%.

[0104] Table 3. Statistics of the mean values ​​of various data of MBOA and IMBOA after 100 repeated experiments under the above parameters. pass Fig.10 It can be seen that the "magnetosome competition evolution strategy" effectively enhances the algorithm's global and local search capabilities by reasonably classifying the paths generated in each iteration and adopting different degrees of magnetosome update strategies for paths of different qualities, avoiding the algorithm from falling into local optimality, and finally searching for a path that is shorter and has fewer redundant nodes than the original algorithm path. Fig.11 , Fig.12 It can be seen that the use of the "magnetosome competition evolution strategy" to update the magnetosome value of the bacterial population realizes the information transmission and sharing between different types of bacteria. The third type of path is more at the beginning, but the third type of path is significantly evolved during the iteration, and the third type of path quickly evolves into the second type of path or even the first type of path; at the same time, since IMBOA can search for a better path from the beginning, IMBOA meets the convergence condition with a small number of iterations, which also verifies the feasibility and effectiveness of the algorithm enhancement strategies proposed in this method in the front-end path search. Finally, through 100 repeated experiments and data statistics, MBOA needs an average of 273.2090 iterations to meet the algorithm convergence conditions, while IMBOA meets the algorithm convergence conditions with an average of 98.5710 iterations, and the number of iterations is reduced by 63.92% on average. At the same time, the average length of the optimal path found by MBOA in 100 repeated experiments is 51.7839 meters, and that found by IMBOA is 44.4268 meters. The optimal path lengths found by the two algorithms are both lower than the maximum feasible path length determined by the map environment and algorithm parameters. max , but the path length found by IMBOA is shorter, and the path length is reduced by 14.21% on average compared with MBOA.

[0105] Example 4 Verification of the effectiveness of the dual-line of sight inspection algorithm observe Fig.10 It can be found in Figure b that when IMBOA searches for feasible paths, it can only search the center point of the grid, which results in redundant path points in the path it finally searches. These redundant path points mainly include two types: (1) redundant intermediate nodes; (2) redundant path turning points. The "two-way sight check strategy" proposed in this method is to remove these redundant path points to eliminate the influence of the grid on the front-end path search. At the same time, the "two-way sight check strategy" proposed in this method is highly versatile and can be used as a necessary item for back-end path optimization to process the initial path obtained by other front-end path search methods.

[0106] Next, continue to use the map environment and algorithm parameters in Example 1, use the "two-way sight line check" to process the path searched by IMBOA in Example 2, and repeat the experiment 100 times. The effect of the two-way sight line check is shown in Figure 2. Fig.13 ,In addition, relevant data statistics were collected for the paths generated by the “two-way sight check” in 100 repeated experiments, see Table 4.

[0107] Table 4. Statistics of the mean values ​​of various data of MBOA and IMBOA after 100 repeated experiments under the above parameters. exist Fig.13 In the experiment, the optimal path searched by IMBOA in a certain experiment is compared with the path processed by two-way sight check. It is obvious that this strategy removes the redundant path points in the IMBOA path and obtains a better path. It can be seen from Table 3 that under 100 repeated experiments, the average length of the path processed by two-way sight check is 42.7285, which is 3.56% lower than the average path length obtained by IMBOA search; the average number of path points is 15.0000, which is 57.42% lower than the average number of path points obtained by IMBOA search; the average number of path turning points is 11.9667, which is 18.34% lower than the average number of path turning points obtained by IMBOA search; through the experimental results of this embodiment, the feasibility and effectiveness of the two-way sight check strategy proposed by this method are effectively verified. At the same time, the two-way sight check strategy has strong versatility and can be used as a necessary part of the back-end path optimization to reduce the shortcomings of the path searched by the front end.

[0108] To verify the feasibility and effectiveness of the above embodiments, Matlab 2022a simulation software, Windows 10 operating system, Intel Core i9-11900 processor, main frequency 2.5 GHz, and 16 GB hardware simulation platform with running memory are used for experimental verification.

Claims

1. A multi-rotor UAV path planning method based on the improved magnetic bacteria optimization algorithm (IMBOA), which has the following features: The method uses the direction information of the starting point and the end point to initialize the magnetic bacterial population to obtain a better initial path and accelerate the convergence of the algorithm; The feasible path screening factor α is dynamically adjusted according to the obstacle density to adapt to the path search requirements under different environmental conditions and ensure the flexibility and adaptability of path planning; the magnetosome competition evolution strategy is introduced to enhance the local search ability of the algorithm, avoid the algorithm from falling into the local optimal solution, and accelerate the convergence speed of the algorithm; the two-way line of sight check algorithm (Twsda) is used to screen the key path points to significantly reduce the path turning points, shorten the path length, and avoid the UAV from falling into a concave trap; the generated path is smoothed by using the cubic B-spline curve fitting technology to generate a smoother UAV flight path that better meets the flight requirements; the optimization goals of the objective function value of the method include but are not limited to: minimizing the path length to ensure that the UAV completes the task with the shortest flight distance; minimizing the risk factor in the path to reduce the flight risk; minimizing the flight energy consumption to extend the flight time of the UAV or reduce energy consumption; minimizing the number of posture changes to reduce the maneuverability requirements of the UAV during flight and improve flight stability.

2. The multi-rotor UAV path planning method based on the improved magnetic bacteria optimization algorithm according to claim 1 is characterized in that: The specific steps of initializing the magnetic bacterial population according to the directions of the starting point and the end point are as follows: a. First, define the coordinates of the starting point and the end point of the drone, let P start =(x start ,y start ) and P end =(x end ,y end ) are the coordinates of the starting point and the end point of the UAV respectively. b. Calculate the positional relationship between the starting point and the end point of the drone, and determine the directional relationship between the two using formula (1), where θ is the angle between the starting point and the end point. c. According to the directional relationship between the starting point and the end point, the area around the starting point is divided into 8 areas as shown in Figure 2. Each area corresponds to a different exploration strategy, as shown in Table 1. Table 1 Determine the UAV position update strategy based on the starting point area d. When the bacterial population is initialized, the magnetosome parameter matrix x of each bacterium is an M×N matrix, where M is the size of the bacterial population, N is the number of magnetosomes inside each bacterium, and the value of the magnetosome matrix is ​​between 0 and 1. e. Initialize the value of the magnetic field strength B and the values ​​of coefficients C1 and C2 in the calculation formula of the interaction energy, and set the maximum number of iterations. f. Generate a distance matrix using the interaction distance calculation formula (3) between bacteria, and use this distance matrix and the definition of interaction energy to calculate the interaction energy of each magnetosome. D(X i ,X r )=norm||X i -X r || (3) g. Calculate the torque based on the interaction energy and the magnetic field strength, and calculate the total magnetic moment through the torque, and then update the magnetosome parameters of each bacterium to generate an initial magnetic bacterial population based on the starting and ending directions. h. The selection of the next path point of the drone is determined by the value x(i, 1) of the first magnetosome in each bacterial body in the bacterial population and num Direct Substitute the value of the variable calculated by formula (2) to determine, where ii represents the index of the bacterium in the population.

3. The multi-rotor UAV path planning method based on the improved magnetic bacteria optimization algorithm according to claim 1 is characterized in that: The method of dynamically adjusting the feasible path screening factor α according to the obstacle density comprises the following steps: a. Determine the starting coordinates of the drone (x s ,y s ) and the end point coordinates (x e ,y e ). b. Calculate the straight-line distance D from the starting point to the end point. The formula is: c. Calculate the obstacle density β, which is defined as the number of obstacle grids N in the drone’s surrounding environment obs and the number of obstacle-free grids N free The ratio of ρ = N obs / (N obs +N free ). d. According to the obstacle density β, dynamically adjust the feasible path screening factor α, the formula is: e. Use the adjusted feasible path screening factor α to calculate the maximum feasible path length L max , the formula is L max =D·α.

4. The multi-rotor UAV path planning method based on the improved magnetic bacteria optimization algorithm according to claim 1 is characterized in that: The introduction of magnetosome competition evolution strategy enhances the local search capability of the algorithm, prevents the algorithm from falling into the local optimal solution, and accelerates the convergence speed of the algorithm: a. The magnetosome competition evolution strategy divides the paths generated after iteration into three categories, and adopts different evolution strategies for the magnetosomes corresponding to the different categories of paths, including: (a) The first type of path: a path that reaches the end point and has a path length less than α×A, where A is the distance from the start point to the end point and α is a feasible path screening factor that is adjusted according to the density of obstacles. The magnetosome parameters of the bacterial individuals corresponding to the first type of path will be retained and fine-tuned to improve the search accuracy of the algorithm. (b) The second type of path: a path that reaches the end point but has a path length greater than α×A. For the second type of path, the magnetosome values ​​of the bacteria corresponding to the second type of path are partially updated by setting the probability mp and combining the random number rand(1). If there is an update requirement, the formula x(m, N) = x(m, q1) + (x(cell best , q1)-x(m, q1))×rand(1), where x(m, N) represents the magnetosome parameters of the current bacterium m, x(cell_best, q1) represents the corresponding magnetosome parameters of the optimal bacterium, and cell_best is the index of the bacterium with the best path in the current iteration round. (c) The third type of path: the path that does not reach the end point. The magnetosome values ​​of the corresponding bacterial individuals will be replaced to enhance the exploration of new solution space. b. If no first-class path is generated in a certain iteration, the magnetosome values ​​of all bacteria are updated again until at least one first-class path is generated to ensure that the algorithm can continue to approach the global optimal solution.

5. The multi-rotor UAV path planning method based on the improved magnetic bacteria optimization algorithm according to claim 1 is characterized in that: The two-way sight check algorithm (Twsda) is used to screen key path points, and the forward and reverse paths are fused and the cubic B-spline curve is fitted to significantly reduce the path turning points, shorten the path length, and prevent the drone from falling into a concave trap: a. "Two-way sight check algorithm (Twsda)" first performs forward sight check and reverse sight check based on the final path point set searched by the front-end IMBOA and the map obstacle information, and obtains two key path point sets, named place11 and place12 respectively. b. Forward line of sight check: Select two points from the initial path place1 and determine whether there is an obstacle on the line between the two points. If not, store the point in a temporary matrix and continue this operation until the end point is added to the path point set place11. c. The reverse sight check is similar to the forward sight check, but in the opposite direction. It removes redundant waypoints and finally obtains the waypoint set place12. d. The forward and reverse path fusion strategy fuses the key path point sets obtained from the forward and reverse line of sight checks to form a path key point matrix. This process includes finding the intersection formed by the forward and reverse paths, and eliminating special points to obtain the fused path. e. Perform cubic B-spline curve fitting on the fused key path point set to obtain the final smooth flight path.

6. The multi-rotor UAV path planning method based on the improved magnetic bacteria optimization algorithm according to claim 5 is characterized in that: The cubic B-spline curve fitting technology is used to smooth the generated path to generate a smoother drone flight path that better meets flight requirements (ensuring that the drone has better dynamic and kinematic characteristics at the turning points of the path): determine the key path points, which are obtained by front-end IMBOA search and back-end Twsda algorithm screening and fusion, and then use these key points to construct a cubic B-spline curve to smooth the path. The mathematical expression is: In the formula, C(t) represents the fitted cubic B-spline curve, B 3i (t) is the cubic B-spline benchmark function, P i is the i-th control point in the set of key path points, and n is the total number of control points.

Citation Information

Patent Citations

  • Route planning method under sudden threat

    CN114791742A

  • Rotor unmanned aerial vehicle autonomous path planning method based on Tiancattle swarm algorithm

    CN115903888A

  • Controlling multiple heterogenous magnetic bacteria at a solid-liquid interface using uniform magnetic fields

    US20220325267A1