A fault diagnosis method, device, equipment and medium for a rotating machine
By using twin convolutional neural network models and prototypes to replace actual samples in rotary mechanical fault diagnosis, the problem of decreasing recognition rate caused by sparse sample data is solved, and more efficient fault diagnosis and model convergence are achieved.
Patent Information
- Application Number
- CN202111655168.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In rotary machinery fault diagnosis, sparse sample data leads to a decrease in recognition rate of deep learning models, and traditional models have shortcomings in inference capabilities and data labeling costs.
The twin convolutional neural network model is adopted to build support sets and feature embedding networks, and use prototypes to replace actual samples for training to improve the model's feature extraction and classification capabilities.
It effectively improves the fault diagnosis model recognition rate when sample data is scarce, reduces the impact of individual sample variance on model prediction, and improves the convergence speed of the model.
Smart Images

Figure CN114528906B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial Internet, and particularly relates to a fault diagnosis method, device, equipment and medium for rotating machinery. Background Art
[0002] Currently, in the fault diagnosis task, to ensure a good accuracy rate of the diagnosis model, a large amount of manpower and material resources are required to obtain sufficient labeled data for different fault types. However, in actual industrial production, mechanical equipment generally operates normally for a long time, and the fault state data that can be obtained is relatively small. The lack of sufficient data will cause the model to be unable to extract the differential features of different fault states, resulting in a decline in the recognition rate of the classifier for various faults. Therefore, in the case where some fault sample data is scarce or even missing, there is an extremely urgent practical need to improve the recognition rate of the diagnosis model. Currently, the commonly used method for the fault diagnosis problem is the deep learning model. However, the learning ability of traditional deep learning models is limited, and there are two important problems that need to be overcome: (1) The model requires a large amount of labeled data to improve the training effect, but the data labeling requires huge time and financial costs; (2) Existing models do not have strong reasoning capabilities and cannot obtain reasoning experience from previous learning. In the case of scarce fault sample data, the prediction accuracy of traditional deep learning network models is not ideal. Therefore, it is necessary to make full use of the information carried by the samples to improve the model's feature extraction ability, classification, and prediction ability for the samples.
[0003] Siamese Network is a special type of deep learning model. This algorithm simultaneously receives multiple input samples, calculates the similarity between two samples, and realizes optimization learning by controlling the gradient descent through the loss function. When the training sample size is n, if two samples are input into the Siamese network each time (the two samples may be the same sample in the training set, and there is no difference between the two inputs at this time), through this method, the network can perform n×(n - 1) comparisons with n samples. Using the Siamese neural network method can fully train the samples to increase the effective training times of the model and explore the relationship between the samples in the case of a small training sample size, avoiding the phenomenon of overfitting caused by insufficient sample size. However, since the Siamese neural network is a method based on metric learning, it directly classifies by comparing the sample features in the embedding space. This causes the samples of the same class to gradually gather during the training process, and the samples between different classes will form a separation space due to mutual repulsion. Since there may also be some differences in individual samples of the same class, bringing this difference into the final loss function will have a side effect on the optimization path and convergence speed of the network, thereby affecting the clustering effect of the samples. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a fault diagnosis method, device, equipment and medium for rotating machinery, which can effectively improve the recognition rate of the diagnosis model when some fault sample data are scarce or even missing, while minimizing the impact of the differences in individual samples themselves on the model prediction effect.
[0005] In a first aspect, the present invention provides a fault diagnosis method for a rotating machine, comprising:
[0006] S1. Collect vibration acceleration data of rolling bearings in different states of rotating machinery under different loads and perform standard normalization processing, and then classify labels according to the fault types of the bearings to obtain labeled samples;
[0007] S2, construct support set S = {(x 1 ,y 1 ),(x 2 ,y 2 ),…(x K ,y K )}, where K is the number of label types, representing K types of faults, x K Represents a subset of all samples with label K;
[0008] S3, constructing a twin convolutional neural network model, randomly selecting a sample of bearing fault category q from the K types of bearing fault types in the support set, n samples of the remaining K-1 types of faults, and the remaining samples of category q to form a sample pair, and sending them to the twin convolutional neural network model for training to obtain a feature embedding network;
[0009] S4, mapping the test sample data of each category in the support set to a same feature embedding space through the feature embedding network, so that the test samples of the same category in the feature embedding space are clustered around a virtual prototype point representing the common features of the test samples;
[0010] S5, compare the input sample to be tested with the prototype point of each category in the support set, calculate the Euclidean distance between each sample to be tested and each prototype point, and select the prototype category with the smallest Euclidean distance with the sample to be tested as the diagnosis result of the fault category of the sample to be tested.
[0011] In a second aspect, the present invention provides a fault diagnosis device for a rotating machine, comprising:
[0012] The sample acquisition module is used to collect the vibration acceleration data of the rolling bearings of the rotating machinery under different loads in different states and perform standard normalization processing, and then classify the labels according to the fault types of the bearings to obtain labeled samples;
[0013] A support set construction module for constructing a support set S = {(x 1 , y 1 ), (x 2 , y 2 ), … (x K , y K )} for the labeled samples, where K is the number of label types, representing K types of fault types, and x K represents the subset composed of all samples with the label K;
[0014] A feature embedding network construction and training module for constructing a siamese convolutional neural network model, randomly selecting a sample with the bearing fault category q from the K bearing fault types in the support set, n samples from the remaining K - 1 types of faults, and the remaining samples in the category q to form a sample pair, and sending them into the siamese convolutional neural network model for training to obtain a feature embedding network;
[0015] A mapping module for uniformly mapping the data of the samples to be measured in each category in the support set into a same feature embedding space through the feature embedding network, so that the samples to be measured of the same category in the feature embedding space will cluster around a virtual prototype point representing the common features of the samples to be measured;
[0016] A fault category diagnosis module for comparing the input samples to be measured with the prototype points of each category in the support set, respectively calculating the Euclidean distances between each sample to be measured and each prototype point, and screening out the prototype category with the smallest Euclidean distance from the sample to be measured as the diagnosis result of the fault category of the sample to be measured.
[0017] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in the first aspect is implemented.
[0018] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect is implemented.
[0019] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: The present invention uses a twin convolutional neural network model to solve the problem that the prediction effect is affected by the scarcity of samples in the bearing mechanical fault diagnosis; using prototypes to replace actual samples to construct the network can avoid the interference of irrelevant differences between the same samples in the diagnosis, and at the same time avoid the accidental similarity that may occur between different category samples. In addition, whether in the network inference or similarity calculation stage, using prototypes to replace real samples to construct the support set can reduce the jitter phenomenon in the training of the network, and is more helpful for the network to find the global optimal solution faster, and improve the model convergence speed.
[0020] The above description is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented in accordance with the content of the specification. And in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable, the following specifically illustrates the specific embodiments of the present invention. Brief Description of the Drawings
[0021] The present invention will be further described below with reference to the accompanying drawings in conjunction with embodiments.
[0022] Figure 1 It is the flowchart of the method in the first embodiment of the present invention;
[0023] Figure 2 It is the design method of the twin convolutional neural network diagnosis model in the present invention;
[0024] Figure 3 It is the schematic diagram of the principle of the feature extraction module of the twin convolutional neural network diagnosis model of the present invention;
[0025] Figure 4 It is the experimental result of the fault diagnosis recognition rate in the case of few samples;
[0026] Figure 5 It is the schematic diagram of the structure of the device in the second embodiment of the present invention;
[0027] Figure 6 It is the schematic diagram of the structure of the electronic device in the third embodiment of the present invention;
[0028] Figure 7 It is the schematic diagram of the structure of the medium in the fourth embodiment of the present invention. Detailed Description of the Embodiments
[0029] By providing a fault diagnosis method, device, equipment and medium for rotating machinery in the embodiments of the present application, it is possible to effectively improve the recognition rate of the diagnosis model in the case of scarce or even missing some fault sample data, and at the same time minimize the influence of the differences existing in individual samples on the prediction effect of the model as much as possible.
[0030] The overall idea of the technical solution in the embodiments of this application is as follows: Use a twin convolutional neural network model to solve the problem that the small sample size affects the accuracy of prediction results in the fault diagnosis of rotating machinery; Use prototypes to replace actual samples to construct the network, which can avoid the interference of irrelevant differences between the same samples in diagnosis and avoid accidental similarities that may occur between different categories of samples. In addition, whether in the network inference or similarity calculation stage, using prototypes to replace real samples to construct the support set can reduce the jitter phenomenon in network training, help the network find the global optimal solution faster, and improve the model convergence speed.
[0031] Embodiment 1
[0032] As Figure 1 and Figure 2 shown, this embodiment provides a fault diagnosis method for a rotating machine, including:
[0033] S1. Collect the vibration acceleration data of the rolling bearings in different states of the rotating machine under different loads, perform standard normalization processing, and then classify the labels according to the fault types of the bearings to obtain labeled samples;
[0034] For example, in the following table, classification is performed according to the damage sizes at different positions to obtain 0 - 8 label classifications. Adding one category for healthy, there are a total of 9 label classifications:
[0035]
[0036] S2. Construct a support set S = {(x 1 , y 1 ), (x 2 , y 2 ), …(x K , y K )} for the labeled samples, where K is the number of label types, representing K kinds of fault types, and x K represents the subset composed of all samples with label K;
[0037] S3. Construct a twin convolutional neural network model, randomly select a sample with bearing fault category q from the K kinds of bearing fault types in the support set, and n samples from the remaining K - 1 types of faults and the remaining samples in category q to form a sample pair, and send them into the twin convolutional neural network model for training to obtain a feature embedding network;
[0038] S4. Through the feature embedding network, uniformly map the data of the samples to be measured in each category in the support set into a same feature embedding space, so that the samples to be measured of the same category in the feature embedding space will cluster around a virtual prototype point representing the common features of the samples to be measured;
[0039] S5. Compare the input sample to be measured with the prototype points of each category in the support set, calculate the Euclidean distance between each sample to be measured and each prototype point respectively, and select the prototype category with the smallest Euclidean distance from the samples to be measured as the diagnosis result of the fault category of the sample to be measured.
[0040] The feature embedding network realizes the extraction of fault features and spatial embedding of rotating machinery vibration signals through the convolutional calculation of the deep embedding network. After the feature extraction transformation, similar fault samples obtain similar spatial features, and originally different fault samples obtain dissimilar spatial features after the feature extraction transformation.
[0041] As Figure 3 shown, the siamese convolutional neural network model is a one-dimensional multi-scale attention convolutional neural network, including a multi-scale feature extraction module and an attention feature weighting module. The layer structure is as follows:
[0042] The first layer of convolution uses 32 convolution kernels of 64×1;
[0043] The second layer has three multi-scale branches, each scale uses the same attention convolution structure, the convolution kernel sizes are 3×1, 7×1, and 11×1 respectively, and the number of convolution kernels is 16;
[0044] The third, fourth, and fifth layers of convolution use 64 convolution kernels of sizes 6×1 and 10×1 respectively, and the size of all pooling operations is 4×1;
[0045] The last layer of convolution feature extraction layer directly connects the attention module and the global pooling operation after the BN layer, and the output feature map is 64-dimensional.
[0046] During the training process of step S3, the prototype contrast loss function is used to guide the siamese convolutional neural network model to learn the similarity of input sample pairs; the prototype contrast loss function consists of two parts: empirical loss and regularization loss; the specific formula is as follows:
[0047]
[0048]
[0049] Among them, L is the final loss function, L(Y,X,C) is the empirical loss function, is the regularization loss, λ represents the regularization coefficient, w represents the network weight, N represents the number of input samples, X represents the input samples, Y represents the actual fault category label, y i represents whether the i-th pair of samples is the same, c k jThe j - th dimensional eigenvalue of the sample prototype representing the k - th type of fault, and m represents the hyperparameter used to adjust the overall convergence strength of the function;
[0050] The calculation formula for the sample prototype of any type of fault is described as follows:
[0051]
[0052] Where \(C_k\) represents the prototype of the k - th type of fault, \(S_k\) represents the sample set of the k - th type of fault, and \(f\) θ (·) represents the embedding network, and \(x\) i represents the i - th sample of the k - th type.
[0053] As Figure 4 shown, it is a schematic diagram of the experimental results of the fault diagnosis recognition rate in the few - sample case.
[0054] Based on the same inventive concept, this application also provides a device corresponding to the method in Embodiment 1. For details, see Embodiment 2.
[0055] Embodiment 2
[0056] As Figure 5 shown, in this embodiment, a fault diagnosis device for a rotating machine is provided, including:
[0057] A sample acquisition module, configured to collect vibration acceleration data of a rolling bearing in different states under different loads of the rotating machine, perform standard normalization processing, and then classify the labels according to the fault types of the bearings to obtain labeled samples;
[0058] A support set construction module, configured to construct a support set \(S=\{(x 1 ,y 1 ),(x 2 ,y 2 ),...(x K ,y K )\}, where K is the number of label types, representing K types of fault types, and \(x K represents the subset composed of all samples with the label K;
[0059] A feature embedding network construction and training module, configured to construct a siamese convolutional neural network model, randomly select a sample of bearing fault category q from the K types of bearing fault types in the support set, n samples from the remaining K - 1 types of faults, and the remaining samples in category q to jointly form a sample pair, and send the sample pair into the siamese convolutional neural network model for training to obtain a feature embedding network;
[0060] A mapping module, which is used to uniformly map the test sample data in each category of the support set into the same feature embedding space through the feature embedding network, so that the test samples of the same category in the feature embedding space will cluster around a virtual prototype point representing the common features of the test samples;
[0061] A fault category diagnosis module compares the input test samples with the prototype points of each category in the support set, calculates the Euclidean distance between each test sample and each prototype point respectively, and screens out the prototype category with the smallest Euclidean distance from the test sample as the diagnosis result of the fault category of the test sample.
[0062] The feature embedding network realizes the extraction of fault features and spatial embedding of rotating machinery vibration signals through the convolutional calculation of the deep embedding network. After the feature extraction transformation, similar fault samples obtain similar spatial features, and originally different categories of fault samples obtain dissimilar spatial features after the feature extraction transformation.
[0063] As Figure 3 shown, the siamese convolutional neural network model is a one-dimensional multi-scale attention convolutional neural network, including a multi-scale feature extraction module and an attention feature weighting module, and the layer structure is as follows:
[0064] The first layer of convolution uses 32 convolutional kernels of 64×1;
[0065] The multi-scale branch of the second layer has three branches, and each scale uses the same attention convolution structure. The sizes of the convolutional kernels are 3×1, 7×1, and 11×1 respectively, and the number of convolutional kernels is 16 for all;
[0066] The third, fourth, and fifth layers of convolution use 64 convolutional kernels of sizes 6×1 and 10×1 respectively, and the size of all pooling operations is 4×1;
[0067] The last layer of convolutional feature extraction layer directly connects an attention module and a global pooling operation after the BN layer, and the output feature map is 64-dimensional.
[0068] During the training process of the feature embedding network construction and training module, a prototype contrast loss function is used to guide the siamese convolutional neural network model to learn the similarity of input sample pairs; the prototype contrast loss function consists of two parts: empirical loss and regularization term loss; the specific formula is as follows:
[0069]
[0070]
[0071] Among them, L is the final loss function, and L(Y,X,C) is the empirical loss function, is the regularization term loss, λ represents the regularization term coefficient, w represents the network weights, N represents the number of input samples, X represents the input samples, Y represents the actual fault category label, and y i represents whether the i-th pair of samples is the same, and c k j represents the j-th dimensional eigenvalue of the sample prototype of the k-th type of fault, and m represents the hyperparameter used to adjust the overall convergence strength of the function;
[0072] The calculation formula of the sample prototype of any type of fault is described as follows:
[0073]
[0074] where Ck represents the prototype of the k-th type of fault, Sk represents the sample set of the k-th type of fault, and f θ (·) represents the embedding network, and x i represents the i-th sample of the k-th class.
[0075] As Figure 4 shown, it is a schematic diagram of the experimental results of the fault diagnosis recognition rate in the few-shot case.
[0076] Since the device introduced in the second embodiment of the present invention is the device used to implement the method of the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, those skilled in the art can understand the specific structure and variations of the device, so it will not be elaborated here. Any device used in the method of the first embodiment of the present invention belongs to the scope of protection of the present invention.
[0077] Based on the same inventive concept, this application provides an electronic device embodiment corresponding to the first embodiment, as detailed in the third embodiment.
[0078] Embodiment Three
[0079] This embodiment provides an electronic device, as Figure 6 shown, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, any implementation manner in the first embodiment can be realized.
[0080] Since the electronic device introduced in this embodiment is the device used to implement the method in the first embodiment of this application, based on the method introduced in the first embodiment of this application, those skilled in the art can understand the specific implementation manners and various variations of the electronic device in this embodiment, so the implementation of how this electronic device realizes the method in the embodiments of this application will not be introduced in detail here. Any device used by those skilled in the art to implement the method in the embodiments of this application belongs to the scope of protection of this application.
[0081] Based on the same inventive concept, this application provides a storage medium corresponding to Embodiment 1. For details, see Embodiment 4.
[0082] Embodiment 4
[0083] This embodiment provides a computer-readable storage medium. As Figure 7 shown, a computer program is stored thereon. When the computer program is executed by a processor, any implementation manner in Embodiment 1 can be implemented.
[0084] The technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: The present invention uses a twin convolutional neural network model to solve the problem that the small sample size affects the prediction effect in bearing mechanical fault diagnosis; using prototypes to replace actual samples to construct the network can avoid the interference of irrelevant differences between the same samples in diagnosis, and at the same time avoid the accidental similarities that may appear between different category samples. In addition, whether in the network inference or similarity calculation stage, using prototypes to replace real samples to construct the support set can reduce the jitter phenomenon in network training, and is more helpful for the network to find the global optimal solution faster and improve the model convergence speed.
[0085] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, devices or systems, or computer program products. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0086] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for realizing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0087] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device realizes the functions in the process Figure 1One or more processes and / or blocks Figure 1 The functions specified in one block or more blocks.
[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 One or more processes and / or blocks Figure 1 The steps of the functions specified in one block or more blocks.
[0089] Although the specific embodiments of the present invention have been described above, those skilled in the art of this technology should understand that the specific embodiments we described are illustrative rather than used to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered by the scope protected by the claims of the present invention.
Claims
1. A method for fault diagnosis of rotating machinery, Features: include: S1. Collect vibration acceleration data of rolling bearings in different states of rotating machinery under different loads and perform standard normalization processing, and then classify labels according to the fault types of the bearings to obtain labeled samples; S2. Construct a support set for the labeled samples , where K is the number of label categories, representing K types of fault types represents the subset composed of all samples with the label K S3, constructing a twin convolutional neural network model, randomly selecting a sample of bearing fault category q from the K types of bearing fault types in the support set, n samples of the remaining K-1 types of faults, and the remaining samples of category q to form a sample pair, and sending them to the twin convolutional neural network model for training to obtain a feature embedding network; The feature embedding network realizes fault feature extraction and spatial embedding of rotating machinery vibration signals by deep embedding network convolution calculation. Similar fault samples obtain similar spatial features after feature extraction transformation, and fault samples of different categories obtain dissimilar spatial features after feature extraction transformation. During the training process, a loss function of prototype contrast is used to guide the siamese convolutional neural network model to learn the similarity of input sample pairs; the loss function of prototype contrast consists of two parts: empirical loss and regularization loss; the specific formula is as follows: ; ; Among them, L is the final loss function, L(Y,X,C) is the empirical loss function, is the regularization term loss, λ represents the regularization term coefficient, w represents the network weights, N represents the number of input samples, X represents the input samples, Y represents the actual fault class label, represents whether the i-th pair of samples is the same, represents the j dimensional eigenvalue of the sample prototype of the k-th type of fault, and m represents the hyperparameter used to adjust the overall convergence strength of the function; The calculation formula of the sample prototype for any type of fault is described as follows: ; Among them, $C_k$ represents the prototype of the $k$-th type of fault, and $S_k$ represents the sample set of the $k$-th type of fault. represents the embedded network, represents the $i$-th sample of the $k$-th class; S4, mapping the test sample data of each category in the support set to a same feature embedding space through the feature embedding network, so that the test samples of the same category in the feature embedding space are clustered around a virtual prototype point representing the common features of the test samples; S5. Compare the input sample to be tested with the prototype point of each category in the support set, calculate the Euclidean distance between each sample to be tested and each prototype point, and select the prototype category with the smallest Euclidean distance to the sample to be tested as the diagnosis result of the fault category of the sample to be tested.
2. A method for diagnosing faults of a rotating machine according to claim 1, Features: The twin convolutional neural network model is a one-dimensional multi-scale attention convolutional neural network, including a multi-scale feature extraction module and an attention feature weighting module, and the layer structure is as follows: The first convolution layer uses 32 64×1 convolution kernels; There are three multi-scale branches in the second layer. Each scale uses the same attention convolution structure. The convolution kernel sizes are 3×1, 7×1, and 11×1 respectively, and the number of convolution kernels is 16. The third, fourth, and fifth convolution layers use 64 convolution kernels of size 6×1 and 10×1 respectively, and the size of all pooling operations is 4×1; The last convolutional feature extraction layer is directly connected to the attention module and global pooling operation after the BN layer, and the output feature map is 64 dimensions.
3. A fault diagnosis device for rotating machinery, Features: include: The sample acquisition module is used to collect the vibration acceleration data of the rolling bearings of the rotating machinery under different loads in different states and perform standard normalization processing, and then classify the labels according to the fault types of the bearings to obtain labeled samples; The support set construction module is used to construct a support set for labeled samples , where K is the number of label types, representing K types of fault types represents the subset composed of all samples with the label K The feature embedding network construction and training module is used to construct a twin convolutional neural network model, randomly select a sample of bearing fault category q from the K types of bearing fault types in the support set, and n samples of the remaining K-1 types of faults and the remaining samples of category q to form a sample pair, which is sent to the twin convolutional neural network model for training to obtain a feature embedding network; The feature embedding network realizes the extraction of fault features and spatial embedding of rotating machinery vibration signals through the convolutional calculation of a deep embedding network. After feature extraction transformation, similar fault samples obtain similar spatial features, while originally different-class fault samples obtain dissimilar spatial features after feature extraction transformation; During the training process of the feature embedding network construction and training module, a prototype contrast loss function is used to guide the siamese convolutional neural network model to learn the similarity of input sample pairs; the prototype contrast loss function consists of two parts: empirical loss and regularization term loss; the specific formula is as follows: ; ; where L is the final loss function, L(Y, X, C) is the empirical loss function, is the regularization term loss, λ represents the regularization term coefficient, w represents the network weights, N represents the number of input samples, X represents the input samples, Y represents the actual fault class labels, represents whether the i-th pair of samples is the same, represents the j dimensional eigenvalue of the sample prototype of the k-th type of fault, and m represents the hyperparameter used to adjust the overall convergence strength of the function; The calculation formula for the sample prototype of any type of fault is described as follows: ; where $C_k$ represents the prototype of the $k$-th type of fault, and $S_k$ represents the sample set of the $k$-th type of fault. represents the embedding network. represents the $i$-th sample of the $k$-th class. A mapping module is used to uniformly map the data of the samples to be measured in each category in the support set into a same feature embedding space through the feature embedding network, so that the samples to be measured of the same category in the feature embedding space will cluster around a virtual prototype point representing the common features of the samples to be measured; A fault category diagnosis module compares the input samples to be measured with the prototype points of each category in the support set, calculates the Euclidean distance between each sample to be measured and each prototype point respectively, and selects the prototype category with the smallest Euclidean distance from the samples to be measured as the diagnosis result of the fault category of the sample to be measured.
4. The fault diagnosis device of a rotating machinery according to claim 3, characterized in that: The siamese convolutional neural network model is a one-dimensional multi-scale attention convolutional neural network, including a multi-scale feature extraction module and an attention feature weighting module, and the layer structure is as follows: The first layer of convolution uses 32 convolution kernels of 64×1; The second layer has three multi-scale branches, and each scale uses the same attention convolution structure. The sizes of the convolution kernels are 3×1, 7×1, and 11×1 respectively, and the number of convolution kernels is 16 for all; The third, fourth, and fifth layers of convolution use 64 convolution kernels of sizes 6×1 and 10×1 respectively, and the size of all pooling operations is 4×1; The last layer of convolution feature extraction layer is directly connected with an attention module and a global pooling operation after the BN layer, and the output feature map is 64-dimensional.
5. An electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, when the processor executes the program, the method described in claim 1 or 2 is implemented.
6. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the program is executed by the processor, the method described in claim 1 or 2 is implemented.
Citation Information
Patent Citations
Motor bearing fault diagnosis method based on single sample learning
CN113627317A