Method for generating flight path of unmanned aerial vehicle
Through the unmanned aircraft flight trajectory generation method combining deep learning and particle swarm optimization algorithm, the problem that traditional methods cannot cope with dynamic environmental changes and aircraft motion constraints is solved, and the trajectory is updated in real time, obstacle avoidance and motion constraints are achieved in complex environments, which significantly improves the aircraft's autonomous flight capabilities and safety.
Patent Information
- Application Number
- CN202510186664.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-05-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional unmanned aerial vehicle flight trajectory planning methods cannot effectively deal with dynamic environmental changes and aircraft motion constraints, resulting in inflexible flight trajectory and prone to safety risks such as collisions.
The unmanned aircraft flight trajectory generation method based on deep learning and particle swarm optimization algorithm is adopted to dynamically adjust the flight trajectory through real-time sensor data feedback to ensure that the aircraft updates the trajectory in real time in complex environments, avoid obstacles and meets motion constraints.
It significantly improves the autonomous flight capability and safety of unmanned aerial vehicles in complex environments, and can quickly generate optimized flight trajectories, ensuring that the aircraft strictly abides by motion restrictions and avoids unsafe flight status.
Smart Images

Figure CN120066106A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicles, and particularly to a method for generating a flight trajectory of an unmanned aerial vehicle. Background Art
[0002] With the continuous development of unmanned aerial vehicle technology, more and more unmanned aerial vehicles are applied in different fields, such as transportation, monitoring, exploration, and emergency rescue. In order to ensure that the aircraft can complete tasks efficiently and accurately, the planning and generation of flight trajectories have become a key issue in unmanned aerial vehicle technology. Traditional flight trajectory planning methods often rely on preset flight paths and static environment models, ignoring the impact of dynamic environment changes and real-time constraints. Therefore, how to generate flight trajectories in real time and accurately in a complex environment, avoid obstacles and meet the motion constraint conditions of the aircraft has become an urgent problem to be solved in the current flight control system of unmanned aerial vehicles.
[0003] The existing flight trajectory planning methods mainly have the following problems. Many traditional methods only rely on pre-determined environmental data and cannot cope with real-time dynamic obstacles and environmental conditions, resulting in inflexible flight trajectories and prone to safety risks such as collisions. In a complex environment, traditional optimization algorithms require a large amount of calculation, resulting in too long flight trajectory planning time and unable to meet the real-time requirements. Under complex flight conditions, existing methods are difficult to comprehensively consider the motion constraints of the aircraft, such as maximum speed, acceleration, and turning angle, which may cause the aircraft to be unable to complete tasks safely and smoothly. Therefore, designing a method for generating a flight trajectory of an unmanned aerial vehicle based on deep learning and optimization algorithms, which can adjust the trajectory in real time in a dynamic environment and meet the motion constraints, is one of the research directions of current flight trajectory planning technology. Summary of the Invention
[0004] To solve the above technical problems, a method for generating a flight trajectory of an unmanned aerial vehicle is provided, and the technical solution solves the above problems.
[0005] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] A method for generating a flight trajectory of an unmanned aerial vehicle, comprising:
[0007] Input the initial position, target position, environmental information, information information, and motion constraint conditions of the aircraft;
[0008] Model the flight trajectory of the aircraft based on a deep learning intelligent algorithm to obtain a preliminary flight trajectory;
[0009] Establish a flight trajectory optimization model according to the motion constraint conditions and environmental information of the aircraft, adjust the trajectory path, and ensure that the aircraft is within a safe range and avoids obstacles;
[0010] Optimize the flight trajectory model according to the information, adjust the trajectory path, and ensure that the aircraft is within an absolutely safe range and avoids obstacles;
[0011] Obtain sensor data every 1 - 2 seconds, regularly adjust and optimize the flight trajectory, ensure that the flight trajectory is updated regularly as the flight environment changes, and ensure a distance of more than the relative speed * 2 seconds between the aircraft and the obstacles;
[0012] Execute the optimized flight trajectory through the aircraft control system to perform real - time control and correction of the flight path.
[0013] Preferably, the input information of the aircraft further includes self - inspection information. The self - inspection information includes the actual flyable distance and the total usage duration of the drive motor. When the ratio of the actual flyable distance to the remaining journey distance is between 1.2:1 and 1:1;
[0014] Among them, the calculation formula for the safe range between the aircraft and the obstacles is:
[0015] L = C (t / T) *X
[0016] In the formula, L is the safe range between the aircraft and the obstacles, X is the safe distance obtained by normal calculation, C is a constant, set to 0.90 - 0.95, t is the total flight duration, and T is the total estimated flight duration of the aircraft;
[0017] Use the positioning system of the aircraft to read its current longitude, latitude, altitude and heading information to obtain the initial coordinates of the aircraft;
[0018] Obtain the coordinate information of the target point by inputting the longitude and latitude coordinates of the target position and the relative position of the set target;
[0019] Collect environmental information in the flight area, including meteorological data, obstacle information and the terrain of the flight area, and obtain weather factors such as wind speed, air temperature, air pressure and humidity through meteorological sensors;
[0020] Use the lidar and computer vision sensors of the aircraft to collect obstacle information in the flight path, and use map data to obtain ground height and terrain undulation information;
[0021] Set the maximum horizontal speed and vertical speed of the aircraft;
[0022] Convert the obtained initial position, target position, environmental data and motion constraint conditions into a unified format as the input of the deep learning algorithm model.
[0023] Preferably, the modeling of the flight trajectory of the aircraft based on the deep learning intelligent algorithm to obtain the preliminary flight trajectory specifically includes:
[0024] Perform trajectory modeling based on the neural network model to optimize the flight trajectory so that it can reach the target position from the initial position while avoiding obstacles and meeting the motion constraints;
[0025] Input the initial position, target position, environmental information and motion constraint data of the aircraft. Assume the input data is a vector, and each layer is processed through a non-linear activation function to extract data features, and the output layer outputs the trajectory coordinates of the aircraft;
[0026] Design a loss function, comprehensively considering factors such as flight distance, flight time and obstacle avoidance;
[0027] Use the backpropagation algorithm and optimization algorithm to train the neural network. By minimizing the loss function, the model can output a flight trajectory that meets the constraint conditions, avoids obstacles and can effectively reach the target;
[0028] Use the gradient descent method to optimize the model parameters. Among them, the gradient descent method formula is:
[0029] θ i+1 = θ i - ηΔ θ L
[0030] In the formula, θ i is the network parameter, η is the learning rate, Δ θ L is the gradient of the loss function with respect to the parameter, and θ i+1 is the optimized network parameter.
[0031] Preferably, the establishment of a flight trajectory optimization model according to the motion constraint conditions and environmental information of the aircraft, and the adjustment of the trajectory path to ensure that the aircraft is within a safe range and avoids obstacles specifically includes:
[0032] Input the motion constraint conditions of the aircraft, including speed limit, acceleration limit and rotation limit, and input the environmental information, including obstacle position, weather conditions and the starting position and target position of the aircraft;
[0033] Design an objective function that simultaneously meets the constraint conditions. The constraint conditions include: minimizing the path length, obstacle avoidance, meeting the motion constraints and safety;
[0034] Based on the particle swarm optimization algorithm, a trajectory optimization model is established. Each particle generates an initial solution, representing a flight trajectory. The position of each particle consists of the position coordinates of the aircraft at different time steps, and the velocity represents the displacement between different time steps. The fitness value of each particle is calculated according to the objective function, and the fitness function includes path length, obstacle avoidance penalty, and constraint violation penalty;
[0035] According to the update rules of particle swarm optimization, the velocity and position of each particle are adjusted to find the optimal trajectory that satisfies the constraint conditions;
[0036] During the iterative process of particle swarm optimization or other optimization algorithms, the flight trajectory is gradually optimized. By calculating the distance between each particle's trajectory and the obstacle, the trajectory path is adjusted to avoid the obstacle area;
[0037] Ensure that the velocity and acceleration of the aircraft are within the predetermined range at each time step. When the trajectory of a certain particle violates the constraint conditions, a penalty term is added to force the optimization algorithm to adjust the path;
[0038] Based on the smoothing algorithm, the optimized path is smoothed to avoid sharp changes or excessive turning of the path;
[0039] Use simulation software to perform trajectory simulation to verify whether the optimized trajectory meets the motion constraints of the aircraft, whether it can avoid obstacles, and ensure that the aircraft is within the safe range. Conduct trajectory tests on the aircraft in the actual environment;
[0040] Output the optimal trajectory path of the aircraft, including the coordinate positions and velocity information of the aircraft at different time steps.
[0041] Preferably, the design objective function simultaneously satisfies the constraint conditions, and the constraint conditions include: minimizing the path length, obstacle avoidance, meeting the motion constraints, and safety. Specifically, it includes:
[0042] Among them, the objective function formula is:
[0043] min(p + λ 1 ·c + λ 2 v)
[0044] In the formula, p represents the total path length of the aircraft trajectory, and the goal is to minimize the path length of the aircraft from the starting point to the ending point.
[0045] Preferably, for the particle swarm optimization algorithm, a trajectory optimization model is established, and the fitness value of each particle is calculated according to the objective function. The fitness function includes path length, obstacle avoidance penalty, and constraint violation penalty. Specifically, it includes:
[0046] Initialize the particle swarm, initialize the velocity and position of the particles, and obtain the path length by calculating the sum of the distances between adjacent points;
[0047] If the trajectory of the particle passes through the safe range of the obstacle, the particle is penalized. If the distance between this point and the obstacle is less than the safe radius of the obstacle, a collision occurs and a penalty is generated;
[0048] Calculate the constraint violation penalty, calculate the fitness value of each particle, and update the velocity and position of each particle based on the calculated fitness value and the particle swarm optimization algorithm;
[0049] The particle swarm optimization algorithm determines whether to stop the optimization process by setting termination conditions, including the maximum number of iterations and the convergence of the fitness value.
[0050] Preferably, if the trajectory of the particle passes through the safe range of the obstacle, the particle is penalized. If the distance between this point and the obstacle is less than the safe radius of the obstacle, a collision occurs and a penalty is generated, specifically including:
[0051] Among them, the calculation formula for the obstacle avoidance penalty is:
[0052]
[0053] In the formula, x represents the set of trajectories, x i represents the i-th trajectory point in the path, O j represents the position of the j-th obstacle, r j represents the safe radius of the j-th obstacle, dist(x i , O j ) represents the Euclidean distance between the trajectory point x i and the obstacle O j . n is the total number of points in the trajectory, and m is the number of obstacles.
[0054] Preferably, the obtaining of real-time sensor data, the dynamic adjustment and optimization of the flight trajectory to ensure that the flight trajectory is updated in real time as the flight environment changes specifically includes:
[0055] Obtain real-time sensor data, transmit it to the processing module through the control system of the aircraft, and obtain the positions, motion states and environmental factors of the obstacles around the aircraft in real time;
[0056] Use the sensor data to detect, identify and track the obstacles in real time, including static obstacles and dynamic obstacles;
[0057] Based on the sensor data, detect whether there is a deviation in the flight trajectory. When the aircraft approaches an obstacle or enters a no-fly zone, the system calculates a safe path and makes an obstacle avoidance adjustment, re-plans the trajectory according to the sensor data, and performs dynamic update of the trajectory through real-time analysis of the environmental information and in combination with the motion constraint conditions of the aircraft.
[0058] Preferably, the real-time control and correction of the flight path by executing the optimized flight trajectory through the aircraft control system specifically include:
[0059] The aircraft control system receives the optimized flight trajectory, including the specific points, time series, and flight constraint conditions of the flight path, converts the optimized flight trajectory into a series of specific control instructions, sets the target position, speed, and heading parameters, and sets the reference path of the aircraft according to the real-time feedback;
[0060] Based on the sensors, the current flight state is monitored in real time, the difference between the actual state of the aircraft and the target trajectory is compared in real time, and error correction is performed based on the PID control algorithm based on the error monitored in real time;
[0061] When the aircraft deviates from the target trajectory, the control strategy is adjusted through real-time feedback, the flight path is corrected, and according to the error feedback, the control system generates real-time control instructions to adjust the flight attitude and heading of the aircraft, including the magnitude, direction control, and tilt angle of the thrust.
[0062] Preferably, the real-time monitoring of the current flight state based on the sensors, the real-time comparison of the difference between the actual state of the aircraft and the target trajectory, and the error correction based on the PID control algorithm based on the error monitored in real time specifically include:
[0063] Among them, the formula of the PID control algorithm is:
[0064]
[0065] In the formula, u(t) is the control input, e(t) is the error, K p is the proportional gain, K i is the integral gain, K d is the derivative gain, is the error accumulation.
[0066] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0067] The present invention proposes that through the feedback of real-time sensor data, the flight trajectory can be dynamically adjusted to ensure that the aircraft updates the trajectory in real time in a complex and changing environment, effectively avoid obstacles and respond to environmental changes, and can significantly improve the autonomous flight ability and safety of unmanned aircraft in complex environments, and has a wide range of application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 It is a step flow framework diagram of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0069] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments in the following description are only examples, and other obvious variations can be conceived by those skilled in the art.
[0070] Referring to Figure 1 as shown, a method for generating a flight trajectory of an unmanned aerial vehicle includes:
[0071] Step 1:
[0072] Use the positioning system of the aircraft to read its current longitude, latitude, altitude and heading information to obtain the initial coordinates of the aircraft;
[0073] Obtain the coordinate information of the target point by inputting the longitude and latitude coordinates of the target position and the relative position of the set target;
[0074] Collect the environmental information in the flight area, including meteorological data, obstacle information and the terrain of the flight area, and obtain weather factors such as wind speed, air temperature, air pressure and humidity through meteorological sensors;
[0075] Use the lidar and computer vision sensors of the aircraft to collect obstacle information in the flight path, and use map data to obtain ground height and terrain undulation information;
[0076] Set the maximum horizontal speed and vertical speed of the aircraft;
[0077] Convert the obtained initial position, target position, environmental data and motion constraint conditions into a unified format as the input of the deep learning algorithm model.
[0078] Step 2:
[0079] The input information of the aircraft also includes self-check information, and the self-check information includes the actual flyable distance and the total usage duration of the drive motor. When the ratio of the actual flyable distance to the remaining journey distance is between 1.2:1 and 1:1;
[0080] Among them, the calculation formula for the safety range between the aircraft and the obstacle is:
[0081] L = C (t / T) *X
[0082] In the formula, L is the safety range between the aircraft and the obstacle, X is the safety distance obtained by normal calculation, C is a constant, set to 0.90 - 0.95, t is the total flight duration, and T is the total estimated flight duration of the aircraft;
[0083] Use the positioning system of the aircraft to read its current longitude, latitude, altitude and heading information to obtain the initial coordinates of the aircraft;
[0084] Obtain the coordinate information of the target point by inputting the longitude and latitude coordinates of the target position and the relative position of the set target;
[0085] Collect the environmental information within the flight area, including meteorological data, obstacle information, and the terrain of the flight area, and obtain weather factors such as wind speed, air temperature, air pressure, and humidity through meteorological sensors;
[0086] Use the lidar and computer vision sensors of the aircraft to collect obstacle information in the flight path, and use map data to obtain ground height and terrain undulation information;
[0087] Set the maximum horizontal speed and vertical speed of the aircraft;
[0088] Convert the obtained initial position, target position, environmental data, and motion constraint conditions into a unified format as the input of the deep learning algorithm model.
[0089] Step Three:
[0090] Input the motion constraint conditions of the aircraft, including speed limit, acceleration limit, and rotation limit, and input the environmental information, including obstacle position, weather conditions, and the starting and target positions of the aircraft;
[0091] Design the objective function to satisfy the constraint conditions simultaneously. The constraint conditions include: minimizing the path length, avoiding obstacles, meeting the motion constraints, and ensuring safety;
[0092] Based on the particle swarm optimization algorithm, establish a trajectory optimization model. Each particle generates an initial solution, representing a flight trajectory. The position of each particle consists of the position coordinates of the aircraft at different time steps, and the speed represents the displacement between different time steps. Calculate the fitness value of each particle according to the objective function. The fitness function includes path length, obstacle avoidance penalty, and constraint violation penalty;
[0093] Among them, the objective function formula is:
[0094] min(p + λ 1 ·c + λ 2 v)
[0095] In the formula, p represents the total path length of the aircraft trajectory, and the goal is to minimize the path length of the aircraft from the starting point to the end point;
[0096] Initialize the particle swarm, initialize the speed and position of the particles, and obtain the path length by calculating the sum of the distances between adjacent points;
[0097] If the trajectory of the particle passes through the safe range of the obstacle, then penalize the particle. If the distance between this point and the obstacle is less than the safe radius of the obstacle, then a collision occurs and a penalty is generated;
[0098] Among them, the calculation formula for the obstacle avoidance penalty is as follows:
[0099]
[0100] In the formula, x represents the set of trajectories, and x i represents the i-th trajectory point in the path, and O j represents the position of the j-th obstacle, and r j represents the safety radius of the j-th obstacle, and dist(x i , O j ) represents the Euclidean distance between the trajectory point x i and the obstacle O j . n is the total number of points in the trajectory, and m is the number of obstacles;
[0101] Calculate the constraint violation penalty, calculate the fitness value of each particle, and based on the calculated fitness value, update the velocity and position of each particle based on the particle swarm optimization algorithm;
[0102] The particle swarm optimization algorithm determines whether to stop the optimization process by setting termination conditions, including the maximum number of iterations and the convergence of the fitness value;
[0103] According to the update rules of the particle swarm optimization, adjust the velocity and position of each particle in order to find the optimal trajectory that satisfies the constraint conditions;
[0104] During the iteration process of the particle swarm optimization or other optimization algorithms, the flight trajectory is gradually optimized. By calculating the distance between each particle's trajectory and the obstacle, the trajectory path is adjusted to avoid the obstacle area;
[0105] Ensure that the velocity and acceleration of the aircraft at each time step are within the predetermined range. When the trajectory of a certain particle violates the constraint conditions, add a penalty term to force the optimization algorithm to adjust the path;
[0106] Based on the smoothing algorithm, smooth the optimized path to avoid sharp changes or excessive turning of the path;
[0107] Use simulation software to perform trajectory simulation to verify whether the optimized trajectory meets the motion constraints of the aircraft, whether it can avoid obstacles, and ensure that the aircraft is within the safe range, and conduct trajectory tests on the aircraft in the actual environment;
[0108] Output the optimal trajectory path of the aircraft, including the coordinate positions and velocity information of the aircraft at different time steps.
[0109] Step Four:
[0110] Obtain real-time sensor data and transmit it to the processing module through the flight vehicle's control system to obtain the positions, motion states, and environmental factors of obstacles around the flight vehicle in real time;
[0111] Use the sensor data to detect, identify, and track obstacles in real time, including static and dynamic obstacles;
[0112] Based on the sensor data, detect whether there is a deviation in the flight trajectory. When the flight vehicle approaches an obstacle or enters a no-fly zone, the system calculates a safe path and makes obstacle avoidance adjustments, re-plans the trajectory according to the sensor data, and dynamically updates the trajectory through real-time analysis of the environmental information and in combination with the motion constraint conditions of the flight vehicle.
[0113] Step Five:
[0114] Obtain sensor data every 1 - 2 seconds, make regular adjustments and optimizations to the flight trajectory to ensure that the flight trajectory is updated regularly as the flight environment changes, and ensure a spacing of more than the relative speed of the flight vehicle and the obstacle * 2 seconds;
[0115] The flight vehicle control system receives the optimized flight trajectory, including the specific points, time series, and flight constraint conditions of the flight path, converts the optimized flight trajectory into a series of specific control instructions, sets the target position, speed, and heading parameters, and sets the reference path of the flight vehicle according to the real-time feedback;
[0116] Based on the real-time monitoring of the current flight state by the sensor, compare the difference between the actual state of the flight vehicle and the target trajectory in real time, and perform error correction based on the PID control algorithm based on the real-time monitored error;
[0117] When the flight vehicle deviates from the target trajectory, adjust the control strategy through real-time feedback, correct the flight path, and according to the error feedback, the control system generates real-time control instructions to adjust the flight attitude and heading of the flight vehicle, including the magnitude, direction control, and tilt angle of the thrust;
[0118] Among them, the PID control algorithm formula is:
[0119]
[0120] In the formula, u(t) is the control input, e(t) is the error, K p is the proportional gain, K i is the integral gain, K d is the derivative gain, is the error accumulation.
[0121] In summary, the advantages of the present invention are:
[0122] Through the feedback of real-time sensor data, the flight trajectory can be dynamically adjusted to ensure that the aircraft updates the trajectory in real time in complex and changing environments, effectively avoiding obstacles and coping with environmental changes;
[0123] Combined with deep learning and particle swarm optimization algorithms, it can quickly generate an optimized flight trajectory in a complex environment while ensuring that the trajectory meets the motion constraints of the aircraft, such as speed, acceleration, rotation, etc.;
[0124] Through the obstacle avoidance algorithm and real-time update mechanism, this method can effectively prevent the aircraft from colliding with obstacles and ensure the safety of the flight path;
[0125] Through accurate motion constraint modeling and optimization, it is ensured that the aircraft strictly complies with various motion restrictions during the entire flight process and does not exhibit unsafe flight states;
[0126] Compared with traditional trajectory planning methods, this method improves the calculation efficiency through intelligent algorithms and optimization means, and can generate real-time trajectories more quickly to meet the requirements of a rapidly changing environment.
[0127] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification is only the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for generating a flight trajectory of an unmanned aerial vehicle, characterized in that: include: Input the initial position, target position, environmental information, information and motion constraints of the aircraft; Model the flight trajectory of the aircraft based on deep learning intelligent algorithms to obtain a preliminary flight trajectory; According to the motion constraints and environmental information of the aircraft, a flight trajectory optimization model is established to adjust the trajectory path to ensure that the aircraft is within a safe range and avoids obstacles; According to the information, the flight trajectory model is optimized and the trajectory path is adjusted to ensure that the aircraft is within an absolutely safe range and avoids obstacles; The sensor data is acquired every 1 to 2 seconds, and the flight trajectory is regularly adjusted and optimized to ensure that the flight trajectory is regularly updated as the flight environment changes, and the relative speed between the aircraft and the obstacle is maintained at a distance of more than 2 seconds. The optimized flight trajectory is executed through the aircraft control system, and the flight path is controlled and corrected in real time.
2. The method for generating a flight trajectory of an unmanned aerial vehicle according to claim 1, characterized in that: The input information of the aircraft also includes self-test information, which includes the actual flight distance and the total use time of the drive motor. When the ratio of the actual flight distance to the remaining distance is between 1.2:1 and 1:1; The calculation formula for the safety range between the aircraft and obstacles is: L=C (t / T) *X In the formula, L is the safe range between the aircraft and obstacles, X is the safe distance obtained by normal calculation, C is a constant set to 0.90-0.95, t is the total flight time, and T is the total estimated flight time of the aircraft; Use the aircraft's positioning system to read its current latitude, longitude, altitude and heading information to obtain the aircraft's initial coordinates; The coordinate information of the target point is obtained by inputting the latitude and longitude coordinates of the target location and the relative position of the set target; Collect environmental information within the flight area, including weather data, obstacle information, and terrain of the flight area, and obtain weather factors such as wind speed, temperature, air pressure, and humidity through meteorological sensors; Use the aircraft's lidar and computer vision sensors to collect information about obstacles in the flight path, and use map data to obtain information about ground height and terrain undulations; Set the maximum horizontal and vertical speed of the aircraft; The acquired initial position, target position, environmental data and motion constraints are converted into a unified format as input to the deep learning algorithm model.
3. The method for generating a flight trajectory of an unmanned aerial vehicle according to claim 2, characterized in that: The modeling of the flight trajectory of the aircraft based on the deep learning intelligent algorithm to obtain the preliminary flight trajectory specifically includes: Trajectory modeling based on neural network model is used to optimize the flight trajectory so that it can reach the target position from the initial position while avoiding obstacles and satisfying motion constraints; Input the initial position, target position, environmental information and motion constraint data of the aircraft. Assume that the input data is a vector. Each layer is processed by a nonlinear activation function to extract data features. The output layer outputs the trajectory coordinates of the aircraft. Design a loss function that takes into account flight distance, flight time, and obstacle avoidance factors; The neural network is trained using back-propagation and optimization algorithms. By minimizing the loss function, the model can output a flight trajectory that meets the constraints, avoids obstacles, and reaches the target effectively. The gradient descent method is used to optimize the model parameters, where the gradient descent method formula is: i i+1 =θ i -ηD θ L In the formula, θ i is the network parameter, η is the learning rate, Δ θ L is the gradient of the loss function with respect to the parameters, θ i+1 are the optimized network parameters.
4. The method for generating a flight trajectory of an unmanned aerial vehicle according to claim 3, characterized in that: The establishment of a flight trajectory optimization model based on the motion constraints and environmental information of the aircraft, and the adjustment of the trajectory path to ensure that the aircraft is within a safe range and avoids obstacles specifically include: Input the motion constraints of the aircraft, including speed limit, acceleration limit and rotation limit, and input environmental information, including obstacle location, weather conditions, and the starting and target locations of the aircraft; Designing an objective function while satisfying constraints, wherein the constraints include minimizing path length, avoiding obstacles, satisfying motion constraints, and safety; Based on the particle swarm optimization algorithm, a trajectory optimization model is established, and the fitness value of each particle is calculated according to the objective function; According to the update rules of particle swarm optimization, the speed and position of each particle are adjusted to find the optimal trajectory that meets the constraints; In the iterative process of particle swarm optimization or other optimization algorithms, the flight trajectory is gradually optimized by calculating the distance between each particle trajectory and the obstacle, adjusting the trajectory path to avoid the obstacle area; Ensure that the speed and acceleration of the aircraft are within the predetermined range at each time step. When the trajectory of a particle violates the constraints, a penalty term is added to force the optimization algorithm to adjust the path. Smoothing the optimized path based on a smoothing algorithm to avoid sharp changes or excessive turns in the path; Use simulation software to simulate the trajectory, verify whether the optimized trajectory meets the motion constraints of the aircraft, whether it can avoid obstacles, and ensure that the aircraft is within a safe range, and conduct trajectory tests of the aircraft in the actual environment; Output the optimal trajectory path of the aircraft, including the coordinate position and velocity information of the aircraft at different time steps.
5. The method for generating a flight trajectory of an unmanned aerial vehicle according to claim 4, characterized in that: The design objective function satisfies the constraints at the same time, and the constraints include: minimizing the path length, avoiding obstacles, satisfying the motion constraints and safety. Specifically, they include: Among them, the objective function formula is: min(p+λ1·c+λ2v) Where p represents the total path length of the aircraft trajectory, and the goal is to minimize the path length of the aircraft from the starting point to the end point.
6. The method for generating a flight trajectory of an unmanned aerial vehicle according to claim 5, characterized in that: The process of establishing a trajectory optimization model based on the particle swarm optimization algorithm and calculating the fitness value of each particle according to the objective function specifically includes: Initialize the particle swarm, initialize the particle speed and position, and obtain the path length by calculating the sum of the distances between adjacent points; If the particle's trajectory passes through the safety range of the obstacle, the particle will be penalized. If the distance between the point and the obstacle is less than the safety radius of the obstacle, a collision occurs, resulting in a penalty. Calculate the constraint violation penalty, calculate the fitness value of each particle, and based on the calculated fitness value, update the speed and position of each particle based on the particle swarm optimization algorithm; The particle swarm optimization algorithm decides whether to stop the optimization process by setting termination conditions, including the maximum number of iterations and the convergence of fitness values.
7. The method for generating a flight trajectory of an unmanned aerial vehicle according to claim 6, characterized in that: If the particle's trajectory passes through the safety range of the obstacle, the particle will be penalized. If the distance between the point and the obstacle is less than the safety radius of the obstacle, a collision has occurred, resulting in a penalty. include: Among them, the calculation formula of obstacle avoidance penalty is: In the formula, x represents the set of trajectories, x i represents the i-th trajectory point in the path, O j represents the position of the jth obstacle, r j represents the safety radius of the jth obstacle, dist(x i ,O j ) represents the trajectory point x i To obstacle O j is the Euclidean distance between them, n is the total number of points in the trajectory, and m is the number of obstacles.
8. The method for generating a flight trajectory of an unmanned aerial vehicle according to claim 7, characterized in that: The acquisition of real-time sensor data, dynamic adjustment and optimization of the flight trajectory, and ensuring that the flight trajectory is updated in real time as the flight environment changes specifically include: Acquire real-time sensor data and transmit it to the processing module through the aircraft's control system to obtain the obstacle position, motion status and environmental factors around the aircraft in real time; Use sensor data to detect, identify and track obstacles in real time, including both static and dynamic obstacles; Based on sensor data, the system detects whether there are deviations in the flight trajectory. When the aircraft approaches an obstacle or enters a no-fly zone, the system calculates a safe path and makes obstacle avoidance adjustments. It replans the trajectory based on sensor data and dynamically updates the trajectory through real-time analysis of environmental information combined with the aircraft's motion constraints.
9. The method for generating a flight trajectory of an unmanned aerial vehicle according to claim 8, characterized in that: The method of executing the optimized flight trajectory through the aircraft control system and performing real-time control and correction of the flight path specifically includes: The aircraft control system receives the optimized flight trajectory, including the specific points of the flight path, the time sequence and the flight constraints, converts the optimized flight trajectory into a series of specific control instructions, sets the target position, speed and heading parameters, and sets the reference path of the aircraft based on the real-time feedback; Based on the sensor, the current flight status is monitored in real time, and the difference between the actual status of the aircraft and the target trajectory is compared in real time. Based on the error monitored in real time, the error is corrected based on the PID control algorithm; When the aircraft deviates from the target trajectory, the control strategy is adjusted through real-time feedback to correct the flight path. Based on the error feedback, the control system generates real-time control instructions to adjust the flight attitude and heading of the aircraft, including the thrust, directional control and tilt angle.
10. The method for generating a flight trajectory of an unmanned aerial vehicle according to claim 9, characterized in that: The sensor monitors the current flight status in real time, compares the difference between the actual status of the aircraft and the target trajectory in real time, and performs error correction based on the PID control algorithm based on the error monitored in real time. include: Among them, the PID control algorithm formula is: In the formula, u(t) is the control input, e(t) is the error, K p is the proportional gain, K i is the integral gain, K d is the differential gain, Accumulation of errors.
Citation Information
Cited By
Low-altitude flight trajectory optimization method and system
CN121954027A
A low-altitude flight trajectory optimization method and system
CN121954027B