DBASformer model-based AUV drift trajectory prediction method

Through the adaptive span attention and dual-branch attention structures of the DBASformer model, the problem of neural networks being difficult to capture multiple data connections in AUV drift trajectory prediction is solved, and the accuracy of trajectory prediction is significantly improved.

CN118735030APending Publication Date: 2024-10-01UNIV OF JINAN
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410691948.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing neural network models are difficult to accurately capture the connection between multiple types of data when predicting AUV drift trajectories, resulting in poor performance in predicting drift trajectories affected by multiple factors.

Method used

The DBASformer model is used to replace the traditional local attention mechanism through the adaptive span attention mechanism and dual-branch attention structure, generate a more structured input representation, and encode and decode through the Transformer model to improve the model's processing of sequence data. ability.

Benefits of technology

The accuracy of AUV drift trajectory prediction is improved. Through the adaptive span attention mechanism and dual-branch attention structure, the model can more effectively capture the complex dependencies between data, significantly improving the prediction effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention provides an AUV (Autonomous Underwater Vehicle) drift trajectory prediction method based on a DBASform model. The prediction accuracy is improved by utilizing a complex dependency relationship between an AUV drift trajectory and ocean current. Drift trajectory prediction is essentially a time sequence prediction problem, a future trajectory is predicted mainly through the trend of a drift trajectory sequence changing along with time, and meanwhile, the change speed of the trajectory sequence is determined to a certain extent by the ocean current flow velocity. Firstly, aiming at the problem that a static model cannot capture dynamic characteristics in the prior art, the invention provides an attention mechanism based on a self-adaptive span, and the attention span is defined as a learnable parameter of the model, so that accurate attention weights can be distributed more flexibly. Secondly, a novel double-branch attention structure is provided, and the double-branch attention structure comprises a time attention module and a dimension attention module. The two modules respectively calculate attention scores, and the weighted attention weight is used as the basis of the correlation between the trajectory data. According to the method, the cross-time dependency and the cross-dimension dependency in the sequence can be captured at the same time, so that the multi-dimensional feature extraction capability of the model is improved. Finally, the invention provides a drift trajectory prediction model DBASform based on Transform, the model follows an encoder and decoder architecture, and global attention is replaced by the proposed double-branch adaptive attention to capture a complex dependency relationship between historical drift trajectory sequences, so that the drift trajectory within a period of time in the future is accurately predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning and AUV drift trajectory prediction, and in particular to an AUV drift trajectory prediction method based on a DBASformer model. Background Art

[0002] Autonomous underwater vehicles (AUVs) are robotic devices with a propulsion system for navigation and an onboard computer for decision-making. AUV research has become increasingly popular due to its wide range of applications from military to scientific fields. AUVs rely on their navigation algorithms and surrounding information for autonomous navigation. Once deployed, they collect data and return to the surface after completing their intended mission. With the development of technology, most AUVs are not connected to the ground by cables at this stage, so they have high maneuverability, can travel to deeper waters, narrow complex paths, do not cause personnel fatigue, and have very low operating costs. However, due to the complexity of the underwater environment and the limitations of underwater wireless communications, AUVs will inevitably fail and even lose contact with the mother ship at sea. After a catastrophic accident of an AUV, ground staff are often unable to take immediate remedial measures, and the AUV will drift freely in the sea. Studying the trajectory of an AUV drifting with the ocean current, predicting its water position, and helping staff to salvage and recover it in time are of great significance for later research on the causes of failures and solutions. The drift trajectory data not only contains information about the change of the object's position over time, but is also affected by multiple factors such as environmental conditions and individual behavior. These characteristics make trajectory prediction a complex and challenging task. Many researchers believe that trajectory prediction can be regarded as a sequence prediction problem, which mainly starts from the time series characteristics of historical data and trains neural network models to predict the next track. However, current neural networks cannot accurately capture the connection between multiple data, which makes it difficult to obtain good prediction results for drifting trajectories affected by multiple factors.

[0003] From traditional kinematic models to data-driven neural network models, researchers are committed to using different types of models to handle the complexity of trajectory data, which also makes the accuracy of trajectory prediction continuously improved. Many domestic and foreign researchers have established kinematic models to predict the track of AUV under the influence of ocean currents. The algorithm based on the kinematic model obtains the spatiotemporal trajectory equation by establishing dynamic equations combined with ocean environment information. Compared with the kinematic model, trajectory prediction based on the neural network model does not need to establish dynamic equations. Many researchers believe that trajectory prediction can be regarded as a sequence prediction problem, mainly starting from the time series characteristics of historical data, and training neural network models to predict the next track. Since the trajectory sequence has typical time series characteristics, with the development of neural networks, the accuracy of trajectory prediction is also constantly improving. Researchers continue to improve the neural network architecture to adapt to the particularity of trajectory prediction tasks. RNN is very good at associating contextual information on the time axis, but when the sequence information is long, the model will have gradient vanishing or explosion problems. The long short-term memory (LSTM) network cleverly alleviates the challenges brought by this long-term dependency by utilizing a complex gating mechanism. LSTM networks perform well in sequence prediction. However, they cannot process time series data in parallel and can easily forget the meaningful information extracted previously, so they have obvious limitations when dealing with multi-dimensional long sequence problems. The attention mechanism strengthens the neural network's attention to specific parts of the input data, which helps the neural network dynamically focus on key features under different behaviors in multi-dimensional trajectory data. The standardized attention mechanism can help the model process data in parallel and has an excellent receptive field. These advantages are helpful for sequence modeling, especially time series data, because the subsequences hidden in the time series usually have various forms of dependencies. Therefore, in the problem of AUV trajectory prediction, the AUV's track data and marine environment data are used as training data sets, and the neural network model is improved to obtain the correlation between the AUV trajectory and the ocean current, and then the model is used to predict the position of the AUV at future moments. Summary of the invention

[0004] The present invention aims to provide a method for predicting the drift trajectory of an AUV, so as to timely provide the drift trajectory of the AUV in the ocean and assist the staff in tracking the position of the AUV. The method uses the DBASformer model to predict the drift trajectory of the AUV and compares it with the prediction results of other models.

[0005] The specific implementation of the invention is as follows:

[0006] (1) Use an adaptive span mechanism to guide the attention span, allowing the attention heads of the attention layer to autonomously learn the minimum necessary span.

[0007] (2) Add a masking function with learnable parameters when calculating the attention weights. The adaptive span is a learnable parameter in the masking function. Different mask matrices can be generated according to the changing span to further limit the attention range.

[0008] (3) Improve the dual-branch attention structure. The temporal attention branch performs adaptive span attention along time on the same dimension, and the dimensional attention branch performs adaptive span attention between multiple dimensions. The final attention score is calculated by weighted summation of the outputs of the two branches.

[0009] (4) Based on the proposed dual-branch adaptive span attention and Transformer model, the network structure of DBASformer is constructed. The encoder and decoder follow the standard Transformer architecture. The dual-branch adaptive span attention mechanism replaces the traditional local attention mechanism. The prediction layer generates prediction values ​​based on the potential representation obtained through training.

[0010] (5) The DBASformer model initializes the sequence data into a series of segments when embedding the vector. The points in each dimension are divided into segments of fixed length and embedded into a token independently. This segmented embedding method can provide the model with a more structured input representation to reflect the correlation between data.

[0011] (6) The movement of autonomous underwater vehicles (AUVs) will drift due to the influence of ocean currents. The AUV drift trajectory dataset contains time, longitude, latitude, and ocean current speed. The time interval is determined to be 3 minutes. For the missing data at some time points, linear interpolation is used to fill in the gaps and retain as much valuable information as possible.

[0012] (7) Based on the processed data set, DBASformer is used to predict the future drift trajectory of the AUV. The data set is indexed in chronological order and divided into training set, validation set, and test set in a ratio of 8:1:1. The input length and prediction length of the model are determined. After training, the model can fully learn the complex dependencies in the sequence and improve the prediction accuracy.

[0013] (8) DBASformer is selected to compare with five trajectory prediction methods, test the performance of these methods in AUV drift trajectory prediction, and compare the predicted values ​​of DBASformer with the original true values. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the examples of the present invention and do not constitute a limitation of the present invention.

[0015] Figure 1 . Schematic diagram of the dual-branch attention structure of the present invention

[0016] Figure 2 . Schematic diagram of the temporal attention based on adaptive span of the present invention

[0017] Figure 3 . Schematic diagram of dimensional attention based on adaptive span in the present invention

[0018] Figure 4 .Schematic diagram of the DBASformer model structure of the present invention

[0019] Figure 5 .Three-dimensional data diagram of the AUV of the present invention

[0020] Figure 6 .Comparison of the predicted trajectory and the actual trajectory of the DBASformer model of the present invention DETAILED DESCRIPTION

[0021] The following is combined with Figure 1-6 , the present invention is further described in detail. The specific implementation steps are as follows:

[0022] Step 01. Use the adaptive span mechanism to guide the attention span, allowing the attention head of the attention layer to autonomously learn the minimum necessary span. Specifically, a masking function with learnable parameters is added when calculating the attention weight to further limit the attention range. In the masking function, a soft mask gate is introduced to map the distance between tokens in the span to between [0,1]. The adaptive span S is a learnable parameter in the masking function, and different mask matrices can be generated according to the changing span S. According to the mask matrix, the information within the span can be probabilistically retained and the information outside the span can be directly masked. During the model training process, the span S is automatically adjusted by the optimizer to minimize the loss function. In particular, the adaptive span S will not increase but only decrease, and the reduction amplitude is 1 segment length unit each time.

[0023] The masking function is defined as a piecewise function, where the soft mask part is defined as a function similar to sigmoid. The specific formula is as follows:

[0024]

[0025] Among them, l tr is the distance between position r in the sequence and the current position t.

[0026] Then the range is further restricted based on the adaptive span to calculate the attention weights:

[0027]

[0028] Finally, the attention weight outputs from different heads are concatenated together for the next step of calculation.

[0029] Adaptive spanning attention improves the flexibility of the attention mechanism through a new masking function. After calculating the attention scores in the original range, the model automatically retains the attention scores in a certain range to calculate the attention weights during training. The purpose of this is to retain useful information to the maximum extent while suppressing irrelevant or noisy information.

[0030] Step 02. Improve the dual-branch attention structure. The two branches run in parallel. The temporal attention branch performs adaptive span attention along time on the same dimension, and the dimensional attention branch performs adaptive span attention between multiple dimensions. The dual-branch attention structure is shown in Figure 2. Figure 1 shown.

[0031] Step 0201. Time series data is usually considered to be generated by the conditional distribution of historical values, and adjacent data points have similar values. Therefore, using the dependencies between time periods in the same dimension can help calculate the attention weights of tokens. However, if we directly embed the vector Applying the global attention mechanism to the above, calculating the attention score between each pair of fragments will result in a quadratic computational complexity (O(K 2 ) memory usage). The temporal attention module is based on adaptive span attention, which considers the correlation of sequence data over time. At the same time, adaptive span attention can only calculate the similarity between tokens within the attention span and calculate the attention score:

[0032]

[0033] Among them, h i,d The vector representing the token at the current position, h j,d A vector representing other tokens in the span range in the same dimension.

[0034] Compared with global attention, the temporal attention module focuses on the local area in the same dimension, and the range of attention is determined by the adaptive attention span. The form of the temporal attention branch based on adaptive span is as follows Figure 2 shown.

[0035] Step 0202. Sequences of different variables under the same process are correlated in their changes, and this correlation can be used as a basis for predicting future time steps. Since different sequences contain different degrees of redundant or even contradictory information, it is unwise to directly splice and fuse multi-dimensional information. In the task of predicting drift trajectories, there are complex relationships between multiple variables, which cannot be ignored.

[0036] The proposed dual-branch attention form introduces a cross-dimensional attention branch to fully exploit the cross-dimensional dependencies between different variables. When performing cross-dimensional attention, adaptive span attention is applied to the vector The target range to be considered is determined by the attention span. In particular, this range is still divided according to the time step relationship, and the similarity between tokens in different dimensions is calculated within this range:

[0037]

[0038] Where d1 and d2 represent different dimensions. Representation and Other tokens in different dimensions.

[0039] The dimensional attention module calculates the correlation between tokens of different dimensions, improving the model's ability to extract multi-dimensional features. The dimensional attention form based on adaptive span is as follows Figure 3 shown.

[0040] Step 0203. The time correlation weight between tokens in the same dimension is higher, and the dimension correlation weight between tokens in different dimensions is higher. The weighted summation method can combine the scores of time attention and dimension attention to utilize the information of both in a balanced way, thereby obtaining a more comprehensive and accurate attention score. Calculation and The weighted sum of :

[0041]

[0042] where w time ,w dim Represents the weights of the two forms of attention, which are updated as the model learns.

[0043] Calculate the attention weights according to the adaptive span:

[0044]

[0045] The dual-branch attention mechanism distinguishes between temporal correlation and dimensional correlation when calculating attention weights.

[0046] Step 03. Based on the proposed dual-branch adaptive span attention and Transformer model, build the network structure of DBASformer.

[0047] Step 0301. Each token in the Transformer model can calculate the attention score in parallel with other tokens, and the calculation will not be affected by the long distance. The Transformer model is a sequence-to-sequence model, which consists of two parts, namely the encoder and the decoder. The encoder consists of an attention layer and a feedforward neural network. The main function of the feedforward neural network is to provide nonlinear transformation and map the output results of attention to a higher dimensional space. There will be a residual module after each sub-layer, and there is a layer normalization calculation. The main function of the residual module is to solve the problem of gradient instability caused by the increase of network depth. The role of normalization is to prevent gradient disappearance or gradient explosion and accelerate model convergence. The decoder has the same structure as the encoder, but the difference is that the decoder adds an attention with a mask at the beginning to supplement the information of the target sequence. Transformer is composed of multiple encoders and decoders stacked together. DBASformer follows the encoder and decoder structure of the traditional Transformer. Such as Figure 4 As shown, the present invention stacks 4 encoders and decoders in DBASformer. In the attention layer, the traditional local attention mechanism is replaced by the proposed dual-branch adaptive span attention mechanism.

[0048] Step 0302. The DBASformer model initializes the sequence data into a series of segments when embedding the vector. The points in each dimension are divided into segments of length L seg The segments are embedded into a token independently:

[0049] x t,d →h i,d

[0050] Where 1≤i≤k, k=T / L_seg, 1≤d≤D. For ease of calculation, assume that T can be seg Divisible.

[0051] In sequence data, close data points have similar attention weights and the value of only one time step provides less information. This piecewise embedding method prepares for the next step of capturing multivariate time series relationships. It can provide the model with a more structured input representation to reflect the correlation between data, thereby improving the computational efficiency of the model.

[0052] Step 04. The movement of the autonomous underwater vehicle (AUV) will drift due to the influence of ocean currents. The AUV drift trajectory dataset contains time, longitude, latitude, and ocean current velocity. The time interval is determined to be 3 minutes. For data missing at some time points, linear interpolation is used to fill in the gaps and retain as much valuable information as possible. The variables of the original data mainly include time, longitude, latitude, ocean current velocity, and positioning quality control flags. Positioning quality control flags are divided into metadata and interpolation according to the data type. The present invention sorts the quality of the buoy trajectory sequence according to the quality control flag, and selects the top 70% of the sequences as experimental data. AUV three-dimensional data such as Figure 5 shown.

[0053] Step 05. Based on the processed dataset, use DBASformer to predict the future drift trajectory of the AUV. The dataset is indexed in time order and divided into training set, validation set, and test set in a ratio of 8:1:1. The proposed DBASformer is implemented in Pytorch. For the main experiments, the present invention uses DBASformer with 4 encoders and decoders. According to the different time intervals of the data, the input length is selected from {64, 128, 256, 320}, and finally the time length T of the input history sequence of the buoy trajectory data is set to 128. The time interval of the underwater vehicle trajectory data is less, and the time length of the input history sequence is set to T = 256. The prediction time length τ is 32, and a longer prediction length will reduce the prediction accuracy. The batch size is set to 32. The segment length L of the segmented sequence seg is 4. The preset attention span size is 16. The present invention uses the Adam optimizer for training, and the initial learning rate is selected from {5e-3, 1e-3, 5e-4, 1e-4, 5e-5, 1e-5} and updated by the Cosine Annealing scheme during training. The total number of epochs is set to 20, which can be appropriately reduced according to the training speed.

[0054] Step 06. The present invention calculates the predicted value and the real trajectory data y i The mean square error (MSE) and mean absolute error (MAE) were used as evaluation indicators to compare the prediction accuracy.

[0055]

[0056]

[0057] The present invention chooses to compare DBASformer with five trajectory prediction methods to test the performance of the model of the original method on the AUV dataset. The hyperparameters recommended in the original method, including the number of layers, batch size, etc., are used to approach the optimal performance of the model. The input length and output length of all models are the same. The models and their structures used for comparison are as follows: (1) BiLSTM: two bidirectional LSTM layers, a total of four LSTM units, and the hidden layer consists of an LSTM layer and a fully connected layer. The input vector contains all features, which are propagated through the Bi-LSTM layer to obtain the output and the predicted value is derived using the fully connected layer. (2) CNN-LSTM: CNN and LSTM are connected in series. The CNN module contains three convolutional layers, a BatchNorm layer, a Dropout layer, an expansion layer and a fully connected layer, and the LSTM module contains two LSTM layers. (3) RGA: The model contains an input layer, a ResNet layer, a fully connected layer, two GRU layers, an attention layer and an output layer. In particular, a two-dimensional convolutional layer is used as the structure of the residual block, and the hidden state of the second GRU layer is used as the input of the attention layer. (4) TrAISformer: The model adopts a Transformer architecture similar to GPT.

[0058] The Transformer network consists of a series of attention layers stacked together. Each layer acts as an autoregressive model and adopts a dot product multi-head attention mechanism. (5) TRFM-LS: Compared with the traditional Transformer structure, the output of the LSTM sequence is added as the input of the decoder.

[0059] Step 07. In order to verify the accuracy of DBASformer's predicted trajectory, the trajectory data of buoys and underwater vehicles are used to train and test the network model. The degree of fit between the model prediction results and the actual trajectory is compared. The closer to the actual trajectory, the higher the accuracy. The experimental results show that DBASformer has achieved good prediction results in trajectory sequence prediction and has good practicality. According to the predicted value and the actual value of the same time period, the prediction results can be seen more intuitively. The predicted trajectory curve is an important basis for evaluating the quality of the prediction. Figure 6 The comparison results between the AUV trajectory predicted by the DBASformer proposed in this paper and the actual trajectory are shown. Compared with other models, the prediction accuracy of DBASformer is higher. At the same time, Table 1 shows the mean square error (MSE) and mean absolute error (MAE) of the prediction results of DBASformer and various comparison models on the data set.

[0060] Table 1. Errors of AUV trajectories predicted by different models

[0061]

[0062] The DBASformer proposed in this paper effectively improves the prediction accuracy of the trajectory sequence. It can be seen from Table 1 that the error value of DBASformer is smaller than that of all the compared models. The mean square error of the predicted AUV trajectory is 0.1708 and the mean absolute error is 0.1415. The experimental results show that DBASformer effectively captures the trend of AUV trajectory data and improves the accuracy of trajectory prediction.

[0063] The above contents are further detailed descriptions of the present invention in combination with the preferred technical solutions, and the specific implementation of the invention cannot be limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, simple deductions and substitutions without departing from the concept of the present invention should be regarded as within the scope of protection of the present invention.

Claims

1. An adaptive span-based attention mechanism, characterized in that: An adaptive spanning mechanism is used to guide the attention span, allowing the attention layer to autonomously learn the minimum necessary span.

2. The adaptive span-based attention mechanism according to claim 1, wherein: A masking function is added when calculating the attention weights to further limit the attention range. The information within the span is probabilistically retained according to the mask matrix and the information outside the span is directly masked.

3. The adaptive span attention mechanism according to claim 1, characterized in that: The attention span is a learnable parameter in the masking function, and different mask matrices can be generated according to the changing span.

4. The adaptive span-based attention mechanism according to claim 1, wherein: During model training, the attention span is automatically adjusted by the optimizer to minimize the loss function. In particular, the adaptive span will not increase but only decrease, and each decrease is 1 segment length unit.

5. An improved dual-branch attention structure, characterized in that: The improved attention structure contains two branches running in parallel, one branch captures the cross-temporal dependencies of the sequence, while the other branch focuses on the cross-dimensional dependencies between different variables.

6. The improved dual-branch attention structure as claimed in claim 5, characterized in that: The cross-temporal attention branch is based on adaptive span attention, which considers the correlation of sequence data in the process of changing over time. At the same time, adaptive span attention can only calculate the correlation within a limited range.

7. The improved dual-branch attention structure as claimed in claim 5, characterized in that: The cross-dimensional attention branch fully exploits the cross-dimensional dependencies between different variables. When performing cross-dimensional attention, adaptive span attention is applied to multi-dimensional vectors to calculate the correlation between data points in different dimensions.

8. A DBASformer model based on a dual-branch adaptive span attention mechanism, characterized in that: Based on the Transformer model, following the encoder and decoder architecture, the prediction layer generates prediction values ​​based on the latent representation obtained through training; The proposed dual-branch adaptive span attention mechanism replaces the typical global attention mechanism.

9. A method for predicting AUV drift trajectory based on DBASformer model, characterized in that: Considering the time series characteristics of the AUV's historical drift trajectory, the future drift trajectory of the AUV is predicted; The DBASformer model is used to predict the drift trajectory of AUV, taking into account the influence of ocean current velocity on drift. This method improves the accuracy of predicting the drift trajectory of AUV. The beneficial effects of the present invention are: (1) The present invention proposes an attention mechanism based on adaptive span. Specifically, it proposes to use a learnable attention span to improve the attention mechanism, which can more flexibly distribute accurate attention weights, thereby extracting more critical features in the sequence. (2) This paper develops a dual-branch attention structure to effectively integrate sequence information into the model. This improvement enhances the model's understanding of the relationship between the various parts of the input sequence and improves the model's ability to extract multidimensional features to fully capture the complex dependencies between multivariate sequences in drift data. (3) This paper proposes a method for predicting AUV drift trajectory based on the DBASformer model. By studying the drift trajectory prediction model based on Transformer, the changing characteristics of drift trajectory and ocean currents can be captured. At the same time, this method introduces variables that affect the AUV drift trajectory, significantly reducing the prediction error and improving the prediction accuracy.

Citation Information

Cited By

  • Method for predicting drifting trajectory of personnel falling into water at sea

    CN119538755A

  • A method for predicting the drifting trajectory of a person falling into the sea

    CN119538755B

  • Method for measuring oil-water two-phase flow parameters of oil well based on multivariate time sequence prediction model of cross-dimension dependency

    CN119886448A