Unmanned aerial vehicle trajectory optimization method based on obstacle perception
Through the drone trajectory optimization method based on obstacle perception, combined with edge obstacle avoidance, over-flight obstacle avoidance and genetic algorithms, the flight speed and trajectory of the drone are optimized, which solves the problem of obstacles and flight energy consumption in the existing technology, and achieves better flight paths and energy efficiency.
Patent Information
- Application Number
- CN202411736776.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-11-29
AI Technical Summary
The prior art fails to fully consider the impact of obstacles on the flight trajectory in the planning of the drone's flight path, resulting in the inability to achieve the optimal solution and the failure to effectively optimize the flight energy consumption of the drone.
The trajectory optimization method of the UAV based on obstacle perception is adopted. By discrete the initial trajectory, edge obstacle avoidance and over-the-fly obstacle avoidance methods are used to generate feasible trajectories, and the flight speed and trajectory of the UAV are optimized in combination with genetic algorithms to achieve minimum total energy consumption.
Effectively avoid obstacles on the flight path of the drone, reduce the flight energy consumption of the drone, and reduce the total energy consumption of the drone serving the entire area, achieving better flight paths and energy efficiency.
Smart Images

Figure CN119739195A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of unmanned aerial vehicle path planning and relates to a method for optimizing the trajectory of an unmanned aerial vehicle based on obstacle perception. Background Art
[0002] With the rapid development of Internet of Things technology, drones, as an emerging information and energy transmission platform, have shown great application potential in many fields. Drones can not only serve as mobile base stations or relay nodes to enhance the coverage and reliability of ground communication networks, but also provide wireless energy transmission services for IoT devices in remote or difficult-to-reach areas, thereby extending the working life of these devices.
[0003] However, to give full play to the role of drones in wireless power supply communication networks, a series of technical challenges must be solved, especially the design and optimization of drone flight trajectories. Although existing research has certain guiding significance for reducing drone flight energy consumption to assist IoT ground node communication, there are still shortcomings. Most studies do not fully consider the flight speed of drones and the impact of obstacles on flight trajectories, and usually rely on probabilistic models to simulate visible and invisible links between nodes. In actual scenarios, whether facing a single obstacle or multiple obstacles, the choice of bypassing or flying over obstacles needs to be considered comprehensively, and simply pursuing the shortest path often cannot achieve the optimal solution. Therefore, how to consider both obstacle avoidance and flight energy consumption optimization in flight path planning becomes a key issue. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a drone trajectory optimization method based on obstacle perception, so as to avoid obstacles on the drone flight path segment, reduce the flight energy consumption of the drone, and reduce the total energy consumption of the drone serving the entire area.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] A method for optimizing the trajectory of a UAV based on obstacle perception comprises the following steps:
[0007] S1: Discretize the initial collected trajectory of the UAV, and use edge obstacle avoidance and fly-over obstacle avoidance methods to generate feasible trajectories for the trajectory segments blocked by a single obstacle after discretization;
[0008] S2: Under multi-obstacle conditions, obstacle avoidance methods are used to obtain more feasible trajectories according to the number and height of obstacles, and the feasible trajectories are optimized;
[0009] S3: Based on the principle of minimizing the total energy consumption of the UAV to complete the task, the flight speed and trajectory of the UAV are jointly optimized to obtain the optimal flight speed and trajectory of the UAV in the presence of obstacles.
[0010] Furthermore, the discretization processing of the initial collection trajectory of the UAV includes:
[0011] Consider a wireless communication system consisting of K IoT nodes and a drone. In this system, the drone collects data from IoT nodes. The nodes with insufficient energy are first recharged by radio frequency before data collection. A three-dimensional coordinate system is established with the starting point of the drone as the origin. The set of drones and IoT nodes is defined as S = {s0, s1, s2, ..., s k ,...,s K}, where s0 represents the drone, s k represents the kth IoT node, k = 1, 2, ..., K; the flight trajectory planning problem of the drone collecting each IoT node is transformed into a traveling salesman problem of traversing K cities from the starting point, and the shortest path optimization problem is established as:
[0012]
[0013] In the formula, X0 represents the coordinates of the starting point of the drone, X k represents the coordinates of the kth IoT node;
[0014] The genetic algorithm is used to solve the shortest path optimization problem and obtain the shortest initial trajectory of the UAV traversing K IoT nodes and the corresponding collection sequence S q ;
[0015] According to the starting point of the drone, the location of the IoT node and the acquisition sequence S q , the initial trajectory is discretized into K segments, that is, from the starting point of the drone to the K IoT nodes, and the trajectory between every two nodes is a segment.
[0016] Furthermore, for the kth segment of the discrete trajectory, if there is a single obstacle in the segment Then the initial trajectory is optimized to a feasible trajectory through the following steps:
[0017] S11: Obstacles Projecting onto the xy plane, assuming The vertex coordinates are Convert it into a convex n-gon with the shortest moving distance, n = 3, 4, ...;
[0018] S12: Edge obstacle avoidance path planning method: Assume that the convex polygon with the shortest moving distance is a convex n1 (3≤n1≤n) polygon, and the coordinates of each vertex are expressed as The drone hovers at point Q above node k k =(x k,y k ,z k ), hovering point Q above node k+1 k+1 (x k+1 ,y k+1 ,z k+1 );
[0019] The feasible path segment of the UAV from node k to node k+1 is defined as an undirected graph G(V,E), where V is the set of the UAV's hovering points and the vertices of the convex n1-gon in this segment, expressed as E is a set indicating whether there is a feasible path between each vertex, expressed as like It means the i1th vertex To the j1th vertex There are directed paths between them; if It means There are obstacles between them; in this undirected graph, the Dijkstra algorithm is used to find the shortest path for the drone to bypass the obstacle plane from node k to node k+1. and the edge points passing through obstacles The two-dimensional coordinates of
[0020] calculate With the hover point Q k and hover point Q k+1 Position scale on a 2D plane:
[0021]
[0022] Where t represents the distance from the hovering point Q k To the hover point Q k+1 Relative distance ratio; use ratio t to interpolate points The z-axis coordinate of get The three-dimensional coordinates of And record it in the set W k middle;
[0023] S13: Flying obstacle avoidance path planning method: Assume that the drone starts from the hovering point Q k To the hover point Q k+1 The path segment Q k →Q k+1 Obstacles Block; Q k , Q k+1 and Projected onto the xy plane, the combined path segment Q k →Q k+1 Equation of a straight line with obstacles side equations, solve the coordinates of the intersection point; check whether the intersection point is located at If the intersection point is within the boundary range, the intersection point is recorded as a valid intersection point of the path segment; otherwise, it is discarded and not recorded; through calculation, a two-dimensional intersection point that meets the conditions is obtained. and The obstacles Height Add the z-axis coordinate of the two-dimensional intersection to generate the corresponding three-dimensional coordinates and These two 3D points represent the key points on the shortest path over the obstacle, and they are recorded in the set W k middle;
[0024] S14: From the set W k Extract each point one by one, and each point is related to the hovering point Q k , Hover point Q k+1 Construct a feasible path from the hovering point Q k To the hover point Q k+1 feasible path.
[0025] Further, step S11 specifically includes the following steps:
[0026] S111: For vertices Calculate it with other vertices The angle between the vector and the x-axis Among them, i=1,2,…,n, j=i+1,…,n,1,2,…,i-1:
[0027]
[0028] in, It passes through the vertex A unit vector parallel to the x-axis, a vector in and Vertex and vertices The coordinates of and hour, when and hour, In other cases, The angle Record to set θ k middle;
[0029] S112: When the vertex Complete with all other vertices After calculating the angle between k Select the smallest angle and the corresponding vertex j, and will form the vertex with the minimum angle Record to collection δ k middle;
[0030] S113: If j>i, then the current vertex Update to minimum The corresponding vertex And the set θ k Clear to zero, then return to S111 to continue calculating the angle between the current vertex and other vertices; if j < i, proceed to step S114;
[0031] S114: After the calculation is completed, the set δ k Connect the vertices in sequence to obtain a convex polygon with the shortest moving distance.
[0032] Further, in step S2, under the condition of multiple obstacles, according to the number and height of obstacles, an obstacle avoidance method is used to obtain more feasible trajectories, and the feasible trajectories are optimized, which specifically includes the following steps:
[0033] S21: Using the method in step S11, remove the mth obstacle in the path segment. Convert to the convex n with the shortest moving distance m Polygon, n m =3,4,…, and record the obstacles The coordinates of the vertex with the shortest moving distance
[0034] S22: Use the edge obstacle avoidance path planning method described in step S12 to find the shortest path of the drone from node k to node k+1 around the obstacle plane and the edge point passing through the obstacle And record it in the set W k middle;
[0035] S23: Assume that the highest obstacle in the path segment is When only the highest obstacle is considered, the obstacle avoidance path planning method described in step S13 is used to obtain the obstacle avoidance path. Trajectory Next check the path segment and Is there any other obstacle in the path? There is an intersection where and If the path segment has no intersection with other obstacles, the obstacle avoidance problem of M obstacles is simplified to the obstacle avoidance problem of a single obstacle. If there is an intersection, then plan to avoid obstacles at the same time and The trajectory of , where b∈M and a≠b;
[0036] S24: Path tuning: From the set W k After extracting the point sequence of each feasible path, the points on each path are connected in sequence to form a point sequence from the hovering point Q k To the hover point Q k+1 For all feasible path segments, the path optimization operation is performed, and the Fibonacci filtering method for straightening the obtained path is as follows:
[0037]
[0038] in, and is a path point on path segment k; if path segment arrive If there is no intersection with any obstacles, remove the previous path point By connecting the optimized path points, we can get the k To the hover point Q k+1 feasible path;
[0039] S25: By calculating the energy consumption of each feasible flight path, the path with the lowest energy consumption is selected as the flight path of this segment; the flight energy consumption of the drone includes three parts: Among them, the UAV's horizontal uniform flight speed is υ, and the flight time is T υ Energy consumed Its flight power is: P υ =P(τ c ,F y ,υ); When flying horizontally, the pitch angle of the drone is τ c =0°, longitudinal air friction resistance F y = 0, when pitching, τ is introduced c and F y The value of flight power is used to calculate the energy consumption of the drone during the acceleration phase. P acc =P(τ c ,F y ,υ t ) is the propulsion power of the UAV during acceleration / deceleration, υ t is the flight speed of the UAV during the acceleration phase, and the acceleration time of the UAV from 0 to υ is a is acceleration, and the energy consumption of the drone during the deceleration stage Equal to the acceleration phase, that is: The path selection method is defined as the problem of minimizing the energy consumption of UAV flight:
[0040]
[0041] stC1:X min ≤x t ≤X max
[0042] C2: Y min ≤y t ≤Y max
[0043] C3:Z min ≤z t ≤Z max
[0044] C4: 0≤a≤a max
[0045] C5:
[0046] C6: -t c,max ≤t c ≤t c,max
[0047] Where, X min , X max , Y min and Y max is the limit of the flight area in the xy plane, Z min and Z max It is the limit of the drone's flight altitude, x t ,y t and z t is the three-dimensional coordinate of the drone at time t, a max is the maximum acceleration of the drone, z(x t ,y t ) is the path point at (x t ,y t ,0), Is the obstacle at (x t ,y t ,0),t c,max is the maximum pitch angle of the drone, C1-C3 is the feasible flight space of the drone, and C5 represents if (x t ,y t ) coordinates, the height of the drone must be greater than the height of the obstacle.
[0048] Furthermore, the planning in step S23 also avoids obstacles and The steps of the trajectory are as follows:
[0049] S231: After the height optimization process, if the path segment Q k →Q k+1 Obstacles and If it is blocked, then obstacles are considered. and In the case of, the coordinate points of the two obstacles are calculated by using the obstacle avoidance path planning method described in step S13. and And record these path points into the set W k middle;
[0050] S232: Using the edge obstacle avoidance path planning method described in step S12, the set of hovering points and path points is represented as Apply the Dijkstra algorithm again to calculate the shortest path for the drone to bypass obstacles from node k to node k+1; at the same time, record the edge points that fly over or bypass obstacles, and add the optimal path points to the set W k middle.
[0051] Further, step S3 specifically includes the following steps:
[0052] In the process of path optimization, the flight speed and flight trajectory are jointly optimized, and the amount of data transmitted by the completed node is taken as a constraint to establish the total energy consumption minimization problem of the drone, as shown below:
[0053]
[0054] stC1-C6
[0055] C7: 0≤υ[t]≤V max
[0056] C8:
[0057] C9:
[0058] in, represents the total energy consumption of the drone, represents the energy consumed by the UAV when hovering over the kth IoT node for communication, υ[t] represents the speed of the UAV at time t, and V max is the maximum speed of the drone, ρ k,t represents the signal-to-noise ratio between the drone and the kth IoT node, is the signal-to-noise ratio threshold to ensure successful data transmission, R k,t =Blog2(1+ρ k,t ) is the data transmission rate between the UAV and the kth IoT node, B represents the channel bandwidth, Tk is the communication time between the UAV and node k, Q k is the amount of data that the kth node needs to upload;
[0059] The total energy consumption minimization problem is solved through an iterative optimization algorithm to obtain the optimal flight speed of the UAV and the optimal flight trajectory to avoid obstacles.
[0060] The beneficial effect of the present invention is that when some nodes in the wireless sensor network lack energy and are insufficient to complete the transmission of data, the drone can be used as a mobile energy transmitter to wirelessly power the nodes and receive the data sent by the nodes, so that the network can resume normal operation. While completing the transmission of data volumes of all IoT nodes, the present invention jointly optimizes the drone trajectory and flight speed, reduces the drone's flight energy consumption, and reduces the total energy consumption of the drone serving the entire area.
[0061] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0063] Figure 1 Schematic diagram of a model for trajectory optimization for drones in urban environments.
[0064] Figure 2 It is the vector representation of the obstacle avoidance algorithm based on the vector rotation angle;
[0065] Figure 3 It is a graphical representation of the obstacle avoidance algorithm based on the vector rotation angle;
[0066] Figure 4 Schematic diagram of feasible path selection for a UAV when there is a single obstacle in the path segment;
[0067] Figure 5 is the initial distribution map of multiple obstacles in the path segment;
[0068] Figure 6 Schematic diagram of feasible path selection for UAV based on height optimization in the path segment. DETAILED DESCRIPTION
[0069] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0070] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0071] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0072] like Figure 1 As shown in the figure, consider a wireless communication system consisting of K IoT nodes and a drone. In this system, the drone collects data from IoT nodes, and first replenishes the energy of nodes with insufficient energy through radio frequency before collecting data. A three-dimensional coordinate system is established with the starting point of the drone as the origin. The set of drones and IoT nodes is defined as S = {s0, s1, s2, …, s k ,…,s K}, where s0 represents the drone, s k It represents the kth IoT node, k = 1, 2, ..., K. The flight trajectory planning problem of the drone collecting IoT nodes is transformed into a traveling salesman problem that traverses K cities from the starting point, and the shortest path optimization problem is established as:
[0073]
[0074] In the formula, X0 represents the coordinates of the starting point of the drone, X k Represents the coordinates of the kth IoT node. For the above problem, a genetic algorithm is used to solve it and obtain the shortest initial trajectory of the drone traversing K IoT nodes and the corresponding collection sequence S q .
[0075] Since there may be obstacles on the shortest initial path, the UAV needs to avoid obstacles when flying. Therefore, the shortest path needs to be further processed to obtain a feasible flight trajectory for the UAV.
[0076] According to the starting point of the drone, the location of the IoT node and the acquisition sequence S q , the initial trajectory is discretized into K segments, that is, from the starting point of the drone to the K IoT nodes, and the trajectory between every two nodes is a segment.
[0077] For the kth segment of the discrete trajectory, if there is a single obstacle in the segment Then use the following method to optimize the initial trajectory into a feasible trajectory:
[0078] S11: Obstacles Projected onto the xy plane, such as Figure 2 As shown, obstacles The vertex coordinates are Convert it into a convex n-gon with the shortest moving distance, n = 3, 4, .... The specific steps are as follows:
[0079] S111: Opposite point Calculate it with other vertices The angle between the vector and the x-axis
[0080]
[0081] in, It passes through the vertex A unit vector parallel to the x-axis, a vector in here and Vertex and vertices When and hour, when and hour, In other cases, The angle Record to set θ k middle.
[0082] S112: When the vertex Complete with all other vertices After calculating the angle between k Select the smallest angle and the corresponding vertex j, and will form the vertex with the minimum angle Record to collection δ k middle.
[0083] S113: If j>i, then the current vertex Update to minimum The corresponding vertex And the set θ k Clear to zero, then return to S11 to continue calculating the angle between the current vertex and other vertices; if j<i, go to the next step S14.
[0084] S114: After the calculation is completed, if Figure 3 As shown, the set δ k Connect the vertices in sequence to obtain a convex polygon with the shortest moving distance.
[0085] S12: Edge obstacle avoidance path planning method: Figure 4 As shown, it is assumed that the convex polygon with the shortest moving distance is a convex n1 (3≤n1≤n) polygon, and the coordinates of each vertex are expressed as The drone hovers at point Q above node k k =(x k ,y k ,z k ), hovering point Q above node k+1 k+1 (x k+1 ,y k+1 ,z k+1 ).
[0086] The feasible path segment of the UAV from node k to node k+1 is defined as an undirected graph G(V,E), where V is the set of the UAV's hovering points and the vertices of the convex n1-gon in this segment, expressed as E is a set indicating whether there is a feasible path between each vertex, expressed as like It means the i1th vertex To the j1th vertex There are directed paths between them; if It means In this undirected graph, Dijkstra algorithm is applied to find the shortest path for the drone to bypass the obstacle plane from node k to node k+1. and the edge points passing through obstacles The two-dimensional coordinates of
[0087] calculate With the hover point Q k and hover point Q k+1 Position scale on a 2D plane:
[0088]
[0089] Where t represents the distance from the hovering point Q k To the hover point Q k+1 The relative distance ratio. Use the ratio t to interpolate the points The z-axis coordinate of get The three-dimensional coordinates of And record it in the set W k middle.
[0090] S13: Flying obstacle avoidance path planning method: Assume that the drone starts from the hovering point Q k To the hover point Q k+1 The path segment Q k →Q k+1 Obstacles Block. k , Q k+1 and Projected onto the xy plane, the combined path segment Q k →Q k+1 Equation of a straight line with obstacles Check if the intersection point is located at If the intersection point is within the boundary range, the intersection point is recorded as a valid intersection point of the path segment; otherwise, it is discarded and not recorded. By calculation, the two-dimensional intersection point that meets the conditions is obtained. and The obstacles Height Add the z-axis coordinate of the two-dimensional intersection to generate the corresponding three-dimensional coordinates and These two 3D points represent the key points on the shortest path over the obstacle, and they are recorded in the set W k middle.
[0091] S14: From the set W k Extract each point one by one, and each point is related to the hovering point Q k , Hover point Q k+1 Construct a feasible path from the hovering point Q k To the hover point Q k+1 feasible path.
[0092] like Figure 5 As shown, for the kth segment of the discrete trajectory, if there are M obstacles in this segment Then use the following method to optimize the initial trajectory into a feasible trajectory:
[0093] S21: According to the method in step S11, the mth obstacle in the path segment Convert to the convex n with the shortest moving distance m Polygon, nm =3,4,…, and record the obstacles The coordinates of the vertex with the shortest moving distance
[0094] S22: Use the edge obstacle avoidance path planning method in step S12 to find the shortest path from node k to node k+1 that bypasses the obstacle plane and the edge point that passes through the obstacle And record it in the set W k middle.
[0095] S23: Assume that the highest obstacle in the path segment is When only the highest obstacle is considered, the obstacle avoidance path planning method in step S13 is used to obtain the obstacle avoidance path. Trajectory Next, check the path segment and Is there any other obstacle in the path? ( and ) have an intersection. If the path segment has no intersection with other obstacles, the obstacle avoidance problem of M obstacles can be simplified to the obstacle avoidance problem of a single obstacle. (b∈M and a≠b) has an intersection, then the following steps are required to plan and avoid obstacles at the same time and The trajectory:
[0096] S231: Figure 6 As shown, after the height optimization process, if the path segment Q k →Q k+1 Obstacles and If it is blocked, then obstacles are considered. and In the case of, the obstacle avoidance path planning method in step S13 is used to calculate the coordinate points of the two obstacles. and And record these path points into the set W k middle.
[0097] S232: Apply the edge obstacle avoidance path planning method of step S12, and represent the set of hovering points and path points as Apply the Dijkstra algorithm again to calculate the shortest path for the drone to bypass obstacles from node k to node k+1; at the same time, record the edge points that fly over or bypass obstacles, and add the optimal path points to the set W k middle.
[0098] S24: Path optimization. From the set W k After extracting the point sequence of each feasible path, the points on each path are connected in sequence to form a point sequence from the hovering point Q k To the hover point Q k+1 For all feasible path segments, a path tuning operation is performed to further reduce the energy consumption of the path segment. The Fibonacci filtering method for straightening the obtained path is as follows:
[0099]
[0100] in, and is a path point on path segment k. If path segment arrive If there is no intersection with any obstacles, the previous path points can be removed. By connecting the optimized path points, we can get the k To the hover point Q k+1 feasible path.
[0101] S26: Calculate the energy consumption of each feasible flight path and select the path with the lowest energy consumption as the flight path for that segment. The flight energy consumption of a drone mainly consists of three parts: Among them, the UAV's horizontal uniform flight speed is υ, and the flight time is T υ Energy consumed Its flight power is: P υ =P(τ c ,F y ,υ); When flying horizontally, the pitch angle of the drone is τ c =0°, longitudinal air friction resistance F y =0, and τ is required for pitch flight c and F y The energy consumption of the drone during the acceleration phase is calculated by P acc =P(τ c ,F y ,υ t ) is the propulsion power of the UAV during acceleration / deceleration, υ t is the flight speed of the UAV during the acceleration phase, and the acceleration time of the UAV from 0 to υ is a is acceleration, and the energy consumption of the drone during the deceleration stage Equal to the acceleration phase, that is: We define the above path selection method as the problem of minimizing the energy consumption of UAV flight:
[0102]
[0103] xT min ≤x t ≤X max (6)
[0104] Y min ≤y t ≤Y max (7)
[0105] Z min ≤z t ≤Z max (8)
[0106] 0≤a≤a max (9)
[0107]
[0108] -t c,max ≤t c ≤t c,max (11)
[0109] Where, X min , X max , Y min and Y max is the limit of the flight area in the xy plane, Z min and Z max It is the limit of the drone's flight altitude, x t ,y t and z t is the three-dimensional coordinate of the drone at time t, a max is the maximum acceleration of the drone, z(x t ,y t ) is the path point at (x t ,y t ,0), Is the obstacle at (x t ,y t ,0),t c,max is the maximum pitch angle of the UAV. Equations (6)-(8) are the feasible flight space of the UAV. Equation (10) indicates that if (x t ,y t ) coordinates, the height of the drone must be greater than the height of the obstacle. Through this optimization problem, the optimal trajectory in the above obstacle avoidance mode can be obtained.
[0110] Through the above calculations, the optimal flight path can be selected according to the height characteristics and relative positions of obstacles, thereby minimizing energy consumption while ensuring mission completion.
[0111] In the process of path optimization, in order to reduce the total energy consumption of the UAV, the flight speed of the UAV on the path segment can be further optimized. The adjustment of the flight speed will directly affect the propulsion energy consumption of the UAV, and the change in propulsion energy consumption will in turn affect the choice of flight trajectory. Therefore, it is necessary to jointly optimize the flight speed and flight trajectory to minimize the overall energy consumption. By taking the amount of data transmitted to complete the node as a constraint, the total energy consumption minimization problem of the UAV is established as follows:
[0112]
[0113] st(6)-(11) (13)
[0114] 0≤υ[t]≤V max (14)
[0115]
[0116] in, represents the total energy consumption of the drone, represents the energy consumed by the UAV when hovering over the kth IoT node for communication, υ[t] represents the speed of the UAV at time t, and V max is the maximum speed of the drone, ρ k,t represents the signal-to-noise ratio between the drone and the kth IoT node, is the signal-to-noise ratio threshold to ensure successful data transmission, R k,t =Blog2(1+ρ k,t ) is the data transmission rate between the UAV and the kth IoT node, B represents the channel bandwidth, T k is the communication time between the UAV and node k, Q k is the amount of data that the kth node needs to upload.
[0117] The total energy consumption minimization problem is solved through an iterative optimization algorithm to obtain the optimal flight speed of the UAV and the optimal flight trajectory to avoid obstacles.
[0118] In the above embodiments, the description's reference to "this embodiment" indicates that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least some embodiments, but not necessarily all embodiments. Multiple occurrences of "this embodiment" do not necessarily all refer to the same embodiment.
[0119] In the above-described embodiments, although the invention has been described in conjunction with specific embodiments of the invention, many substitutions, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other storage structures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed. Embodiments of the invention are intended to encompass all such substitutions, modifications, and variations that fall within the broad scope of the appended claims.
[0120] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in this embodiment is implemented.
[0121] This embodiment also provides an electronic terminal, including: a processor and a memory;
[0122] The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the terminal executes any one of the methods in this embodiment.
[0123] The computer-readable storage medium in this embodiment can be understood by ordinary technicians in this field: all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0124] The electronic terminal provided in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run computer programs so that the electronic terminal executes each step of the above method.
[0125] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0126] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0127] The present invention can be used in many general or special computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.
[0128] The present invention may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A method for optimizing the trajectory of a UAV based on obstacle perception, characterized in that: The following steps are involved: S1: Discretize the initial collected trajectory of the UAV, and use edge obstacle avoidance and fly-over obstacle avoidance methods to generate feasible trajectories for the trajectory segments blocked by a single obstacle after discretization; S2: Under multi-obstacle conditions, obstacle avoidance methods are used to obtain more feasible trajectories according to the number and height of obstacles, and the feasible trajectories are optimized; S3: Based on the principle of minimizing the total energy consumption of the UAV to complete the task, the flight speed and trajectory of the UAV are jointly optimized to obtain the optimal flight speed and trajectory of the UAV in the presence of obstacles.
2. The method for optimizing the trajectory of a UAV based on obstacle perception according to claim 1, characterized in that: The discretization processing of the initial acquisition trajectory of the UAV includes: Consider a wireless communication system consisting of K IoT nodes and a drone. In this system, the drone collects data from IoT nodes. The nodes with insufficient energy are first recharged by radio frequency before data collection. A three-dimensional coordinate system is established with the starting point of the drone as the origin. The set of drones and IoT nodes is defined as S = {s0, s1, s2, …, s k ,…,s K }, where s0 represents the drone, s k represents the kth IoT node, k = 1, 2, ..., K; the flight trajectory planning problem of the drone collecting each IoT node is transformed into a traveling salesman problem of traversing K cities from the starting point, and the shortest path optimization problem is established as: In the formula, X0 represents the coordinates of the starting point of the drone, X k represents the coordinates of the kth IoT node; The genetic algorithm is used to solve the shortest path optimization problem and obtain the shortest initial trajectory of the UAV traversing K IoT nodes and the corresponding collection sequence S q ; According to the starting point of the drone, the location of the IoT node and the acquired collection sequence S q , the initial trajectory is discretized into K segments, that is, from the starting point of the drone to the K IoT nodes, and the trajectory between every two nodes is a segment.
3. The method for optimizing the trajectory of a UAV based on obstacle perception according to claim 2, characterized in that: For the kth segment of the discrete trajectory, if there is a single obstacle in the segment Then the initial trajectory is optimized to a feasible trajectory through the following steps: S11: Obstacles Projecting onto the xy plane, assuming The vertex coordinates are Convert it into a convex n-gon with the shortest moving distance, n = 3, 4, ...; S12: Edge obstacle avoidance path planning method: Assume that the convex polygon with the shortest moving distance is a convex n1 (3≤n1≤n) polygon, and the coordinates of each vertex are expressed as The drone hovers at point Q above node k k =(x k ,y k ,z k ), hovering point Q above node k+1 k+1 (x k+1 ,y k+1 ,z k+1 ); The feasible path segment of the UAV from node k to node k+1 is defined as an undirected graph G(V,E), where V is the set of the UAV's hovering points and the vertices of the convex n1-gon in this segment, expressed as E is a set indicating whether there is a feasible path between each vertex, expressed as like It means the i1th vertex To the j1th vertex There are directed paths between them; if It means There are obstacles between them; in this undirected graph, the Dijkstra algorithm is used to find the shortest path for the drone to bypass the obstacle plane from node k to node k+1. and the edge points passing through obstacles The two-dimensional coordinates of calculate With the hover point Q k and hover point Q k+1 Position scale on a 2D plane: Where t represents the distance from the hovering point Q k To the hover point Q k+1 Relative distance ratio; use ratio t to interpolate points The z-axis coordinate of get The three-dimensional coordinates of And record it in the set W k middle; S13: Flying obstacle avoidance path planning method: Assume that the drone starts from the hovering point Q k To the hover point Q k+1 The path segment Q k →Q k+1 Obstacles Block; Q k , Q k+1 and Projected onto the xy plane, the combined path segment Q k →Q k+1 Equation of a straight line with obstacles side equations, solve the coordinates of the intersection point; check whether the intersection point is located at If the intersection point is within the boundary range, the intersection point is recorded as a valid intersection point of the path segment; otherwise, it is discarded and not recorded; through calculation, a two-dimensional intersection point that meets the conditions is obtained. and The obstacles Height Add the z-axis coordinate of the two-dimensional intersection to generate the corresponding three-dimensional coordinates and These two 3D points represent the key points on the shortest path over the obstacle, and they are recorded in the set W k middle; S14: From the set W k Extract each point one by one, and each point is related to the hovering point Q k , Hover point Q k+1 Construct a feasible path from the hovering point Q k To the hover point Q k+1 feasible path.
4. The method for optimizing the trajectory of a UAV based on obstacle perception according to claim 3 is characterized in that: Step S11 specifically includes the following steps: S111: For vertices Calculate it with other vertices The angle between the vector and the x-axis Among them, i=1,2,…,n, j=i+1,…,n,1,2,…,i-1: in, It passes through the vertex A unit vector parallel to the x-axis, a vector in and Vertex and vertices The coordinates of and hour, when and hour, In other cases, The angle Record to set θ k middle; S112: When the vertex Complete with all other vertices After calculating the angle between k Select the smallest angle and the corresponding vertex j, and will form the vertex with the minimum angle Record to collection δ k middle; S113: If j>i, then the current vertex Update to minimum The corresponding vertex And the set θ k Clear to zero, then return to S111 to continue calculating the angle between the current vertex and other vertices; if j < i, proceed to step S114; S114: After the calculation is completed, the set δ k Connect the vertices in sequence to obtain a convex polygon with the shortest moving distance.
5. The method for optimizing the trajectory of a UAV based on obstacle perception according to claim 3 is characterized in that: Step S2, under the condition of multiple obstacles, uses the obstacle avoidance method to obtain more feasible trajectories according to the number and height of obstacles, and optimizes the feasible trajectories, which specifically includes the following steps: S21: Using the method in step S11, remove the mth obstacle in the path segment. Convert to the convex n with the shortest moving distance m Polygon, n m =3,4,…, and record the obstacles The coordinates of the vertex with the shortest moving distance S22: Use the edge obstacle avoidance path planning method described in step S12 to find the shortest path of the drone from node k to node k+1 around the obstacle plane and the edge point passing through the obstacle And record it in the set W k middle; S23: Assume that the highest obstacle in the path segment is a∈M, when only the highest obstacle is considered, the obstacle avoidance path planning method described in step S13 is used to obtain the obstacle avoidance path planning method. The trajectory Next check the path segment and Is there any other obstacle in the path? There is an intersection where and If the path segment has no intersection with other obstacles, the obstacle avoidance problem of M obstacles is simplified to the obstacle avoidance problem of a single obstacle. If there is an intersection, the plan will avoid obstacles at the same time. and The trajectory of , where b∈M and a≠b; S24: Path tuning: From the set W k After extracting the point sequence of each feasible path, the points on each path are connected in sequence to form a point sequence from the hovering point Q k To the hover point Q k+1 For all feasible path segments, the path optimization operation is performed, and the Fibonacci filtering method for straightening the obtained path is as follows: in, and is a path point on path segment k; if path segment arrive If there is no intersection with any obstacles, remove the previous path point By connecting the optimized path points, we can get the k To the hover point Q k+1 feasible path; S25: By calculating the energy consumption of each feasible flight path, the path with the lowest energy consumption is selected as the flight path of this segment; the flight energy consumption of the drone includes three parts: Among them, the UAV's horizontal uniform flight speed is υ, and the flight time is T υ Energy consumed Its flight power is: P υ =P(τ c ,F y ,υ); When flying horizontally, the pitch angle of the drone is τ c =0°, longitudinal air friction resistance F y = 0, when pitching, τ is introduced c and F y The value of flight power is used to calculate the energy consumption of the drone during the acceleration phase. P acc =P(τ c ,F y ,υ t ) is the propulsion power of the UAV during acceleration / deceleration, υ t is the flight speed of the UAV during the acceleration phase, and the acceleration time of the UAV from 0 to υ is a>0, a is acceleration, energy consumption of the drone during deceleration Equal to the acceleration phase, that is: The path selection method is defined as the problem of minimizing the energy consumption of UAV flight: s.t.C1:X min ≤x t ≤X max C2:Y min ≤y t ≤And max C3:Z min ≤of t ≤Z max C4: 0≤a≤a max C5: C6:-t c,max ≤t c ≤t c,max Where, X min , X max , Y min and Y max is the limit of the flight area in the xy plane, Z min and Z max It is the limit of the drone's flight altitude, x t ,y t and z t is the three-dimensional coordinate of the drone at time t, a max is the maximum acceleration of the drone, z(x t ,y t ) is the path point at (x t ,y t ,0), The obstacle is at (x t ,y t ,0),t c,max is the maximum pitch angle of the drone, C1-C3 is the feasible flight space of the drone, and C5 represents if (x t ,y t ) coordinates, the height of the drone must be greater than the height of the obstacle.
6. The method for optimizing the trajectory of a UAV based on obstacle perception according to claim 5, characterized in that: Step S23: Planning and avoiding obstacles simultaneously and The steps of the trajectory are as follows: S231: After the height optimization process, if the path segment Q k →Q k+1 Obstacles and If it is blocked, then obstacles are considered. and In the case of, the coordinate points of the two obstacles are calculated by using the obstacle avoidance path planning method described in step S13. and And record these path points into the set W k middle; S232: Using the edge obstacle avoidance path planning method described in step S12, the set of hovering points and path points is represented as Apply the Dijkstra algorithm again to calculate the shortest path for the drone to bypass obstacles from node k to node k+1; at the same time, record the edge points that fly over or bypass obstacles, and add the optimal path points to the set W k middle.
7. The method for optimizing the trajectory of a UAV based on obstacle perception according to claim 6, characterized in that: Step S3 specifically includes the following steps: In the process of path optimization, the flight speed and flight trajectory are jointly optimized, and the amount of data transmitted by the completed node is taken as a constraint to establish the total energy consumption minimization problem of the drone, as shown below: stC1-C6 C7:0≤υ[t]≤V max C8: C9: in, represents the total energy consumption of the drone, represents the energy consumed by the UAV when hovering over the kth IoT node for communication, υ[t] represents the speed of the UAV at time t, and V max is the maximum speed of the drone, ρ k,t represents the signal-to-noise ratio between the drone and the kth IoT node, is the signal-to-noise ratio threshold to ensure successful data transmission, R k,t =Blog2(1+ρ k,t ) is the data transmission rate between the UAV and the kth IoT node, B represents the channel bandwidth, T k is the communication time between the UAV and node k, Q k is the amount of data that the kth node needs to upload; The total energy consumption minimization problem is solved through an iterative optimization algorithm to obtain the optimal flight speed of the UAV and the optimal flight trajectory to avoid obstacles.
Citation Information
Patent Citations
Path planning and wireless communication method for unmanned aerial vehicle cluster in ground sensor network
CN110364031A
Method for planning optimal energy consumption path of drone based on variational method
CN110442147A
Unmanned aerial vehicle trajectory planning and tracking control method based on improved AAPF-IRRT algorithm
CN115903894A
Path planning method, device and equipment based on unmanned aerial vehicle
CN117311380A
Multi-unmanned aerial vehicle task unloading and trajectory planning method based on directed acyclic graph
CN118226886A