An unmanned aerial vehicle path planning method based on improved firefly algorithm
By improving the Firefly algorithm, constructing an environment and threat model, and introducing chaos and perturbation mechanisms to optimize position updates, the problems of unstable paths and long time in UAV trajectory planning are solved, generating efficient and stable trajectory routes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF ELECTRONICS SCI & TECH OF CHINA
- Filing Date
- 2023-05-29
- Publication Date
- 2026-07-03
Smart Images

Figure CN116700329B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of autonomous trajectory planning, specifically relating to a UAV trajectory planning method based on an improved firefly algorithm. Background Technology
[0002] Flight path planning is fundamental for autonomous flight of unmanned aerial vehicles (UAVs), enabling them to avoid obstacles and threats during mission execution and ensuring safe operation. Current mainstream research on single-UAV flight path planning involves modeling the problem, defining the objective function and constraints, and classifying it as a combinatorial nonlinear optimization problem. However, flight path planning for UAVs in sensitive quasi-battlefield environments requires satisfying certain constraints and avoiding potential obstacles and threats to reach the designated mission area. This is undoubtedly a typical NP-hard problem, requiring highly reliable algorithms to solve. Traditional path planning algorithms, such as the artificial potential field method, A* algorithm, and roadmap algorithm, are classic solutions for individual path planning problems in two-dimensional or three-dimensional environments. They can handle various complex constraints in the model and provide optimal solutions. However, these algorithms often require pre-loading environmental information, which can lead to long runtimes when applied to single-UAV flight path planning in sensitive environments.
[0003] In addition to the above, when performing flight missions to target areas, UAVs inevitably face various obstacles and threats, including obstacles such as mountains and no-fly zones, as well as various threats from hostile parties. Specifically, UAVs face both static and dynamic threats. Static threats include fixed radar detection and the firing range of fixed artillery, while dynamic threats include attacks from enemy SAM missiles and interference from enemy UAVs. Furthermore, due to the limited performance of UAV sensors, UAVs will inevitably face unknown threats in the current environment before the terminal issues the mission. Therefore, how to avoid obstacles during flight and reduce the intensity of static and dynamic threats in the quasi-battlefield is one of the main problems in current single-UAV trajectory planning research. To address these issues, the main solutions for single-UAV trajectory planning problems both domestically and internationally currently utilize metaheuristic algorithms such as PSO, simulated annealing, and genetic algorithms. Compared to traditional path planning algorithms, metaheuristic optimization algorithms can perform path planning based on real-time measured environmental element information and their own position information. Therefore, they are more suitable for UAVs in dynamic threat and sensitive environments. Compared to other metaheuristic algorithms, the Firefly algorithm can balance local and global search, achieving optimal solutions while maintaining fast convergence speed, making it applicable to various complex mathematical models. Research on the Firefly algorithm and its improvements for single-UAV trajectory planning is already widespread; however, these algorithms suffer from path instability and long planning times when applied to single-UAV trajectory planning. Specifically, they exhibit high path turning losses and low convergence efficiency. Summary of the Invention
[0004] To address the aforementioned shortcomings in existing technologies, this invention provides a UAV trajectory planning method based on an improved firefly algorithm, which solves the problems of unstable paths and long planning times when the existing firefly algorithm is applied to single UAV trajectory planning.
[0005] To achieve the aforementioned objectives, the present invention employs the following technical solution: a UAV trajectory planning method based on an improved firefly algorithm, comprising the following steps:
[0006] S1. Construct environmental and threat models for UAV trajectory planning;
[0007] S2. Based on the environmental model and threat model, set the constraints and objective function for UAV trajectory planning;
[0008] S3. The objective function is optimized using the improved firefly algorithm to obtain the UAV's flight path.
[0009] Further: S1 includes the following sub-steps:
[0010] S11. Obtain the coordinates of the UAV's starting point, destination point, and track point group on the original two-dimensional coordinate axis, and convert the coordinates of the UAV's starting point, destination point, and track point group into the coordinates of the new two-dimensional coordinate axis through coordinate transformation.
[0011] S12. Construct an environmental and threat model for UAV trajectory planning under a new two-dimensional coordinate system.
[0012] Furthermore: In S11, the method for constructing the new two-dimensional coordinate axes is specifically as follows:
[0013] The new two-dimensional coordinate axis is obtained by taking the starting point of the UAV as the origin, the line connecting the starting point and the destination of the UAV as the horizontal axis, and the line passing through the origin and perpendicular to the horizontal axis as the vertical axis.
[0014] Furthermore: In S12, the environmental model specifically refers to static threat strength, where the static threat strength J... sThroat The specific expression is:
[0015]
[0016] In the formula, N throat f represents the number of threat sources. (j) Let the threat strength of the j-th threat source be expressed as follows:
[0017]
[0018] In the formula, K j Let R be the threat factor of the j-th threat source. j r represents the distance between the drone and the center of the threat area. j Let m be the threat range of the j-th threat source. j The monitoring range is defined by α, which is a threat intensity constant with a value range of (0, 1).
[0019] In S12, the threat model is specifically the dynamic threat cost, and the dynamic threat cost J dThreat The specific expression is:
[0020]
[0021] In the formula, i is the index of the threat cost point, N is the number of threat cost points, q is the index of the missile threat source, M is the number of missile threat sources, and d i,q SLE represents the distance between the UAV and the q-th missile threat source when the UAV passes through the i-th threat cost point. i,q Let C be the lethal envelope threat cost generated by the q-th missile when the UAV passes through the i-th threat cost point. R σ is a constant used for monitoring intensity at missile launch sites.i,q Let C be the anisotropic cross-sectional value experienced by the UAV. L L is a constant used to calculate the LOS cost. i L represents the number of ground locations visible to the drone. t This represents the total number of ground locations for LOS calculations performed on the location of the i-th threat cost point traversed by the UAV;
[0022] Among them, the anisotropic cross-sectional value σ suffered by the UAV i,q The specific expression is:
[0023]
[0024] In the formula, θ is the angle between the current heading of the UAV and the threat source, and a1, a2 and a3 are constant parameters, with a1 = 0.3172, a2 = 0.1784 and a3 = 1.003.
[0025] The beneficial effect of the above-mentioned further solution is that the present invention sets the values of a1, a2 and a3 to ensure that their anisotropy values are relatively small when viewed from the front and back of a two-dimensional plane.
[0026] Furthermore: the method for setting the threat cost point is specifically as follows:
[0027] Several threat cost points are set at equal intervals along the connecting line segment when the drone passes through two track points.
[0028] Furthermore: In S2, the constraints include maneuver constraints, cost constraints, loss constraints, and threat cost constraints;
[0029] The expression for the kinematic constraint is specifically as follows:
[0030] θ r ≤θ max
[0031] In the formula, θ r Let θ be the turning angle of the UAV when it makes the r-th turn. max This is the maximum turning angle;
[0032] The expression for the cost constraint is as follows:
[0033]
[0034] In the formula, L b Let m be the distance traveled by the drone in each flight, and L be the total number of flights. max The maximum flight distance; the expression for the loss constraint is specifically as follows:
[0035] Σ r=1 δ r ≤δmax
[0036] In the formula, δ r δ represents the loss incurred by the UAV during its r-th turn. max The maximum wear and tear that the drone can withstand;
[0037] The expression for the threat cost constraint is as follows:
[0038]
[0039] In the formula, f (j) f represents the threat intensity of the j-th threat source. (j)max N represents the maximum total threat intensity that the drone can withstand. throat The number of threat sources.
[0040] The beneficial effects of the above-mentioned further solutions are as follows: Based on the environmental model and threat model, this invention analyzes the constraints and objective function of the UAV trajectory planning problem from the perspectives of maneuverability, cost, and threat cost, thereby obtaining the fitness function required by the firefly algorithm for this optimization problem.
[0041] Furthermore, in S2, the expression for the objective function J is specifically as follows:
[0042] J = ω1J1 + ω2J2 + ω3J3
[0043] In the formula, J3 is the total threat cost faced by the UAV, J2 is the total loss value generated during the UAV's journey, J1 is the total cost of the UAV's flight, ω1 is the first weighting coefficient, ω2 is the second weighting coefficient, and ω3 is the third weighting coefficient.
[0044] The expression for the total flight cost J1 of the UAV is as follows:
[0045]
[0046] The expression for the total loss value J2 generated during the drone's travel distance is as follows:
[0047] J2=Σ r=1 δ r
[0048] Among them, the loss δ generated when the UAV makes the r-th turn. r The specific expression is:
[0049]
[0050] In the formula, μ is the penalty coefficient, and its value is greater than 1;
[0051] The expression for the total threat cost faced by the drone is as follows:
[0052] J3 = J sThroat +J dThroat
[0053] In the formula, J dThreat For dynamic threat costs, J sThroat This refers to static threat strength.
[0054] Further: S3 includes the following sub-steps:
[0055] S31. Set the number of fireflies based on the threat cost points in the candidate paths of the drone, and set the light intensity absorption coefficient and maximum number of iterations for the fireflies.
[0056] S32. Randomly initialize the individual firefly positions, calculate the initial brightness of the fireflies according to the fitness function, and initialize the number of iterations;
[0057] S33. Based on the current number of iterations, calculate the new light intensity absorption coefficient according to the absorption coefficient adaptive adjustment method based on the chaotic strategy, and obtain the firefly position update formula according to the new light intensity absorption coefficient.
[0058] S34. Calculate the new time-varying inertial weight coefficient after adaptive adjustment for the current iteration number, and obtain the new firefly position update formula based on the new time-varying inertial weight coefficient.
[0059] S35. Update the firefly's position using the new firefly position update formula, and perturb the firefly's current position according to the perturbation mechanism to obtain the final firefly position.
[0060] S36. Based on the final firefly location, evaluate the brightness of each firefly using a fitness function;
[0061] S37. Determine whether the current iteration count is not less than the maximum iteration count;
[0062] If so, proceed to S38;
[0063] If not, increment the current iteration count by 1 and return to S33;
[0064] S38. Output the global extreme point and the optimal individual value based on the brightness of each firefly to obtain the flight path of the UAV.
[0065] The beneficial effects of the above-mentioned further scheme are as follows: The improved firefly algorithm proposed in this invention introduces a chaotic mechanism to enable the light intensity absorption coefficient to be adaptively adjusted with iteration, improves the light intensity update and attraction update, and uses the reciprocal of the objective function value as the fitness function. At the same time, the inertia weight coefficient is improved in the position update stage, and a perturbation mechanism is subsequently introduced to enhance the algorithm's early global search capability and late local search capability, expand the search range of the algorithm, avoid premature convergence, and increase the possibility of firefly individuals moving to more and more promising directions.
[0066] Furthermore: In step S32, the fitness function is the reciprocal of the objective function;
[0067] In S33, the new light intensity absorption coefficient γ chaos The specific expression is:
[0068]
[0069] In the formula, n max u is the maximum number of iterations. k+1 Let be the chaotic variable in the current iteration, and its expression is as follows:
[0070] u k+1 =sinπu k
[0071] In the formula, u k The chaotic variable from the previous iteration;
[0072] In S34, the new firefly position update formula The specific expression is:
[0073]
[0074] In the formula, t is the current iteration number, and X i t The current position of the firefly, β0 is the maximum attraction, and I t X represents the relative light intensity of the fireflies at present. j t Let be the position of the firefly corresponding to the j-th threat source at the current iteration number. The step size perturbation factor takes values within the range [0,1], and rand() is a random perturbation that takes values within the range [-0.5,0.5] and either a uniform distribution or a standard normal distribution of U(0,1).
[0075] The expression for the new time-varying inertia weighting coefficient w(t) is as follows:
[0076]
[0077] In the formula, w max w is the maximum weight value min The minimum weight value is given by t, where t is the current iteration number.
[0078] In step S35, the final firefly position χ is obtained. i t+1 The specific expression is:
[0079] χ i t+1 =X i t+1 *(1+P ij *|sinc1|)
[0080] In the formula, sinc1 is the value of a random sine function, and P ij The parameters of the perturbation mechanism are expressed as follows:
[0081]
[0082] In the formula, N represents the number of threat cost points, and f i This is the fitness function.
[0083] The beneficial effects of the above-mentioned further scheme are as follows: The chaotic mechanism of the present invention introduces chaotic variables to adaptively improve the light intensity absorption coefficient, which can achieve global asymptotic convergence and improve the convergence speed. This helps to improve the quality of the single UAV route found and reduce the risk of premature convergence. Furthermore, by introducing randomness into the algorithm, the algorithm can explore a larger search space, reduce the probability of getting trapped in local optima, and find a solution close to the optimum more quickly.
[0084] The beneficial effects of this invention are as follows:
[0085] (1) The present invention proposes an UAV trajectory planning method based on an improved firefly algorithm. It performs environmental modeling of the UAV trajectory planning scenario, analyzes the static domain dynamic threat cost that the UAV may face, and then analyzes the remaining constraints and objective function. The problem is transformed into a multi-objective combinatorial optimization problem. In order to optimize this problem, the objective function is optimized by the improved firefly algorithm. The light intensity absorption coefficient and firefly position update of the firefly algorithm are adaptively adjusted respectively. A perturbation mechanism is introduced to expand the search space of the algorithm, improve the global search capability of the firefly algorithm and improve its convergence efficiency, and ensure that the global optimality of the generated path is better.
[0086] (2) Without considering altitude changes, this invention designs and plans a flight path from the starting point to the target point that avoids obstacles and threats. Compared with the traditional firefly algorithm and the firefly algorithm improved by this invention, this invention can generate a better flight path with fewer turns and a shorter flight path length. Moreover, the algorithm has higher convergence efficiency and reduces the time for flight path planning. Attached Figure Description
[0087] Figure 1 This is a flowchart of a UAV trajectory planning method based on an improved firefly algorithm according to the present invention.
[0088] Figure 2 This is an environmental modeling diagram for the UAV trajectory planning of this invention.
[0089] Figure 3 This is a schematic diagram of the lethal envelope of dynamic threats according to the present invention.
[0090] Figure 4 This is a calculation diagram of the threat cost points for single UAV trajectory planning proposed in this invention. Detailed Implementation
[0091] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0092] like Figure 1 As shown, in one embodiment of the present invention, a UAV trajectory planning method based on an improved firefly algorithm includes the following steps:
[0093] S1. Construct environmental and threat models for UAV trajectory planning;
[0094] S2. Based on the environmental model and threat model, set the constraints and objective function for UAV trajectory planning;
[0095] S3. The objective function is optimized using the improved firefly algorithm to obtain the UAV's flight path.
[0096] S1 includes the following steps:
[0097] S11. Obtain the coordinates of the UAV's starting point, destination point, and track point group on the original two-dimensional coordinate axis, and convert the coordinates of the UAV's starting point, destination point, and track point group into the coordinates of the new two-dimensional coordinate axis through coordinate transformation.
[0098] S12. Construct an environmental and threat model for UAV trajectory planning under a new two-dimensional coordinate system.
[0099] In this embodiment, the expression for coordinate transformation is specifically as follows:
[0100]
[0101] In the formula, (x,y) are the coordinates of the point under the original two-dimensional coordinate axis, (x',y') are the coordinates of the point under the new two-dimensional coordinate axis, (x0,y0) are the coordinates of the starting point of the UAV, (x s ,y s () represents the coordinates of the destination point.
[0102] This invention sets up a trackpoint group, which divides the UAV's path into several segments. It further constructs a set of candidate UAV paths as an algorithm population, and the number of trackpoints serves as the dimension of the firefly population to optimize the algorithm and determine the optimal path.
[0103] In S11, the method for constructing the new two-dimensional coordinate axes is as follows:
[0104] The new two-dimensional coordinate axis is obtained by taking the starting point of the UAV as the origin, the line connecting the starting point and the destination of the UAV as the horizontal axis, and the line passing through the origin and perpendicular to the horizontal axis as the vertical axis.
[0105] like Figure 2 As shown, this invention views the flight path of a UAV as a path planning on a two-dimensional plane, and divides the obstacles and threats faced by the UAV into two categories: static and dynamic. The static category includes no-fly zones, radar, and planar circles of obstacles, while the dynamic category includes unknown threats and interceptor missiles. The threat source of the planar circle is the center of the circle, and the threat range of the threat source is the radius of the planar circle.
[0106] In S12, the environmental model is specifically a static threat intensity, where the static threat intensity J sThroat The specific expression is:
[0107]
[0108] In the formula, N throat f represents the number of threat sources. (j) Let the threat strength of the j-th threat source be expressed as follows:
[0109]
[0110] In the formula, K j Let R be the threat factor of the j-th threat source. j r represents the distance between the drone and the center of the threat area. jLet m be the threat range of the j-th threat source. j The monitoring range is defined by α, which is a threat intensity constant with a value range of (0, 1). The threat intensity constant α is used to indicate that when the distance of the UAV exceeds the range of the threat source but is still within the monitoring range, it is still considered to be under threat, but will be subject to a smaller threat intensity.
[0111] In S12, the threat model is specifically the dynamic threat cost, and the dynamic threat cost J dThreat The specific expression is:
[0112]
[0113] In the formula, i is the index of the threat cost point, N is the number of threat cost points, q is the index of the missile threat source, M is the number of missile threat sources, and d i,q SLE represents the distance between the UAV and the q-th missile threat source when the UAV passes through the i-th threat cost point. i,q Let C be the lethal envelope threat cost generated by the q-th missile when the UAV passes through the i-th threat cost point. R σ is a constant used for monitoring intensity at missile launch sites. i,q Let C be the anisotropic cross-sectional value experienced by the UAV. L L is a constant used to calculate the LOS cost. i L represents the number of ground locations visible to the drone. t This represents the total number of ground locations for LOS calculations performed on the location of the i-th threat cost point traversed by the UAV;
[0114] like Figure 3 As shown in this embodiment, when the UAV is in a lethal envelope, the lethal envelope threat cost will be added to the dynamic threat cost. When the UAV changes its flight direction, the lethal envelope will also change its direction, while the position of the surface-to-air missile will remain fixed at its original position. When the UAV goes beyond the range of the lethal envelope, no lethal envelope threat cost will be generated. Assuming that the missile launch position is known, the lethal envelope threat cost faced by the UAV is inversely proportional to the fourth power of the distance between the UAV and the missile.
[0115] Among them, the anisotropic cross-sectional value σ suffered by the UAV i,q The specific expression is:
[0116]
[0117] In the formula, θ is the angle between the current heading of the UAV and the threat source, and a1, a2 and a3 are constant parameters, with a1 = 0.3172, a2 = 0.1784 and a3 = 1.003.
[0118] The present invention sets the values of a1, a2 and a3 to ensure that their anisotropy values are relatively small when viewed from the front and back in a two-dimensional plane.
[0119] The method for setting the threat cost point is as follows:
[0120] Several threat cost points are set at equal intervals along the connecting line segment when the drone passes through two track points.
[0121] like Figure 4 As shown, the present invention sets four threat cost points in two waypoints.
[0122] In S2, the constraints include maneuver constraints, cost constraints, loss constraints, and threat cost constraints;
[0123] Based on environmental and threat models, this invention analyzes the constraints and objective function of the UAV trajectory planning problem from the perspectives of maneuverability, cost, and threat cost, thereby obtaining the fitness function required by the firefly algorithm for this optimization problem.
[0124] The expression for the kinematic constraint is specifically as follows:
[0125] θ r ≤θ max
[0126] In the formula, θ r Let θ be the turning angle of the UAV when it makes the r-th turn. max This is the maximum turning angle;
[0127] The maximum turning angle is used to limit the turning radius of the drone, thereby reducing wear and tear.
[0128] The expression for the cost constraint is as follows:
[0129]
[0130] In the formula, L b Let m be the distance traveled by the drone in each flight, and L be the total number of flights. max This is the maximum flight distance;
[0131] Assuming the drone's flight speed remains constant, and fuel costs are proportional to flight length, a maximum flight distance is set.
[0132] The expression for the loss constraint is as follows:
[0133] Σ r=1 δ r ≤δ max
[0134] In the formula, δ r δ represents the loss incurred by the UAV during its r-th turn.max The maximum wear and tear that the drone can withstand;
[0135] This invention uses the concept of corner loss to constrain the wear and stability of the UAV's trajectory.
[0136] The expression for the threat cost constraint is as follows:
[0137]
[0138] In the formula, f (j) f represents the threat intensity of the j-th threat source. (j)max N represents the maximum total threat intensity that the drone can withstand. throat The number of threat sources.
[0139] In S2, the objective function J is specifically expressed as follows:
[0140] J = ω1J1 + ω2J2 + ω3J3
[0141] In the formula, J3 is the total threat cost faced by the UAV, J2 is the total loss value generated during the UAV's journey, J1 is the total cost of the UAV's flight, ω1 is the first weighting coefficient, ω2 is the second weighting coefficient, and ω3 is the third weighting coefficient.
[0142] In this embodiment, the importance of each cost in the objective function can be changed by adjusting the weights.
[0143] The expression for the total flight cost J1 of the UAV is as follows:
[0144]
[0145] The expression for the total loss value J2 generated during the drone's travel distance is as follows:
[0146] J2=Σ r=1 δ r
[0147] Among them, the loss δ generated when the UAV makes the r-th turn. r The specific expression is:
[0148]
[0149] In the formula, μ is the penalty coefficient, and its value is greater than 1;
[0150] When the angle caused by the change in the drone's heading is greater than the maximum angle, it will suffer greater losses. Assuming that the drone turns once during each flight, the total loss value generated during the drone's journey can be obtained.
[0151] The expression for the total threat cost faced by the drone is as follows:
[0152] J3 = J sThroat +J dThroat
[0153] In the formula, J dThreat For dynamic threat costs, J sThroat This refers to static threat strength.
[0154] This invention establishes environmental and threat models for UAV trajectory planning, provides an approach to establishing an objective function for analyzing UAV trajectory planning problems under dynamic and uncertain environments, and offers a fitness function for evaluation when using metaheuristic algorithms such as the Firefly algorithm to solve the problem.
[0155] S3 includes the following steps:
[0156] S31. Set the number of fireflies based on the threat cost points in the candidate paths of the drone, and set the light intensity absorption coefficient and maximum number of iterations for the fireflies.
[0157] S32. Randomly initialize the individual firefly positions, calculate the initial brightness of the fireflies according to the fitness function, and initialize the number of iterations;
[0158] S33. Based on the current number of iterations, calculate the new light intensity absorption coefficient according to the absorption coefficient adaptive adjustment method based on the chaotic strategy, and obtain the firefly position update formula according to the new light intensity absorption coefficient.
[0159] S34. Calculate the new time-varying inertial weight coefficient after adaptive adjustment for the current iteration number, and obtain the new firefly position update formula based on the new time-varying inertial weight coefficient.
[0160] S35. Update the firefly's position using the new firefly position update formula, and perturb the firefly's current position according to the perturbation mechanism to obtain the final firefly position.
[0161] S36. Based on the final firefly location, evaluate the brightness of each firefly using a fitness function;
[0162] S37. Determine whether the current iteration count is not less than the maximum iteration count;
[0163] If so, proceed to S38;
[0164] If not, increment the current iteration count by 1 and return to S33;
[0165] S38. Output the global extreme point and the optimal individual value based on the brightness of each firefly to obtain the flight path of the UAV.
[0166] The improved Firefly algorithm proposed in this invention is specifically a single UAV trajectory planning algorithm based on an adaptive adjustment strategy (AFF-TPA). This algorithm will effectively improve the convergence efficiency of the original algorithm and enhance trajectory stability and time efficiency of trajectory planning.
[0167] The improved firefly algorithm introduces a chaotic mechanism to enable the light intensity absorption coefficient to be adaptively adjusted with iteration, improves the light intensity update and attraction update, and uses the reciprocal of the objective function value as the fitness function. At the same time, the inertia weight coefficient is improved in the position update stage, and a perturbation mechanism is subsequently introduced to enhance the algorithm's early global search capability and late local search capability, expand the algorithm's search range, avoid premature convergence, and increase the possibility of firefly individuals moving to more and more promising directions.
[0168] In S32, the fitness function is the reciprocal of the objective function;
[0169] In S33, the new light intensity absorption coefficient γ chaos The specific expression is:
[0170]
[0171] In the formula, n max The maximum number of iterations; u k+1 Let be the chaotic variable in the current iteration, and its expression is as follows:
[0172] u k+1 =sinπu k
[0173] In the formula, u k The chaotic variable from the previous iteration;
[0174] In this embodiment, the chaotic mechanism introduces chaotic variables to adaptively improve the light intensity absorption coefficient, which can achieve global asymptotic convergence and improve the convergence speed. This helps to improve the quality of the single UAV flight path found and reduce the risk of premature convergence. By introducing randomness into the algorithm, the algorithm can explore a larger search space, reduce the probability of getting trapped in local optima, and find a near-optimal solution more quickly.
[0175] In S34, the new firefly position update formula X i t+1 The specific expression is:
[0176]
[0177] In the formula, t is the current iteration number, and X i tThe current position of the firefly, β0 is the maximum attraction, and I t X represents the relative light intensity of the fireflies at present. j t Let be the position of the firefly corresponding to the j-th threat source at the current iteration number. The step size perturbation factor takes values within the range [0,1], and rand() is a random perturbation that takes values within the range [-0.5,0.5] and either a uniform distribution or a standard normal distribution of U(0,1).
[0178] This invention utilizes chaotic variables to adaptively adjust the light intensity absorption coefficient, thereby further improving the light intensity and attraction parameters in the firefly algorithm. Based on the randomness and ergodicity of chaotic variables, we can overcome the shortcomings of the general firefly algorithm, which is prone to stagnation in the later stages of iteration, and achieve fast convergence to the global optimum.
[0179] The expression for the new time-varying inertia weighting coefficient w(t) is as follows:
[0180]
[0181] In the formula, w max w is the maximum weight value min The minimum weight value is given by t, where t is the current iteration number.
[0182] This invention introduces an adaptive time-varying inertial weight to improve the firefly position update formula. The influence of the current firefly position is controlled by the inertial weight. The weight determines the firefly's movement distance and adjusts the global and local search capabilities of the firefly algorithm. The magnitude of the weight value affects the global and local search capabilities of the firefly algorithm. A larger weight value enhances the global optimization capability but relatively weakens the local search capability, while a smaller weight value weakens the global optimization capability but enhances the local search capability. Furthermore, the weight value also affects the attraction between fireflies and the influence of the current position on the next movement position. Therefore, a time-varying inertial weight coefficient is introduced during the position update process. The time-varying inertial weight coefficient decreases linearly over time. In the initial stage of the search process, a larger inertial weight can enhance global exploration. Later, by reducing the time-varying inertial weight coefficient, local exploration is strengthened, avoiding excessively rapid position update speeds that could lead to repeated oscillations, and guiding the firefly to move accurately and quickly to the extreme point.
[0183] In step S35, the final firefly position χ is obtained. i t+1 The specific expression is:
[0184] χ i t+1 =X i t+1*(1+P ij *|sinc1|)
[0185] In the formula, sinc1 is a random sine function value;
[0186] In order to further expand the search range of the algorithm and reduce the probability of the algorithm getting stuck in a local optimum, this invention introduces a perturbation mechanism to perturb the firefly positions generated during algorithm iteration, so as to avoid the algorithm prematurely converging to a local optimum, thereby improving the solution accuracy of the algorithm and the quality of the final trajectory.
[0187] The perturbation mechanism takes the parameter of a variable with a value between [0,1], and the specific value is determined by the Boltzmann selection strategy. This invention applies the algorithm by associating the fitness of each Firefly algorithm with the energy value of the Boltzmann distribution and using the energy value to calculate the probability that a solution will be selected as the next solution. The probability of selection is proportional to the energy value. Solutions with lower energy values have a higher probability of being selected, which helps to ensure that the algorithm further explores the search space thoroughly and does not get stuck in local optima.
[0188] P ij The parameters of the perturbation mechanism are expressed as follows:
[0189]
[0190] In the formula, N represents the number of threat cost points, and f i This is the fitness function.
[0191] The perturbation mechanism relies on random factor parameters and sine function values to perturb the current state of the iterative solution. To address the premature convergence problem of the firefly algorithm, a sine function and Boltzmann selection strategy are introduced as perturbation factors to expand the search range of the algorithm and thoroughly explore the search space. This avoids premature convergence and getting trapped in local optima, increases the possibility of individual fireflies moving to more and more promising directions, and thus improves search efficiency and accuracy.
[0192] The beneficial effects of this invention are as follows:
[0193] This invention proposes an UAV trajectory planning method based on an improved firefly algorithm. The method models the environment of the UAV trajectory planning scenario, analyzes the static domain dynamic threat costs that the UAV may face, and then analyzes the remaining constraints and objective function, transforming the problem into a multi-objective combinatorial optimization problem. To optimize this problem, the objective function is optimized using the improved firefly algorithm. The light intensity absorption coefficient and firefly position update are adaptively adjusted, and a perturbation mechanism is introduced to expand the algorithm's search space, improving the global search capability and convergence efficiency of the firefly algorithm, thus ensuring better global optimality of the generated path.
[0194] This invention designs and plans a flight path from the starting point to the target point without considering altitude changes, avoiding obstacles and threats. Compared with the traditional firefly algorithm and the improved firefly algorithm of this invention, this invention can generate a better flight path with fewer turns and a shorter flight path length. Moreover, the algorithm has higher convergence efficiency and reduces the time for flight path planning.
[0195] In the description of this invention, it should be understood that the terms "center," "thickness," "upper," "lower," "horizontal," "top," "bottom," "inner," "outer," and "radial," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying the relative importance or the number of technical features implicitly specified. Therefore, a feature defined by "first," "second," and "third" may explicitly or implicitly include one or more of that feature.
Claims
1. An unmanned aerial vehicle path planning method based on an improved firefly algorithm, characterized in that, Includes the following steps: S1. Construct environmental and threat models for UAV trajectory planning; S2. Based on the environmental model and threat model, set the constraints and objective function for UAV trajectory planning; S3. The objective function is optimized using the improved firefly algorithm to obtain the UAV's flight path; S1 includes the following steps: S11. Obtain the coordinates of the UAV's starting point, destination point, and track point group on the original two-dimensional coordinate axis, and convert the coordinates of the UAV's starting point, destination point, and track point group into coordinates on the new two-dimensional coordinate axis through coordinate transformation. S12. Construct an environmental and threat model for UAV trajectory planning under a new two-dimensional coordinate axis; In S12, the environmental model is specifically a static threat strength, and the static threat strength The specific expression is: In the formula, For the number of threat sources, For the first j The threat intensity of a threat source is expressed as follows: In the formula, K j For the first j Threat factors of each threat source R j The distance between the drone and the center of the threat area. r j For the first j The scope of threat impact of each threat source. m j For monitoring scope, The threat intensity constant is defined as , and its value ranges from (0, 1). In S12, the threat model is specifically the dynamic threat cost, and the dynamic threat cost The specific expression is: In the formula, i The number of the threat cost point. N The number of threat cost points, q This is the missile threat source serial number. M For the number of missile threat sources, For the drone after the first i The first threat cost point and the second q The distance between missile threat sources For the first q The missile passed the drone. i The lethal envelope threat cost generated at each threat cost point For monitoring intensity at missile launch sites, a constant is used. The anisotropic cross-sectional value experienced by the UAV. Here is a constant used to calculate the LOS cost. The number of ground locations visible to the drone. To monitor the drone after the first i The total number of ground locations for LOS calculation at each threat cost point location; Among them, the anisotropic cross-sectional values suffered by the drone The specific expression is: In the formula, The angle between the drone's current heading and the threat source. a 1. a 2 and a All three are constant parameters, and .
2. The UAV trajectory planning method based on the improved firefly algorithm according to claim 1, characterized in that, In S11, the method for constructing the new two-dimensional coordinate axes is as follows: The new two-dimensional coordinate system is obtained by taking the starting point of the UAV as the origin, the line connecting the starting point and the destination of the UAV as the horizontal axis, and the line passing through the origin and perpendicular to the horizontal axis as the vertical axis.
3. The UAV trajectory planning method based on the improved firefly algorithm according to claim 1, characterized in that, The method for setting the threat cost point is as follows: Several threat cost points are set at equal intervals along the connecting line segment when the drone passes through two track points.
4. The UAV trajectory planning method based on the improved firefly algorithm according to claim 1, characterized in that, In S2, the constraints include maneuver constraints, cost constraints, loss constraints, and threat cost constraints; The expression for the kinematic constraint is specifically as follows: In the formula, For the first time to conduct drone r Turning angle during the second turn This is the maximum turning angle; The expression for the cost constraint is as follows: In the formula, L b For each flight distance of the drone, m Total number of flights This is the maximum flight distance; The expression for the loss constraint is as follows: In the formula, For the first time to conduct drone r The losses generated during the second turn. The maximum wear and tear that the drone can withstand; The expression for the threat cost constraint is as follows: In the formula, For the first j The threat intensity of each threat source The maximum total threat intensity that the drone can withstand. The number of threat sources.
5. The UAV trajectory planning method based on the improved firefly algorithm according to claim 4, characterized in that, In S2, the objective function The specific expression is as follows: In the formula, The overall cost of the threats faced by drones, This represents the total losses incurred during the drone's journey. The total cost of the drone's flight range. As the first weighting coefficient, This is the second weighting coefficient. This is the third weighting coefficient; Among them, the total cost of the drone's flight range The specific expression is: The total loss value generated during the drone's travel distance The specific expression is: Among them, the drone carried out the first r Loss during the second turn The specific expression is: In the formula, This is the penalty coefficient, and its value is greater than 1; The expression for the total threat cost faced by the drone is as follows: In the formula, For dynamic threat costs, This refers to static threat strength.
6. The UAV trajectory planning method based on the improved firefly algorithm according to claim 2, characterized in that, S3 includes the following steps: S31. Set the number of fireflies based on the threat cost points in the candidate paths of the drone, and set the light intensity absorption coefficient and maximum number of iterations for the fireflies. S32. Randomly initialize the individual firefly positions, calculate the initial brightness of the fireflies according to the fitness function, and initialize the number of iterations; S33. Based on the current number of iterations, calculate the new light intensity absorption coefficient according to the absorption coefficient adaptive adjustment method based on the chaotic strategy, and obtain the firefly position update formula according to the new light intensity absorption coefficient. S34. Calculate the new time-varying inertial weight coefficient after adaptive adjustment for the current iteration number, and obtain the new firefly position update formula based on the new time-varying inertial weight coefficient. S35. Update the firefly's position using the new firefly position update formula, and perturb the firefly's current position according to the perturbation mechanism to obtain the final firefly position. S36. Based on the final firefly location, evaluate the brightness of each firefly using a fitness function; S37. Determine whether the current iteration count is not less than the maximum iteration count; If so, proceed to S38; If not, increment the current iteration count by 1 and return to S33; S38. Output the global extreme point and the optimal individual value based on the brightness of each firefly to obtain the flight path of the UAV.
7. The UAV trajectory planning method based on the improved firefly algorithm according to claim 6, characterized in that, In S32, the fitness function is the reciprocal of the objective function; In S33, the new light intensity absorption coefficient The specific expression is: In the formula, The maximum number of iterations, Let be the chaotic variable in the current iteration, and its expression is as follows: In the formula, The chaotic variable from the previous iteration; In S34, the new firefly position update formula The specific expression is: In the formula, t This represents the current iteration number. This indicates the current location of the firefly. To maximize attraction, I t This represents the relative light intensity of the fireflies at present. For the first j The position of the firefly corresponding to each threat source at the current iteration number. This is the step size perturbation factor, whose value is within the interval [0,1]. The value is a random perturbation, taking values within the range of [-0.5, 0.5] and uniformly distributed or The standard normal distribution of (0,1) is present. New time-varying inertia weighting coefficients The specific expression is: In the formula, The maximum weight value, The minimum weight value, t This represents the current iteration number; In step S35, the final firefly location is obtained. The specific expression is: In the formula, For random sine function values, The parameters of the perturbation mechanism are expressed as follows: In the formula, N The number of threat cost points, This is the fitness function.