An improved dynamic window method based local path planning method for unmanned aerial vehicle
By dynamically adjusting the speed and acceleration range of the UAV and combining it with the sparrow search algorithm to optimize the trajectory evaluation function, the local optimum problem of UAV path planning in complex environments is solved, achieving safer and more efficient path planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 常州江理工技术转移中心有限公司
- Filing Date
- 2025-04-22
- Publication Date
- 2026-07-07
AI Technical Summary
When planning paths in complex environments, drones are prone to getting stuck in local optima, resulting in unsatisfactory obstacle avoidance. Existing algorithms cannot adapt to flexible and varied navigation environments with varying degrees of obstacle density.
A dynamic window parameter adaptive adjustment strategy is introduced, and the trajectory evaluation function is optimized by combining the sparrow search algorithm. The speed and acceleration range of the UAV are dynamically adjusted, the number of candidate paths is optimized, and Bézier curves are introduced to improve the path smoothness.
It improves the safety and effectiveness of drones' autonomous navigation in complex environments, enhances the flexibility and accuracy of path planning, and reduces the risk of collisions.
Smart Images

Figure CN120370977B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an improved dynamic window method for local path planning of unmanned aerial vehicles (UAVs). Background Technology
[0002] Unmanned aerial vehicles (UAVs), with their high speed, flexibility, and wide coverage, have demonstrated significant application value in military, civilian, and commercial fields. As the demand for autonomous flight, swarm control, and path planning among UAVs becomes increasingly prominent, the ability to provide flexible, reliable, and stable path planning is crucial for achieving autonomous navigation. Current UAVs are prone to getting trapped in local optima and exhibiting unsatisfactory obstacle avoidance when facing complex environmental challenges. This is primarily because UAV local path optimization algorithms are limited by sampling rates, range search, and fixed evaluation metrics in dynamic environments, making them unable to adapt to flexible and varied navigation environments with varying degrees of obstacle density. Summary of the Invention
[0003] This invention addresses the problems of existing technologies by providing an improved dynamic window-based local path planning method for unmanned aerial vehicles (UAVs). This invention can be applied more effectively to UAV local path planning, improving the safety and effectiveness of UAV autonomous navigation in complex environments.
[0004] The technical solutions adopted in this invention are as follows:
[0005] A local path planning method for UAVs based on an improved dynamic window method includes the following steps:
[0006] S1: Initialize the drone status, target point, and environment map, and create a grid map of the environment;
[0007] S2: Improvements to the dynamic window optimization algorithm, the improvements are as follows:
[0008] (1) Based on the density of obstacles, a dynamic window parameter adaptive adjustment strategy is introduced to dynamically adjust the speed and acceleration range of the UAV. At the same time, the distance of the UAV from the destination is taken as an influencing factor so that the UAV automatically decelerates when it approaches the destination.
[0009] (2) Set the sampling resolution to be dynamically adjusted and optimize the number of candidate paths based on the complexity of the environment;
[0010] (3) Introduce the sparrow search algorithm to optimize the index weights of the trajectory evaluation function;
[0011] S3: Input the created path raster map into the improved dynamic window optimization algorithm and output the optimal path.
[0012] Furthermore, in S1, the initial velocity of the UAV on the X, Y, and Z axes is (0,0,0), and the UAV is considered to have reached the target if it is within 1m of the target point.
[0013] Furthermore, for improvement point (1), an obstacle density threshold is set. When the obstacle density is higher than the threshold, the speed and acceleration range is reduced to limit the movement of the UAV; when the obstacle density is lower than the threshold, the speed and acceleration range is expanded to improve the movement flexibility of the UAV.
[0014] Furthermore, the mathematical function for the adaptive adjustment of dynamic window parameters is:
[0015]
[0016] Where vs0 represents the current dynamic window parameters of the drone, vs i These are the dynamic window parameters after adaptive adjustment using dynamic window parameters;
[0017] ρ od The density of obstacles within the specified range of the drone is ρ0, which is the obstacle density threshold, and is set to ρ0 = 0.5.
[0018] δ is the speed range reduction factor when the obstacle density is higher than the threshold. δ = 0.5. When the obstacle density around the drone is greater than the obstacle density threshold, the dynamic window is adjusted.
[0019] d i d0 is the distance between the UAV and the target point; d0 is the threshold for the distance to the target point, which is set to d0 = 20; ε is the speed range reduction coefficient when the UAV is too close to the target, which is set to ε = 0.7.
[0020] Furthermore, for improvement point (2), the sampling resolution is defined as:
[0021]
[0022] Where V is the velocity sampling resolution; V0 is the default sampling resolution, set to V0 = 0.1; ρ od ρ0 represents the obstacle density within the specified range of the drone; ρ0 is the obstacle density threshold.
[0023] Furthermore, regarding improvement point (3), specifically:
[0024] The motion model of a drone during flight is defined as follows:
[0025]
[0026] Where Δt is the time interval between adjacent intervals; x t y t and zt v represents the x-coordinate, y-coordinate, and altitude coordinate of the UAV at time t; t and v z These represent the drone's XY-axis planar velocity and Z-axis velocity, respectively; θ t and ω t These are the drone's turning angle and turning angular velocity, respectively.
[0027] In the trajectory prediction after sampling, the trajectory and reverse movement are evaluated using a trajectory evaluation function to select the speed corresponding to the optimal trajectory. In the weight selection of the trajectory evaluation function in each iteration, a sparrow search algorithm is introduced to find the most suitable set of weights for the current time, thereby calculating the optimal path of the UAV in the next time interval.
[0028] Furthermore, the trajectory evaluation function consists of four sub-indicators: heading angle, distance to the obstacle, speed, and smoothness. The trajectory evaluation function is defined as follows:
[0029] F=w1·heading(ν,ω)+w2·dist(ν,ω)+w3·velocity(ν,ω)+w4·smooth(ν,ω)
[0030] Where: heading(v,ω) is the heading angle index, dist(v,ω) is the distance from the obstacle index, velocity(v,ω) is the linear velocity index of the predicted trajectory, and smooth(v,ω) is the smoothness index; w1, w2, w3 and w4 are the weight parameters of these four indices, respectively.
[0031] Furthermore, the best weight set for the current situation is found using the sparrow search algorithm, thereby calculating the optimal path for the drone in the next time interval. The process is as follows:
[0032] (1) Determine the search range for dynamic weights:
[0033] W = [w1, w2, w3, w4]
[0034] {w1+w2+w3+w4=1|0.05 <w1<0.2,0.1<w2<0.4,0.05<w3<0.2,0.05<w4<0.2}
[0035] Where w1, w2, w3 and w4 are the weights of the heading angle index, the distance to the obstacle index, the speed and the smoothness index, respectively, and W is the set of weights;
[0036] (2) Sparrow population initialization: This is used to randomly initialize the positions of the sparrow population. The position of each sparrow represents a weight combination. The specific formula is as follows:
[0037] wi,j =lb j +(ub j -lb j rand(N,dim)
[0038] Among them, w i,j Let ub be the value of the i-th sparrow at the j-th weight; j and lb j , are the upper and lower bounds of the j-th weight, respectively, both being 1×dim vectors, representing the maximum and minimum values of each dimension; rand(N,dim) represents generating an N×dim random matrix, with each element between [0,1];
[0039] Calculate the fitness value for each weight combination, which is the objective function value for each weight, and find the optimal weight combination. The specific formula is as follows:
[0040] F i =w i,1 ·heading(ν,ω)+w i,2 ·dist(ν,ω)+w i,3 ·velocity(ν,ω)+w i,4 ·smooth(ν,ω)
[0041] (3) Update the weight set, with each sparrow moving closer to the position of the current best sparrow, while introducing randomness to maintain diversity. The update formula for the i-th sparrow in t iterations is as follows:
[0042] w i t+1 =w i t +r×(w*-w i t )
[0043] Among them, w it+1 The updated weights; w it The weights are for the current iteration; w* represents the optimal weights found so far; r is a random number matrix, and rand(N, dim) represents the random variation of different weights.
[0044] To ensure the sparrow's position remains within the search space, its position needs to be restricted. If the sparrow's position exceeds the lower limit lb or the upper limit ub, it is restricted to within the boundary. The specific formula is as follows:
[0045] w i t+1 =max(w i t+1 ,lb)
[0046] w it+1 =min(w i t+1 ,ub)
[0047] (4) Termination condition check: The iterative process includes a termination condition check, which is as follows:
[0048] F*=min(F1,F2,···,F N )
[0049] In each iteration, the algorithm finds the sparrow with the smallest fitness value, stops iterating, and outputs the optimal solution.
[0050] The present invention has the following beneficial effects:
[0051] (1) By introducing a dynamic window adaptive adjustment strategy, the speed and acceleration range are intelligently adjusted according to the density of surrounding obstacles, thereby improving the algorithm's ability to adapt to complex and ever-changing environments.
[0052] (2) By improving the dynamic velocity sampling strategy, the algorithm optimizes the number of candidate paths according to the complexity of the environment, improves the accuracy of the optimal path, and increases computational efficiency.
[0053] (3) By integrating the dynamic weight strategy of the sparrow search algorithm, the weights of each sub-index of the trajectory evaluation function are dynamically adjusted according to environmental changes, which improves the flexibility of path planning. Attached Figure Description
[0054] Figure 1 This is a flowchart of the present invention.
[0055] Figure 2a and Figure 2b The results show a comparison of UAV local path planning trajectories under complex dynamic environments. (a) is a top view, and (b) is an oblique view.
[0056] Figure 3 This is a comparison chart of the speed change curves of drones. Detailed Implementation
[0057] The invention will now be further described with reference to the accompanying drawings.
[0058] like Figure 1 As shown, the present invention discloses a local path planning method for unmanned aerial vehicles based on the improved dynamic window method (SSA-DWA), comprising the following steps:
[0059] S1: Initialize the drone status, target point, and environment map. The initial speed of the drone on the X, Y, and Z axes is (0,0,0). The drone is considered to have reached the target when it is within 1m of the target point. Create a grid map of the environment.
[0060] S2: Improvements to the dynamic window optimization algorithm, the improvements are as follows:
[0061] (1) By introducing a dynamic window parameter adaptive adjustment strategy, specifically:
[0062] In environments with high-density obstacles, narrowing the range of speed and acceleration limits the movement of drones and improves safety;
[0063] Expanding the range of speed and acceleration in low-density obstacle environments improves the maneuverability of drones and enhances their path planning efficiency.
[0064] The distance between the drone and the finish line is taken as an influencing factor, causing the drone to automatically slow down when it approaches the finish line.
[0065] (2) By setting a dynamically adjustable sampling resolution, the number of candidate paths can be optimized according to the complexity of the environment: In environments with high obstacle density, more candidate paths are generated by increasing the sampling density to ensure that a better path is found. In environments with dense obstacles, the number of candidate paths is reduced by decreasing the sampling density, thereby reducing the computational load of the algorithm and improving computational efficiency.
[0066] (3) Introduce the SSA algorithm and apply it to the trajectory evaluation function index weight optimization in the DWA algorithm. Use the SSA algorithm to dynamically adjust and find the optimal weight combination based on the real-time requirements of the task.
[0067] S3: Input the path raster map created in S1 into the improved dynamic window optimization algorithm to output the optimal path.
[0068] Regarding improvement point 1:
[0069] Due to the inherent constraints of the UAV during flight, the actual achievable longitudinal velocity v and turning angular velocity ω within adjacent time intervals Δt are limited. The velocity space values within a certain time window are defined as follows:
[0070]
[0071] Among them, v max v min These represent the upper and lower limits of the drone's linear velocity, respectively; ω max and ω min These represent the upper and lower limits of the drone's angular velocity, respectively; v and ω represent the drone's maximum linear acceleration / deceleration and maximum angular acceleration / deceleration during turning, respectively.
[0072] The heading angle of the drone within a unit window time is:
[0073]
[0074] Where θ is the current heading angle of the UAV.
[0075] In order for the drone to stop before hitting an obstacle when it senses danger, the drone's speed range is:
[0076]
[0077] Where d(v,ω) is v d The closest distance between the predicted trajectory and the drone.
[0078] To enable drones to intelligently adjust their speed according to the surrounding environment to ensure efficient and safe flight, this invention introduces a dynamic window parameter adaptive adjustment strategy, specifically:
[0079] An obstacle density threshold is set. When the obstacle density is higher than this threshold, the speed and acceleration range is reduced to restrict the drone's movement; when the obstacle density is lower than this threshold, the speed and acceleration range is expanded to improve the drone's maneuverability. Simultaneously, the distance of the drone from the finish line is considered as a factor, causing the drone to automatically decelerate as it approaches the finish line.
[0080] Define the speed adjustment range as follows:
[0081]
[0082] Where vs0 represents the current dynamic window parameters of the drone, vs i These are the dynamic window parameters after the dynamic window parameter adaptive adjustment strategy.
[0083] ρ od The density of obstacles within the specified range of the drone is ρ0, which is the obstacle density threshold, and is set to ρ0 = 0.5.
[0084] δ is the speed range reduction coefficient when the obstacle density is higher than the threshold. δ = 0.5. When the obstacle density around the drone is greater than the obstacle density threshold, the dynamic window is adjusted.
[0085] d i d is the distance between the drone and the target point, and d0 is the threshold for the distance to the target point, which is set to d0 = 20.
[0086] ε is the speed range reduction factor when the target is too close, and ε is taken as 0.7.
[0087] When a drone is about to reach its target point, its dynamic window needs to be adjusted to ensure its safety.
[0088] Regarding improvement point 2:
[0089] Due to the presence of dynamic obstacles and the changing environment, high-resolution velocity samples are relatively abundant, generating more candidate paths, while low-resolution velocity samples are relatively scarce, resulting in fewer candidate paths. To flexibly balance the accuracy of the optimal path and computational cost, an improved dynamic velocity sampling strategy is proposed to adjust the velocity sample density.
[0090] The sampling resolution adjustment formula proposed in this invention is as follows:
[0091]
[0092] Where V is the velocity sampling resolution, V0 is the default sampling resolution, and V0 = 0.1 is taken as ρ od The obstacle density is defined within the range of the drone and can be adjusted according to the complexity of the environment. ρ0 is the obstacle density threshold.
[0093] By dynamically adjusting the sampling resolution, the number of candidate paths can be optimized based on environmental complexity: in environments with high obstacle density, increasing the sampling density generates more candidate paths, ensuring the finding of a better path. Conversely, in environments with dense obstacles, decreasing the sampling density reduces the number of candidate paths, thereby reducing computational load and improving efficiency.
[0094] Regarding improvement point 3:
[0095] The motion model of a drone during flight is defined as follows:
[0096]
[0097] Where Δt is the time interval between adjacent intervals; x t y t and z t v represents the x-coordinate, y-coordinate, and altitude coordinate of the UAV at time t; t and v z These represent the drone's XY-axis planar velocity and Z-axis velocity, respectively; θ t and ω t These are the drone's turning angle and turning angular velocity, respectively.
[0098] In the post-sampling trajectory prediction, a trajectory evaluation function is needed to evaluate the trajectory and reverse travel, thereby selecting the speed corresponding to the optimal trajectory. To address the lack of smoothness consideration in path planning by the traditional dynamic window method, this invention also introduces Bézier curves. Based on the traditional dynamic window method's trajectory evaluation function, which consists of three sub-indicators (heading angle, distance to obstacles, and speed), Bézier curves are introduced into the trajectory evaluation function to add a smoothness index. By optimizing the control points of the Bézier curve, the smoothness of the path can be effectively improved, thereby reducing sharp turns. This not only improves the continuity of the path but also enables the UAV to perform tasks more smoothly and accurately during obstacle avoidance, reducing collision risks and improving flight safety.
[0099] In dynamic path planning for UAVs in complex environments, trajectory evaluation functions can help UAVs adjust their paths in real time in dynamically changing environments, avoid obstacles and dangerous areas, evaluate and guide UAVs to select the optimal path, and ensure the efficient completion of flight missions.
[0100] A new objective evaluation function was constructed by introducing the Bézier curve evaluation metric and combining it with three indicators: the UAV's heading angle, distance to the nearest obstacle, and flight speed. This new objective evaluation function makes path planning more accurate and flexible, effectively improving the UAV's adaptability and mission execution efficiency in complex environments. The formula is as follows:
[0101] F=w1·heading(ν,ω)+w2·dist(ν,ω)+w3·velocity(ν,ω)+w4·smooth(ν,ω)
[0102] Wherein: heading(v,ω) is the heading angle index, dist(v,ω) is the distance to the obstacle index, velocity(v,ω) is the linear velocity index of the predicted trajectory, and smoothness(v,ω) is the smoothness index, generated by the second derivative of the Bézier curve; w1, w2, w3, and w4 are the weight parameters of these four indices, respectively. Through the optimization solution of the objective evaluation function, the UAV can achieve safe, fast, and accurate path planning in complex dynamic environments.
[0103] To enhance the ability of UAVs to adapt flexibly to mission requirements in dynamic environments, the weights of different indicators are dynamically adjusted according to environmental changes. The SSA algorithm (Sparrow Search Algorithm) is introduced into the weight selection of the trajectory function in each iteration.
[0104] The specific principles for adjusting the weights of the evaluation indicators proposed in this invention are as follows:
[0105] When a drone approaches an obstacle, obstacle avoidance should be the primary consideration to ensure its safety, and the weight of the obstacle avoidance sub-index should be increased. In open areas, the risk of drone collisions is significantly reduced, and the weight of drone speed and target orientation should be appropriately increased to improve flight efficiency.
[0106] The specific implementation process is as follows:
[0107] By automatically inputting data such as the drone's current parameters, obstacle distance, and destination into the SSA algorithm, the algorithm finds the most suitable set of weights for the current situation, thereby calculating the drone's optimal path for the next time interval.
[0108] (1) First, determine the search range for dynamic weights:
[0109] W = [w1, w2, w3, w4]
[0110] {w1+w2+w3+w4=1|0.05 <w1<0.2,0.1<w2<0.4,0.05<w3<0.2,0.05<w4<0.2}
[0111] Where w1, w2, w3, and w4 are the weights of the heading angle index, the distance to the obstacle index, the speed index, and the smoothness index, respectively, and W is the set of weights.
[0112] (2) Then, the sparrow population is initialized using a method to randomly initialize the positions of the sparrow population. Each sparrow's position represents a weight combination, and the specific formula is as follows:
[0113] w i,j =lb j +(ub j -lb j rand(N,dim)
[0114] Among them, w i,j Let ub be the value of the i-th sparrow at the j-th weight; j and lb j The upper and lower limits of each weight j are 1×dim vectors, representing the maximum and minimum values of each dimension; rand(N,dim) generates an N×dim random matrix, with each element between [0,1], where N is 50 and dim is 4.
[0115] Calculate the fitness value for each weight combination, which is the objective function value for each weight, and find the optimal weight combination. The specific formula is as follows:
[0116] F i =w i,1 ·heading(ν,ω)+w i,2 ·dist(ν,ω)+wi,3 ·velocity(ν,ω)+w i,4 ·smooth(ν,ω)
[0117] (3) Then update the weight set, moving each sparrow closer to the position of the current best sparrow, while introducing randomness to maintain diversity. The update formula for the i-th sparrow in iteration t is as follows:
[0118] w i t+1 =w i t +r×(w*-w i t )
[0119] Among them, w it+1 The updated weights; w it w* represents the weights of the current iteration; w* represents the optimal weights found so far; r is a random number matrix, and rand(N,dim) represents the random variation of different weights.
[0120] To ensure the sparrow's position remains within the search space, its position needs to be restricted. If the sparrow's position exceeds the lower limit lb or the upper limit ub, it is restricted to within the boundary. The specific formula is as follows:
[0121] w i t+1 =max(w i t+1 ,lb)
[0122] w i t+1 =min(w i t+1 ,ub)
[0123] (4) Termination condition check: The iterative process includes a termination condition check, which is as follows:
[0124] F*=min(F1,F2,···,F N )
[0125] In each iteration, the algorithm finds the sparrow with the smallest fitness value, stops iterating, and outputs the optimal solution.
[0126] Figure 2a and Figure 2b The results show a comparison of local path planning trajectories for UAVs under complex dynamic environments. Figure 2a This is a top view. Figure 2bThis is an oblique view. The spheres with pinkish-purple grid lines represent dynamic obstacles, while those with black grid lines represent static obstacles. The line connecting each pair of grayish-white spherical obstacles and their center points represents the movement range of the dynamic obstacle; these are not actual obstacles but rather visualizations of their trajectories. The colored vertical bars on the right represent changes in obstacle height. The color gradient is used solely to enhance visualization, making obstacles of different heights more intuitive and aiding in the observation and analysis of the UAV's path planning process. In the image, the green trajectory represents the DWA algorithm, the red trajectory the AWDWA algorithm, the yellow trajectory the SDWA algorithm, the blue trajectory the IAPF algorithm, and the black trajectory the SSA-DWA algorithm. The improved SSA-DWA algorithm successfully avoids obstacles and finds optimal paths in complex dynamic and static obstacle environments.
[0127] Figure 3 This diagram illustrates the speed variation of a UAV over time in a complex dynamic environment. The X-axis represents iteration time, and the Y-axis represents UAV speed. The green curve represents the DWA algorithm, the yellow curve represents the SDWA algorithm, the red curve represents the AWDWA algorithm, the blue curve represents the IAPF algorithm, and the black curve represents the SSA-DWA algorithm. The trends in the curves show that the improved SSA-DWA algorithm exhibits the least fluctuation during flight, effectively controlling speed fluctuations and improving flight stability.
[0128] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements without departing from the principle of the present invention, and these improvements should also be considered within the scope of protection of the present invention.
Claims
1. A local path planning method for unmanned aerial vehicles (UAVs) based on an improved dynamic window method, characterized in that: Includes the following steps: S1: Initialize the drone status, target point, and environment map, and create a grid map of the environment; S2: Improvements to the dynamic window optimization algorithm, the improvements are as follows: (1) Based on the density of obstacles, a dynamic window parameter adaptive adjustment strategy is introduced to dynamically adjust the speed and acceleration range of the UAV. At the same time, the distance of the UAV from the destination is taken as an influencing factor so that the UAV automatically decelerates when it approaches the destination. (2) Set the sampling resolution to be dynamically adjusted and optimize the number of candidate paths based on the complexity of the environment; (3) Introduce the sparrow search algorithm to optimize the index weights of the trajectory evaluation function; S3: Input the created path raster map into the improved dynamic window optimization algorithm and output the optimal path; The mathematical function for adaptive adjustment of dynamic window parameters is: , in, These are the current dynamic window parameters for the drone. These are the dynamic window parameters after adaptive adjustment using dynamic window parameters; The density of obstacles within a specified range for the drone. For the obstacle density threshold, take ; This is a speed range reduction factor when the obstacle density exceeds a threshold, taken as... When the density of obstacles around the drone exceeds the obstacle density threshold, the dynamic window is adjusted. This refers to the distance between the drone and the target point; The threshold value for the distance to the target point is taken as follows: ; This is a speed range reduction factor when the target is too close, taken as... ; Regarding improvement point (3), the specific details are as follows: The motion model of a drone during flight is defined as follows: , in, For adjacent time intervals; , and They are respectively The horizontal, vertical, and altitude coordinates of the drone at any time; and These are the drone's XY-axis planar velocity and Z-axis velocity, respectively. and These are the drone's turning angle and turning angular velocity, respectively. In the trajectory prediction after sampling, the trajectory and reverse travel are evaluated by using a trajectory evaluation function to select the speed corresponding to the optimal trajectory. In the weight selection of the trajectory evaluation function in each iteration, a sparrow search algorithm is introduced to find the most suitable weight set for the current time, thereby calculating the optimal path of the UAV in the next time interval. The trajectory evaluation function consists of four sub-indicators: heading angle, distance to obstacles, speed, and smoothness. The trajectory evaluation function is defined as follows: , Where: heading(v,ω) is the heading angle index, dist(v,ω) is the distance index from the obstacle, velocity(v,ω) is the linear velocity index of the predicted trajectory, and smooth(v,ω) is the smoothness index. , , and These are the weight parameters for these four indicators.
2. The UAV local path planning method based on the improved dynamic window method as described in claim 1, characterized in that: In S1, the initial velocity of the UAV on the X, Y, and Z axes is (0,0,0). The UAV is considered to have reached the target if it is within 1m of the target point.
3. The UAV local path planning method based on the improved dynamic window method as described in claim 1, characterized in that: For improvement point (1), set an obstacle density threshold. When the obstacle density is higher than the threshold, reduce the speed and acceleration range to limit the movement of the UAV; when the obstacle density is lower than the threshold, expand the speed and acceleration range to improve the movement flexibility of the UAV.
4. The UAV local path planning method based on the improved dynamic window method as described in claim 1, characterized in that: For improvement point (2), the sampling resolution is defined as: , in, It is the speed sampling resolution; This is the default sampling resolution. ; The density of obstacles within a specified range for the drone; This represents the obstacle density threshold.
5. The UAV local path planning method based on the improved dynamic window method as described in claim 1, characterized in that: The optimal weight set for the current situation is found using the sparrow search algorithm, and then the optimal path for the drone in the next time interval is calculated. The process is as follows: (1) Determine the search range for dynamic weights: , in, , , and These are the weights for the heading angle index, distance to obstacle index, speed, and smoothness index, respectively, and W is the set of weights; (2) Sparrow population initialization, used to randomly initialize the positions of the sparrow population. The position of each sparrow represents each weight combination. The specific formula is as follows: , Among them, w ,j For the first Only sparrows in the first The value of each weight; and The first The upper and lower bounds of each weight are both a A vector representing the maximum and minimum values in each dimension; Indicates the generation of a A random matrix, where each element is between [0,1]; Calculate the fitness value for each weight combination, which is the objective function value for each weight, and find the optimal weight combination. The specific formula is as follows: , (3) Update the weight set, each sparrow moves closer to the position of the current best sparrow, while introducing randomness to maintain diversity. Only sparrows The update formula for the next iteration is as follows: , in, The updated weights; The weight for the current iteration; The optimal weights found so far. Given a random number matrix, take... , representing the random variation of different weights; To ensure the sparrow's location remains within the search space, its position needs to be restricted. If the sparrow's location exceeds the lower limit... or upper limit Then it is restricted to within the boundary, and the specific formula is: , , (4) Termination condition check: The iterative process includes a termination condition check, which is as follows: , In each iteration, the algorithm finds the sparrow with the smallest fitness value, stops iterating, and outputs the optimal solution.