A method, device and apparatus for diagnosing faults in rolling bearings
By combining the Timer model with a domain classifier and employing adapter fine-tuning and meta-learning techniques, the accuracy problem of rolling bearing fault diagnosis under conditions of few samples and different operating conditions is solved, achieving efficient and robust fault identification that is suitable for industrial sites.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XI AN JIAOTONG UNIV
- Filing Date
- 2025-07-30
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies struggle to maintain accuracy in rolling bearing fault diagnosis under limited sample sizes and varying operating conditions. Traditional methods exhibit poor generalization ability, while deep learning methods suffer from low robustness to changes in operating conditions and consume significant computational resources, making them unsuitable for deployment in industrial settings.
The Timer model is combined with domain classification and adapter fine-tuning. Adversarial training is performed by minimizing the fault classification loss and maximizing the domain classification loss. An adapter module is inserted for fine-tuning, and meta-training of the fault classifier is performed through model-independent meta-learning, thereby achieving feature distribution alignment and rapid adaptation.
It improves the accuracy and robustness of rolling bearing fault diagnosis under different operating conditions, reduces the computational resource requirements, enhances the model's adaptability under small sample conditions, and improves fault identification accuracy.
Smart Images

Figure CN120892923B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault diagnosis technology, and in particular to a method, apparatus and equipment for diagnosing rolling bearing faults. Background Technology
[0002] Currently, rolling bearings are key components of various rotating machinery, and their operating condition directly affects the stability and service life of the equipment. Studies show that bearing failures account for approximately 30% to 40% of all rotating machinery failures. Therefore, timely and accurate diagnosis of bearing failures is of great significance for predictive maintenance and safe operation of industrial equipment.
[0003] In existing technologies, bearing fault diagnosis methods are mainly divided into two categories: methods based on traditional feature engineering and methods based on deep learning. The former relies on manual extraction of time-domain, frequency-domain, or time-frequency-domain statistical features, which are then combined with classifiers such as support vector machines (SVM) or decision trees to complete the diagnosis. However, the expressive power of hand-crafted features is limited, they rely on expert experience, have poor generalization ability, and are difficult to adapt to complex and changing working conditions.
[0004] In recent years, deep learning methods have been gradually introduced into the field of fault diagnosis. Structures such as convolutional neural networks (CNN) and recurrent neural networks (RNN) have achieved good results on bearing data.
[0005] However, these methods generally rely on large-scale labeled data, and their models have low robustness to changes in operating conditions, limiting their generalization ability. Furthermore, the training process for deep learning methods is complex, often requiring significant computational resources and time, making them unsuitable for deployment in industrial settings. Especially in practical industrial applications, bearing fault samples are scarce and unevenly distributed, and operating conditions are complex and variable, making it difficult for traditional diagnostic methods to maintain accuracy in environments with few samples and diverse operating conditions. Summary of the Invention
[0006] Therefore, it is necessary to provide a method, apparatus, and equipment for diagnosing rolling bearing faults to address the aforementioned technical problems.
[0007] The present invention adopts the following technical solution:
[0008] This invention provides a method for diagnosing rolling bearing faults, comprising:
[0009] Source domain data and target domain data of rolling bearing vibration signals under various working conditions are acquired as training samples; the source domain data and target domain data correspond to different combinations of working conditions; the target domain data is less than the source domain data.
[0010] The training samples are input into the pre-trained Timer model to obtain the time-series signal features of the training samples; the fault classifier performs fault classification based on the time-series signal features to obtain the predicted fault; and the domain classifier performs domain classification based on the time-series signal features to obtain the predicted domain category.
[0011] The Timer model, fault classifier, and domain classifier are trained to minimize the fault classification loss and maximize the domain classification loss, based on the predicted fault classification loss and the predicted domain category.
[0012] The trained Timer model is fine-tuned using the target domain data; the fault classifier is meta-trained using model-independent meta-learning based on the source domain data, and then fine-tuned using the meta-trained fault classifier based on the target domain data.
[0013] The vibration signal of the rolling bearing to be identified is input into the adapter and the timer model is finely tuned to obtain the time-series signal characteristics. Then, the fault diagnosis is performed based on the time-series signal characteristics by the finely tuned fault classifier.
[0014] Optionally, the fault classifier includes a fully connected layer and a softmax classifier connected in sequence;
[0015] The step of classifying faults based on time-series signal characteristics using a fault classifier to obtain predicted faults specifically includes:
[0016] The characteristics of time-series signals are compressed into the fault diagnosis space using the following formula based on a fully connected layer:
[0017] ;
[0018] The output of the fully connected layer is mapped to a fault probability distribution based on a softmax classifier using the following formula:
[0019] ;
[0020] in, For the output of a fully connected layer, For training samples i The time-series signal characteristics, This is the weight matrix of the fully connected layer. For the bias term of the fully connected layer, It is the ReLU activation function. For training samples i Predicted fault categories, This represents the total number of fault categories.
[0021] Optionally, the domain classifier includes a gradient inversion layer and a multilayer perceptron connected in sequence; the gradient inversion layer maintains the temporal signal features of the input unchanged during forward propagation and multiplies the gradient by -1 during backpropagation; the multilayer perceptron is used to output the predicted domain category of the training sample based on the temporal signal features of the input training sample.
[0022] Optionally, the step of determining the fault classification loss based on the predicted fault, determining the domain classification loss based on the predicted domain category, and training the Timer model, fault classifier, and domain classifier to minimize the fault classification loss and maximize the domain classification loss specifically includes:
[0023] The fault classification loss is determined based on the predicted fault using the following formula:
[0024]
[0025] The domain classification loss is determined based on the predicted domain category using the following formula:
[0026] ;
[0027] The Timer model, fault classifier, and domain classifier are trained by minimizing the fault classification loss and maximizing the domain classification loss using the following formula:
[0028] ;
[0029] in, Classify losses for faults, For training samples i The actual fault category, For training samples i Predicted fault categories, For domain classification loss, For training samples i domain tags, For training samples i The predicted probability that is identified as data in the target domain. As a weighting factor, This represents the total loss.
[0030] Optionally, the step of fine-tuning the trained Timer model based on the target domain data specifically includes:
[0031] Insert adapter modules into the Transformer encoders of each layer of the Timer model;
[0032] The original model parameters of the Timer model after training are fixed, and the parameters in the inserted adapter module are trained based on the target domain data.
[0033] Optionally, the step of meta-training the fault classifier based on source domain data through model-independent meta-learning specifically includes:
[0034] Based on the different working conditions corresponding to the source domain data, construct rolling bearing diagnostic tasks for each working condition; determine the training samples corresponding to each rolling bearing diagnostic task, and divide them into support set and query set;
[0035] By using the support set corresponding to each rolling bearing diagnosis task, the initial parameters of the fault classifier are subjected to several gradient descent operations to obtain the fault classifier parameters corresponding to each rolling bearing diagnosis task.
[0036] By using the query set corresponding to each rolling bearing diagnosis task, the prediction loss of the fault classifier parameters corresponding to each rolling bearing diagnosis task is determined, and the initial parameters of the fault classifier are trained with the optimization objective of minimizing the total prediction loss of each rolling bearing diagnosis task.
[0037] Optionally, acquiring source domain data and target domain data of vibration signals of rolling bearings under various operating conditions as training samples specifically includes:
[0038] Acquire source domain data and target domain data of vibration signals from rolling bearings under various operating conditions;
[0039] The source domain data and the target domain data are sliced according to a sliding window to obtain multiple time sample sequences;
[0040] For each time series sample, the time series is standardized based on the mean and standard deviation of the time series sample to obtain training samples.
[0041] This invention provides a rolling bearing fault diagnosis device, comprising:
[0042] The acquisition module is used to acquire source domain data and target domain data of vibration signals of rolling bearings under various working conditions as training samples; the source domain data and target domain data correspond to different bearing fault types or different combinations of working conditions.
[0043] The classification module is used to input training samples into a pre-trained Timer model to obtain the time-series signal features of the training samples; the fault classifier performs fault classification based on the time-series signal features to obtain the predicted fault; and the domain classifier performs domain classification based on the time-series signal features to obtain the predicted domain category.
[0044] The training module is used to determine the fault classification loss based on the predicted fault and the domain classification loss based on the predicted domain category, so as to train the Timer model to minimize the fault classification loss and maximize the domain classification loss.
[0045] The fine-tuning module is used to perform adapter fine-tuning on the trained Timer model based on the target domain data; to perform meta-training on the fault classifier based on the source domain data through model-independent meta-learning; and to fine-tune the meta-trained fault classifier based on the target domain data.
[0046] The diagnostic module is used to input the vibration signal of the rolling bearing to be identified into the adapter's finely tuned Timer model to obtain the time-series signal characteristics, and then perform fault diagnosis based on the time-series signal characteristics through the finely tuned fault classifier.
[0047] The present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described rolling bearing fault diagnosis method.
[0048] The present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described rolling bearing fault diagnosis method.
[0049] The above-mentioned at least one technical solution adopted in this invention can achieve the following beneficial effects:
[0050] This invention introduces domain classification to train the Timer model, fault classifier, and domain classifier by minimizing fault classification loss and maximizing domain classification loss. This implements an adversarial training mechanism, forcing the Timer model's feature extraction process to be indistinguishable between the source and target domains. This allows the model to focus on fault features common to both domains, achieving feature distribution alignment between the source and target domains. Specifically, it ignores the differences in the performance of the same fault under different operating conditions, focusing on extracting common fault features across different conditions. This reduces the impact of variations in rolling bearing data distribution under different conditions on diagnostic performance, enabling the model to maintain high fault identification accuracy even under target domain conditions, significantly improving the accuracy and robustness of cross-condition diagnosis. Simultaneously, an adapter-insertion fine-tuning strategy allows the Timer model to quickly adapt to the target domain task with only a few parameter optimizations, effectively reducing the risk of overfitting and enabling the Timer model to converge efficiently even with small sample sizes in the target domain. Furthermore, by performing meta-training on the fault classifier through model-independent meta-learning, the fault classifier learns a set of parameters with good generalization properties, enabling rapid adaptation and effective training with only a small number of samples even when facing a small sample size in the target domain. This invention improves the fault diagnosis accuracy under varying operating conditions and with a small sample size in the target domain. Attached Figure Description
[0051] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0052] Figure 1 This is a schematic diagram of a rolling bearing fault diagnosis method provided by the present invention;
[0053] Figure 2 This invention provides a schematic flowchart of a rolling bearing fault diagnosis module.
[0054] Figure 3 A schematic diagram of a rolling bearing fault diagnosis device provided by the present invention;
[0055] Figure 4 A schematic diagram of a computer device for implementing a rolling bearing fault diagnosis method provided by the present invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0057] Currently, in practical industrial applications, bearing fault samples are scarce and unevenly distributed, and operating conditions are complex and variable. Traditional diagnostic methods struggle to maintain accuracy under limited sample sizes and diverse operating conditions. Therefore, developing a bearing fault diagnosis method with high robustness, strong generalization ability, and adaptability to small sample sizes is a pressing issue in the field of fault diagnosis.
[0058] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0059] Figure 1 This is a schematic diagram of a rolling bearing fault diagnosis method according to the present invention, which specifically includes the following steps:
[0060] S101: Acquire source domain data and target domain data, including vibration signals of rolling bearings under various working conditions, as training samples; the source domain data and target domain data correspond to different combinations of working conditions; the target domain data is less than the source domain data.
[0061] S102: Input the training samples into the pre-trained Timer model to obtain the time-series signal features of the training samples; classify the faults according to the time-series signal features using a fault classifier to obtain the predicted faults; classify the domains according to the time-series signal features using a domain classifier to obtain the predicted domain categories.
[0062] S103: Determine the fault classification loss based on the predicted fault and the domain classification loss based on the predicted domain category. Train the Timer model, fault classifier, and domain classifier to minimize the fault classification loss and maximize the domain classification loss.
[0063] S104: Fine-tune the trained Timer model using the target domain data; perform meta-training on the fault classifier using model-independent meta-learning based on the source domain data, and fine-tune the meta-trained fault classifier using the target domain data.
[0064] S105: Input the vibration signal of the rolling bearing to be identified into the adapter and fine-tune the Timer model to obtain the time sequence signal characteristics, and perform fault diagnosis based on the time sequence signal characteristics through the fine-tune fault classifier.
[0065] For ease of explanation, the following description focuses solely on the server as the executing entity. The server mentioned in this invention can be a server set up on a business platform, or a device such as a desktop computer or laptop computer capable of executing the solution of this invention.
[0066] Generally, in one or more embodiments of the present invention, when the server performs rolling bearing fault diagnosis, it can first acquire source domain data and target domain data, including vibration signals of rolling bearings under various operating conditions, as training samples. The source domain data and target domain data correspond to different combinations of operating conditions, with the target domain data being less than the source domain data. The source domain data often consists of vibration signals of rolling bearings under easily obtainable operating conditions; therefore, a large amount of source domain data can be acquired. The target domain data, on the other hand, can be vibration signals of rolling bearings under difficult-to-obtain operating conditions, meaning a smaller sample size can be acquired. The present invention aims to maintain the accuracy of fault diagnosis even with a small sample size and diverse operating conditions.
[0067] After obtaining the source domain data and the target domain data, in one or more embodiments of the present invention, the server can slice the source domain data and the target domain data according to a sliding window to obtain multiple time sample sequences; and for each time sequence sample, the time sample sequence is standardized according to the mean and standard deviation of the time sequence sample to obtain training samples.
[0068] The preprocessing process includes signal segmentation and standardization: the vibration signal of the original rolling bearing is segmented, the continuous time series is cut into time windows of equal length, and each signal segment is Z-Score standardized to eliminate amplitude deviation under different working conditions and enhance the robustness of the model.
[0069] Specifically, the vibration signal can be sliced using a sliding window mechanism before segmentation, with the window length set to 1. The sliding step size is The resulting sample sequence is as follows:
[0070]
[0071] in, , Indicates the first A number of time series samples, Represents the original continuous vibration signal. This represents the total number of samples after slicing. Preferably, the window length... Set to 2048, sliding step size Set to 1024 to ensure a certain degree of overlap between samples, thereby enhancing sample richness and continuous modeling capabilities.
[0072] Furthermore, scaling differences in mean and amplitude among different time series samples can be eliminated by performing Z-score standardization on each time series sample, as shown in the following formula:
[0073]
[0074] in, This is the mean of the time series sample. Standard deviation This represents the standardized training sample values. The standardized vibration signal follows a normal distribution with zero mean and unit variance, i.e. This helps eliminate differences in the scale of raw data caused by sampling equipment, assembly differences, or operating conditions.
[0075] After preprocessing the training samples, the standardized time series can be input into the Timer pre-trained model to extract the global feature representation of the last hidden layer. The Timer model uses the self-attention mechanism based on the Transformer structure to encode the sequence, capturing long-term dependencies and nonlinear features.
[0076] The Timer model is a large-scale time series model built on the Transformer architecture. It is pre-trained on large-scale, multi-type time series datasets and has powerful time series representation learning capabilities. Its core structure includes a position encoding layer, a multi-head attention mechanism, and a feedforward neural network module. Residual connections and layer normalization are used to enhance training stability.
[0077] Preferably, each preprocessed training sample is input into the Timer model. First, it is transformed into a fixed-dimensional input tensor through a one-dimensional embedding mapping layer, and then input into stacked Transformer Encoder layers for feature modeling. The attention mechanism of each layer in the model is calculated according to the following formula:
[0078]
[0079] in, These are respectively derived from the input vibration signal sequence The resulting query, key, and value vectors are obtained through mapping. For the dimension of the key, This is a trainable parameter matrix.
[0080] Preferably, the Timer model employs a multi-head attention mechanism to model multiple representation subspaces in parallel, enabling the model to simultaneously capture local changes and global dependencies. This is particularly suitable for bearing vibration signals that simultaneously exhibit high-frequency impacts and low-frequency trend structures. After completing multi-layer Transformer feature encoding, a global aggregation vector (such as a CLS token or average pooling result) from the output sequence of the last Encoder layer is selected as the temporal signal feature of the sample for subsequent classification tasks.
[0081] To address the data distribution differences between the source and target domains, in one or more embodiments of the present invention, model grafting and classification can be performed. That is, a fault classifier and a domain classifier can be grafted onto the feature output layer of the Timer model to achieve bearing state classification and align the feature distributions of the source and target domains, and output the predicted probability of each fault type.
[0082] The fault classifier may include a fully connected layer and a Softmax classifier connected in sequence; the domain classifier may be a domain adaptive feature alignment module (domain discriminant network), which may include a gradient inversion layer and a multilayer perceptron connected in sequence.
[0083] Specifically, in one or more embodiments of the present invention, the fully connected layer may include 256 neurons, used to compress the high-dimensional global sequence features output by the Timer model down to a low-dimensional diagnostic space. This fully connected layer introduces the ReLU activation function to enhance nonlinear modeling capabilities, compressing time-series signal features into the fault diagnosis space based on the fully connected layer using the following formula:
[0084]
[0085] in, For the output of a fully connected layer, For training samples i The time-series signal features (from the high-dimensional feature input of the Timer model, such as the CLS token of the last layer or the result of global average pooling). This is the weight matrix of the fully connected layer. For the bias term of the fully connected layer, The ReLU activation function ensures that the output is sparse and nonlinear.
[0086] A softmax output layer is then added after the fully connected layer described above. The dimension of the output vector equals the total number of fault categories in the diagnostic task. The softmax function maps the neuron output to a probability distribution, which can be achieved by mapping the fully connected layer output to a fault probability distribution based on the softmax classifier using the following formula:
[0087]
[0088] In the formula, For training samples i Predicted fault categories, Let be the total number of fault categories. During the training phase, the cross-entropy loss function can be used as the optimization objective, defined as:
[0089]
[0090] in, For training samples i The actual fault category can be the indicator value belonging to a certain category in the one-hot encoding of the actual label.
[0091] This structure achieves the mapping and transformation of task-related feature space through a fully connected layer and completes the probabilistic differentiation of each fault category through a Softmax layer. Compared with traditional linear classifiers, this module has stronger representation and discrimination capabilities and exhibits higher classification accuracy and stability when dealing with multiple faults and multi-scale signal patterns of rolling bearings.
[0092] Furthermore, introducing a domain discriminant network and adversarial training mechanisms can align the feature distributions of the source and target domains. The domain discriminant network can be a multilayer perceptron classifier, taking the global feature representation extracted by the Timer model as input and outputting the predicted probability of the domain category (binary classification, where 0 represents a source domain sample and 1 represents a target domain sample). To achieve adversarial training, a gradient reversal layer (GRL) is inserted before the domain discriminant network. This layer maintains the temporal signal features of the input unchanged during forward propagation and multiplies the gradient by -1 during backpropagation, thus reversing the direction of the domain discriminant loss's influence on the Timer model's feature extraction. This prompts the Timer model to learn a common feature representation that is indistinguishable between the source and target domain data, thereby achieving feature space alignment between the source and target domains.
[0093] Typically, the same fault can manifest differently under different operating conditions. Conventional fault classification (without domain adaptation) learns the impact of different operating conditions on fault characteristics, leading to fault classification that relies more on the operating condition and less on the fault itself. Domain adaptation blurs the features under different operating conditions (using gradient inversion to prevent learning of operating condition features) and focuses on the fault itself, learning the fault characteristics that exist under different operating conditions, thus enabling fault identification under unseen conditions.
[0094] Define domain labels during model training. Let the source domain samples Target domain samples The domain alignment loss function can be a binary cross-entropy function, defined as follows:
[0095]
[0096] in, This represents the predicted probability that a sample is classified as belonging to the target domain. The overall optimization objective is a weighted sum of the fault classification loss and the domain alignment loss.
[0097]
[0098] in, Classify losses for faults, For domain classification loss, For training samples i domain tags, For training samples i The predicted probability that is identified as data in the target domain. As a weighting factor, This represents the total loss.
[0099] The tradeoff coefficient is used to balance the optimization contributions of the fault classification task and the domain alignment task. When the GRL backpropagates the gradient of the domain discrimination loss to the feature extraction layer, it is equivalent to the feature extraction network maximizing the classification error of the domain discrimination network, forcing the extracted features to be indistinguishable between the source and target domains, thus achieving feature distribution alignment. Through the above-mentioned domain adaptive alignment module, the impact of data distribution differences under different operating conditions (source / target domain) on diagnostic performance can be effectively reduced, enabling the model to maintain high fault identification accuracy under the target domain operating conditions, and significantly improving the accuracy and robustness of cross-operating condition diagnosis.
[0100] Furthermore, in one or more embodiments of the present invention, the Timer model can be fine-tuned using an insertable adapter. This involves inserting adapter modules into each layer of the Transformer encoder of the Timer model; fixing the original model parameters of the trained Timer model to retain general features; and training the parameters in the inserted adapter modules based on the target domain data. Only the inserted adapter modules and output layer parameters are updated, thereby improving the adaptation efficiency under small sample conditions while ensuring model generalization.
[0101] Specifically, in one or more embodiments of the present invention, a lightweight Adapter module can be inserted into each layer of the Transformer encoder of the Timer model, and the original weights of the pre-trained model can be fixed. Only the new parameters in the Adapter module and the output layer are trained and adjusted to efficiently adapt to the specific needs of the current fault diagnosis task.
[0102] Let the hidden feature vector of a certain Transformer Encoder layer in the Timer model be... , dimension The Adapter module first... The projection is onto a low-dimensional latent space, then nonlinearly transformed and mapped back to the original dimension before the residual is added back. The transformation process is as follows:
[0103]
[0104]
[0105] in, and These represent the weight matrices (dimensions) of the dimensionality reduction mapping. and bias terms, and These represent the weight matrices (dimensions) of the dimension-upgrading mapping. and bias terms, The bottleneck layer dimension of the Adapter (much smaller) ), It is a non-linear activation function (such as ReLU).
[0106] Since the number of parameters introduced by each Adapter module is extremely small compared to the original model, only a few parameters need to be optimized to enable the model to quickly adapt to new tasks. Compared to tuning the entire pre-trained model, this strategy significantly reduces the computational and storage overhead, effectively reducing the risk of overfitting and enabling the model to converge efficiently even with small sample sizes. The substantial reduction in training parameters also makes this fine-tuning method suitable for deploying the model and updating it online in resource-constrained environments such as edge devices.
[0107] Furthermore, in one or more embodiments of the present invention, a Model-Agnostic Meta-Learning (MAML) mechanism can be introduced to improve diagnostic performance in scenarios with scarce samples. This mechanism constructs multiple diagnostic sub-tasks (such as different loads, speeds, or fault types), dividing each task into a support set and a query set. The model first performs gradient updates on the support set to form task-specific temporary parameters, and then evaluates performance on the query set and performs meta-optimization on the shared initial parameters. After completing multiple rounds of task training, the model obtains initial parameters with rapid adaptability, requiring only a small number of samples to achieve efficient and accurate diagnosis during the fine-tuning phase. This method is decoupled from the Timer structure and is applicable to any temporal feature extraction model.
[0108] In one or more embodiments of the present invention, when performing meta-training on the fault classifier using model-independent meta-learning based on source domain data, the server can construct rolling bearing diagnosis tasks corresponding to different working conditions based on the source domain data; determine the training samples corresponding to each rolling bearing diagnosis task and divide them into a support set and a query set; then, through the support set corresponding to each rolling bearing diagnosis task, perform several gradient descent operations on the initial parameters of the fault classifier to obtain the fault classifier parameters corresponding to each rolling bearing diagnosis task; finally, through the query set corresponding to each rolling bearing diagnosis task, determine the prediction loss of the fault classifier parameters corresponding to each rolling bearing diagnosis task, and train the initial parameters of the fault classifier with the optimization objective of minimizing the total prediction loss of each rolling bearing diagnosis task.
[0109] Specifically, firstly, multiple rolling bearing diagnostic tasks can be constructed, each task corresponding to a specific operating condition (such as different speeds, loads, etc.), and its samples can be divided into a support set and a query set.
[0110] For each rolling bearing diagnostic task, perform one or more gradient descent operations on its support set to obtain task-specific model parameters, with the update formula as follows: .
[0111] in, These are the initial parameters shared by the fault classifier. The inner learning rate, For the task Loss function on support set For the first i The fault classifier parameters for each rolling bearing diagnostic task.
[0112] After the update is complete, use it on the query set of each task. Calculate loss and use it to update the initial parameters. The final meta-optimization objective function is shown below:
[0113]
[0114] This process, through gradient accumulation and optimization across tasks, enables the model to learn a set of parameters with good initialization properties, allowing for rapid adaptation and effective training with only a small number of samples when facing new tasks.
[0115] The MAML mechanism is independent of model structure and can be flexibly integrated into any gradient-optimized time series diagnostic model, such as Timer. Experiments show that, under the small sample setting of CWRU rolling bearings (e.g., only 5 samples per class), the model accuracy can be maintained above 90% after introducing the MAML training strategy, which is significantly better than the traditional transfer fine-tuning scheme. This fully verifies the diagnostic efficacy and engineering applicability of this method under small sample conditions.
[0116] Throughout the model training and subsequent evaluation, training and testing sets were constructed using bearing fault samples from multiple classes in the CWRU bearing dataset. Stratified sampling was employed to ensure consistent proportions across classes. During training, the AdamW optimizer and ReduceLROnPlateau scheduler were used to adjust the learning rate. Model performance was evaluated using metrics such as accuracy, precision, recall, and F1 score.
[0117] Preferably, the vibration signal can be the original vibration data of the rolling bearing drive end collected by the accelerometer. The data sampling frequency should be uniformly 12 kHz to ensure the consistency of the time resolution and frequency domain coverage of the collected samples under different working conditions, and to avoid feature shift or spectrum distortion caused by inconsistent sampling rates, which would affect the model training effect.
[0118] Specifically, in one or more embodiments of the present invention, the AdamW optimizer can be used to update all parameters to improve training convergence efficiency and enhance adaptability to high-dimensional nonlinear feature spaces. The AdamW optimizer introduces a weight decay regularization term based on the traditional Adam optimizer, and its parameter update rules are as follows:
[0119]
[0120] in, This represents the model parameters at iteration t. , These are the first-order and second-order momentum terms, respectively. The current learning rate, To prevent the smoothing constant from division by zero, This is the weight decay factor, used to effectively suppress model overfitting; the first term in the formula represents the standard adaptive gradient update, and the second term is the L2 regularization term.
[0121] Simultaneously, combined with the ReduceLROnPlateau scheduling strategy, training progress is automatically monitored based on the model's loss function or accuracy performance on the validation set. When performance does not improve within several training epochs, the learning rate for updating the current parameters is reduced according to a preset factor (e.g., 0.5), as shown in the following formula:
[0122]
[0123] in, Scaling factor The observation period is specified.
[0124] Preferably, the trained model uses accuracy, precision, recall, and F1 score as evaluation metrics, and the calculation formula is as follows:
[0125] Accuracy: Accuracy refers to the proportion of samples correctly predicted by the model out of the total number of samples. The formula is:
[0126]
[0127] in, TP These are true positives. TN These are true negatives. FP These are false positives. FN These are false negatives.
[0128] Precision: Precision refers to the proportion of samples that are predicted as positive by the model but are actually positive. The formula is:
[0129]
[0130] Recall: Recall refers to the proportion of samples that are actually positive that are correctly predicted as positive by the model. The formula is:
[0131]
[0132] F1 Score: The F1 score is the harmonic mean of precision and recall, used to comprehensively measure the model's accuracy and recall capabilities. The formula is:
[0133]
[0134] After training and evaluation, the trained fault diagnosis model can be deployed in real-world industrial scenarios, taking real-time vibration data of rolling bearings as input to predict their operating status and potential fault types. By combining the model's output classification probabilities with fault trends, early warnings can be achieved, assisting maintenance personnel in developing maintenance plans. Furthermore, by analyzing the influence of the characteristics of each input time-series signal on the model's discrimination results and quantifying the contribution of features, data support can be provided for optimizing sensor placement, signal processing strategies, and fault identification mechanisms.
[0135] Figure 2 This is a schematic diagram of a rolling bearing fault diagnosis module according to the present invention, which mainly includes a data preparation module, a rolling bearing fault diagnosis model training module, and a rolling bearing fault diagnosis classification output module. This method can accurately identify the operating status of rolling bearings under complex working conditions, and possesses good real-time performance, robustness, and deployability, making it suitable for various industrial application scenarios such as intelligent manufacturing and equipment health management.
[0136] based on Figure 1 The rolling bearing fault diagnosis method presented in this invention introduces domain classification to train the Timer model, fault classifier, and domain classifier by minimizing fault classification loss and maximizing domain classification loss. This implements an adversarial training mechanism, forcing the Timer model's feature extraction process to be indistinguishable between the source and target domains. This allows the model to focus on fault features common to both domains, achieving feature distribution alignment between the source and target domains. This reduces the impact of differences in rolling bearing data distribution under different operating conditions on diagnostic performance, enabling the model to maintain high fault identification accuracy even under target domain conditions, significantly improving the accuracy and robustness of cross-condition diagnosis. Simultaneously, an adapter insertion fine-tuning strategy allows the Timer model to quickly adapt to the target domain task with only a few parameters, effectively reducing the risk of overfitting and enabling efficient convergence even with small sample sizes in the target domain. Furthermore, model-independent meta-learning is used to meta-train the fault classifier, allowing it to learn a set of parameters with good generalization properties. This enables rapid adaptation and effective training with only a small number of samples even under small target domain conditions. This invention improves the accuracy of fault diagnosis in the target domain with few samples under different operating conditions.
[0137] The present invention has the following beneficial technical effects:
[0138] (1) Strong adaptability to small samples: By introducing the Timer pre-trained model, transfer learning mechanism and MAML, the performance of the method in the data-scarce scenario is improved;
[0139] (2) Strong generalization ability: The Timer model is pre-trained on diverse time series data, which effectively enhances the robustness of the model under multiple working conditions;
[0140] (3) End-to-end automatic learning: No need to manually construct features, build a complete end-to-end learning architecture, improve the efficiency and applicability of model deployment;
[0141] (4) High classification accuracy: On the typical industrial dataset CWRU, this method achieves a classification accuracy of over 98%, which is significantly better than traditional methods;
[0142] (5) It has industrial application potential: it can be deployed in intelligent manufacturing systems to realize real-time vibration data monitoring and fault early warning.
[0143] In summary, this invention constructs an efficient rolling bearing fault diagnosis method by combining a pre-trained time series model (Timer) with a hierarchical optimization mechanism, which can meet the needs of modern industrial systems for intelligent and reliable diagnostic solutions.
[0144] When applying the rolling bearing fault diagnosis method provided by this invention, it is not necessary to rely on... Figure 1 The steps shown are executed in sequence. The specific execution order of each step can be determined as needed, and this invention does not impose any restrictions on it.
[0145] The above describes a rolling bearing fault diagnosis method provided by one or more embodiments of the present invention. Based on the same idea, the present invention also provides a corresponding rolling bearing fault diagnosis device, such as... Figure 3 As shown.
[0146] Figure 3 A schematic diagram of a rolling bearing fault diagnosis device provided by the present invention includes:
[0147] The acquisition module 201 is used to acquire source domain data and target domain data of vibration signals of rolling bearings under various working conditions as training samples; the source domain data and target domain data correspond to different bearing fault types or different combinations of working conditions.
[0148] The classification module 202 is used to input training samples into a pre-trained Timer model to obtain the time-series signal features of the training samples; to classify faults based on the time-series signal features using a fault classifier to obtain predicted faults; and to classify domains based on the time-series signal features using a domain classifier to obtain predicted domain categories.
[0149] Training module 203 is used to determine the fault classification loss based on the predicted fault and the domain classification loss based on the predicted domain category, so as to train the Timer model to minimize the fault classification loss and maximize the domain classification loss.
[0150] The fine-tuning module 204 is used to perform adapter fine-tuning on the trained Timer model based on the target domain data; to perform meta-training on the fault classifier through model-independent meta-learning based on the source domain data; and to fine-tune the meta-trained fault classifier based on the target domain data.
[0151] The diagnostic module 205 is used to input the vibration signal of the rolling bearing to be identified into the adapter after fine-tuning the Timer model to obtain the time-series signal characteristics, and to perform fault diagnosis based on the time-series signal characteristics through the fine-tuned fault classifier.
[0152] Specific limitations regarding the rolling bearing fault diagnosis device can be found in the limitations of the rolling bearing fault diagnosis method described above, and will not be repeated here. Each module in the aforementioned rolling bearing fault diagnosis device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0153] The present invention also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 The provided method for diagnosing rolling bearing faults.
[0154] The present invention also provides Figure 4 The schematic diagram of the computer device shown is as follows: Figure 4 As shown, at the hardware level, this computer device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then executes it to achieve the above. Figure 1 The provided method for diagnosing rolling bearing faults.
[0155] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0156] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this invention.
Claims
1. A method for diagnosing rolling bearing faults, characterized in that, include: Source domain data and target domain data of rolling bearing vibration signals under various working conditions are acquired as training samples; the source domain data and target domain data correspond to different combinations of working conditions; the target domain data is less than the source domain data. The training samples are input into the pre-trained Timer model to obtain the time-series signal features of the training samples; The fault classifier classifies faults based on time-series signal characteristics to obtain predicted faults; the domain classifier classifies domains based on time-series signal characteristics to obtain predicted domain categories. The Timer model, fault classifier, and domain classifier are trained to minimize the fault classification loss and maximize the domain classification loss, based on the predicted fault classification loss and the predicted domain category. The trained Timer model is fine-tuned using the target domain data; the fault classifier is meta-trained using model-independent meta-learning based on the source domain data, and then fine-tuned using the meta-trained fault classifier based on the target domain data. Specifically, the step of meta-training the fault classifier using model-independent meta-learning based on source domain data includes: constructing rolling bearing diagnosis tasks corresponding to different working conditions based on the source domain data; determining the training samples corresponding to each rolling bearing diagnosis task and dividing them into a support set and a query set; performing several gradient descent operations on the initial parameters of the fault classifier using the support set corresponding to each rolling bearing diagnosis task to obtain the fault classifier parameters corresponding to each rolling bearing diagnosis task; determining the prediction loss of the fault classifier parameters corresponding to each rolling bearing diagnosis task using the query set corresponding to each rolling bearing diagnosis task, and training the initial parameters of the fault classifier with the optimization objective of minimizing the total prediction loss of each rolling bearing diagnosis task. The vibration signal of the rolling bearing to be identified is input into the adapter and the timer model is finely tuned to obtain the time-series signal characteristics. Then, the fault diagnosis is performed based on the time-series signal characteristics by the finely tuned fault classifier.
2. The rolling bearing fault diagnosis method as described in claim 1, characterized in that, The fault classifier comprises a fully connected layer and a softmax classifier connected in sequence. The step of classifying faults based on time-series signal characteristics using a fault classifier to obtain predicted faults specifically includes: The characteristics of time-series signals are compressed into the fault diagnosis space using the following formula based on a fully connected layer: ; The output of the fully connected layer is mapped to a fault probability distribution based on a softmax classifier using the following formula: ; in, For the output of a fully connected layer, For training samples i The time-series signal characteristics, This is the weight matrix of the fully connected layer. For the bias term of the fully connected layer, It is the ReLU activation function. For training samples i Predicted fault categories, This represents the total number of fault categories.
3. The rolling bearing fault diagnosis method as described in claim 1, characterized in that, The domain classifier includes a gradient inversion layer and a multilayer perceptron connected in sequence; the gradient inversion layer maintains the temporal signal features of the input unchanged during forward propagation and multiplies the gradient by -1 during backward propagation; the multilayer perceptron is used to output the predicted domain category of the training sample based on the temporal signal features of the input training sample.
4. The rolling bearing fault diagnosis method as described in claim 1, characterized in that, The process of determining fault classification loss based on predicted faults and domain classification loss based on predicted domain categories, and training the Timer model, fault classifier, and domain classifier to minimize the fault classification loss and maximize the domain classification loss, specifically includes: The fault classification loss is determined based on the predicted fault using the following formula: The domain classification loss is determined based on the predicted domain category using the following formula: ; The Timer model, fault classifier, and domain classifier are trained by minimizing the fault classification loss and maximizing the domain classification loss using the following formula: ; in, Classify losses for faults, For training samples i The actual fault category, For training samples i Predicted fault categories, For domain classification loss, For training samples i domain tags, For training samples i The predicted probability that is identified as data in the target domain. As a weighting factor, This represents the total loss.
5. The rolling bearing fault diagnosis method as described in claim 1, characterized in that, The adapter fine-tuning of the trained Timer model based on the target domain data specifically includes: Insert adapter modules into the Transformer encoders of each layer of the Timer model; The original model parameters of the Timer model after training are fixed, and the parameters in the inserted adapter module are trained based on the target domain data.
6. The rolling bearing fault diagnosis method as described in claim 1, characterized in that, The acquisition of source domain data and target domain data of rolling bearing vibration signals under various operating conditions as training samples specifically includes: Acquire source domain data and target domain data of vibration signals from rolling bearings under various operating conditions; The source domain data and the target domain data are sliced according to a sliding window to obtain multiple time sample sequences; For each time series sample, the time series is standardized based on the mean and standard deviation of the time series sample to obtain training samples.
7. The rolling bearing fault diagnosis method as described in claim 1, characterized in that, The method further includes: The model parameters are updated using the AdamW optimizer, and when the model performance improvement in a preset training round is less than a preset threshold, the learning rate for the current parameter update is reduced according to a preset factor.
8. A rolling bearing fault diagnosis device, characterized in that, include: The acquisition module is used to acquire source domain data and target domain data of vibration signals of rolling bearings under various working conditions as training samples; the source domain data and target domain data correspond to different bearing fault types or different combinations of working conditions. The classification module is used to input training samples into a pre-trained Timer model to obtain the time-series signal features of the training samples; The fault classifier classifies faults based on time-series signal characteristics to obtain predicted faults; the domain classifier classifies domains based on time-series signal characteristics to obtain predicted domain categories. The training module is used to determine the fault classification loss based on the predicted fault and the domain classification loss based on the predicted domain category, so as to train the Timer model to minimize the fault classification loss and maximize the domain classification loss. The fine-tuning module is used to fine-tune the adapter of the trained Timer model based on the target domain data; to perform meta-training of the fault classifier using model-independent meta-learning based on the source domain data, and to fine-tune the meta-trained fault classifier using the target domain data; wherein, the meta-training of the fault classifier using model-independent meta-learning based on the source domain data specifically includes: constructing rolling bearing diagnosis tasks corresponding to different working conditions based on the source domain data; determining the training samples corresponding to each rolling bearing diagnosis task and dividing them into a support set and a query set; performing several gradient descent operations on the initial parameters of the fault classifier using the support set corresponding to each rolling bearing diagnosis task to obtain the fault classifier parameters corresponding to each rolling bearing diagnosis task; determining the prediction loss of the fault classifier parameters corresponding to each rolling bearing diagnosis task using the query set corresponding to each rolling bearing diagnosis task, and training the initial parameters of the fault classifier with the optimization objective of minimizing the total prediction loss of each rolling bearing diagnosis task; The diagnostic module is used to input the vibration signal of the rolling bearing to be identified into the adapter's finely tuned Timer model to obtain the time-series signal characteristics, and then perform fault diagnosis based on the time-series signal characteristics through the finely tuned fault classifier.
9. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Self-learning-based unsupervised cross-working-condition bearing fault diagnosis method
CN115358259A