Neural network interpretable method for rotating machine fault diagnosis and application
By performing S-transformation and Fourier transform processing on the vibration signals of the rotating machinery, the mask is optimized to generate more accurate explanations, and the problem of low interpretability of existing neural networks in rotating machinery fault diagnosis is solved, improving the resolution of explanation and the reliability of diagnostic results.
Patent Information
- Application Number
- CN202411841083.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-13
AI Technical Summary
Existing neural networks have low interpretability in rotary mechanical fault diagnosis, making it difficult to accurately identify the features used by the model, making it difficult for users to judge the reliability of the diagnosis results.
By performing S-transformation processing on the vibration signal of the rotating machine, a time-frequency diagram is generated, and the time-frequency diagram is converted to the frequency domain using two-dimensional Fourier transform, mask and Gaussian noise are added to the frequency domain, and the mask is converted back to the airspace through inverse Fourier transform, and the mask is optimized to generate a more accurate explanation.
It improves the resolution of the explanation, can more accurately identify fault impact features, and enhances users' judgment of the reliability of neural network diagnostic results.
Smart Images

Figure CN119761526A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field related to rotating machinery fault diagnosis, and more specifically, relates to a neural network interpretable method and application for rotating machinery fault diagnosis. Background Art
[0002] Neural network models are widely used in the research of rotating machinery fault diagnosis due to their powerful predictive performance. However, the diagnostic results of neural network models are difficult to interpret, and users cannot judge whether the model diagnostic results are reliable, which hinders the application of neural network-based fault diagnosis methods in real industrial scenarios. The neural network interpretable method can identify which features the model uses for diagnosis, and users can judge whether the diagnostic results are reliable based on this. Therefore, the research work on the neural network interpretable method for rotating machinery fault diagnosis has very important application value.
[0003] With the rapid development of artificial intelligence technology and the urgent need to explain neural networks, many interpretable methods for explaining neural networks have emerged, and these methods have also been applied to the field of fault diagnosis. These interpretable methods usually identify which features in the sample are used by the model when predicting a sample as a certain category of fault, so that users can judge whether the model diagnosis result is reliable. For fault diagnosis tasks, fault shocks are transient and short-lived. Therefore, for fault diagnosis tasks, interpretable methods are needed to accurately identify the features used by the model in order to determine whether the model uses fault features for diagnosis, and then determine whether the model is reliable. On the one hand, most interpretable methods, such as Class Activation Map (CAM)-based and mask-based methods, have low interpretation resolution and can only roughly locate the features used by the model. Therefore, it is difficult to judge whether the model diagnosis result is reliable through such low-resolution interpretation. On the other hand, the interpretations generated by existing interpretable methods usually contain features that are irrelevant to the diagnosis results, which can lead to users' misjudgment of the reliability of the model diagnosis results. Summary of the invention
[0004] In view of the above defects or improvement needs of the prior art, the present invention provides a neural network interpretable method and application for rotating machinery fault diagnosis, which aims to solve the problem of low interpretation resolution of existing neural network interpretable methods.
[0005] To achieve the above object, according to one aspect of the present invention, a neural network interpretable method for rotating machinery fault diagnosis is provided, the method comprising the following steps:
[0006] (1) Performing S-transform processing on the vibration signal used for fault diagnosis of rotating machinery to obtain a time-frequency diagram;
[0007] (2) Using the time-frequency graph as a sample, the time-frequency graph samples are converted from the spatial domain to the frequency domain using a two-dimensional Fourier transform, and a mask is added to the frequency domain. The masked samples are then converted to the spatial domain using an inverse Fourier transform;
[0008] (3) Input the obtained samples into the neural network to obtain the feature map of the last layer of the neural network and the neural network output logits, and at the same time calculate the classification probability of the target category and the sparsity score of the mask sample;
[0009] (4) Calculate the out-of-domain distribution score of the sample based on the obtained feature map of the last layer of the neural network and the logits output by the neural network;
[0010] (5) Use the stochastic gradient descent method to optimize the mask. The optimization goal is to maximize the classification probability of the target category, maximize the out-of-domain distribution score, and minimize the sparsity score of the mask sample;
[0011] (6) Add the optimized mask to the sample frequency coefficient to obtain an explanation for the classification of the sample.
[0012] Furthermore, first, the vibration signal used for fault diagnosis of rotating machinery is segmented and processed into n samples containing m data points, and then each sample is subjected to S transformation to obtain a time-frequency diagram of the sample.
[0013] Furthermore, first, the two-dimensional Fourier transform is used to convert the time-frequency graph samples from the spatial domain to the frequency domain; secondly, a 0-1 mask is added to the frequency coefficients of the time-frequency graph, and Gaussian noise is added to the frequency coefficients based on the mask; finally, the masked image is converted from the frequency domain back to the spatial domain using the two-dimensional inverse Fourier transform.
[0014] Furthermore, the masked sample expression is:
[0015]
[0016] In the formula, FFT 2D is the two-dimensional Fourier transform, is the two-dimensional inverse Fourier transform, x is the time-frequency graph sample, m∈[0,1] n is a mask with the same dimension as the input sample, and u is random noise following a Gaussian distribution.
[0017] Furthermore, the calculation formula for the target category classification probability is:
[0018]
[0019] In the formula, Φ is a neural network, Φ(.) is the classification probability of the returned classifier, Φ c is the classification probability of the target category.
[0020] Furthermore, the calculation formula of the sparsity score of the mask sample is:
[0021]
[0022] Where λ1 and λ2 are hyperparameters.
[0023] Furthermore, the calculation formula for the out-of-domain distribution score of the masked sample is:
[0024] OoD score =(MaxCosine+MaxNorm)
[0025] In the formula, MaxCosine refers to the maximum cosine value of the angle between the feature and weight of the last layer of the neural network, and its calculation formula is:
[0026]
[0027] h is the feature of the last layer, w k is the weight corresponding to the probability of the k-th category classification; MaxNorm refers to the L1 norm of the last layer of features.
[0028] Furthermore, the formula corresponding to the optimization objective is:
[0029]
[0030] Further, the calculation formula for explanation is:
[0031]
[0032] The present invention also provides an application of the above-mentioned neural network interpretable method for rotating machinery fault diagnosis in judging whether the diagnostic results of a neural network model are reliable. The neural network interpretable method is used to obtain an explanation of the sample classification of the structure to be diagnosed, and based on the obtained explanation, it is judged whether the diagnostic results of the neural network model are reliable.
[0033] In general, compared with the prior art, the above technical solution conceived by the present invention has the following beneficial effects:
[0034] 1. The present invention uses two-dimensional Fourier transform to convert time-frequency graph samples from the spatial domain to the frequency domain, adds a mask to the frequency domain, and then uses inverse Fourier transform to convert the masked samples to the spatial domain. This fully utilizes the advantage that the fault impact characteristics can be better expressed in the frequency domain. By adding a mask to the input sample frequency domain and optimizing the strategy of generating an interpretation through the mask, compared with the unimproved mask strategy, the fault impact characteristics can be better identified and the resolution of the interpretation is improved.
[0035] 2. The purpose of calculating the sparsity score is to use sparsity constraints to retain only the features related to the prediction results in the masked samples. Thus, through the sparsity constraints, features irrelevant to the prediction results can be avoided from appearing in the explanation, thus avoiding noise in the explanation results.
[0036] 3. The present invention makes full use of the feature graphs and output logits of the middle layer of the neural network, and performs out-of-domain distribution constraints based on the feature graphs and output logits constraints to avoid out-of-domain distribution interpretations.
[0037] 4. The present invention can more accurately identify fault impact features and improve the feature resolution of interpretation by optimizing the mask in the frequency domain of the input sample, interpreting the sparsity constraints and out-of-domain distribution constraints. At the same time, the interpretation results can be compared with prior knowledge to determine whether the diagnosis results of the neural network model are reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a flowchart of a neural network interpretable method for rotating machinery fault diagnosis provided by the present invention;
[0039] Figure 2 is an example diagram of a vibration signal provided by an embodiment of the present invention;
[0040] Figure 3 It is a schematic diagram of inner ring fault samples and interpretation results obtained by using the neural network interpretable method provided by the present invention;
[0041] Figure 4 (a), (b), and (c) are inner race fault samples, respectively. (d), (e), and (f) are the explanations of the diagnosis results of the inner race fault samples (a), (b), and (c) using the existing methods, respectively. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0043] See also Figure 1The present invention provides a neural network interpretable method for rotating machinery fault diagnosis. The neural network interpretable method generates an explanation by optimizing the mask in the frequency domain of the input sample, and can more accurately identify features related to the fault diagnosis results. Compared with other interpretable algorithms, the present invention can more accurately identify fault features, thereby improving the interpretability and reliability of the neural network-based fault diagnosis method.
[0044] The neural network interpretable method makes full use of the advantage that the fault impact characteristics can be better expressed in the frequency domain. The mask is added to the frequency domain of the input sample instead of directly adding it to the input sample. On the one hand, by optimizing the mask added to the frequency domain of the input sample, only the features used by the neural network model for diagnosis are retained. Since the Fourier basis is smooth, the smoothness of the generated interpretation can be guaranteed, and noise can be avoided without additional smoothness constraints. At the same time, it ensures that the resolution of the interpretation will not be reduced. On the other hand, sparsity constraints and out-of-domain distribution constraints are used to avoid irrelevant features from appearing in the interpretation. Finally, the optimized mask and input sample are combined to obtain the interpretation.
[0045] The neural network interpretable method mainly includes the following steps:
[0046] Step 1: Perform S-transform processing on the vibration signal used for fault diagnosis of rotating machinery to obtain a time-frequency diagram.
[0047] The vibration signal of the rotating machinery is segmented, and the segmented signal is processed to obtain a time-frequency diagram, and the time-frequency diagram is used as a sample.
[0048] In this embodiment, the signal collected for equipment fault diagnosis is a vibration acceleration signal. First, the vibration signal for rotating machinery fault diagnosis is segmented and processed into n samples containing m data points, and then each sample is S-transformed to obtain a time-frequency diagram of the sample, which is used as an input sample of the neural network model.
[0049] In other implementations, timing signals such as acoustic emission and current may also be collected.
[0050] Step 2: Use the time-frequency graph as a sample, use the two-dimensional Fourier transform to convert the time-frequency graph samples from the spatial domain to the frequency domain, add a mask to the frequency domain, and then use the inverse Fourier transform to convert the masked samples to the spatial domain.
[0051] The input samples are converted from the spatial domain to the frequency domain using a two-dimensional Fourier transform, a mask is added to the sample frequency coefficients, noise is injected into the frequency coefficients, and the masked samples are obtained by an inverse Fourier transform.
[0052] In one embodiment, first, a two-dimensional Fourier transform is used to convert the time-frequency graph samples from the spatial domain to the frequency domain; secondly, a 0-1 mask is added to the frequency coefficients of the time-frequency graph, and Gaussian noise is added to the frequency coefficients based on the mask; finally, a two-dimensional inverse Fourier transform is used to convert the masked image from the frequency domain back to the spatial domain.
[0053] The sample expression after masking is:
[0054]
[0055] In the formula, FFT 2D is the two-dimensional Fourier transform, is the two-dimensional inverse Fourier transform, x is the time-frequency graph sample, m∈[0,1] n is a mask with the same dimension as the input sample, and u is random noise following a Gaussian distribution.
[0056] In this implementation, firstly, since the fault impact shows periodicity in the time-frequency diagram, the impact characteristics can be better expressed in the frequency domain, and thus a mask is added in the frequency domain of the time-frequency diagram to better identify the impact characteristics; in addition, since the Fourier basis is smooth, adding a mask in the frequency domain can ensure that the final interpretation result is smooth, thus avoiding the noise caused by the non-smooth interpretation result.
[0057] In this embodiment, since part of the information is removed by masking, this part of the information is replaced by noise.
[0058] Step 3: Input the obtained samples into the neural network to obtain the feature map of the last layer of the neural network and the output logits of the neural network, and at the same time calculate the classification probability of the target category and the sparsity score of the mask sample.
[0059] The calculation formula for the target category classification probability is:
[0060]
[0061] In the formula, Φ is a neural network, Φ(.) is the classification probability of the returned classifier, Φ c is the classification probability of the target category.
[0062] The sparsity score of the masked sample is calculated as:
[0063]
[0064] Where λ1 and λ2 are hyperparameters.
[0065] The feature map of the last layer of the neural network and the logits output by the neural network are used to calculate the out-of-domain distribution score. The sparsity score is calculated to use sparsity constraints to keep only the features related to the prediction results in the masked samples.
[0066] Step 4: Calculate the out-of-domain distribution score of the sample based on the feature map of the last layer of the neural network and the logits output by the neural network.
[0067] The calculation formula for the out-of-domain distribution score of the masked sample is:
[0068] OoD score =(MaxCosine+MaxNorm)
[0069] In the formula, MaxCosine refers to the maximum cosine value of the angle between the feature and weight of the last layer of the neural network, and its calculation formula is:
[0070]
[0071] h is the feature of the last layer, w k is the weight corresponding to the probability of the k-th category classification; MaxNorm refers to the L1 norm of the last layer of features.
[0072] This implementation makes full use of the feature graphs and output logits of the middle layer of the neural network, and performs out-of-domain distribution constraints based on the feature graphs and output logits constraints to avoid out-of-domain distribution interpretations.
[0073] Step 5: Use the stochastic gradient descent method to optimize the mask. The optimization goal is to maximize the classification probability of the target category, maximize the out-of-domain distribution score, and minimize the sparsity score of the mask sample.
[0074] The mask is optimized using the stochastic gradient descent method, and the formula corresponding to the optimization target is:
[0075]
[0076] Compared with the traditional mask optimization-based method, the mask is added to the frequency domain of the input sample instead of directly to the input sample, which can better identify the fault characteristics. Through the sparsity constraint and out-of-domain distribution constraint, the features that are irrelevant to the model prediction are avoided in the interpretation results.
[0077] Step six, add the optimized mask to the sample frequency coefficient to obtain the explanation of the sample classification.
[0078] The calculation formula for explanation is:
[0079]
[0080] Masking is used to retain only the features in the input sample that are used by the model for diagnosis.
[0081] The present invention also provides an application of the above-mentioned neural network interpretable method for rotating machinery fault diagnosis in judging whether the diagnostic results of a neural network model are reliable. The neural network interpretable method is used to obtain an explanation of the sample classification of the structure to be diagnosed, and based on the obtained explanation, it is judged whether the diagnostic results of the neural network model are reliable.
[0082] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0083] The data set used is the rolling bearing fault diagnosis data set provided by Case Western Reserve University. The fault categories are three types of faults: inner ring, outer ring, and vibrating body. Each type of fault has three sizes of fault diameters. The vibration data is collected by an accelerometer, which is arranged at the drive end and the fan end. The vibration data at the drive end is collected at a sampling frequency of 12kHz, and the sampling data at the fan end is collected at a sampling frequency of 12kHz. The drive motor speed is 1797rpm. This embodiment uses the vibration data collected at the drive end at a sampling frequency of 12kHz as an example, such as Figure 2 As shown. The vibration data is segmented according to the length of 1024 data points per sample. The segmented samples are converted into time-frequency diagrams through S transformation as the input of the neural network. ResNet-18 is used as the neural network for fault classification. According to the characteristics of the test bearing, the theoretical fault characteristic frequency of the inner ring of the rolling bearing is calculated to be 162.3Hz, and the corresponding fault impact interval is 6.16ms.
[0084] Comparison of early fault detection results between the interpretable method provided by the present invention and other interpretable methods:
[0085] The interpretation method provided by the present invention and other interpretation methods are used to interpret the diagnostic results of ResNet-18 on one of the inner ring fault samples, and the obtained interpretation results are as follows: Figure 3 , Figure 4 Observation Figure 3 In the fault sample, the impact characteristics can be clearly seen. The time interval of the impact is 6.2ms, which is very close to the theoretical time interval of the inner ring fault impact, which shows that these impacts are fault impacts. Figure 3 From the explanation of the sample obtained by the present invention, it can be seen that the present invention accurately identified the fault impact feature, which shows that ResNet-18 used the fault impact feature to predict the fault category of the sample. This result verifies the effectiveness of the ResNet-18 model for fault diagnosis and improves the credibility of the model.
[0086] since Figure 4It can be seen that the Integrated Gradients method only identifies some fault impact features. The other two methods cannot distinguish fault impact features from irrelevant features due to low feature resolution, and cannot determine whether the ResNet-18 model uses only fault features for diagnosis. Compared with the neural network interpretable method provided by the present invention, the other three methods cannot accurately identify fault impact features, and it is difficult to verify the effectiveness of the ResNet-18 model for fault diagnosis, which proves the superiority and effectiveness of the method provided by the present invention.
[0087] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A neural network interpretable method for rotating machinery fault diagnosis, characterized in that: The method comprises the following steps: (1) Performing S-transform processing on the vibration signal used for fault diagnosis of rotating machinery to obtain a time-frequency diagram; (2) Using the time-frequency graph as a sample, the time-frequency graph samples are converted from the spatial domain to the frequency domain using a two-dimensional Fourier transform, and a mask is added to the frequency domain. The masked samples are then converted to the spatial domain using an inverse Fourier transform; (3) Input the obtained samples into the neural network to obtain the feature map of the last layer of the neural network and the neural network output logits, and at the same time calculate the classification probability of the target category and the sparsity score of the mask sample; (4) Calculate the out-of-domain distribution score of the sample based on the obtained feature map of the last layer of the neural network and the logits output by the neural network; (5) Use the stochastic gradient descent method to optimize the mask. The optimization goal is to maximize the classification probability of the target category, maximize the out-of-domain distribution score, and minimize the sparsity score of the mask sample; (6) Add the optimized mask to the sample frequency coefficient to obtain an explanation for the classification of the sample.
2. The neural network interpretable method for rotating machinery fault diagnosis according to claim 1, characterized in that: Firstly, the vibration signal used for fault diagnosis of rotating machinery is segmented and processed into n samples containing m data points. Then, each sample is subjected to S transformation to obtain the time-frequency diagram of the sample.
3. The neural network interpretable method for rotating machinery fault diagnosis according to claim 1, characterized in that: First, the two-dimensional Fourier transform is used to convert the time-frequency graph samples from the spatial domain to the frequency domain; secondly, a 0-1 mask is added to the frequency coefficients of the time-frequency graph, and Gaussian noise is added to the frequency coefficients based on the mask; finally, the masked image is converted from the frequency domain back to the spatial domain using the two-dimensional inverse Fourier transform.
4. The neural network interpretable method for rotating machinery fault diagnosis according to claim 1, characterized in that: The sample expression after masking is: In the formula, FFT 2D is the two-dimensional Fourier transform, is the two-dimensional inverse Fourier transform, x is the time-frequency graph sample, m∈[0,1] n is a mask with the same dimension as the input sample, and u is random noise following a Gaussian distribution.
5. The neural network interpretable method for rotating machinery fault diagnosis according to claim 4, characterized in that: The calculation formula for the target category classification probability is: In the formula, Φ is a neural network, Φ(.) is the classification probability of the returned classifier, Φ c is the classification probability of the target category.
6. The neural network interpretable method for rotating machinery fault diagnosis according to claim 5, characterized in that: The sparsity score of the masked sample is calculated as: Where λ1 and λ2 are hyperparameters.
7. The neural network interpretable method for rotating machinery fault diagnosis according to claim 6, characterized in that: The calculation formula for the out-of-domain distribution score of the masked sample is: OoD score =(MaxCosine+MaxNorm) In the formula, MaxCosine refers to the maximum cosine value of the angle between the feature and weight of the last layer of the neural network, and its calculation formula is: h is the feature of the last layer, w k is the weight corresponding to the probability of the k-th category classification; MaxNorm refers to the L1 norm of the last layer of features.
8. The neural network interpretable method for rotating machinery fault diagnosis according to claim 7, characterized in that: The formula corresponding to the optimization objective is:
9. The neural network interpretable method for rotating machinery fault diagnosis according to claim 7, characterized in that: The calculation formula for explanation is:
10. An application of the neural network interpretable method for rotating machinery fault diagnosis according to any one of claims 1 to 9 in determining whether the diagnosis result of a neural network model is reliable, characterized in that: The neural network interpretable method is used to obtain an explanation of the sample classification of the structure to be diagnosed, and based on the obtained explanation, it is judged whether the diagnosis result of the neural network model is reliable.
Citation Information
Patent Citations
Radiation source individual identification method based on main signal suppression
CN110135390A
Robust visual converter
CN117178276A
Belt conveyor carrier roller fault diagnosis method and system based on multi-scale feature fusion and residual mask convolution attention algorithm
CN117421581A
System and Method for Extremely Efficient Image and Pattern Recognition and Artificial Intelligence Platform
US20180204111A1