Trajectory prediction method based on deep learning
By integrating deep learning networks of LSTM and Transformer and introducing hybrid expert models in Transformer, the problem of uncertainty and insufficient adaptability of traditional methods in complex dynamic environments is solved, and more efficient and accurate aircraft trajectory prediction is achieved.
Patent Information
- Application Number
- CN202411473780.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-07
AI Technical Summary
Traditional aircraft trajectory prediction methods have problems of uncertainty and insufficient adaptability in complex dynamic environments. Gradient explosions or disappearances are prone to occur when using LSTM or Transformer alone, and are insensitive to local feature capture.
Using deep learning networks that combine long and short-term memory networks (LSTM) and Transformer, and introducing a hybrid expert model (Mixture of Experts) into Transformer, enable different expert networks to be optimized for specific heights, thereby adapting to atmospheric conditions at different heights. .
It improves the accuracy and generalization ability of trajectory prediction, enhances the adaptability and prediction accuracy of the model, and improves the success rate and safety of the task.
Smart Images

Figure CN119397195A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of trajectory prediction and relates to a trajectory prediction method based on deep learning. The present invention adopts a deep learning network integrating a long short-term memory network (LSTM) and a Transformer and applies the deep learning network to the field of aircraft trajectory prediction. Background Art
[0002] In the aviation field, accurate trajectory prediction is crucial for aircraft navigation, control, and mission execution. Traditional trajectory prediction methods usually rely on physical models and empirical formulas, which often face problems of uncertainty and lack of adaptability when dealing with complex dynamic environments. With the increase in the complexity of aviation missions and the amount of data, machine learning-based technologies, especially deep learning, have gradually become an important tool to solve this problem.
[0003] As a special type of recurrent neural network, the Long Short-Term Memory (LSTM) network can effectively process and capture long-term dependencies in time series data. It performs well in processing prediction tasks with time correlation, but its training efficiency and generalization ability are limited when facing large-scale data sets. In addition, when processing long sequence data, LSTM often has the problem of gradient vanishing and exploding, which affects the learning ability of the model.
[0004] On the other hand, the Transformer model has achieved remarkable success in fields such as natural language processing. Its self-attention mechanism allows the model to process data in parallel and model in a global context, making it more efficient to process large-scale data. However, when processing time series data, the Transformer lacks specialized modeling of temporal dependencies, which may lead to insufficient sensitivity to capturing local features in the sequence.
[0005] In addition, since the aircraft operating altitude varies greatly, if the same model parameters are used for different altitudes and different atmospheric conditions, the generalization of the model prediction is likely to decrease. Therefore, the present invention improves the Transformer in the model and uses a mixed expert model (Mixture of Experts) to replace the feed-forward network layer (feed-forward network) in the original Transformer network. In this improvement, the present invention enables different expert networks to be optimized for specific altitudes, so that the model can adaptively use different parameters according to atmospheric conditions at different altitudes. This method effectively enhances the prediction accuracy and generalization ability of the model, provides a more accurate and efficient solution for aircraft trajectory prediction, and thus improves the success rate and safety of the mission. Summary of the invention
[0006] In view of the above problems, the present invention provides a method for trajectory prediction based on deep learning. The present invention integrates the deep learning trajectory prediction network of long short-term memory network (LSTM) and Transformer, fully utilizes the time series information processing capability of LSTM and the global context modeling capability of Transformer self-attention mechanism, adapts to high-dimensional and variable data input in complex aviation environments, such as historical trajectories, wind speed, wind direction and other dynamic factors, solves the uncertainty problem of traditional physical models in dealing with dynamic environments, and provides a more accurate and efficient solution for aircraft trajectory prediction, thereby improving the success rate and safety of the task. It solves the problems of using LSTM or Transformer alone for aircraft trajectory prediction tasks, which inevitably lead to long sequence gradient explosion or disappearance, and insensitivity to local feature capture, etc.
[0007] The present invention provides a trajectory prediction method based on deep learning, and the specific steps are as follows:
[0008] Step 1: Obtain aircraft flight data set;
[0009] Step 2: Obtain training input data;
[0010] Step 3: Based on the input data in step 2, construct an LSTM long short-term memory network;
[0011] Step 4: Based on the output data of the LSTM long short-term memory network in step 3, construct a Transformer neural network;
[0012] Step 5: Perform weighted fusion of the LSTM long short-term memory network and the Transformer neural network in steps 3 and 4;
[0013] Step 6: Based on the fusion result in step 5, a fully connected layer is constructed to process the fusion result, and a trajectory prediction network is obtained to output the future trajectory of the aircraft.
[0014] Step 7: Train the trajectory prediction network, input the aircraft flight data set in step 1, use back propagation and deep supervision mechanism to adjust the network weights, update the structural parameters, and obtain the optimal global parameter matrix of the trajectory prediction network;
[0015] Step 8: Based on the trajectory prediction network in step 7, input the historical trajectory of the aircraft and the corresponding wind speed and wind direction, obtain the aircraft's next moment to predict its position, and iterate multiple times to obtain the predicted trajectory of the aircraft.
[0016] Optionally, in step 1, the aircraft flight data set is obtained by considering longitude, latitude, altitude, speed, acceleration, attitude, and wind speed and direction; and the aircraft coordinates at each time step and the current wind speed and direction are extracted.
[0017] Optionally, the input data acquired in step 2 includes historical trajectory data, wind speed and wind direction; the historical trajectory data, wind speed and wind direction are vector-joined to serve as input data for the trajectory prediction model.
[0018] Optionally, the LSTM long short-term memory network includes a first LSTM layer and a second LSTM layer, the first LSTM layer is used to output a hidden state, and the second LSTM layer processes the output of the first layer.
[0019] Optionally, the number of units in the first layer of LSTM is set to 128 hidden units; the activation function uses tanh.
[0020] Optionally, the second LSTM layer is set to 128 hidden units, an activation function and a Dropout layer.
[0021] Optionally, the Transformer neural network includes an encoding layer and a decoder layer.
[0022] Optionally, a feed-forward fully connected network is set after the self-attention layer of the Transformer neural network.
[0023] Optionally, the Transformer neural network also includes a mixture of experts network layer.
[0024] Optionally, the hybrid expert network layer includes multiple expert networks and a gating network.
[0025] Compared with the prior art, the present invention has at least the following beneficial effects:
[0026] 1. The method of the present invention overcomes the difficulty in obtaining real data by establishing a simulated aircraft flight trajectory data set, thereby ensuring the adequacy and diversity of model training data.
[0027] 2 The method of the present invention takes into account environmental factors such as wind speed and wind direction, so that the model can still maintain good prediction performance in a dynamic environment and enhance its adaptability to complex flight conditions.
[0028] 3. The method of the present invention combines the advantages of LSTM and Transformer networks by fusing LSTM and Transformer, so that the model can simultaneously capture the long-term dependencies and global contextual relationships of time series, thereby improving the accuracy of trajectory prediction.
[0029] 4. The method of the present invention improves the Transformer in the model, and uses a mixture of experts to replace the feed-forward network layer in the original Transformer network. In this improvement, the present invention enables different expert networks to be optimized for specific altitudes, so that the model can adaptively use different parameters according to atmospheric conditions at different altitudes. This method effectively enhances the prediction accuracy and generalization ability of the model, provides a more accurate and efficient solution for aircraft trajectory prediction, and thus improves the success rate and safety of the mission.
[0030] 5. The present invention introduces a mixed expert layer (MoE) in the Transformer layer, so that different expert networks can be optimized for specific altitudes and environmental conditions, thereby achieving targeted parameter configuration, significantly improving the prediction accuracy and robustness of the model at different flight altitudes. By dynamically selecting appropriate experts, the model can adaptively adjust when facing complex atmospheric changes, improving its ability to cope with extreme weather and complex climate conditions.
[0031] 6. The multi-layer network structure of the present invention, especially the deep fusion of LSTM and Transformer, combined with the hybrid expert mechanism, not only enhances the expressive power of the model, but also improves the computational efficiency. Through the sparse activation mechanism in the hybrid expert layer, the model only activates part of the expert network for calculation, thereby reducing the computational complexity, improving the reasoning speed, and providing feasibility for real-time trajectory prediction, making it more practical in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 Schematic diagram of the overall structure of the deep learning network constructed for the present invention.
[0033] Figure 2 Schematic diagram of the LSTM layer of the deep learning network constructed for the present invention.
[0034] Figure 3 Schematic diagram of the Transformer layer of the deep learning network constructed for the present invention. DETAILED DESCRIPTION
[0035] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. In addition, the present invention can also be implemented in other ways different from those described herein, and therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.
[0036] A specific embodiment of the present invention, as Figure 1-Figure 3 , discloses a trajectory prediction method based on deep learning, the specific steps are as follows:
[0037] Step 1: Obtain aircraft flight data set;
[0038] Preferably, the acquired aircraft flight data set is a simulation data set;
[0039] Specifically, first, a physical model is set in MATLAB to establish a dynamic model of the aircraft; factors affecting the flight trajectory, such as gravity, air resistance, thrust and control force, are considered, and the initial conditions of the aircraft, including position, speed and attitude, are defined; atmospheric conditions, including wind speed, wind direction, altitude and temperature, are set; the time step and total simulation time of the simulation run are determined, and numerical simulation is performed through the established physical model to calculate the state variables such as the position, velocity and acceleration of the aircraft at each time step, and record relevant data at each time step, including longitude, latitude, altitude, speed, acceleration, attitude, and external environmental factors such as wind speed and wind direction; the aircraft coordinates at each time step and the current wind speed and wind direction are extracted as the flight trajectory data in the data set, thereby constructing a flight trajectory data set for the simulated aircraft.
[0040] Step 2: Get training input data:
[0041] Specifically, the input data includes historical trajectory data (3D data of longitude, latitude and altitude of the aircraft trajectory), wind speed and direction (3D data of horizontal wind speed (U), vertical wind speed (V) and height component of wind speed (W) on the aircraft trajectory). The historical trajectory data, wind speed and wind direction are vectorized and used as input data for the trajectory prediction model.
[0042] Step 3: Based on the input data in step 2, build an LSTM long short-term memory network.
[0043] The LSTM long short-term memory network includes a first layer LSTM and a second layer LSTM. The first layer LSTM is used to output the hidden state, and the second layer LSTM processes the output of the first layer.
[0044] Specifically, the first layer of LSTM accepts the concatenated input data, processes the concatenated input data and generates hidden states.
[0045] The number of units in the first layer of LSTM is set to 128 hidden units in order to capture the temporal features of the concatenated input data; the activation function uses tanh to help the model learn complex dynamic features with good nonlinear characteristics; a Dropout layer is added after the first layer of LSTM, and the dropout rate is set to 0.2 to reduce overfitting and improve the generalization ability of the model.
[0046] The second LSTM layer takes the output hidden state of the first LSTM layer as input to further capture more complex temporal dependencies. The second LSTM layer is set to 128 hidden units, and the configuration of the activation function and Dropout layer is kept consistent to ensure the consistency and stability of the network.
[0047] The LSTM long short-term memory network of the present invention sets two layers of LSTM networks in the model, which can enhance the ability to capture time dependencies and improve the ability to process time series data. Through such an LSTM structure, the model can effectively extract the time series information in the historical trajectory data and pass it to the subsequent layers, providing rich features for subsequent processing.
[0048] Step 4: Based on the output data of the LSTM long short-term memory network in step 3, build a Transformer neural network.
[0049] Specifically, the Transformer neural network includes an encoding layer and a decoder layer, and the hidden state of the first layer LSTM of the LSTM long short-term memory network in step 3 is input into the encoding layer.
[0050] The self-attention mechanism of the Transformer neural network is used to calculate the correlation between different hidden state inputs at each time step. Through weight distribution, the model can focus on important features at different time points, thereby enhancing the ability to respond to dynamic changes. The encoder layer includes a self-attention layer and a linear layer. The self-attention layer adopts a multi-head self-attention mechanism with 8 heads to allow the model to learn information simultaneously in different representation subspaces. Each attention head has an independent linear transformation. Finally, the outputs of all heads are concatenated and mapped through a linear layer to form the final output representation.
[0051] Furthermore, a feedforward fully connected network is added after the self-attention layer. Each layer of the feedforward fully connected network contains a ReLU activation function for further processing and refining features, which increases the nonlinear expression ability of the model.
[0052] The Transformer neural network of the present invention can effectively integrate the temporal features extracted by LSTM with the global context information, providing a rich representation for feature fusion.
[0053] Furthermore, the feedforward network layer of the Transformer neural network is set as a mixed expert network layer (MoE) to adapt to the dynamic characteristics of aircraft at different altitudes. In this layer, multiple expert networks are dynamically selected according to the input characteristics, so that the model has specialized parameter configurations for different altitudes and atmospheric conditions, improving the adaptability and prediction accuracy of the model.
[0054] Specifically, the Mixed Expert Network (MoE) layer includes 10 expert networks, each of which is an independent fully connected neural network with the same structure but independent parameters. At the same time, there is a gating network to control which experts should be selected for different inputs.
[0055] Among them, each expert network is a feedforward neural network with the following structure:
[0056] The expert network receives the output of the multi-head attention in the Transformer neural network as input (dimension 128) after addition and layer normalization. Each expert network contains two fully connected layers:
[0057] The first fully connected layer has 512 neurons (i.e., the output dimension is 512), and the activation function is ReLU to increase the nonlinear characteristics of the model.
[0058] The second fully connected layer: 128 neurons (that is, the output dimension is 128, which unifies the dimension with the input), and the activation function is also ReLU to further refine the features.
[0059] The parameters of each expert are trained independently, allowing different experts to learn different features and patterns.
[0060] Among them, the structure of the gated network is: the gated network receives the output of the multi-head attention in the Transformer layer and the result after addition and layer normalization as input, and the dimension is 128.
[0061] The gating network contains a fully connected layer that converts the input features into outputs equal to the number of experts. Through this layer, the model generates a vector representing the selection probability of each expert. The selection probabilities are normalized using the Softmax function to ensure that the sum of all output values is 1. Each output value corresponds to the activation probability of an expert, reflecting the applicability of the expert in the current input situation.
[0062] The present invention applies a sparse activation mechanism in a gated network and adopts a topk selection strategy, that is, only the k experts with the highest activation probability are selected to participate in the calculation. Specifically, first, the experts are sorted according to the selection probability output by the gated network. Secondly, k experts with high selection probability are selected. This process ensures that only a few experts are activated in each calculation, reducing the computational complexity. The selected k experts independently process the same input features and generate their own outputs. The final model output is obtained by weighted fusion of the outputs of the activated experts. The weighted fusion process uses the probability of the gated network output to reflect the importance of each expert to the final result.
[0063] For each activated expert, its output is multiplied by the corresponding activation probability to form a weighted output. The final output is the sum of all weighted results, expressed as:
[0064]
[0065] Among them, ExpertOutput represents the output of the hybrid expert layer, k represents the number of experts whose topk strategies are selected, and P j represents the probability of the jth expert being activated, Expert j (X) represents the output of the jth activated expert for input X.
[0066] Step 5: Perform weighted fusion of the LSTM long short-term memory network and the Transformer neural network in steps 3 and 4;
[0067] Specifically, this layer performs a weighted fusion of the output of the LSTM layer and the output of the Transformer layer.
[0068] First, the outputs of the LSTM long short-term memory network and the Transformer neural network are concatenated in the feature dimension to form a new feature vector.
[0069] Next, set the learnable weight coefficients to allow the model to adaptively adjust the weights of the LSTM long short-term memory network and the Transformer neural network output during training.
[0070] The dynamic adjustment mechanism of the present invention enables the model to optimize the fusion effect of features in different scenarios.
[0071] Finally, the fused feature vector is input into the activation function layer.
[0072] Preferably, the activation function layer adopts the ReLU activation function to introduce nonlinear relationships and enhance the expressive power of the model.
[0073] Through the above steps, the feature fusion layer of the present invention effectively combines the time-dependent features of the LSTM long short-term memory network and the global context features of the Transformer neural network, laying a solid foundation for subsequent prediction tasks. This fusion method can give full play to the advantages of the two networks and improve the accuracy and reliability of trajectory prediction.
[0074] Step 6: Based on the fusion result in step 5, a fully connected layer is constructed to process the fusion result, and a trajectory prediction network is obtained to output the future trajectory of the aircraft.
[0075] Specifically, the fully connected layer uses a linear activation function to output the future trajectory of the aircraft (i.e., the longitude, latitude, and altitude of the aircraft) to ensure that the output value is within an appropriate range and maps the prediction result to the actual trajectory space.
[0076] Step 7: Train the trajectory prediction network, input the aircraft flight data set in step 1, use back propagation and deep supervision mechanism to adjust the network weights, update the structural parameters, and obtain the optimal global parameter matrix of the trajectory prediction network;
[0077] Preferably, the mean square error (MSE) loss function is used to ensure that the predicted value is consistent with the true value. The expression of the mean square error (MSE) loss function is:
[0078]
[0079] Where n is the number of samples, y i is the true value of the flight data of the ith aircraft, is the predicted value of the flight data of the ith aircraft.
[0080] Furthermore, during the training process, the present invention also introduces load balancing loss to ensure balanced use of different experts in the hybrid expert network constructed in step 5, so as to avoid some experts being frequently activated while other experts being neglected.
[0081] Specifically, we count the number of activations of each expert in a training batch and design a load balancing loss function:
[0082]
[0083] Among them, LoadBalance loss represents the load balancing loss, λ represents the hyperparameter for adjusting the size of the loss function, activationfrequency j It represents the number of times the jth activated expert is activated in the current batch of training data, and N represents the total number of samples in the current batch of training data.
[0084] The total loss function is:
[0085] Total loss = MSE loss +LoadBalance loss .
[0086] By optimizing the total loss function, the model takes into account both prediction accuracy and balanced use of experts during the training process.
[0087] For example, the number of training iterations is set to 200, the batch size is 16, the initial learning rate is 0.0002, the cosine annealing method is used to reduce the learning rate during the training process, and the Adam optimizer is used for training to obtain the optimal network parameter weights. Through training, the model gradually learns the optimal mapping, enabling it to accurately predict the position of the aircraft at the next moment.
[0088] Furthermore, during the training process, the gating network dynamically selects a suitable expert network layer (MoE) to participate in the calculation according to the input features (such as historical trajectory, wind speed, wind direction, etc.).
[0089] The present invention adopts the mean square error (MSE) loss function to ensure that the predicted value is consistent with the true value. At the same time, for the sparse activation mechanism of the hybrid expert network, the present invention also designs a load balancing regularization strategy, which promotes the balanced use of different experts through the load balancing loss function, avoids some experts being frequently activated and other experts being neglected, thereby improving the overall generalization ability and stability of the model. Through training, the hybrid expert model gradually optimizes each expert network so that it can provide more accurate predictions for different input features, especially for processing the trajectory of aircraft at different altitudes and atmospheric conditions. The gated network dynamically selects the most suitable experts through learning, and combines the sparse activation mechanism to ensure that only a few experts are activated to participate in the calculation in each forward propagation, thereby improving the calculation efficiency and the performance of the model. At the same time, the introduced load balancing loss ensures the balanced use of experts, avoids some experts being frequently activated, and gradually improves the capabilities of all experts. Finally, through the joint optimization of the mean square error (MSE) and the load balancing loss, the model can effectively predict the future trajectory of the aircraft, enhancing the prediction accuracy and generalization ability.
[0090] Step 8: Based on the trajectory prediction network in step 7, input the historical trajectory of the aircraft and the corresponding wind speed and wind direction, obtain the aircraft's next moment to predict its position, and iterate multiple times to obtain the predicted trajectory of the aircraft.
[0091] Step 9: Compare the predicted trajectory with the true trajectory to obtain an evaluation index, and use the evaluation index to evaluate the accuracy of the model trajectory prediction.
[0092] Specifically, the endpoint prediction error FDE and the average trajectory prediction point prediction error ADE are used as evaluation indicators for evaluating the predicted trajectory.
[0093] Among them, the end point prediction error FDE is used to measure the distance between the last point of the predicted trajectory and the last point of the true trajectory, and the expression is:
[0094]
[0095] Among them, y Tis the position (longitude, latitude, altitude) of the true trajectory at the last moment T, is the position of the predicted trajectory at the last moment T, and ||·|| is the Euclidean distance.
[0096] The average trajectory prediction point prediction error ADE is used to measure the average error of the predicted trajectory in the entire prediction sequence, and the expression is:
[0097]
[0098] Among them, y t is the position of the true trajectory at time step t, is the position of the predicted trajectory at time step t.
[0099] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A trajectory prediction method based on deep learning, characterized in that: The specific steps are as follows: Step 1: Obtain aircraft flight data set; Step 2: Obtain training input data; Step 3: Based on the input data in step 2, construct an LSTM long short-term memory network; Step 4: Based on the output data of the LSTM long short-term memory network in step 3, construct a Transformer neural network; Step 5: Perform weighted fusion of the LSTM long short-term memory network and the Transformer neural network in steps 3 and 4; Step 6: Based on the fusion result in step 5, a fully connected layer is constructed to process the fusion result, and a trajectory prediction network is obtained to output the future trajectory of the aircraft. Step 7: Train the trajectory prediction network, input the aircraft flight data set in step 1, use back propagation and deep supervision mechanism to adjust the network weights, update the structural parameters, and obtain the optimal global parameter matrix of the trajectory prediction network; Step 8: Based on the trajectory prediction network in step 7, input the historical trajectory of the aircraft and the corresponding wind speed and wind direction, obtain the aircraft's next moment to predict its position, and iterate multiple times to obtain the predicted trajectory of the aircraft.
2. The trajectory prediction method according to claim 1, characterized in that: The specific steps are as follows: In step 1, obtain the aircraft flight data set considering longitude, latitude, altitude, speed, acceleration, attitude, wind speed and direction; extract the aircraft coordinates at each time step and the current wind speed and direction.
3. The trajectory prediction method according to claim 1, characterized in that: The input data obtained in step 2 includes historical trajectory data, wind speed and wind direction; the historical trajectory data, wind speed and wind direction are vector-joined as input data for the trajectory prediction model.
4. The trajectory prediction method according to claim 1, characterized in that: The LSTM long short-term memory network includes a first layer LSTM and a second layer LSTM. The first layer LSTM is used to output the hidden state, and the second layer LSTM processes the output of the first layer.
5. The trajectory prediction method according to claim 4, characterized in that: The number of units in the first layer of LSTM is set to 128 hidden units; the activation function uses tanh.
6. The trajectory prediction method according to claim 4, characterized in that: The second LSTM layer is set to 128 hidden units, activation function and Dropout layer.
7. The trajectory prediction method according to claim 6, characterized in that: The Transformer neural network consists of an encoder layer and a decoder layer.
8. The trajectory prediction method according to claim 7, characterized in that: A feed-forward fully connected network is set up after the self-attention layer of the Transformer neural network.
9. The trajectory prediction method according to claim 1, characterized in that: The Transformer neural network also includes a mixture of experts network layer.
10. The trajectory prediction method according to claim 9, characterized in that: The hybrid expert network layer includes multiple expert networks and gating networks.
Citation Information
Patent Citations
Aircraft trajectory prediction method based on long short-term memory network
CN114048889A
Method for predicting sailing trajectory of automatic ship identification system
CN117131371A
Typhoon trajectory prediction method based on deep learning
CN117952255A
Dialogue model training method, dialogue generation control method, system and equipment
CN118296117A
Training method of large language model system based on improved Transform network
CN118430519A
Cited By
Calculation method of civil aviation flight arrival data based on ADS-B (Automatic Dependent Surveillance-Broadcast)
CN119849703A