A method for aircraft obstacle avoidance trajectory planning based on physics-driven neural network
By combining the aircraft dynamics model with a neural network, optimizing the state and control variable networks, and generating obstacle avoidance trajectories, the problems of large computational complexity and insufficient generalization capability in existing methods are solved, and fast and effective obstacle avoidance trajectory planning is achieved.
Patent Information
- Application Number
- CN202410951708.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-07-16
AI Technical Summary
Existing aircraft obstacle avoidance trajectory planning methods have large computational complexity and slow convergence speed when dealing with complex obstacle areas, and are difficult to meet the needs of rapid planning. In addition, existing neural network methods have insufficient generalization capabilities beyond training data and are difficult to apply to actual scenarios.
Build a dynamic model of the aircraft, generate a nominal trajectory, use the feedforward neural network of state variables and control variables for pre-training, optimize the network by minimizing the loss function, generate an obstacle avoidance trajectory, combine the obstacle area and physical equation constraints, optimize the control variable network, and generate an obstacle avoidance control variable sequence.
It achieves fast and effective obstacle avoidance trajectory planning with strong generalization ability and global optimization characteristics, avoids the tedious process of initial value estimation, and improves planning efficiency and interpretability.
Smart Images

Figure CN118963377B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of aircraft obstacle avoidance, and in particular to an aircraft obstacle avoidance trajectory planning method based on a physics-driven neural network. Background Art
[0002] Due to the limitations of natural geographical environment or political and military considerations, such as Figure 1 As shown in the figure, aircraft often need to avoid specific obstacles. To achieve this, they must leverage their lateral maneuverability to plan a trajectory that avoids obstacles. Aircraft trajectory planning is essentially a constrained optimal control problem. Currently, the most mature approach is numerical solution. This involves first transforming the trajectory planning problem into a standard general optimization problem solvable by mathematical optimization methods, and then using relatively mature optimization algorithms to find its numerical solution. These numerical methods can be categorized into indirect and direct methods based on the form of the transformation.
[0003] The idea of the indirect method for solving optimal control problems is to construct a two-point boundary value problem, use the Pontryagin maximum principle to derive the first-order necessary conditions for the optimal solution, and ultimately obtain the analytical relationship between the control variable, state variable, and analytical solution. For problems with strong nonlinearity, it is difficult to obtain an analytical solution directly, so numerical methods are often used to solve boundary value problems in engineering. The main advantages of the indirect method are high accuracy and solutions that meet first-order optimality. However, in practical applications, there are disadvantages such as a cumbersome derivation process, difficulty in estimating the initial values of unknown variables, and a small convergence domain, which affect its solution efficiency. In recent years, strategies such as co-state normalization and heuristic initial value search have been used to improve the performance of the indirect method, with good results.
[0004] Compared to indirect methods, direct methods are less sensitive to initial values, have a larger convergence region, and can handle more complex constraints. Direct methods first utilize parameterization to transform the optimal control problem in continuous space into a nonlinear programming (NLP) problem for discrete systems. They then employ numerical methods to directly solve the NLP problem and obtain the optimal solution. Depending on the discrete object, direct methods can be categorized into three types: those that discretize only the control variables, those that discretize only the state variables, and those that discretize both the control variables and the state variables.
[0005] Traditional numerical methods, when dealing with complex problems, suffer from high computational complexity and slow convergence due to the large initial search space and unavoidable integration processes, making them difficult to meet the demands of rapid planning. Therefore, applying neural networks and deep learning to solving optimization and control problems holds great promise and value in improving solution efficiency and quality.
[0006] In recent years, scholars have proposed many new methods for trajectory optimization with obstacle constraints, based on direct or indirect methods. One existing method for rapidly generating aircraft obstacle avoidance trajectories involves constructing an aircraft obstacle avoidance trajectory optimization problem based on the aircraft's kinematic and dynamic models. The optimization problem's constraints are the endpoint constraints of the aircraft's trajectory planning and the obstacle avoidance constraints during flight. The objective function is to minimize the aircraft's comprehensive performance index, taking into account a time performance index function and an overload integral performance index function. The flight trajectory equation is then represented by a polynomial, transforming the obstacle avoidance constraints into an obstacle avoidance performance index function and incorporating a comprehensive performance index. The time performance index function, overload integral performance index function, and obstacle avoidance performance index function are simplified to obtain the obstacle avoidance trajectory optimization result.
[0007] The disadvantages of the above-mentioned method for quickly generating an aircraft obstacle avoidance trajectory in the prior art include: this method chooses to construct a polynomial to represent the flight trajectory, the accuracy is affected by the order, and it only considers the obstacle avoidance process method within the plumb plane.
[0008] Another obstacle avoidance flight control system for an aircraft in the prior art includes an obstacle avoidance flight control module and a data storage module. A preset deep neural network is trained using data obtained through pseudospectral simulation as samples to obtain a preset obstacle avoidance trajectory planning model. This obstacle avoidance trajectory planning model is used to generate an optimized trajectory, and the aircraft is controlled according to the optimized trajectory. This obstacle avoidance flight control system improves the speed of obstacle avoidance trajectory planning, thereby enhancing the real-time performance of the aircraft's obstacle avoidance flight control.
[0009] The shortcomings of the obstacle avoidance flight control system of another aircraft in the above-mentioned prior art include: the system uses the data obtained by pseudo-spectral simulation as samples to train the deep neural network offline. Although it improves the speed of online planning, it lacks the ability to generalize to problems outside the training data and is difficult to apply to actual scenarios. Summary of the Invention
[0010] An embodiment of the present invention provides an aircraft obstacle avoidance trajectory planning method based on a physics-driven neural network, so as to effectively plan the obstacle avoidance trajectory of the aircraft.
[0011] In order to achieve the above-mentioned purpose, the present invention adopts the following technical solutions.
[0012] constructing a dynamic model of the aircraft, and generating a nominal trajectory of the aircraft using the dynamic model;
[0013] Constructing state variable network NN u , using the state variable network to construct the proposed state variable The state variable network is pre-trained using the nominal trajectory to obtain a pre-trained state variable network NN u ;
[0014] Constructing the control variable network NN ctrl , the normalized time series on the nominal trajectory of the aircraft is input into the pre-trained state variable network NN u and control variable network NN ctrl , using obstacle area information and nominal trajectory data to calculate the loss function including obstacle area constraints and physical equation residual constraints, and optimizing the two networks simultaneously by minimizing the loss function to obtain the trained state variable network NN u and control variable network NN ctrl ;
[0015] Using the trained control variable network NN ctrl Construct the obstacle avoidance control variable sequence, substitute the obstacle avoidance control variable sequence into the differential equation of the aircraft, and use the trained state variable network NN to calculate the obstacle avoidance control variable sequence. u Use the numerical integration method to solve the differential equation to obtain the obstacle avoidance trajectory of the aircraft, and verify whether the obstacle avoidance trajectory meets the predetermined performance indicators. If it does, output the obstacle avoidance trajectory and control angle sequence; if it does not, continue to optimize the state variable network NN u and control variable network NN ctrl , regenerate the aircraft's obstacle avoidance trajectory until the aircraft's obstacle avoidance trajectory meets the performance indicators.
[0016] Preferably, the step of constructing a dynamic model of the aircraft and generating a nominal trajectory of the aircraft using the dynamic model includes:
[0017] Construct the dynamic model of the aircraft. The kinematic model expression is as follows:
[0018]
[0019] Among them G V is the transformation matrix from the velocity coordinate system to the launch coordinate system, which is determined by the trajectory inclination angle θ V , trajectory angle ψ V , tilt angle γ V Characterize, the expression is:
[0020]
[0021] Among them, the ballistic inclination angle and ballistic deviation angle can be calculated from the velocity component, and V is the magnitude of the velocity in the launch system:
[0022]
[0023] C in the equation D,C L ,C z is the aerodynamic coefficient, which is related to the angle of attack (α) and the Mach number (Ma). The variables to be determined in the equations are the angle of attack α and the bank angle γ V ,These two variables serve as control variables to control the flight trajectory of the aircraft;
[0024] The nominal trajectory of the aircraft is generated based on the dynamic model of the aircraft by using the fourth-order Runge-Kutta integration method. The nominal trajectory is the flight trajectory when the obstacle avoidance control angle and the roll angle are constantly zero.
[0025] Preferably, the method of generating a nominal trajectory of the aircraft based on the dynamic model of the aircraft by a fourth-order Runge-Kutta integration method, wherein the nominal trajectory is a flight trajectory when the obstacle avoidance control angle and the roll angle are constantly 0, comprises:
[0026] The dynamic model of the aircraft constructed by the differential equations is a set of ordinary differential equations with t as the independent variable, which describes the changes of the six state variables and their relationship with each other. In this set of differential equations, the angle of attack α and the roll angle γ V It is the variable that affects the aerodynamic term. Given the state variable u=(V x ,V y ,V Z ,x,y,z), and gives the attack angle α and the roll angle γ V The sequence or calculation function is solved by the Runge-Kutta method to obtain the nominal trajectory information of the aircraft, which includes the geometric path of the aircraft, the speed and acceleration information of the aircraft, and the angle of attack α is the maximum lift-to-drag ratio C that the aircraft can achieve at the current speed. L / C D Angle of attack, bank angle γ V As a control angle, it can avoid obstacles.
[0027] Preferably, the state variable network NN is constructed u , using the state variable network to construct the proposed state variable The state variable network is pre-trained using the nominal trajectory to obtain a pre-trained state variable network NN u ,include:
[0028] Constructing state variable network NN u , the state variable network NN u The structure is a feedforward neural network, and the input is the normalized time series t on the nominal trajectory. * , output The normalization method of time variables is:
[0029]
[0030] Where t is the normalized time series on the nominal trajectory, μ t is the mean of the sequence, μ is the variance of the sequence, The calculation formula is:
[0031]
[0032] The proposed method for constructing the state variables is to transform the state variable network NN u Output After denormalization, the position variable is assumed to be Then, the predicted speed variable is obtained through automatic differentiation The specific expression is:
[0033]
[0034] By minimizing the error between the state variable assumption and the nominal trajectory state variable, the state variable network NN is adjusted according to the error. u Parameters of the pre-trained state variable network NN u Repeat the above process continuously, and after the training is completed, the pre-trained state variable network NN is obtained. u .
[0035] Preferably, the obstacle area information and the nominal trajectory data are used to calculate the loss function including the obstacle area constraint and the physical equation residual constraint, and the two networks are optimized simultaneously by minimizing the loss function to obtain the trained state variable network NN u and control variable network NN ctrl ,include:
[0036] Constructing state variable network NN ctrl , state variable network NN ctrl The structure is a feedforward neural network, and the input is the normalized time series t on the nominal trajectory. * , output The range is between [-1,1], multiplied by the maximum value allowed by the control angle to obtain the proposed obstacle avoidance control angle It satisfies the range constraint; the normalized time series on the nominal trajectory of the aircraft is input into the pre-trained state variable network NN u and control variable network NN ctrl , calculate the state variables and control variables to be set Set the loss function to state error loss Loss u , initial state loss Loss start , differential equation residual loss Loss res , control angle loss Loss ctrl, and obstacle zone constraint loss Loss forbid The weighted sum of and optimizes the pre-trained state variable network NN by minimizing the loss function u and control variable network NN ctrl Parameters;
[0037] State error loss Loss u Calculate the mean square error between the proposed state variable and the nominal trajectory, expressed as:
[0038]
[0039] where N t Indicates the selected N t Time points; initial state loss Loss start is the Loss at t = 0 u ; Differential equation residual loss Loss res Minimize the residual of the differential equation, Loss res The calculation formula is as follows:
[0040]
[0041] Where rk4() represents one-step integration using the Runge-Kutta integration method, with the step length equal to the time interval;
[0042] Control angle loss Loss ctrl Make the control angle as small as possible. The calculation method is as follows:
[0043]
[0044] Obstacle area constraint loss Loss forbid Calculate the distance from the aircraft to the center of each no-fly zone. If it is greater than the radius of the no-fly zone, record it as 0. If it is less than the radius of the no-fly zone, record it as the maximum distance d from the aircraft to the edge of the no-fly zone. Finally, sum all d. The closer the point is to the center of the obstacle zone, the greater the loss applied. forbid The greater the loss, the greater the loss. forbid The calculation formula is as follows:
[0045]
[0046] Among them A i for is the center of the j-th obstacle area, is the radius of the jth obstacle zone, ∈ "relaxation factor", which is 2% of the maximum radius of the obstacle zone;
[0047] The loss function Loss is expressed as:
[0048] Loss=w1*Loss u +w2*Loss start +w3*Loss res +w4*Loss ctrl +w5*Loss forbid ;
[0049] Optimize the pre-trained state variable network NN by minimizing the value of the loss function Loss u and control variable network NN ctrl Parameters of the trained state variable network NN u and control variable network NN ctrl .
[0050] Preferably, the performance indicators include:
[0051] a. Maximum absolute value of the roll angle (°): This indicator reflects the maximum roll angle required by the aircraft during the entire obstacle avoidance process.
[0052] b. Maximum rate of change of roll angle (° / s): This indicator reflects the maximum rate of change of the roll angle during obstacle avoidance.
[0053] c. Maximum range ratio: This metric calculates the ratio of the maximum range of the obstacle avoidance trajectory to the maximum range of the nominal trajectory under the same time conditions;
[0054] d. End point distance (km): This metric calculates the distance between the obstacle avoidance trajectory and the nominal trajectory end point under the same time constraints. The smaller the end point distance, the more conducive it is to completing subsequent flight missions.
[0055] e. Shortest distance to obstacle center: This metric calculates the shortest distance between the aircraft and the center of an obstacle during obstacle avoidance.
[0056] Preferably, the control variable network NN that is trained is used ctrl Construct the obstacle avoidance control variable sequence, substitute the obstacle avoidance control variable sequence into the differential equation of the aircraft, and use the trained state variable network NN to calculate the obstacle avoidance control variable sequence. u The numerical integration method is used to solve the differential equations to obtain the obstacle avoidance trajectory of the aircraft, including:
[0057] Using the trained control variable network NN ctrl Construct an obstacle avoidance control variable sequence, substitute the obstacle avoidance control variable sequence into the differential equation of the aircraft, set the optimization target and constraint conditions of the differential equation of the aircraft, the constraint conditions include obstacle area constraint, endpoint constraint, starting point constraint, thermal environment constraint, normal overload constraint and control amount constraint, based on the trained state variable network NN u The numerical integration method is used to solve the differential equation and obtain the obstacle avoidance trajectory of the aircraft.
[0058] It can be seen from the technical solutions provided by the above-mentioned embodiments of the present invention that, compared with traditional numerical methods, the method of the present invention combines physical modeling with neural networks, utilizes the general approximation ability of neural networks for functions, and has the advantages of not requiring initial value estimation and strong generalization ability; compared with biological intelligence optimization algorithms, it has the characteristics of global optimization and a faster optimization speed; compared with current artificial intelligence methods, this method embeds physical knowledge into the network in the form of differential equations, does not require the trajectory planning data to be obtained by other methods in advance, and has better interpretability and generalization ability.
[0059] Additional aspects and advantages of the present invention will be set forth in part in the following description, will become apparent from the following description, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0061] Figure 1 A schematic diagram of an obstacle avoidance task in the prior art;
[0062] Figure 2 A framework diagram of an obstacle avoidance trajectory planning model based on a physics-driven neural network provided by an embodiment of the present invention;
[0063] Figure 3 This is a schematic diagram of the specific steps of an obstacle avoidance trajectory planning algorithm proposed in an embodiment of the present invention after given planning starting point and obstacle area information. DETAILED DESCRIPTION
[0064] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limiting the present invention.
[0065] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the description of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or couplings. The term "and / or" used herein includes any unit and all combinations of one or more associated listed items.
[0066] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art in the art to which the present invention pertains. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and, unless defined as such herein, will not be interpreted in an idealized or overly formal sense.
[0067] To facilitate understanding of the embodiments of the present invention, several specific embodiments will be further explained below with reference to the accompanying drawings, and each embodiment does not constitute a limitation on the embodiments of the present invention.
[0068] This paper proposes a method for aircraft obstacle avoidance trajectory planning based on a physics-driven neural network. This method constructs proxy models of state variables and control variables using a feedforward neural network. These two networks are then jointly optimized using a loss function that incorporates obstacle zone constraints and physical equation residual constraints. Finally, the method simultaneously outputs the obstacle avoidance trajectory and the corresponding control angle sequence.
[0069] The processing flow chart of a method for aircraft obstacle avoidance trajectory planning based on a physical driven neural network provided by an embodiment of the present invention is as follows: Figure 3 As shown, the processing steps include the following:
[0070] Step S10: constructing a dynamic model of the aircraft, and generating a nominal trajectory of the aircraft using the dynamic model.
[0071] Applying Newtonian mechanics and kinematics, a set of differential equations for the aircraft in three-dimensional space is established. The aircraft's initial state (including position, velocity, and orientation) and physical parameters (such as drag coefficient and lift coefficient) are input. Numerical integration methods (such as the Runge-Kutta method) are used to solve the differential equations, outputting the aircraft's nominal trajectory in an uncontrolled environment. This step utilizes existing numerical simulation technology for aircraft motion to construct a dynamic model of the aircraft. This dynamic model is then used to generate the aircraft's nominal trajectory using the fourth-order Runge-Kutta integration method. This trajectory is then used to calculate the loss function in step S20, "pre-training the state variable network," and step S30, "jointly optimizing the state variable and control variable networks."
[0072] Step S20: state variable network pre-training.
[0073] Constructing state variable network NN u , which is a feedforward neural network with the input being the normalized time series on the nominal trajectory. The output of the network is used to construct the proposed state variable By minimizing the error between the state variable assumption and the nominal trajectory state variable, the state variable network NN is adjusted according to the error. u Parameters of the pre-trained state variable network NN u Repeat the above process continuously, and after the training is completed, the pre-trained state variable network NN is obtained. u ; The network will be further optimized in subsequent steps.
[0074] Step S30: Jointly optimize the state variable and control variable network.
[0075] Constructing the control variable network NN ctrl , which is a feedforward neural network. The normalized time series on the nominal trajectory of the aircraft is input into the pre-trained state variable network NN u and control variable network NN ctrl , using the obstacle area information, the nominal trajectory data output in step S10, and the variables constructed by the two networks to simulate and calculate the loss function including the obstacle area constraint and the physical equation residual constraint, and by minimizing the weighted sum of the loss function, simultaneously optimize the pre-trained state variable network NN u and control variable network NN ctrl Finally, this step outputs the trained state variable network NN u and control variable network NN ctrl .
[0076] NN_ctrl is a neural network whose input is normalized time and whose output is a value in the range [-1, 1]. This value is multiplied by a control variable (the roll angle gamma_v in the equation) to obtain the predicted obstacle avoidance control variable. If the input is a time series, the output is a sequence of control variables. Step S40: Verification and output.
[0077] The input of this step is the control angle sequence constructed by the control variable network NN_ctrl.
[0078] First, NN ctrl The output control angle sequence is substituted into the aircraft's differential equations and solved again using numerical integration to obtain the obstacle avoidance trajectory. The system then verifies whether the obstacle avoidance trajectory under this control meets the predetermined performance criteria. If so, the obstacle avoidance trajectory and control angle sequence are output. If not, the system returns to step S30 and continues optimizing the network until a trajectory that meets the performance criteria is found.
[0079] The three-dimensional center of mass motion modeling and problem definition of the aircraft are as follows:
[0080] Motion modeling, in the launch coordinate system with the sub-satellite point of the gliding starting point as the coordinate origin and the initial heading as the x-axis, according to Newtonian mechanics and kinematics principles, the differential equations of the aircraft motion in the launch system are:
[0081]
[0082] Among them G V It is the transformation matrix from the velocity coordinate system to the launch coordinate system, which is composed of the ballistic inclination angle (velocity inclination angle) θ V , trajectory deviation angle (track yaw angle) ψ V , roll angle (speed tilt angle) γ V Characterize. The expression is:
[0083]
[0084] Among them, the ballistic inclination angle and ballistic deviation angle can be calculated from the velocity component, and V is the magnitude of the velocity in the launch system:
[0085]
[0086] C in the equation D ,C L ,C z is the aerodynamic coefficient, which is related to the angle of attack (α) and the Mach number (Ma).
[0087] Thus, the variables to be determined in the equations are the angle of attack α and the roll angle γ VThese two variables can be used as control variables to control the flight trajectory of the aircraft. Since the angle of attack has a significant impact on aerodynamic changes, in order to fully utilize the aerodynamic capabilities of the aircraft, the angle of attack can be designed using a certain procedure (for example, the angle of attack that achieves the maximum lift-to-drag ratio), and the bank angle is selected as the obstacle avoidance control variable.
[0088] The mathematical model of the aircraft constructed by the above differential equations is a set of ordinary differential equations with t as the independent variable, which describes the changes of the six state variables and their relationship with each other. In this set of differential equations, the angle of attack α and the bank angle γ V It is a variable that affects the aerodynamic term and needs to be given as an additional input. Given the state variable u=(V x ,V y ,V Z ,x,y,z), and gives the attack angle α and the roll angle γ V The sequence or calculation function can be used to solve the complete set of ordinary differential equations using the Runge-Kutta method to obtain the complete trajectory information of the aircraft. It should be noted that the "trajectory" not only presents the geometric path of the aircraft, but also includes the speed and acceleration information of the aircraft. In the present invention, the angle of attack α is the maximum lift-to-drag ratio (C L / C D ) so that the aircraft can obtain the longest possible range, and the roll angle γ V As a control angle, it can avoid obstacles.
[0089] Obstacle avoidance trajectory planning is essentially a multi-constrained optimization problem. In this invention, the optimization goal is to make the planned trajectory as close as possible to the nominal trajectory. The constraints include obstacle area constraints and endpoint constraints for the starting and ending points.
[0090] Optimization objective: Let the uncontrolled trajectory sequence be s(t), where the optimized variable is the roll angle γ V Always equal to 0; trajectory sequence u(t) after obstacle avoidance, roll angle sequence γ V (t). The optimization goal is to make the planned trajectory as close to the nominal trajectory as possible and the control amount as small as possible:
[0091]
[0092] Obstacle zone constraint: The obstacle zone refers to the area that the aircraft needs to avoid during flight. For ease of processing, it is assumed that the threat zone is an infinitely high cylinder, and the closer to the center of the circle, the greater the threat. Let the center of the i-th obstacle zone be at point The radius is The position of the aircraft is A(λ a ,φ a ), then the obstacle constraint can be expressed as:
[0093]
[0094] in The geographical distance between points A and B can be calculated using the following formula:
[0095]
[0096] Endpoint constraints are constraints on the state variables of the starting and end points after optimization, including starting point constraints and end point constraints.
[0097] The starting point constraint expression is:
[0098] u(t M )=s(t M )
[0099] Because the present invention does not use angle of attack as a design variable, but instead consistently selects the angle of attack that maximizes the aircraft's lift-to-drag ratio for maximum range, it imposes no constraints on the endpoint position. However, it is still desirable for the aircraft to fly as far as possible after avoiding obstacles, and for the endpoint to be as close to the nominal trajectory as possible, to facilitate the completion of subsequent flight missions.
[0100] Thermal environment constraints: To avoid aerodynamic ablation, the dynamic pressure q and the stagnation heat flux q need to be s To restrict:
[0101]
[0102] Among them C q =9.4369×10 ―5 .
[0103] Normal overload constraint: To meet the structural strength limit, normal overload constraint needs to be applied:
[0104]
[0105] Control quantity constraints: To avoid stalling, the control quantity size and change rate are also limited:
[0106] |α|≤α max ,|γ V |≤γ Vmax
[0107]
[0108] This paper proposes a model framework for obstacle avoidance trajectory planning based on physical driven neural network. Figure 2As shown in Figure 2, the proposed algorithm consists of three main parts: a deep feedforward network, variable reconstruction, and loss calculation. Two deep feedforward networks act as function fitters, mapping timestamps t to state variables and control variables, respectively. The variable reconstruction part processes network inputs and outputs through normalization and automatic differentiation, ensuring they meet range constraints and accelerating training. The loss calculation part integrates various constraints and objective functions for network training.
[0109] Specifically, the state variable network NN u The input is the normalized independent variable t, and the output is the normalized position variable The three state variables are denormalized to obtain Then the speed variable is obtained through automatic differentiation Control variable network NN ctrl The input is also the normalized independent variable t * , NN ctrl Output After a layer of tanh scaling to the range of [-1,1], and then multiplied by the maximum value, the control variable Satisfy the range constraints. Finally, by minimizing the four losses (Loss u ,Loss res ,Loss ctrl ,Loss forbid ) to optimize NN u and NN ctrl Parameters of the four losses. u and Loss ctrl Corresponding optimization target; Loss forbid Corresponding obstacle area constraints; Loss res Minimize the residual of the differential equation, the goal is to learn the control variables and ensure that the various physical quantities are physically consistent
[0110] Using the above model framework, the specific steps of the obstacle avoidance trajectory planning algorithm proposed in the embodiment of the present invention after given planning starting point and obstacle area information are as follows: Figure 3 As shown. First, the input starting point information is used as the initial value, the roll angle is always kept at 0, and the fourth-order Runge-Kutta method is used to integrate the dynamic equations of the aircraft to obtain a nominal trajectory. Since we hope that the planned trajectory is as close as possible to the nominal trajectory, we first u Pre-training is performed to learn the mapping from normalized time to normalized state variables. Experiments show that pre-training is not necessary, but it can speed up the subsequent trajectory planning and make the planning process more stable. Then, within a fixed training round, the above model framework is used to jointly train the state variable network NN u and control variable network NNctrl , optimize the state variables and control variables at the same time. Finally, NN ctrl Output control variable sequence Substitute it into the differential equation of the aircraft and use the fourth-order Runge-Kutta method to integrate it again to verify whether the flight trajectory under this control can meet the predetermined performance indicators. If it does, output Otherwise, the neural network continues to train until a trajectory that meets the performance criteria is found. In this way, a flight trajectory that is as close to the nominal trajectory as possible and avoids obstacles can be planned, ensuring safe flight of the aircraft.
[0111] Algorithm Implementation
[0112] Data normalization
[0113] In order to unify the data to the same level and eliminate the dimensionality effects between different features, thereby accelerating the convergence of the model and providing a more stable and reliable foundation for subsequent modeling and analysis, one normalization method is Z-Score normalization:
[0114]
[0115] It is worth noting that for z, its value in the nominal trajectory is always 0, which does not conform to the expected planned trajectory. Therefore, the mean of z is set to the maximum radius of the obstacle area and the variance is set to 0.
[0116] Variable Refactoring
[0117] The differential equations for the motion of the aircraft in the launch system contain 6 equations, corresponding to 6 state variables. x ,V y ,V z The relationship between is relatively simple, so NN u Only three variables are output, and the speed state is further obtained through the automatic differentiation mechanism. Due to the application of Z score normalization, the calculation formula from the neural network output to the predicted value of each state variable is as follows:
[0118]
[0119] AD is the abbreviation of Automatic Differentiation, which stands for automatic differentiation.
[0120] For the control variable γ V , in order to ensure that it is within a certain range, it is reconstructed by the following formula:
[0121]
[0122] in It's NNctrl Output.
[0123] Loss function construction
[0124] The present invention converts the system's initial value equality constraints, path inequality constraints, and differential equation equality constraints into penalty functions, which together with the optimization objective form the so-called loss function. Specifically, the loss function consists of the following items:
[0125] ①Loss u
[0126] This loss calculates the mean squared error between the normalized state variable proxy model and the nominal trajectory, with the goal of making the predicted trajectory as close to the nominal trajectory as possible. It can be expressed as:
[0127]
[0128] where N t Indicates the selected N t Time point. Initial state loss Loss start Actually, it is the Loss at t=0 u , this item is given a larger weight in order to make the planning trajectory satisfy the initial value constraints as much as possible.
[0129] ②Loss start
[0130] Loss start Actually, it is the Loss at t=0 u , this item is given a larger weight in order to make the planning trajectory satisfy the initial value constraints as much as possible.
[0131] ③Loss res
[0132] This loss attempts to minimize the residual of the differential equation. This loss can be used to collaboratively optimize the NN u and NN ctrl On the one hand, the predicted trajectory is self-consistent, and on the other hand, the corresponding obstacle avoidance control angle sequence is obtained. res The calculation formula is as follows:
[0133]
[0134] Here, rk4() represents a one-step integration using the Runge-Kutta integration method, where the step size is equal to the time interval.
[0135] ④Loss ctrl
[0136] The purpose of this item is to make the control angle as small as possible to ensure that the aircraft flies as smoothly as possible. The calculation method is as follows:
[0137]
[0138] ⑥Loss forbid
[0139] For each coordinate position, this item calculates the distance from the center of each no-fly zone. If it is greater than the radius of the no-fly zone, it is recorded as 0. If it is less than the radius of the no-fly zone, it is recorded as the maximum distance d from the edge of the no-fly zone. Finally, all d are summed. In this way, the closer the point is to the center of the obstacle zone, the greater the loss applied. forbid The greater the loss. forbid The calculation formula is as follows:
[0140]
[0141] Among them A i for is the center of the j-th obstacle area, is the radius of the jth obstacle zone, ∈ "relaxation factor", which is 2% of the maximum radius of the obstacle zone.
[0142] In summary, the loss function Loss can be expressed as:
[0143] Loss=w1*Loss u +w2*Loss start +w3*Loss res +w4*Loss ctrl +w5*Loss forbid
[0144] If there are other constraints such as thermal environment constraints, normal overload constraints, etc. during flight, the Loss forbid A similar form is added to the loss function.
[0145] 1) Network optimization
[0146] From the specific expression of the loss function, we can see that NN u With Loss u ,Loss start ,Loss res ,Loss forbid Related, and NN ctrl With Loss res ,Loss ctrl By minimizing the weighted sum of the loss function through a gradient-based optimizer, we can theoretically obtain a trajectory that can avoid obstacles and the corresponding obstacle avoidance control. u ,Loss start and Loss forbid It mainly plays the role of planning trajectory, while Lossres Used to optimize control variables.
[0147] The optimization process of a neural network is non-convex, and hyperparameters such as the loss function weight and learning rate affect the accuracy of the solution. The loss function weight is manually set based on the importance of each item in the loss function, and then adjusted based on the actual planning results after the order is fixed.
[0148] This paper uses the Adaptive Moment Estimation (Adam) optimizer. Adam combines the advantages of the momentum and RMSprop algorithms, dynamically adjusting the learning rate of each parameter through first- and second-order moment estimation, thereby improving optimization efficiency. This optimizer is insensitive to parameter initialization, suitable for non-stationary targets, and has high computational efficiency.
[0149] In order to better optimize the loss function, the present invention also introduces the NN u Pre-training of NN. u In the pre-training phase, learn to fit the nominal trajectory, and then focus on optimizing the Loss in the trajectory planning phase. forbid Loss term, experiments have found that this approach can significantly improve the planning speed and improve the stability of the solution; it is especially beneficial for tasks with fixed initial values that need to plan trajectories for different obstacle areas.
[0150] In summary, the embodiment method of the present invention constructs proxy models of state variables and control variables, and jointly optimizes the two networks using a loss function that integrates obstacle zone constraints and physical equation residual constraints to output obstacle avoidance trajectories and corresponding control angle sequences. Compared with traditional numerical methods, this method utilizes the universal approximation capability of neural networks, avoids the tedious process of initial value estimation, and improves generalization capabilities; compared with genetic algorithms, reinforcement learning and other methods, it has global optimization characteristics and a faster optimization speed; compared with base data-driven methods, by embedding physical knowledge, the present invention has better interpretability and generalization capabilities, and does not require a large amount of training data. In addition, through pre-training and Adam optimizer selection, the present invention improves the computational efficiency of the algorithm and shortens the planning time. The present invention has a wide range of applicability and can be applied to different types of aircraft. It can also include constraints required by other missions by adding loss function terms.
[0151] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.
[0152] From the above description of the embodiments, it can be seen that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus the necessary general hardware platform. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention or certain parts of the embodiments.
[0153] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, refer to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without making any creative efforts.
[0154] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for aircraft obstacle avoidance trajectory planning based on a physics-driven neural network, characterized in that: include: constructing a dynamic model of the aircraft, and generating a nominal trajectory of the aircraft using the dynamic model; Constructing state variable network NN u , using the state variable network to construct the proposed state variable The state variable network is pre-trained using the nominal trajectory to obtain a pre-trained state variable network NN u ; Constructing the control variable network NN ctrl , the normalized time series on the nominal trajectory of the aircraft is input into the pre-trained state variable network NN u and control variable network NN ctrl , using obstacle area information and nominal trajectory data to calculate the loss function including obstacle area constraints and physical equation residual constraints, and optimizing the two networks simultaneously by minimizing the loss function to obtain the trained state variable network NN u and control variable network NN ctrl ; Using the trained control variable network NN ctrl Construct the obstacle avoidance control variable sequence, substitute the obstacle avoidance control variable sequence into the differential equation of the aircraft, and use the trained state variable network NN to calculate the obstacle avoidance control variable sequence. u Use the numerical integration method to solve the differential equation to obtain the obstacle avoidance trajectory of the aircraft, and verify whether the obstacle avoidance trajectory meets the predetermined performance indicators. If it does, output the obstacle avoidance trajectory and control angle sequence; if it does not, continue to optimize the state variable network NN u and control variable network NN ctrl , regenerate the aircraft's obstacle avoidance trajectory until the aircraft's obstacle avoidance trajectory meets the performance indicators; The step of constructing a dynamic model of the aircraft and generating a nominal trajectory of the aircraft using the dynamic model includes: Construct the dynamic model of the aircraft. The kinematic model expression is as follows: G V is the transformation matrix from the velocity coordinate system to the launch coordinate system, which is determined by the trajectory inclination angle θ V , trajectory angle ψ V , tilt angle γ V Characterize, the expression is: Among them, the ballistic inclination angle and ballistic deviation angle can be calculated from the velocity component, and V is the magnitude of the velocity in the launch system: C in the equation D ,C L ,C z is the aerodynamic coefficient, which is related to the angle of attack (α) and the Mach number (Ma). The variables to be determined in the equations are the angle of attack α and the bank angle γ V ,These two variables serve as control variables to control the flight trajectory of the aircraft; Generate a nominal trajectory of the aircraft using a fourth-order Runge-Kutta integration method based on the dynamic model of the aircraft, wherein the nominal trajectory is the flight trajectory when the obstacle avoidance control angle and the roll angle are constantly 0; The method of generating a nominal trajectory of the aircraft based on the dynamic model of the aircraft by the fourth-order Runge-Kutta integration method, wherein the nominal trajectory is the flight trajectory when the obstacle avoidance control angle and the roll angle are constantly 0, includes: The dynamic model of the aircraft constructed by the differential equations is a set of ordinary differential equations with t as the independent variable, which describes the changes of the six state variables and their relationship with each other. In this set of differential equations, the angle of attack α and the roll angle γ V It is the variable that affects the aerodynamic term. Given the state variable u=(V x ,V y ,V Z ,x,y,z), and gives the attack angle α and the roll angle γ V The sequence or calculation function is solved by the Runge-Kutta method to obtain the nominal trajectory information of the aircraft, which includes the geometric path of the aircraft, the speed and acceleration information of the aircraft, and the angle of attack α is the maximum lift-to-drag ratio C that the aircraft can achieve at the current speed. L / C D Angle of attack, bank angle γ V As a control angle, it can avoid obstacles; The construction state variable network NN u , using the state variable network to construct the proposed state variable The state variable network is pre-trained using the nominal trajectory to obtain a pre-trained state variable network NN u ,include: Constructing state variable network NN u , the state variable network NN u The structure is a feedforward neural network, and the input is the normalized time series t on the nominal trajectory. * , output The normalization method of time variables is: Where t is the time series on the nominal trajectory, μ t is the mean of the sequence, σ t is the variance of the series, The calculation formula is: The proposed method for constructing the state variables is to transform the state variable network NN u Output After denormalization, the position variable is assumed to be Then, the predicted speed variable is obtained through automatic differentiation The specific expression is: By minimizing the error between the state variable assumption and the nominal trajectory state variable, the state variable network NN is adjusted according to the error. u Parameters of the pre-trained state variable network NN u , repeat the above process continuously, and after the training is completed, the pre-trained state variable network NN is obtained u ; The obstacle area information and nominal trajectory data are used to calculate the loss function including the obstacle area constraint and the physical equation residual constraint, and the two networks are optimized simultaneously by minimizing the loss function to obtain the trained state variable network NN. u and control variable network NN ctrl ,include: Constructing state variable network NN ctrl , state variable network NN ctrl The structure is a feedforward neural network, and the input is the normalized time series t on the nominal trajectory. * , output The range is between [-1,1], multiplied by the maximum value allowed by the control angle to obtain the proposed obstacle avoidance control angle It satisfies the range constraint; the normalized time series on the nominal trajectory of the aircraft is input into the pre-trained state variable network NN u and control variable network NN ctrl , calculate the state variables and control variables to be set Set the loss function to state error loss Loss u , initial state loss Loss start , differential equation residual loss Loss res , control angle loss Loss ctrl , and obstacle zone constraint loss Loss forbid The weighted sum of and optimizes the pre-trained state variable network NN by minimizing the loss function u and control variable network NN ctrl Parameters; State error loss Loss u Calculate the mean square error between the proposed state variable and the nominal trajectory, expressed as: where N t Indicates the selected N t Time point, initial state loss Los start is the Loss at t = 0 u ; Differential equation residual loss Loss res Minimize the residual of the differential equation, Loss res The calculation formula is as follows: Where rk4() represents one-step integration using the Runge-Kutta integration method, with the step length equal to the time interval; Control angle loss Loss ctrl Make the control angle as small as possible. The calculation method is as follows: Obstacle area constraint loss Loss forbid Calculate the distance from the aircraft to the center of each no-fly zone. If it is greater than the radius of the no-fly zone, record it as 0. If it is less than the radius of the no-fly zone, record it as the maximum distance d from the aircraft to the edge of the no-fly zone. Finally, sum all d. The closer the point is to the center of the obstacle zone, the greater the loss applied. forbid The greater the loss, the greater the loss. forbid The calculation formula is as follows: Among them, A i for is the center of the j-th obstacle area, is the radius of the jth obstacle zone, ∈ "relaxation factor", which is 2% of the maximum radius of the obstacle zone; The loss function Loss is expressed as: Loss=w1*Loss u +w2*Loss start +w3*Loss res +w4*Loss ctrl +w5*Loss forbid ; Optimize the pre-trained state variable network NN by minimizing the value of the loss function Loss u and control variable network NN ctrl Parameters of the trained state variable network NN u and control variable network NN ctrl ; The control variable network NN that is trained is used ctrl Construct the obstacle avoidance control variable sequence, substitute the obstacle avoidance control variable sequence into the differential equation of the aircraft, and use the trained state variable network NN to calculate the obstacle avoidance control variable sequence. u The numerical integration method is used to solve the differential equations to obtain the obstacle avoidance trajectory of the aircraft, including: Using the trained control variable network NN ctrl Construct an obstacle avoidance control variable sequence, substitute the obstacle avoidance control variable sequence into the differential equation of the aircraft, set the optimization target and constraint conditions of the differential equation of the aircraft, the constraint conditions include obstacle area constraint, endpoint constraint, starting point constraint, thermal environment constraint, normal overload constraint and control amount constraint, based on the trained state variable network NN u The numerical integration method is used to solve the differential equation and obtain the obstacle avoidance trajectory of the aircraft.
2. The method according to claim 1, characterized in that The performance indicators include: a. Maximum absolute value of the roll angle, in degrees: This indicator reflects the maximum roll angle the aircraft must perform during the entire obstacle avoidance process. b. Maximum rate of change of roll angle, in degrees per second: This metric reflects the maximum rate of change of the roll angle during obstacle avoidance. c. Maximum range ratio: This metric calculates the ratio of the maximum range of the obstacle avoidance trajectory to the maximum range of the nominal trajectory under the same time conditions; d. End point distance (in km): This metric calculates the distance between the obstacle avoidance trajectory and the end point of the nominal trajectory under the same time constraints. The smaller the end point distance, the more conducive it is to completing subsequent flight missions. e. Shortest distance to obstacle center: This metric calculates the shortest distance between the aircraft and the center of an obstacle during obstacle avoidance.
Citation Information
Patent Citations
Method for programming cooperated gaming path based on neural network and artificial potential field
CN108827312A
Obstacle avoidance flight control method, device and system of aircraft
CN114545976A