A Real-Time Fault Diagnosis Method Based on Adaptive Bi-LSTM

By combining an adaptive Bi-LSTM neural network with an elastic network to optimize Lasso regression and a sparse attention mechanism, the problems of feature redundancy and modal mixing in gearbox fault diagnosis are solved, and efficient and accurate fault identification is achieved.

CN120744467BActive Publication Date: 2025-10-31NANCHANG INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511245511.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-02
Publication Date
2025-10-31
Estimated Expiration
2045-09-02

AI Technical Summary

Technical Problem

Existing gearbox fault diagnosis methods struggle to achieve robust feature extraction under complex coupling conditions, exhibiting feature redundancy and mode aliasing issues, resulting in insufficient diagnostic accuracy.

Method used

A real-time fault diagnosis method based on adaptive Bi-LSTM is adopted, which combines elastic network optimization of Lasso regression and sparse attention mechanism to perform feature dimensionality reduction and fault diagnosis, including time domain and frequency domain feature extraction, and uses adaptive Bi-LSTM neural network for fault identification.

Benefits of technology

It effectively reduces feature dimensionality, minimizes redundant interference, improves the accuracy and real-time performance of fault diagnosis, significantly enhances the efficiency and accuracy of feature selection, and enables accurate identification of complex gearbox faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744467B_ABST
    Figure CN120744467B_ABST
Patent Text Reader

Abstract

This invention describes a real-time fault diagnosis method based on adaptive Bi-LSTM. The steps include: S1, acquiring raw fault signals of a gearbox including multiple fault types, with a certain sample size for each fault type to form a dataset; extracting key features of the raw fault signals and constructing feature vectors; S2, performing feature dimensionality reduction on the feature vectors using Lasso regression optimized with an elastic network; S3, constructing an adaptive Bi-LSTM neural network based on a sparse attention mechanism to perform fault diagnosis on the feature vectors after dimensionality reduction. The method described in this invention extracts fault features from both the time and frequency domains, fully exploring the essential information of the fault signals. The Lasso method based on an elastic network effectively reduces the dimensionality of high-dimensional features and minimizes redundant feature interference. The adaptive Bi-LSTM neural network performs fault diagnosis on the selected features, achieving accurate and real-time identification of complex gearbox faults.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of gearbox fault diagnosis technology, specifically relating to a real-time fault diagnosis method based on adaptive Bi-LSTM. Background Technology

[0002] Based on the objective operating environment, gearboxes operate under harsh conditions of changing loads, high loads, and high intensity for a long time. Moreover, for economic reasons, gearbox components are usually not replaced immediately in the early stages of failure. This leads to gearbox failures generally manifesting as non-periodic complex failures, and the collected fault signals also have strong noise interference and complex coupling effects, making it difficult to make accurate diagnoses of gearbox failures.

[0003] The gearbox fault diagnosis process can be divided into three stages: vibration data acquisition, fault feature mining, and fault classification. Among these, the accuracy of feature extraction directly determines the reliability of the diagnostic system. Currently, commonly used gearbox fault diagnosis methods have their own shortcomings or deficiencies in gearbox fault feature extraction. For example, traditional algorithms are prone to mode aliasing when processing complex signals; deep learning methods require a large amount of labeled data, resulting in poor model interpretability; and excessively high feature dimensions lead to redundancy in the feature set, negatively impacting diagnostic accuracy.

[0004] The feature selection algorithms currently used also have shortcomings. For example, the wrapper feature selection algorithm has obvious algorithm dependency defects, and its detection performance improvement depends on a specific target algorithm and classifier model; the filter feature selection algorithm independently completes feature selection before model training, but its classification performance is limited; while the embedded feature selection algorithm guides feature selection in reverse through the loss function of the target algorithm, forming end-to-end optimization, but it is unstable in handling highly correlated features and has limited feature selection ability under ultra-high dimensional data. Summary of the Invention

[0005] This invention aims to address the problems existing in the prior art to a certain extent. In order to achieve robust feature extraction under complex coupling conditions and effectively overcome the adverse effects of feature redundancy and mode mixing on the accuracy of fault diagnosis, this invention describes a real-time fault diagnosis method based on adaptive Bi-LSTM. The specific technical solution is as follows.

[0006] A real-time fault diagnosis method based on adaptive Bi-LSTM includes the following steps:

[0007] S1, collect raw fault signals of the gearbox including multiple fault types, set a certain sample size for each fault type, and form a raw fault signal dataset.

[0008] The time-domain and frequency-domain features of the original fault signal are extracted as key features, and feature vectors of the key features are constructed.

[0009] S2, optimize Lasso regression based on elastic network, and use the optimized Lasso regression to perform feature dimensionality reduction on the feature vector constructed in step S1;

[0010] S3. Construct an adaptive Bi-LSTM neural network based on an improved sparse attention mechanism to perform fault diagnosis on the feature vector after feature dimensionality reduction.

[0011] Furthermore, the objective function of Lasso regression consists of a loss function and an L1 regularization term, expressed as:

[0012]

[0013] In the formula, β is the regression coefficient; n is the number of samples in the dataset; a is the sample index; y a β0 is the target variable for a single sample; p is the number of features in the dataset; b is the feature index; β b The characteristic coefficient; x ab λ is the feature variable; λ is the regularization enhancement parameter.

[0014] In step S2, the objective function of the elastic network introduces an L2 regularization term based on Lasso regression. The objective function expression of Lasso regression optimized based on the elastic network is as follows:

[0015]

[0016] In the formula, X is the feature matrix; y is the target variable of the entire dataset; β is the regression coefficient; λ is the regularization enhancement parameter; α is the weight ratio of L1 regularization and L2 regularization. When α = 1, the elastic network degenerates into Lasso regression; when α = 0, the elastic network degenerates into ridge regression.

[0017] Furthermore, the feature matrix X is normalized using a standardization formula, so that the variance of each key feature is 1 and the mean is 0. The standardization formula is:

[0018]

[0019] In the formula, x ab μ is the original value of the b-th feature of the a-th sample; b σ is the mean of the b-th feature; b Let be the standard deviation of the b-th feature.

[0020] Furthermore, the original fault signal dataset is divided into a training set and a test set. The optimized Lasso regression is trained using the training set, and the optimized Lasso regression is tested using the test set.

[0021] Furthermore, the optimal solution for the weight ratio α is found in the range [0,1] using a grid search algorithm, and the optimal solution for the regularization reinforcement parameter λ is selected using K-fold cross-validation.

[0022] Furthermore, using the optimal solutions α and λ, the regression coefficient β is solved using the following expression, and the characteristic coefficient β is selected. b Features ≠ 0 are considered important features:

[0023]

[0024] In the formula, y is the optimal estimation vector for the regression coefficients; β is the regression coefficient; n is the number of samples in the dataset; y is the target variable for the entire dataset; X is the feature matrix; λ is the regularization enhancement parameter; α is the weight ratio of L1 regularization and L2 regularization.

[0025] Furthermore, in step S3, constructing the adaptive Bi-LSTM neural network based on the sparse attention mechanism includes the following specific steps:

[0026] S301 combines a sparse attention mechanism and a Bi-LSTM neural network, with input data entering the sparse attention module;

[0027] Given an input sequence G = [x1, x2, ..., x...] t ]∈R t×d In the formula, x is the feature vector in the sequence, t is the sequence length, and d is the feature dimension. The input sequence G is transformed by the following three linear transformations to obtain the query, key, and value matrices, respectively:

[0028] Q = XW Q K = XW K V = XW V

[0029] In the formula, Q represents the query, K represents the key, and V represents the value; These are the weight matrices for the query, key, and value, respectively; D Q D K and D V Let X be the query, key, and value dimensions, respectively; let d be the feature matrix; let R be the feature dimension; and let R be the set of real numbers. The sparse attention module extracts key features from the input sequence by calculating the query, key, and value.

[0030] S302, divide the input sequence G into local regions of size l using the following formula, and calculate the dot product between the query and the key in each local region:

[0031]

[0032] In the formula, Q local and K local These are the query matrix and key matrix within the local region, respectively; A local Here, represents the attention weight matrix within the local region; softmax is the normalization function.

[0033] S303, Set up sparse connections to transmit global information between local regions. The attention weights of the sparse connections are calculated using the following formula:

[0034]

[0035] In the formula, Q sparse and K sparse These are the query matrix and key matrix of the sparse join, respectively; A sparse Here, represents the attention weight matrix for sparse connections; softmax is the normalization function.

[0036] S304, the output of the sparse attention module is calculated using the following formula:

[0037] SSA(X)=A local V local +A sparse V sparse

[0038] In the formula, A local A is the attention weight matrix within a local region; sparse V is the attention weight matrix for sparse connections; local and V sparse These are the value matrices for the local region and the sparse connection, respectively.

[0039] Furthermore, the adaptive Bi-LSTM neural network is configured through the following steps:

[0040] Ⅰ. The key features are used as input to the adaptive Bi-LSTM neural network, with 8 nodes in the input layer; each fault type is used as output to the adaptive Bi-LSTM neural network, with 5 nodes in the output layer.

[0041] II. Set the number of hidden layers of the adaptive Bi-LSTM neural network to 6, where the first layer is an SSA layer, the second, third and fourth layers are LSTM layers, the fifth layer is a Dropout layer, and the sixth layer is a fully connected layer;

[0042] III. Set the initial learning rate of the adaptive Bi-LSTM neural network to 0.01, the batch size to 400, and the number of iterations to 500. Adjust the neural network weights iteratively through the loss function to complete the training of the adaptive Bi-LSTM neural network.

[0043] Furthermore, the gearbox fault types include normal gearbox condition, bearing outer ring fault, bearing inner ring fault, rolling element fault, and gear fault; 200 samples are collected for each fault type to form an original fault signal dataset with a capacity of 1000 samples. 80% of the dataset is used as the training set and 20% of the dataset is used as the test set.

[0044] Furthermore, the time-domain features include mean, root mean square value, variance, absolute mean, peak value, peak-to-peak value, peak factor, kurtosis factor, skewness factor, waveform factor, impulse factor, and margin factor; the frequency-domain features include centroid frequency, average frequency, mean square frequency, root mean square frequency, frequency variance, and frequency standard deviation.

[0045] Based on the above technical solution, the fault diagnosis method described in this invention has the following beneficial effects:

[0046] 1. The method described in this invention extracts fault features from both the time and frequency domains, which can fully uncover the essential information of the fault signal.

[0047] 2. The method described in this invention is based on the Lasso method improved by elastic networks. It reduces the dimensionality of high-dimensional features and selects the feature subset with the strongest correlation with faults, which can effectively reduce the data dimensionality and reduce the interference of redundant features.

[0048] 3. The method described in this invention is based on an adaptive Bi-LSTM neural network to perform fault diagnosis on the selected features, thereby achieving accurate and real-time identification of complex faults in the gearbox.

[0049] 4. The advantages of the diagnostic method described in this invention will be further illustrated by the experimental results below:

[0050] ① The improved Lasso method of elastic networks can select the most informative features, significantly improving the efficiency and accuracy of feature selection;

[0051] ② The adaptive Bi-LSTM neural network, through its powerful time series modeling capability, fully captures the complex relationships between fault features, further improving the accuracy and real-time performance of fault diagnosis.

[0052] ③ While maintaining consistency in key parameters such as learning rate, batch size, and activation function, comparative experiments were conducted on BP neural networks, RBF neural networks, Bi-LSTM neural networks, and adaptive Bi-LSTM neural networks. The accuracy of the four neural networks during training is shown below. Figure 7 As shown, the loss rate is as follows Figure 8 As shown, through Figure 7 and Figure 8 It can be seen that, compared with BP neural networks, RBF neural networks and Bi-LSTM neural networks, adaptive Bi-LSTM neural networks have significant advantages in terms of accuracy and real-time performance.

[0053] ④ Solve the confusion matrix of 200 test samples using BP neural network, RBF neural network, Bi-LSTM neural network, and adaptive Bi-LSTM neural network. Label the normal state, bearing inner ring fault, outer ring fault, rolling element fault, and gear fault as 1, 2, 3, 4, and 5, respectively. The corresponding results are as follows: Figures 9 to 12 As shown. (Through) Figures 9 to 12 It can be seen that, compared with BP neural networks, RBF neural networks and Bi-LSTM neural networks, adaptive Bi-LSTM neural networks show significant robustness advantages.

[0054] ⑤ A continuous streaming test scheme is adopted, with a sampling rate of 5000Hz, i.e., one test sample is generated every 4 seconds. Data is continuously input for 10 minutes, totaling 150 samples. The model's computation time for each sample must be less than 4 seconds to ensure real-time performance. The time consumption comparisons of BP neural networks, RBF neural networks, Bi-LSTM neural networks, and adaptive Bi-LSTM neural networks are shown below. Figure 13 As shown. (Through) Figure 13 It can be seen that the adaptive Bi-LSTM neural network model demonstrates significant real-time advantages. Attached Figure Description

[0055] Figure 1 This is a schematic diagram illustrating the steps of the method described in this invention;

[0056] Figure 2 A schematic diagram illustrating the results of feature selection for Lasso regression;

[0057] Figure 3 This is a schematic diagram of the Lasso regression feature selection results after optimization based on the elastic network.

[0058] Figure 4 This is a schematic diagram of the Bi-LSTM neural network structure;

[0059] Figure 5 This is a schematic diagram illustrating the accuracy of a fault diagnosis model based on an adaptive Bi-LSTM neural network.

[0060] Figure 6 This is a schematic diagram illustrating the loss rate of a fault diagnosis model based on an adaptive Bi-LSTM neural network.

[0061] Figure 7 This is a schematic diagram showing the accuracy comparison curves of BP neural network, RBF neural network, Bi-LSTM neural network and adaptive Bi-LSTM neural network.

[0062] Figure 8 This is a schematic diagram showing the comparison of loss rates for BP neural networks, RBF neural networks, Bi-LSTM neural networks, and adaptive Bi-LSTM neural networks.

[0063] Figure 9 This is a schematic diagram of the confusion matrix of a BP neural network;

[0064] Figure 10 This is a schematic diagram of the confusion matrix of an RBF neural network.

[0065] Figure 11 This is a schematic diagram of the confusion matrix of a Bi-LSTM neural network.

[0066] Figure 12 A schematic diagram comparing the confusion matrices of an adaptive Bi-LSTM neural network;

[0067] Figure 13 This diagram illustrates a comparison of the computation time of BP neural networks, RBF neural networks, Bi-LSTM neural networks, and adaptive Bi-LSTM neural networks. Detailed Implementation

[0068] This specification and the claims use certain terms to refer to specific components. Those skilled in the art will understand that different terms may be used to refer to the same component. This specification and the claims do not distinguish components based on differences in terminology, but rather on differences in function. Unless otherwise defined, the technical or scientific terms used in this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains.

[0069] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0070] In all examples shown and discussed herein, any specific value should be interpreted as merely exemplary and not as a limitation; therefore, other examples of exemplary embodiments may have different values.

[0071] Time-domain features are extracted directly from the time series of a signal to reflect its characteristics as it changes over time. Typical indicators include mean, root mean square (RMS), variance, absolute mean, peak value, peak-to-peak value, peak factor, kurtosis factor, skewness factor, waveform factor, impulse factor, and margin factor. Converting the time-domain signal to the frequency domain using Fourier transform allows for the extraction of frequency distribution-related features while preserving the signal's frequency components to the maximum extent possible. Unlike time-domain features, frequency-domain features reflect the signal's distribution characteristics along the frequency dimension, revealing hidden periodicity, harmonics, modulation, and other information within the signal. Common frequency-domain feature parameters include centroid frequency, average frequency, mean square frequency, root mean square frequency, frequency variance, and frequency standard deviation.

[0072] Grid search algorithm: This is a search algorithm used for hyperparameter optimization. It searches for the optimal combination of hyperparameters by exhaustively trying specified parameter values. In machine learning and deep learning, model hyperparameters, such as learning rate, regularization strength, and hidden layer size, have a significant impact on model performance, and grid search algorithm is a commonly used method to find the optimal combination of hyperparameters.

[0073] K-fold cross-validation: Cross-validation is mainly used in modeling applications, such as PCR and PLS regression modeling. Given a modeling sample, most samples are used to build the model, while a small subset is used to predict the model. The prediction error of this smaller subset is calculated, and the sum of their squares is recorded. In K-fold cross-validation, the initial sample is divided into K subsamples. One subsample is retained as validation data, and the other K-1 samples are used for training. Cross-validation is repeated K times, validating each subsample once. The results from the K cross-validations, or other combination methods, are averaged to obtain a single estimate.

[0074] Gearbox fault simulation test benches are a type of comprehensive power transmission fault diagnosis test bench. These benches are primarily used to simulate various faults in the transmission systems of mechanical equipment. They include modules for gearboxes, bearing systems, load devices, and data acquisition systems. They support simulation of eight types of faults, such as tooth surface wear, cracks, and pitting in spur / helical gears, and can also reproduce faults in the inner and outer rings / rolling elements of rolling bearings. Gearbox fault simulation test benches focus more on gear system fault research, typically including modules for two-stage parallel shaft gearboxes and planetary gearboxes. They can simulate gear faults such as cracks, broken teeth, and wear, and test vibration characteristics under different operating conditions. They also support bearing fault simulation and load adjustment functions.

[0075] Elastic Networks: A linear regression model that combines L1 and L2 regularization. By introducing mixed parameters to balance the two regularization methods, it aims to address the model instability caused by feature multicollinearity in high-dimensional data, while simultaneously optimizing feature selection and model stability.

[0076] Bidirectional Long Short-Term Memory (Bi-LSTM) neural networks, through a bidirectional time-series information processing mechanism, simultaneously process time-series data from both forward and backward directions, enabling them to comprehensively learn the characteristics before and after a fault, thereby improving the accuracy and robustness of diagnosis.

[0077] Sparse attention mechanism, or SSA for short, introduces sparsity constraints and only calculates attention weights between some locations, thereby significantly reducing computational complexity while maintaining the advantages of attention mechanisms.

[0078] like Figures 1 to 13 As shown, this embodiment describes a real-time fault diagnosis method based on adaptive Bi-LSTM. Figure 1 The steps are illustrated in the diagram.

[0079] S1. The original fault signals of the gearbox are collected through the gearbox fault simulation test bench. The original fault signals include at least five types of faults: normal state of the gearbox, bearing outer ring fault, bearing inner ring fault, rolling element fault, and gear fault.

[0080] For each fault type, 200 samples are collected to form an original fault signal dataset with a capacity of 1000 samples. 80% of the dataset is used as the training set, that is, the training set in this embodiment includes 800 samples of original fault signal data; 20% of the dataset is used as the test set, that is, the test set in this embodiment includes 200 samples of original fault signal data.

[0081] From the two dimensions of time domain and frequency domain, the time domain features and frequency domain features that can reflect the gearbox fault in the original fault signal are extracted as key features of gearbox fault, and feature vectors of key features of gearbox fault are constructed.

[0082] The method for constructing feature vectors of key features of gearbox faults can be summarized as follows: feature extraction from both time and frequency domains; feature merging and vectorization, which combines the extracted time-domain and frequency-domain features in a fixed order; and standardization, which normalizes the feature matrix to eliminate the influence of differences in the dimensions of different features.

[0083] For ease of description, this embodiment will refer to the "original fault signal dataset" as "dataset", the "key features of gearbox faults" as "key features", and the "feature vector of key features of gearbox faults" as "feature vector".

[0084] In this step:

[0085] Time-domain features include, but are not limited to, mean, root mean square, variance, absolute mean, peak value, peak-to-peak value, peak factor, kurtosis factor, skewness factor, waveform factor, impulse factor, and margin factor.

[0086] Frequency domain characteristics include, but are not limited to, centroid frequency, average frequency, mean square frequency, root mean square frequency, frequency variance, and frequency standard deviation.

[0087] S2. Since excessively high dimensionality of the feature vector will increase redundant information and generate unnecessary computation, resulting in a decrease in the accuracy of fault diagnosis based on deep learning, it is necessary to perform feature dimensionality reduction on the feature vector constructed in step S1.

[0088] To achieve better feature dimensionality reduction results, this embodiment uses Lasso regression to reduce the feature vector, and verifies the applicability of Lasso regression in feature dimensionality reduction through the following steps.

[0089] S201, Experiments are conducted on the key features extracted in step S1, and corresponding fault feature numbers are assigned, specifically as follows:

[0090] Key features include 12 time-domain features, namely mean, root mean square value, variance, absolute mean, peak value, peak-to-peak value, peak factor, kurtosis factor, skewness factor, waveform factor, impulse factor, and margin factor, which are assigned the corresponding fault feature numbers 1-12.

[0091] Key features also include 6-dimensional frequency domain features, namely centroid frequency, average frequency, mean square frequency, root mean square frequency, frequency variance, and frequency standard deviation, which are assigned the corresponding fault feature numbers 13-18.

[0092] See the table below for a summary:

[0093]

[0094] S202, the objective function of Lasso regression consists of a loss function and an L1 regularization term, expressed as:

[0095]

[0096] In the formula, β is the regression coefficient; n is the number of samples in the dataset; a is the sample index; y a β0 is the target variable for a single sample; p is the number of features in the dataset; b is the feature index; β b The characteristic coefficient; x ab λ is the feature variable; λ is the regularization enhancement parameter.

[0097] Using the key features recorded in step S201 as input, Lasso regression is used to filter them respectively, and the feature coefficients of each dimension are obtained as follows: Figure 2 As shown.

[0098] right Figure 2 Analysis shows that although the characteristic coefficients β of features 3, 12, 13, 16, and 18 are... b Although compressed to 0, some features remain redundant, and irrelevant features were not completely removed. This indicates that Lasso regression has some feature selection ability, but it performs poorly in feature selection, failing to effectively distinguish key features. Some redundant features are retained, resulting in a still high feature dimension in the feature vector. Therefore, Lasso regression needs to be optimized.

[0099] S3. Optimize the Lasso regression recorded in step S2 based on the elastic network, and use the optimized Lasso regression to perform feature dimensionality reduction on the feature vector constructed in step S1.

[0100] The specific steps for optimizing Lasso regression are as follows:

[0101] S301, the objective function of the elastic network introduces an L2 regularization term based on Lasso regression. L1 regularization makes some feature coefficients β... b The L2 regularization sets the feature coefficient β to 0, enabling automatic feature selection; L2 regularization adjusts the feature coefficient β... b The square of the value is used as a penalty to reduce the impact of highly correlated features.

[0102] The objective function expression for Lasso regression optimized based on elastic networks is:

[0103]

[0104] In the formula,

[0105] X is the feature matrix, which is an r×s two-dimensional matrix, where the row dimension r is the total number of samples in the dataset, and the column dimension s is the feature dimension of each sample.

[0106] y is the target variable for the entire dataset; β is the regression coefficient; λ is the regularization enhancement parameter;

[0107] α represents the weight ratio of L1 regularization and L2 regularization. When α = 1, the elastic network degenerates into Lasso regression; when α = 0, the elastic network degenerates into ridge regression.

[0108] S302, normalize the feature matrix X from step S301 using a standardization formula so that the variance of each key feature is 1 and the mean is 0.

[0109] The standardized formula is:

[0110]

[0111] In the formula, x ab μ is the original value of the b-th feature of the a-th sample; b σ is the mean of the b-th feature; b Let be the standard deviation of the b-th feature.

[0112] S303, use the training set from step S1 to train the optimized Lasso regression model, and test it using the test set. In short: standardize the feature vectors in both the training and test sets to eliminate dimensional differences and accelerate model convergence; initialize the parameters of the optimized Lasso regression model; and calculate the model's loss value on the training set.

[0113] S304 uses a grid search algorithm to find the optimal solution for the weight ratio α in the range [0,1], and selects the optimal solution for the regularization strengthening parameter λ through K-fold cross-validation.

[0114] In short: Generate a sequence of candidate α values ​​in the range [0,1]. For each candidate α, perform K-fold cross-validation with different λ values. Calculate the evaluation index of each (α, λ) group on the validation set. Select the (α, λ) combination that optimizes the evaluation index as the optimal solution.

[0115] "Optimal solution" refers to the best candidate value under the current search space and evaluation metrics, not the global optimal solution in a mathematical sense. It can also be described as "best candidate value" or "optimal combination of hyperparameters".

[0116] S305, Based on the optimal solutions α and λ obtained in step S304, solve for the regression coefficient β using the following expression, and select the characteristic coefficient β. b Features ≠ 0 are considered important features:

[0117]

[0118] In the formula, y is the optimal estimation vector for the regression coefficients; β is the regression coefficient; n is the number of samples in the dataset; y is the target variable for the entire dataset; X is the feature matrix; λ is the regularization enhancement parameter; α is the weight ratio of L1 regularization and L2 regularization.

[0119] Based on the Lasso regression optimized in steps S301-S305 above, feature dimensionality reduction is performed on the feature vector constructed in step S1, and the result is as follows. Figure 3 As shown.

[0120] analyze Figure 3It can be seen that the elastic network solves the problem of Lasso regression's difficulty in selecting highly correlated features by optimizing the weight ratio α of L1 regularization and L2 regularization. The feature coefficients β of features 4, 1, 15, 7, 10, 11, 17, and 9 are shown. b The absolute values ​​are all greater than 0, while the characteristic coefficients β of other features are... b They were all compressed to zero, demonstrating a clear selection result.

[0121] Compared with the original Lasso regression, the improved Lasso regression algorithm based on elastic networks not only effectively reduces the feature dimensionality, but also improves the stability and accuracy of feature selection, reduces feature redundancy, and lays the foundation for subsequent fault diagnosis.

[0122] S4. An adaptive Bi-LSTM neural network based on a sparse attention mechanism is constructed to perform fault diagnosis on the feature vector after feature dimensionality reduction, thereby achieving efficient and accurate identification of gearbox fault types.

[0123] The construction of an adaptive Bi-LSTM neural network based on an improved sparse attention mechanism includes the following specific steps:

[0124] The S401 Bi-LSTM neural network trains a forward LSTM and a backward LSTM layer for each training sequence, and then feeds them into the same output layer. Figure 4 A schematic diagram of the Bi-LSTM neural network structure is shown.

[0125] The forward computation formula for the Bi-LSTM neural network is:

[0126]

[0127] In the formula,

[0128] The weights of the feedforward LSTM layer at time t-1; These are the input weights for the feedforward LSTM layer;

[0129] For the bias of the forward LSTM layer, The hidden vectors are computed for the forward pass of the forward LSTM layer;

[0130] σ is the activation function; h t-1 x is the hidden state of the previous time step. t This is the input for the current moment.

[0131] The backward computation formula for a Bi-LSTM neural network is:

[0132]

[0133] In the formula,

[0134] The weights of the backward LSTM layer at time t-1; These are the input weights for the backward LSTM layer;

[0135] For the bias of the backward LSTM layer, The hidden vectors are computed for the forward pass of the backward LSTM layer;

[0136] σ is the activation function; h t-1 x is the hidden state of the previous time step. t This is the input for the current moment.

[0137] S402 combines a sparse attention mechanism with a Bi-LSTM neural network. Input data enters the sparse attention module. The sparse attention module extracts key features from the input sequence by calculating the query, key, and value, and uses sparse connections and local region computation to reduce computational complexity.

[0138] Query, or Q for short; key, or K for short; value, or V for short.

[0139] Given an input sequence G = [x1, x2, ..., x...] t ]∈R t×d In the formula, x is the feature vector in the sequence, t is the sequence length, and d is the feature dimension.

[0140] S402-1, the input sequence G is subjected to the following three linear transformations to obtain the query, key, and value matrices, namely:

[0141] Q = XW Q K = XW K V = XW V

[0142] In the formula, Q represents the query, K represents the key, and V represents the value; These are the weight matrices for the query, key, and value, respectively; D Q D K and D V d represents the dimensions of query, key, and value, respectively; X is the feature matrix; d is the feature dimension; R is the set of real numbers; the sparse attention module extracts key features from the input sequence by calculating the query, key, and value.

[0143] S402-2, Calculate the sparse attention weights. Divide the input sequence G into local regions of size l using the following formula, and calculate the dot product between the query and the key in each local region:

[0144]

[0145] In the formula, Q local and K local These are the query matrix and key matrix within the local region, respectively; A local is the attention weight matrix within the local region; softmax is the normalization function.

[0146] To pass global information between local regions, sparse connections are introduced. The attention weights for sparse connections are calculated as follows:

[0147]

[0148] In the formula, Q sparse and K sparse These are the query matrix and key matrix of the sparse join, respectively; A sparse is the attention weight matrix for sparse connections; softmax is the normalization function.

[0149] S402-3, the output of the sparse attention module is calculated using the following formula:

[0150] SSA(X)=A local V local +A sparse V sparse

[0151] In the formula, A local A is the attention weight matrix within a local region; sparse V is the attention weight matrix for sparse connections; local and V sparse These are the value matrices for the local region and the sparse connection, respectively.

[0152] S403, Based on the adaptive Bi-LSTM neural network constructed in steps S401-S402, the following steps are used to complete the fault diagnosis of the feature vector of the original fault signal of the gearbox after feature dimensionality reduction.

[0153] S403-1, the mean, absolute mean, peak factor, skewness factor, waveform factor, impulse factor, mean square frequency, and frequency variance recorded in step S201 are used as inputs to the adaptive Bi-LSTM neural network, with 8 nodes in the input layer; the five fault types—normal state, bearing outer ring fault, inner ring fault, rolling element fault, and gear fault—are used as outputs to the adaptive Bi-LSTM neural network, with 5 nodes in the output layer.

[0154] S403-2, the hidden layers of the adaptive Bi-LSTM neural network include SSA layer, Bi-LSTM layer, Dropout layer and fully connected layer. SSA layer is used to reduce computational complexity, Bi-LSTM layer is used to analyze the temporal characteristics of continuous distance data, Dropout layer is used to prevent model overfitting, and fully connected layer is responsible for integrating the output of all Bi-LSTM units.

[0155] The hidden layers are set to 6, with the first layer being an SSA layer, the next three layers being LSTM layers, and the fifth and sixth layers being a Dropout layer and a fully connected layer, respectively.

[0156] The adaptive Bi-LSTM neural network is set with an initial learning rate of 0.01, a batch size of 400, and 500 iterations. The neural network weights are adjusted iteratively using the loss function to complete the training of the adaptive Bi-LSTM neural network.

[0157] S403-3 compares the predicted category output by the adaptive Bi-LSTM neural network model with the actual label to evaluate its classification performance on the test set.

[0158] The actual label, which is the fault type that the gearbox vibration signal sample actually corresponds to, provides the model with learning objectives and evaluation criteria, ensuring the credibility of the fault diagnosis results.

[0159] Figure 5 and Figure 6 The diagrams show the accuracy and loss rate of the fault diagnosis model based on the adaptive Bi-LSTM neural network:

[0160] from Figure 5 Analysis shows that the initial fault identification accuracy was low, only around 15%. However, with increasing training iterations, the adaptive Bi-LSTM neural network gradually learned effective feature representations, and the accuracy improved rapidly. After 200 iterations, the accuracy exceeded 96%, and continued to rise slowly in subsequent training, eventually stabilizing above 99.5%. This demonstrates that the adaptive Bi-LSTM neural network possesses strong learning capabilities, enabling accurate identification of gearbox fault types.

[0161] from Figure 6 Analysis shows that the loss rate decreases with increasing training epochs, eventually converging to a stable value. After 600 iterations, the loss rate approaches 0, indicating that the adaptive Bi-LSTM neural network has fully converged and can effectively fit the training data, further validating the robustness and reliability of the adaptive Bi-LSTM neural network in gearbox fault diagnosis tasks.

[0162] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.

Claims

1. A real-time fault diagnosis method based on adaptive Bi-LSTM, characterized in that, Includes the following steps: S1, collect raw fault signals of the gearbox including multiple fault types, set a certain sample size for each fault type, and form a raw fault signal dataset. Extract the time-domain and frequency-domain features of the original fault signal as key features, and construct the feature vector of the key features; S2, optimize Lasso regression based on elastic network, and use the optimized Lasso regression to perform feature dimensionality reduction on the feature vector constructed in step S1; S3. Construct an adaptive Bi-LSTM neural network based on an improved sparse attention mechanism to perform fault diagnosis on the feature vector after feature dimensionality reduction, including the following specific steps: S301 combines a sparse attention mechanism and a Bi-LSTM neural network, with input data entering the sparse attention module; Given an input sequence G = [x1, x2, ..., x...] t ]∈R t×d In the formula, x is the feature vector in the sequence, t is the sequence length, and d is the feature dimension. The input sequence G is transformed by the following three linear transformations to obtain the query, key, and value matrices, namely: Q=XW Q ;K=XW K ;V=XW V In the formula, Q represents the query, K represents the key, and V represents the value; These are the weight matrices for the query, key, and value, respectively; D Q D K and D V d represents the dimensions of the query, key, and value, respectively; X is the feature matrix; d is the feature dimension; R is the set of real numbers; The sparse attention module extracts key features from the input sequence by calculating the query, key, and value; S302, divide the input sequence G into local regions of size l using the following formula, and calculate the dot product between the query and the key in each local region: In the formula, Q local and K local These are the query matrix and key matrix within the local region, respectively; A local Here, represents the attention weight matrix within the local region; softmax is the normalization function. S303, Set up sparse connections to transmit global information between local regions. The attention weights of the sparse connections are calculated using the following formula: In the formula, Q sparse and K sparse These are the query matrix and key matrix of the sparse join, respectively; A sparse The attention weight matrix is ​​for sparse connections; S304, the output of the sparse attention module is calculated using the following formula: SSA(X)=A local V local +A sparse V sparse In the formula, V local and V sparse These are the value matrices for the local region and the sparse connection, respectively.

2. The real-time fault diagnosis method based on adaptive Bi-LSTM according to claim 1, characterized in that, The objective function of Lasso regression consists of a loss function and an L1 regularization term, expressed as: In the formula, β is the regression coefficient; n is the number of samples in the dataset; a is the sample index; y a β0 is the target variable for a single sample; p is the number of features in the dataset; b is the feature index. β b The characteristic coefficient; x ab As a characteristic variable; λ is the regularization enhancement parameter; In step S2, the elastic network introduces an L2 regularization term to optimize the Lasso regression. The objective function expression of the optimized Lasso regression is: In the formula, y is the target variable of the entire dataset; X is the feature matrix; and α is the weight ratio of L1 regularization and L2 regularization.

3. The real-time fault diagnosis method based on adaptive Bi-LSTM according to claim 2, characterized in that, The feature matrix X is normalized using a standardization formula, ensuring that the variance of each key feature is 1 and the mean is 0. The standardization formula is as follows: In the formula, x ab μ is the original value of the b-th feature of the a-th sample; b σ is the mean of the b-th feature; b Let be the standard deviation of the b-th feature.

4. The real-time fault diagnosis method based on adaptive Bi-LSTM according to claim 2, characterized in that, The original fault signal dataset is divided into a training set and a test set. The optimized Lasso regression is trained using the training set, and the optimized Lasso regression is tested using the test set.

5. The real-time fault diagnosis method based on adaptive Bi-LSTM according to claim 2, characterized in that, The optimal solution for the weight ratio α is found in the range [0,1] using a grid search algorithm, and the optimal solution for the regularization reinforcement parameter λ is selected using K-fold cross-validation.

6. The real-time fault diagnosis method based on adaptive Bi-LSTM according to claim 5, characterized in that, Using the optimal solutions α and λ, the regression coefficient β is solved using the following expression, and the characteristic coefficient β is selected. b Features ≠ 0 are considered important features: In the formula, y is the optimal estimation vector for the regression coefficients; β is the regression coefficient; n is the number of samples in the dataset; y is the target variable for the entire dataset; X is the feature matrix; λ is the regularization enhancement parameter; α is the weight ratio of L1 regularization and L2 regularization.

7. The real-time fault diagnosis method based on adaptive Bi-LSTM according to claim 1, characterized in that, The adaptive Bi-LSTM neural network is configured using the following steps: Ⅰ. The key features are used as input to the adaptive Bi-LSTM neural network, with 8 nodes in the input layer; each fault type is used as output to the adaptive Bi-LSTM neural network, with 5 nodes in the output layer. II. Set the number of hidden layers of the adaptive Bi-LSTM neural network to 6, where the first layer is an SSA layer, the second, third and fourth layers are LSTM layers, the fifth layer is a Dropout layer, and the sixth layer is a fully connected layer; III. Set the initial learning rate of the adaptive Bi-LSTM neural network to 0.01, the batch size to 400, and the number of iterations to 500. Adjust the neural network weights iteratively through the loss function to complete the training of the adaptive Bi-LSTM neural network.

8. A real-time fault diagnosis method based on adaptive Bi-LSTM according to any one of claims 1-7, characterized in that, Gearbox failure types include normal gearbox condition, bearing outer ring failure, bearing inner ring failure, rolling element failure, and gear failure. 200 samples were collected for each fault type to form an original fault signal dataset with a capacity of 1000 samples. 80% of the dataset was used as the training set and 20% of the dataset was used as the test set.

9. A real-time fault diagnosis method based on adaptive Bi-LSTM according to any one of claims 1-7, characterized in that, The time-domain features include mean, root mean square value, variance, absolute mean, peak value, peak-to-peak value, peak factor, kurtosis factor, skewness factor, waveform factor, impulse factor, and margin factor. The frequency domain features include centroid frequency, average frequency, mean square frequency, root mean square frequency, frequency variance, and frequency standard deviation.

Citation Information

Patent Citations

  • Multi-scale feature fusion gearbox fault diagnosis method based on self-attention mechanism

    CN116010900A

  • Convolutional neural network based on perceptual context attention mechanism

    CN119227748A