A ship gear box fault detection method based on a multi-scale convolutional neural network and a bidirectional attention mechanism

By combining multi-scale convolutional neural networks and bidirectional attention mechanisms with stacked bidirectional LSTM, the problems of insufficient feature extraction and insufficient temporal modeling depth in ship gearbox fault diagnosis are solved, achieving high-precision fault detection and stable performance in strong noise environments.

CN122286557APending Publication Date: 2026-06-26COMPREHENSIVE TECH & ECONOMIC RES INST OF CHINA STATE SHIPBUILDING CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
COMPREHENSIVE TECH & ECONOMIC RES INST OF CHINA STATE SHIPBUILDING CORP
Filing Date
2026-03-18
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies for fault diagnosis of ship gearboxes suffer from problems such as insufficient feature extraction completeness, insufficient temporal modeling depth, lack of key feature focusing mechanism, and insufficient model generalization ability, especially with significant performance degradation in strong noise environments.

Method used

Multi-scale convolutional neural networks are used to adaptively extract multi-band features of vibration signals. A bidirectional attention mechanism is combined to enhance the focusing ability of key fault features. Stacked bidirectional LSTM is used to deeply mine temporal dependencies, thereby improving feature completeness and model generalization ability.

Benefits of technology

It achieves high-precision fault state identification in high-noise environments, improving the accuracy of fault detection and the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122286557A_ABST
    Figure CN122286557A_ABST
Patent Text Reader

Abstract

This invention, entitled "A Fault Detection Method for Ship Gearboxes Based on Multi-Scale Convolutional Neural Networks and Bidirectional Attention Mechanisms," belongs to the field of intelligent operation and maintenance technology for ship gearboxes. The technical problem it aims to solve is the insufficient assessment accuracy in complex maritime environments. The key technical solutions involve adaptively extracting multi-band features of vibration signals using multi-scale CNNs, enhancing the focusing ability of key fault features through attention mechanisms, and combining this with bidirectional LSTM for deep mining of temporal dependencies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent operation and maintenance technology for ship gearboxes, and in particular to a fault detection method for ship gearboxes based on multi-scale convolutional neural networks and bidirectional attention mechanisms. Background Technology

[0002] As a vital means of transportation, the reliability of a ship's propulsion system directly impacts navigation safety and operational efficiency. Gearboxes, as transmission components and power sources in large ships, are complex in design and require sophisticated manufacturing processes. They also bear enormous loads during operation, resulting in a generally high probability of failure. As a key component of marine electric propulsion systems, gearboxes typically operate in high-noise environments, making them among the most susceptible to failure. Gearboxes contain critical components such as gear pairs and rolling bearings, with gear failures (e.g., pitting, broken teeth, wear) being the most common source of malfunction. Gear failures generate specific modulated vibration signals, the characteristic frequencies of which are related to the number of teeth and rotational speed of the gear, making diagnosis highly complex.

[0003] To ensure the safe and stable operation of equipment, it is necessary to establish a reliable and efficient gearbox fault diagnosis technology that can cope with strong noise interference. Traditional ship fault diagnosis methods mainly rely on experienced engineers' subjective judgment through hearing, touch, and other means. This method is not only inefficient but also heavily dependent on personal experience, making it difficult to achieve accurate early warning of faults.

[0004] With technological advancements, current fault diagnosis methods primarily rely on signal processing techniques (such as Fourier transform and wavelet analysis) combined with machine learning classifiers. These methods require expert experience for feature engineering, and their diagnostic performance heavily depends on the quality of feature extraction. Early intelligent diagnostic methods mainly employed signal processing techniques combined with machine learning algorithms, such as Empirical Mode Decomposition (EMD) combined with Support Vector Machines (SVM). While these methods reduced reliance on human experience to some extent, they still required complex feature engineering and specialized signal processing knowledge.

[0005] In recent years, deep learning technology has demonstrated strong potential in the field of fault diagnosis, with various innovative methods proposed and applied to gearbox fault diagnosis. Among deep learning models, Bidirectional Long Short-Term Memory (BiLSTM) networks are an important temporal modeling tool. By combining forward and backward LSTM layers, it simultaneously captures past and future information from the time series, thus more comprehensively mining the bidirectional temporal characteristics of vibration signals. Compared to unidirectional LSTMs, BiLSTMs can better handle long-term dependencies, enhancing the model's ability to perceive dynamic changes in faults. Furthermore, multiple convolutional kernels (or multi-scale convolutional neural networks) adaptively extract multi-frequency features of vibration signals by using convolutional kernels of different sizes (such as large, medium, and small kernels) in parallel: large convolutional kernels focus on low-frequency macroscopic fault modes, medium convolutional kernels capture mid-frequency periodic impacts, and small convolutional kernels capture high-frequency weak fault signals. This multi-scale design improves the completeness of feature extraction and overcomes the limitation of insufficient coverage by a single convolutional kernel.

[0006] Relevant patent documents retrieved: This document, published in China (CN121005078A) on November 25, 2025, discloses a fault monitoring system and method for a ship's propulsion system. The fault diagnosis module employs a convolutional neural network-long short-term memory (CNN-LSTM-Attention) model based on an attention mechanism. The K-Nearest Neighbors (KNN) fusion diagnostic algorithm uses a CNN-LSTM-Attention model to extract spatial and temporal features from the feature data and strengthens fault-sensitive features through an attention mechanism. The specific strategy of the CNN-LSTM-Attention model is as follows: Input layer: receives the feature matrix; CNN layer: consists of 2-3 convolutional layers, each with a 3×3 kernel; Pooling layer: uses max pooling with a 2×2 kernel; LSTM layer: contains 1-2 LSTM units; the number of hidden layer nodes is in the range of 64-128; Attention layer: uses an additive attention mechanism to calculate the hidden state weights at each time step.

[0007] This document, published in China (CN119646590A) on March 18, 2025, discloses a method for identifying the type and location of transmission line faults based on CNN-LSTM. The method involves collecting frequency response curves as input datasets and assigning a category number to each fault, including the segment number on the transmission line and the fault type. A CNN-LSTM fault identification model is constructed by adding an LSTM network before the fully connected layers of the CNN network. The CNN-LSTM fault identification model is then trained using the input dataset to obtain a trained CNN-LSTM fault identification model. Finally, the trained CNN-LSTM fault identification model is used to identify the type and location of transmission line faults.

[0008] The prior art represented by the aforementioned documents has at least the following unresolved technical problems or defects: First, most methods need improvement in feature extraction completeness, especially in the insufficient coverage of full-frequency features of vibration signals. Second, the temporal modeling depth is insufficient, making it difficult to fully explore the bidirectional temporal characteristics of vibration signals. Third, there is a lack of a focusing mechanism for key features, resulting in a significant performance degradation in noisy environments. Finally, the model's generalization ability and computational efficiency need further optimization. These issues lead to insufficient assessment accuracy in complex maritime environments in existing technologies. Summary of the Invention

[0009] The purpose of this invention is to provide: This invention discloses a ship gearbox fault detection method and related technologies based on multi-scale convolutional neural networks and bidirectional attention mechanisms, aiming to address technical challenges such as improving feature completeness, mining bidirectional temporal characteristics of vibration signals, and maintaining performance without significant degradation in noisy environments, or combinations thereof. The invention adaptively extracts multi-band features from vibration signals using multi-scale CNNs, enhances the focusing ability of key fault features through an attention mechanism, and combines this with bidirectional LSTM for deep mining of temporal dependencies. This approach improves feature completeness, mines bidirectional temporal characteristics of vibration signals, and maintains performance without significant degradation in noisy environments, achieving high-precision fault state identification. Furthermore, by integrating multi-scale spatial features and temporal dependencies into the network, the generalization ability of the model can be significantly improved through the integration of information at different levels, achieving high-precision ship gearbox fault diagnosis.

[0010] Terminology Explanation: Unless otherwise defined, all technical terms in this document have the same meanings as commonly understood by one of ordinary skill in the art to which the subject matter of the claims pertains. Unless otherwise stated, all patents, patent inventions, and publications cited in this document are incorporated herein by reference in their entirety. If multiple definitions exist for terms in this document, the definitions in this chapter shall prevail.

[0011] It should be understood that the above brief description and the following detailed description are exemplary and for illustrative purposes only, and do not limit the subject matter of the invention in any way. In this invention, the singular is used in conjunction with the plural unless otherwise specifically stated. It should also be noted that, unless otherwise stated, the use of “or” or “or” means “and / or”. Furthermore, the use of the term “comprising” and other forms such as “including,” “containing,” and “contains” are not limiting.

[0012] Unless otherwise stated, conventional methods within the scope of the art shall be used, such as standardization, which may employ any existing standardization method and is not limited to the standardization methods listed in this invention.

[0013] The terms “optional / arbitrary / any” or “optionally / arbitrarily” mean that the event or situation described below may or may not occur, including both the occurrence and non-occurrence of the event or situation.

[0014] The term "CNN" used in this article refers to Convolutional Neural Network, a type of feedforward neural network widely used in image recognition and vision tasks, and one of the core models in deep learning. Through a hierarchical structure of convolutional layers, pooling layers, and fully connected layers, CNNs automatically extract local features from input data, progressively compressing information, reducing redundancy, and improving generalization ability. CNNs mimic the workings of biological visual systems, possessing the structural advantages of parameter sharing and local connectivity, enabling efficient processing of gridded data (such as images and speech) without relying on additional feature engineering. Compared to traditional fully connected networks, CNNs have fewer parameters and stronger expressive power when processing high-dimensional data, and can be used for both supervised and unsupervised learning. Their feature extraction exhibits translation invariance, hence the name "Shift-Invariant Neural Networks."

[0015] The term "attention mechanism" used in this article refers to the attention mechanism, which originates from research on human vision. In cognitive science, due to information processing bottlenecks, humans selectively focus on a portion of all information while ignoring other visible information. This mechanism is commonly referred to as the attention mechanism. Different parts of the human retina have varying degrees of information processing capacity, or acuity, with only the fovea possessing the highest acuity. To make efficient use of limited visual information processing resources, humans need to select specific parts of the visual area and then focus on them. For example, when reading, typically only a small number of words are focused on and processed. In summary, the attention mechanism mainly has two aspects: determining which part of the input needs attention; and allocating limited information processing resources to the important parts.

[0016] The term "convolutional branch" used in this article refers to a convolutional neural network, which is explained in the CNN section above.

[0017] The term "weighted fusion feature" used in this article refers to assigning different weights to each of multiple features, and then summing the results by multiplying each feature by its weight. This fusion feature is obtained through weighting, hence the name "weighted fusion feature".

[0018] The term "Bidirectional LSTM" used in this paper refers to Bidirectional Long Short-Term Memory (BiLSTM), an improved recurrent neural network (RNN) that significantly enhances its ability to model contextual dependencies by simultaneously processing both forward and backward information of a sequence. LSTM, or Long Short-Term Memory network, is a type of temporal recurrent neural network specifically designed to address the long-term dependency problem inherent in general RNNs. All RNNs have a chain-like structure of repeating neural network modules. In standard RNNs, this repeating structural module has only a very simple structure, such as a single tanh layer.

[0019] The term "Z-Score standardization" used in this article refers to the z-score, also called the standard score, which is the difference between a number and the mean, divided by the standard deviation. In statistics, the standard score is the sign of the standard deviation of an observed or measured value from the mean. The z-score answers the question: "How many standard deviations is a given score from the mean?" Scores above the mean receive a positive standard score, and scores below the mean receive a negative standard score. The z-score is a method to show the relative position of a score within a distribution. The formula is: In the formula, s is the standard deviation, and X is the original data. This is the average.

[0020] The term "maximum-minimum standardization" used in this paper refers to min-max standardization, which is a linear transformation of the original data. Let minA and maxA be the minimum and maximum values ​​of attribute A, respectively. Mapping an original value x of A to a value x' in the interval [0,1] using min-max standardization is given by the following formula: New data = (Original data - minimum value) / (maximum value - minimum value).

[0021] The term "downsampling" used in this article refers to downsampling, also known as reduced sampling, a multi-rate processing technique in the field of digital signal processing. It reduces the signal sampling rate to compress the data transmission rate or data volume, complementing interpolation techniques (the latter used to increase the sampling frequency). This technique requires the use of an anti-aliasing filter to avoid signal distortion caused by spectral aliasing. The downsampling factor M, as a core parameter, determines the sampling period extension factor. This process, through spectral compression, must ensure that the Nyquist sampling theorem is satisfied. Integer multiple downsampling requires anti-aliasing filtering before sampling points are extracted. The filter design can employ infinite impulse response or finite impulse response methods. In the implementation process, the impulse response is decomposed into M subsequences, and parallel convolution calculations are performed using a multiplexing architecture; this method is called a multi-bit filter.

[0022] The term "fully connected layer" used in this article refers to a layer where each node is connected to all nodes in the previous layer, used to synthesize the features extracted earlier. Due to its fully connected nature, fully connected layers generally have the most parameters. In a CNN structure, after multiple convolutional and pooling layers, one or more fully connected layers are connected. Similar to MLPs, each neuron in a fully connected layer is fully connected to all neurons in the previous layer. Fully connected layers can integrate local information with class discriminative power from convolutional or pooling layers. To improve the performance of CNN networks, the activation function of each neuron in a fully connected layer is generally the ReLU function. The output value of the last fully connected layer is passed to an output, which can be classified using softmax regression; this layer can also be called a softmax layer. For a specific classification task, choosing a suitable loss function is very important. CNNs have several commonly used loss functions, each with different characteristics. Generally, the fully connected layers of CNNs are similar to those of MLPs, and the training algorithm for CNNs often uses the backpropagation (BP) algorithm.

[0023] The term "softmax classifier" used in this paper refers to softmax logical regression, a generalization of logistic regression to multi-class classification problems. It is used to handle classification tasks with more than two class labels, such as MNIST handwritten digit recognition. This model outputs a normalized probability distribution through a hypothesis function. Its parameter matrix exhibits redundancy, which is typically addressed by adding weight decay terms to solve numerical computational issues. The cost function of this model is a generalization of the log-likelihood function, and parameter training is performed using optimization methods such as gradient descent. When the number of classes is two, softmax regression degenerates into standard logistic regression, indicating a theoretical continuity between the two. The choice between softmax regression and multiple binary classifiers depends on the mutual exclusivity of the classes. In mutually exclusive scenarios, the softmax model is preferred; in non-mutually exclusive scenarios, a combination of independent logistic classifiers is suitable.

[0024] The term "cross-entropy loss function" used in this paper refers to a loss function used for classification tasks. It optimizes the model by measuring the difference between the predicted probability distribution and the true probability distribution. It is widely used in multi-class and binary classification tasks, especially in deep learning when combined with the softmax function, and features numerical stability and good gradient optimization.

[0025] Mathematical definitions and formulas:

[0026] in: This represents the one-hot encoding of the true label, where only the correct category is 1 and the rest are 0.

[0027] This represents the class probability predicted by the model (usually the softmax output).

[0028] The loss calculation for a single sample simplifies to:

[0029] Where c represents the index of the true class, and the loss is minimized. This can make the predicted probability approach 1.

[0030] The term "Dropout mechanism" used in this article refers to an effective method for mitigating overfitting, which means that a model learns too well on the training data and cannot generalize to unseen data. To alleviate overfitting, researchers have proposed many regularization techniques, and Dropout is a very effective strategy. Dropout is a regularization technique that randomly disables a subset of neurons in a network. During training, each neuron has a certain probability of being randomly disabled (i.e., its output is set to zero), meaning that the network architecture changes in each iteration. The advantage of this is that the network does not become overly reliant on certain specific neurons, thereby improving the model's generalization ability.

[0031] In a first aspect, the present invention provides a method for detecting faults in ship gearboxes based on multi-scale convolutional neural networks and bidirectional attention mechanisms.

[0032] This includes the following steps: Step S1, Data Acquisition and Preprocessing: Collect the original operating data of the ship's gearbox under various working conditions, and preprocess the original operating data of the ship's gearbox. Step S2, Multi-scale feature extraction: Input the preprocessed running data into the multi-scale CNN module, extract features of different frequency ranges through three parallel convolution branches, and fuse the features of different frequency ranges into the multi-scale features; Step S3, Attention-weighted fusion: An attention mechanism is introduced to adaptively weight the multi-scale features, enhancing the representational ability of predefined key fault features, and obtaining attention-weighted fused features; Step S4, Bidirectional LSTM Temporal Classification: Temporal modeling is performed using a stacked bidirectional LSTM network to obtain a stacked bidirectional LSTM temporal model. The bidirectional dependency relationship of the running data is captured by inputting the attention-weighted fusion features into the stacked bidirectional LSTM temporal model, and the probability distribution of the fault type is output. Step S5, Model Training and Optimization: The stacked bidirectional LSTM time series model is trained and optimized using the sample dataset to obtain the trained stacked bidirectional LSTM time series model. Step S6: Using the trained stacked bidirectional LSTM time series model, input the real-time collected ship gearbox operating data to perform a ship gearbox fault detection method.

[0033] The above technical solution solves the problem of insufficient depth in time series modeling.

[0034] Based on further solutions to the technical problems of the present invention, or simultaneous solutions to multiple technical problems, the preferred solution in the technical solution provided in the first aspect of the present invention includes: The first preferred option: Step S1 specifically includes the following steps: S101, Establish a fault classification system based on gearbox fault types; S102, using the operational data of the ship gearbox collected in the experiment, construct a fault signal sample set of the ship gearbox according to the fault classification system; S103, the fault signal sample set is randomly divided into a training set and a test set; S104, downsample and standardize the running data in the training and test sets.

[0035] More preferably, the gearbox failure categories include the following: Normal state: The gears are running without faults; Tooth surface pitting: Microscopic spalling caused by tooth surface contact fatigue, initially manifested as periodic impacts; Gear tooth breakage: Part or all of the tooth breaks, generating a strong instantaneous impact signal; Tooth surface wear: Uniform or localized wear leads to changes in tooth profile, causing changes in vibration energy and the growth of sidebands; Tooth surface adhesion: tearing of metal welds on the tooth surface under high speed and heavy load, accompanied by broadband vibration.

[0036] More preferably, the standardization includes one of Z-Score standardization and maximum-minimum standardization.

[0037] Second preferred option: Step S2 includes: The running data, after downsampling and standardization preprocessing, is input into the multi-scale CNN module. The multi-scale CNN module employs three parallel convolutional branches: a large-scale branch, a medium-scale branch, and a small-scale branch, each extracting features from different frequency ranges. The general mathematical formula for convolution calculation for each branch is as follows:

[0038] in, This represents the feature map obtained after convolution, biasing, and activation function processing. It contains features of a specific pattern extracted from the original input and recognized by the convolution kernel of this branch. This is the weight matrix of the convolution kernel. Different subscripts "large / medium / small" correspond to the kernel weights of the three independent convolution branches: "large-scale branch", "medium-scale branch" and "small-scale branch". , is the input to the entire convolution operation; The bias term represents the parameters that need to be learned. It is a constant vector that is added to the result of multiplying the weight matrix. It is used to adjust the distribution of the output and enhance the model's fitting ability. The activation function is used to perform a non-linear transformation on the result of the convolution operation, enabling the neural network to learn complex patterns and features. Large-scale branching extracts low-frequency vibration features to capture macroscopically slow-developing fault modes. Mesoscale branching is used to extract mid-frequency vibration features and identify periodic impact signals generated by gear pitting and local defects. Small-scale branches capture high-frequency resonance components to detect gearbox housing resonance caused by early, weak faults; The kernel size of large-scale branches > the kernel size of medium-scale branches > the kernel size of small-scale branches; Each convolutional branch contains two convolutional operations, employing batch normalization and max pooling for feature optimization.

[0039] This technical solution not only addresses the technical problem of "insufficient depth of time-series modeling," but also further solves the problem of insufficient coverage of the full-frequency characteristics of vibration signals.

[0040] More preferably, the kernel size of the large-scale branch is 20, the kernel size of the medium-scale branch is 10, and the kernel size of the small-scale branch is 6.

[0041] The third preferred option: Step S3 includes: An attention mechanism is introduced, and the features at different scales are adaptively weighted using learnable weight parameters to enhance the representational ability of predefined key fault features, resulting in attention-weighted fusion features. The attention weight of any scale feature is calculated using the following method:

[0042]

[0043] in, These are the feature vectors at different scales for time step t. and These are trainable weight parameters. For trainable weight vectors, For each time step t, the input feature vector is a trainable weight matrix. Perform a linear transformation to map it to a new feature space that will be used to compute attention; The attention weights are normalized for the i-th feature scale branch; The attention energy score at time step t is a scalar value. This is a trainable bias vector; in time series analysis, the subscript t represents the time step. Attention-weighted fusion features for:

[0044] in, Obtained by normalization using the softmax function. For the first i The feature map extracted by each scale branch is the output of the convolutional neural network of that branch.

[0045] This technical solution not only addresses the technical problem of "insufficient depth of time series modeling," but also further solves the problem of lacking a focusing mechanism for key features, resulting in significant performance degradation in noisy environments.

[0046] Fourth preferred option: Step S4 includes: Considering the mutual influence between different moments in the vibration signal, a stacked bidirectional LSTM is used for time series modeling. The forward LSTM is as follows: ; in, Represents the activation function; : Input vector, representing the input data at the current time step t; The hidden state of the previous time step is the output of the LSTM unit at time step t-1, which contains historical information up to the previous time step. The cell state at the previous moment is the "memory unit" of the LSTM, which is responsible for the transmission of long-term information. , , , : These correspond to the input, forget, output gates, and candidate states, respectively, and are used to process the current input. ; , , , : These correspond to the input, forget, output gates, and candidate states, respectively, and are used to process the previous hidden state. ; : The forget gate determines how much of the cell's state from the previous moment is remembered. Factors that will be forgotten; The input gate is a factor that determines how much new information will be stored in the cell state. : The output gate determines how many current cell states there are. The information will be output to the hidden state. Factors; Candidate cell state: a potential new memory content generated from the current input; The updated cell state at the current moment combines the forgetting of old memories with the addition of new memories; The output of the LSTM unit at the current time step is also the hidden state passed to the next time step or the next layer; The backward LSTM computation is similar; the hidden states output by the forward LSTM and backward LSTM are then concatenated and merged. ; Input data refers to a batch of training data passed to the current BN layer; for The data obtained after standardization; for The mean; for The variance; The scaling factor is a learnable parameter that allows the model to determine the degree to which a new distribution requires different variances. The translation factor is a learnable parameter that allows the model to determine the degree to which a new distribution requires a different mean. The final output is the result of the BN layer and will be fed into the next layer of the neural network. The stacked bidirectional LSTM time series model consists of three BiLSTM layers, which contain 128, 64, and 32 hidden units, respectively. A fully connected layer and a softmax classifier output the probability distribution of fault types. The softmax value is calculated as follows:

[0047] in, z j For the input vector, The sum of the exponents of the scores for all categories. The softmax function outputs a vector of the same length as the input vector z, called the probability vector P. Any probability P... j The range of values ​​for P is between (0, 1). j The sum of them equals 1.

[0048] This technical solution not only addresses the technical problem of insufficient depth in time series modeling, but also further solves the problem of insufficient depth in time series modeling.

[0049] The fifth preferred solution: In step S5, a weighted cross-entropy loss function and Dropout mechanism are used to address the problems of fault type imbalance and overfitting. This technical solution, while addressing the technical problem of "insufficient depth of time series modeling," further solves the technical problems of "fault type imbalance and overfitting."

[0050] More preferably, a Dropout mechanism is added in step S5, where neurons are randomly dropped with probability during training, as shown in the formula:

[0051] in, The output of the original neuron is the activation value of a neuron at time step t. The dropout probability is a pre-defined hyperparameter, typically 0.2-0.5, representing the probability that each neuron will be temporarily "dropped" during training. When a neuron is dropped, its output is set to 0. The output of the original neuron after it has been discarded; In step S5, weighted cross-entropy loss is used to address the fault class imbalance problem. The loss function L is:

[0052] in, This represents the number of samples used in the current training batch. m is the sample index, ranging from 1 to N, which iterates through each sample in the batch; The input features of the m-th sample are the input data of the model. The true label of the m-th sample, the actual category to which the sample belongs; The model predicts that sample m belongs to the true label. The probability of; No. The weights of each fault category are key parameters for handling class imbalance and are calculated based on the distribution of the training set.

[0053] Fifth priority option: Gearbox operating data includes vibration signals.

[0054] Embodiment 1 of this invention supports the protection scope of the above-described technical solution.

[0055] The present invention has at least the following beneficial effects: Compared with existing technologies, the present invention has better technical performance in terms of fault detection accuracy.

[0056] Furthermore, based on the present invention: Based on Example 1, this invention inputs the preprocessed running data into a multi-scale CNN module to extract multi-scale features, introduces an attention mechanism and a stacked bidirectional LSTM network for temporal modeling, achieving new technical effects to improve fault detection accuracy. The combined technical effect is superior to the sum of the effects of each individual technique. Attached Figure Description

[0057] Figure 1 This is a flowchart of a ship gearbox fault detection method based on a multi-scale convolutional neural network and a bidirectional attention mechanism, according to an embodiment of the present invention. Figure 2 A simplified flowchart of a ship gearbox fault detection method based on a multi-scale convolutional neural network and a bidirectional attention mechanism, which is another embodiment of the present invention; Figure 3 This is a structural diagram of a gearbox gear fault detection model according to an embodiment of the present invention; Figure 4The figure shows the internal structure of a bidirectional LSTM (BiLSTM) according to an embodiment of the present invention. In the figure, (h1, h2, h3) represent the output features of different BiLSTM sub-modules; S is the intermediate result of the attention weight calculation, which is used for subsequent Softmax normalization; α is the attention weight output by Softmax; and q represents the query vector.

[0058] Figure 5 This is a test result diagram of one embodiment of the present invention. Detailed Implementation

[0059] The following non-limiting embodiments are intended to enable those skilled in the art to gain a more comprehensive understanding of the present invention, but do not limit the invention in any way. The following content is merely an exemplary description of the scope of protection claimed by the present invention, and those skilled in the art can make various changes and modifications to the present invention based on the disclosed content, and such changes should also fall within the scope of protection claimed by the present invention.

[0060] The present invention will be further described below by way of specific embodiments. Unless otherwise specified, all instruments, devices, equipment, reagents, products, etc., used in the embodiments of the present invention are obtained through conventional commercial means.

[0061] Example 1 like Figure 1-5 As shown, this invention provides a method for detecting ship gearbox faults based on multi-scale convolutional neural networks and bidirectional attention mechanisms.

[0062] This includes the following steps: Step S1, Data Acquisition and Preprocessing: Collect the original operating data of the ship's gearbox under various working conditions, and preprocess the original operating data of the ship's gearbox. Step S2, Multi-scale feature extraction: Input the preprocessed running data into the multi-scale CNN module, extract features of different frequency ranges through three parallel convolution branches, and fuse the features of different frequency ranges into the multi-scale features; Step S3, Attention-weighted fusion: An attention mechanism is introduced to adaptively weight the multi-scale features, enhancing the representational ability of predefined key fault features, and obtaining attention-weighted fused features; Step S4, Bidirectional LSTM Temporal Classification: Temporal modeling is performed using a stacked bidirectional LSTM network to obtain a stacked bidirectional LSTM temporal model. The bidirectional dependency relationship of the running data is captured by inputting the attention-weighted fusion features into the stacked bidirectional LSTM temporal model, and the probability distribution of the fault type is output. Step S5, Model Training and Optimization: The stacked bidirectional LSTM time series model is trained and optimized using the sample dataset to obtain the trained stacked bidirectional LSTM time series model. Step S6: Using the trained stacked bidirectional LSTM time series model, input the real-time collected ship gearbox operating data to perform a ship gearbox fault detection method.

[0063] More preferably, in this embodiment, step S1 specifically includes the following steps: S101, Establish a fault classification system based on gearbox fault types; S102, using the operational data of the ship gearbox collected in the experiment, construct a fault signal sample set of the ship gearbox according to the fault classification system; S103, the fault signal sample set is randomly divided into a training set and a test set; S104, downsample and standardize the running data in the training and test sets.

[0064] More preferably, in this embodiment, the gearbox failure categories include the following: Normal state: The gears are running without faults; Tooth surface pitting: Microscopic spalling caused by tooth surface contact fatigue, initially manifested as periodic impacts; Gear tooth breakage: Part or all of the tooth breaks, generating a strong instantaneous impact signal; Tooth surface wear: Uniform or localized wear leads to changes in tooth profile, causing changes in vibration energy and the growth of sidebands; Tooth surface adhesion: tearing of metal welds on the tooth surface under high speed and heavy load, accompanied by broadband vibration.

[0065] More preferably, the standardization includes one of Z-Score standardization and maximum-minimum standardization.

[0066] More preferably, in this embodiment, step S2 includes: The running data, after downsampling and standardization preprocessing, is input into the multi-scale CNN module. The multi-scale CNN module employs three parallel convolutional branches: a large-scale branch, a medium-scale branch, and a small-scale branch, each extracting features from different frequency ranges. The general mathematical formula for convolution calculation for each branch is as follows:

[0067] in, This represents the feature map obtained after convolution, biasing, and activation function processing. It contains features of a specific pattern extracted from the original input and recognized by the convolution kernel of this branch. This is the weight matrix of the convolution kernel. Different subscripts "large / medium / small" correspond to the kernel weights of the three independent convolution branches: "large-scale branch", "medium-scale branch" and "small-scale branch". , is the input to the entire convolution operation; The bias term represents the parameters that need to be learned. It is a constant vector that is added to the result of multiplying the weight matrix. It is used to adjust the distribution of the output and enhance the model's fitting ability. The activation function is used to perform a non-linear transformation on the result of the convolution operation, enabling the neural network to learn complex patterns and features. Large-scale branching extracts low-frequency vibration features to capture macroscopically slow-developing fault modes. Mesoscale branching is used to extract mid-frequency vibration features and identify periodic impact signals generated by gear pitting and local defects. Small-scale branches capture high-frequency resonance components to detect gearbox housing resonance caused by early, weak faults; The kernel size of large-scale branches > the kernel size of medium-scale branches > the kernel size of small-scale branches; Each convolutional branch contains two convolutional operations, employing batch normalization and max pooling for feature optimization.

[0068] More preferably, the kernel size of the large-scale branch is 20, the kernel size of the medium-scale branch is 10, and the kernel size of the small-scale branch is 6.

[0069] More preferably, in this embodiment, step S3 includes: An attention mechanism is introduced, and the features at different scales are adaptively weighted using learnable weight parameters to enhance the representational ability of predefined key fault features, resulting in attention-weighted fusion features. The attention weight of any scale feature is calculated using the following method:

[0070]

[0071] in, These are the feature vectors at different scales for time step t. and These are trainable weight parameters. For trainable weight vectors, For each time step t, the input feature vector is a trainable weight matrix. Performing a linear transformation, mapping it to a new feature space used for calculating attention, will transform the features at each time step... Mapped to a hidden representation, then through Compress it into a scalar fraction This score represents the global importance of the feature at that time step. It works sequentially, processing features at each time step in turn. The attention weights are normalized for the i-th feature scale branch; The attention energy score at time step t is a scalar value. This is a trainable bias vector; in time series analysis, the subscript t represents the time step. Attention-weighted fusion features for:

[0072] in, Obtained by normalization using the softmax function. For the first i The feature maps extracted by each scale branch are the output results of the convolutional neural network for that branch. For example, F1 represents the features extracted by the large-scale branch that contain macroscopic information, and F3 represents the features extracted by the small-scale branch that contain detailed information.

[0073] More preferably, in this embodiment, step S4 includes: Considering the mutual influence between different moments in the vibration signal, a stacked bidirectional LSTM is used for time series modeling. The forward LSTM is as follows: ; in, Represents the activation function; : Input vector, representing the input data at the current time step t; The hidden state of the previous time step is the output of the LSTM unit at time step t-1, which contains historical information up to the previous time step. The cell state at the previous moment is the "memory unit" of the LSTM, which is responsible for the transmission of long-term information. , , , : These correspond to the input, forget, output gates, and candidate states, respectively, and are used to process the current input. ; , , , : These correspond to the input, forget, output gates, and candidate states, respectively, and are used to process the previous hidden state. ; : The forget gate determines how much of the cell's state from the previous moment is remembered. Factors that will be forgotten; The input gate is a factor that determines how much new information will be stored in the cell state. : The output gate determines how many current cell states there are. The information will be output to the hidden state. Factors; Candidate cell state: a potential new memory content generated from the current input; The updated cell state at the current moment combines the forgetting of old memories with the addition of new memories; The output of the LSTM unit at the current time step is also the hidden state passed to the next time step or the next layer; The backward LSTM computation is similar; the hidden states output by the forward LSTM and backward LSTM are then concatenated and merged. ; Input data refers to a batch of training data passed to the current BN layer; for The data obtained after standardization; for The mean; for The variance; The scaling factor is a learnable parameter that allows the model to determine the degree to which a new distribution requires different variances. The translation factor is a learnable parameter that allows the model to determine the degree to which a new distribution requires a different mean. The final output is the result of the BN layer and will be fed into the next layer of the neural network. The stacked bidirectional LSTM time series model consists of three BiLSTM layers, which contain 128, 64, and 32 hidden units, respectively. A fully connected layer and a softmax classifier output the probability distribution of fault types. The softmax value is calculated as follows:

[0074] in, z j For the input vector, The sum of the exponents of the scores for all categories. The softmax function outputs a vector of the same length as the input vector z, called the probability vector P. Any probability P... j The range of values ​​for P is between (0, 1). j The sum equals 1. The subscript j here is only for distinguishing it from i and has no physical meaning.

[0075] More preferably, in this embodiment, in step S5, a weighted cross-entropy loss function and a Dropout mechanism are used to handle the fault category imbalance and overfitting problems.

[0076] More preferably, a Dropout mechanism is added in step S5 to address the overfitting problem. During training, neurons are randomly dropped with probability, as shown in the formula:

[0077] in, The output of the original neuron is the activation value of a neuron at time step t. The dropout probability is a pre-defined hyperparameter, typically 0.2-0.5, representing the probability that each neuron will be temporarily "dropped" during training. When dropped, the output is set to 0. The output of the original neuron after it has been discarded; In step S5, weighted cross-entropy loss is used to address the fault class imbalance problem. The loss function L is:

[0078] in, This represents the number of samples used in the current training batch. m is the sample index, ranging from 1 to N, which iterates through each sample in the batch; The input features of the m-th sample are the input data of the model. The true label of the m-th sample, the actual category to which the sample belongs; The model predicts that sample m belongs to the true label. The probability of; No. The weights of each fault category are key parameters for handling class imbalance and are calculated based on the distribution of the training set.

[0079] More preferably, in this embodiment, the gearbox operating data includes vibration signals.

[0080] Example 2 In this embodiment, unlike Embodiment 1, the training process of the stacked bidirectional LSTM time series model includes determining whether the model has converged based on a preset convergence condition. If it has not converged, the error is backpropagated to the stacked bidirectional LSTM time series model, the loss function is recalculated, and the model convergence is determined again. If the model has converged, the trained model and parameter optimization are saved. During fault diagnosis, after loading the trained model, forward propagation calculation is performed to evaluate the fault diagnosis results. The final test results obtained on the laboratory dataset are as follows: Figure 5 As shown, this method can improve accuracy compared to traditional detection methods.

[0081] Finally, it should be noted that the above content is only used to illustrate the technical solution of the present invention, and is not intended to limit the scope of protection of the present invention. Simple modifications or equivalent substitutions made by those skilled in the art to the technical solution of the present invention do not depart from the essence and scope of the technical solution of the present invention.

Claims

1. A method for detecting faults in ship gearboxes based on multi-scale convolutional neural networks and bidirectional attention mechanisms, characterized in that, Includes the following steps: Step S1, Data Acquisition and Preprocessing: Collect the original operating data of the ship's gearbox under various working conditions, and preprocess the original operating data of the ship's gearbox. Step S2, Multi-scale feature extraction: Input the preprocessed running data into the multi-scale CNN module, extract features of different frequency ranges through three parallel convolution branches, and fuse the features of different frequency ranges into the multi-scale features; Step S3, Attention-weighted fusion: An attention mechanism is introduced to adaptively weight the multi-scale features, enhancing the representational ability of predefined key fault features, and obtaining attention-weighted fused features; Step S4, Bidirectional LSTM Temporal Classification: Temporal modeling is performed using a stacked bidirectional LSTM network to obtain a stacked bidirectional LSTM temporal model. The bidirectional dependency relationship of the running data is captured by inputting the attention-weighted fusion features into the stacked bidirectional LSTM temporal model, and the probability distribution of the fault type is output. Step S5, Model Training and Optimization: The stacked bidirectional LSTM time series model is trained and optimized using the sample dataset to obtain the trained stacked bidirectional LSTM time series model. Step S6: Using the trained stacked bidirectional LSTM time series model, input the real-time collected ship gearbox operating data to perform a ship gearbox fault detection method.

2. The method for detecting faults in a ship gearbox according to claim 1, characterized in that, Step S1 specifically includes the following steps: S101, Establish a fault classification system based on gearbox fault types; S102, using the operational data of the ship gearbox collected in the experiment, construct a fault signal sample set of the ship gearbox according to the fault classification system; S103, the fault signal sample set is randomly divided into a training set and a test set; S104, downsample and standardize the running data in the training and test sets.

3. The method for detecting faults in a ship gearbox according to claim 2, characterized in that, Gearbox failure categories include the following: Normal state: The gears are running without faults; Tooth surface pitting: Microscopic spalling caused by tooth surface contact fatigue, initially manifested as periodic impacts; Gear tooth breakage: Part or all of the tooth breaks, generating a strong instantaneous impact signal; Tooth surface wear: Uniform or localized wear leads to changes in tooth profile, causing changes in vibration energy and the growth of sidebands; Tooth surface adhesion: tearing of metal welds on the tooth surface under high speed and heavy load, accompanied by broadband vibration.

4. The method for detecting faults in a ship gearbox according to claim 2, characterized in that, The standardization includes one of Z-Score standardization and maximum-minimum standardization.

5. The method for detecting faults in a ship gearbox according to claim 1, characterized in that, Step S2 specifically includes: The running data, after downsampling and standardization preprocessing, is input into the multi-scale CNN module. The multi-scale CNN module employs three parallel convolutional branches: a large-scale branch, a medium-scale branch, and a small-scale branch, which extract features from different frequency ranges. The general mathematical formula for convolution calculation for each branch is as follows: in, This represents the feature map obtained after convolution, biasing, and activation function processing. It contains features of a specific pattern extracted from the original input and recognized by the convolution kernel of this branch. This is the weight matrix of the convolution kernel. Different subscripts "large / medium / small" correspond to the kernel weights of the three independent convolution branches: "large-scale branch", "medium-scale branch" and "small-scale branch". This represents the preprocessed raw signal data, which is the input to the entire convolution operation; The bias term represents the parameters that need to be learned. It is a constant vector that is added to the result of multiplying the weight matrix. It is used to adjust the distribution of the output and enhance the model's fitting ability. The activation function is used to perform a non-linear transformation on the result of the convolution operation, enabling the neural network to learn complex patterns and features. Large-scale branching extracts low-frequency vibration features to capture macroscopically slow-developing fault modes. Mesoscale branching is used to extract mid-frequency vibration features and identify periodic impact signals generated by gear pitting and local defects. Small-scale branches capture high-frequency resonance components to detect gearbox housing resonance caused by early, weak faults; The kernel size of large-scale branches > the kernel size of medium-scale branches > the kernel size of small-scale branches; Each convolutional branch contains two convolutional operations, employing batch normalization and max pooling for feature optimization.

6. The method for detecting faults in a ship's gearbox according to claim 1, characterized in that, Step S3 specifically includes: An attention mechanism is introduced, and the features at different scales are adaptively weighted using learnable weight parameters to enhance the representational ability of predefined key fault features, resulting in attention-weighted fusion features. The attention weight of any scale feature is calculated using the following method: in, These are the feature vectors at different scales for time step t. and These are trainable weight parameters. For trainable weight vectors, For each time step t, the input feature vector is a trainable weight matrix. Perform a linear transformation to map it to a new feature space that will be used to compute attention; The attention weights are normalized for the i-th feature scale branch; The attention energy score at time step t is a scalar value. This is a trainable bias vector; in time series analysis, the subscript t represents the time step. Attention-weighted fusion features for: in, Obtained by normalization using the softmax function. For the first i The feature map extracted by each scale branch is the output of the convolutional neural network of that branch.

7. The method for detecting faults in a ship gearbox according to claim 1, characterized in that, Step S4 includes: Considering the mutual influence between different moments in the vibration signal, a stacked bidirectional LSTM is used for time series modeling. The forward LSTM is as follows: ; in, Represents the activation function; : Input vector, representing the input data at the current time step t; The hidden state of the previous time step is the output of the LSTM unit at time step t-1, which contains historical information up to the previous time step. The cell state at the previous moment is the "memory unit" of the LSTM, which is responsible for the transmission of long-term information. , , , : These correspond to the input, forget, output gates, and candidate states, respectively, and are used to process the current input. ; , , , : These correspond to the input, forget, output gates, and candidate states, respectively, and are used to process the previous hidden state. ; : The forget gate determines how much of the cell's state from the previous moment is remembered. Factors that will be forgotten; The input gate is a factor that determines how much new information will be stored in the cell state. : The output gate determines how many current cell states there are. The information will be output to the hidden state. Factors; Candidate cell state: a potential new memory content generated from the current input; The updated cell state at the current moment combines the forgetting of old memories with the addition of new memories; The output of the LSTM unit at the current time step is also the hidden state passed to the next time step or the next layer; The backward LSTM computation is similar; the hidden states output by the forward LSTM and backward LSTM are then concatenated and merged. ; Input data refers to a batch of training data passed to the current BN layer; for The data obtained after standardization; for The mean; for The variance; The scaling factor is a learnable parameter that allows the model to determine the degree to which a new distribution requires different variances. The translation factor is a learnable parameter that allows the model to determine the degree to which a new distribution requires a different mean. The final output is the result of the BN layer and will be fed into the next layer of the neural network. The stacked bidirectional LSTM time series model consists of three BiLSTM layers, which contain 128, 64, and 32 hidden units, respectively. A fully connected layer and a softmax classifier output the probability distribution of fault types. The softmax value is calculated as follows: in, z j For the input vector, It is the sum of the indices of the scores for all categories.

8. The method for detecting faults in a ship's gearbox according to claim 1, characterized in that, In step S5, a weighted cross-entropy loss function and a Dropout mechanism are used to address the problems of fault class imbalance and overfitting.

9. The method for detecting faults in a ship gearbox according to claim 8, characterized in that, In step S5, a Dropout mechanism is added to randomly drop neurons with probability during training, as shown in the formula: in, The output of the original neuron is the activation value of a neuron at time step t. The dropout probability is a pre-defined hyperparameter, typically 0.2-0.5, representing the probability that each neuron will be temporarily "dropped" during training. When a neuron is dropped, its output is set to 0. The output of the original neuron after it has been discarded; In step S5, weighted cross-entropy loss is used to address the fault class imbalance problem. The loss function L is: in, This represents the number of samples used in the current training batch. m is the sample index, ranging from 1 to N, which iterates through each sample in the batch; The input features of the m-th sample are the input data of the model. The true label of the m-th sample, the actual category to which the sample belongs; The model predicts that sample m belongs to the true label. The probability of; No. The weights of each fault category are key parameters for handling class imbalance and are calculated based on the distribution of the training set.

10. The method for detecting faults in a ship's gearbox according to claim 1, characterized in that, Gearbox operating data includes vibration signals.

Citation Information

Patent Citations

  • CNN-LSTM-based power transmission line fault type and position identification method

    CN119646590A

  • Fault monitoring system and method for ship power system

    CN121005078A