An iTransformer-based unmanned aerial vehicle 4D trajectory prediction method
By employing a differential encoding and autoregressive training strategy based on iTransformer, the problem of capturing time and cross-variable dependencies in UAV trajectory prediction is solved, enabling flexible adaptation and accurate prediction for different UAV models.
Patent Information
- Application Number
- CN202611655593.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-26
- Publication Date
- 2026-11-20
AI Technical Summary
Existing UAV trajectory prediction methods struggle to simultaneously capture temporal and intervariate dependencies, lack adaptability to different UAV models, and lack flexible length adaptation mechanisms.
We employ an iTransformer-based approach to transform track data into incremental position features through differential encoding. We construct a multi-layer Transformer encoder and combine an autoregressive training strategy with a device embedding layer to capture cross-variable dependencies among multiple variables and achieve variable-length track prediction.
It improves the model's generalization ability and equipment adaptability, enabling it to flexibly adapt to the motion characteristics of different UAV models and achieve more accurate trajectory prediction.
Smart Images

Figure CN123135076A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of UAV trajectory prediction technology, specifically relating to a UAV 4D trajectory prediction method based on iTransformer. Background Technology
[0002] In recent years, unmanned aerial vehicles (UAVs) have been widely used in logistics transportation, agricultural plant protection, environmental monitoring, emergency rescue and other fields. With the increasing complexity and scale of UAV application scenarios, accurate prediction of UAV flight paths has become one of the key technologies to ensure flight safety, optimize airspace resource utilization and improve operational efficiency.
[0003] Existing UAV trajectory prediction methods can be mainly classified into the following categories:
[0004] (1) Physical model-based method: extrapolate the future trajectory based on the UAV's kinematics or dynamics model and the current motion state (position, velocity, acceleration, attitude angle, etc.). This type of method has a small computational load, but the prediction accuracy is limited by the model accuracy and it is difficult to cope with complex weather conditions and sudden situations.
[0005] (2) Methods based on traditional statistical learning: Kalman filtering, hidden Markov model, Gaussian process and other methods are used to model and predict the trajectory; these methods improve the prediction accuracy to a certain extent, but usually require manual design of features and have limited predictive ability for long time series.
[0006] (3) Deep learning-based methods: In recent years, recurrent neural networks (RNN), long short-term memory networks (LSTM) and their variants have been widely used in trajectory prediction; however, RNN series models have the problem of gradient vanishing / exploding, making it difficult to effectively capture long-range dependencies; in addition, these methods usually treat time steps as tokens, ignoring the cross-variable dependencies between different variables in multivariate time series.
[0007] (4) Methods based on standard Transformer: The Transformer architecture is introduced into trajectory prediction, and the self-attention mechanism is used to capture long-range dependencies in the sequence. However, the standard Transformer packages all variables at each time step into a token and processes them separately through a feedforward network in the variable dimension, which fails to effectively model the correlation between variables. At the same time, the input and output lengths of the standard Transformer are fixed, making it difficult to flexibly cope with prediction requirements of different lengths.
[0008] Therefore, there is an urgent need for a UAV trajectory prediction method that can simultaneously capture temporal and intervariate dependencies, and has good generalization ability and device adaptability. Summary of the Invention
[0009] To address the shortcomings of the existing technologies, the present invention aims to provide a UAV 4D trajectory prediction method based on iTransformer, which solves the problems of existing UAV trajectory prediction methods, such as difficulty in simultaneously capturing temporal and intervariate dependencies in trajectory data, insufficient model adaptability to different UAV models, and lack of flexible length adaptation mechanism in the prediction process.
[0010] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0011] The present invention provides a UAV 4D trajectory prediction method based on iTransformer, comprising the following steps:
[0012] 1) Obtain the original UAV track data containing latitude and longitude coordinates, altitude and timestamp, convert the latitude and longitude coordinates and altitude of the original track into three-dimensional coordinates (x,y,z) in the geocentric rectangular coordinate system, and clean and segment the data based on the altitude change and time interval to obtain several complete tracks;
[0013] 2) Perform differential calculation on the three-dimensional coordinates of adjacent track points in the track obtained in step 1) to obtain the position increment sequence, and construct a multivariate feature sequence by combining the time interval;
[0014] 3) Construct a trajectory prediction model based on iTransformer. Transpose the multivariate feature sequence obtained in step 2) according to the variable dimension. Treat the sequence of each variable as a variable word. Map it to a high-dimensional feature representation through the MLP layer. Then, concatenate the device sn code embedding vector and input it into the multi-layer Transformer encoder. Use an autoregressive training strategy to train the model and obtain the trained iTransformer model.
[0015] 4) After processing the raw flight path data of the UAV to be predicted in real time through steps 1) and 2), input it into the trained iTransformer model, predict the multivariate features of the future flight path at each time step, solve the multivariate features and three-dimensional coordinates to obtain the coordinates of the predicted flight path, and then transform it into latitude and longitude coordinates and altitude to output the complete predicted flight path.
[0016] Furthermore, in step 1), the original latitude and longitude coordinates and altitude are converted into three-dimensional coordinates (x, y, z) in a geocentric rectangular coordinate system, as shown in the following expression:
[0017] ;
[0018] ;
[0019] ;
[0020] Where R is the Earth's radius. The original flight path's longitude in radians. represents the latitude in radians of the original flight path, and h represents the altitude of the original flight path.
[0021] Furthermore, in step 1), the data is segmented based on the altitude change and time interval. The time interval between consecutive track points is greater than a preset threshold as the starting boundary of the new segment, and the relative altitude change is greater than a preset takeoff altitude threshold as the starting point of the segment and less than a preset landing altitude threshold as the ending point of the segment. The track segments are obtained by dividing the data according to the starting point and ending point of the segment.
[0022] Further, the differential calculation of the three-dimensional coordinates of adjacent track points in step 2) specifically involves setting... Indicates the first The three-dimensional coordinates of the nth track point, then the nth The position increment of each waypoint is ,in This indicates the position of the first waypoint. , , , Indicates the first The three-dimensional coordinates of each track point.
[0023] Furthermore, the position increment sequence obtained by difference calculation in step 2) is combined with time intervals to construct a multivariate feature sequence. , means as follows:
[0024] ;
[0025] ;
[0026] Where N is the total number of waypoints. Indicates the first Multivariate feature vectors of each waypoint Indicates the first Time increment for each waypoint , Indicates the first Time at each waypoint Indicates the first Time at each waypoint .
[0027] Furthermore, the iTransformer-based trajectory prediction model structure in step 3) includes:
[0028] The input transpose layer is used to transpose the input multivariate feature sequence of shape (B, L, D) to (B, D, L), where B is the batch size, L is the length of the multivariate feature sequence, and D is the multivariate feature dimension.
[0029] The MLP layer contains a shared linear mapping unit that maps each variable feature sequence of length L to a linear mapping unit of dimension L. The high-dimensional vector outputs a shape of (B, D, d). model );
[0030] The device SN code embedding layer maintains a learnable embedding vector for each drone device. It is concatenated with D variable words in the sequence dimension, and the output shape is (B, D+1, d). model );
[0031] The normalization layer normalizes the new features after splicing.
[0032] A multi-layer Transformer encoder consists of N stacked encoder layers, each containing a multi-head self-attention sublayer and a feedforward neural network sublayer, used to capture complex dependencies between variables;
[0033] The output projection layer contains a shared linear inverse mapping unit that maps each dimension to... The feature vector is mapped to an output sequence of length L, and the output shape is (B, D, L);
[0034] The output transpose layer transposes the output of shape (B, D, L) back to (B, L, D).
[0035] Furthermore, in step 3), an autoregressive training strategy is used to train the model, specifically as follows:
[0036] Multivariate feature sequences Feature sequences are selected by sliding a window of length L. , means as follows:
[0037] ;
[0038] ;
[0039] in, Indicates the first A continuous multivariate feature sequence of length L, starting from several waypoints; during model training, the input is the sequence. ,set up Indicates the first The model predicts multivariate features for each waypoint, Compared with true multivariate features The model loss is calculated, and the model gradient is updated through backpropagation to train the model. The loss function adopts the mean squared error loss, and only the loss of multivariate features of valid waypoints is calculated. For invalid points, the gradient backpropagation of the loss at that waypoint is masked by a mask matrix.
[0040] loss function The expression is as follows:
[0041] ;
[0042] Where N represents the total number of waypoints, ||•||1 represents the 1-norm of the vector, ||•||2 represents the 2-norm of the vector, and ⊙ represents element-wise product. This represents the mask vector corresponding to the multivariate features of the (i+L)th track point; during training, a cosine annealing learning rate scheduling strategy and gradient clipping are used.
[0043] Furthermore, in step 3), a left-aligned padding strategy is used to pad the front of the multivariate feature sequence with a length of less than L+1 as padding variable words, and the corresponding mask is recorded. The mask value corresponding to the padding position is 0 and the effective position is 1.
[0044] Further, step 4) specifically includes:
[0045] The multivariate feature sequence of the flight path obtained after processing the raw flight path data of the UAV in real time through steps 1) and 2) is input into the trained iTransformer model to predict the multivariate features of the future flight path time by time in an autoregressive manner. The expression is as follows:
[0046] ;
[0047] in, Indicates the first Predictive multivariate features of each waypoint This represents the position increment predicted by the model. Indicates the time interval for model predictions;
[0048] By combining the predicted multivariate features with the three-dimensional coordinates, the coordinates of the predicted trajectory are obtained. ,as follows:
[0049] ;
[0050] in, To predict the initial data trackpoint coordinates of the drone's real-time flight;
[0051] The coordinates of the predicted flight path are converted into latitude, longitude, and altitude coordinates by coordinate inversion, as follows:
[0052] ;
[0053] ;
[0054] ;
[0055] Where atan2 represents the two-parameter arctangent function;
[0056] Predicting multivariate features spliced to multivariate feature sequences of the track At the end, the earliest multivariate features of the sequence are removed to keep the model input length fixed.
[0057] Furthermore, in step 4), during each prediction, the time interval for the next moment is... The value ΔT is set to a fixed value to eliminate the influence of time interval uncertainty and improve prediction stability.
[0058] The beneficial effects of this invention are:
[0059] This invention employs the iTransformer architecture, using variables as variable words as model input and complete time series as representation features for word words, and models the model through a multi-head self-attention mechanism. , , , The cross-variable dependencies among the four variables are more effective at capturing the coupling relationships between variables in track data compared to the standard Transformer's approach of using time steps as terms.
[0060] This invention transforms trajectory prediction into position increment feature prediction through differential coding (Delta coding), eliminating the interference of absolute coordinate position on the model, enabling the model to focus on learning the motion pattern itself, and improving the model's generalization ability.
[0061] This invention maintains independent learnable embedding vectors for different UAV devices through a device embedding layer, enabling the model to adapt to the differences in motion characteristics of different UAV models and enhancing the device adaptability of the method.
[0062] This invention employs autoregressive prediction combined with a fixed time interval mechanism to achieve variable-length trajectory prediction, which can flexibly adapt to the prediction step requirements under different mission scenarios. Attached Figure Description
[0063] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0064] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to embodiments and accompanying drawings. The content mentioned in the embodiments is not intended to limit the present invention.
[0065] Reference Figure 1 As shown, the present invention provides a UAV 4D trajectory prediction method based on iTransformer, comprising the following steps:
[0066] 1) Obtain raw UAV track data containing latitude and longitude coordinates, altitude, and timestamps. Convert the latitude and longitude coordinates and altitude of the raw track data into three-dimensional coordinates (x, y, z) in a geocentric rectangular coordinate system. Clean and segment the data based on altitude changes and time intervals to obtain several complete tracks; specifically as follows:
[0067] The original flight path's latitude, longitude, and altitude coordinates are converted into three-dimensional coordinates (x, y, z) in a geocentric rectangular coordinate system, as shown in the following expression:
[0068] ;
[0069] ;
[0070] ;
[0071] Where R is the Earth's radius. The original flight path's longitude in radians. represents the latitude in radians of the original flight path, and h represents the altitude of the original flight path.
[0072] Segmenting data based on altitude change and time interval is done by taking a time interval between consecutive track points greater than a preset threshold as the starting boundary of a new segment, taking a relative altitude change exceeding a preset takeoff altitude threshold as the starting point of the segment, and taking a relative altitude change below a preset landing altitude threshold as the ending point of the segment. Track segments are obtained by dividing the data based on the starting and ending points of the segments.
[0073] 2) Perform differential calculation on the three-dimensional coordinates of adjacent track points in the track obtained in step 1) to obtain the position increment sequence, and construct a multivariate feature sequence by combining the time interval;
[0074] The specific steps for calculating the difference between the three-dimensional coordinates of adjacent waypoints are as follows: Set... Indicates the first The three-dimensional coordinates of the nth track point, then the nth The position increment of each waypoint is ,in This indicates the position of the first waypoint. , , , Indicates the first The three-dimensional coordinates of each track point.
[0075] In step 2), the position increment sequence obtained by differential calculation is combined with the time interval to construct a multivariate feature sequence. , means as follows:
[0076] ;
[0077] ;
[0078] Where N is the total number of waypoints (maximum sequence length). Indicates the first Multivariate feature vectors of each waypoint Indicates the first Time increment for each waypoint , Indicates the first Time at each waypoint Indicates the first Time at each waypoint .
[0079] 3) Construct a trajectory prediction model based on iTransformer. Transpose the multivariate feature sequence obtained in step 2) according to the variable dimension. Treat the sequence of each variable as a variable token, map it into a high-dimensional feature representation through the MLP layer, and then concatenate it with the device SN code embedding vector and input it into the multi-layer Transformer encoder. Use an autoregressive training strategy to train the model and obtain the trained iTransformer model.
[0080] The iTransformer-based trajectory prediction model structure includes:
[0081] The input transpose layer is used to transpose the input multivariate feature sequence of shape (B, L, D) to (B, D, L), where B is the batch size, L is the length of the multivariate feature sequence, and D is the multivariate feature dimension.
[0082] The MLP layer contains a shared linear mapping unit that maps each variable feature sequence of length L to a linear mapping unit of dimension L. The high-dimensional vector outputs a shape of (B, D, d). model );
[0083] Specifically, a shared learnable linear mapping is used to apply the same projection transformation to all four variables, as follows:
[0084] ;
[0085] in, This represents the linear mapping value of the d-th variable; , For the weight matrix and bias vector, Given a multivariate feature sequence, the complete feature sequence of the d-th variable is shown; each variable is projected onto a sequence of length L using the same linear mapping to a sequence of dimension L. The vector representation; through a weight-sharing mechanism, different variables share the same projection parameters, reducing the number of model parameters while maintaining a unified encoding capability for the variable sequences; the output shape is (B, D, ... ),in Take 256; T is the transpose symbol.
[0086] The device SN code embedding layer maintains a learnable embedding vector for each drone device. It is concatenated with D variable words in the sequence dimension, and the output shape is (B, D+1, d). model );
[0087] Specifically, a learnable embedding vector is maintained for each unmanned aerial vehicle (SN) device. For a given device number, from the embedding matrix Find the corresponding embedding vector in the middle, where Total number of devices;
[0088] Compare the device embedding vector with the output of the MLP layer in the sequence dimension. The assembly is as follows:
[0089] ;
[0090] in, This represents the new features after concatenation; the concatenation yields 5 model input variable units, of which 4 variable units correspond to... , , , Time series, one device term corresponds to drone device information.
[0091] The normalization layer normalizes the new features after splicing.
[0092] A multi-layer Transformer encoder consists of N stacked encoder layers, each containing a multi-head self-attention sublayer and a feedforward neural network sublayer, used to capture complex dependencies between variables;
[0093] Multi-head self-attention sublayer in a multi-layer Transformer encoder: Self-attention is calculated on the input feature representation, with 8 attention heads; the attention of each head is calculated as follows:
[0094] ;
[0095] in, This represents the attention mechanism algorithm. This represents the soft thresholding algorithm; the query Q, key K, and value V are obtained from the input through three different linear projections. Let K be the dimension. The output of multi-head attention is the result of splicing the outputs of each head and then linearly projecting them; each sub-layer is followed by residual connections and layer normalization;
[0096] The feedforward neural network sublayer in a multi-layer Transformer encoder consists of two linear layers and a non-linear activation function, as follows:
[0097] ;
[0098] Where FFN represents a feedforward neural network sublayer, o represents the input of the feedforward neural network sublayer, and σ represents a nonlinear activation unit. This indicates that the linear layer reduces the feature dimension from Mapped to a hidden layer feature dimension of 512, Map the hidden layer feature dimension from 512 back to Each sublayer is followed by a residual connection and layer normalization; the encoder output shape is (B, 5, d). model ).
[0099] The output projection layer contains a shared linear inverse mapping unit that maps each dimension to... The feature vector is mapped to an output sequence of length L, and the output shape is (B, D, L);
[0100] Take the first D variable terms from the encoder output (corresponding to the encoding results of D variables), and apply the same projection transformation to all four variables using a shared learnable linear mapping, as follows:
[0101] ;
[0102] in, This represents the linear mapping value of the d-th variable; , Each variable will pass through the same linear layer The feature inverse mapping of dimension is to output a sequence of length L; the output shape is (B,D,L).
[0103] The output transpose layer transposes the output of shape (B, D, L) back to (B, L, D).
[0104] Specifically, an autoregressive training strategy is used to train the model, as follows:
[0105] Multivariate feature sequences Feature sequences are selected by sliding a window of length L. , means as follows:
[0106] ;
[0107] ;
[0108] in, Indicates the first A continuous multivariate feature sequence of length L, starting from several waypoints; during model training, the input is the sequence. ,set up Indicates the first The model predicts multivariate features for each waypoint, Compared with true multivariate features The model loss is calculated, and the model gradient is updated through backpropagation to train the model. The loss function adopts the mean squared error loss, and only the loss of multivariate features of valid waypoints is calculated. For invalid points, the gradient backpropagation of the loss at that waypoint is masked by a mask matrix.
[0109] loss function The expression is as follows:
[0110] ;
[0111] Where N represents the total number of waypoints, ||•||1 represents the 1-norm of the vector, ||•||2 represents the 2-norm of the vector, and ⊙ represents the element-wise product (Hadamard product). This represents the mask vector corresponding to the multivariate features of the (i+L)th track point; during training, a cosine annealing learning rate scheduling strategy (CosineAnnealingLR, initial learning rate 10e-3, minimum learning rate 10e-6) and gradient clipping (maximum gradient norm set to 1.0) are adopted.
[0112] Specifically, for multivariate feature sequences with a length of less than L+1, a left-aligned padding strategy is adopted to pad the beginning of the sequence with zero vectors as padding variable words, and the corresponding mask is recorded. The mask value corresponding to the padding position is 0, and the effective position is 1.
[0113] 4) After processing the raw flight path data of the UAV in real time as described in steps 1) and 2), input it into the trained iTransformer model. The model uses an autoregressive approach to predict the multivariate features of the future flight path time-by-time. The multivariate features are then combined with the three-dimensional coordinates to obtain the coordinates of the predicted flight path. Finally, the model is inversely transformed into latitude, longitude, and altitude coordinates to output the complete predicted flight path. Specifically, this includes:
[0114] The multivariate feature sequence of the flight path obtained after processing the raw flight path data of the UAV in real time through steps 1) and 2) is input into the trained iTransformer model to predict the multivariate features of the future flight path time by time in an autoregressive manner. The expression is as follows:
[0115] ;
[0116] in, Indicates the first Predictive multivariate features of each waypoint This represents the position increment predicted by the model. Indicates the time interval for model predictions;
[0117] By combining the predicted multivariate features with the three-dimensional coordinates, the coordinates of the predicted trajectory are obtained. ,as follows:
[0118] ;
[0119] in, To predict the initial data trackpoint coordinates of the drone's real-time flight;
[0120] The coordinates of the predicted flight path are converted into latitude, longitude, and altitude coordinates by coordinate inversion, as follows:
[0121] ;
[0122] ;
[0123] ;
[0124] Where atan2 represents the two-parameter arctangent function;
[0125] Predicting multivariate features spliced to multivariate feature sequences of the track At the end, the earliest multivariate features of the sequence are removed to keep the model input length fixed.
[0126] Each prediction will include the time interval for the next moment. The value ΔT is set to a fixed value to eliminate the influence of time interval uncertainty and improve prediction stability.
[0127] This invention has many specific applications. The above description is only a preferred embodiment of this invention. It should be noted that for those skilled in the art, several improvements can be made without departing from the principle of this invention, and these improvements should also be considered within the scope of protection of this invention.
Claims
1. A method for predicting the 4D trajectory of a UAV based on iTransformer, characterized in that, The steps are as follows: 1) The latitude and longitude coordinates and altitude of the acquired original track are converted into three-dimensional coordinate values in the geocentric rectangular coordinate system, and the data is cleaned and segmented based on the altitude change and time interval to obtain several complete tracks. 2) Perform differential calculations on the three-dimensional coordinates of adjacent track points in the track to obtain the position increment sequence, and construct a multivariate feature sequence by combining the time interval; 3) Construct and train a trajectory prediction model based on iTransformer to obtain the trained iTransformer model; 4) After processing the raw flight path data of the UAV to be predicted in real time through steps 1) and 2), input it into the trained iTransformer model, predict the multivariate features of the future flight path at each time step, solve the multivariate features and three-dimensional coordinates to obtain the coordinates of the predicted flight path, and then transform it into latitude and longitude coordinates and altitude to output the complete predicted flight path.
2. The UAV 4D trajectory prediction method based on iTransformer according to claim 1, characterized in that, In step 1), the original latitude and longitude coordinates and altitude are converted into three-dimensional coordinates (x, y, z) in the geocentric rectangular coordinate system, as shown in the following expression: ; ; ; Where R is the Earth's radius. The original flight path's longitude in radians. represents the latitude in radians of the original flight path, and h represents the altitude of the original flight path.
3. The UAV 4D trajectory prediction method based on iTransformer according to claim 2, characterized in that, In step 1), the data is segmented based on altitude change and time interval. The time interval between consecutive track points is greater than a preset threshold as the starting boundary of the new segment. The relative altitude change is greater than a preset takeoff altitude threshold as the starting point of the segment and less than a preset landing altitude threshold as the ending point of the segment. The track segments are obtained by dividing the data according to the starting point and ending point of the segment.
4. The UAV 4D trajectory prediction method based on iTransformer according to claim 2, characterized in that, The specific steps for performing the difference calculation of the three-dimensional coordinates of adjacent track points in step 2) are as follows: Setting... Indicates the first The three-dimensional coordinates of the nth track point, then the nth The position increment of each waypoint is ,in This indicates the position of the first waypoint. , , , Indicates the first The three-dimensional coordinates of each track point.
5. The UAV 4D trajectory prediction method based on iTransformer according to claim 4, characterized in that, The position increment sequence obtained by differential calculation in step 2) is combined with the time interval to construct a multivariate feature sequence. , means as follows: ; ; Where N is the total number of waypoints. Indicates the first Multivariate feature vectors of each waypoint Indicates the first Time increment for each waypoint , Indicates the first Time at each waypoint Indicates the first Time at each waypoint .
6. The UAV 4D trajectory prediction method based on iTransformer according to claim 5, characterized in that, The iTransformer-based trajectory prediction model structure in step 3) includes: The input transpose layer is used to transpose the input multivariate feature sequence of shape (B, L, D) to (B, D, L), where B is the batch size, L is the length of the multivariate feature sequence, and D is the multivariate feature dimension. The MLP layer contains a shared linear mapping unit that maps each variable feature sequence of length L to a linear mapping unit of dimension L. The high-dimensional vector outputs a shape of (B, D, d). model ); The device SN code embedding layer maintains a learnable embedding vector for each drone device. It is concatenated with D variable words in the sequence dimension, and the output shape is (B, D+1, d). model ); The normalization layer normalizes the new features after splicing. A multi-layer Transformer encoder consists of N stacked encoder layers, each containing a multi-head self-attention sublayer and a feedforward neural network sublayer, used to capture complex dependencies between variables; The output projection layer contains a shared linear inverse mapping unit that maps each dimension to... The feature vector is mapped to an output sequence of length L, and the output shape is (B, D, L); The output transpose layer transposes the output of shape (B, D, L) back to (B, L, D).
7. The UAV 4D trajectory prediction method based on iTransformer according to claim 6, characterized in that, Step 3) employs an autoregressive training strategy to train the model, specifically as follows: Multivariate feature sequences Feature sequences are selected by sliding a window of length L. , means as follows: ; ; in, Indicates the first A continuous multivariate feature sequence of length L, starting from several waypoints; during model training, the input is the sequence. ,set up Indicates the first The model predicts multivariate features for each waypoint, Compared with true multivariate features The model loss is calculated, and the model gradient is updated through backpropagation to train the model. The loss function adopts the mean squared error loss, and only the loss of multivariate features of valid waypoints is calculated. For invalid points, the gradient backpropagation of the loss at that waypoint is masked by a mask matrix. loss function The expression is as follows: ; Where N represents the total number of waypoints, ||•||1 represents the 1-norm of the vector, ||•||2 represents the 2-norm of the vector, and ⊙ represents element-wise product. This represents the mask vector corresponding to the multivariate features of the (i+L)th track point; during training, a cosine annealing learning rate scheduling strategy and gradient clipping are used.
8. The UAV 4D trajectory prediction method based on iTransformer according to claim 7, characterized in that, In step 3), a left-aligned padding strategy is used to pad the front of the multivariate feature sequence with a length of less than L+1 with zero vectors as padding variable words, and the corresponding mask is recorded. The mask value corresponding to the padding position is 0 and the effective position is 1.
9. The UAV 4D trajectory prediction method based on iTransformer according to claim 8, characterized in that, Step 4) specifically includes: The multivariate feature sequence of the flight path obtained after processing the raw flight path data of the UAV in real time through steps 1) and 2) is input into the trained iTransformer model to predict the multivariate features of the future flight path time by time in an autoregressive manner. The expression is as follows: ; in, Indicates the first Predictive multivariate features of each waypoint This represents the position increment predicted by the model. Indicates the time interval for model predictions; By combining the predicted multivariate features with the three-dimensional coordinates, the coordinates of the predicted trajectory are obtained. ,as follows: ; in, To predict the initial data trackpoint coordinates of the drone's real-time flight; The coordinates of the predicted flight path are converted into latitude, longitude, and altitude coordinates by coordinate inversion, as follows: ; ; ; Where atan2 represents the two-parameter arctangent function; Predicting multivariate features spliced to multivariate feature sequences of the track At the end, the earliest multivariate features of the sequence are removed to keep the model input length fixed.
10. The UAV 4D trajectory prediction method based on iTransformer according to claim 9, characterized in that, In step 4), during each prediction, the time interval for the next moment is... The value ΔT is set to a fixed value to eliminate the influence of time interval uncertainty and improve prediction stability.
