A six-degree-of-freedom fixed-wing aircraft real-time trajectory optimization method and system
By using sparse parameter representation and self-supervised neural network training, the optimal trajectory of a six-degree-of-freedom fixed-wing aircraft is generated in real time. This solves the problems of slow solution speed and poor trajectory quality caused by model simplification in existing methods, and achieves efficient real-time trajectory optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU JADE BIRD ZHIHANG TECHNOLOGY CO LTD
- Filing Date
- 2026-04-16
- Publication Date
- 2026-07-14
AI Technical Summary
Existing trajectory optimization methods cannot achieve high-quality real-time trajectory optimization while maintaining the integrity of a six-DOF fixed-wing aircraft model. The slow solution speed and model simplification result in poor trajectory quality or even make the aircraft unflyable.
The trajectory is represented by a sparse parameter representation method, a parameterized optimization problem is constructed, and a neural network is trained in a self-supervised manner to learn the mapping from input parameters to the sparse parameters of the optimal trajectory, thereby generating the optimal trajectory of a six-degree-of-freedom fixed-wing aircraft in real time.
It achieves the generation of high-quality trajectories in milliseconds, meeting real-time requirements and avoiding the problems of excessively high parameter dimensionality and slow solution speed in traditional methods. It ensures that the trajectory conforms to the actual motion law of the aircraft and meets the constraints.
Smart Images

Figure CN122044203B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aircraft trajectory optimization technology, and in particular to a method and system for real-time trajectory optimization of a six-degree-of-freedom fixed-wing aircraft. Background Technology
[0002] Trajectory optimization for fixed-wing aircraft is crucial for improving flight efficiency, reducing energy consumption, and ensuring mission safety, and has wide applications in reconnaissance, logistics delivery, and disaster relief. Traditional trajectory optimization methods mainly include methods based on optimal control theory (such as the pseudospectral method) and methods based on model simplification.
[0003] While direct methods, such as the pseudospectral method, can obtain high-precision trajectories, their solution process involves large-scale nonlinear programming problems, with computation times reaching tens of seconds, which cannot meet the real-time requirements of UAVs in dynamic environments. On the other hand, simplifying the six-degree-of-freedom fixed-wing aircraft model (e.g., reducing it to a three-degree-of-freedom model) can improve the solution speed, but it will sacrifice model accuracy, making the optimized trajectory infeasible under actual dynamic constraints and even affecting flight safety.
[0004] In recent years, optimization learning has emerged as an new approach, using machine learning models to learn the input-output mapping of parameterized optimization problems. This allows for millisecond-level inference while maintaining solution quality, providing a novel approach for real-time trajectory optimization. However, traditional trajectory discretization methods typically require fine discretization of the time dimension, resulting in excessively high dimensionality of optimization variables and increasing the training difficulty and fitting burden of machine learning models.
[0005] Therefore, how to achieve high-quality real-time trajectory optimization of a fixed-wing aircraft while maintaining the integrity of the six-degree-of-freedom fixed-wing aircraft model remains a pressing technical challenge. Summary of the Invention
[0006] The purpose of this invention is to provide a real-time trajectory optimization method and system for a six-degree-of-freedom fixed-wing aircraft, in order to solve the technical problems of slow solution speed and poor trajectory quality or even flightlessness caused by model simplification in existing trajectory optimization methods.
[0007] To achieve the above objectives, this application provides the following solution:
[0008] Firstly, this application provides a real-time trajectory optimization method for a six-degree-of-freedom fixed-wing aircraft, including:
[0009] The trajectory of a six-DOF fixed-wing aircraft is characterized by sparse parameters, and the trajectory sparse parameters are obtained.
[0010] A parameterized optimization problem is constructed, wherein the input parameters of the parameterized optimization problem are the initial control quantity, initial state quantity, desired terminal position, and desired terminal attitude of the aircraft, the decision variables are the trajectory sparse parameters, the objective function is to minimize the trajectory energy consumption and total time, and the constraints include the upper and lower bound inequality constraints of the control quantity trajectory and the state quantity trajectory, as well as the equality constraints of the terminal position and the terminal attitude.
[0011] Using the objective function and constraints of the parameterized optimization problem as the training objective, a self-supervised method is used to train the neural network, enabling the neural network to learn the mapping from the input parameters to the sparse parameters of the optimal trajectory;
[0012] By inputting the input parameters of any optimization problem into a trained neural network, the optimal trajectory of a six-degree-of-freedom fixed-wing aircraft can be generated in real time.
[0013] Secondly, this application provides a real-time trajectory optimization system for a six-degree-of-freedom fixed-wing aircraft, comprising:
[0014] The trajectory characterization module is used to characterize the trajectory of a six-degree-of-freedom fixed-wing aircraft with sparse parameters to obtain trajectory sparse parameters.
[0015] The optimization problem construction module is used to construct a parameterized optimization problem. The input parameters of the parameterized optimization problem are the initial control quantity, initial state quantity, desired terminal position, and desired terminal attitude of the aircraft. The decision variables are the trajectory sparse parameters. The objective function is to minimize the trajectory energy consumption and total time. The constraints include the upper and lower bound inequality constraints of the control quantity trajectory and the state quantity trajectory, as well as the equality constraints of the terminal position and the terminal attitude.
[0016] The neural network training module is used to train the neural network in a self-supervised manner using the objective function and constraints of the parameterized optimization problem as the training objective, so that the neural network learns the mapping from the input parameters to the sparse parameters of the optimal trajectory.
[0017] The trajectory generation module is used to input the input parameters of any optimization problem into a trained neural network and generate the optimal trajectory of a six-degree-of-freedom fixed-wing aircraft in real time.
[0018] According to the specific embodiments provided in this application, the following technical effects are disclosed:
[0019] This application provides a real-time trajectory optimization method and system for a six-degree-of-freedom fixed-wing aircraft. By representing the trajectory with sparse parameters, it solves the technical problems of excessively high parameter dimensionality and difficulty in fitting neural networks in traditional trajectory discretization methods, achieving the effect of completely describing the trajectory of a six-degree-of-freedom fixed-wing aircraft with a small number of parameters. By constructing a parameterized optimization problem with sparse trajectory parameters as decision variables, it solves the problem that existing methods cannot unify the modeling of flight mission requirements and trajectory optimization problems, achieving the effect of decoupling the optimization problem structure from the input parameters and facilitating the neural network to learn the mapping relationship. By training the neural network based on the objective function and constraints of the parameterized optimization problem, it solves the technical problems of traditional methods relying on optimization truth values for supervised learning and the long data preparation time, achieving a self-supervised learning effect without truth values. By inputting the input parameters into the trained neural network to generate the trajectory in real time, it solves the technical problems of slow solution speed and inability to meet real-time requirements of traditional optimal control methods, achieving the real-time generation effect of the trajectory of a six-degree-of-freedom fixed-wing aircraft. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is an application environment diagram of a real-time trajectory optimization method for a six-degree-of-freedom fixed-wing aircraft according to an embodiment of this application;
[0022] Figure 2 A schematic diagram of the original network and dual network in a real-time trajectory optimization method for a six-degree-of-freedom fixed-wing aircraft provided in an embodiment of this application;
[0023] Figure 3 A schematic diagram of the success rate of the first augmented Lagrange update cycle as a function of training rounds, provided in an embodiment of this application;
[0024] Figure 4 A schematic diagram illustrating the change in success rate of the second augmented Lagrange update cycle with training rounds, provided in an embodiment of this application;
[0025] Figure 5 A schematic diagram of the success rate of the third augmented Lagrange update cycle as a function of training rounds, provided in an embodiment of this application;
[0026] Figure 6 A schematic diagram of the trajectory of the X-31 aircraft output by a neural network according to an embodiment of this application. Detailed Implementation
[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0029] This application provides a real-time trajectory optimization method for a six-degree-of-freedom fixed-wing aircraft, which can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. The data storage system can store data that server 104 needs to process, such as aircraft dynamics model parameters, trained neural network weights, and historical trajectory data. The data storage system can be set up separately, integrated into server 104, or placed in the cloud or on other servers. Terminal 102 can send input parameters such as the initial state variables, initial control variables, desired terminal position, and desired terminal attitude of the flight mission to server 104. After receiving the input parameters, server 104 generates the optimal trajectory of the six-degree-of-freedom fixed-wing aircraft in real time based on a pre-trained neural network (which has learned the mapping from input parameters to sparse parameters of the optimal trajectory) and feeds back the generated trajectory data to terminal 102 for the aircraft to execute. Furthermore, in some embodiments, a real-time trajectory optimization method for a six-degree-of-freedom fixed-wing aircraft can also be implemented separately by server 104 or terminal 102. For example, terminal 102 (e.g., an onboard computer) can directly run the trained neural network to generate the trajectory, or server 104 can obtain the required data from the data storage system and perform trajectory generation processing based on the received input parameters.
[0030] Terminal 102 can be, but is not limited to, various fixed-wing aircraft (drones or manned aircraft), ground control stations, handheld terminals, vehicle-mounted equipment, etc. Server 104 can be implemented using a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.
[0031] In one exemplary embodiment, a real-time trajectory optimization method for a six-degree-of-freedom fixed-wing aircraft is provided. This method is executed by a computer device, specifically a terminal or server, or both. In this embodiment, the method is applied to… Figure 1Taking server 104 as an example, the explanation includes the following steps 201 to 204. Wherein:
[0032] Step 201: Characterize the trajectory of the six-degree-of-freedom fixed-wing aircraft with sparse parameters to obtain trajectory sparse parameters;
[0033] Step 202: Construct a parameterized optimization problem. The input parameters of the parameterized optimization problem are the initial control quantity, initial state quantity, desired terminal position, and desired terminal attitude of the aircraft. The decision variables are the trajectory sparse parameters. The objective function is to minimize the trajectory energy consumption and total time. The constraints include the upper and lower bound inequality constraints of the control quantity trajectory and the state quantity trajectory, as well as the equality constraints of the terminal position and the terminal attitude.
[0034] Step 203: Using the objective function and constraints of the parameterized optimization problem as the training objective, train the neural network in a self-supervised manner so that the neural network learns the mapping from the input parameters to the sparse parameters of the optimal trajectory;
[0035] Step 204: Input the input parameters of any optimization problem into the trained neural network to generate the optimal trajectory of the six-degree-of-freedom fixed-wing aircraft in real time.
[0036] Implementing steps 201 to 204 above enables real-time generation of the trajectory of a six-DOF fixed-wing aircraft. By directly learning the mapping relationship from input parameters to the sparse parameters of the optimal trajectory through a neural network, trajectory parameters can be obtained with only one forward propagation during the inference phase. This avoids the computational time of tens of seconds required by traditional optimal control methods (such as pseudospectral methods) for iterative solutions. The trajectory generation time is only in the milliseconds, meeting the application requirements for online trajectory replanning and real-time control of aircraft. The sparse parameter representation method uses a small number of parameters to completely describe the control and state trajectories of the six-DOF fixed-wing aircraft, avoiding the problems of excessively high parameter dimensionality and difficulty in fitting neural networks caused by traditional time discretization methods, thus improving training efficiency and generalization ability. The training process does not require pre-optimized trajectory ground truth values; it directly uses the objective function and constraints of the parameterized optimization problem as the training objective, eliminating the need for external solvers to generate training data, saving data preparation time, and making this method more adaptable to new task scenarios. The generated trajectory is obtained by integrating the complete six-degree-of-freedom aircraft integral dynamics equations to obtain the state quantity trajectory, ensuring that the trajectory conforms to the actual motion law of the aircraft. At the same time, by handling inequality constraints and equality constraints, the final generated trajectory strictly meets the accuracy requirements of the upper and lower bounds of the control variables, the upper and lower bounds of the state variables, as well as the terminal position and terminal attitude.
[0037] Furthermore, this application allows for the parameterization of the objective function and constraints of the optimization problem, which can be flexibly added or modified according to user needs. The trained neural network can adapt to different task scenarios without the need to redesign the algorithm or retrain the entire model.
[0038] Furthermore, this application can further improve the success rate and accuracy of trajectory generation by adjusting the neural network structure, increasing the diversity of training samples, and optimizing the augmented Lagrange update strategy; it can also be extended to real-time trajectory optimization problems of other types of aircraft (such as rotorcraft, rockets, etc.) or other controlled objects, and has broad application prospects.
[0039] In this embodiment, step 201 employs a multi-segment polynomial parameterization method based on the MINCO (MinimumControl) trajectory class to fully describe the control and state trajectories with a small number of sparse parameters, laying the foundation for subsequent neural network training. Specifically, it includes the following sub-steps S211~S213, wherein:
[0040] S211, Multi-segment polynomial parameterization of control trajectory
[0041] Define the control variables of a six-degree-of-freedom fixed-wing aircraft as: , ,in To control the dimension of the quantity, the trajectory time is... Divided into M segments, each segment having a duration of... Total time Within each time period, the control quantity Each component is represented by a polynomial of degree D, that is:
[0042]
[0043] in, , Let the degree be the polynomial.
[0044] For local time coordinates, ;
[0045] For the first Polynomial coefficients, .
[0046] All polynomial coefficients are combined into a coefficient matrix. , Then the control quantity trajectory From the coefficient matrix and the time of each segment of the polynomial , Completely determined. In subsequent numerical integration of the state variable trajectory, the time interval will be... Based on a fixed integration step size Discretized Let there be points, and denote the discrete time point as... , ,in This represents the total number of discrete points. Each discrete point... control value at It can be directly calculated from the polynomial of the time period in which that moment occurs.
[0047] S212, Define trajectory sparse parameters
[0048] The MINCO trajectory class introduces sparse parameter representation: by using the values at connection points, end boundary conditions, and implicitly determined coefficient matrices for each time segment, the number of parameters is significantly reduced.
[0049] In this embodiment, the trajectory sparse parameters It consists of the following three parts:
[0050] The values at the junctions of the polynomials in each segment This includes the control values at each connection point and their first and second derivatives.
[0051] Boundary condition values at the final time step This includes the values of the control variables at the final time step and their derivatives (the initial control variables are given by the input parameters and are therefore not included in the trajectory sparse parameters). ).
[0052] Time of each segment of the polynomial That is, the time length of each polynomial segment. .
[0053] Therefore, the trajectory sparse parameter can be expressed as According to the theory of MINCO trajectory classes, there exists a definite mapping function F that can map the sparse parameters of the trajectory. Uniquely transforms into a polynomial coefficient matrix ,Right now Thus, the control trajectory is obtained. The mapping is analytical, and the coefficient matrix can be computed. For sparse parameters of the trajectory The gradient is crucial for subsequent neural network training.
[0054] Taking the X-31 aircraft as an example, its control variables are 6-dimensional (thrust, aileron deflection angle, canard deflection angle, rudder deflection angle, lateral thrust vector deflection angle, and normal thrust vector deflection angle), that is... Uniform time segmentation is used to divide the trajectory into... Segment, length of each segment All are variables to be optimized. The degree of each polynomial segment. (Cubic polynomial) To ensure smoothness between segments, the control variables and their first and second derivatives must be continuous. For cubic polynomials, the continuity of the equality constraints means that only the control variable values (6 dimensions) need to be specified at intermediate points; the first and second derivatives are automatically determined by continuity. Therefore, the values at the connection points of each polynomial segment... Include The control values for each connection point, with the dimension being... Boundary condition values at the final time step Includes the end-control quantity value and its first and second derivatives, with dimensions of Time of each segment of the polynomial Dimension is 25. Trajectory sparse parameters. The total dimension is In practical implementations, the parameter dimension can be further compressed through optimization of the MINCO trajectory class, ultimately adopting 157-dimensional sparse parameters. This ensures sufficient freedom of trajectory while significantly reducing the number of parameters, facilitating neural network learning.
[0055] S213, Generate state variable trajectory
[0056] In obtaining the sparse parameters of the trajectory Determined control trajectory Then, given the initial state variables (Including position, velocity, attitude angle, angular velocity, etc.), the trajectory of the state variables is obtained by integrating the six-degree-of-freedom rigid body integral dynamic equation. .
[0057] The above six-degree-of-freedom rigid body integral dynamic equations are:
[0058]
[0059] in, It is a nonlinear vector function, and its specific form depends on the aerodynamic parameters and mass characteristics of the aircraft.
[0060] To balance computational efficiency and accuracy, this embodiment employs the Euler integral method with a fixed step size (the step size can be adjusted as needed, for example, to 0.01 seconds) for discrete solution, obtaining the nth... The state variables of each discrete point are :
[0061]
[0062] in, For the first State quantities at discrete points;
[0063] For the first Control values at discrete points;
[0064] The state variables at all discrete moments constitute the state variable trajectory. .
[0065] It should be noted that, due to the control quantity trajectory Due to sparse parameters of the trajectory Uniquely determined, and the initial state quantity Given that the trajectory of the state variables is... It is also entirely determined by the sparse parameters of the trajectory. and initial state quantity Decision made. However, in subsequent optimization problems, the initial state variables... As input parameters, while trajectory sparse parameters Since they are decision variables, we can say that the trajectory sparse parameters It is the only parameter for the trajectory of control and state variables.
[0066] Step 202 aims to formalize the trajectory optimization problem of a six-DOF fixed-wing aircraft into a problem with sparse trajectory parameters. This is a parameterized optimization problem for decision variables. The input parameters are the initial state variables, initial control variables, desired terminal position, and desired terminal attitude of the flight mission. The objective function is to minimize trajectory energy consumption and total time while satisfying the upper and lower bound inequality constraints of the control and state trajectory, as well as the equality constraints of the terminal position and terminal attitude. Finally, a mapping relationship is established from the input parameters to the optimal sparse trajectory parameters. Specifically, it includes the following sub-steps S221~S225. Where:
[0067] S221, Define input parameters
[0068] In this embodiment, the input parameters of the optimization problem It consists of the following four parts:
[0069] Initial state quantity This includes the aircraft's position, velocity, attitude (quaternion), angular velocity, etc. at the initial moment.
[0070] Initial control quantity : The deflection angle and thrust value of each control surface at the initial moment (thrust, aileron, canard, rudder, lateral thrust vector, normal thrust vector).
[0071] Expected terminal location : The three-dimensional spatial coordinates of the target point.
[0072] Expected terminal posture : Quaternion representation of the target attitude.
[0073] Therefore, input parameters In practical applications, other inputs can be added as needed for the task, such as terminal speed constraints and obstacle avoidance point locations.
[0074] S222, Define decision variables
[0075] The decision variables are determined as the trajectory sparse parameters defined in step 201. It uniquely determines the trajectory of the control quantity. and combined with the initial state variables Together they determine the trajectory of the state variables .
[0076] S223, Define the objective function
[0077] The optimization problem is to minimize the energy consumption and total time of the trajectory while satisfying constraints. The objective function is defined as follows:
[0078]
[0079] in, This is an energy consumption item. It is used to measure the power consumed by a six-degree-of-freedom fixed-wing aircraft;
[0080] , All are weighting coefficients (e.g., taking...) =1.0, This is used to balance energy consumption and time cost, and can be adjusted according to specific tasks.
[0081] S224, Define constraints
[0082] To ensure the physical feasibility of the trajectory of a six-degree-of-freedom fixed-wing aircraft and meet mission requirements, the following constraints must be imposed:
[0083] A1) Inequality constraint between upper and lower bounds of the control trajectory
[0084] Each component of the control quantity must be within its permissible physical range.
[0085]
[0086] in, This is the minimum control quantity; This is the maximum control quantity;
[0087] To facilitate subsequent processing, it is transformed into a centralized squared form:
[0088]
[0089] The squaring in the above formula is an element-wise operation, indicating that the deviation of each component does not exceed half of the allowable range.
[0090] A2) Inequality constraints on the upper and lower bounds of state variable trajectories
[0091] Each component of the state variable (such as velocity component, quaternion component, angular velocity component, and position component) must also be limited to a reasonable range.
[0092]
[0093] in, It is the minimum state quantity; It is the maximum state variable;
[0094] Similarly, transform it into a centered square form:
[0095]
[0096] As an optional implementation, the constraints also include A3) Angle of attack constraint:
[0097] Angle of attack Angle of attack is a critical parameter for flight safety and must be kept within permissible limits. It is calculated from the velocity component in the body axis system. Taking the X-31 spacecraft as an example, its constraint range is:
[0098]
[0099] in, For the minimum angle of attack, ;
[0100] All inequality constraints from A1) to A3) are collectively denoted as continuous-time inequality constraints:
[0101]
[0102] in, It is a vector function, and each component corresponds to a specific physical constraint (including upper and lower bounds of control variables, upper and lower bounds of state variables, and angle of attack constraints).
[0103] B1) Terminal position equality constraint
[0104] The spacecraft's terminal position must reach the desired point precisely:
[0105]
[0106] in, This refers to the position component in the state variables.
[0107] B2) Terminal attitude equality constraints
[0108] The attitude of the aircraft at the terminal phase must match the desired attitude. Attitude error is represented using quaternion dot product form:
[0109]
[0110] in, It is the quaternion component in the state variable.
[0111] The two equality constraints in B1) and B2) are combined into a terminal equality constraint, i.e., a vector function. :
[0112]
[0113] in, , This indicates transpose.
[0114] S225, Determine the mathematical form of the parameterized optimization problem.
[0115] Based on input parameters Determine the optimal trajectory sparse parameters :
[0116]
[0117] in, for The restrictions.
[0118] and Due to sparse parameters of the trajectory and initial state quantity The optimal solution is uniquely determined through dynamic integration. This parameterized optimization problem is a parameterized nonlinear constrained optimization problem, and its optimal solution is the optimal trajectory sparse parameter. Input parameters The implicit function, denoted as The ultimate goal is to learn this mapping through a neural network. .
[0119] Specifically, taking the X-31 spacecraft as an example, its initial state variables... and initial control quantity Fixed, initial state quantity Initial control quantity Expected terminal location The pitch and yaw directions in front of the aircraft are arrive The azimuth angle (relative to the current position of the aircraft) is randomly selected within a range of 400m to 600m in the inertial frame; the desired terminal attitude is... By random Euler angles (range) arrive The constraints are obtained through conversion.
[0120] ;
[0121] ;
[0122] ;
[0123] ;
[0124] , .
[0125] As another optional implementation, the objective function and constraints of the above optimization problem can be added or modified according to the user's specific needs. Based on the basic form defined in step 225 above, the method may also include the following steps:
[0126] If you need to limit the terminal speed, you can do so in the vector function. Add a speed error term;
[0127] If obstacle avoidance needs to be considered, obstacle avoidance inequality constraints can be added (such as the minimum distance from the obstacle being greater than a safety threshold).
[0128] To optimize the smoothness of the trajectory, an integral term of the derivative of the control variable can be added to the objective function.
[0129] Step 203 aims to achieve millisecond-level real-time trajectory generation by learning the mapping from the input parameters of the optimization problem to the sparse parameters of the optimal trajectory through a neural network. Since traditional optimization solvers (such as pseudospectral methods) are too time-consuming to generate training data, this application adopts a self-supervised primordial-dual learning framework, directly using the objective function and constraints of the parameterized optimization problem constructed in step 202 as the training loss, without the need for pre-calculating the real trajectory. Specifically, it includes the following sub-steps S231~S234. Wherein:
[0130] S231, Handling Constraints
[0131] C1) For continuous-time inequality constraints The time-domain integral penalty function method is used to transform continuous-time inequality constraints into penalty functions. :
[0132]
[0133] in, To ensure smoothness, the cube operation is performed by taking the maximum value element by element. After discretization, numerical integration is used, multiplied by a penalty coefficient. Add the objective function.
[0134] C2) For terminal equality constraints The augmented Lagrange method is employed, introducing Lagrange multipliers. and the second penalty coefficient Construct the augmented Lagrangian function:
[0135] )
[0136] in, Let be the penalty function. This indicates that the weight vector Convert to a diagonal matrix; It is the standard Euclidean norm; To augment the outer loop index of the Lagrange method;
[0137] During training, the trajectory sparse parameters are alternately optimized using the augmented Lagrange method. and updating Lagrange multipliers Secondary penalty coefficient :
[0138]
[0139] in, and These are the Lagrange multipliers for the current outer loop and the next outer loop, respectively;
[0140] and These are the quadratic penalty coefficients for the current outer loop and the next outer loop, respectively;
[0141] For growth factors ( >1), To determine the convergence threshold ( 0, 1) This is the upper limit.
[0142] S232, Construct the primal network and the dual network
[0143] Original network : Input parameters As input, output sparse parameters of the trajectory Its goal is to make the output trajectory parameters sparse. Minimize the current augmented Lagrange function.
[0144] Dual networks : Input parameters For input, output Lagrange multipliers Its goal is to make the output Lagrange multipliers Approximate the target multiplier obtained by the augmented Lagrange update formula.
[0145] In this embodiment, both the original network and the dual network are multi-layer fully connected neural networks. The original network has an input dimension of 26 and an output dimension of 157 (corresponding to trajectory sparsity parameters). The first network has an input dimension of 26 and an output dimension of 2 (corresponding to the multipliers of the two equality constraints). It has 3 hidden layers with 1024 nodes per layer and LeakyReLU activation function (negative slope 0.01). The second network has an input dimension of 26 and an output dimension of 2 (corresponding to the multipliers of the two equality constraints). It has 3 hidden layers with 512 nodes per layer and LeakyReLU activation function.
[0146] S233, Training the original network and the dual network
[0147] The training process was conducted using the augmented Lagrange method:
[0148] D1) Initialization: Set the initial Lagrange multipliers Initial penalty coefficient growth factors Convergence judgment threshold , 10 5 Randomly initialize the original network parameters. and dual network parameters .
[0149] D2) Outer loop, for the augmented Lagrange update loop number k=0,…,K-1 (total number of iterations in this embodiment K=3):
[0150] 1) Fixed and Training the original network:
[0151] Randomly sample batch parameters from the input parameter distribution. In this embodiment, the parameters The generation method is as follows: Initial control quantity Expected terminal location ; Expected terminal posture .
[0152] each parameter Input the original network to obtain the sparse parameters of the predicted trajectory. .
[0153] Based on trajectory sparsity parameters The control trajectory is obtained through mapping in step 212. Then, the trajectory of the state variable is obtained through integration in step 213. .
[0154] Calculate energy consumption Total Time Inequality penalty function Equality constraint value The augmented Lagrange function value is obtained.
[0155] Calculate the original network loss and backpropagate to update the original network parameters. .
[0156] The AdamW optimizer was used with an initial learning rate of 1×10⁻⁶. -4 The learning rate is halved after each outer loop iteration. In this loop, the original network is trained for 10... 6 The 10th iteration (i.e., 10) 6 (Number of batches).
[0157] 2) Fix the original network and train the dual network:
[0158] Randomly sample batch parameters from the input parameter distribution. The sparse parameters of the predicted trajectory are obtained through the original network. Calculate the equality constraint values .
[0159] The goal of dual networks is to make the output Lagrange multipliers Approximating the target multiplier obtained by updating the formula from the current Lagrange multipliers: .
[0160] Calculate the dual network loss: And backpropagate to update the dual network parameters. ;
[0161] The AdamW optimizer was used with an initial learning rate of 1×10⁻⁶. -4 Dual network training 5×10 6 The next iteration.
[0162] 3) Update the Lagrange multipliers and penalty coefficients:
[0163] For all parameters Calculate the equality constraint values infinite norm ( :
[0164] like (Indicating that the constraint violation decreases too quickly), then increase the secondary penalty coefficient. ;
[0165] Otherwise, the second penalty coefficient remain unchanged. .
[0166] 4) Training convergence judgment:
[0167] After several outer loops, the constraint violations gradually decrease and eventually stabilize within an acceptable range, at which point the training ends.
[0168] In this embodiment, after three outer loops, the success rate (constraints satisfied and terminal error less than the threshold) reaches about 95%, and training ends.
[0169] S234, Training Success Rate Monitoring
[0170] During training, a successful trajectory generation requires the following conditions to be met:
[0171] All inequality constraints (control variables, state variables, angle of attack) are not violated in the time domain (i.e., (Valid at all points in time)
[0172] Terminal position error value ;
[0173] Terminal attitude error .
[0174] like Figure 2 As shown, the neural network consists of a dual-network structure of "original network + dual network" and uses the augmented Lagrangian method to solve constrained optimization problems.
[0175] When training the original network, the initial control variable, initial state variable, desired terminal position, and desired terminal pose are used as input parameters. Input the original network, and the original network outputs sparse parameters of the trajectory. The MINCO trajectory class multi-segment polynomial parameterization method is used to reduce the sparse parameters of the trajectory output by the network. Mapped to continuous control trajectory Based on the control quantity trajectory The trajectory of the state variables is obtained by integrating the integral dynamic equation. The objective function of the optimization problem is: The continuous-time inequality constraint object is... The terminal equality constraint object is .
[0176] When training the dual network, the input parameters are... Input dual network, output Lagrange multiplier λ; calculate error Update the Lagrange multiplier λ; calculate the infinite norm of the degree of violation of the terminal constraint. ,if If the degree of constraint violation decreases too quickly, then increase the penalty parameter: The penalty intensity is dynamically adjusted to ensure algorithm convergence.
[0177] The primary network learns the control strategy, while the dual network learns the Lagrange multipliers. These two networks are trained alternately to jointly minimize the augmented Lagrangian function. By incorporating constraints into the objective function through the augmented Lagrangian method, the difficulties of constraint handling in traditional optimization are avoided. The entire framework can be trained end-to-end, directly outputting the optimal control trajectory from initial conditions and the objective, making it suitable for scenarios such as robot motion planning and UAV control.
[0178] like Figure 3 As shown, the convergence curve of the training success rate as a function of training rounds during the first augmented Lagrange update cycle reflects the learning and convergence characteristics of the optimal control strategy (i.e., the original network + dual network) based on the augmented Lagrange method in the first iteration. Figure 3 The horizontal axis represents the number of training rounds, in units of 10. 6 (i.e., millions of times), ranging from 0 to 1, represents the training iteration progress of the neural network in this round of Lagrange cycle; the vertical axis is the success rate, ranging from 0 to 1, representing the proportion of the output control strategy that satisfies the dynamic constraints and terminal constraints and achieves target tracking in the corresponding training stage.
[0179] The overall trend of the curve shows a typical learning process, gradually increasing from a low success rate and eventually stabilizing. In the early training phase (0 to 0.2 × 10⁻⁶), the success rate gradually increases until it stabilizes. 6 With fewer training rounds (from 0.2 to 0.6 × 10⁻⁶), the success rate approaches 0, indicating that the parameters of the original network and the dual network have not yet converged, the output control trajectory cannot meet the constraints, and the optimal control strategy fails to be solved. 6 (In rounds), the success rate climbed rapidly, gradually increasing from 0 to around 0.9, demonstrating that the dual network, driven by error feedback and augmented Lagrange terms, continuously optimized the control strategy and Lagrange multipliers, resulting in a sustained decrease in constraint violation and a significant increase in the proportion of effective solutions.
[0180] In the later stages of training (0.6 to 1×10 6 (In each round), the success rate remained stable within the range of 0.8 to 0.9, with significant fluctuations. This fluctuation is a normal phenomenon for stochastic optimization algorithms based on neural networks, stemming from gradient noise, random initialization, or differences in sample distribution during training. However, the overall mean remained high, indicating that the current round of augmented Lagrange update has achieved its core training objective and reached a good convergence state, laying the foundation for subsequent Lagrange multiplier updates, penalty parameter adjustments, and the training of the next round. Overall, Figure 3The effectiveness of the dual-network (original network and dual network) collaborative training framework in the first augmented Lagrange update cycle is intuitively verified. Through continuous iteration, it can quickly converge from invalid solutions to a stable high-success-rate state.
[0181] like Figure 4 As shown, in the second augmented Lagrange update cycle, the training success rate curve shows a significant improvement over the first cycle compared to the first cycle. The curve characteristics reveal that at the start of training (with the number of cycles close to 0), the success rate jumps directly to around 0.9, without the slow climb from 0 seen in the first cycle. This indicates that the network parameters obtained in the first cycle already possess a good initial solution, providing a better starting point for the second cycle. Throughout the training process, the success rate remains consistently above 0.9. Although fluctuations still occur, the magnitude of these fluctuations is much smaller than in the first cycle, and there are no dips below 0.85. This demonstrates that the convergence and robustness are significantly enhanced under the influence of better initial parameters and the updated Lagrange multipliers and penalty parameters. The curve remains consistently high, close to 0.95, indicating that the dual-network co-optimization is more effective in the second cycle, with the output control strategy more stably satisfying the constraints and achieving a higher proportion of effective solutions. The iterative gain of the augmented Lagrange update loop is intuitively demonstrated. Through parameter updates and network training in the previous loop, the initial solution quality, convergence speed and stability of the next loop are significantly improved, verifying the iterative optimization capability of the dual-network augmented Lagrange framework.
[0182] like Figure 5As shown, in the third augmented Lagrange update cycle, the training success rate curve changes with the number of training rounds. Compared with the first two cycles, the performance is further improved: From the curve characteristics, at the beginning of training (rounds close to 0), the success rate immediately stabilizes at around 0.95, without the climb-up phase from low success rates seen in the first two cycles. This indicates that the network parameters and Lagrange multipliers obtained from the first two cycles are very close to the optimal solution, providing an excellent starting point for the third cycle. Throughout the training process, the success rate remains consistently above 0.95 with minimal fluctuations and almost no significant troughs. This shows that after two rounds of iterative optimization, the collaborative ability of the two networks, the adaptability of the Lagrange multipliers, and the adjustment effect of the penalty parameters have all reached their optimal state, resulting in very strong convergence and robustness of the algorithm. The curve remains consistently high, close to 0.98, indicating that in the third cycle, the algorithm can output effective control strategies that satisfy all constraints extremely stably, the proportion of effective solutions is close to the limit, and the room for further improvement through iteration is very small. The iterative convergence characteristics of the augmented Lagrange update cycle are intuitively demonstrated. As the number of iterations increases, the quality of the initial solution, the convergence speed and stability are continuously improved. Finally, the optimal performance close to saturation is achieved in the third iteration, which fully verifies the iterative optimization capability and engineering feasibility of the dual-network augmented Lagrange framework.
[0183] from Figures 3 to 5 The performance improvement brought by each iteration is clearly visible: In the first iteration, the success rate starts from 0 and requires numerous iterations to slowly climb, with dramatic curve fluctuations and obvious troughs, indicating unstable convergence. In the second iteration, the initial success rate jumps directly to above 0.9. Thanks to the solid foundation laid in the first iteration, the curve fluctuations are significantly reduced, resulting in a more stable overall performance. In the third iteration, the initial success rate stabilizes above 0.95, with the starting point very close to the optimal solution. The curve fluctuations are minimal, remaining almost horizontal, achieving optimal robustness. As the number of iterations increases, the overall success rate continues to improve. The third iteration approaches the performance ceiling, leaving little room for further iterations. This intuitively verifies the iterative optimization capability of the dual-network augmented Lagrange framework: each Lagrange update provides better initial conditions for the next training iteration, thus achieving a step-by-step performance improvement.
[0184] Figure 6This presentation showcases the simulation results of aircraft trajectory planning and control in 3D space, validating the application of the previously presented dual-network augmented Lagrangian optimal control framework in a real-world scenario. In the northeast-northeast coordinate system, east (x-axis): approximately 0-300m, representing the horizontal eastward displacement; north (y-axis): approximately 0-300m, representing the horizontal northward displacement; altitude (z-axis): approximately 0-1000m, representing the vertical altitude. The red trajectory represents the aircraft's reference flight trajectory generated by the trained neural network, starting at approximately 1000m altitude, maintaining level flight initially, then smoothly descending, and finally completing the mission near the ground. Multiple aircraft models distributed along the red trajectory represent the aircraft's attitude and position at different time steps, visually demonstrating the attitude changes and path following throughout the flight process. The blue arrows represent the aircraft's gravity direction (representing the gravity component in the body axis system); the green arrows represent the aircraft's thrust direction (or propulsion / acceleration component), generally consistent with the flight direction, used to overcome drag and maintain / change flight status. The original network output control quantity trajectory is shown. Based on the control variables and the aircraft integral dynamics equations, state trajectory is generated. (Position, velocity, attitude, etc.), represented by the red curve in the figure. The dual network and augmented Lagrangian update loop ensure that this trajectory satisfies all constraints and achieves a smooth transition from the initial altitude to the target position. The effectiveness of this dual-network augmented Lagrangian framework in the aircraft trajectory optimization problem is verified: the generated trajectory is smooth and continuous, conforming to the physical constraints of the aircraft. The aircraft consistently and closely follows the reference trajectory, indicating high tracking accuracy of the control strategy. The entire process, from high-altitude cruise to low-altitude approach to the target, demonstrates the algorithm's planning capability under complex and multi-constraint conditions.
[0185] The entire training process described above requires no pre-optimized trajectory data and is entirely based on self-supervised learning, saving time in generating training data. The augmented Lagrangian method ensures high-precision satisfaction of equality constraints, while the penalty function method handles inequality constraints, guaranteeing the physical feasibility of the trajectory. Alternating training of the original and dual networks, coupled with augmented Lagrangian updates, allows the network to gradually learn the optimal mapping that satisfies the constraints.
[0186] Based on the same inventive concept, this application also provides a six-degree-of-freedom fixed-wing aircraft real-time trajectory optimization system for implementing the aforementioned six-degree-of-freedom fixed-wing aircraft real-time trajectory optimization method. The solution provided by this system is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more six-degree-of-freedom fixed-wing aircraft real-time trajectory optimization system embodiments provided below can be found in the limitations of the six-degree-of-freedom fixed-wing aircraft real-time trajectory optimization method described above, and will not be repeated here.
[0187] In one exemplary embodiment, a real-time trajectory optimization system for a six-degree-of-freedom fixed-wing aircraft is provided, comprising:
[0188] The trajectory characterization module is used to characterize the trajectory of a six-degree-of-freedom fixed-wing aircraft with sparse parameters to obtain trajectory sparse parameters.
[0189] The optimization problem construction module is used to construct a parameterized optimization problem. The input parameters of the parameterized optimization problem are the initial control quantity, initial state quantity, desired terminal position, and desired terminal attitude of the aircraft. The decision variables are the trajectory sparse parameters. The objective function is to minimize the trajectory energy consumption and total time. The constraints include the upper and lower bound inequality constraints of the control quantity trajectory and the state quantity trajectory, as well as the equality constraints of the terminal position and the terminal attitude.
[0190] The neural network training module is used to train the neural network in a self-supervised manner using the objective function and constraints of the parameterized optimization problem as the training objective, so that the neural network learns the mapping from the input parameters to the sparse parameters of the optimal trajectory.
[0191] The trajectory generation module is used to input the input parameters of any optimization problem into a trained neural network and generate the optimal trajectory of a six-degree-of-freedom fixed-wing aircraft in real time.
[0192] As an optional implementation, the trajectory representation module uses multi-segment polynomials to represent the trajectory of the control quantity and obtains the trajectory of the state quantity through integral dynamic equations; the trajectory sparse parameters include the values at the connection points of each segment polynomial, the values of the boundary conditions at the end time, and the time of each segment polynomial.
[0193] As an optional implementation, in the optimization problem construction module, the objective function and constraints of the parameterized optimization problem can be added or modified according to user needs, including adding terminal speed constraints and / or obstacle avoidance constraints.
[0194] As an optional implementation, in the neural network training module, the neural network includes a primary network and a dual network; the primary network is used to learn the mapping from input parameters to sparse parameters of the optimal trajectory; the dual network is used to learn the mapping from input parameters to Lagrange multipliers; and the primary network and the dual network are trained alternately according to the framework of the augmented Lagrange method.
[0195] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal. The computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I / O interfaces. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The I / O interfaces of the computer device are used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a real-time trajectory optimization method for a six-degree-of-freedom fixed-wing aircraft.
[0196] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0197] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0198] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0199] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0200] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0201] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0202] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0203] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for real-time trajectory optimization of a six-degree-of-freedom fixed-wing aircraft, characterized in that, Includes the following steps: The trajectory of a six-degree-of-freedom fixed-wing aircraft is characterized by MINCO multi-segment polynomial sparse parameters to obtain trajectory sparse parameters. The trajectory sparse parameters include the values at the connection points of each polynomial segment, the values of the boundary conditions at the end time, and the time of each polynomial segment. A parameterized optimization problem is constructed, wherein the input parameters of the parameterized optimization problem are the initial control quantity, initial state quantity, desired terminal position, and desired terminal attitude of the aircraft, the decision variables are the trajectory sparse parameters, the objective function is to minimize the trajectory energy consumption and total time, and the constraints include the upper and lower bound inequality constraints of the control quantity trajectory and the state quantity trajectory, as well as the equality constraints of the terminal position and the terminal attitude. Using the objective function and constraints of the parameterized optimization problem as the training objective, a self-supervised neural network is trained to learn the mapping from the input parameters to the sparse parameters of the optimal trajectory. The neural network includes a primary network and a dual network. The primary network is used to learn the mapping from the input parameters to the sparse parameters of the optimal trajectory, and the dual network is used to learn the mapping from the input parameters to Lagrange multipliers. The primary network and the dual network are trained alternately according to the framework of the augmented Lagrange method. By inputting the input parameters of any optimization problem into a trained neural network, the optimal trajectory of a six-degree-of-freedom fixed-wing aircraft can be generated in real time.
2. The real-time trajectory optimization method for a six-degree-of-freedom fixed-wing aircraft according to claim 1, characterized in that, The sparse parameter characterization specifically includes: The trajectory of the control quantity is represented by a multi-segment polynomial, and the trajectory of the state quantity is obtained through the integral dynamic equation; the sparse parameters of the trajectory include the values at the connection points of each segment polynomial, the values of the boundary conditions at the end time, and the time of each segment polynomial.
3. The real-time trajectory optimization method for a six-degree-of-freedom fixed-wing aircraft according to claim 1, characterized in that: The objective function and constraints of the parameterized optimization problem can be added or modified according to user needs, including adding terminal speed constraints and / or obstacle avoidance constraints.
4. The real-time trajectory optimization method for a six-degree-of-freedom fixed-wing aircraft according to claim 1, characterized in that: Both the original network and the dual network are multilayer fully connected neural networks. During training, the upper and lower bound inequality constraints are transformed into penalty functions through time-domain integration and added to the objective function. The equality constraints are processed using the augmented Lagrange method, and the parameters of the original network and the dual network are alternately optimized according to the augmented Lagrange update rule.
5. The real-time trajectory optimization method for a six-degree-of-freedom fixed-wing aircraft according to claim 1, characterized in that, The upper and lower bound inequality constraints also include angle of attack constraints.
6. A real-time trajectory optimization system for a six-degree-of-freedom fixed-wing aircraft implementing the method described in any one of claims 1-5, characterized in that, The real-time trajectory optimization system for the six-degree-of-freedom fixed-wing aircraft includes: The trajectory characterization module is used to characterize the trajectory of a six-degree-of-freedom fixed-wing aircraft with sparse parameters to obtain trajectory sparse parameters. The optimization problem construction module is used to construct a parameterized optimization problem. The input parameters of the parameterized optimization problem are the initial control quantity, initial state quantity, desired terminal position, and desired terminal attitude of the aircraft. The decision variables are the trajectory sparse parameters. The objective function is to minimize the trajectory energy consumption and total time. The constraints include the upper and lower bound inequality constraints of the control quantity trajectory and the state quantity trajectory, as well as the equality constraints of the terminal position and the terminal attitude. The neural network training module is used to train the neural network in a self-supervised manner using the objective function and constraints of the parameterized optimization problem as the training objective, so that the neural network learns the mapping from the input parameters to the sparse parameters of the optimal trajectory. The trajectory generation module is used to input the input parameters of any optimization problem into a trained neural network and generate the optimal trajectory of a six-degree-of-freedom fixed-wing aircraft in real time.
7. The real-time trajectory optimization system for a six-degree-of-freedom fixed-wing aircraft according to claim 6, characterized in that, The trajectory representation module uses multi-segment polynomials to represent the trajectory of the control quantity and obtains the trajectory of the state quantity through integral dynamic equations; the trajectory sparse parameters include the values at the connection points of each polynomial segment, the values of the boundary conditions at the end time, and the time of each polynomial segment.
8. The real-time trajectory optimization system for a six-degree-of-freedom fixed-wing aircraft according to claim 6, characterized in that, In the optimization problem construction module, the objective function and constraints of the parameterized optimization problem can be added or modified according to user needs, including adding terminal speed constraints and / or obstacle avoidance constraints.
9. The real-time trajectory optimization system for a six-degree-of-freedom fixed-wing aircraft according to claim 6, characterized in that, In the neural network training module, the neural network includes a primary network and a dual network; the primary network is used to learn the mapping from input parameters to sparse parameters of the optimal trajectory; the dual network is used to learn the mapping from input parameters to Lagrange multipliers; and the primary network and the dual network are trained alternately according to the framework of the augmented Lagrange method.