An unmanned aerial vehicle trajectory prediction method driven by trajectory data and motion model hybrid
By employing a hybrid-driven UAV trajectory prediction method that combines kinematic and data-driven models and dynamically adjusts prediction weights, the accuracy and stability issues of UAV trajectory prediction in complex environments are addressed, achieving higher prediction accuracy and robustness.
Patent Information
- Application Number
- CN202611388923.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-11-27
AI Technical Summary
Existing UAV trajectory prediction methods struggle to adapt to dynamic changes in UAV motion patterns and adaptively fuse model-driven and data-driven prediction results, resulting in insufficient prediction accuracy and stability in complex environments.
A hybrid approach using trajectory data and motion models is adopted. By establishing kinematic models with constant velocity, constant acceleration, and constant turning, and combining them with a motion pattern discrimination network and a data-driven Transformer model, dynamic weighted fusion is performed, and the weights of the prediction results are adjusted using motion pattern probabilities.
It improves the accuracy and stability of UAV trajectory prediction, especially under complex maneuvering conditions, reducing prediction errors and enhancing environmental adaptability.
Smart Images

Figure CN123179284A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) trajectory prediction technology, specifically to a UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model. Background Technology
[0002] In recent years, UAVs have been widely used in emergency rescue, environmental monitoring, logistics transportation, intelligent inspection, and military reconnaissance due to their advantages such as maneuverability, flexibility, and convenient deployment. UAV trajectory prediction is a key technology in UAV autonomous navigation, target tracking, and situational awareness. It is based on trajectory information such as position and velocity status at continuous historical moments to predict the UAV's position and trajectory change trend in the subsequent prediction time domain. Its prediction accuracy directly affects the flight safety and autonomous decision-making ability of the UAV system. However, the motion process of UAVs itself has nonlinear, time-varying, and complex maneuvering characteristics. In complex dynamic environments, it is also easily affected by environmental disturbances, sudden changes in motion patterns, and model uncertainties, which increases the difficulty of accurately predicting future trajectories.
[0003] Existing UAV trajectory prediction methods mainly include model-driven and data-driven methods. Model-driven methods typically rely on prior motion models such as constant velocity, constant acceleration, or constant turning to recursively predict the future motion state of the UAV. They offer good physical interpretability and stability, but their predictive performance is highly dependent on the degree of matching between the prior motion model and the actual motion state of the UAV, as well as the accuracy of noise statistics. Therefore, when the UAV exhibits complex nonlinear maneuvers or sudden changes in motion patterns, fixed motion models struggle to consistently and accurately describe its motion patterns, easily leading to a decrease in prediction accuracy. Data-driven methods, on the other hand, utilize deep learning models to learn motion patterns from historical trajectory data. Models such as recurrent neural networks, long short-term memory networks, and Transformers can extract temporal correlation features from trajectory sequences, making them suitable for trajectory prediction tasks with complex changing patterns. However, these methods usually rely on large-scale, high-quality training data, and their generalization ability is easily limited by the distribution range of the training samples. When the actual motion state of the UAV exceeds the coverage of the training data, the reliability of the prediction results tends to decrease.
[0004] To balance the stability of model-driven methods with the ability of data-driven methods to express complex motion patterns, some studies have begun to fuse trajectory prediction results obtained by the two types of methods. However, most existing hybrid prediction methods use pre-set fixed weights and lack the ability to dynamically identify the motion patterns of UAVs. They cannot adaptively adjust the contribution of different prediction results to the final trajectory as motion states such as uniform speed, acceleration, turning, and mixed maneuvers change, making it difficult to fully leverage the advantages of different prediction methods under corresponding motion states.
[0005] Therefore, there is an urgent need for a data and model hybrid-driven method for UAV trajectory prediction, which can solve the problem that existing methods cannot adaptively fuse model-driven prediction results and data-driven prediction results according to the dynamic changes in UAV motion patterns. Summary of the Invention
[0006] This invention provides a method for predicting the trajectory of a UAV driven by a hybrid approach of trajectory data and motion model. It belongs to the field of UAV trajectory prediction technology and solves the existing technical problem of adaptively fusing model-driven prediction results and data-driven prediction results based on the dynamic changes in the UAV's motion mode.
[0007] To address the above problems, the present invention provides a technical solution: A method for predicting the trajectory of a UAV driven by a hybrid approach of trajectory data and motion model includes the following steps: S1. Establish constant velocity kinematics model, constant acceleration kinematics model and constant turning kinematics model, obtain historical trajectory data of UAV, preprocess the historical trajectory data and construct trajectory sequence samples; S2. Construct a motion pattern discrimination network based on trajectory sequence samples. Extract the temporal features of historical trajectory sequences through the motion pattern discrimination network and output the probability that the UAV belongs to constant speed motion mode, constant acceleration motion mode, constant turning motion mode and mixed motion mode. S3. Construct a data-driven trajectory prediction model based on multi-dimensional feature hierarchical multi-head attention-temporal convolution Transformer. Extract local temporal features of historical trajectory sequences through temporal convolutional networks. Divide the extracted temporal features into position features and velocity features. Extract the correlation between various features in the time dimension through hierarchical multi-head attention. Fuse various features and use Transformer encoder to extract global temporal dependencies and nonlinear change features of historical trajectory sequences to obtain data-driven trajectory prediction results. S4. In parallel with the data-driven trajectory prediction in step S3, Kalman filter prediction is performed based on the constant velocity kinematic model, the constant acceleration kinematic model, and the constant turning kinematic model, respectively, to obtain the trajectory prediction results driven by the constant velocity model, the trajectory prediction results driven by the constant acceleration model, and the trajectory prediction results driven by the constant turning model. S5. The probabilities of constant velocity motion mode, constant acceleration motion mode, and constant turning motion mode are respectively used as weights in the corresponding model-driven trajectory prediction results, and the probability of mixed motion mode is used as the weight in the data-driven trajectory prediction results. Dynamic weighted fusion is performed according to the following formula: ; Where E represents the existence of E motion models. This represents the probability of the corresponding motion pattern output by the discrimination network. Indicates the first A kinematic model at time... The trajectory prediction results This indicates that the data-driven prediction network is at time [time]. The trajectory prediction results Indicates time The final prediction result.
[0008] Furthermore, in step S1, the historical trajectory data includes the position and speed of the UAV. The historical trajectory data is divided using a sliding time window to generate multiple local trajectory sequence samples. The local trajectory sequence samples are then cleaned, have motion features extracted, and are standardized. Based on the motion states contained within the time window, local trajectory sequence samples containing only one motion state are labeled as constant velocity motion mode, constant acceleration motion mode, and constant turning motion mode, respectively. Local trajectory sequence samples containing at least two motion states are labeled as mixed motion mode.
[0009] Furthermore, in step S2, the motion pattern discrimination network includes a single-layer long short-term memory network, a fully connected layer, and a softmax classification layer connected in sequence. Each long short-term memory network includes 64 neurons. The output dimension of the fully connected layer is 32. The softmax classification layer includes four classification outputs corresponding to constant speed motion pattern, constant acceleration motion pattern, constant turning motion pattern, and mixed motion pattern, respectively.
[0010] Furthermore, in step S2, the training of the motion pattern discrimination network includes the following sub-steps: S2.1. Take the trajectory sequence samples with labels for constant velocity motion mode, constant acceleration motion mode, constant turning motion mode and mixed motion mode as training samples, and calculate the cross-entropy loss based on the predicted probability output by the softmax classification layer and the corresponding motion mode label. S2.2. The Adam optimizer is used to update the network parameters of the motion pattern discrimination network based on the cross-entropy loss. The initial learning rate is 0.001, the batch size is 64, and the maximum number of training rounds is 100. S2.3. The motion pattern discrimination network is validated every 50 iterations. Training is stopped when the validation loss does not decrease for 20 consecutive iterations, and the trained motion pattern discrimination network is obtained.
[0011] Furthermore, in step S3, the data-driven trajectory prediction model includes a temporal convolutional network module, a position encoding module, a hierarchical multi-head attention module, a Transformer encoder module, and a fully connected prediction module, which are set sequentially. The output of the temporal convolutional network module is combined with the position encoding generated by the position encoding module and then input into the hierarchical multi-head attention module. The various features output by the hierarchical multi-head attention module are fused and then input into the Transformer encoder module. The output of the Transformer encoder module is mapped to the data-driven trajectory prediction result through the fully connected prediction module.
[0012] Furthermore, in step S3, the temporal convolutional network module includes two cascaded residual convolutional blocks. Both residual convolutional blocks use causal dilation convolution with dilation coefficients of 1 and 2, respectively. The number of convolutional channels is 32, and the kernel size is 5. The two residual convolutional blocks transmit trajectory features through residual connections. After the nonlinear activation processing of the second residual convolutional block, random deactivation processing is performed with a random deactivation ratio of 0.1.
[0013] Furthermore, in step S3, the position features and velocity features are respectively formed into position feature branches and velocity feature branches. Each feature branch is processed by multi-head self-attention using causal masks. Both the position feature branches and velocity feature branches are set with 4 attention heads and the attention channel dimension is 64. The features output by each feature branch are fused and then input into the Transformer encoder module. The features output by the Transformer encoder module are sequentially input into a fully connected layer with 64 neurons and an output fully connected layer. The features are mapped to a two-dimensional position space through the output fully connected layer.
[0014] Furthermore, in step S3, the crayfish optimization algorithm is used to jointly optimize the training parameters of the data-driven trajectory prediction model. The training parameters include batch size, initial learning rate, validation frequency, learning rate decay factor, and learning rate decrease period. The position of each crayfish individual is encoded as a set of training parameter combinations. The crayfish population is initialized within the training parameter search space, and the position of each crayfish individual is iteratively updated based on heat avoidance behavior, Δt competition behavior, and foraging behavior. Ten independent training iterations are performed for each set of training parameter combinations. The average mean square error of the validation set obtained from the ten training iterations is used as the fitness value. The training parameter combination with the smallest fitness value is selected as the training parameters of the data-driven trajectory prediction model.
[0015] Furthermore, in step S1, the constant velocity model, constant acceleration model, and constant turning model are respectively: ; in, For drones The motion state at any given time includes position and velocity. For kinematic models with constant acceleration, the motion state also includes acceleration; for kinematic models with constant turning, the motion state also includes turning rate. Here is the state transition matrix. With a mean of 0 and a covariance of Gaussian white noise; The state transition matrices for constant velocity, constant acceleration, and constant turning motion can be respectively used as follows: , and It is expressed as follows: ; ; ; in, , and Δt represents the state transition matrix for the constant velocity kinematics model, the constant acceleration kinematics model, and the constant turning kinematics model, respectively, where Δt is the sampling period and ω is the turning rate.
[0016] Furthermore, in step S4, for the first... The kinematic model employs Kalman filtering to sequentially perform state prediction, covariance prediction, Kalman gain calculation, state covariance update, and motion state update, specifically as follows: Definition of the first The prediction results for the various motion patterns are ,in Indicates CV motion, These represent other motion modes for CA and CT, respectively. For CV motion mode, the KF algorithm is used. The trajectory prediction result at time t can be expressed as The specific implementation process is as follows: Predicted state at time: ; in, It is a moment State estimates, Covariance prediction: ; in, yes The state covariance matrix at time step, Calculate the gain:
[0017] in, It is the observation matrix. It is the covariance matrix of the observation noise. Covariance update:
[0018] in, It is the identity matrix. Status Update:
[0019] in, yes The observation vector at time t.
[0020] In this invention, the motion pattern discrimination result is not used as a switching instruction to select a single prediction model, but as a continuous fusion weight of different prediction results. This allows model-driven prediction and data-driven prediction to smoothly adjust their respective effects as the UAV's motion state changes. While preserving the stability and physical constraints of the kinematic model, the data-driven model compensates for the inadequacy of the preset kinematic model in describing hybrid maneuvers and complex nonlinear motions. This avoids prediction deviations and sudden changes in results caused by fixed-weight fusion or direct switching of prediction models, thereby forming a trajectory prediction mechanism that combines motion pattern discrimination, parallel prediction, and dynamic fusion.
[0021] By adopting the above technical solution, the present invention can also bring the following beneficial effects: 1. This invention proposes a UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model. It utilizes a motion mode discrimination network to extract temporal features from historical trajectory sequences, outputting probabilities for constant velocity motion mode, constant acceleration motion mode, constant turning motion mode, and mixed motion mode. The probabilities of the first three motion modes are used as weights for the corresponding model-driven trajectory prediction results, while the probability of the mixed motion mode is used as a weight for the data-driven trajectory prediction results. The discrimination results of different motion modes are no longer merely used as the selection criterion for a single model, but directly participate in the dynamic weighted fusion of the final trajectory prediction results. This allows the contribution of different prediction branches to continuously change with the UAV's motion state, offering advantages such as adaptive allocation of prediction weights based on changes in UAV motion modes and reducing prediction abrupt changes during motion mode switching.
[0022] 2. This invention proposes a UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model. The data-driven trajectory prediction model employs a temporal convolutional network module, a position encoding module, a hierarchical multi-head attention module, a Transformer encoder module, and a fully connected prediction module. The temporal convolutional network module extracts trajectory features at different time scales through two residual convolutional blocks with dilation coefficients of 1 and 2. The hierarchical multi-head attention module processes position and velocity features separately. The Transformer encoder module then extracts global temporal dependencies and nonlinear variation features. Simultaneously, the "Little Crayfish" optimization algorithm is used to jointly optimize training parameters such as batch size, initial learning rate, and learning rate decay factor. Experimental results show that the RMSE, MAE, and MAPE in the XY directions of the MDHMH-TCN-Transformer model are 4.54, 3.51, and 0.76, respectively, which are lower than the 4.08, 3.07, and 0.42 of the MDMH-TCN-Transformer model. This demonstrates the advantages of considering local trajectory changes, the correlation between different motion features, and global temporal dependencies, thereby improving the accuracy and training stability of data-driven trajectory prediction.
[0023] 3. This invention proposes a UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model. Kalman filtering prediction is performed using constant velocity kinematics models, constant acceleration kinematics models, and constant turning kinematics models, respectively. While preserving the physical constraints and recursive prediction stability of the kinematic models, the prediction results are dynamically weighted and fused with the data-driven trajectory prediction results. Experimental results show that the COA-DMTP-PWF method with crayfish optimization and dynamic weighted fusion achieves RMSE, MAE, and MAPE in the XY directions of 1.07, 0.55, and 0.10, respectively. These figures are lower than the 0.58, 0.22, and 0.02 of the DMTP-PWF method without crayfish optimization, and also lower than the 3.47, 2.96, and 0.66 of the MDHMH-TCN-Transformer model alone. This indicates that model-driven prediction and data-driven prediction can effectively synergize through motion mode probabilities, improving the accuracy, robustness, and environmental adaptability of UAV trajectory prediction under complex maneuvering conditions. Attached Figure Description
[0024] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1A schematic diagram of the overall process of a UAV trajectory prediction method driven by a hybrid trajectory data and motion model provided by the present invention; Figure 2 This is a schematic diagram of the UAV trajectory prediction framework in this embodiment; Figure 3 This is a schematic diagram of the motion pattern discrimination network in this embodiment; Figure 4 This is a schematic diagram of the data-driven trajectory prediction model in this embodiment; Figure 5 This is an evaluation chart of the prediction results of different trajectory prediction methods in this embodiment; Figure 6 This is a ridge diagram showing the prediction error of different trajectory prediction methods in the X direction in this embodiment; Figure 7 This is a ridge diagram showing the prediction error of different trajectory prediction methods in the Y direction in this embodiment; Figure 8 This is a ridge diagram showing the prediction error of different trajectory prediction methods in the XY direction in this embodiment; Figure 9 This is a comparison chart of the prediction results for test set trajectory 1 in this embodiment; Figure 10 This is a graph showing the position error time curves in the XY direction for different algorithms in this embodiment. Detailed Implementation
[0026] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0027] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0028] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this invention, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using other structures and / or functionalities besides one or more of the aspects set forth herein.
[0029] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. The drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0030] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0031] like Figure 1 and Figure 2 As shown, a data- and model-driven method for predicting drone trajectories includes the following steps: S1. Establish a kinematic model of the UAV and construct a historical trajectory dataset; S1.1 Establish a kinematic model of the unmanned aerial vehicle; The random maneuvering motion of a UAV is described by typical kinematic models such as constant velocity (CV), constant acceleration (CA), and constant turn (CT). Definitions are provided. For drones The motion state at any given time, the constant velocity kinematic model and the constant turning kinematic model correspond to the motion state including two-dimensional position and two-dimensional velocity, and the constant acceleration kinematic model also includes the motion state including two-dimensional acceleration. Let be the state transition matrix. With a mean of 0 and a covariance of If Gaussian white noise is used, then the random maneuvering motion model of the UAV can be expressed by the following equation (11): (11); The motion mode state transition matrices of the constant velocity kinematic model (CV), the constant acceleration kinematic model (CA), and the constant turning kinematic model (CT) can be respectively used as follows: , and It is expressed as follows: (12); (13); (14); S1.2 Constructing a historical trajectory dataset A dataset of target motion patterns with multiple maneuvering modes was simulated. It was assumed that the target maneuvers randomly in two-dimensional space using CV, CA, and CT modes.
[0032] Assume the initial position of the UAV is uniformly distributed within the range of [-500m, 500m], the initial velocity is between 180m / s and 200m / s, the initial acceleration and turning rate are both set to 0, and the sampling period is [missing information]. The measurement noise is Gaussian white noise with a mean of 0 and a variance of 10. When creating the dataset in the simulated scene, a sliding window is used to process each data point of length... The trajectory sequence is divided, and each trajectory is divided into... A length of The samples were generated in total. A total of 60 trajectories were simulated, with 40 used as the training set, 10 as the validation set, and the remaining 10 as the test set. Each historical trajectory data included the position and velocity of the UAV at consecutive sampling times. A sliding time window was used to divide the historical trajectory data, generating multiple local trajectory sequence samples. Data cleaning and motion feature extraction were performed on each local trajectory sequence sample, and then standardized according to the mean and standard deviation of the corresponding features in the training set. Based on the motion states contained within the time window, local trajectory sequence samples containing only one motion state were labeled as constant velocity motion mode, constant acceleration motion mode, and constant turning motion mode, respectively. Local trajectory sequence samples containing at least two motion states were labeled as mixed motion mode.
[0033] S2. Construct a motion pattern discrimination network to determine the motion patterns of the drone; S2.1 Extracting LSTM temporal features LSTM has four key components: the forget gate, the input gate, the cell state, and the output gate. These gates control the flow of information.
[0034] The core calculation steps are as follows: Forgotten Gate It determines the cell state from the previous moment. To determine which information is forgotten, we weight the hidden state from the previous time step and the input from the current time step, and then... The function is implemented by outputting values in the range [0, 1]. The closer the function value is to 0, the more likely it is to be forgotten; the closer it is to 1, the more likely it is to be remembered.
[0035] (15); in, and It is the bias term of the weight matrix of the forget gate. It is the hidden state from the previous moment. It is the input at the current moment. yes Activation function.
[0036] Input gate Together with the candidate cell state, it determines which parts of the newly input information should be added to the cell state at the current moment. First, update the input gate: (16); in, and These are the weight matrix and bias terms of the input gate.
[0037] Secondly, the candidate cell state is obtained by formula (17).
[0038] (17); in, Indicates new candidate information. It is an activation function. and These are the weight matrix and bias terms corresponding to the candidate memory units.
[0039] Cell state The updated formula is as follows: (18); in, It represents the cell state at the previous moment.
[0040] Output gate It determines which information from the current cell state should be output as hidden state to subsequent layers or used for final prediction.
[0041] (19); (20); in, and These are the weight matrix and bias terms corresponding to the output gate. yes The hidden state of the LSTM output at any given time.
[0042] S2.2 Construct and train a motion pattern discrimination network like Figure 3 As shown, the trajectory sequence samples processed in S1.2 are input into the motion pattern discrimination network. The motion pattern discrimination network comprises a single-layer LSTM, a fully connected layer, and a Softmax classification layer connected sequentially. Each LSTM layer contains 64 neurons, and the fully connected layer maps the temporal features output by the LSTM to a 32-dimensional feature space. The Softmax classification layer has four classification outputs, outputting the probability that the drone belongs to a constant speed motion mode, a constant acceleration motion mode, a constant turning motion mode, and a mixed motion mode, respectively. The sum of the probabilities corresponding to the four motion modes is 1.
[0043] The motion pattern discrimination network was trained under supervised conditions using cross-entropy loss, and the Adam optimizer was used to update the network parameters. The initial learning rate was set to 0.001, the maximum number of training epochs was 100, and the batch size was 64. Validation was performed every 50 iterations, and training was stopped when the validation loss did not decrease for 20 consecutive iterations to prevent overfitting.
[0044] S3. Construct and optimize a data-driven trajectory prediction model; S3.1 Constructing the MDHMH-TCN-Transformer network like Figure 4 As shown, position and velocity features are input into corresponding multi-head self-attention branches. Each feature branch uses a causal mask to limit the current moment to using only trajectory information from historical moments. The features output by different feature branches are fused along the feature dimension. The fused features are then input into a Transformer encoder. Global temporal dependencies and nonlinear variation features of the trajectory sequence are extracted through multi-head attention, a feedforward network, residual connections, and normalization. The features output by the Transformer encoder are sequentially input into a fully connected layer with 64 neurons and an output fully connected layer. The output fully connected layer maps the data to a two-dimensional position space, yielding the data-driven trajectory prediction result. .
[0045] First, the historical motion sequence of the target is used as the input to the MDHMH-TCN-Transformer network, and TCN is used to extract temporal features from the input sequence. This module consists of two concatenated residual convolutional blocks, each of which uses causal dilation convolution to maintain temporal causality, with dilation coefficients set to 1 and 2 respectively. The number of convolutional channels is uniformly 32, and the kernel size is 5. To improve training stability, dropout is introduced after the nonlinear activation of the second residual block to prevent overfitting. The dropout ratio is set to 0.1. After TCN completes feature extraction, a position encoding module is introduced to compensate for the shortcomings of the convolutional structure in modeling positional information. Subsequently, the temporal features output by TCN are divided into two branches, position and velocity, according to physical semantics. For different feature branches, a multi-head self-attention mechanism is introduced to independently model the dependencies of each physical quantity in the temporal dimension. To ensure causal consistency in the prediction process, each branch uses a causal mask to ensure that only historical information is used. Specifically, the position and velocity branches are configured with 4 attention head structures, with a corresponding channel dimension of 64. Each attention branch extracts feature representations from the end of the sequence to achieve a compressed representation of historical temporal information, and then fuses them along the feature dimension. The fused features are first input into a fully connected layer containing 64 neurons to complete feature mapping, and then... Activation functions enhance the model's non-linear expressive power. Finally, a fully connected output layer maps the fused features to a two-dimensional location space, enabling high-precision prediction of the target's future trajectory.
[0046] S3.2, Implement crayfish optimization The crayfish optimization algorithm is inspired by the crayfish's behavior in response to temperature changes, including seeking refuge from heat, competition, and foraging. When the temperature exceeds 30℃, crayfish will choose cooler locations to escape the heat. When the temperature is between 15℃ and 30℃, crayfish will forage. Furthermore, the crayfish's food intake... It is also affected by temperature, and its mathematical model is shown in formula (21): (twenty one); in, Indicates the optimal temperature. and Used to control the amount of food consumed by crayfish at different temperatures. (Settings) , , . Temperature is represented by formula (22).
[0047] (twenty two); The crayfish optimization algorithm consists of four stages: initialization stage, exploration stage, competition stage, and foraging stage. These four stages will be introduced below. It represents a uniformly distributed random number within the interval (0,1).
[0048] Initialization phase: In the multidimensional optimization problem of population, each crayfish is a... A matrix, where each column represents a solution to a problem. The initial position of the crayfish population is determined by... A 3D matrix is represented, where Indicates population size. This represents the dimension of the solution space. Indicates the spatial location of the initial group. Represents an individual exist The position of the dimension. The initialization of the crayfish optimization algorithm is shown in formula (23).
[0049] (twenty three); The initial position of the crayfish is obtained by formula (24).
[0050] ; in, It is the first The lower boundary, It is the first Upper bound of dimension. A random population is generated by considering the population size, the boundary range of the solution space, and the dimension of the problem.
[0051] Exploration phase: During the exploration phase, crayfish will choose caves to escape the heat. The location of the caves is described by formula (25).
[0052] (25); in, This represents the optimal position obtained through iterations so far. This indicates the optimal position of the current population.
[0053] The behavior of crayfish entering caves to escape the summer heat can be represented by formula (26).
[0054] (26); in, Represents the current iteration number, when A value less than 0.5 indicates that there are no other crayfish competing for the burrow, and the crayfish can enter the burrow to escape the heat. The value decreases as the number of iterations increases, and the process of change is shown in equation (27).
[0055] (27); in, This indicates the maximum number of iterations.
[0056] During the exploration phase, the crayfish's main objective is to approach the burrow, which represents the optimal solution. At this point, the crayfish moves closer to the burrow, bringing the individual closer to the optimal solution.
[0057] Competition Phase: when >30℃ and When the value is ≥0.5, it indicates that other crayfish are competing for the burrow, which can be expressed by formula (28).
[0058] (28); in, Let represent a random individual crayfish, as shown in formula (29).
[0059] (29); At this stage, crayfish Continuously based on other crayfish The algorithm adjusts its position. This adjustment expands the search range of the crayfish optimization algorithm and improves its exploration capabilities. The function represents rounding a numerical value to the nearest specified number of digits.
[0060] Foraging phase: when At temperatures ≤30℃, crayfish enter the foraging stage. At this time, the crayfish move towards the food. The location of the food is the optimal solution, which can be represented by formula (30).
[0061] (30); After finding food, crayfish will assess the size of the food. Make a judgment. It reflects the difference between the current solution and the optimal solution, as shown in formula (31).
[0062] (31); in, It's a food factor, representing the largest amount of food, set... The value is 3. Indicates the first The fitness value of a single crayfish. The fitness value represents the location of the food.
[0063] when > When the food is too large, the crayfish will use its claws to tear it apart, which can be represented by formula (32).
[0064] (32); After the food is torn apart, crayfish will alternately use their second and third legs to feed. The algorithm uses a combination of sine and cosine functions to simulate this alternation process. Furthermore, the amount of food a crayfish obtains is also related to its food intake. Related. The equation for foraging can be expressed by formula (33).
[0065] (33); when ≤ At this time, the crayfish moves directly towards the food and eats, which can be represented by formula (34). (34); During the foraging phase, crayfish adjust their feeding strategy based on the size of the food, dynamically balancing local fine-grained search with global exploration, thereby improving the algorithm's convergence accuracy and stability. When the food size is moderate, the algorithm directly approaches the optimal solution, performing a local fine-grained search. When the food is too large, it indicates a significant difference between the crayfish and the optimal solution, requiring a reduction in size. This brings the individual closer to the current population's location, and then guides it to move towards this adjusted target. S3.3 Optimize the parameters of the MDHMH-TCN-Transformer network. In the parameter optimization stage, the model structure and training process are combined, and relevant parameters such as time window length, batch size, and initial learning rate are used as optimization variables, and upper and lower bound constraints are set for them respectively, thereby constructing the parameter search space.
[0066] The location of each crayfish individual is represented as a set of parameter combinations, with each individual corresponding to a specific set of training parameters. For any parameter combination, a complete model training and validation process is required to calculate the fitness value. To reduce the impact of randomness during the training phase on the results, this study performed 10 independent training iterations for each parameter combination, and calculated the average value of the validation set MSE (Mean Sequence Equation) across the 10 training iterations as the fitness value. Its calculation expression is shown in equation (35): (35); in, The predicted value of the model during the e-th training iteration. For the true value of the g-th sample, This represents the number of samples in the validation set. A smaller fitness value indicates better prediction performance of the algorithm under this parameter combination.
[0067] In the optimization phase, the population is first randomly initialized in the parameter space. Then, the parameter combination corresponding to each individual is used to construct and train the MDHMH-TCN-Transformer network, and fitness feedback is calculated on the validation set. By iteratively updating the individual positions, the optimal multivariate parameter combination is finally obtained.
[0068] After joint optimization using the crayfish optimization algorithm, the proposed MDHMH-TCN-Transformer model achieved optimal parameter configuration. Specifically, the optimizer used was Adam, the activation function was ReLU, the batch size was set to 10³, the initial learning rate was set to 3.33335e-0³, the validation frequency was set to 11³, the learning rate decay factor was set to 0.598, the learning rate decay period was set to 15, the time window size was set to 10, and the maximum number of training epochs was set to 200. Under this parameter configuration, the model effectively improved training stability and trajectory prediction accuracy.
[0069] S4. Construct a model-driven trajectory prediction model to predict the trajectory of the drone; While performing trajectory prediction with the data-driven trajectory prediction model, corresponding Kalman filter prediction branches are established based on constant velocity kinematics, constant acceleration kinematics, and constant turning kinematics, respectively. These three Kalman filter prediction branches recursively predict based on the current motion state of the UAV, obtaining the model-driven trajectory prediction results for each kinematic model. The first... The prediction results for the various motion patterns are .in Indicates CV motion, These represent other motion modes such as CA and CT. Taking CV motion mode as an example, it is based on the KF algorithm. The trajectory prediction result at time t can be expressed as The specific implementation process is as follows: S4.1 State Prediction Predicted state at time It can be obtained from formula (36).
[0070] (36); in, yes State estimate at time 1.
[0071] S4.2 Covariance Prediction (37); in, yes The state covariance matrix at time step.
[0072] S4.3, Covariance Update (38); in, It is an identity matrix.
[0073] S4.4 Calculate Gain (39); in, It is the observation matrix. It is the covariance matrix of the observation noise.
[0074] S4.5, Status Update (40); in, yes The observation vector at time t.
[0075] S5. Perform dynamic weighted fusion of trajectory prediction results; To fully integrate the advantages of model-driven and data-driven methods, a dynamic weighted fusion strategy based on discriminant confidence was designed. This strategy adaptively weights the results of different prediction models using the motion pattern probabilities output by the discriminant network. When the target motion pattern is close to the classical dynamic model, the fusion result relies more on the trajectory prediction results driven by the model; under complex nonlinear or unknown maneuvering conditions, the weight of the trajectory prediction results based on the data-driven strategy will be increased, thereby enhancing the overall prediction capability.
[0076] The specific weighted fusion formula is shown in (31): (31); Where E represents the number of motion models, and in this embodiment E=3, corresponding to the constant velocity motion mode, constant acceleration motion mode, and constant turning motion mode, respectively. This represents the probability of the corresponding motion pattern output by the discrimination network. Indicates the first A kinematic model at time... The trajectory prediction results This indicates that the data-driven prediction network is at time [time]. The trajectory prediction results Indicates time The final prediction result.
[0077] Therefore, when the drone trajectory matches the motion characteristics corresponding to a certain preset kinematic model, the probability of that motion mode increases, and the fusion weight of the corresponding model-driven trajectory prediction result increases accordingly. When multiple motion states are contained in the same time window, the probability of the mixed motion mode increases, and the fusion weight of the data-driven trajectory prediction result increases accordingly.
[0078] After the above historical trajectory data processing, motion pattern discrimination, parallel prediction using data-driven and model-driven methods, and dynamic weighted fusion, the model training results and UAV trajectory prediction results are shown below: like Figure 5 As shown, the RMSE, MAE, and MAPE of the COA-DMTP-PWF method used in this embodiment are 1.07, 0.55, and 0.10 in the XY direction, respectively, which are lower than the 1.65, 0.77, and 0.12 of the DMTP-PWF method, and also lower than the 4.54, 3.51, and 0.76 of the MDHMH-TCN-Transformer model. This indicates that the adoption of crayfish optimization and dynamic weighted fusion can further reduce the UAV trajectory prediction error.
[0079] like Figures 6 to 8 As shown, the prediction error distribution of the COA-DMTP-PWF method is more concentrated in the X, Y, and XY directions, indicating that the method can reduce trajectory prediction errors in different directions and improve the stability of prediction results.
[0080] like Figure 9 As shown, for test set trajectory 1, the COA-DMTP-PWF algorithm can still track the real trajectory well at trajectory inflection points and areas with large curvature changes. Its prediction results almost overlap with the real trajectory, significantly outperforming other comparative algorithms. This further verifies that the data-model hybrid driven prediction framework proposed in this paper can fully integrate the physical constraint capability of model-driven methods with the nonlinear feature learning capability of data-driven methods, significantly improving the stability and generalization ability of trajectory prediction while ensuring prediction accuracy.
[0081] like Figure 10 As shown, the COA-DMTP-PWF algorithm maintains a low error level and minimal error fluctuation throughout the entire prediction process, indicating that it not only has higher prediction accuracy but also better stability and robustness.
[0082] Therefore, combining Figures 5 to 10 The content further illustrates that the motion pattern discrimination network and data-driven trajectory prediction model constructed in this invention can be trained stably, and the prediction results after dynamic weighted fusion are improved in terms of error level, error distribution and trajectory following, providing experimental verification of the effectiveness of the UAV trajectory prediction method described in this embodiment.
[0083] In summary, this invention has the advantages of reducing UAV trajectory prediction errors, improving the continuity and reliability of prediction results in complex dynamic environments, and meeting the needs of UAV autonomous navigation, target tracking, and situational awareness.
[0084] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for predicting the trajectory of a UAV driven by a hybrid approach of trajectory data and motion model, characterized in that, The steps include the following: S1. Establish constant velocity kinematics model, constant acceleration kinematics model and constant turning kinematics model, obtain historical trajectory data of UAV, preprocess the historical trajectory data, and construct trajectory sequence samples; S2. Construct a motion pattern discrimination network based on the trajectory sequence samples, extract the temporal features of historical trajectory sequences through the motion pattern discrimination network, and output the probability that the UAV belongs to constant speed motion mode, constant acceleration motion mode, constant turning motion mode, and mixed motion mode. S3. Construct a data-driven trajectory prediction model based on multi-dimensional feature hierarchical multi-head attention-temporal convolution Transformer. Extract local temporal features of historical trajectory sequences through temporal convolutional networks. Divide the extracted temporal features into position features and velocity features. Extract the correlation between various features in the time dimension through hierarchical multi-head attention. Fuse various features and use Transformer encoder to extract global temporal dependencies and nonlinear change features of historical trajectory sequences to obtain data-driven trajectory prediction results. S4. In parallel with the data-driven trajectory prediction in step S3, Kalman filter prediction is performed based on the constant velocity kinematic model, constant acceleration kinematic model and constant turning kinematic model respectively to obtain the trajectory prediction results of the constant velocity model, the trajectory prediction results of the constant acceleration model and the trajectory prediction results of the constant turning model. S5. The probabilities of the constant speed motion mode, constant acceleration motion mode, and constant turning motion mode are respectively used as weights of the corresponding model-driven trajectory prediction results, and the probability of the mixed motion mode is used as the weight of the data-driven trajectory prediction results, and dynamic weighted fusion is performed according to the following formula: ; Where E represents the existence of E motion models. This represents the probability of the corresponding motion pattern output by the discrimination network. Indicates the first A kinematic model at time... The trajectory prediction results This indicates that the data-driven prediction network is at time [time]. The trajectory prediction results Indicates time The final prediction result.
2. The UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model according to claim 1, characterized in that: In step S1, the historical trajectory data includes the position and speed of the UAV. The historical trajectory data is divided using a sliding time window to generate multiple local trajectory sequence samples. The local trajectory sequence samples are then cleaned, have motion features extracted, and are standardized. Based on the motion states contained within the time window, local trajectory sequence samples containing only one motion state are labeled as constant speed motion mode, constant acceleration motion mode, and constant turning motion mode, respectively. Local trajectory sequence samples containing at least two motion states are labeled as mixed motion mode.
3. The UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model according to claim 1, characterized in that: In step S2, the motion pattern discrimination network includes a single-layer long short-term memory network, a fully connected layer, and a softmax classification layer connected in sequence. Each layer of the long short-term memory network includes 64 neurons. The output dimension of the fully connected layer is 32. The softmax classification layer includes four classification outputs corresponding to constant speed motion pattern, constant acceleration motion pattern, constant turning motion pattern, and mixed motion pattern, respectively.
4. The UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model according to claim 3, characterized in that, In step S2, the training of the motion pattern discrimination network includes the following sub-steps: S2.
1. Take the trajectory sequence samples with labels for constant velocity motion mode, constant acceleration motion mode, constant turning motion mode and mixed motion mode as training samples, and calculate the cross-entropy loss based on the predicted probability output by the softmax classification layer and the corresponding motion mode label. S2.
2. The Adam optimizer is used to update the network parameters of the motion pattern discrimination network according to the cross-entropy loss, wherein the initial learning rate is 0.001, the batch size is 64, and the maximum number of training rounds is 100. S2.
3. The motion pattern discrimination network is validated every 50 iterations. Training is stopped when the validation loss does not decrease for 20 consecutive iterations, and the trained motion pattern discrimination network is obtained.
5. The UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model according to claim 1, characterized in that: In step S3, the data-driven trajectory prediction model includes a temporal convolutional network module, a position encoding module, a hierarchical multi-head attention module, a Transformer encoder module, and a fully connected prediction module arranged sequentially. The output of the temporal convolutional network module is combined with the position encoding generated by the position encoding module and then input into the hierarchical multi-head attention module. The various features output by the hierarchical multi-head attention module are fused and then input into the Transformer encoder module. The output of the Transformer encoder module is mapped to the data-driven trajectory prediction result through the fully connected prediction module.
6. The UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model according to claim 5, characterized in that: In step S3, the temporal convolutional network module includes two cascaded residual convolutional blocks. Both residual convolutional blocks use causal dilation convolution with dilation coefficients of 1 and 2, respectively. The number of convolutional channels is 32, and the kernel size is 5. The two residual convolutional blocks transmit trajectory features through residual connections. After the nonlinear activation processing of the second residual convolutional block, random deactivation processing is performed with a random deactivation ratio of 0.
1.
7. The UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model according to claim 5, characterized in that: In step S3, position features and velocity features are respectively formed into position feature branches and velocity feature branches. Each feature branch is processed by multi-head self-attention using causal masking. The position feature branches and velocity feature branches are each set with 4 attention heads and the attention channel dimension is 64. The features output by each feature branch are fused and then input into the Transformer encoder module. The features output by the Transformer encoder module are sequentially input into a fully connected layer with 64 neurons and an output fully connected layer. The features are mapped to a two-dimensional position space through the output fully connected layer.
8. The UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model according to claim 5, characterized in that: In step S3, a crayfish optimization algorithm is used to jointly optimize the training parameters of the data-driven trajectory prediction model. The training parameters include batch size, initial learning rate, validation frequency, learning rate decay factor, and learning rate decrease period. The position of each crayfish individual is encoded as a set of training parameter combinations. The crayfish population is initialized within the training parameter search space. The position of each crayfish individual is iteratively updated based on heat avoidance behavior, Δt competition behavior, and foraging behavior. Ten independent training iterations are performed for each set of training parameter combinations. The average mean square error of the validation set obtained from the ten training iterations is used as the fitness value. The training parameter combination with the smallest fitness value is selected as the training parameters of the data-driven trajectory prediction model.
9. The UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model according to claim 1, characterized in that, In step S1, the constant velocity model, constant acceleration model, and constant turning model are respectively: ; in, For drones The motion state at any given time includes position and velocity. For a constant acceleration kinematic model, the motion state also includes acceleration; for a constant turning kinematic model, the motion state also includes turning rate. Here is the state transition matrix. With a mean of 0 and a covariance of Gaussian white noise; The state transition matrices for constant velocity, constant acceleration, and constant turning motion can be respectively used as follows: , and It is expressed as follows: ; ; ; in, , and Δt represents the state transition matrix for the constant velocity kinematics model, the constant acceleration kinematics model, and the constant turning kinematics model, respectively, where Δt is the sampling period and ω is the turning rate.
10. The UAV trajectory prediction method driven by a hybrid approach of trajectory data and motion model according to claim 9, characterized in that, In step S4, for the first The kinematic model employs Kalman filtering to sequentially perform state prediction, covariance prediction, Kalman gain calculation, state covariance update, and motion state update, specifically as follows: Definition of the first The prediction results for the various motion patterns are ,in Indicates CV motion, These represent other motion modes for CA and CT, respectively. For CV motion mode, the KF algorithm is used. The trajectory prediction result at time t can be expressed as The specific implementation process is as follows: Predicted state at time: ; in, It is a moment State estimates, Covariance prediction: ; in, yes The state covariance matrix at time step, Calculate the gain: ; in, It is the observation matrix. It is the covariance matrix of the observation noise. Covariance update: ; in, It is the identity matrix. Status Update: ; in, yes The observation vector at time t.
