A soft fault diagnosis method and system for AUV IMU based on dual-stream attention network
Patent Information
- Application Number
- CN202611225767.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2046-08-13
AI Technical Summary
[0006]一是通常采用单一数据表示,难以同时表征偏置故障的绝对幅值异常、漂移故障的缓慢变化趋势以及跳变故障的瞬时突变特征;二是单一尺度特征提取结构难以兼顾不同持续时间的故障模式;三是部分时序模型对IMU多轴通道之间的差异化响应和长程依赖关系建模不足,导致在复杂水下背景噪声下对弱故障、尤其是漂移故障的识别能力有限
[0028] This invention extracts the original amplitude information and rate of change information of the IMU through the original data stream and the first-order differential data stream, respectively, which can simultaneously meet the diagnostic needs of different types of soft faults such as bias, drift and jump.
Smart Images

Figure CN122711440B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous underwater vehicle (AUV) navigation sensor status monitoring and fault diagnosis technology, specifically to an AUV IMU soft fault diagnosis method and system based on a dual-stream attention network. Background Technology
[0002] Autonomous underwater vehicles (AUVs) are widely used in missions such as deep-sea exploration, seabed topography mapping, pipeline inspection, and long-term observation. Because GNSS signals are difficult to maintain continuously underwater, AUVs typically rely on a multi-source sensor system comprised of an inertial measurement unit (IMU), a Doppler velocimeter, an ultra-short baseline positioning system, and a depth gauge to form a combined navigation system. The IMU provides high-frequency angular velocity and linear acceleration information, serving as a crucial input for state prediction within the combined navigation system.
[0003] During long-endurance AUV operation, the IMU (Integrated Measurement Unit) is susceptible to factors such as component aging, temperature variations, vehicle maneuvering, propeller vibration, and underwater environmental disturbances, resulting in soft faults such as jumps, biases, and drifts. Unlike explicit faults such as complete sensor failure, IMU soft faults typically have small amplitudes, uncertain durations, and are easily mixed with normal maneuvering responses and background noise. If such anomalies are not identified in a timely manner, the integrated navigation filter may mistake abnormal measurements for actual changes in motion, leading to a continuous accumulation of errors in attitude, velocity, and position estimations. In severe cases, this can cause route deviations, mission interruptions, or even loss of vehicle control.
[0004] Existing IMU fault diagnosis methods mainly include model-based methods and data-driven methods. Model-based methods typically rely on state observers, residual analysis, or threshold discrimination mechanisms, and perform well when the system model is accurate and the noise statistics are well-defined. However, the actual operating environment of AUVs is complex, and sensor noise and underwater disturbances often exhibit nonlinear, non-stationary, and non-Gaussian characteristics, making it difficult for fixed models and fixed thresholds to reliably identify weak drift-type soft faults.
[0005] Data-driven methods can automatically extract fault features from multi-channel time-series signals, reducing reliance on precise physical models. However, existing methods still have the following shortcomings:
[0006] First, the use of a single data representation makes it difficult to simultaneously characterize the absolute amplitude anomaly of bias faults, the slow changing trend of drift faults, and the instantaneous abrupt change characteristics of jump faults. Second, the single-scale feature extraction structure is difficult to take into account fault modes of different durations. Third, some time-series models do not adequately model the differentiated responses and long-range dependencies between IMU multi-axis channels, resulting in limited ability to identify weak faults, especially drift faults, under complex underwater background noise.
[0007] Therefore, there is an urgent need to propose an IMU soft fault diagnosis method suitable for AUV integrated navigation scenarios, which can simultaneously utilize IMU raw amplitude information, rate of change information, multi-scale local features, key channel response and long-range time series dependencies, thereby improving the accuracy and reliability of diagnosing soft faults such as IMU jumps, biases and drifts in complex underwater operating environments. Summary of the Invention
[0008] To address the shortcomings of the aforementioned technical issues, this invention provides an AUV IMU soft fault diagnosis method and system based on a dual-stream attention network. The aim is to reliably identify normal states, jump faults, offset faults, and drift faults in AUV integrated navigation systems through dual-stream feature extraction, multi-scale local feature modeling, channel attention enhancement, and Transformer temporal dependency modeling. This provides pre-diagnostic information for abnormal measurement isolation, filter weight adjustment, and fault-tolerant control.
[0009] This invention provides a soft fault diagnosis method for AUV IMUs based on a dual-stream attention network, comprising the following steps:
[0010] S1, acquire IMU timing measurement data, and sequentially complete fault injection and standardization processing to obtain standardized IMU timing measurement data;
[0011] S2, Based on the sliding window mechanism, the standardized IMU time series measurement data is truncated to obtain IMU diagnostic samples;
[0012] S3, input the IMU diagnostic sample into the raw data stream and the first-order difference data stream, and extract the raw amplitude features and rate of change features respectively;
[0013] S4, fuse the original amplitude features and the rate of change features, input the input to the multi-scale one-dimensional convolution module, and extract the multi-scale local fault features;
[0014] S5, input the multi-scale local fault features into the channel attention module for channel attention enhancement to obtain the enhanced features;
[0015] S6, Perform Transformer temporal modeling on the enhanced features and output temporal features;
[0016] S7, perform composite pooling on the time-series features, and output the fault activation probability through the classification head;
[0017] S8. Based on the fault activation probability, determine the IMU state at the end of the current sliding window and output the diagnostic result.
[0018] This invention provides an AUV IMU soft fault diagnosis system based on a dual-stream attention network, comprising:
[0019] The data acquisition and standardization module is used to acquire IMU timing measurement data, and sequentially perform fault injection and standardization processing to obtain standardized IMU timing measurement data.
[0020] The IMU diagnostic sample construction module is used to extract the standardized IMU time series measurement data based on the sliding window mechanism to obtain IMU diagnostic samples.
[0021] The dual-stream feature extraction module is used to input the IMU diagnostic sample into the raw data stream and the first-order difference data stream, and extract the raw amplitude features and the rate of change features respectively;
[0022] The dual-stream feature fusion and multi-scale local feature extraction module is used to fuse the original amplitude feature and the rate of change feature, input the multi-scale one-dimensional convolution module, and extract the multi-scale local fault features.
[0023] The channel attention enhancement module is used to input the multi-scale local fault features into the channel attention module for channel attention enhancement to obtain the enhanced features.
[0024] The Transformer temporal modeling module is used to perform Transformer temporal modeling on the enhanced features and output temporal features.
[0025] The feature pooling module is used to perform composite pooling on the temporal features and output the fault activation probability through the classification head;
[0026] The status determination and output module is used to determine the IMU status at the end of the current sliding window based on the fault activation probability and output the diagnostic results.
[0027] The advantages and beneficial effects of this invention are as follows:
[0028] This invention extracts the original amplitude information and rate of change information of the IMU through the original data stream and the first-order differential data stream, respectively, which can simultaneously meet the diagnostic needs of different types of soft faults such as bias, drift and jump.
[0029] This invention uses a multi-scale one-dimensional convolution module to extract local anomaly patterns at different time scales, overcoming the problem that single-scale feature extraction cannot take into account transient jumps, continuous biases and slow drifts.
[0030] This invention adaptively enhances fault-related axial channels or feature channels through the SE channel attention module, which helps to suppress complex underwater background noise and redundant channel responses, and improves the fault feature representation capability of multi-channel IMUs.
[0031] This invention models long-range temporal dependencies within a sliding window using a Transformer encoder, which enhances the ability to identify drift-type slow-evolutionary faults.
[0032] This invention employs a three-fault activation component output method, representing the normal state as a fault-free activation state. This helps alleviate the problem of the model biasing towards the normal category when the proportion of normal samples is high, and improves the reliability of IMU soft fault diagnosis in AUV integrated navigation scenarios. Attached Figure Description
[0033] Figure 1 This is an overall flowchart of an AUV IMU soft fault diagnosis method based on a dual-stream attention network provided in an embodiment of the present invention;
[0034] Figure 2 This is an overall structural diagram of the dual-stream multi-scale attention Transformer diagnostic model provided in an embodiment of the present invention;
[0035] Figure 3 A simulated AUV integrated navigation trajectory diagram provided by the ROS simulation system in this embodiment of the invention;
[0036] Figure 4 A visualization distribution diagram of t-SNE dimensionality reduction of the classification pre-feature space provided in this embodiment of the invention. Detailed Implementation
[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0039] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.
[0040] Example 1
[0041] like Figure 1 As shown, this invention provides a soft fault diagnosis method for AUV IMU based on a dual-stream attention network, specifically including the following steps:
[0042] Step S1: IMU Data Acquisition and Fault Injection
[0043] In step S1, six-axis timing measurement data output by the inertial measurement unit (IMU) of the AUV integrated navigation system is acquired. The six-axis timing measurement data includes three-axis angular velocity and three-axis linear acceleration.
[0044] Further, step S1 includes the following steps:
[0045] Step S1.1: Acquisition of IMU six-axis measurement data
[0046] In this embodiment, let the IMU be at time... The six-axis measurement vector is:
[0047]
[0048] in, , , These represent the angular velocities of the three axes, , , These represent the accelerations along the three axes, respectively.
[0049] Step S1.2: Fault Injection
[0050] In this embodiment, let the first Normal measurement of each IMU channel is Measurements after the fault were as follows The fault component is The fault injection model is then:
[0051]
[0052] In this embodiment, the IMU state includes four categories: Normal, Jump, Bias, and Drift. Under the normal state:
[0053]
[0054] A jump fault is represented as:
[0055]
[0056] in, Indicates the jump amplitude value. Indicates the time when the fault occurred. This represents the discrete impulse function.
[0057] Bias fault is represented as:
[0058]
[0059] in, Indicates the bias magnitude. Indicates the duration of the bias fault.
[0060] Drift fault is represented as:
[0061]
[0062] in, Indicates the drift termination amplitude. Indicates the duration of the drift.
[0063] Step S1.3: Data Standardization Processing
[0064] Furthermore, in this embodiment, the data from each IMU channel is standardized to obtain standardized IMU measurement values:
[0065]
[0066] in, Indicates the first Each IMU channel at time The measurement values after fault injection processing, Indicates the first The average of each channel, Indicates the first The standard deviation of each channel To prevent extremely small constants with a denominator of zero.
[0067] Furthermore, in this embodiment, the standardized IMU measurements are spliced together to obtain standardized IMU time series data.
[0068] Step S2: Construction of Sliding Window Diagnostic Samples
[0069] In this step, a fixed-length sliding window is used to extract standardized IMU timing data to construct IMU timing samples for fault diagnosis.
[0070] Further, step S2 includes the following steps:
[0071] Step S2.1: Sliding window capture
[0072] In this embodiment, the length of the sliding window is set to be... Then at time The corresponding IMU diagnostic samples are:
[0073]
[0074] in, , indicating a length of IMU timing window with 6 channels.
[0075] Step S2.2: Determine the status label
[0076] Furthermore, this embodiment employs a window-end time-labeling rule, using the IMU state corresponding to the sampling time at the end of the window as the label for the diagnostic sample:
[0077]
[0078] in, Display window status labels, Indicates time The IMU status.
[0079] Step S2.3: Fault Category Definition
[0080] Furthermore, in this embodiment, the IMU state set is defined as follows:
[0081]
[0082] in, Indicates a normal state. Indicates a jump fault. Indicates a bias fault. This indicates a drift fault.
[0083] Step S3: Dual-stream feature extraction;
[0084] In this step, the IMU diagnostic samples are input into the raw data stream and the first-order difference data stream, respectively, and the raw amplitude features and rate of change features are extracted.
[0085] Further, step S3 includes the following steps:
[0086] Step S3.1: Feature extraction from the raw data stream; The standardized IMU sliding window containing IMU diagnostic samples is used as the input to the raw data stream:
[0087]
[0088] The original amplitude features are obtained through the original data stream feature extraction function:
[0089]
[0090] in, This represents the feature extraction function of the original data stream, consisting of one-dimensional convolution, batch normalization, and nonlinear activation layers. This feature is used to preserve the absolute amplitude information in the IMU sequence and enhance the characterization capability of bias faults.
[0091] Step S3.2: Construction of first-order difference sequences
[0092] Furthermore, this step constructs a first-order difference sequence by calculating the difference between IMU measurement data at adjacent sampling times:
[0093]
[0094] Furthermore, to maintain consistent sequence length, the first time step is padded:
[0095]
[0096] Therefore, the differential data stream input is:
[0097]
[0098] Step S3.3: Feature Extraction of Differential Data Stream
[0099] Furthermore, in this embodiment, the first-order difference sequence Input the differential data stream to obtain the rate of change feature:
[0100]
[0101] in, This represents a feature extraction function for a differential data stream, consisting of one-dimensional convolution, batch normalization, and nonlinear activation layers. This feature is used to enhance the sustained changing trends of drift faults and the transient abrupt responses of jump faults.
[0102] Step S4: Dual-stream feature fusion and multi-scale local feature extraction
[0103] This step fuses the original amplitude features of the original data stream output and the rate of change features of the first-order difference data stream output, and extracts local fault features at different time scales through a multi-scale one-dimensional convolution module.
[0104] Further, step S4 includes the following steps:
[0105] Step S4.1: Dual-stream feature fusion
[0106] This embodiment concatenates the original amplitude features and rate of change features along the channel dimension to obtain the dual-stream fused features:
[0107]
[0108] in, This indicates a channel dimension splicing operation.
[0109] Step S4.2: Multi-scale one-dimensional convolution processing
[0110] Furthermore, in this embodiment, the dual-stream fused features are input into multiple parallel one-dimensional convolutional branches, each branch using a different convolutional kernel size:
[0111]
[0112] in, Indicates the kernel size as One-dimensional convolution operation.
[0113] Step S4.3: Multi-scale feature fusion
[0114] Furthermore, in this embodiment, the features output by multiple convolutional branches are concatenated to obtain multi-scale local fault features:
[0115]
[0116] Smaller convolutional kernels are used to capture single-point or short-term abrupt change features corresponding to jump faults, while larger convolutional kernels are used to capture persistent or slowly changing features corresponding to bias faults and drift faults.
[0117] Step S5: Channel Attention Enhancement
[0118] This step inputs multi-scale local fault features into the SE channel attention module, performs adaptive recalibration on the feature channels to enhance the response of critical channels related to faults, and suppresses redundant channels and background noise interference.
[0119] Further, step S5 includes the following steps:
[0120] Step S5.1: Channel Descriptor Generation
[0121] In this embodiment, the multi-scale local fault characteristics are assumed to be: , its first The first channel in the The feature values at each time step are Then the first The channel descriptors for each channel are:
[0122]
[0123] in, Indicates the first A global descriptor for each channel.
[0124] Step S5.2: Channel weight calculation
[0125] Furthermore, in this embodiment, all channel descriptors are combined into a vector. Channel attention weights are generated through a fully connected network:
[0126]
[0127] in, and For learnable weight matrix, Represents the ReLU activation function. This represents the Sigmoid function. This represents the channel attention weight vector.
[0128] Step S5.3: Channel Feature Recalibration
[0129] Applying channel attention weights to the corresponding feature channels yields the channel attention-enhanced features:
[0130]
[0131] in, Indicates the first Attention weights for each channel, Indicates the first Multi-scale characteristics of each channel. Indicates the recalibrated first Each channel feature.
[0132] Step S6: Transformer Temporal Modeling
[0133] This step inputs the channel attention-enhanced features into the Transformer encoder and uses a multi-head self-attention mechanism to model the long-range temporal dependencies between different sampling times within the sliding window.
[0134] Further, step S6 includes the following steps:
[0135] Step S6.1: Location Encoding
[0136] Furthermore, in this embodiment, the features enhanced by channel attention are converted into a time series format and positional encoding is added:
[0137]
[0138] in, This represents the position encoding matrix.
[0139] The sine and cosine position codes can be represented as:
[0140]
[0141]
[0142] in, Indicates the time step position. Indicates the feature dimension index. Indicates the feature dimension.
[0143] Step S6.2: Multi-head self-attention modeling
[0144] The Transformer encoder calculates the correlation between different time steps using a self-attention mechanism. Single-head self-attention calculation is as follows:
[0145]
[0146] in, , , These represent the query matrix, key matrix, and value matrix, respectively. This represents the dimension of the key vector.
[0147] Step S6.3: Output of temporal features
[0148] Furthermore, after processing by the Transformer encoder, this embodiment yields timing features containing long-range timing dependency information:
[0149]
[0150] In this embodiment, this step can enhance the model's ability to identify drift-type slow-evolutionary faults.
[0151] Step S7: Composite Pooling and Fault Activation Output
[0152] This step performs composite pooling on the temporal features output by the Transformer encoder and outputs the fault activation probability through the classification head.
[0153] Further, step S7 includes the following steps:
[0154] Step S7.1: Global Average Pooling
[0155] Global average pooling is performed on the temporal features output by the Transformer encoder:
[0156]
[0157] in, Indicates the first Transformer output features at each time step This represents the average pooling characteristic.
[0158] Step S7.2: Global Max Pooling
[0159] Global max pooling is performed on the temporal features output by the Transformer encoder:
[0160]
[0161] in, This represents the max pooling feature.
[0162] Step S7.3: Composite Feature Assembly
[0163] Furthermore, in this embodiment, the global average pooling feature and the global max pooling feature are concatenated to obtain the composite pooling feature:
[0164]
[0165] Step S7.4: Fault Activation Output
[0166] The composite pooling features are input into the classification head, which outputs three fault activation values: jump fault, bias fault, and drift fault.
[0167]
[0168] The corresponding fault activation probability is then obtained using the Sigmoid function:
[0169]
[0170] in, , , These represent the activation probabilities of jump faults, bias faults, and drift faults, respectively.
[0171] Step S8: Diagnostic Result Determination and Output
[0172] This step determines the IMU state at the end of the current sliding window based on the three fault activation probabilities and outputs the diagnostic results.
[0173] Further, step S8 includes the following steps:
[0174] Step S8.1: Normal state determination
[0175] If the activation probability of all three faults is lower than the preset threshold ,Right now:
[0176]
[0177] The current IMU state is then determined to be normal.
[0178]
[0179] in, This indicates the preset fault determination threshold. This represents the diagnostic results output by the model.
[0180] Step S8.2: Fault Status Determination
[0181] If the activation probability of any fault is greater than or equal to a preset threshold, the corresponding fault category is determined based on the activated fault component:
[0182]
[0183] in, Indicates category The corresponding fault activation probability.
[0184] Step S8.3: Multi-fault activation mapping
[0185] If multiple fault components are activated simultaneously, the final fault category is determined according to the preset priority.
[0186] Preferably, the preset priority is:
[0187]
[0188] The corresponding diagnostic rules can be expressed as:
[0189]
[0190] Step S8.4: Output of diagnostic results
[0191] Output the IMU status diagnosis result corresponding to the end of the current sliding window, and use the diagnosis result as the forward status monitoring information of the AUV integrated navigation system to assist in abnormal measurement isolation, filter weight adjustment or fault-tolerant control.
[0192] Example 2
[0193] This embodiment verifies the AUV integrated navigation IMU soft fault diagnosis method of the present invention based on simulation data from the AUV integrated navigation simulation platform and AUV sea trial IMU noise data with artificially added faults in the later stage.
[0194] This embodiment includes three stages: model building and training, online diagnosis, and model testing and verification. Figure 1 The IMU soft fault diagnosis process after training is shown; the following further explains the training sample construction, model training, diagnostic judgment, and testing and verification process. The main steps are as follows:
[0195] Step 1: Construct a six-axis IMU measurement sequence and inject soft faults
[0196] In this embodiment, the IMU outputs three-axis angular velocity and three-axis acceleration, totaling six channels. (Time interval) The IMU measurement vector is represented as:
[0197]
[0198] in, , , These represent the angular velocities of the three axes, , , These represent the accelerations along the three axes, respectively.
[0199] Furthermore, let the first Normal measurement of each IMU channel is Measurements after the fault were as follows The fault component is The fault injection model is then:
[0200]
[0201] In this embodiment, the IMU state includes four categories: Normal, Jump, Bias, and Drift. Under normal state:
[0202]
[0203] A jump fault is represented as:
[0204]
[0205] in, Indicates the jump amplitude value. Indicates the time when the fault occurred. This represents the discrete impulse function.
[0206] Bias fault is represented as:
[0207]
[0208] in, Indicates the bias magnitude. Indicates the duration of the bias fault.
[0209] Drift fault is represented as:
[0210]
[0211] in, Indicates the drift termination amplitude. Indicates the duration of the drift.
[0212] In this embodiment, the fault amplitude is set based on the standard deviation of the corresponding IMU channel to ensure the comparability of fault intensities across different channels. During fault injection, 70% of the fault samples are injected into a single random IMU channel, and 30% of the fault samples are injected into all six IMU channels simultaneously; the fault amplitude direction is randomly selected as positive or negative. Fault parameters are shown in Table 1.
[0213] Table 1 IMU Fault Injection Parameters
[0214]
[0215] Step 2: Perform data standardization and construct a sliding window
[0216] Standardize the IMU measurements after fault injection:
[0217]
[0218] in, and They represent the first The mean and standard deviation of each channel. To prevent extremely small constants with a denominator of zero, the mean of each channel is used. and standard deviation It is calculated only based on fault-free samples or independent calibration data in the training data and remains fixed during the validation, testing and online diagnostic phases, without being recalculated based on the current sliding window.
[0219] Let the length of the sliding window be... ,time The input window is:
[0220]
[0221] in, .
[0222] Furthermore, in this embodiment, the window label adopts the end-time label rule:
[0223]
[0224] in, .
[0225] Step 3: Construct and train a two-stream multi-scale attention Transformer diagnostic model
[0226] Step 3.1: Model Structure Construction
[0227] In this embodiment, the model includes a raw data stream, a differential data stream, a multi-scale one-dimensional convolutional module, an SE channel attention module, a Transformer encoder, a composite pooling layer, and an MLP classification head. Figure 2 The overall structure of the dual-stream multi-scale attention Transformer diagnostic model in this embodiment is shown.
[0228] The raw data stream input is:
[0229]
[0230] The first-order difference data stream input is:
[0231]
[0232]
[0233] The two data streams are processed by one-dimensional convolution, batch normalization, and ReLU activation, respectively:
[0234]
[0235]
[0236] Then, channel dimensions are stitched together:
[0237]
[0238] The multi-scale one-dimensional convolution module employs four parallel convolutional branches with kernel sizes of 1, 3, 5, and 7:
[0239]
[0240]
[0241] The SE channel attention module calculates the channel descriptor:
[0242]
[0243] And generate channel attention weights:
[0244]
[0245] The characteristics of the recalibrated channel are as follows:
[0246]
[0247] The SE-enhanced features are added to the positional encoding and then input into the Transformer encoder:
[0248]
[0249] Self-attention is calculated as follows:
[0250]
[0251] The Transformer output is:
[0252]
[0253] Composite pooling is characterized by:
[0254]
[0255]
[0256]
[0257] The classification head outputs three fault activation values:
[0258]
[0259] The probability of activation due to fault is:
[0260]
[0261] Step 3.2: Model Parameter Settings
[0262] In this embodiment, both the original data stream and the first-order difference data stream have 128 one-dimensional convolutional output channels, a kernel size of 3, a stride of 1, and a padding method that maintains the time dimension. The multi-scale one-dimensional convolution module includes four parallel branches with kernel sizes of 1, 3, 5, and 7, respectively, and each branch has 32 output channels.
[0263] In this embodiment, the channel compression ratio of the SE channel attention module is 8. The Transformer encoder has an input feature dimension of 128, four multi-head self-attention heads, two encoder layers, a feedforward network hidden layer dimension of 256, and a Dropout ratio of 0.2. The classification head includes two fully connected layers with an output dimension of 3, corresponding to Jump, Bias, and Drift fault activation components, respectively. The first fully connected layer maps the 256-dimensional composite pooling features to 512-dimensional hidden features. After ReLU and Dropout, the second fully connected layer outputs three fault activation values.
[0264] Step 3.3: Model Training
[0265] In this embodiment, the dataset is first divided into a training candidate set and an independent test set at a ratio of 0.8:0.2; then, a validation set is randomly divided from the training candidate set at a ratio of 0.2, which is used for model selection and early stopping judgment.
[0266] During the training phase, Normal samples are encoded as The Jump, Bias, and Drift samples are encoded as follows: , and The model uses BCEWithLogitsLoss as the training loss.
[0267] The model was trained using the Adam optimizer with an initial learning rate of 0.001, a weight decay coefficient of 0.0001, a batch size of 1024, and a maximum number of training epochs of 100.
[0268] During training, the optimal model is saved based on the Macro-F1 score of the final four diagnostic results on the validation set; if the Macro-F1 score on the validation set does not improve for 10 consecutive rounds, training is terminated early. The gradient norm pruning threshold is set to 1.0.
[0269] Step 4: Determining the Diagnostic Result
[0270] The three fault activation values output by the classification head are converted into Jump, Bias, and Drift fault activation probabilities respectively using the Sigmoid function. In this embodiment, the preset fault determination threshold is... .
[0271]
[0272] When multiple fault activation components reach the threshold simultaneously, the final fault category is determined according to the priority of Drift, Bias, and Jump, and the IMU status diagnosis result corresponding to the end of the current sliding window is output.
[0273] Step 5: Conduct model testing experiments
[0274] Step 5.1: Build an AUV integrated navigation fault simulation platform
[0275] In this embodiment, an AUV integrated navigation fault simulation platform is built based on ROS Melodic. This platform includes an AUV trajectory generation module, a multi-source navigation sensor simulation module, an IMU fault injection module, a UKF integrated navigation positioning module, and a data recording and visualization module.
[0276] The AUV simulation trajectory uses a single-circular flight path with a horizontal motion amplitude of 50 m, a vertical motion amplitude of 20 m, roll and pitch angle amplitudes of 0.9 rad, a yaw angle amplitude of 3.14 rad, and an angular velocity of 0.04 rad / s. The simulation trajectory can be represented as:
[0277]
[0278]
[0279]
[0280] in, , , These represent the positions of the AUV in three directions. This represents the trajectory angular velocity parameter, which is taken in this embodiment. .
[0281] The AUV attitude change can be set as follows:
[0282]
[0283]
[0284]
[0285] in, , , These represent the roll angle, pitch angle, and yaw angle, respectively.
[0286] In the sensor settings, the IMU / AHRS sampling frequency is 50 Hz, the DVL sampling frequency is 1 Hz, the depth gauge sampling frequency is 4 Hz, the USBL sampling frequency is 0.2 Hz, and the auxiliary positioning module sampling frequency is 0.2 Hz. The DVL scale factor is set to 1.005, the depth gauge depth noise is set to 0.6 m, the USBL angle noise is set to 0.0175 rad, the beacon depth noise is set to 0.6 m, and the attitude noise includes roll / pitch noise set to 0.007 rad and yaw noise set to 0.0349 rad.
[0287] Furthermore, the AUV simulation trajectory is as follows: Figure 3 As shown.
[0288] Step 5.2: Performance comparison of baseline models in the simulation dataset
[0289] In this embodiment, the method of the present invention is compared with Standard CNN, Standard LSTM, GRU, and ResNet-1D. Evaluation metrics include Accuracy, Macro-F1, Jump F1, Bias F1, and Drift F1. Simulation test results are shown in Table 2.
[0290] Table 2 Performance comparison of baseline models in simulation datasets
[0291]
[0292] The results in Table 2 show that the method of the present invention achieves the best results on both Accuracy and Macro-F1, and outperforms all baseline models in Drift fault identification.
[0293] Step 5.3: Ablation Experiment of Simulated Dataset
[0294] Furthermore, to verify the contributions of each module, four ablation models were constructed: No Dual Stream, No Multi-Scale, No SEBlock, and No Transformer. The ablation experiment results are shown in Table 3.
[0295] Table 3. Results of DST-MSA Architecture Ablation Experiments
[0296]
[0297] The results in Table 3 show that the model performance degrades significantly after removing the differential stream or Transformer encoder, especially the Drift F1 score, indicating that the rate of change information and long-term temporal dependencies play a crucial role in drift fault identification.
[0298] Step 5.4: Verification of AUV sea trial noise data based on offline fault injection
[0299] Furthermore, real sea trial IMU noise data collected by a university's "Haiyi-2" AUV platform was used as the normal background sequence, and semi-synthetic test data was constructed through offline fault injection. The semi-synthetic test results of sea trial noise are shown in Table 4.
[0300] Table 4. Detailed classification report of DST-MSA on the semi-synthetic dataset of sea trial bottom noise.
[0301]
[0302] The results in Table 4 show that the method of the present invention achieves an accuracy of 91.83% and a macro-F1 of 88.56% on the semi-synthetic test set of sea trial background noise, indicating that the method still has good IMU soft fault diagnosis performance under the background of real carrier maneuvering, sensor background noise and underwater environmental disturbance.
[0303] To intuitively analyze the ability of the model of this invention to distinguish different IMU state features, high-dimensional features before the model's classification head are extracted, and the t-SNE method is used to map these high-dimensional features to a two-dimensional space. The visualization results are as follows: Figure 4 As shown.
[0304] Depend on Figure 4As can be seen, the four classes of samples—Normal, Jump, Bias, and Drift—exhibit differentiated clustering distributions in the dimensionality-reduced feature space. Jump and Bias samples show higher intra-class clustering and clearer distribution boundaries with other classes. Drift samples form relatively independent feature distributions, but some weak drift samples still partially overlap with Normal samples. This phenomenon is consistent with the relatively low recall rate of drift faults in Table 4, indicating that real-world vehicle maneuvers, low-frequency sensor noise, and underwater environmental disturbances may mask early weak drift features to some extent.
[0305] The visualization results above demonstrate that the method of the present invention can learn IMU soft fault characteristics with class distinction, and at the same time has a certain ability to characterize the rate of change information and long-term evolution trend of drift faults.
[0306] In summary, comparative experiments on simulation datasets show that the method of this invention outperforms the selected baseline model in terms of accuracy, macro-F1, and F1 scores for each fault category. Ablation experiments demonstrate that the original-differential two-stream structure, multi-scale one-dimensional convolution, SE channel attention, and Transformer temporal modeling module all positively contribute to diagnostic performance, with the differential data stream and Transformer encoder making particularly significant contributions to drift fault identification. Further validation results based on semi-synthetic data constructed from AUV sea trial background noise demonstrate that the method of this invention still possesses good IMU soft fault diagnosis capabilities even in the context of real carrier maneuvering, sensor background noise, and underwater environmental disturbances.
[0307] Therefore, by combining IMU raw amplitude information, first-order rate of change information, multi-scale local fault characteristics, channel correlation, and long-range time series dependence, this invention can identify normal state, jump fault, offset fault, and drift fault, and can provide advance state diagnostic information for abnormal measurement isolation, filter weight adjustment, and fault-tolerant control of AUV integrated navigation system.
[0308] Example 3
[0309] This invention provides an AUV IMU soft fault diagnosis system based on a dual-stream attention network, comprising:
[0310] The data acquisition and standardization module is used to acquire IMU timing measurement data, and sequentially perform fault injection and standardization processing to obtain standardized IMU timing measurement data.
[0311] The IMU diagnostic sample construction module is used to extract the standardized IMU time series measurement data based on the sliding window mechanism to obtain IMU diagnostic samples.
[0312] The dual-stream feature extraction module is used to input the IMU diagnostic sample into the raw data stream and the first-order difference data stream, and extract the raw amplitude features and the rate of change features respectively;
[0313] The dual-stream feature fusion and multi-scale local feature extraction module is used to fuse the original amplitude feature and the rate of change feature, input the multi-scale one-dimensional convolution module, and extract the multi-scale local fault features.
[0314] The channel attention enhancement module is used to input the multi-scale local fault features into the channel attention module for channel attention enhancement to obtain the enhanced features.
[0315] The Transformer temporal modeling module is used to perform Transformer temporal modeling on the enhanced features and output temporal features.
[0316] The feature pooling module is used to perform composite pooling on the temporal features and output the fault activation probability through the classification head;
[0317] The status determination and output module is used to determine the IMU status at the end of the current sliding window based on the fault activation probability and output the diagnostic results.
[0318] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention without departing from the principles and spirit of the present invention.
Claims
1. A soft fault diagnosis method for AUV IMU based on a dual-stream attention network, characterized in that, Includes the following steps: S1, acquire IMU timing measurement data, and sequentially complete fault injection and standardization processing to obtain standardized IMU timing measurement data; S2, Based on the sliding window mechanism, the standardized IMU time series measurement data is truncated to obtain IMU diagnostic samples; S3, input the IMU diagnostic sample into the raw data stream and the first-order difference data stream, and extract the raw amplitude features and rate of change features respectively; S4, fuse the original amplitude features and the rate of change features, input the input to the multi-scale one-dimensional convolution module, and extract the multi-scale local fault features; S5, input the multi-scale local fault features into the channel attention module for channel attention enhancement to obtain the enhanced features; S6, Perform Transformer temporal modeling on the enhanced features and output temporal features; S7, perform composite pooling on the time-series features, and output the fault activation probability through the classification head; S8, Based on the fault activation probability, determine the IMU state at the end of the current sliding window and output the diagnostic result; In step S5, when performing channel attention enhancement on the multi-scale local fault features, the following steps are executed: Based on the multi-scale local fault feature values of a single channel and a single time step, the descriptor of the channel is derived. The channel descriptors are concatenated into vectors, and channel attention weights are generated through a fully connected network. Apply channel attention weights to the corresponding feature channels to obtain features with enhanced channel attention. In S6, when performing Transformer temporal modeling on the channel attention-enhanced features, the features are first converted into a time series form and positional encoding is added. Then, the self-attention mechanism of the Transformer encoder is used to calculate the correlation between different time steps, and the temporal features containing long-range temporal dependency information are output.
2. The AUV IMU soft fault diagnosis method based on a dual-stream attention network according to claim 1, characterized in that, The IMU status includes normal, transition fault, bias fault, and drift fault.
3. The AUV IMU soft fault diagnosis method based on a dual-stream attention network according to claim 2, characterized in that, The standardized IMU sliding window containing IMU diagnostic samples is used as the input of the raw data stream, and the raw amplitude features are obtained through the raw data stream feature extraction function.
4. The AUV IMU soft fault diagnosis method based on a dual-stream attention network according to claim 3, characterized in that, A first-order difference sequence is constructed and input into a difference data stream. The rate of change feature is obtained by using a difference data stream feature extraction function.
5. The AUV IMU soft fault diagnosis method based on a dual-stream attention network according to claim 1, characterized in that, The multi-scale one-dimensional convolution module uses parallel multi-branch operations with different convolution kernels to splice the output to obtain multi-scale local fault features.
6. The AUV IMU soft fault diagnosis method based on a dual-stream attention network according to claim 1, characterized in that, The composite pooling performs global average pooling and global max pooling on the temporal features output by the Transformer encoder, and then concatenates the output features of the two to obtain the composite pooled features.
7. The AUV IMU soft fault diagnosis method based on a dual-stream attention network according to claim 1, characterized in that, The IMU status determination includes normal status determination and fault status determination: When the probability of fault activation is lower than the preset threshold, it is judged as a normal state; When the probability of activation of any fault is greater than or equal to a preset threshold, the corresponding fault category is determined based on the activated fault component. When multiple fault components are activated simultaneously, the final fault category is determined according to a preset priority order: drift fault > offset fault > jump fault.
8. A soft fault diagnosis system for AUV IMU based on a dual-stream attention network, characterized in that, include: The data acquisition and standardization module is used to acquire IMU timing measurement data, and sequentially perform fault injection and standardization processing to obtain standardized IMU timing measurement data. The IMU diagnostic sample construction module is used to extract the standardized IMU time series measurement data based on the sliding window mechanism to obtain IMU diagnostic samples. The dual-stream feature extraction module is used to input the IMU diagnostic sample into the raw data stream and the first-order difference data stream, and extract the raw amplitude features and the rate of change features respectively; The dual-stream feature fusion and multi-scale local feature extraction module is used to fuse the original amplitude feature and the rate of change feature, input the multi-scale one-dimensional convolution module, and extract the multi-scale local fault features. The channel attention enhancement module is used to input the multi-scale local fault features into the channel attention module for channel attention enhancement to obtain enhanced features; when performing channel attention enhancement on the multi-scale local fault features, the following steps are performed: Based on the multi-scale local fault feature values of a single channel and a single time step, the descriptor of the channel is derived. The channel descriptors are concatenated into vectors, and channel attention weights are generated through a fully connected network. Apply channel attention weights to the corresponding feature channels to obtain features with enhanced channel attention. The Transformer temporal modeling module is used to perform Transformer temporal modeling on the enhanced features and output temporal features. When performing Transformer temporal modeling on the channel attention-enhanced features, we first convert them into time series form and add position encoding. Then, we use the self-attention mechanism of the Transformer encoder to calculate the correlation between different time steps and output temporal features containing long-range temporal dependency information. The feature pooling module is used to perform composite pooling on the temporal features and output the fault activation probability through the classification head; The status determination and output module is used to determine the IMU status at the end of the current sliding window based on the fault activation probability and output the diagnostic results.
Citation Information
Patent Citations
Intelligent fault diagnosis method, system and equipment for steam turbine generator unit and storage medium
CN120492904A
Rolling bearing fault diagnosis method based on multi-scale residual attention network and adaptive Transform encoder
CN120654144A