Wolf swarm algorithm-based path planning method for sudden obstacle of unmanned aerial vehicle
By constructing a situational field that includes the starting positions of the alpha wolf and competing wolves during disturbances in the UAV path planning, and alternately performing wolf pack behavior simulations and correcting parameters, the problem of single and disordered information in UAV sudden obstacle path planning is solved, and UAV flight paths adapted to obstacle scenarios are generated.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 镇平县消防救援大队
- Filing Date
- 2026-04-03
- Publication Date
- 2026-06-30
AI Technical Summary
The initial situation field in the current UAV sudden obstacle path planning does not include the starting position of the competing wolf disturbance, the behavior simulation process is disordered and cannot be dynamically updated, resulting in the path planning results failing to meet the flight execution requirements.
An initial situation field for the wolf pack is established, including the starting point of the alpha wolf, the location of the prey, and the starting position after the disturbance by the competing wolves. The alpha wolf's probing movement, the competing wolves' follow-up movement, and the wolf pack's encirclement and contraction behaviors are executed alternately. Key turning points are recorded, and smoothness and obstacle avoidance strength are calculated. Based on the comparison results, the movement parameters and encirclement parameters are corrected to generate the final UAV flight path.
It improves the spatial information integrity of path planning and the orderliness of behavior simulation, optimizes the path generation process, and generates stable and well-structured path sequences that meet the requirements of UAV flight.
Smart Images

Figure CN122306076A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of UAV path planning and optimization technology, and in particular to a UAV path planning method for sudden obstacles based on the wolf pack algorithm. Background Technology
[0002] Existing UAV path planning for sudden obstacles often employs wolf pack algorithms. However, when applied to this scenario, conventional wolf pack algorithms only establish the basic spatial relationship between the alpha wolf's starting point and the prey's position in the initial situation field, failing to incorporate the starting position information after disturbances by competing wolves. Furthermore, they cannot dynamically update the situation field for sudden obstacle scenarios. The wolf pack behavior simulation process lacks a fixed execution sequence; the alpha wolf's probing movements, the competing wolves' follow-up movements, and the pack's encirclement and contraction behaviors are not executed alternately according to a fixed pattern, and the behavior simulation process lacks standardized constraints. Existing technical solutions only generate trajectories through a single wolf pack behavior simulation. After integrating trajectory points to form a preliminary polygonal path, they do not measure the path's smoothness or obstacle avoidance intensity, nor do they compare the measurement results with preset thresholds. Therefore, they cannot adjust the movement and encirclement parameters in the wolf pack behavior simulation based on the comparison results.
[0003] Existing technologies suffer from drawbacks such as limited initial situation field construction information, disordered behavior simulation processes, and lack of dynamic parameter correction. These shortcomings easily lead to disordered extraction of key turning points in the planned path, and the path smoothness and obstacle avoidance performance fail to meet the requirements of UAV flight execution, making it difficult to adapt to dynamically changing path planning needs in scenarios with sudden obstacles. This invention aims to solve the problems of existing wolf pack algorithms, such as the initial situation field not including the starting position of competing wolf disturbances and the inability to update it dynamically. It also addresses the issues of wolf pack behavior lacking fixed alternating execution logic, the inability to correct algorithm parameters based on both smoothness and obstacle avoidance strength, and the difficulty in generating directly executable UAV flight path sequences. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a path planning method for unmanned aerial vehicles (UAVs) facing sudden obstacles based on the wolf pack algorithm.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a UAV sudden obstacle path planning method based on wolf pack algorithm, comprising: Establish and update the initial situation field of the wolf pack, which includes the starting point of the alpha wolf, the location of the prey, and the starting position after disturbance by competing wolves; In the initial situation field of the wolf pack, a wolf pack behavior simulation process is run, in which the wolf pack behavior simulation process alternately executes the alpha wolf's probing movement, the competing wolves' following movement, and the wolf pack's encirclement and contraction behavior. In each behavioral simulation, record the key turning points in the alpha wolf's movement trajectory; Integrate all key turning points to generate a preliminary polyline path, and calculate the smoothness metric and obstacle avoidance strength metric of the preliminary polyline path; The smoothness metric is compared with a preset smoothness threshold, and the obstacle avoidance strength metric is compared with a preset strength threshold. Based on the comparison results, the movement parameters and encirclement parameters in the wolf pack behavior simulation are corrected. Using the corrected movement and encirclement parameters, the wolf pack behavior simulation process was rerun to generate a new alpha wolf movement trajectory; Extract continuous coordinate points from the new alpha wolf's movement trajectory to form the final executable drone flight path sequence.
[0006] As a further aspect of the present invention, establishing and updating an initial wolf pack situation field that includes the alpha wolf's starting point, the prey's location, and the starting position after disturbance by competing wolves includes: Establish a spatial coordinate mapping between drones, targets, and sudden obstacles. The drone coordinates correspond to the starting point of the alpha wolf, the target coordinates correspond to the prey's position, and the coordinates of each sudden obstacle are associated with the spawn point of a competing wolf. The sensor network continuously captures the instantaneous coordinate changes of each obstacle, and calculates the activity parameters of each obstacle based on the rate of change. The activity parameters are used to perturb the spawn point of each competing wolf, thus forming the perturbed starting position of each competing wolf. The initial situation field of the wolf pack is constructed based on the location of the prey, the starting point of the alpha wolf, and the starting positions of each competing wolf after disturbance.
[0007] As a further aspect of the present invention, the calculation of the activity parameters of each obstacle based on the rate of change specifically includes: Obtain the position sequence of each sudden obstacle over multiple consecutive sampling periods; Calculate the displacement between adjacent positions in the position sequence; The average displacement rate of the sudden obstacle is obtained by averaging all displacements. The average displacement rate of each obstacle is divided by the maximum value among all the average displacement rates of obstacles, and then normalized. Multiplying the normalized result by a basic activity coefficient, the resulting product is the activity parameter of the sudden obstacle.
[0008] As a further aspect of the present invention, the construction of the initial state field of the wolf pack includes: The initial situation field of the wolf pack includes a distance factor and a direction factor; Calculate the straight-line distance from the alpha wolf's starting point to the prey's location, and use this distance as the global distance benchmark; Calculate the straight-line distance from the starting point to the prey's position after the disturbance of each competing wolf, and use it as the individual distance benchmark; Calculate the direction vector from the alpha wolf's starting point to the prey's location, and use it as the global guiding direction; Calculate the direction vector from the starting point of each competing wolf to the starting point of the alpha wolf after the perturbation, and use it as the individual subordination guide; The distance factor is obtained by weighting the global trend direction using the reciprocal of the global distance benchmark. Using the reciprocal of the individual distance benchmark for each competing wolf as the weight, the corresponding individual affiliation orientation is weighted, and the sum is used to obtain the direction factor; The distance factor and the direction factor are vector-superimposed, and the direction and magnitude of the composite vector define the main orientation and intensity of the initial situation field of the wolf pack.
[0009] As a further aspect of the present invention, the wolf pack behavior simulation process, wherein the wolf pack behavior simulation process alternately executes the alpha wolf's probing movement, the competing wolves' following movement, and the wolf pack's encirclement and contraction behavior, includes: At the start of each simulation, the alpha wolf calculates a trial movement vector based on the main guidance of the initial state field of the wolf pack and the trial step size in the current movement parameters. Add the alpha wolf's current position to the probe movement vector to obtain the alpha wolf's position after the probe, and record the position after the probe as a key turning point; Each competing wolf calculates its own follow-up movement vector based on the vector difference between its starting point after the disturbance and the position after the alpha wolf's probing, combined with the follow-up step length in the current movement parameters; Each competing wolf adds its perturbed starting point to its respective follow-up movement vector to update its perturbed starting point; After completing a predetermined number of probing and follow-up attempts, the wolf pack initiates its encirclement and contraction behavior, calculating the geometric center point of the prey's location and the starting point after all competing wolves have updated and perturbed. Based on the relative orientation between the geometric center point and the prey's position, and the shrinkage step size in the current encirclement parameters, calculate an encirclement adjustment vector; The starting point of all competing wolves after disturbance is superimposed with the encirclement adjustment vector to achieve the shrinkage adjustment of the wolf pack's position.
[0010] As a further aspect of the present invention, calculating the smoothness metric and obstacle avoidance strength metric of the preliminary polyline path includes: Connect all consecutive key turning points on the initial polyline path to form a set of path segments; Calculate the average angle between all adjacent line segments in the set of path segments; Calculate the standard deviation of the angle between all adjacent line segments, and use the weighted sum of the mean and standard deviation as the smoothness measure; For each critical turning point on the initial polyline path, calculate its Euclidean distance to the coordinates of all sudden obstacles, and take the minimum distance as the nearest obstacle distance of the critical turning point; Calculate the reciprocal of the nearest obstacle distance for all critical turning points on the path, then calculate the average value, and use the average value as the obstacle avoidance strength measure.
[0011] As a further aspect of the present invention, the step of correcting the movement parameters and encirclement parameters in the wolf pack behavior simulation based on the comparison results includes: When the smoothness metric is greater than the preset smoothness threshold, reduce the trial step size and follow-up step size in the movement parameters. When the obstacle avoidance strength metric is less than the preset strength threshold, increase the shrinkage step size in the encirclement parameters; The correction process is performed iteratively. After each correction, the smoothness metric and obstacle avoidance intensity metric are recalculated until the smoothness metric is no greater than the preset smoothness threshold and the obstacle avoidance intensity metric is no less than the preset intensity threshold. The trial step size, follow-up step size and contraction step size at this time are recorded as the corrected movement parameters and encirclement parameters.
[0012] As a further aspect of the present invention, the step of re-running the wolf pack behavior simulation process using the modified movement parameters and encirclement parameters to generate a new alpha wolf movement trajectory includes: Remap the drone coordinates to the alpha wolf's starting point, while maintaining the mapping between the target coordinates and the prey's position. Using the revised movement and encirclement parameters, replace the original parameters and initialize a new round of wolf pack behavior simulation; In the new round of wolf pack behavior simulation, based on the updated probing step length, following step length, and retreating step length, the alpha wolf's probing movement, the competing wolves' following movement, and the wolf pack's encirclement and retreating behavior are executed. Record the position of the alpha wolf after each tentative move in this round of simulation, forming an ordered sequence of alpha wolf positions; The ordered sequence of alpha wolf positions constitutes the new alpha wolf movement trajectory.
[0013] As a further aspect of the present invention, the step of extracting continuous coordinate points from the new alpha wolf's movement trajectory to form a final executable drone flight path sequence includes: Obtain the ordered sequence of alpha wolf positions in the new alpha wolf movement trajectory; Insert the current coordinates of the UAV at the starting point of the ordered alpha wolf position sequence; Insert the target coordinates at the end of the ordered alpha wolf position sequence; Interpolation is performed on the complete position sequence after inserting the starting coordinates and target coordinates to ensure that the distance between adjacent points meets the flight resolution requirements of the UAV. The dense coordinate point sequence obtained after interpolation is output as the final executable UAV flight path sequence.
[0014] As a further aspect of the present invention, after the interpolation processing step, a path feasibility check is also performed, including: Iterate through each path segment in the drone's flight path sequence; For each path segment, calculate its straight line equation and calculate the perpendicular distance from the coordinates of all sudden obstacles to the straight line represented by the straight line equation. If the vertical distance from the coordinates of a sudden obstacle to the path segment is less than the preset safety radius, and the projection point of the obstacle's coordinates on the path segment is located between the two endpoints of the path segment, then the path segment is determined to have a collision risk. For path segments with collision risk, one or more new path points are inserted between their two endpoints. The position of the new path point is obtained by shifting the original path point away from the coordinates of the obstacle by a preset safety margin. The UAV flight path sequence is updated using the coordinate point sequence after inserting the new path point.
[0015] Compared with the prior art, the advantages and positive effects of the present invention are as follows: Establishing and updating the initial situation field of the wolf pack, which includes the starting point of the alpha wolf, the location of the prey, and the starting position after disturbance by competing wolves, can expand the spatial information composition of the initial situation field, improve the initial environmental foundation of the wolf pack algorithm's path planning, and enable the algorithm to have more complete spatial reference conditions when starting behavior simulation. This reduces the search bias caused by insufficient information dimensions in the initial situation field, and allows the initial behavior of the wolf pack algorithm to match the spatial constraints of the drone's sudden obstacle scenario, providing a more realistic initial environmental support for subsequent wolf pack behavior simulation.
[0016] Alternating the alpha wolf's probing movements, the competing wolves' following movements, and the pack's encirclement and contraction behaviors in the initial wolf pack situation field can standardize the execution process of wolf pack behavior simulation, stabilize the generation process of the alpha wolf's movement trajectory, improve the orderliness of key turning point extraction, and make the initial polygonal path obtained by integrating key turning points have a more regular shape. Comparing the smoothness metric with a preset smoothness threshold and the obstacle avoidance strength metric with a preset strength threshold can achieve the correlation and matching between path indicators and algorithm parameters. Based on the comparison results, the movement parameters and encirclement parameters in the wolf pack behavior simulation can be corrected, which can optimize the execution conditions of the algorithm simulation. Rerunning the wolf pack behavior simulation can generate an alpha wolf movement trajectory adapted to obstacle constraints. Extracting continuous coordinate points in the new trajectory can form a stable and qualified UAV flight path sequence, so that the path planning results directly meet the flight execution requirements of UAVs in sudden obstacle scenarios, and improve the adaptability of the path planning output results to the actual flight control of UAVs. Attached Figure Description
[0017] Figure 1 The flowchart shows the UAV sudden obstacle path planning method based on wolf pack algorithm described in this invention. Figure 2 A flowchart for establishing and updating the initial situation field of the wolf pack; Figure 3 A flowchart for constructing the initial state field of the wolf pack; Figure 4 A diagram illustrating the parameter iterative convergence process of the wolf pack algorithm for UAV path planning; Figure 5 Iterative trend diagram of drone path planning smoothness and obstacle avoidance intensity. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0019] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and 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, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0020] See Figure 1This invention provides a method for unmanned aerial vehicle (UAV) obstacle avoidance path planning based on a wolf pack algorithm. The method includes: establishing and updating an initial wolf pack situation field containing the alpha wolf's starting point, the prey's position, and the starting position of competing wolves after disturbance. Within this initial situation field, a wolf pack behavior simulation process is run, alternately executing the alpha wolf's probing movement, the competing wolves' following movement, and the wolf pack's encirclement and contraction behavior. In each behavior simulation, key turning points in the alpha wolf's movement trajectory are recorded. All recorded key turning points are integrated to generate a preliminary polygonal path, and the smoothness and obstacle avoidance strength metrics of this preliminary polygonal path are calculated. The calculated smoothness metrics are compared with a preset smoothness threshold, and the obstacle avoidance strength metrics are compared with a preset strength threshold. Based on the comparison results, the movement parameters and encirclement parameters used in the wolf pack behavior simulation are corrected. Using the corrected movement parameters and encirclement parameters, the wolf pack behavior simulation process is re-initialized and run to generate a new alpha wolf movement trajectory. Finally, continuous coordinate points in the new alpha wolf movement trajectory are extracted to form a final executable UAV flight path sequence.
[0021] In one embodiment of the present invention, see [reference] Figure 2 A spatial coordinate mapping is established between the drone, the predetermined target, and sudden obstacles. The drone coordinates are mapped to the alpha wolf's starting point, the target coordinates to the prey's position, and the coordinates of each sudden obstacle are associated with the spawn point of a competing wolf. A deployed sensor network continuously captures the instantaneous coordinate changes of each sudden obstacle. Based on the rate of change, the activity parameters of each obstacle are calculated. Specifically, the position sequence of each sudden obstacle over multiple consecutive sampling periods is obtained, the displacement between adjacent positions in the sequence is calculated, and the average displacement rate of the obstacle is obtained. The average displacement rate of each obstacle is then normalized by dividing it by the maximum value among all obstacle average displacement rates. The normalized result is then multiplied by a preset base activity coefficient; the product is the activity parameter of the sudden obstacle. The calculated activity parameters are used to perturb the spawn point of each competing wolf, forming the perturbed starting position of each wolf. Based on the prey position, the alpha wolf's starting point, and the perturbed starting positions of each competing wolf, an initial wolf pack situation field is constructed.
[0022] In practice, a spatial coordinate mapping is established between the drone, the predetermined target, and the sudden obstacle. The drone coordinates correspond to the starting point of the alpha wolf, the target coordinates correspond to the prey's position, and the coordinates of each sudden obstacle are associated with the spawn point of a competing wolf. A deployed sensor network continuously captures the instantaneous coordinate changes of each sudden obstacle. Based on the rate of change, the activity parameters of each sudden obstacle are calculated. In practice, the position sequence of each sudden obstacle is obtained over multiple consecutive sampling periods. The displacement between adjacent positions in the position sequence is calculated, and the average displacement rate of the sudden obstacle is obtained by averaging all displacements. The average displacement rate of each sudden obstacle is then normalized by dividing it by the maximum value among all average displacement rates. The normalized result is then multiplied by a preset base activity coefficient. The product is the activity parameter of the sudden obstacle. The activity parameter can be understood as being calculated using the following formula: in: Indicates the first The activity parameters of a sudden obstacle Indicates the first The average displacement rate of a sudden obstacle Indicates all The maximum value among the average displacement velocities of a sudden obstacle. This represents the preset basic activity coefficient. In specific implementations, the calculated activity parameter is used to perturb the spawning point of each competing wolf, forming the perturbed starting position of each competing wolf. In some embodiments, the perturbation is achieved by multiplying the activity parameter by a random offset vector and then superimposing it onto the spawning point coordinates of the competing wolves. Optionally, the magnitude of the random offset vector is adjusted by the activity parameter so that a higher activity parameter corresponds to a larger perturbation range. Based on the prey position, the alpha wolf's starting point, and the perturbed starting positions of each competing wolf, an initial wolf pack situation field is constructed. In some embodiments, the construction process involves calculating distance and direction factors to synthesize the situation field vector. It can be understood that the initial wolf pack situation field provides a spatial guidance basis for subsequent behavioral simulation.
[0023] In one embodiment of the invention, constructing the initial situation field of the wolf pack includes calculating the distance factor and the direction factor. See also... Figure 3The following steps are performed: First, calculate the straight-line distance from the alpha wolf's starting point to the prey's position, using this distance as the global distance benchmark. Second, calculate the straight-line distance from each competing wolf's starting point to the prey's position after perturbation, using this distance as the individual distance benchmark. Third, calculate the direction vector from the alpha wolf's starting point to the prey's position, using this direction vector as the global tendency orientation. Fourth, calculate the direction vector from each competing wolf's starting point to the alpha wolf's starting point after perturbation, using this direction vector as the individual subordination orientation. The global tendency orientation is weighted using the reciprocal of the global distance benchmark to obtain the distance factor. The corresponding individual subordination orientation is weighted using the reciprocal of each competing wolf's individual distance benchmark, and the weighted results for all competing wolves are summed to obtain the direction factor. Finally, the distance factor and the direction factor are vector-superimposed; the direction of the composite vector defines the dominant direction of the wolf pack's initial situational field, and its magnitude defines the strength of this situational field.
[0024] In practical implementation, constructing the initial situational field of the wolf pack involves calculating distance and direction factors. In a specific example scenario, a three-dimensional spatial coordinate system is set up, with the alpha wolf's starting point coordinates as (0,0,0) and the prey's position coordinates as (100,50,20). The starting position coordinates of the two competing wolves after disturbance are (10,15,5) and (20,-5,10), respectively. The straight-line distance from the alpha wolf's starting point to the prey's position is calculated as the global distance benchmark, which is approximately 113.58 units. The straight-line distance from the starting point to the prey's position of each competing wolf after disturbance is calculated as the individual distance benchmark. For the first competing wolf, the individual distance benchmark is approximately 96.47 units, and for the second competing wolf, it is approximately 94.34 units. The direction vector from the alpha wolf's starting point to the prey's position is calculated as the global directional vector, which is (100,50,20). The direction vector from the starting point of each competing wolf to the starting point of the alpha wolf after perturbation is calculated as the individual subordination direction. For the first competing wolf, the individual subordination direction is (-10, -15, -5), and for the second competing wolf, it is (-20, 5, -10). Using the reciprocal of the global distance benchmark as weight, the global tendency direction is weighted to obtain a distance factor, which is approximately (0.88, 0.44, 0.18). Using the reciprocal of the individual distance benchmark for each competing wolf as weight, the corresponding individual subordination direction is weighted. For the first competing wolf, the weighted result is approximately (-0.10, -0.16, -0.05), and for the second competing wolf, it is approximately (-0.21, 0.05, -0.11). Summing these results yields a direction factor of approximately (-0.31, -0.11, -0.16). It can be understood that the synthesis of the distance factor and the direction factor is achieved through vector superposition. In some embodiments, the calculation of the synthesized vector is expressed as follows: in: Represents the composite vector. The reciprocal of the global distance reference is... , Indicates the overall trend direction. This represents the total number of competing wolves. Indicates the first The reciprocal of the distance between each competing wolf individual and the baseline is... , Indicates the first The individual wolf pack exhibits a subordinate orientation. The direction of the composite vector defines the dominant direction of the initial situational field of the wolf pack, and the magnitude of the composite vector defines the intensity of the initial situational field. In specific implementations, the dominant direction is characterized by the direction angle of the composite vector, and the intensity value is the magnitude of the composite vector. Optionally, additional adjustment coefficients can be introduced to the distance factor or direction factor to balance their influence. In some embodiments, the adjustment coefficients are set according to the environmental complexity.
[0025] In one embodiment of the invention, at the start of each simulation round, the alpha wolf calculates a trial movement vector based on the dominant direction of the initial wolf pack situation field and the trial step size in the current movement parameters. The alpha wolf's current position is added to this trial movement vector to obtain its post-trial position, which is recorded as a key turning point. Each competing wolf calculates its own follow-up movement vector based on the vector difference between its own post-disturbance starting point and the alpha wolf's post-trial position, combined with the follow-up step size in the current movement parameters. Each competing wolf updates its post-disturbance starting point by adding its own post-disturbance starting point to its own follow-up movement vector. After completing a predetermined number of trial and follow-up movements, the wolf pack initiates a closing-in contraction behavior, calculating the geometric center point between the prey's position and the updated post-disturbance starting points of all competing wolves. Based on the relative orientation between this geometric center point and the prey's position, and the contraction step size in the current closing-in parameters, a closing-in adjustment vector is calculated. This closing-in adjustment vector is superimposed on the post-disturbance starting points of all competing wolves, achieving a contraction adjustment of the wolf pack's position. After generating the initial polyline path, its smoothness and obstacle avoidance strength metrics are calculated. Specifically, all consecutive critical turning points on the initial polyline path are connected to form a set of path segments. The average angle between all adjacent segments in this set is calculated, along with the standard deviation. The weighted sum of this average and standard deviation is used as the smoothness metric. For each critical turning point on the initial polyline path, its Euclidean distance to the coordinates of all sudden obstacles is calculated. The minimum distance is taken as the nearest obstacle distance for that critical turning point. The reciprocals of the nearest obstacle distances for all critical turning points on the path are calculated, and the average of these reciprocals is used as the obstacle avoidance strength metric.
[0026] In practice, a wolf pack behavior simulation process is run, which alternately executes the alpha wolf's probing movement, the competing wolves' following movement, and the pack's encirclement and contraction behavior. In a specific example scenario, the dominant direction of the initial wolf pack situation field is set to (0.8, 0.5, 0.2), the alpha wolf's current position coordinates are (10, 10, 5), the probing step size in the current movement parameters is set to 5 units, the following step size in the current movement parameters is set to 3 units, the number of competing wolves is 2, and their initial position coordinates after perturbation are (15, 5, 7) and (5, 12, 6) respectively, the prey's position coordinates are (100, 60, 30), and the contraction step size in the current encirclement parameters is set to 2 units. At the start of each simulation, the alpha wolf calculates the trial movement vector as (4.0, 2.5, 1.0) based on the dominant direction of the initial situation field of the wolf pack (0.8, 0.5, 0.2) and the trial step size of 5. The alpha wolf's current position (10, 10, 5) is added to this trial movement vector to obtain the alpha wolf's position after the trial (14.0, 12.5, 6.0), and the position after the trial is recorded as a key turning point. Each competing wolf calculates its following movement vector based on the vector difference between its perturbation starting point and the alpha wolf's probed position (14.0, 12.5, 6.0), combined with a follow-up step length of 3. For the first competing wolf, the vector difference between its perturbation starting point (15, 5, 7) and the alpha wolf's probed position is (-1.0, 7.5, -1.0), which, after normalization and multiplied by the follow-up step length, yields a following movement vector of approximately (-0.4, 2.9, -0.4). For the second competing wolf, the vector difference between its perturbation starting point (5, 12, 6) and the alpha wolf's probed position is (9.0, 0.5, 0), and its following movement vector is approximately (2.9, 0.2, 0). Each competing wolf adds its perturbed starting point to its respective follow-up movement vector, updating its perturbed starting point. The updated positions of the first competing wolf are approximately (14.6, 7.9, 6.6), and the positions of the second competing wolf are approximately (7.9, 12.2, 6.0). After completing a predetermined number of probing and follow-up movements, the wolf pack initiates a closing-in behavior, calculating the geometric center point between the prey's position (100, 60, 30) and the updated perturbed starting points of all competing wolves. The coordinates of the geometric center point are approximately (11.25, 10.05, 6.3). Based on the relative orientation between the geometric center point (11.25, 10.05, 6.3) and the prey position (100, 60, 30), and the contraction step size of 2, a closing adjustment vector is calculated. The relative orientation vector is (88.75, 49.95, 23.7). After normalization, multiplying by the contraction step size gives the closing adjustment vector as approximately (1.6, 0.9, 0.4).After the disturbance of all competing wolves, the starting point of the encirclement adjustment vector (1.6,0.9,0.4) is superimposed to achieve the shrinkage adjustment of the wolf pack position. After the adjustment, the position of the first competing wolf becomes (16.2,8.8,7.0) and the position of the second competing wolf becomes (9.5,13.1,6.4).
[0027] After generating the initial polyline path, the smoothness metric and obstacle avoidance strength metric of the initial polyline path are calculated. In specific implementations, the initial polyline path is composed of a series of recorded key turning points. It can be understood that the calculation of the smoothness metric involves the statistical analysis of the angles between adjacent segments in the path segment set. In some embodiments, an initial polyline path containing four key turning points is defined, with the coordinate sequence A(0,0,0), B(20,10,5), C(35,5,8), and D(50,15,10). All consecutive key turning points on the initial polyline path are connected to form a path segment set, including segments AB, BC, and CD. The average angle between all adjacent segments in the path segment set is calculated, and the standard deviation of the angles between all adjacent segments is also calculated. It can be understood that the formula for calculating the smoothness metric S is: in: Represents a smoothness measure. This represents the average angle between all adjacent line segments. This represents the standard deviation of the angle between all adjacent line segments. This represents a preset weighting coefficient, with values ranging from 0 to 1. The standard deviation of the angle between all adjacent line segments is calculated, and the weighted sum of the mean and standard deviation is used as a smoothness measure. For each critical turning point on the initial polyline path, its Euclidean distance to the coordinates of all sudden obstacles is calculated, and the minimum distance is taken as the nearest obstacle distance to the critical turning point. Optionally, the coordinates of sudden obstacles can be stored in a list. The reciprocal of the nearest obstacle distances to all critical turning points on the path is taken, and then the average is calculated. This average is used as the obstacle avoidance strength measure. In a specific calculation, three sudden obstacle coordinates are set as O1(10,15,2), O2(30,0,7), and O3(40,10,12). The nearest obstacle distance to each critical turning point is calculated, and the reciprocal of the distance is taken to calculate the average, yielding the obstacle avoidance strength measure. See Table 1 for the data from one calculation.
[0028] Table 1: Calculation Table of Distance to Nearest Obstacle at Key Turning Points Based on the data in the table above, the nearest obstacle distances for all key turning points are 18.6, 11.2, 5.4, and 10.0, respectively. Taking the reciprocal of these distance values yields a sequence (0.0538, 0.0893, 0.1852, 0.1000). The average value of this sequence, 0.1071, is calculated as a measure of obstacle avoidance strength.
[0029] In one embodiment of the present invention, parameters are corrected based on the comparison results of smoothness metric and obstacle avoidance strength metric. When the smoothness metric is greater than a preset smoothness threshold, the trial step size and follow-up step size in the movement parameters are decreased; when the obstacle avoidance strength metric is less than a preset strength threshold, the contraction step size in the closure parameters is increased. The correction process is performed iteratively. After each parameter correction, the simulation is rerun and new smoothness metric and obstacle avoidance strength metric are calculated until the smoothness metric is not greater than the preset smoothness threshold and the obstacle avoidance strength metric is not less than the preset strength threshold. The iteration stops at this point, and the trial step size, follow-up step size, and contraction step size that meet the conditions are recorded as the corrected movement parameters and closure parameters. Using the revised movement and encirclement parameters, the wolf pack behavior simulation process is rerun to generate a new alpha wolf movement trajectory. Specifically, the drone coordinates are remapped to the alpha wolf's starting point, while maintaining the mapping relationship between the target coordinates and the prey's position. The revised movement and encirclement parameters replace the original parameters, initializing a new round of wolf pack behavior simulation. In this round of simulation, based on the updated probing step length, following step length, and retreat step length, the alpha wolf's probing movement, the competing wolves' following movement, and the wolf pack's encirclement and retreat behavior are executed. The position of the alpha wolf after each probing movement in this round of simulation is recorded, forming an ordered sequence of alpha wolf positions. This ordered sequence of alpha wolf positions constitutes the new alpha wolf movement trajectory.
[0030] In practical implementation, the movement and encirclement parameters in the wolf pack behavior simulation are adjusted based on the comparison results of the smoothness metric and the obstacle avoidance intensity metric. In a specific example, the initial movement parameters are set with a trial step size of 8.0 and a follow-up step size of 5.0, and the initial encirclement parameters with a contraction step size of 3.0. The preset smoothness threshold is 25.0, and the preset intensity threshold is 0.12. After the initial simulation, the smoothness metric is calculated to be 30.5, and the obstacle avoidance intensity metric is 0.09. Since the smoothness metric of 30.5 is greater than the preset smoothness threshold of 25.0, the trial and follow-up step sizes in the movement parameters are reduced according to the rules. It can be understood that the reduction of the step size is achieved by multiplying by a decay coefficient less than 1. In some embodiments, the decay coefficient is fixed at 0.8. At the same time, since the obstacle avoidance intensity metric of 0.09 is less than the preset intensity threshold of 0.12, the contraction step size in the encirclement parameters is increased according to the rules. In some embodiments, the increase of the step size is achieved by multiplying by an enhancement coefficient greater than 1, for example, the enhancement coefficient is fixed at 1.2. After the first correction, the trial step size was updated to 6.4, the follow-up step size to 4.0, and the contraction step size to 3.6. The simulation was then re-performed using the corrected parameters, and the metrics were recalculated, resulting in a new smoothness metric of 28.2 and a new obstacle avoidance strength metric of 0.10. The correction process was performed iteratively. After each correction, the smoothness and obstacle avoidance strength metrics were recalculated, and the new metrics were compared with thresholds to determine whether to continue correction. See Table 2, which illustrates a complete parameter correction iteration process.
[0031] Table 2: Parameter Correction Iteration Process Table In practical implementation, the quantitative relationship of parameter correction can be expressed by the following formula: in: This indicates the corrected parameter value. This indicates the parameter value before correction. This represents the calculated smoothness measure. Indicates the preset smoothing threshold. This represents the calculated obstacle avoidance strength metric. Indicates the preset intensity threshold. Indicates the parameter attenuation coefficient (0 < <1), Indicates the parameter enhancement coefficient ( >1). Optional, attenuation coefficient With enhancement coefficient Different values can be set according to different parameter categories. For example, different adjustment coefficients can be used for movement parameters and encirclement parameters. The iterative process continues until the smoothness metric is not greater than the preset smoothness threshold and the obstacle avoidance intensity metric is not less than the preset intensity threshold. As shown in Table 1, after the fourth iteration, the smoothness metric 24.7 is not greater than the preset smoothness threshold 25.0, and the obstacle avoidance intensity metric 0.13 is not less than the preset intensity threshold 0.12. The iteration conditions are met, and the correction process terminates. It can be understood that the trial step size 4.1, the follow-up step size 2.6, and the contraction step size 5.2 at this time are the corrected movement parameters and encirclement parameters.
[0032] Using the corrected movement and encirclement parameters, the wolf pack behavior simulation process is rerun to generate a new alpha wolf movement trajectory. In the specific implementation, the drone coordinates (0,0,0) are remapped to the alpha wolf's starting point, while the mapping between the target coordinates (100,50,20) and the prey's position remains unchanged. The original parameters are replaced with the corrected probing step size of 4.1, following step size of 2.6, and contraction step size of 5.2 to initialize a new round of wolf pack behavior simulation. In the latest round of wolf pack behavior simulation, based on the updated probing step size of 4.1, following step size of 2.6, and retreating step size of 5.2, the alpha wolf's probing movement, the competing wolves' following movement, and the pack's encirclement and retreating behaviors are executed. The position of the alpha wolf after each probing movement is recorded in this round of simulation, forming an ordered sequence of alpha wolf positions. For example, in one simulation run, the recorded sequence of alpha wolf positions may include coordinates (4.1, 2.6, 1.0), (8.0, 4.9, 1.9), (11.8, 7.3, 2.8), etc. This ordered sequence of alpha wolf positions constitutes the new alpha wolf movement trajectory. In some embodiments, the number of simulation rounds and steps are preset fixed values; optionally, the number of simulation rounds can be dynamically adjusted according to path complexity.
[0033] See Figure 4 This is a graph illustrating the parameter iteration and convergence process of the wolfpack algorithm for UAV path planning, visually demonstrating the dynamic changes of three key parameters during the iterative optimization process. When the path smoothness metric exceeds a preset threshold, the trial step size is reduced and the follow-up step size is increased to decrease large-angle turns of the UAV and improve path smoothness. When the obstacle avoidance strength metric is below a preset threshold, the shrinking step size is increased to strengthen the wolfpack's ability to surround and avoid obstacles, improving flight safety. Through multiple iterations, the algorithm finds the optimal balance between "path smoothness" and "obstacle avoidance safety," ultimately achieving parameter convergence and generating a flight path that meets the requirements. This visually demonstrates the effectiveness of the parameter iteration correction mechanism; the three parameters converge as expected, verifying the algorithm's adaptability. After the fourth iteration, both metrics meet the threshold requirements, the parameters are no longer adjusted, and the algorithm completes optimization.
[0034] In one embodiment of the present invention, continuous coordinate points are extracted from the new alpha wolf movement trajectory to form the final path. Specifically, an ordered sequence of alpha wolf positions is obtained from the new alpha wolf movement trajectory. The current coordinates of the UAV are inserted at the starting point of this ordered sequence, and the target coordinates are inserted at its ending point. Interpolation is performed on the complete position sequence after inserting the starting and target coordinates to ensure that the distance between adjacent coordinate points meets the UAV's flight resolution requirements. After the interpolation step, a path feasibility check is performed. Each path segment in the UAV flight path sequence is traversed. For each path segment, its straight line equation is calculated, and the perpendicular distance from the coordinates of all sudden obstacles to the straight line represented by the equation is calculated. If the perpendicular distance from the coordinates of a sudden obstacle to the current path segment is less than a preset safety radius, and the projection point of the obstacle coordinate on the path segment is located between the two endpoints of the path segment, then the path segment is determined to have a collision risk. For path segments with a collision risk, one or more new path points are inserted between their two endpoints. The position of the new path points is obtained by offsetting the original path points away from the obstacle coordinates by a preset safety margin. Finally, the UAV flight path sequence is updated using the coordinate point sequence after inserting the new path points. The dense coordinate point sequence obtained after interpolation and verification is output as the final executable UAV flight path sequence.
[0035] In practice, continuous coordinate points are extracted from the new alpha wolf movement trajectory to form the final executable UAV flight path sequence. Specific operations include obtaining an ordered sequence of alpha wolf positions from the new alpha wolf movement trajectory. For example, the ordered sequence of alpha wolf positions obtained after one simulation run includes coordinate points P1(10.0,12.0,2.0), P2(25.5,20.3,5.1), P3(41.2,28.9,8.7), P4(60.1,35.4,12.5), and P5(80.5,45.6,18.2). The current coordinates of the UAV are inserted at the starting point of the ordered alpha wolf position sequence, and the current coordinates of the UAV are set as S(0,0,0). The target coordinates are inserted at the ending point of the ordered alpha wolf position sequence, and the target coordinates are set as T(100,50,20). After inserting the starting and target coordinates, the complete sequence of positions to be processed becomes S(0,0,0), P1(10.0,12.0,2.0), P2(25.5,20.3,5.1), P3(41.2,28.9,8.7), P4(60.1,35.4,12.5), P5(80.5,45.6,18.2), T(100,50,0). Interpolation is then performed on the complete position sequence after inserting the starting and target coordinates. In some embodiments, the purpose of interpolation is to ensure that the distance between adjacent path points meets the UAV's flight resolution requirements, which are set to a maximum distance of no more than 5 units between adjacent points. Starting from the starting coordinate S, the Euclidean distance between any two adjacent points in the sequence is checked sequentially. If the distance is greater than the flight resolution requirement, a new coordinate point is inserted between these two points. The coordinates of the newly inserted point are calculated using linear interpolation, with the specific formula as follows: in: This represents the new coordinate point to be inserted. Indicates the coordinates of the starting point of the line segment. Indicates the coordinates of the endpoint of the line segment. This represents the insertion ratio, with a value between 0 and 1. For example, the distance from the starting point S(0,0,0) to P1(10.0,12.0,2.0) is approximately 15.62 units, which is greater than the flight resolution of 5.0, therefore a new point needs to be inserted. The line segment S-P1 is divided into several segments, such that the length of each segment is close but does not exceed 5.0 units. The insertion ratio k is set to 0.32, and the coordinates of the first insertion point are calculated to be (3.2,3.84,0.64). This process is repeated until the spacing between all adjacent points in the sequence meets the requirements, ultimately generating a dense sequence of coordinate points. After the interpolation step, a path feasibility check is performed. In practice, the path feasibility check traverses every path segment in the UAV flight path sequence. For each path segment, its straight-line equation is calculated, and the perpendicular distance from the coordinates of all sudden obstacles to the line represented by this equation is calculated. Three sudden obstacle coordinates are set: O1(15,5,3), O2(40,25,10), and O3(70,40,15), with a preset safety radius of 3.0 units. Taking a path segment as an example, its endpoint coordinates are A(20.1,15.3,4.2) and B(23.8,17.9,5.5), and the straight-line equation of this path segment is calculated. The perpendicular distance from obstacle O1(15,5,3) to line AB is calculated, and through spatial geometry, the distance is approximately 10.5 units, which is greater than the safety radius of 3.0. The coordinates of the projection point of obstacle O1 on path segment AB are (16.2,8.1,3.5), which is determined to be located between endpoints A and B. Since the perpendicular distance from obstacle O1 to line AB is greater than the safety radius, no collision risk is considered. Optionally, the vertical distance and projection point can be calculated using vector operations. Continuing with the calculation, the vertical distance from obstacle O2 (40,25,10) to line AB is approximately 16.3 units, which is greater than the safety radius. The vertical distance from obstacle O3 (70,40,15) to line AB is approximately 46.1 units, which is also greater than the safety radius. Therefore, there is no collision risk for this example path segment AB.
[0036] If the vertical distance from the coordinates of a sudden obstacle to the current path segment is less than the preset safety radius, and the projection point of the obstacle's coordinates on the current path segment is located between the two endpoints of the path segment, then the current path segment is determined to have a collision risk. In another example, the endpoint coordinates of path segment CD are C(50.2,30.1,11.0) and D(52.0,32.5,11.8). The vertical distance from the sudden obstacle O2 (40,25,10) to line CD is calculated to be 2.1 units, which is less than the preset safety radius of 3.0 units. The projection point coordinates of obstacle O2 on path segment CD are calculated to be (48.8,28.9,10.7), which is located between endpoints C and D. Therefore, path segment CD is determined to have a collision risk. For path segments with a collision risk, one or more new path points are inserted between their two endpoints. The position of the new path point is obtained by offsetting the original path point away from the obstacle coordinates by a preset safety margin, which is set to 2.0 units. Calculate the vector pointing from obstacle O2 to path point C, normalize it, and multiply it by a safety margin of 2.0 to obtain the offset vector (1.2, 0.8, 0.2). Add this offset vector to the coordinates of path point C (50.2, 30.1, 11.0) to obtain the new path point C' (51.4, 30.9, 11.2). Similarly, calculate the vector pointing from obstacle O2 to path point D, process it, and obtain the new path point D' (53.1, 33.2, 12.0). In some embodiments, the offset direction can also be the normal to the line connecting the path point and the obstacle. Use the coordinate sequence after inserting the new path points C' and D' to update the UAV flight path sequence, that is, replace the path segment CD in the original sequence with the path segment C-C'-D'-D. After completing the traversal and risk correction of all path segments, output the final dense coordinate sequence after interpolation and verification as the final executable UAV flight path sequence.
[0037] See Figure 5 This is an iterative trend chart of the smoothness of UAV path planning and obstacle avoidance strength, intuitively demonstrating the dynamic changes of these two key performance indicators during algorithm iteration. In iterations 1-5, both indicators fluctuate drastically, repeatedly failing to meet threshold requirements, indicating unreasonable initial algorithm parameters and poor path smoothness and insufficient obstacle avoidance. In iterations 5-15, the fluctuation range gradually narrows, as the algorithm dynamically adjusts the trial step size, follow-up step size, and shrinks the step size to gradually balance path smoothness and obstacle avoidance safety. In iterations 15-20, both indicators stabilize within the threshold requirements, parameters converge, the algorithm completes optimization, and generates a final path that meets the requirements. This intuitively demonstrates the wolf pack algorithm's ability to dynamically balance "path smoothness" and "obstacle avoidance safety," verifying the effectiveness of the parameter correction iteration mechanism.
[0038] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for unmanned aerial vehicle (UAV) path planning for sudden obstacles based on wolf pack algorithm, characterized in that, include: Establish and update the initial situation field of the wolf pack, which includes the starting point of the alpha wolf, the location of the prey, and the starting position after disturbance by competing wolves; In the initial situation field of the wolf pack, a wolf pack behavior simulation process is run, in which the wolf pack behavior simulation process alternately executes the alpha wolf's probing movement, the competing wolves' following movement, and the wolf pack's encirclement and contraction behavior. In each behavioral simulation, record the key turning points in the alpha wolf's movement trajectory; Integrate all key turning points to generate a preliminary polyline path, and calculate the smoothness metric and obstacle avoidance strength metric of the preliminary polyline path; The smoothness metric is compared with a preset smoothness threshold, and the obstacle avoidance strength metric is compared with a preset strength threshold. Based on the comparison results, the movement parameters and encirclement parameters in the wolf pack behavior simulation are corrected. Using the corrected movement and encirclement parameters, the wolf pack behavior simulation process was rerun to generate a new alpha wolf movement trajectory; Extract continuous coordinate points from the new alpha wolf's movement trajectory to form the final executable drone flight path sequence.
2. The UAV sudden obstacle path planning method based on wolf pack algorithm as described in claim 1, characterized in that, Establish and update the initial situation field of the wolf pack, including the alpha wolf's starting point, the prey's position, and the starting position after disturbance by competing wolves, including: Establish a spatial coordinate mapping between drones, targets, and sudden obstacles. The drone coordinates correspond to the starting point of the alpha wolf, the target coordinates correspond to the prey's position, and the coordinates of each sudden obstacle are associated with the spawn point of a competing wolf. The sensor network continuously captures the instantaneous coordinate changes of each obstacle, and calculates the activity parameters of each obstacle based on the rate of change. The activity parameters are used to perturb the spawn point of each competing wolf, thus forming the perturbed starting position of each competing wolf. The initial situation field of the wolf pack is constructed based on the location of the prey, the starting point of the alpha wolf, and the starting positions of each competing wolf after disturbance.
3. The UAV sudden obstacle path planning method based on wolf pack algorithm as described in claim 2, characterized in that, The calculation of the activity parameters of each obstacle based on the rate of change specifically includes: Obtain the position sequence of each sudden obstacle over multiple consecutive sampling periods; Calculate the displacement between adjacent positions in the position sequence; The average displacement rate of the sudden obstacle is obtained by averaging all displacements. The average displacement rate of each obstacle is divided by the maximum value among all the average displacement rates of obstacles, and then normalized. Multiplying the normalized result by a basic activity coefficient, the resulting product is the activity parameter of the sudden obstacle.
4. The UAV sudden obstacle path planning method based on wolf pack algorithm as described in claim 3, characterized in that, The construction of the initial state field for the wolf pack includes: The initial situation field of the wolf pack includes a distance factor and a direction factor; Calculate the straight-line distance from the alpha wolf's starting point to the prey's location, and use this distance as the global distance benchmark; Calculate the straight-line distance from the starting point to the prey's position after the disturbance of each competing wolf, and use it as the individual distance benchmark; Calculate the direction vector from the alpha wolf's starting point to the prey's location, and use it as the global guiding direction; Calculate the direction vector from the starting point of each competing wolf to the starting point of the alpha wolf after the perturbation, and use it as the individual subordination guide; The distance factor is obtained by weighting the global trend direction using the reciprocal of the global distance benchmark. Using the reciprocal of the individual distance benchmark for each competing wolf as the weight, the corresponding individual affiliation orientation is weighted, and the sum is used to obtain the direction factor; The distance factor and the direction factor are vector-superimposed, and the direction and magnitude of the composite vector define the main orientation and intensity of the initial situation field of the wolf pack.
5. The UAV sudden obstacle path planning method based on wolf pack algorithm as described in claim 4, characterized in that, The wolf pack behavior simulation process, which alternately executes the alpha wolf's probing movements, the competing wolves' following movements, and the wolf pack's encirclement and contraction behaviors, includes: At the start of each simulation, the alpha wolf calculates a trial movement vector based on the main guidance of the initial state field of the wolf pack and the trial step size in the current movement parameters. Add the alpha wolf's current position to the probe movement vector to obtain the alpha wolf's position after the probe, and record the position after the probe as a key turning point; Each competing wolf calculates its own follow-up movement vector based on the vector difference between its starting point after the disturbance and the position after the alpha wolf's probing, combined with the follow-up step length in the current movement parameters; Each competing wolf adds its perturbed starting point to its respective follow-up movement vector to update its perturbed starting point; After completing a predetermined number of probing and follow-up attempts, the wolf pack initiates its encirclement and contraction behavior, calculating the geometric center point of the prey's location and the starting point after all competing wolves have updated and perturbed. Based on the relative orientation between the geometric center point and the prey's position, and the shrinkage step size in the current encirclement parameters, calculate an encirclement adjustment vector; The starting point of all competing wolves after disturbance is superimposed with the encirclement adjustment vector to achieve the shrinkage adjustment of the wolf pack's position.
6. The method for UAV sudden obstacle path planning based on wolf pack algorithm as described in claim 5, characterized in that, The calculation of the smoothness metric and obstacle avoidance strength metric of the preliminary polyline path includes: Connect all consecutive key turning points on the initial polyline path to form a set of path segments; Calculate the average angle between all adjacent line segments in the set of path segments; Calculate the standard deviation of the angle between all adjacent line segments, and use the weighted sum of the mean and standard deviation as the smoothness measure; For each critical turning point on the initial polyline path, calculate its Euclidean distance to the coordinates of all sudden obstacles, and take the minimum distance as the nearest obstacle distance of the critical turning point; Calculate the reciprocal of the nearest obstacle distance for all critical turning points on the path, then calculate the average value, and use the average value as the obstacle avoidance strength measure.
7. The method for UAV sudden obstacle path planning based on wolf pack algorithm as described in claim 6, characterized in that, The correction of movement and encirclement parameters in the wolf pack behavior simulation based on the comparison results includes: When the smoothness metric is greater than the preset smoothness threshold, reduce the trial step size and follow-up step size in the movement parameters. When the obstacle avoidance strength metric is less than the preset strength threshold, increase the shrinkage step size in the encirclement parameters; The correction process is performed iteratively. After each correction, the smoothness metric and obstacle avoidance intensity metric are recalculated until the smoothness metric is no greater than the preset smoothness threshold and the obstacle avoidance intensity metric is no less than the preset intensity threshold. The trial step size, follow-up step size and contraction step size at this time are recorded as the corrected movement parameters and encirclement parameters.
8. The method for UAV sudden obstacle path planning based on wolf pack algorithm as described in claim 7, characterized in that, The process of re-running the wolf pack behavior simulation using the corrected movement and encirclement parameters to generate a new alpha wolf movement trajectory includes: Remap the drone coordinates to the alpha wolf's starting point, while maintaining the mapping between the target coordinates and the prey's position. Using the revised movement and encirclement parameters, replace the original parameters and initialize a new round of wolf pack behavior simulation; In the new round of wolf pack behavior simulation, based on the updated probing step length, following step length, and retreating step length, the alpha wolf's probing movement, the competing wolves' following movement, and the wolf pack's encirclement and retreating behavior are executed. Record the position of the alpha wolf after each tentative move in this round of simulation, forming an ordered sequence of alpha wolf positions; The ordered sequence of alpha wolf positions constitutes the new alpha wolf movement trajectory.
9. A method for unmanned aerial vehicle (UAV) sudden obstacle path planning based on wolf pack algorithm as described in claim 8, characterized in that, The step of extracting continuous coordinate points from the new alpha wolf's movement trajectory to form the final executable drone flight path sequence includes: Obtain the ordered sequence of alpha wolf positions in the new alpha wolf movement trajectory; Insert the current coordinates of the UAV at the starting point of the ordered alpha wolf position sequence; Insert the target coordinates at the end of the ordered alpha wolf position sequence; Interpolation is performed on the complete position sequence after inserting the starting coordinates and target coordinates to ensure that the distance between adjacent points meets the flight resolution requirements of the UAV. The dense coordinate point sequence obtained after interpolation is output as the final executable UAV flight path sequence.
10. The method for unmanned aerial vehicle (UAV) sudden obstacle path planning based on wolf pack algorithm as described in claim 9, characterized in that, Following the interpolation process, a path feasibility check is also performed, including: Iterate through each path segment in the drone's flight path sequence; For each path segment, calculate its straight line equation and calculate the perpendicular distance from the coordinates of all sudden obstacles to the straight line represented by the straight line equation. If the vertical distance from the coordinates of a sudden obstacle to the path segment is less than the preset safety radius, and the projection point of the obstacle's coordinates on the path segment is located between the two endpoints of the path segment, then the path segment is determined to have a collision risk. For path segments with collision risk, one or more new path points are inserted between their two endpoints. The position of the new path point is obtained by shifting the original path point away from the coordinates of the obstacle by a preset safety margin. The UAV flight path sequence is updated using the coordinate point sequence after inserting the new path point.