A method and system for intelligent device fault diagnosis based on prototype learning
Through the intelligent equipment fault diagnosis method based on prototype learning, deep neural networks and machine learning models are used to achieve accurate identification of known faults and detection of unknown faults, solving the problem of difficulty in identifying unknown fault patterns in existing technologies and improving the accuracy and automation level of diagnosis.
Patent Information
- Application Number
- CN202310060297.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-13
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-01-13
AI Technical Summary
Existing deep learning-based equipment fault diagnosis methods have difficulty identifying unknown fault modes when the training dataset and test dataset are inconsistent, resulting in reduced diagnostic accuracy.
A prototype learning-based intelligent device fault diagnosis method is adopted. By constructing a feature extraction module, a known class detection module and an unknown class detection module, deep neural networks and machine learning models are used to detect unknown fault modes, including feature extraction, category prototype design and feature mapping to the null space.
When the training set labels are limited, it can identify known faults and detect unknown faults, improve the accuracy and automation level of diagnosis, reduce labor costs, and has good robustness and adaptability.
Smart Images

Figure CN116070134B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of mechanical vibration fault diagnosis of intelligent equipment, and more specifically, relates to a method and system for intelligent equipment fault diagnosis based on prototype learning. Background Art
[0002] During actual production operations, mechanical equipment is prone to component failures, leading to significant losses such as equipment downtime and potentially threatening worker safety. Therefore, real-time monitoring and fault diagnosis systems for intelligent devices have long been fundamental and critical to improving industrial equipment safety.
[0003] In recent years, with the rapid development and widespread adoption of sensor technology, factories can now acquire massive amounts of equipment-related data during actual operation, such as vibration, acoustic, and temperature signals. Currently, most industries, such as machinery manufacturing and metallurgy, still rely primarily on manual experience-based detection, using signals collected through traditional signal transformation analysis. This requires not only a high level of expert knowledge and experience, but also tedious and complex manual feature design and parameter adjustment. Long-term work can also lead to fatigue and diagnostic errors for inspectors. Deep learning-based equipment fault diagnosis methods do not rely on traditional manually designed feature extraction. Instead, they use deep neural networks to train massive amounts of data to obtain highly discriminative feature extractors. These methods not only effectively and accurately identify fault patterns, but are also suitable for semi-automatic and even fully automated intelligent equipment fault diagnosis, improving the automation level of production lines.
[0004] Traditional deep learning-based equipment fault diagnosis methods all assume that the training and test datasets share class labels. However, real-world scenarios are complex, diverse, and difficult to predict. Exhausting all failure modes during the training phase is nearly impossible, resulting in incomplete labels for training samples. This means that unknown failure modes may arise in real applications, making it difficult for models based on the training data to accurately diagnose the faults. Summary of the Invention
[0005] In response to the above defects or improvement needs of the prior art, the present invention provides a method and system for intelligent device fault diagnosis based on prototype learning, the purpose of which is to provide an intelligent device fault diagnosis method with a simple structure, high diagnostic accuracy, and the ability to detect unknown fault modes.
[0006] To achieve the above objectives, according to one aspect of the present invention, a method for intelligent device fault diagnosis based on prototype learning is proposed, which includes a model training phase and a fault diagnosis phase, wherein:
[0007] The model training phase includes:
[0008] Construct an intelligent device fault diagnosis model, which includes a feature extraction module, a known class detection module, and an unknown class detection module, wherein: the feature extraction module and the known class detection module both use a deep neural network model, the feature extraction module is used to extract deep features from the original signal to obtain a feature map; the known class detection module is used to classify the feature map, and it designs category prototypes through prototype learning, and then calculates losses based on the category prototypes; the unknown class detection module uses a machine learning model to detect unknown category fault modes based on the feature map, and it maps features to the null space through Schmidt orthogonalization and spatial mapping, so that samples of the same category converge to a point;
[0009] The training set is input into the feature extraction module and the known class detection module, and the parameters of the feature extraction module and the known class detection module are optimized according to the obtained loss to obtain a trained fault diagnosis model;
[0010] The troubleshooting phase includes:
[0011] The original signal of the device to be diagnosed is obtained and input into the trained fault diagnosis model. The feature map is obtained through the feature extraction module. The feature map is input into the unknown class detection module, the features are mapped to the null space, and it is determined whether the feature points obtained after mapping belong to the unknown class: if it is an unknown class, its label is set to the unknown class; otherwise, the feature map is input into the known class detection module to determine the fault category and complete the fault diagnosis of the intelligent device.
[0012] As further preferred, in the known class detection module, the class prototype includes a first class prototype and a second class prototype, and the first loss, the second loss and the third loss are calculated based on the trainable first class prototype and the second class prototype respectively;
[0013] The first category prototype and the second category prototype are two learnable vectors in the feature space; the first category prototype reflects the clustering of the category, which will attract samples belonging to the same category in the feature space to be as close to the prototype as possible, thereby minimizing the intra-category distance of the category; the second category prototype reflects the discreteness of the category, which will drive samples belonging to the same category to be as far away from the prototype as possible, and make samples that do not belong to the category close, thereby maximizing the inter-category distance of the category.
[0014] As further preferred, the first loss is expressed as:
[0015]
[0016] Among them, loss pro (x,y;θ P ) represents the first loss of sample x, P yRepresents the first category prototype of the category to which sample x belongs, Θ(x) represents the feature map obtained after sample x passes through the feature extraction module, and m is the dimension of the sample feature map.
[0017] As further preferred, the second loss is expressed as:
[0018]
[0019] Among them, loss rec (x,y;θ R ) represents the second loss of sample x, y represents the category to which sample x belongs, R y represents the second category prototype of the category to which sample x belongs, ξ(·) represents the distance between sample x and the second category prototype of each category, and N is the total number of samples in the current batch.
[0020] As further preferred, the third loss is expressed as:
[0021] loss mc (x,y;θ O )=max(d e (x,R k )-O,0)
[0022] Among them, loss mc (x,y;θ O ) represents the third loss of sample x, O represents the restriction of the known class detection module on the second prototype, that is, the prototype restriction parameter, which is a trainable parameter; d e (x,R k ) represents the Euclidean distance between the sample x and its corresponding second category prototype.
[0023] As a further preferred embodiment, based on the first loss, the second loss, and the third loss, parameters of the feature extraction module and the known class detection module are optimized, specifically: back propagation is performed on each original signal sample, and parameters of the feature extraction module and the known class detection module are optimized according to the gradient of the total loss;
[0024] The calculation formula for total loss is:
[0025]
[0026] loss i =loss pro (x,y;θ P )+λ1loss rec (x,y;θ R )+λ2loss mc (x,y;θ O )
[0027] Among them, N is the total number of samples in the current batch, loss pro (x,y;θ P ), loss rec (x,y;θ R ), loss mc (x,y;θ O ) are the first loss, second loss, and third loss respectively; λ1 and λ2 are the loss balance weights of the second loss and the third loss respectively.
[0028] As a further preference, the optimization objectives and constraints of the unknown class detection module are:
[0029]
[0030]
[0031] Among them, ψ represents the total sample matrix after kernel function mapping, ψ T Represents the transpose of the total sample matrix after mapping by the kernel function, Represents the distance matrix between sample classes after mapping by the kernel function, Represents the intra-class distance matrix of samples after kernel function mapping; N is the total number of samples in the current batch, N j is the number of samples of category j in the current batch, X j represents the sample set belonging to category j; is the average representation of category j after mapping by the kernel function, μ Φ is the average representation of all samples after mapping by the kernel function; Φ(x) is the representation of sample x after mapping by the kernel function.
[0032] As a further preferred method, the feature is mapped to the null space, and it is determined whether the feature point obtained after mapping belongs to an unknown class, specifically:
[0033] All samples in the training set are mapped to the null space in advance, and samples of the same category converge to one point, thus obtaining multiple category points in the null space; the features to be judged are mapped to the null space, and the distance between the feature points and each category point is calculated after mapping. The minimum value of the distance is used as the new class score. If the new class score is higher than the preset threshold, it is judged to belong to an unknown fault mode, otherwise it belongs to a non-unknown class.
[0034] As a further preference, the feature fusion module adopts a one-dimensional Resnet18 network; specifically, the feature extraction module extracts features from the original signal and calculates its frequency domain signal through fast Fourier transform; then the normalized original signal and the frequency domain signal are fused and input into the one-dimensional Resnet18 network for deep feature extraction to obtain a feature map.
[0035] According to another aspect of the present invention, a prototype learning-based intelligent device fault diagnosis system is provided, comprising a processor configured to execute the above-mentioned prototype learning-based intelligent device fault diagnosis method.
[0036] In general, the above technical solutions conceived by the present invention have the following technical advantages compared with the existing technology:
[0037] 1. When the training set labels are limited, the present invention can not only correctly identify the known categories of faults that have appeared in the training set, but also detect the unknown categories of faults that appear in actual production. The present invention does not require complex preprocessing processes such as signal transformation and feature extraction on the original signal, and has good robustness to working conditions and environmental changes. It can effectively reduce labor costs and improve the level of automation and intelligence of equipment quality inspection.
[0038] 2. The present invention performs Schmidt orthogonalization on the training set data to map the original signal to the null space, so that samples of the same category are clustered into a point in the null space, and samples of different categories are distributed at different positions in the null space, further improving the diagnostic accuracy of new fault modes that occur in production.
[0039] 3. The method of the present invention makes full use of the different properties of fault characteristics of different fault categories, obtains frequency domain signals through fast Fourier transform of the actually collected signals, fuses them with the original signals and inputs them into the one-dimensional Resnet18 network to realize feature extraction. The features extracted by the network are input into the known class classification module and the unknown class detection module for fault mode diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 (a) to (c) are schematic diagrams of application shortcomings of the closed-set fault diagnosis setting, the open-set fault diagnosis setting, and the closed-set fault diagnosis method according to an embodiment of the present invention;
[0041] Figure 2 This is a flow chart of a method for diagnosing faults in intelligent devices based on prototype learning provided by an embodiment of the present invention;
[0042] Figure 3 4 is a structural diagram of an intelligent device fault diagnosis model for open set problems in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining 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 may be combined with each other as long as they do not conflict with each other.
[0044] This paper provides a prototype-based learning method for intelligent device fault diagnosis for open-set problems. It uses a designed effective feature extraction module to learn deep, highly discriminative features from collected signals. It then uses a designed effective known class detection module to diagnose known fault modes using these trained high-discriminative features. It also uses a designed effective unknown class detection module to detect unknown fault modes using these trained high-discriminative features. This method effectively improves the automation level of intelligent device fault diagnosis and enhances the accuracy of detection results.
[0045] like Figure 1 As shown in Figure 2, the open set problem refers to the discrepancy between the label spaces of the datasets used during the training and testing phases. Fault diagnosis methods targeting closed set problems can mistakenly interpret new failure modes that occur during the testing phase as failure modes that occurred during the training phase, leading to incorrect judgments.
[0046] Based on this, the present invention provides a prototype learning-based intelligent device fault diagnosis method for open set problems, such as Figure 2 As shown, the following steps are included:
[0047] S1, collect vibration signals and complete data preprocessing.
[0048] In this embodiment, a triaxial acceleration sensor, a speed sensor, and a current sensor are installed in the fault test bench to collect data under different fault modes. The collected signal data is normalized to eliminate the negative impact of the signal dimension under different fault modes. The calculation formula is:
[0049]
[0050] Among them, S i Represents the i-th data in the original signal, min(S) and max(S) represent the minimum and maximum values in the original data respectively. Represents the i-th data after the original signal is normalized.
[0051] For each fault mode, the data set is divided into 1024 sampling points as a sample. After division, each sample is subjected to fast Fourier transform to obtain its corresponding frequency domain signal. The calculation formula is:
[0052]
[0053] Then, the normalized original signal and the frequency domain signal after fast Fourier transform are spliced and fused.
[0054] S2, determine the specific structure of the three modules of the intelligent device fault diagnosis model: feature extraction, known class detection, and unknown class detection.
[0055] In this embodiment, the feature extraction module f E , known class detection module f C , unknown class detection module f D These two deep neural network models and a machine learning model are used to build an intelligent device fault diagnosis model for open set problems, such as Figure 3 shown.
[0056] S3, initialize the parameters of the intelligent device fault diagnosis model.
[0057] In this embodiment, the parameters of the intelligent device fault diagnosis model include feature extraction network parameters θ, first category prototype parameters θ P , the second category prototype parameter θ R and prototype constraint parameter θ O .
[0058] S4, input the labeled time-frequency fusion samples of different fault modes into the feature extraction deep neural network to obtain the deep feature information of the samples.
[0059] In this embodiment, the collected and divided training samples of N different fault modes form a training set in represents the time-frequency fusion feature of the i-th sample in the training set, represents the corresponding failure mode of the i-th sample in the training set.
[0060] Feature extraction modulef E First, the time-frequency fusion features of the training set are automatically extracted to obtain high-discriminative deep features. The formula is:
[0061]
[0062] Among them, Θ(x) represents the feature map obtained after sample x passes through the feature extraction module.
[0063] Specifically, the feature extraction module f EThe input of the network is 32×1×1536, and it mainly contains 4 residual blocks and a total of 17 convolutional layers. Among them, the convolutional layers are mostly 7×7 convolutions and 3×3 convolutions. The number of convolution kernels is 64, 128, 256, and 512, and the stride is 1 or 2. Each convolutional layer is connected to a batch normalization layer and a ReLU layer. The batch normalization layer transforms and reconstructs the output feature map of the previous convolutional layer by introducing learnable parameters γ and β. The ReLU layer performs nonlinear activation on the feature map. Its calculation formula is:
[0064] f(x)=max(0,x)
[0065] At the same time, an additional 1-dimensional average pooling layer is connected after the last convolutional layer to complete the downsampling while ensuring the overall characteristics of the features and preventing the loss of too much high-dimensional information.
[0066] S5, the sample is extracted by the feature extraction module f E The obtained deep high-discriminative feature map is input to the known class detection module f C , calculate the first loss, second loss and third loss.
[0067] In this embodiment, the high-discriminative features of the sample are input into the known class detection module f C The module consists of three fully connected layers, whose sizes are 512×128, 128×64 and 64×n respectively, where n is the total number of fault modes in the training set. For the input feature map of the last fully connected layer, for each category, the method of the present invention designs the first category prototype and the second category prototype
[0068] Specifically, the first-category prototype and the second-category prototype are two learnable vectors for each category in the feature space. The first-category prototype reflects the clustering of categories, which attracts samples belonging to the same category in the feature space as close to the prototype as possible, thereby minimizing the intra-category distance. The second-category prototype reflects the discreteness of categories, which drives samples belonging to the same category as far away from the prototype as possible and brings samples that do not belong to the same category closer, thereby maximizing the inter-category distance.
[0069] For any category, all samples in the category should be as close as possible to their first category prototype to achieve the purpose of reducing the distance within the class. The first prototype target loss is designed for preliminary optimization. The calculation formula is as follows:
[0070]
[0071] Among them, loss pro represents the first loss of sample x, P yRepresents the first category prototype of the category to which sample x belongs, m represents the dimension of the obtained sample feature map, d e (x,P y ) represents the sample x and its corresponding first category prototype P y This loss can make the samples of each category as close to the first prototype of the category as possible, thereby achieving the purpose of reducing the intra-class distance.
[0072] At the same time, all samples in its category should be as far away from its second category prototype as possible. The second prototype target loss is designed for preliminary optimization. The calculation formula is as follows:
[0073]
[0074] ξ(y=k|x,R k )=d e (x,R k )-d d (x,R k )
[0075] d d (x,R k )=Θ(x)·R k
[0076] Among them, loss rec represents the second loss of sample x, y represents the category corresponding to sample x, R y The second category prototype of the category to which the sample x belongs, d d (x,R k ) represents the sample x and its corresponding second category prototype R k The point product distance between them, d e (x,R k ) represents the sample x and its corresponding second category prototype R k The Euclidean distance between .
[0077] ξ(·) reflects the distance between sample x and each second-category prototype. This distance will be as large as possible if and only if the sample and the second-category prototype are not in a straight line and the Euclidean distance in the feature space is large. That is, this distance can reflect the probability that the sample belongs to a certain category. The larger the distance, the greater the probability that the sample belongs to this category.
[0078] In order to maximize the inter-class distance between different categories, the method of the present invention designs a radius limit O for the second category prototype, and designs a third loss based on this limit for preliminary optimization. The calculation formula is as follows:
[0079] loss mc (x, y; θ O )=max(de (x,R k )-O,0)
[0080] Among them, loss mc Denotes the third loss of sample x, and O represents the module's restriction on the second prototype, which is a trainable parameter. The second and third losses can be used to keep samples of each category as far away from the second prototype as possible, and to keep samples that do not belong to the category closer to the second prototype, thereby widening the distance between classes.
[0081] S6, according to the first loss, the second loss and the third loss, the feature extraction module f of the intelligent device fault diagnosis model E and known class detection module f C Perform parameter optimization.
[0082] Specifically, in order to optimize all deep neural network parameters end-to-end, the present invention designs the following optimization target loss loss i , the calculation formula is:
[0083] loss i =loss pro (x, y; θ P )+λ1loss rec (x, y; θ R )+λ2loss mc (x, y; θ O )
[0084] Among them, N is the total number of samples, λ1 and λ2 are the second loss loss rec And the third loss loss mc The loss balance weight.
[0085] Therefore, for each sample, back propagation is performed and the gradient of loss loss is used to realize the feature extraction module f of the intelligent device fault diagnosis model. E and known class detection module f C The parameter optimization is calculated as follows:
[0086]
[0087]
[0088]
[0089]
[0090]
[0091] Among them, θi 、 and are the feature extraction modules f in the i-th iteration respectively. E and known class detection module f C Parameters, μ i is the learning rate of the model in the i-th iteration, θ i+1 、 and They are the feature extraction module f in the i+1th iteration respectively E and known class detection module f C Through iterative optimization, the feature extraction module f of the final optimized intelligent device fault diagnosis model can be obtained. E and known class detection module f C .
[0092] S7, the sample is extracted by the feature extraction module f E The obtained deep high-discriminative feature map is input to the unknown class detection module f D , and conduct mapping learning of the null space.
[0093] In this embodiment, the high-discriminative features of the sample are input into the unknown class detection module f D This module mainly includes the machine learning model KNFST model, whose core idea is to map high-discriminative features to the null space, so that samples of the same category are clustered into a point in the null space, and samples of different categories are distributed in different positions in the null space.
[0094] The optimization objectives and constraints of the unknown class detection module are:
[0095]
[0096]
[0097] Among them, Φ(x) represents the representation of sample x after kernel function mapping, ψ represents the total sample matrix after kernel function mapping, and ψ T Represents the transpose of the total sample matrix after mapping by the kernel function.
[0098] ψ=[Φ(x1), Φ(x2),…, Φ(x N )]
[0099] Represents the distance matrix between sample classes after mapping by the kernel function, represents the average representation of category j after kernel function mapping, μ Φ Represents the average representation of all samples after kernel function mapping, N j represents the number of samples of category j in the current batch, Represents the intra-class distance matrix of samples after mapping by the kernel function.
[0100] Specifically, the training steps of this module are as follows:
[0101] S701, calculate the inter-class matrix S based on the high-discriminative features of the training set samples b and the intra-class matrix S w ;
[0102] S702, calculate the kernel matrix K = (Φ(x)) T (Φ(x))=[k1 k2 k3 … k n ];
[0103] S703, according to the vector set Perform Schmidt orthogonalization calculation to obtain the orthogonal basis vector Q = [β1 β2 β3 … β k-N ],in
[0104] S704, calculate matrix Among them H w =K(ID), I is an N×N identity matrix, D=(D d ) d=1,2,…,N , D d For an N d ×N d A matrix whose elements are all equal to
[0105] S705, calculate the orthogonal vectors a1 a2 ... a k-N , this set of orthogonal vectors can satisfy where a r =(a 1 , a 2 ,…,a k ) T .
[0106] The orthogonal vector group a1 a2 … a obtained through the above five steps k-N AQ=[a1 a2… a] that realizes the null space N-1 ][β1 β2 β3 … β n-N ]. All training set samples are mapped to the null space, and samples of the same category will converge to one point, each point represents a category, thus obtaining multiple category points in the null space.
[0107] Operation S8: detecting failure modes of samples in the testing phase.
[0108] In this example, the data collection of the test phase samples is completed by using the fault test bench equipment. In the test phase, the types of fault modes collected are more than those in the training phase. In addition, the test set is obtained by the same operation of normalization and fast Fourier transform of the training set data as described in step S1. If the sample If the fault mode does not belong to any of the fault modes in the training set, its label is uniformly set to the unknown category.
[0109] For the samples in the test set, the failure mode detection is divided into three steps:
[0110] S801, input the time-frequency fusion feature into the feature extraction module f E Obtain deep and highly discriminative features;
[0111] S802, input the high discriminant features into the unknown class detection module f D Perform unknown class detection, map the sample features to the null space, and use the minimum value between the mapped points and the class points obtained in the training set as the new class score of the sample. If the new class score of the sample is higher than the set threshold, it is determined to belong to a new fault mode. Otherwise, proceed to operation S803;
[0112] S803, for the unknown class detection module f D The detected samples that do not belong to the new class are input into the known class detection module f C ,Through the forward propagation of three fully connected layers, the probability of the sample belonging to each known class is obtained, and the one with the highest probability is taken as the predicted fault mode of the sample.
[0113] It will be easily understood by those skilled in the art that the above description is merely 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 scope of protection of the present invention.
Claims
1. A method for fault diagnosis of intelligent equipment based on prototype learning, characterized in that: It includes the model training phase and the fault diagnosis phase, in which: The model training phase includes: Construct an intelligent device fault diagnosis model, which includes a feature extraction module, a known class detection module, and an unknown class detection module, wherein: the feature extraction module and the known class detection module both use a deep neural network model, the feature extraction module is used to extract deep features from the original signal to obtain a feature map; the known class detection module is used to classify the feature map, and it designs category prototypes through prototype learning, and then calculates losses based on the category prototypes; the unknown class detection module uses a machine learning model to detect unknown category fault modes based on the feature map, and it maps features to the null space through Schmidt orthogonalization and spatial mapping, so that samples of the same category converge to a point; The training set is input into the feature extraction module and the known class detection module, and the parameters of the feature extraction module and the known class detection module are optimized according to the obtained loss to obtain a trained fault diagnosis model; The troubleshooting phase includes: The original signal of the device to be diagnosed is obtained and input into the trained fault diagnosis model. The feature map is obtained through the feature extraction module. The feature map is input into the unknown class detection module, the features are mapped to the null space, and it is determined whether the feature points obtained after mapping belong to the unknown class: if it is an unknown class, its label is set to the unknown class; otherwise, the feature map is input into the known class detection module to determine the fault category and complete the fault diagnosis of the intelligent device.
2. The intelligent device fault diagnosis method based on prototype learning according to claim 1, characterized in that: In the known class detection module, the class prototype includes a first class prototype and a second class prototype, and a first loss, a second loss, and a third loss are calculated based on the trainable first class prototype and the second class prototype respectively; The first-category prototype and the second-category prototype are two learnable vectors in the feature space; the first-category prototype reflects the clustering of categories, which attracts the feature space. The samples belonging to the same category in the class are as close to the prototype as possible, so that the intra-class distance of the category is minimized; The second category prototype reflects the discreteness of the category, which drives the samples belonging to the same category to be as far away from the prototype as possible and brings the samples that do not belong to the category closer, thereby maximizing the inter-category distance of the category.
3. The intelligent device fault diagnosis method based on prototype learning according to claim 2, characterized in that: The first loss is expressed as: in, Representation sample The first loss, Represents a sample The first category prototype of the category to which it belongs, Representation sample The feature map obtained after the feature extraction module, is the dimension of the sample feature map.
4. The intelligent device fault diagnosis method based on prototype learning according to claim 2, characterized in that: The second loss is expressed as: in, Representation sample The second loss, Representation sample The category to which it belongs, Representation sample The second category prototype of the category to which it belongs, Representation sample The distance from the second category prototype of each category, Total number of samples.
5. The intelligent device fault diagnosis method based on prototype learning according to claim 2, characterized in that: The third loss is expressed as: in, Representation sample The third loss, Represents the restriction of the known class detection module on the second prototype, that is, the prototype restriction parameter, which is a trainable parameter; Representation sample The Euclidean distance between the prototype and its corresponding second category.
6. The intelligent device fault diagnosis method based on prototype learning according to claim 2, characterized in that: Based on the first loss, the second loss and the third loss, the parameters of the feature extraction module and the known class detection module are optimized. Specifically, back propagation is performed on each original signal sample, and the total loss is calculated based on the total loss. Gradients of ,parameter optimization of feature extraction module and known class detection module; Total loss The calculation formula is: in, is the total number of samples in the current batch, 、 、 They are the first loss, the second loss, and the third loss respectively; 、 are the loss balance weights of the second loss and the third loss respectively.
7. The intelligent device fault diagnosis method based on prototype learning according to claim 1, characterized in that: The optimization objectives and constraints of the unknown class detection module are: in, Represents the total sample matrix after kernel function mapping, Represents the transpose of the total sample matrix after mapping by the kernel function, Represents the distance matrix between sample classes after mapping by the kernel function, Represents the intra-class distance matrix of samples after mapping by the kernel function; is the total number of samples in the current batch, The category of the current batch The number of samples, Indicates belonging to a category The sample set; is the category after mapping by the kernel function The average representation of is the average representation of all samples after mapping by the kernel function; is the sample after mapping by kernel function .
8. The intelligent device fault diagnosis method based on prototype learning according to claim 7, characterized in that: Map the features to the null space and determine whether the feature points obtained after mapping belong to the unknown class. Specifically: All samples in the training set are mapped to the null space in advance, and samples of the same category converge to one point, thus obtaining multiple category points in the null space; the features to be judged are mapped to the null space, and the distance between the feature points and each category point is calculated after mapping. The minimum value of the distance is used as the new class score. If the new class score is higher than the preset threshold, it is judged to belong to an unknown fault mode, otherwise it belongs to a non-unknown class.
9. The intelligent device fault diagnosis method based on prototype learning according to any one of claims 1 to 8, characterized in that: The feature extraction module extracts features from the original signal and calculates its frequency domain signal through fast Fourier transform; the normalized original signal and frequency domain signal are then fused and input into the one-dimensional Resnet18 network for deep feature extraction to obtain a feature map.
10. A prototype learning-based intelligent device fault diagnosis system, characterized in that: The method comprises a processor configured to execute the intelligent device fault diagnosis method based on prototype learning as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Unknown disease category identification method and device based on centralized space learning
CN111834004A
Rotation machine cross-working-condition fault diagnosis method based on prototype and double domain confrontation
CN115219180A