Intelligent bearing migration fault diagnosis method based on contrast coding domain invariant features

By comparing the intelligent bearing migration fault diagnosis method with invariant features in the coding domain, the one-dimensional convolutional neural network and autoregressive model are used to extract shared features, which solves the difficulty of data annotation and fault diagnosis of traditional supervised learning methods when bearing operating conditions change. It solves difficult problems and achieves efficient fault diagnosis under changing working conditions.

CN118603554APending Publication Date: 2024-09-06DONGGUAN UNIV OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410630219.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Traditional supervised learning methods in bearing fault diagnosis cannot be applied to fault diagnosis of bearings when working conditions change because data annotation relies on expert knowledge and is time-consuming. Especially in the short term, it is difficult to obtain fault data, resulting in the inability to construct effective faults. Diagnostic model.

Method used

The intelligent bearing migration fault diagnosis method (CPC-DIFEX) based on contrastive coding domain invariant features is used to compare the normal data of the source domain and the target domain through the contrastive coding model, extract shared feature representation, and use one-dimensional convolutional neural network and Autoregressive models for feature extraction and classification in unsupervised transfer learning.

Benefits of technology

This method can extract shared features in unlabeled data when the bearing operating conditions change, reduce noise information, improve the generalization ability and accuracy of fault diagnosis, and achieve effective fault diagnosis in the target domain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118603554A
    Figure CN118603554A
Patent Text Reader

Abstract

The invention relates to an intelligent bearing migration fault diagnosis method based on contrast code domain invariant features. The intelligent bearing migration fault diagnosis method comprises the following steps: collecting one-dimensional vibration signals of a bearing by using a vibration sensor under different working conditions; the method comprises the following steps: processing a collected original time domain signal, firstly cutting the signal, marking a fault category label on a small amount of data of a source domain, then preprocessing the data, converting a sample from a time domain to a frequency domain by using fast Fourier transform, and dividing a data set into training data and test data; building a one-dimensional convolutional neural network model and a comparison coding model; training a feature extractor by using unlabeled data of a source domain, training a classifier by means of a small amount of labeled data in the source domain, and migrating a model to a target domain; and inputting test data of the target domain into the model subjected to migration training, and checking the feature extraction capability and the fault classification effect of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of bearing fault diagnosis, and in particular to an intelligent bearing migration fault diagnosis method based on contrast coding domain invariant features. Background Art

[0002] Supervised learning fault diagnosis methods have achieved remarkable results in processing fully labeled bearing vibration datasets containing multiple fault categories. However, in actual scenarios, since data labeling relies on expert knowledge, the process of labeling a large amount of industrial field data is time-consuming and costly. This results in only a small amount of labeled data of different categories in the collected bearing fault data. At the same time, when the bearing operating conditions change, there is almost no fault data in the short term, and most of the data is normal data. Therefore, traditional supervised learning methods are not applicable to the construction of fault diagnosis models in this scenario. Summary of the invention

[0003] The purpose of the present invention is to provide an intelligent bearing migration fault diagnosis method (CPC-DIFEX) based on contrastive coding domain invariant features. Through the contrastive coding model, CPC-DIFEX can learn feature representations with domain invariance. The model compares normal data from two domains and minimizes the differences between them, thereby extracting representations that can capture shared features.

[0004] In unsupervised transfer learning research, the source domain is usually represented as: is the i-th sample, X S is the set of source domain samples, is the label of the i-th sample, Y S is the set of all labels, n s is the number of source domain samples. The target domain is usually expressed as: in is the i-th sample, X t is the set of all samples in the target domain, n t is the number of samples in the target domain. The source domain and the target domain follow probability distributions P and Q respectively, and we hope to establish a model β(·) that can classify the remaining unlabeled samples x in the target domain.

[0005] In actual production, rolling bearings run for a long time under normal working conditions (i.e., source domain), and a large amount of data can be collected. However, data annotation requires expert knowledge and is time-consuming and laborious. Therefore, there is only a very small amount of annotated data for each bearing fault. When the working conditions change, the running time of the bearing under the new working conditions is short, and it is difficult to obtain fault data. Only normal state data can be obtained. Therefore, the above target domain is modified as follows: in is the i-th sample, X t is the set of target domain samples, is the label of the i-th sample, L 0 is the label of the normal state data, n t is the number of samples in the target domain.

[0006] The technical solution of this method: a smart bearing migration fault diagnosis method based on contrast coding domain invariant features, including the following steps:

[0007] Step 1: Collect one-dimensional vibration signals of the bearing using a vibration sensor under different working conditions;

[0008] Step 2: Process the collected original time domain signal. First, cut the signal and label the fault category for a small amount of data in the source domain. Then preprocess the data and use fast Fourier transform to convert the samples from the time domain to the frequency domain. Then divide the data set into training data and test data.

[0009] Step 3: Build a one-dimensional convolutional neural network model and a contrast encoding model;

[0010] Step 4: Use the unlabeled data in the source domain to train the feature extractor. At the same time, use a small amount of labeled data in the source domain to train the classifier and transfer the model to the target domain.

[0011] Step 5: Use the test data of the target domain to input into the model that has been trained through transfer to test the model's feature extraction capability and fault classification effect.

[0012] Preferably, the bearing vibration signal collected by the sensor has time domain characteristics, and the time domain signal is converted into frequency domain representation by fast Fourier transform (FFT). Suppose a time domain input signal is x i , the frequency domain representation obtained after transformation is The process is as follows:

[0013]

[0014] The length of each time domain sample is set to 2048, and fast Fourier transform is applied to each sample. The frequency domain samples obtained after the transformation are symmetrical, so only half of the calculated results need to be retained, and the length of the frequency domain samples is finally changed to 1024. Finally, these processed frequency domain samples are used as the input of the model.

[0015] Preferably, the comparative prediction coding model extracts useful representation information from a large amount of unlabeled sample data, and compares this information with the representation information of future samples using a comparative learning method to obtain the key representation information that can best predict the future; the comparative prediction coding model includes a feature extractor Genc and an autoregressive model Gar, and the one-dimensional mechanical vibration signal sample x after data preprocessing is used as the input of the feature extractor Genc. For each sample segmented on the time window, the feature extractor Genc performs a mapping operation to convert it into a corresponding feature representation, and the mapping relationship is as follows:

[0016] z t =G enc (x t )

[0017] Feature representation z t As the input of the autoregressive model Gar, the model outputs c that can represent the contextual latent information t =Gar(z ≤t ), based on c t , predict future features z k (k=t+1,…,t+4); x t-3:t+4 is a continuous vibration signal sample, z t-3:t+4 It is the feature obtained by the feature extractor mapping the samples on each time window; the autoregressive model Gar learns the potential representation feature c of the context t , and for z t+1:t+4 To make predictions, in order to capture the shared information between the input signal x and the context representation c, their mutual dependence is quantified by maximizing the correlation between them; the definition is as follows:

[0018]

[0019] By maximizing the most discriminative mutual information between multiple encoding representations, the feature extractor can extract the common latent variables of the input data samples; the model retains x t+k and c t At the same time as the mutual information between them, a density function is established, which is defined as follows:

[0020]

[0021] According to f k (x t+k ,c t )Measure Z t+k The prediction accuracy of the model is thus freed from the high-dimensional data Modeling.

[0022] Preferably, InfoNCE is used to optimize the feature extractor and the autoregressive model simultaneously, and a random data sample X={x 1 ,…,x N}, which contains a t+k |c t ) and N-1 random positive samples from P(x t+k ) negative samples, the optimization objectives are as follows:

[0023]

[0024] The loss function in the formula is the classification cross entropy, where f k / ∑ x f k represents the predicted value of the model; at this moment, the best probability of model loss is p(d=i|X,c t ), where [d=i], x i is a positive sample, under conditional distribution, sample x i The probability of being sampled is as follows:

[0025]

[0026] f k (x t+k ,c t ) is proportional to p(x t+k |c t ) / p(x t+k ), the final result has nothing to do with the number of negative samples N-1. t With x t+k The mutual information has the following evaluation indicators:

[0027] I(x t+k ,c t )≥log(N)-L N

[0028] From the formula, we can see that by minimizing L N , which maximizes the lower bound of the mutual information.

[0029] Preferably, the feature extractor of the one-dimensional convolutional neural network model includes four convolution blocks, each of which consists of a convolution layer, a batch normalization layer and an activation layer. The flattening layer is located between the convolution block 4 and the fully connected layer, and is used to convert the multidimensional data into a one-dimensional vector so that it can be passed as input to the fully connected layer. In this model, the stride convolution method is adopted, and the stride of the convolution layer is set to 2 to reduce the length of the output sequence, thereby achieving the effect of replacing the pooling layer;

[0030] The feedforward calculation of the model is represented by the following mathematical expression:

[0031] H=Leaky relu(ω 1 X+b 1 )

[0032] Where X is the input vector, ω 1 is the weight matrix of the corresponding convolution kernel, b 1 is the bias, ω 1 and b 1 is the parameter matrix and bias vector between the input layer and the hidden layer;

[0033] O = Leaky relu (ω 2 H+b 2 )

[0034] Among them, O is the output vector, H is the hidden vector, ω 2 are the weight matrices of the corresponding convolution kernels, also called parameter matrices, b 2 is the bias, ω 1 and b 1 is the parameter matrix and bias vector between the input layer and the hidden layer, ω 2 and b 2 is the parameter matrix and bias vector between the hidden layer and the output layer;

[0035] Leaky relu (·) indicates that the activation function is Leaky relu, which acts on the output of the convolutional layer. By stacking multiple layers, the one-dimensional convolutional neural network effectively learns the local and global features in the sequence data and realizes the modeling and prediction of the sequence.

[0036] The classifier is a fully connected layer that uses the Softmax activation function to output the probability distribution of the category. The Softmax function expression is as follows:

[0037]

[0038] Assume an n-dimensional real vector (y 1 ,y 2 ,…,y n ) as the classifier input, and the mapping is (z 1 ,z 2 ,…,z n ), z n ∈(0,1), z 1 +z 2 +…+z n =1; through z n The value of determines the probability of each corresponding element in the output vector corresponding to the category, and the fault category is determined accordingly;

[0039] The cross entropy loss function is used in classification tasks to measure the difference between the probability distribution of the model output and the true label. The expression is as follows:

[0040]

[0041] Among them, x i represents the i-th training sample, y i represents the label corresponding to the i-th training sample, M represents the total number of samples, when the condition is true, the 1{·} function returns a value of 1; when the condition is false, the 1{·} function returns a value of 0; θ represents the parameter matrix of the Softmax activation function, θ j is the row vector corresponding to the matrix.

[0042] Preferably, a gated recurrent unit (GRU) is used in the Gar autoregressive model. The GRU extracts deep features of the input fault text vector and solves the problem of gradient disappearance or explosion by introducing two gating units, namely, an update gate and a reset gate. In the GRU, the reset gate determines the degree of forgetting of the previous hidden state for the current state. It generates a gating vector with a value range of 0 to 1 by weighting the previous hidden state and the current input data. By adjusting the value of the reset gate, the GRU selectively forgets or retains the previous hidden state information when processing sequence data to adapt to different contexts and task requirements. The reset gate expression is as follows:

[0043] R t =σ(W r ·[h t-1 ,x t ])

[0044] The update gate is used to control the influence of the input data of the current time step on the update of the internal state. The update gate determines the importance of the input data at the current time step by weighting the input data and the previous state. The update gate expression is as follows:

[0045] Z t =σ(W z ·[h t-1 ,x t ])

[0046] In GRU, the candidate state is a temporary state used to calculate the candidate value of the hidden state of the current time step; it is obtained by weighted and combined the previous hidden state with the current input data. The candidate state calculation formula of GRU is as follows:

[0047]

[0048] Hidden state expression:

[0049]

[0050] Among them, W z , W r , W h is the learnable weight, and σ is the Sigmoid activation function.

[0051] Preferably, the comparative predictive coding model after transfer training uses the first four feature extractors G enc To extract the high-level feature representation of the normal data in the source domain, the extracted features are then reduced in dimension by the encoder. Next, the autoregressive model GRU is used to slide on the input sequence to extract the feature c from the local context. t .

[0052] The technical effects of the present invention are:

[0053] Through the contrastive coding model, CPC-DIFEX is able to learn feature representations with domain invariance. The model compares normal data from two domains and minimizes the differences between them, thereby extracting representations that can capture shared features; by extracting useful representation information from a large amount of unlabeled sample data, and using contrastive learning methods to compare this information with the representation information of future samples to obtain the key representation information that can best predict the future, the goal of this model is to remove underlying noise and useless information irrelevant to the task, thereby learning representations that can encode different parts of high-dimensional signals.

[0054] GRU can extract deep features from the input fault text vector, and solve the problem of gradient vanishing or exploding by introducing two gating units, update gate and reset gate. GRU is derived from the long short-term memory neural network (LSTM), combining the concepts of forget gate and input gate. It has a simpler structure and simpler parameters, which enables GRU to more effectively encode the semantics of fault text. GRU is simpler than LSTM. Through the adjustment of these two gating units, it can more flexibly control the flow of information and the update of state, so as to better capture the long-term dependencies in sequence data. In terms of the number of parameters, GRU usually has fewer parameters than LSTM, which gives GRU certain advantages in computing efficiency and training speed.

[0055] The contrastive predictive coding model after transfer training uses the first four feature extractors G enc To extract high-level feature representations of normal data in the source domain. Then, the extracted features are reduced in dimension by the encoder. Next, the autoregressive model GRU is used to slide on the input sequence to extract features c from the local context. t; In the prediction phase, the last four feature extractors are used to extract high-level feature representations of normal data in the target domain. The model goal is to predict the features of the target domain based on the extracted source domain features; in order to encourage the model to learn more discriminative feature representations, a contrast loss function is used to compare the similarity between the predicted features and other sample features; the model learns the source domain normal data and the target domain normal data by comparison, and extracts the feature representations shared by the two domains. These feature representations have a certain generalization ability, which enables the model to perform fault diagnosis tasks in the target domain and still show good performance even when the working conditions change. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 Schematic diagram of the bearing migration fault diagnosis method based on contrast coding domain invariant features (CPC-DIFEX).

[0057] Figure 2 For comparison, the predictive coding model diagram is shown.

[0058] Figure 3 This is a convolutional neural network model diagram.

[0059] Figure 4 This is the structure diagram of the GRU gate control unit

[0060] Figure 5 A schematic diagram of the migration process.

[0061] Figure 6 Schematic diagram of domain invariant feature extraction DETAILED DESCRIPTION

[0062] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings. The description in this part is only exemplary and explanatory and should not have any limiting effect on the protection scope of the present invention.

[0063] In unsupervised transfer learning research, the source domain is usually represented as: is the i-th sample, X S is the set of source domain samples, is the label of the i-th sample, Y S is the set of all labels, n s is the number of source domain samples. The target domain is usually expressed as: in is the i-th sample, X t is the set of all samples in the target domain, n t is the number of samples in the target domain. The source domain and the target domain follow probability distributions P and Q respectively, and we hope to establish a model β(·) that can classify the remaining unlabeled samples x in the target domain.

[0064] In actual production, rolling bearings run for a long time under normal working conditions (i.e., source domain), and a large amount of data can be collected. However, data annotation requires expert knowledge and is time-consuming and laborious. Therefore, there is only a very small amount of annotated data for each bearing fault. When the working conditions change, the running time of the bearing under the new working conditions is short, and it is difficult to obtain fault data. Only normal state data can be obtained. Therefore, the above target domain is modified as follows: in is the i-th sample, X t is the set of target domain samples, is the label of the i-th sample, L 0 is the label of the normal state data, n t is the number of samples in the target domain.

[0065] 1) Establishment of bearing migration fault diagnosis model based on contrast coding domain invariant features

[0066] Aiming at the scenario where there are few labeled data under normal working conditions and there is almost no labeled fault data under the new working conditions within a short period of time after the working conditions change, a bearing migration fault diagnosis method based on contrast encoding domain invariant features is proposed; Figure 1 The process of the method is demonstrated. First, the vibration sensor collects the vibration signal of the bearing. During the collection process, ensure that the equipment operates normally and records data for a period of time to obtain sufficient vibration data for subsequent analysis and processing. The collected vibration signal data is stored in an appropriate medium, such as a computer hard disk or cloud storage. Next, the data is preprocessed and the time domain signal is converted into a frequency domain representation using a fast Fourier transform (FFT). This helps to better extract the frequency characteristics of the signal and prepare for subsequent feature extraction and classification. In this application, the bearing is considered under two working conditions, namely, conventional working conditions (source domain) and new working conditions (target domain). In the source domain, since most of the data are unlabeled, the following method is adopted: first, a large amount of unlabeled data is used to train the feature extractor on the source domain; then, a small amount of labeled data is used to train the classifier; finally, the trained model is migrated to the target domain, and the diagnostic effect of the model is evaluated through the test data in the target domain.

[0067] 2) Data preprocessing

[0068] The bearing vibration signal collected by the sensor has time domain characteristics. However, the time domain characteristics are not intuitive for fault diagnosis and analysis. By applying the fast Fourier transform (FFT), the time domain signal can be converted into a frequency domain representation. The model can better extract features from the frequency domain representation signal. Suppose one of the time domain input signals is x i , the frequency domain representation obtained after transformation is The process is as follows:

[0069]

[0070] In this application, the length of each time domain sample is set to 2048; then, fast Fourier transform is applied to each sample, and the frequency domain samples obtained after the transformation are symmetrical, so only half of the calculation results need to be retained, and the length of the frequency domain samples is finally changed to 1024; finally, these processed frequency domain samples are used as the input of the model.

[0071] 3) Comparison of predictive coding models

[0072] In scenarios where labeling is difficult and data is unbalanced, the comparative predictive coding model can effectively cope with the bearing fault diagnosis task. The model structure is as follows Figure 2 As shown. By extracting useful representation information from a large amount of unlabeled sample data, this information is compared with the representation information of future samples using a contrastive learning method to obtain the key representation information that can best predict the future. The goal of this model is to remove underlying noise and useless information that is irrelevant to the task, thereby learning a representation that can encode different parts of the high-dimensional signal.

[0073] Genc represents the feature extractor, Gar represents the autoregressive model, and the one-dimensional mechanical vibration signal sample x after data preprocessing is used as the input of the feature extractor Genc. For each sample segmented in the time window, the feature extractor Genc will perform a mapping operation to convert it into a corresponding feature representation. The mapping relationship is as follows:

[0074] z t =G enc (x t )#(3.2)

[0075] Feature representation z t As the input of the autoregressive model Gar, the model outputs c that can represent the contextual latent information t =Gar(z ≤t ), based on c t , the model can predict future features z k (k=t+1,…,t+4). t-3:t+4 is a continuous vibration signal sample, z t-3:t+4 It is the feature obtained by the feature extractor mapping the samples on each time window. The autoregressive model Gar learns the potential representation feature c of the context t , and for z t+1:t+4To make predictions, in order to ensure the prediction accuracy of the model, the feature extractor is forced to extract features that are discriminative and significant. In order to capture the shared information between the input signal x and the context representation c, the degree of their mutual dependence, namely mutual information, is quantified by maximizing the correlation between them. It is defined as follows:

[0076]

[0077] By maximizing the most discriminative mutual information between multiple encoding representations, the feature extractor can extract the common latent variables of the input data samples. t+k and c t At the same time as the mutual information between them, a density function is established, which is defined as follows:

[0078]

[0079] CPC uses a simple log-bilinear model to represent f:

[0080]

[0081] W in formula 3.5 k c t It means that for each step k, through the linear transformer W k Make predictions. k (x t+k ,c t )Measure Z t+k The prediction accuracy of the model is thus freed from the high-dimensional data Modeling.

[0082] 4) Loss Function

[0083] Using InfoNCE, we can optimize both the feature extractor and the autoregressive model. Consider a batch of N random data samples X = {x 1 ,…,x N}, which contains a t+k |c t ) and N-1 random positive samples from P(x t+k ) negative samples, the optimization objectives are as follows:

[0084]

[0085] The loss function in formula (3.6) is the categorical cross entropy, where f k / ∑ x f k represents the predicted value of the model. At this moment, the best probability of model loss is p(d=i|X,c t), where [d=i], x i is a positive sample. Under the conditional distribution, sample x i The probability of being sampled is as follows:

[0086]

[0087] In summary, f k (x t+k ,c t ) is proportional to p(x t+k |c t ) / p(x t+k ), the final result has nothing to do with the number of negative samples N-1. t With x t+k The mutual information has the following evaluation indicators:

[0088] I(x t+k , c t )≥log(N)-L N #(3.8)

[0089] From formula (3.8), we can see that by minimizing L N , which can maximize the lower bound of mutual information.

[0090] 5) Convolutional neural network model structure

[0091] The one-dimensional convolutional neural network model structure used by the CPC-DIFEX algorithm is as follows: Figure 3 As shown in Figure 3-1, the detailed parameters are shown in Table 3-1. The feature extractor of this model contains four convolution blocks, each of which consists of a convolution layer, a batch normalization layer, and an activation layer. The flattening layer is located between convolution block 4 and the fully connected layer, and is used to convert multidimensional data into a one-dimensional vector so that it can be passed as input to the fully connected layer. In this model, the stride convolution method is used, and the stride of the convolution layer is set to 2 to reduce the length of the output sequence, thereby achieving the effect of replacing the pooling layer.

[0092] The feedforward calculation of the model can be expressed by the following mathematical expression:

[0093] H=Leaky relu(ω 1 X+b 1 )#(3.9)

[0094] Where X is the input vector, ω 1 is the weight matrix of the corresponding convolution kernel, b 1 is the bias, ω 1 and b 1 is the parameter matrix and bias vector between the input layer and the hidden layer.

[0095] O = Leaky relu (ω 2 H+b 2 )#(3.10)

[0096] Among them, O is the output vector, H is the hidden vector, ω 2 are the weight matrices of the corresponding convolution kernels, also called parameter matrices, b 2 is the bias, ω 1 and b 1 is the parameter matrix and bias vector between the input layer and the hidden layer, ω 2 and b 2 is the parameter matrix and bias vector between the hidden layer and the output layer.

[0097] Leaky relu (·) indicates that the activation function is Leaky relu, which acts on the output of the convolutional layer. By stacking multiple layers, the one-dimensional convolutional neural network can effectively learn local and global features in sequence data and achieve modeling and prediction of sequences.

[0098] The classifier is a fully connected layer that uses the Softmax activation function to output the probability distribution of the category. The Softmax function expression is as follows:

[0099]

[0100] Assume an n-dimensional real vector (y 1 ,y 2 , ..., y n ) as the classifier input, and the mapping is (z 1 , z 2 , ..., z n ), z n ∈(0,1), z 1 +z 2 +...+z n = 1. Through z n The value of determines the probability of the corresponding category of each corresponding element in the output vector, and the fault category is determined accordingly.

[0101] The cross entropy loss function is usually used in classification tasks. It is used to measure the difference between the probability distribution of the model output and the true label. The expression is as follows:

[0102]

[0103] Among them, x i represents the i-th training sample, y irepresents the label corresponding to the i-th training sample, M represents the total number of samples, when the condition is true, the 1{·} function returns a value of 1; when the condition is false, the 1{·} function returns a value of 0. θ represents the parameter matrix of the Softmax activation function, θ j is the row vector corresponding to the matrix.

[0104] Table 3.1 Feature extractor structure parameters

[0105]

[0106]

[0107] 6) Autoregressive model

[0108] The gate-controlled recurrent unit (GRU) is used in the Gar autoregressive model, such as Figure 4 As shown in the figure, GRU can extract deep features of the input fault text vector, and solve the problem of gradient disappearance or explosion by introducing two gating units, update gate and reset gate. GRU is derived from the long short-term memory neural network (LSTM), combining the concepts of forget gate and input gate. It has a simpler structure and simpler parameters, which enables GRU to semantically encode fault text more effectively.

[0109] The GRU model structure is as follows Figure 4 As shown in the figure, in GRU, the reset gate determines the degree of forgetting of the previous hidden state for the current state. It generates a gating vector ranging from 0 to 1 by weighting the previous hidden state and the current input data. By adjusting the value of the reset gate, GRU can selectively forget or retain the previous hidden state information when processing sequence data to adapt to different contexts and task requirements. The reset gate expression is as follows:

[0110] R t =σ(W r ·[h t-1 , x r ])#(3.13)

[0111] The update gate is used to control the influence of the input data of the current time step on the update of the internal state. The update gate determines the importance of the input data at the current time step by weighting the input data and the previous state. The update gate expression is as follows:

[0112] Z t =σ(W z ·[h t-1 , x t ])#(3.14)

[0113] In GRU, the candidate state is a temporary state used to calculate the candidate value of the hidden state at the current time step. It is obtained by weighted summing the previous hidden state with the current input data. The candidate state calculation formula of GRU is as follows:

[0114]

[0115] Hidden state expression:

[0116]

[0117] Among them, W z , W r , W h is the learnable weight, and σ is the Sigmoid activation function.

[0118] In summary, GRU is simpler than LSTM. Through the adjustment of these two gating units, it can more flexibly control the flow of information and the update of state, thereby better capturing the long-term dependencies in sequence data. In terms of the number of parameters, GRU usually has fewer parameters than LSTM, which gives GRU certain advantages in computational efficiency and training speed.

[0119] 7) Transfer training

[0120] Contrastive predictive coding has the ability to extract significant features from a large number of unlabeled data samples. When the fault information is limited, the feature extractor is first trained with a large amount of unlabeled data in the source domain to learn a high-level representation of the data. At the same time, the classifier is trained with the help of a small amount of labeled data in the source domain. Subsequently, the trained model is transferred to the target domain, where the target domain contains only normal data. By comparing the normal data in the source domain with the normal data in the target domain, the model can extract features that are not affected by changes in the data domain. These features have good invariance, allowing the model to perform fault diagnosis tasks in the target domain and show excellent performance.

[0121] like Figure 6 As shown, the contrastive predictive coding model after transfer training uses the first four feature extractors G enc To extract high-level feature representations of normal data in the source domain. Then, the extracted features are reduced in dimension by the encoder. Next, the autoregressive model GRU is used to slide on the input sequence to extract features c from the local context. t. In the prediction phase, the last four feature extractors are used to extract high-level feature representations of the target domain normal data. The model goal is to predict the features of the target domain based on the extracted source domain features. In order to encourage the model to learn more discriminative feature representations, a contrast loss function is used to compare the similarity between the predicted features and other sample features. The model learns the source domain normal data and the target domain normal data by comparison, and extracts feature representations shared by the two domains. These feature representations have a certain generalization ability, which enables the model to perform fault diagnosis tasks in the target domain and show good performance even when the working conditions change.

[0122] 8) Overall experimental steps

[0123] 1. Be familiar with the experimental device and build the experimental platform, then design the data acquisition plan and use the vibration sensor to collect the one-dimensional vibration signal of the bearing under different working conditions.

[0124] 2. Process the collected original time domain signals. First, cut the signals and label the fault categories for a small amount of data in the source domain. Then preprocess the data, use fast Fourier transform to convert samples from the time domain to the frequency domain, and divide the data set into training data and test data according to the ratio.

[0125] 3. Build a one-dimensional convolutional neural network model and contrast coding model.

[0126] 4. Use the unlabeled data in the source domain to train the feature extractor, and at the same time, use a small amount of labeled data in the source domain to train the classifier. Transfer the model to the target domain.

[0127] 5. Use the test data of the target domain to input into the model that has been trained through transfer to test the model’s feature extraction capability and fault classification effect.

[0128] It should be noted that, in this article, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus.

[0129] This article uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only used to help understand the method and core ideas of the present invention. The above is only a preferred implementation of the present invention. It should be pointed out that due to the limitations of textual expression and the objective existence of infinite specific structures, ordinary technicians in this technical field can make several improvements, modifications or changes without departing from the principles of the present invention, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the inventive concept and technical solution to other occasions without improvement, should be regarded as the protection scope of the present invention.

Claims

1. A smart bearing migration fault diagnosis method based on contrast coding domain invariant features, characterized in that: The steps include: Step 1: Collect one-dimensional vibration signals of the bearing using a vibration sensor under different working conditions; Step 2: Process the collected original time domain signal. First, cut the signal and label the fault category for a small amount of data in the source domain. Then preprocess the data and use fast Fourier transform to convert the samples from the time domain to the frequency domain. Then divide the data set into training data and test data. Step 3: Build a one-dimensional convolutional neural network model and a contrast encoding model; Step 4: Use the unlabeled data in the source domain to train the feature extractor. At the same time, use a small amount of labeled data in the source domain to train the classifier and transfer the model to the target domain. Step 5: Use the test data of the target domain to input into the model that has been trained through transfer to test the model's feature extraction capability and fault classification effect.

2. The intelligent bearing migration fault diagnosis method based on contrast coding domain invariant features according to claim 1 is characterized in that: The bearing vibration signal collected by the sensor has time domain characteristics. Fast Fourier Transform (FFT) is used to convert the time domain signal into frequency domain representation. Suppose one of the time domain input signals is x i , the frequency domain representation obtained after transformation is The process is as follows: The length of each time domain sample is set to 2048, and fast Fourier transform is applied to each sample. The frequency domain samples obtained after the transformation are symmetrical, so only half of the calculated results need to be retained, and the length of the frequency domain samples is finally changed to 1024. Finally, these processed frequency domain samples are used as the input of the model.

3. The intelligent bearing migration fault diagnosis method based on contrast coding domain invariant features according to claim 1 is characterized in that: The contrastive prediction coding model extracts useful representation information from a large amount of unlabeled sample data, and uses contrastive learning methods to compare this information with the representation information of future samples to obtain the key representation information that can best predict the future. The contrastive prediction coding model includes a feature extractor Genc and an autoregressive model Gar. The one-dimensional mechanical vibration signal sample x that has undergone data preprocessing is used as the input of the feature extractor Genc. For each sample segmented in the time window, the feature extractor Genc will perform a mapping operation to convert it into a corresponding feature representation. The mapping relationship is as follows: z t =G enc (x t ) Feature representation z t As the input of the autoregressive model Gar, the model outputs c that can represent the contextual latent information t =Gar(z ≤t ), based on c t , predict future features z k (k=t+1, ..., t+4); x t-3:t+4 is a continuous vibration signal sample, z t-3:t+4 It is the feature obtained by the feature extractor mapping the samples on each time window; the autoregressive model Gar learns the potential representation feature c of the context t , and for z t+1:t+4 To make predictions, in order to capture the shared information between the input signal x and the context representation c, their mutual dependence is quantified by maximizing the correlation between them; the definition is as follows: By maximizing the most discriminative mutual information between multiple encoding representations, the feature extractor can extract the common latent variables of the input data samples; the model retains x t+k and c t At the same time as the mutual information between them, a density function is established, which is defined as follows: According to f k (x t+k , c t )Measure Z t+k The prediction accuracy of the model is thus freed from the high-dimensional data Modeling.

4. The intelligent bearing migration fault diagnosis method based on contrast coding domain invariant features according to claim 3 is characterized in that: Using InfoNCE to optimize the feature extractor and the autoregressive model simultaneously, a random data sample X = {x1, ..., x N }, which contains a t+k |c t ) and N-1 random positive samples from P(x t+k ) negative samples, the optimization objectives are as follows: The loss function in the formula is the classification cross entropy, where f k / ∑ x f k represents the predicted value of the model; at this moment, the best probability of model loss is p(d=i|X,c t ), where [d=i], x i is a positive sample, under conditional distribution, sample x i The probability of being sampled is as follows: f k (x t+k , c t ) is proportional to p(x t+k |c t ) / p(x t+k ), the final result has nothing to do with the number of negative samples N-1. t With x t+k The mutual information has the following evaluation indicators: I(x t+k ,c t )≥log(N)-L N From the formula, we can see that by minimizing L N , which maximizes the lower bound of the mutual information.

5. The intelligent bearing migration fault diagnosis method based on contrast coding domain invariant features according to claim 4 is characterized in that: The feature extractor of the one-dimensional convolutional neural network model contains four convolution blocks, each of which consists of a convolution layer, a batch normalization layer, and an activation layer. The flattening layer is located between the convolution block 4 and the fully connected layer, which is used to convert the multidimensional data into a one-dimensional vector so that it can be passed as input to the fully connected layer. In this model, the stride convolution method is adopted, and the stride of the convolution layer is set to 2 to reduce the length of the output sequence, thereby achieving the effect of replacing the pooling layer. The feedforward calculation of the model is represented by the following mathematical expression: H=Leaky relu(ω1X+b1) Where X is the input vector, ω1 is the weight matrix of the corresponding convolution kernel, b1 is the bias, ω1 and b1 are the parameter matrix and bias vector between the input layer and the hidden layer; O=Leaky relu(ω2H+b2) Among them, O is the output vector, H is the hidden vector, ω2 is the weight matrix of the corresponding convolution kernel, also known as the parameter matrix, b2 is the bias, ω1 and b1 are the parameter matrix and bias vector between the input layer and the hidden layer, ω2 and b2 are the parameter matrix and bias vector between the hidden layer and the output layer; Leaky relu (·) indicates that the activation function is Leaky relu, which acts on the output of the convolutional layer. By stacking multiple layers, the one-dimensional convolutional neural network effectively learns the local and global features in the sequence data and realizes the modeling and prediction of the sequence. The classifier is a fully connected layer that uses the Softmax activation function to output the probability distribution of the category. The Softmax function expression is as follows: Assume an n-dimensional real vector (y1, y2, ..., y n ) as the classifier input, mapping (z1, z2, ..., z n ), z n ∈(0,1),z1+z2+...+z n =1; through z n The value of determines the probability of each corresponding element in the output vector corresponding to the category, and the fault category is determined accordingly; The cross entropy loss function is used in classification tasks to measure the difference between the probability distribution of the model output and the true label. The expression is as follows: Among them, x i represents the i-th training sample, y i represents the label corresponding to the i-th training sample, M represents the total number of samples, when the condition is true, the 1{·} function returns a value of 1; when the condition is false, the 1{·} function returns a value of 0; θ represents the parameter matrix of the Softmax activation function, θ j is the row vector corresponding to the matrix.

6. The intelligent bearing migration fault diagnosis method based on contrast coding domain invariant features according to claim 5 is characterized in that: The GRU (Gated Recurrent Unit) is used in the Gar autoregressive model. The GRU extracts deep features from the input fault text vector and solves the problem of gradient disappearance or explosion by introducing two gating units, the update gate and the reset gate. In the GRU, the reset gate determines the degree of forgetting of the previous hidden state for the current state. It generates a gating vector with a value range of 0 to 1 by weighting the previous hidden state and the current input data. By adjusting the value of the reset gate, the GRU selectively forgets or retains the previous hidden state information when processing sequence data to adapt to different contexts and task requirements. The reset gate expression is as follows: R t =σ(W r ·[h t-1 ,x t ]) The update gate is used to control the influence of the input data of the current time step on the update of the internal state. The update gate determines the importance of the input data at the current time step by weighting the input data and the previous state. The update gate expression is as follows: Z t =σ(W z ·[h t-1 ,x t ]) In GRU, the candidate state is a temporary state used to calculate the candidate value of the hidden state of the current time step; it is obtained by weighted and combined the previous hidden state with the current input data. The candidate state calculation formula of GRU is as follows: Hidden state expression: Among them, W z , W r , W h is the learnable weight, and σ is the Sigmoid activation function.

7. The intelligent bearing migration fault diagnosis method based on contrast coding domain invariant features according to claim 6 is characterized in that: The contrastive predictive coding model after transfer training uses the first four feature extractors G enc To extract the high-level feature representation of the normal data in the source domain, the extracted features are then reduced in dimension by the encoder. Next, the autoregressive model GRU is used to slide on the input sequence to extract the feature c from the local context. t .

Citation Information

Cited By

  • Bearing vibration signal processing model construction method, model and signal classification method

    CN119669825A

  • Bearing vibration signal processing model construction method, model and signal classification method

    CN119669825B