A Deep Learning-Based Method for Predicting Amphibious Vehicle Attitude Angles in Water
By using the Informer architecture and position encoding module based on deep learning, the problem of insufficient accuracy in amphibious vehicle attitude angle prediction on water was solved, achieving more efficient and accurate attitude angle prediction, and enhancing the vehicle's stability and maneuverability on water.
Patent Information
- Application Number
- CN202410254929.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-06
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-03-06
AI Technical Summary
Existing attitude angle prediction methods are mainly used for ships, and lack effective prediction methods for the attitude angles of amphibious vehicles on water, resulting in large data errors and insufficient prediction accuracy.
A deep learning-based approach is adopted, utilizing the sparse attention mechanism, residual connections, and layer normalization layers of the Informer architecture, combined with a position encoding module, to construct an encoder and decoder for predicting the water attitude angle of amphibious vehicles.
It improves the prediction accuracy of amphibious vehicle attitude in water, reduces prediction errors, enhances the training efficiency and stability of the model, can predict attitude instability risks in advance, and improves the vehicle's water handling and stability.
Smart Images

Figure CN118013200B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of deep learning and time series prediction technology, and in particular relates to a deep learning-based method for predicting the water attitude angle of amphibious vehicles. Background Technology
[0002] During amphibious vehicle operation, numerous influencing parameters result in varying motion attitudes. Amphibious vehicles can be categorized by their motion characteristics as follows: Roll (lateral swaying, typically a rolling motion); Sway (horizontal linear oscillation along the vertical direction of the vehicle's longest extension); Pitch (rotational oscillation around the vehicle's horizontal axis); Heave (horizontal linear oscillation along the longest extension direction of the vehicle); Tilting (rotational oscillation around the vehicle's vertical axis); and Vertical Sway (linear oscillation along the vertical direction of the vehicle). Predicting the motion attitude of amphibious vehicles requires established prediction methods. Existing attitude angle prediction methods mainly include Kalman filter prediction, autoregressive prediction, and neural network prediction. However, these methods are primarily used for predicting ship attitude angles and lack specific methods for predicting amphibious vehicle attitude angles on water. Applying ship attitude prediction methods to amphibious vehicles may lead to large data errors and insufficient prediction accuracy. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention proposes a deep learning-based method for predicting the water attitude angle of amphibious vehicles. This method can improve the water attitude stability of amphibious vehicles and prevent the risk of attitude instability.
[0004] To achieve the above objectives, this invention provides a deep learning-based method for predicting the water attitude angle of amphibious vehicles, comprising:
[0005] Acquire test data from amphibious vehicles;
[0006] The test data is input into a deep learning model, and the attitude angle prediction result is output. The deep learning model is trained by a training set, which contains vehicle attitude information data.
[0007] The deep learning model consists of a position encoding module, an encoding module, and a decoding module;
[0008] The location encoding module is used to obtain the location information of the data;
[0009] The encoding module is used to encode the location information;
[0010] The decoding module is used to output the prediction results.
[0011] Optionally, before inputting the test data into the deep learning model, the method further includes: preprocessing the test data;
[0012] Preprocessing of the data to be tested includes: data integration, data truncation, outlier handling, and data normalization.
[0013] The data integration includes: extracting attitude-related channel data from the data to be tested;
[0014] The data interception includes: intercepting the acquired test data of the amphibious vehicle, intercepting the data of each channel according to a preset sampling frequency, and obtaining a data matrix with consistent data length;
[0015] The data outlier processing includes: determining whether there are outliers in the data to be tested by calculating the relationship between the extreme values in the data to be tested and the overall characteristics of the data sample, and removing the outliers, wherein the overall characteristics of the data sample are the data mean and standard deviation;
[0016] The method for calculating the relationship between the extreme values in the test data and the overall characteristics of the data sample is as follows:
[0017]
[0018] Where G is the Grubbs statistic, x m The maximum or minimum value in the sample. is the sample mean, and std is the sample standard deviation;
[0019] The data normalization process is as follows:
[0020]
[0021] Among them, M i The data is obtained after normalization, x i This represents the current input data, where min(x) and max(x) are the minimum and maximum values of the data, respectively.
[0022] Optionally, the encoding module includes: a sparse attention mechanism layer, a residual connection and layer normalization layer, and a pooling layer;
[0023] The sparse attention mechanism layer is used to enable the deep learning model to focus on key information in the test data;
[0024] The residual connections and layer normalization layers are used to improve the stability and generalization ability of the network architecture;
[0025] The pooling layer is used to reduce data dimensionality, save computing resources, and improve computing speed and efficiency.
[0026] Optionally, constructing the encoding module includes:
[0027] Calculate the sparsity score, and filter out a portion of the target queries based on the sparsity score;
[0028] Based on the target query, calculate the key attention coefficient, and replace the attention coefficients of the remaining non-key queries with the mean value to obtain a sparse attention model:
[0029]
[0030] Where A is the feature dot product of the sparse attention mechanism. Q is the query vector matrix after sparse filtering, V is the value vector matrix, and K is the query vector matrix after sparse filtering. T Let d be the transpose of the key vector K, and d be the dimension of the input data.
[0031] Optionally, the residual connection and layer normalization layer are represented as follows:
[0032] y = LayerNorm(x + sublayer(x))
[0033] Where y is the output after residual connection and layer normalization, x is the input of the upper layer, sublayer(x) is the output of the sublayer, and LayerNorm() represents the layer normalization operation, which normalizes each feature so that its mean is 0 and its standard deviation is 1.
[0034] Optionally, the distillation mechanism of the pooling layer is as follows:
[0035] X u+1 =MaxPool(ELU(Convld([X u ] AB )))
[0036] Among them, [X u ] AB For attention blocks, Convld() is a one-dimensional convolution, ELU() is the activation function, and MaxPool is an additional max pooling layer.
[0037] Optionally, the input format of the decoding module is:
[0038]
[0039] Among them, X feed_de The data format to be passed to the decoder. As prior data, L token The length of the prior data; L is a placeholder for the target sequence. yThe target sequence length; Concat indicates concatenating characters.
[0040] Optionally, the method for obtaining the location information of the data is as follows:
[0041]
[0042]
[0043] Among them, PE (pos,2j) For even-numbered positions, the positional encoding is provided, where sin is the sine function, pos is the sequence order, j∈(1,d / 2), representing the dimension, d is the dimension of the input data, and L... x Given the length of the input sequence, PE (pos,2j+1) For odd-numbered positions, the position code is denoted by cosine.
[0044] Compared with the prior art, the present invention has the following advantages and technical effects:
[0045] This invention utilizes the Informer architecture in deep learning models, which can better capture the correlation information of sequences, improve model training efficiency, save training resources, and enhance the prediction ability for long sequence data. Furthermore, this invention makes some optimizations based on the Informer architecture. Residual connections and layer normalization are added between the attention layers of the encoder and decoder, accelerating the model's training speed and mitigating the risk of gradient vanishing. In position encoding, time encoding, which has less relation to amphibious vehicle attitude changes, is removed, while sea state encoding and operational mode encoding, which have a greater impact, are added, enabling the model to better read and represent the actual operational information of the amphibious vehicle. Compared with the traditional Informer architecture, prediction accuracy is improved and prediction error is reduced. Attached Figure Description
[0046] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0047] Figure 1 This is a flowchart of a deep learning-based method for predicting the water attitude angle of amphibious vehicles according to an embodiment of the present invention.
[0048] Figure 2 This is a schematic diagram of the encoder structure according to an embodiment of the present invention. Detailed Implementation
[0049] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0050] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0051] Compared to ships, amphibious vehicles need to ensure rapid transitions between land and water, as well as maneuverability and mobility on water. Therefore, the streamlined characteristics of amphibious vehicles are relatively poor, and their buoyancy distribution is often uneven, resulting in lower stability on water compared to ships. Furthermore, amphibious vehicles face more complex aquatic environments and more varied combat missions, making them more susceptible to attitude instability risks. Utilizing deep learning networks to establish an amphibious vehicle attitude angle prediction system allows for real-time prediction of attitude angle changes, enabling early detection of attitude instability risks and allowing adjustments to be made before significant swaying or capsizing occurs, thereby improving the amphibious vehicle's attitude stability on water.
[0052] This invention proposes a deep learning-based method for predicting the water attitude angles of amphibious vehicles, such as... Figure 1 As shown, the specific steps include:
[0053] Acquire and preprocess the test data of the amphibious vehicle;
[0054] Specifically, the preprocessing of the data to be tested mainly includes: data integration, data truncation, outlier handling, and data normalization.
[0055] The test data is input into the deep learning model, and the output is the attitude angle prediction result. The deep learning model is trained by the training set, which contains vehicle attitude information data.
[0056] Specifically, the deep learning model consists of a position encoding module, an encoding module, and a decoding module. It utilizes the sparse attention mechanism of the Informer architecture to better capture the correlation information of sequences, improve the training efficiency of the model, and save training resources.
[0057] Furthermore, data integration includes: integrating the acquired vehicle sensor data and extracting attitude-related channel data.
[0058] Furthermore, data interception includes: intercepting the acquired vehicle sensor data. Since the sampling frequencies of each vehicle sensor are different, the data lengths of each channel are different. The data of each channel is sampled and intercepted according to the same sampling frequency to form a data matrix with consistent data length.
[0059] Furthermore, outlier handling includes addressing the issue that harsh driving environments and random interference in the testing environment can introduce various noises and abnormal fluctuations into the detection signals, necessitating anomaly processing. The Grubbs method is one of the more commonly used outlier detection algorithms, proving effective in identifying outliers in vehicle sensors. The Grubbs method determines the presence of outliers by calculating the relationship between the maximum (or minimum) value in the data and the overall characteristics of the data sample (mean and standard deviation).
[0060] Furthermore, before inputting data into the model, the data needs to be normalized. Data normalization can improve the model's generalization ability, accelerate the model's convergence speed, reduce the correlation between data features, and improve the model's stability.
[0061] Furthermore, the deep learning model consists of a position encoding module, an encoding module, and a decoding module;
[0062] Specifically, the position encoding module can keep the sequential structure of the data input unchanged and obtain the position information of the data;
[0063] The encoding module includes: constructing a sparse attention mechanism layer, constructing residual connections and layer normalization, constructing a pooling layer and a multi-layer multi-head attention mechanism.
[0064] The decoding module is mainly used to perform forward computation and output the prediction results.
[0065] To further illustrate the present invention in detail, specific implementation schemes are proposed as follows:
[0066] S1: Read the amphibious vehicle bus sensor data and preprocess the data, which mainly includes the following parts: data integration, data interception, data outlier handling, and data normalization.
[0067] Furthermore, the specific steps of S1 are as follows:
[0068] S1.1: Integrate the acquired vehicle sensor data and extract the attitude-related channel data, specifically including: attitude roll angle, attitude pitch angle, attitude yaw angle, engine speed, engine oil level, output speed on water, vehicle speed, water speed, horn top skid angle, horn bottom skid angle, left rudder angle, right rudder angle, and steering wheel angle.
[0069] S1.2: The acquired vehicle sensor data is truncated. Since the sampling frequency of each vehicle sensor is different, the data length of each channel is different. The data of each channel is sampled and truncated at a sampling frequency of 0.5 seconds to form a data matrix with consistent data length.
[0070] S1.3: Due to the harsh driving environment and the influence of random interference factors on the testing environment, the detected signals contain various noises and abnormal fluctuations, requiring anomaly processing. The Grubbs statistic is one of the more commonly used outlier detection algorithms, and it is effective in identifying outliers in vehicle sensors. The Grubbs statistic determines the presence of outliers by calculating the relationship between the maximum (or minimum) value in the data and the overall characteristics of the data sample (mean and standard deviation). The formula for calculating the Grubbs statistic (G-value) is as follows:
[0071]
[0072] Where, x i It is the maximum (or minimum) value in the sample. is the sample mean, and std is the sample standard deviation. By setting the significance level and comparing it with the critical value table, we can obtain the outlier threshold. By comparing the G value with the threshold, we can determine whether there are outliers in the data.
[0073] S1.4: Before inputting data into the model, the data needs to be normalized. Data normalization can improve the model's generalization ability, accelerate the model's convergence speed, reduce the correlation between data features, and improve the model's stability. The formula for data normalization is as follows:
[0074]
[0075] Where, x i This is the currently input data, M i These are the data obtained after normalization, and min(x) and max(x) are the minimum and maximum values of the data.
[0076] The above steps can be used to preprocess the attitude-related data of amphibious vehicles.
[0077] S2: Build the Informer network architecture.
[0078] The Informer architecture consists of three parts, such as Figure 1 As shown, these are the encoder, decoder, and position encoder, respectively.
[0079] Furthermore, the specific steps of S2 are as follows:
[0080] S2.1: Constructing the encoder model. The Informer architecture encoder includes a sparse attention mechanism layer and a pooling layer. In this invention, some modifications are made to the Informer architecture encoder, adding residual connections and layer normalization operations after each attention layer to better preserve input information and alleviate the gradient vanishing problem. The encoder structure is as follows: Figure 2 As shown.
[0081] Furthermore, the specific steps of S2.1 are as follows:
[0082] A1: Constructing a sparse attention mechanism layer. Before calculating the attention coefficient, the sparse attention mechanism layer first calculates a sparsity score. This sparsity score is used to filter important queries, allowing the model to focus on key information in the data. The formula for calculating the sparsity score is as follows:
[0083]
[0084] in, q is the sparsity score for the i-th vector. i Let L be the i-th query vector, K be the set of sampled key vectors, and L be the set of key vectors. K d is the dimension of the key vector matrix sequence, and d is the dimension of the input data. It is the transpose of the j-th key vector in the set of key vectors.
[0085] Five key queries are selected to calculate attention coefficients, and the mean of the remaining attention coefficients is used instead. The final sparse attention formula is as follows:
[0086]
[0087] Where A is the feature dot product of the sparse attention mechanism. Q is the query vector matrix after sparse filtering, V is the value vector matrix, and K is the query vector matrix after sparse filtering. T This is the transpose of the key vector K.
[0088] A2: Constructing residual connections and layer normalization. For long input sequences, residual connections and layer normalization can effectively alleviate the vanishing gradient problem, accelerate convergence, and improve the model's stability and generalization ability. The formulas for residual connections and layer normalization are as follows:
[0089] y = LayerNorm(x + sublayer(x))
[0090] Where y is the output after residual connection and layer normalization, x is the input of the upper layer, sublayer(x) is the output of the sublayer, and LayerNorm() represents the layer normalization operation, which normalizes each feature so that its mean is 0 and its standard deviation is 1.
[0091] A3: Constructing Pooling Layers. Pooling layer distillation, through feature dimension compression and extraction of the most important self-attention information, can further reduce the time and space complexity of the encoder computation, while minimizing the loss of feature elements. The distillation mechanism from layer u to layer u+1 is as follows:
[0092] Xu+1 =MaxPool(ELU(Convld([X u ] AB )))
[0093] Among them, [X u ] AB For attention blocks, Convld() is a one-dimensional convolution, ELU() is the activation function, and MaxPool is an additional max pooling layer.
[0094] A4: A three-layer, five-head attention mechanism is constructed, with each layer including residual connections, layer normalization, and pooling distillation. A single sparse attention mechanism can only extract relevant information from a single spatial dimension. The Informer architecture constructs a multi-layer, multi-head attention mechanism to achieve information acquisition from different spaces and dimensions.
[0095] S2.2: Constructing the Decoder. The decoder is mainly used for forward computation and outputting the prediction results. The Informer architecture decoder adopts an integrated generation method, which can generate the prediction sequence in one go, improving the efficiency of prediction. The input format of the decoder is as follows:
[0096]
[0097] X feed_de The data format to be passed to the decoder. As prior data, L token The length of the prior data; Placeholder for the target sequence, L y The target sequence length; Concat indicates concatenating characters.
[0098] S2.3: Constructing Position Encoding. Attention mechanisms can focus on relevant information between data points, but cannot capture positional information. Therefore, to maintain the sequential structure of the input data, position encoding needs to be added. Furthermore, to better adapt to the amphibious vehicle data structure, this invention optimizes the position encoding method of the Informer architecture by adding one-hot encoding for four sea state types and four task modes, enabling the model to better fit the real-world amphibious vehicle data. The position encoding formula is as follows:
[0099]
[0100]
[0101] Where pos represents the sequence order; j∈(1,d / 2) represents the dimension.
[0102] The Informer network architecture can be built by following the steps above.
[0103] S3: Input the preprocessed data into the Informer model for positional encoding, forming a data matrix X containing positional codes. Divide the data matrix into a training dataset X1 and a test dataset X2 in a 3:1 ratio. First, train the Informer model using X1, then input the data from the test set X2 into the model to output the prediction results, such as... Figure 1 As shown.
[0104] The above are merely preferred embodiments 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 scope of the technology 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 deep learning-based amphibious vehicle water attitude angle prediction method, characterized in that, The method comprises the following steps: Obtaining the to-be-tested data of an amphibious vehicle; Inputting the to-be-tested data into a deep learning model to output a posture angle prediction result, wherein the deep learning model is trained by a training set containing vehicle posture information data; The deep learning model is composed of a position encoding module, an encoding module and a decoding module; The position encoding module is used to obtain position information of the data; The encoding module is used to encode the position information; The decoding module is used to output a prediction result; The to-be-tested data is preprocessed before being inputted into the deep learning model; The preprocessing of the to-be-tested data comprises data integration, data interception, data outlier processing and data normalization processing; The data integration comprises extracting posture-related channel data in the to-be-tested data; The data interception comprises intercepting the to-be-tested data of the amphibious vehicle, intercepting each channel data according to a preset sampling frequency, and obtaining a data matrix with consistent data length; The data outlier processing comprises judging whether there is an outlier in the to-be-tested data by calculating the relationship between the maximum value in the to-be-tested data and the overall characteristics of the data sample, and eliminating the outlier, wherein the overall characteristics of the data sample are the data mean and the standard deviation; The method for calculating the relationship between the maximum value in the to-be-tested data and the overall characteristics of the data sample is as follows: where G is the Grubbs statistic, x m is the maximum or minimum value in the sample, is the mean of the sample, and std is the standard deviation of the sample; The method for data normalization processing is as follows: wherein M i is the normalized data, x i is the current input data, min(x), max(x) are the minimum and maximum values of the data, respectively. The encoding module comprises a sparse attention mechanism layer, a residual connection and layer normalization layer, and a pooling layer; The sparse attention mechanism layer is used to focus the deep learning model on the key information in the to-be-tested data; The residual connection and layer normalization layer are used to improve the stability and generalization ability of the network architecture; The pooling layer is used to reduce the data dimension, save the computing resources, and improve the computing speed and efficiency; The construction of the encoding module comprises the following steps: Calculating a sparsity score, and screening part of the target query according to the sparsity score; Calculating a key attention coefficient based on the target query, and replacing the attention coefficients of the remaining non-key queries with the mean value to obtain a sparse attention model: wherein A is a feature dot product of the sparse attention mechanism, is the query vector matrix Q after the sparsification screening, V is a value vector matrix, K T is the transpose of the key vector K, and d is the dimension of the input data. The input format of the decoding module is as follows: wherein X feed_de is the data format for the incoming decoder, is the prior data, L token is the length of the prior data; is the placeholder for the target sequence, L y is the length of the target sequence; and Concat denotes concatenation of characters. The method for obtaining the position information of the data is as follows: wherein PE (pos,2j) is the position encoding of even bits, sin is the sine function, pos is the sequence order; j e (1, d / 2), represents the dimension, d is the input data dimension, L x is the length of the input sequence, PE (pos,2j+1) is the position encoding of odd bits, cos is the cosine function.
2. The method of claim 1, wherein the method is based on deep learning. The residual connection and layer normalization layer is expressed as: y = LayerNorm (x + sublayer (x)) Wherein, y is the output after residual connection and layer normalization, x is the input of the upper layer, sublayer (x) is the output of the sublayer, LayerNorm () represents the layer normalization operation, which normalizes each feature to have a mean value of 0 and a standard deviation of 1.
3. The method of claim 1, wherein the method is based on deep learning. The distillation mechanism of the pooling layer is as follows: X u+1 = MaxPool(ELU(Convld([X u ] AB ))) where [X u ] AB is an attention block, Convld() is a one-dimensional convolution, ELU() is an activation function, and MaxPool is an additional layer of max pooling.
Citation Information
Patent Citations
Unmanned aerial vehicle attitude estimation method and device based on genetic algorithm, equipment and medium
CN117349599A