Bearing fault diagnosis method and device, computer equipment and storage medium

By building a bearing fault diagnosis model using patch converter and Softmax classifier, using positive and negative sample comparison learning and Euclidean distance optimization, the impact of data drift on fault diagnosis is solved and the accuracy of bearing fault diagnosis is improved.

CN118940104APending Publication Date: 2024-11-12CHINA UNIV OF MINING & TECH
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410976534.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-20
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

When facing data drift problems, existing bearing fault diagnosis technology is difficult to effectively reduce its negative impact on fault diagnosis results, especially in actual industrial scenarios, bearing vibration signal data collected due to the impact of working environment and operating conditions. This causes the long-term data distribution of the same fault type to change, and the data distribution of different fault types to have the same characteristics, direct feature extraction analysis cannot effectively solve this problem.

Method used

Using a bearing fault diagnosis method, by constructing a fault diagnosis model including feature extraction module and feature classification module, the patch converter Patch-Transformer and Softmax classifier are introduced, and the feature extraction module is optimized by using positive and negative sample comparison to learn and optimize the feature extraction module through Euclidean distance Optimize feature extraction and classification, combine Fourier feature extractor and multi-layer perceptron for feature extraction and classification, ensuring global and local features for long-term data.

Benefits of technology

Through comparative learning, narrowing the differences between positive samples and amplifying the differences in feature between negative samples, improving the accuracy of fault diagnosis, effectively solving the data drift problem, achieving more comprehensive feature extraction and higher diagnostic accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940104A_ABST
    Figure CN118940104A_ABST
Patent Text Reader

Abstract

The invention provides a bearing fault diagnosis method and device, computer equipment and a storage medium, and belongs to the field of mechanical equipment fault diagnosis, and the method comprises the steps: obtaining a training sample; constructing a fault diagnosis model; training the fault diagnosis model, wherein sample features are extracted; the Euclidean distance between the features is determined, the comparison loss is determined through the Euclidean distance, and the feature extraction module is optimized according to the comparison loss; acquiring a long time sequence vibration signal of the target bearing; and determining a fault reason through the fault diagnosis model. Therefore, the common features of the same fault type data of the bearing and the feature difference of different fault type data are fully learned by constructing positive and negative samples, the difference between the positive sample pairs due to the data drift problem is reduced through comparative learning, and the feature difference between the negative sample pairs can also be amplified; therefore, the problem of data drift existing in data collected in an actual industrial scene can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of mechanical equipment fault diagnosis, and in particular relates to a bearing fault diagnosis method, device, computer equipment and storage medium. Background Art

[0002] With the rapid development of computer technology and sensor technology, a large amount of bearing signal data has been collected and sorted for research on data-based intelligent fault diagnosis technology. Among the existing fault diagnosis technologies, traditional signal analysis theory and data-driven intelligent fault diagnosis technology are the most prominent.

[0003] Traditional signal analysis theory usually gives priority to the characteristics of the signal, such as linear or nonlinear, stationary or nonstationary, bounded or unbounded, etc. Then, signal processing methods such as time domain analysis, frequency domain analysis, time-frequency analysis or blind source separation are used to analyze the statistical characteristics of the signal, and diagnostic decisions are made based on prior knowledge of the healthy system to achieve fault diagnosis.

[0004] Common machine learning theories and methods used in intelligent fault diagnosis technology include artificial neural networks, support vector machines (SVM) and K nearest neighbors (KNN). These fault diagnosis methods can be divided into three steps: data acquisition, artificial feature extraction and health status identification. Data acquisition refers to the use of sensors installed on the machine to continuously collect the operating data of the equipment, artificial feature extraction uses time domain analysis and frequency domain analysis to extract fault features, and fault identification uses artificial neural networks, support vector machines and K nearest neighbors and other diagnostic algorithms to identify the health status of the machine.

[0005] However, since the bearing vibration signal data collected in actual industrial scenarios is affected by conditions such as the working environment and staff operations, the distribution of long time series data of the same fault type collected on the same bearing may change. In addition, for different fault types of the same bearing, the distribution of data collected by the sensor will also have some common characteristics. Therefore, the existing fault diagnosis technology directly performs feature extraction and analysis on these long time series data, and cannot effectively reduce the negative impact of data drift problems. Summary of the invention

[0006] In order to solve the problem that the above-mentioned data drift has a negative impact on the fault diagnosis result, the present invention provides a bearing fault diagnosis method, device, computer equipment and storage medium.

[0007] In order to achieve the above object, the present invention provides the following technical solutions:

[0008] In the first aspect, the present invention provides a bearing fault diagnosis method, including: obtaining training samples for bearing fault diagnosis; the training samples include sample fault vibration signals in a long time series state and their corresponding fault types; constructing a fault diagnosis model, the fault diagnosis model including a feature extraction module and a feature classification module; introducing a patch transformer Patch-Transformer in a Fourier feature extractor, using an improved Fourier feature extractor as a feature extraction module, and constructing a Softmax classifier as a feature classification module; training the fault diagnosis model through the training samples, specifically including: extracting features from the sample fault vibration signal through the feature extraction module to obtain sample features; determining The Euclidean distance between positive sample features and the Euclidean distance between negative sample features are used to determine the contrast loss of positive sample features and negative sample features respectively, and the feature extraction module is optimized according to the contrast loss; the positive sample features represent sample features corresponding to the same fault cause, and the negative sample features represent sample features corresponding to different fault causes; the sample features are input into the feature classification module to obtain predicted faults, and the feature classification module is trained with the goal of minimizing the deviation between the predicted faults and the fault types; the long-time series vibration signal of the target bearing is obtained; the long-time series vibration signal of the target bearing is input into the trained fault diagnosis model, the fault type is output, and the fault cause is determined according to the fault type.

[0009] Optionally, the feature extraction module is used to extract features from the training samples to obtain sample features, including: performing patch segmentation on the input sample fault signal through the Patch-Transformer module, determining an embedded representation of the segmented fault signal, and position encoding the embedded representation according to the temporal order before segmentation to obtain the sample features; the formula of the position encoding process is as follows:

[0010] x p =W pro x i +W pos

[0011] Among them, x i represents the fault signal after segmentation, x p Represents x i The high-dimensional feature representation after position encoding, that is, the sample feature, W pro represents the trainable linear parameter matrix, W pos represents the position encoding matrix.

[0012] Optionally, the embedded representation of the segmented fault signal is determined by linear projection, and the linear projection process includes: using different projection matrices to perform linear projection on the segmented fault signal to obtain a query matrix Q, a key matrix K, and a value matrix V respectively:

[0013]

[0014] in, and Respectively represent the learnable linear parameter matrices corresponding to Q, K and V; perform Fourier transform on Q, K and V, and determine the Fourier self-attention output FA(x p ), that is, the parameter combination of linear projection, the formula is as follows:

[0015]

[0016] F(·) represents the Fourier transform, F -1 (·) represents the inverse Fourier transform, Softmax(·) represents the Softmax function, K T The transposed matrix representing the key matrix K; a preset number of Fourier self-attention outputs are obtained through the Fourier multi-head attention mechanism, and the parameter combination is weighted to obtain x p The multi-parameter weighted combination of is as follows:

[0017] MFA(x p )=[FA1(x p ),FA2(x p ),···,FA h (x p )]W0+x p

[0018] Among them, MFA(x p ) represents x p W0 represents the linear projection of multiple heads in series, and h represents the preset number.

[0019] Optionally, the method further includes: adding a multi-layer perceptron MLP to the Patch-Transformer module, extracting global features through linear projection using a Fourier multi-head attention mechanism, and then extracting features of local information of the fault signal through the MLP.

[0020] Optionally, the Euclidean distance Determined by the following formula:

[0021]

[0022] in, and represents two different features, and f(·) represents the feature extraction module.

[0023] Optionally, the contrast loss of the positive sample features and the negative sample features are determined respectively by the Euclidean distance, and the feature extraction module is optimized according to the contrast loss, including: determining the positive sample loss according to the Euclidean distance between the positive sample features, and determining the negative sample loss according to the Euclidean distance between the negative sample features; optimizing the feature extraction module with the goal of minimizing the positive sample loss and maximizing the negative sample loss.

[0024] Optionally, training the feature classification module with the goal of minimizing the deviation between the predicted fault and the fault type includes: constructing a loss function between the predicted fault and the fault type; training the feature classification module with the goal of minimizing the loss value of the loss function, and determining that the training is completed when the loss value is less than or equal to a preset loss value.

[0025] In a second aspect, the present invention further provides a bearing fault diagnosis device, comprising:

[0026] The acquisition module is used to acquire training samples for bearing fault diagnosis; the training samples include sample fault vibration signals in a long time series state and their corresponding fault types.

[0027] A construction module is used to construct a fault diagnosis model, wherein the fault diagnosis model includes a feature extraction module and a feature classification module; a patch transformer Patch-Transformer is introduced into the Fourier feature extractor, the improved Fourier feature extractor is used as the feature extraction module, and a Softmax classifier is constructed as the feature classification module.

[0028] The training module is used to train the fault diagnosis model through training samples, specifically including: extracting features of sample fault vibration signals through a feature extraction module to obtain sample features; determining the Euclidean distance between positive sample features and the Euclidean distance between negative sample features, determining the contrast loss of positive sample features and negative sample features respectively through the Euclidean distance, and optimizing the feature extraction module according to the contrast loss; the positive sample features represent sample features corresponding to the same fault cause, and the negative sample features represent sample features corresponding to different fault causes; the sample features are input into the feature classification module to obtain predicted faults, and the feature classification module is trained with the goal of minimizing the deviation between the predicted faults and the fault types.

[0029] The diagnostic module is used to obtain the long-time vibration signal of the target bearing; input the long-time vibration signal of the target bearing into the trained fault diagnosis model, output the fault type, and determine the fault cause according to the fault type.

[0030] In a third aspect, the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned bearing fault diagnosis method are implemented.

[0031] In a fourth aspect, the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned bearing fault diagnosis method when executing the program.

[0032] By adopting the above scheme, positive and negative samples are constructed to fully learn the common features of the same fault type data of the bearing and the feature differences of different fault type data. The differences between the positive sample pairs due to the data drift problem can be narrowed by comparative learning. Similarly, the feature differences between the negative sample pairs can be amplified, thereby solving the data drift problem existing in the data collected in actual industrial scenarios. In addition, by introducing Patch-Transformer in the Fourier feature extractor to perform patch segmentation on the long time series bearing vibration signal data, not only the global information of the long time series data is considered, but also the dependency between the local features of the bearing fault data is considered, thereby achieving more comprehensive feature extraction, which is conducive to improving the accuracy of fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiment of the present invention and its design scheme, the following briefly introduces the drawings required for this embodiment. The drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0034] Figure 1 The present invention is a flow chart of a bearing fault diagnosis method provided according to an exemplary embodiment of the present invention.

[0035] Figure 2 It is a schematic diagram of the structure of a fault diagnosis model provided according to an exemplary embodiment of the present invention.

[0036] Figure 3 The present invention is a block diagram of a bearing fault diagnosis device provided according to an exemplary embodiment. DETAILED DESCRIPTION

[0037] In order to enable those skilled in the art to better understand the technical solution of the present invention and implement it, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the scope of protection of the present invention.

[0038] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0039] First, the present invention provides a bearing fault diagnosis method. Figure 1 As shown, the following steps are included:

[0040] S101. Obtain training samples for bearing fault diagnosis.

[0041] The training samples include sample fault vibration signals in a long time series state and their corresponding fault types.

[0042] Specifically, the distribution of the bearing signal data collected by the sensor itself has commonalities and differences. Although there is a data drift problem in long-term bearing data, the commonalities between data of the same fault type are still greater than the differences, and the commonalities between data of different fault types are smaller than the differences. Therefore, unlike the typical contrastive learning paradigm based on data enhancement, the sample pair construction method proposed in the present invention directly utilizes the intrinsic characteristics of the bearing signal data distribution. Different samples of the same fault type are constructed into positive sample pairs, and different samples of different fault types are constructed into negative sample pairs. That is, for any two samples {x i ,x j}, if y i =y j , then they are positive samples to each other, where y i and j Respectively represent the corresponding x i and x j The cause of the failure is recorded as Where i≠j, u is the same type of fault. i ≠y j , then they are each other's negative samples, recorded as Where i≠j, u and v are different fault types. In order to improve the stability of training, the present invention keeps the number of positive sample pairs and negative sample pairs consistent. The present invention takes the one with fewer sample pairs as the benchmark from the constructed positive and negative sample pairs, and arbitrarily and evenly selects an equal number of sample pairs from the other side for training.

[0043] S102: Construct a fault diagnosis model.

[0044] Among them, the fault diagnosis model includes a feature extraction module and a feature classification module. The patch transformer Patch-Transformer is introduced in the Fourier feature extractor, the improved Fourier feature extractor is used as the feature extraction module, and the Softmax classifier is constructed as the feature classification module.

[0045] In addition, in order to enable the fault diagnosis model to understand the data more comprehensively while avoiding the risk of overfitting, a Fourier multi-head attention mechanism is added to the Transformer layer of the Patch-Transformer module.

[0046] Furthermore, in order to enable the feature extraction module to achieve more complex nonlinear mapping for non-stationary bearing data, a multilayer perceptron module with Gaussian error linear unit activation function and residual connection is added to the Transformer layer.

[0047] S103: training the fault diagnosis model.

[0048] In this step, the fault diagnosis model is trained through training samples, which specifically includes two parts.

[0049] In the first part, the feature extraction module is trained, including: extracting features of the sample fault vibration signal through the feature extraction module to obtain sample features; determining the Euclidean distance between the positive sample features and the Euclidean distance between the negative sample features, determining the contrast loss of the positive sample features and the negative sample features respectively through the Euclidean distance, and optimizing the feature extraction module according to the contrast loss, the positive sample features represent the sample features corresponding to the same fault cause, and the negative sample features represent the sample features corresponding to different fault causes.

[0050] In a possible implementation, firstly, the input sample fault signal is patch segmented through a Patch-Transformer module.

[0051] For example, a training sample set X = {x1, x2, ..., x N}, the present invention represents the i-th univariate sequence of length L starting from time index 1 as Where i = 1, 2, ..., N, each input sample fault signal x i Divide into M patches with step size S and length P, as shown in the following formula:

[0052]

[0053] If there is redundant data, the present invention will pad the last redundant data with 0. By dividing the original sequence data into patches, the number of input tokens can be reduced from L to approximately L / S. Then the memory usage and computational complexity of the attention mechanism are reduced quadratically. Therefore, under the constraints of training time and GPU memory, patch design allows the model to see a longer historical sequence, and can capture the local semantic information of the sequence data while modeling the global sequence.

[0054] Secondly, the embedded representation of the segmented fault signal is determined, and the embedded representation is positionally encoded according to the temporal order before segmentation to obtain sample features.

[0055] For example, after performing patch segmentation on the sample fault signal, the present invention keeps the order of the original time series data unchanged and splices the segmented sample fault signal to obtain Among them, P is the length of a time subsequence, M is the number of patches obtained by segmenting a sample, and R P×M is a real number matrix of P×M dimensions. The present invention requires x i Convert to the specified input format sequence of the Transformer layer, that is, use linear projection to map the segmented patch sequence (i.e., the spliced ​​sample fault signal) into a high-dimensional embedding space. In addition, for time series data, the local position information represents the corresponding time order, so it is crucial to label the local position information of each patch. However, the self-attention layer in the Transformer architecture cannot inherently retain this position information. At the same time, for the linear projection embedding method, the sequential relationship of the input sequence is ignored, so in order to enhance the time position information of the time series input, the patch sequence needs to be positionally encoded. The formula for the position encoding process is as follows:

[0056] x p =W pro x i +W pos

[0057] Among them, x i represents the fault signal after segmentation, x p ∈R D×N Represents x i The high-dimensional feature representation after position encoding, that is, the sample feature, W pro ∈R D×P represents the trainable linear parameter matrix, W pos ∈R D×N represents the position encoding matrix, R D×N Represents a real matrix of dimension D×N.

[0058] In addition, in the feature extraction model, the input bearing sequence data needs to be categorized so that it can be used as the final output prediction category. The category tagging used in the present invention refers to the category tagging method in BERT, and the initialized trainable category code is embedded at the beginning of the sample feature, so that the present invention can obtain an input sequence of length M+1 The subsequent Transformer model will fuse and extract information from the category tag to obtain a feature representation for the entire input sequence.

[0059] In one embodiment, the embedded representation of the segmented fault signal may be determined by linear projection.

[0060] For example, different projection matrices may be used to perform linear projection on the segmented fault signal to obtain the query matrix Q, the key matrix K, and the value matrix V respectively:

[0061]

[0062] in, and Respectively represent the learnable linear parameter matrices corresponding to Q, K and V;

[0063] Perform Fourier transform on Q, K and V, and determine the Fourier self-attention output FA(x p ), which is the parameter combination of linear projection.

[0064] For example, the calculated Q, K, and V are Fourier transformed, and then the dot product of the transformed Q and K is calculated and divided by the scaling factor to characterize the similarity of the segmented fault signal. The calculated Q, K, and V are normalized at a rate of 0.1 through the Softmax function and Dropout, and finally the normalized result is multiplied by the Fourier transformed V to obtain the self-attention output, and finally the output is inverse Fourier transformed to obtain the final Fourier self-attention output, the formula is as follows:

[0065]

[0066] F(·) represents the Fourier transform, F -1 (·) represents the inverse Fourier transform, Softmax(·) represents the Softmax function, K T represents the transposed matrix of the key matrix K.

[0067] In addition, in order to enable the fault diagnosis model to understand the data more comprehensively while avoiding the risk of overfitting, the Fourier multi-head attention mechanism can be introduced in the Patch-Transformer module.

[0068] Specifically, the above projection operation is performed a preset number of times through the Fourier multi-head attention mechanism to obtain a preset number of Fourier self-attention outputs, and the parameter combination is weighted to obtain x p The multi-parameter weighted combination of is as follows:

[0069] MFA(x p )=[FA1(x p ),FA2(x p ),…,FA h (x p)]W0+x p

[0070] Among them, MFA(x p ) represents x p W0 represents the linear projection of multiple heads in series, and h represents the preset number.

[0071] Preferably, in order to further improve the accuracy of the fault diagnosis model, a multi-layer perceptron MLP is added to the Patch-Transformer module, such as Figure 2 As shown in the figure, after linear projection is performed through the Fourier multi-head attention mechanism to extract global features, the features of the local information of the fault signal are extracted through MLP.

[0072] Specifically, a multilayer perceptron module with Gaussian error linear unit GELU activation function and residual connection is added to the Transformer layer. The output of the Fourier multi-head attention is first residually connected to the input of the Transformer layer and normalized, and then the normalized data is transformed by two MLP nonlinear transformations. The number of neurons in the two layers of MLP is equal to the embedding dimension D and 2D of the signal, respectively. A dropout operation with a rate of 0.01 is added to each nonlinear mapping. The GELU activation function is applied to the nonlinear activation in the MLP, as shown in the following formula:

[0073]

[0074] In another possible implementation, the positive sample loss is determined according to the Euclidean distance between the positive sample features, and the negative sample loss is determined according to the Euclidean distance between the negative sample features; the feature extraction module is optimized with the goal of minimizing the positive sample loss and maximizing the negative sample loss.

[0075] Specifically, the sample fault signal is extracted through the feature extraction module f(x i ) The extracted feature is z i After obtaining the sample features, the Euclidean distance is used to measure the similarity between the features. The smaller the distance between two features, the higher the similarity. and The Euclidean distance between It can be calculated using the following formula:

[0076]

[0077] in, and Characterize two different sample fault signals, and represents two different features, f(·) represents the feature extraction module, and ||·||2 represents the Euclidean distance calculation between two different features.

[0078] For positive sample pairs, the optimization goal is to shorten the distance between positive sample pairs and maximize sample similarity. Therefore, the positive sample loss is determined according to the Euclidean distance between the positive sample features. The positive sample loss can be calculated using the following formula:

[0079]

[0080] For negative sample pairs, the optimization goal is to increase the distance between negative sample pairs and minimize sample similarity, that is, to maximize the Euclidean distance. However, if the Euclidean distance between the features of negative sample pairs is not limited, the training may not converge. The present invention limits the Euclidean distance between the features of negative sample pairs to no more than 1. Therefore, the negative sample loss is determined based on the Euclidean distance between the features of negative samples. The loss between negative sample pairs can be calculated using the following formula:

[0081]

[0082] The second part is to train the feature classification module, including: inputting sample features into the feature classification module to obtain predicted faults, and training the feature classification module with the goal of minimizing the deviation between the predicted faults and the fault types.

[0083] For example, the sample fault vibration signal is input into the feature extraction module, and the extracted sample features are input into the feature classification module, the predicted fault of the sample fault vibration signal is obtained, and a loss function between the predicted fault and the fault type is constructed. By calculating the loss value between the predicted fault and the fault cause, the feature classification module is trained with the goal of minimizing the loss value of the loss function. When the loss value is less than or equal to the preset loss value, the training is determined to be completed.

[0084] S104, obtaining a long-time vibration signal of a target bearing.

[0085] In this step, based on the measurement object and measurement environment, when selecting a vibration sensor, the size and type of the sensor range should be considered. According to specific needs, the appropriate sensor type should be selected, and specific performance indicators such as sensitivity, frequency response characteristics, linear range and accuracy should be considered. Then, the target bearing is sampled according to the preset sampling frequency.

[0086] S105. Input the long time series vibration signal of the target bearing into the trained fault diagnosis model, output the fault type, and determine the fault cause according to the fault type.

[0087] Specifically, the long-time vibration signal of the target bearing is input into the trained fault diagnosis model, and the signal features are obtained through the optimized feature extraction module; the signal features are classified through the feature classification module, the fault type is output, and the fault cause of the target bearing is determined according to the fault type.

[0088] By adopting the above method, positive and negative samples are constructed to fully learn the common features of the same fault type data of the bearing and the feature differences of different fault type data. The differences between the positive sample pairs due to the data drift problem can be narrowed by comparative learning. Similarly, the feature differences between the negative sample pairs can be amplified, thereby solving the data drift problem existing in the data collected in actual industrial scenarios. In addition, by introducing Patch-Transformer in the Fourier feature extractor to perform patch segmentation on the long time series bearing vibration signal data, not only the global information of the long time series data is considered, but also the dependency between the local features of the bearing fault data is considered, thereby achieving more comprehensive feature extraction, which is conducive to improving the accuracy of fault diagnosis.

[0089] Secondly, the present invention also provides a rice field weed identification device, such as Figure 3 As shown, including:

[0090] The acquisition module 301 is used to acquire training samples for bearing fault diagnosis; the training samples include sample fault vibration signals in a long time series state and their corresponding fault types.

[0091] The construction module 302 is used to construct a fault diagnosis model, which includes a feature extraction module and a feature classification module; a patch transformer Patch-Transformer is introduced into the Fourier feature extractor, the improved Fourier feature extractor is used as the feature extraction module, and a Softmax classifier is constructed as the feature classification module.

[0092] The training module 303 is used to train the fault diagnosis model through training samples, specifically including: extracting features of the sample fault vibration signal through the feature extraction module to obtain sample features; determining the Euclidean distance between the positive sample features and the Euclidean distance between the negative sample features, determining the contrast loss of the positive sample features and the negative sample features respectively through the Euclidean distance, and optimizing the feature extraction module according to the contrast loss; the positive sample features represent the sample features corresponding to the same fault cause, and the negative sample features represent the sample features corresponding to different fault causes; the sample features are input into the feature classification module to obtain the predicted fault, and the feature classification module is trained with the goal of minimizing the deviation between the predicted fault and the fault type.

[0093] The diagnosis module 304 is used to obtain the long-time vibration signal of the target bearing; input the long-time vibration signal of the target bearing into the trained fault diagnosis model, output the fault type, and determine the fault cause according to the fault type.

[0094] The optimization module 303 is also used to perform patch segmentation on the input sample fault signal through the Patch-Transformer module, determine the embedded representation of the segmented fault signal, and position encode the embedded representation according to the temporal order before segmentation to obtain sample features; the formula of the position encoding process is as follows:

[0095] x p =W pro x i +W pos

[0096] Among them, x i represents the fault signal after segmentation, x p Represents x i The high-dimensional feature representation after position encoding, that is, the sample feature, W pro represents the trainable linear parameter matrix, W pos represents the position encoding matrix.

[0097] The optimization module 303 is also used to use different projection matrices to perform linear projection on the segmented fault signal to obtain a query matrix Q, a key matrix K and a value matrix V respectively:

[0098]

[0099] in, and Respectively represent the learnable linear parameter matrices corresponding to Q, K and V; perform Fourier transform on Q, K and V, and determine the Fourier self-attention output FA(x p ), that is, the parameter combination of linear projection, the formula is as follows:

[0100]

[0101] F(·) represents the Fourier transform, F -1 (·) represents the inverse Fourier transform, Softmax(·) represents the Softmax function, K T The transposed matrix representing the key matrix K; the preset number of Fourier self-attention outputs are obtained through the Fourier multi-head attention mechanism, and the parameter combination is weighted to obtain x p The multi-parameter weighted combination of is as follows:

[0102] MFA(x p )=[FA1(xp ),FA2(x p ),…,FA h (x p )]W0+x p

[0103] Among them, MFA(x p ) represents x p W0 represents the linear projection of multiple heads in series, and h represents the preset number.

[0104] The optimization module 303 is also used to add a multi-layer perceptron MLP to the Patch-Transformer module, extract global features through linear projection using the Fourier multi-head attention mechanism, and then extract features of local information of the fault signal through the MLP.

[0105] The Euclidean distance Determined by the following formula:

[0106]

[0107] in, and represents two different features, and f(·) represents the feature extraction module.

[0108] The training module 303 is also used to determine the positive sample loss according to the Euclidean distance between the positive sample features, and determine the negative sample loss according to the Euclidean distance between the negative sample features; and optimize the feature extraction module with the goal of minimizing the positive sample loss and maximizing the negative sample loss.

[0109] The training module 303 is also used to construct a loss function between predicted faults and fault types; the feature classification module is trained with the goal of minimizing the loss value of the loss function, and the training is determined to be completed when the loss value is less than or equal to a preset loss value.

[0110] By using the above-mentioned device, positive and negative samples are constructed to fully learn the common features of the same fault type data of the bearing and the feature differences of different fault type data. The differences between the positive sample pairs due to the data drift problem can be narrowed by comparative learning. Similarly, the feature differences between the negative sample pairs can be amplified, thereby solving the data drift problem existing in the data collected in actual industrial scenarios. In addition, by introducing Patch-Transformer in the Fourier feature extractor to perform patch segmentation on the long-time series bearing vibration signal data, not only the global information of the long-time series data is considered, but also the dependency between the local features of the bearing fault data is considered, thereby achieving more comprehensive feature extraction, which is conducive to improving the accuracy of fault diagnosis.

[0111] The present invention also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The steps of the bearing fault diagnosis method are provided.

[0112] The present invention also provides Figure 3 Computer equipment such as Figure 3 As shown in the figure, at the hardware level, the computer device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The steps of the bearing fault diagnosis method are provided.

[0113] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0114] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0115] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0117] It should be noted that the above specific implementation method can enable those skilled in the art to more fully understand the invention, but does not limit the invention in any way. Therefore, although the present specification and embodiments have described the invention in detail, those skilled in the art should understand that the invention can still be modified or replaced by equivalents; and all technical solutions and improvements that do not deviate from the spirit and scope of the invention are included in the protection scope of the patent for the invention. Any figure mark in the claims should not be regarded as limiting the claims involved.

Claims

1. A bearing fault diagnosis method, It is characterized in that include: Acquire training samples for bearing fault diagnosis; the training samples include sample fault vibration signals in a long time series state and their corresponding fault types; A fault diagnosis model is constructed, wherein the fault diagnosis model includes a feature extraction module and a feature classification module; a patch transformer Patch-Transformer is introduced into the Fourier feature extractor, the improved Fourier feature extractor is used as the feature extraction module, and a Softmax classifier is constructed as the feature classification module; The fault diagnosis model is trained by training samples, specifically including: extracting features of sample fault vibration signals by a feature extraction module to obtain sample features; determining the Euclidean distance between positive sample features and the Euclidean distance between negative sample features, respectively determining the contrast loss of positive sample features and negative sample features by the Euclidean distance, and optimizing the feature extraction module according to the contrast loss; the positive sample features represent sample features corresponding to the same fault cause, and the negative sample features represent sample features corresponding to different fault causes; the sample features are input into the feature classification module to obtain predicted faults, and the feature classification module is trained with the goal of minimizing the deviation between the predicted faults and the fault types; Obtain the long-time vibration signal of the target bearing; The long-time vibration signal of the target bearing is input into the trained fault diagnosis model, the fault type is output, and the fault cause is determined according to the fault type.

2. The bearing fault diagnosis method according to claim 1, It is characterized in that The feature extraction module is used to extract features from the sample fault vibration signal to obtain sample features, including: The input sample fault signal is patch segmented through the Patch-Transformer module, the embedded representation of the segmented fault signal is determined, and the embedded representation is position-encoded according to the temporal order before segmentation to obtain the sample feature; the formula of the position encoding process is as follows: x p =W pro x i +W pos Among them, x i represents the fault signal after segmentation, x p Represents x i The high-dimensional feature representation after position encoding, that is, the sample feature, W pro represents the trainable linear parameter matrix, W pos represents the position encoding matrix.

3. The bearing fault diagnosis method according to claim 2, It is characterized in that The embedded representation of the segmented fault signal is determined by linear projection, and the linear projection process includes: Different projection matrices are used to perform linear projection on the segmented fault signal to obtain the query matrix Q, key matrix K and value matrix V respectively: in, and Respectively represent the learnable linear parameter matrices corresponding to Q, K and V; Perform Fourier transform on Q, K and V, and determine the Fourier self-attention output FA(x p ), that is, the parameter combination of linear projection, the formula is as follows: F(·) represents the Fourier transform, F -1 (·) represents the inverse Fourier transform, Softmax(·) represents the Softmax function, K T The transposed matrix representing the key matrix K; The preset number of Fourier self-attention outputs is obtained through the Fourier multi-head attention mechanism, and the parameter combination is weighted to obtain x p The multi-parameter weighted combination of is as follows: MFA(x p )=[FA 1 (x p ),FA 2 (x p ),···,FA h (x p )]W 0 +x p Among them, MFA(x p ) represents x p The multi-parameter weighted combination of 0 Represents the linear projection of multiple heads in series, and h represents the preset number.

4. The bearing fault diagnosis method according to claim 3, It is characterized in that The method further comprises: A multi-layer perceptron (MLP) is added to the Patch-Transformer module. After linear projection is performed through the Fourier multi-head attention mechanism to extract global features, the features of the local information of the fault signal are extracted through the MLP.

5. The bearing fault diagnosis method according to claim 1, It is characterized in that The Euclidean distance Determined by the following formula: in, and Characterize two different sample fault signals, and represents two different features, f(·) represents the feature extraction module, ||·|| 2 Represents the Euclidean distance calculation between two different features.

6. The bearing fault diagnosis method according to claim 1, It is characterized in that Determining the contrast loss of the positive sample features and the negative sample features respectively by the Euclidean distance, and optimizing the feature extraction module according to the contrast loss includes: The positive sample loss is determined based on the Euclidean distance between the features of the positive samples, and the negative sample loss is determined based on the Euclidean distance between the features of the negative samples; The feature extraction module is optimized with the goal of minimizing the loss of positive samples and maximizing the loss of negative samples.

7. The bearing fault diagnosis method according to claim 1, It is characterized in that Training the feature classification module with the goal of minimizing the deviation between predicted faults and fault types includes: Construct a loss function between predicted faults and fault types; The feature classification module is trained with the goal of minimizing the loss value of the loss function, and the training is determined to be completed when the loss value is less than or equal to the preset loss value.

8. A bearing fault diagnosis device, It is characterized in that include: An acquisition module is used to acquire training samples for bearing fault diagnosis; the training samples include sample fault vibration signals in a long time series state and their corresponding fault types; A construction module is used to construct a fault diagnosis model, wherein the fault diagnosis model includes a feature extraction module and a feature classification module; a patch transformer Patch-Transformer is introduced into the Fourier feature extractor, the improved Fourier feature extractor is used as the feature extraction module, and a Softmax classifier is constructed as the feature classification module; A training module is used to train a fault diagnosis model through training samples, specifically including: extracting features from sample fault vibration signals through a feature extraction module to obtain sample features; determining the Euclidean distance between positive sample features and the Euclidean distance between negative sample features, determining the contrast loss of positive sample features and negative sample features respectively through the Euclidean distance, and optimizing the feature extraction module according to the contrast loss; the positive sample features represent sample features corresponding to the same fault cause, and the negative sample features represent sample features corresponding to different fault causes; the sample features are input into the feature classification module to obtain predicted faults, and the feature classification module is trained with the goal of minimizing the deviation between the predicted faults and the fault types; The diagnostic module is used to obtain the long-time vibration signal of the target bearing; input the long-time vibration signal of the target bearing into the trained fault diagnosis model, output the fault type, and determine the fault cause according to the fault type.

9. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the bearing fault diagnosis method according to any one of claims 1 to 7 are implemented.

10. A computer device, It is characterized in that The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the bearing fault diagnosis method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

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

    CN119669825A

  • Fault diagnosis method based on multi-mode cross-sensor Transform

    CN120086679A

  • State recognition model training method, state recognition method, device and equipment

    CN121542725A