Construction method and application of single-source-domain generalization fault diagnosis model under time-varying working condition
By building a single source domain generalization fault diagnosis model under time-varying conditions, using the domain extension module and the domain invariant feature discrimination module, the problems of low accuracy of fault diagnosis and poor generalization ability under single working conditions are solved, and the problem of low fault diagnosis accuracy and poor generalization ability under single working conditions is realized. Higher fault identification accuracy and model generalization capabilities.
Patent Information
- Application Number
- CN202411537406.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-14
AI Technical Summary
In the time-varying operating conditions, when only a single operating condition data is available, the existing fault diagnosis method leads to low accuracy in fault identification and poor generalization capabilities of the model.
The construction method of a single source domain generalized fault diagnosis model under time-varying conditions includes collecting vibration signals under a single operating condition, building a single source domain training set, and establishing a fault diagnosis including domain expansion module and domain invariant feature discrimination module. The model is trained, and the extended domain and intermediate domain are generated through the generator and feature extractor, and parameter optimization training is carried out to form a model for online device fault diagnosis.
It improves the accuracy of fault identification and model generalization ability under time-varying operating conditions, enhances the adaptability to the continuous changing operating conditions environment, and improves the level of intelligent fault diagnosis of equipment.
Smart Images

Figure CN119441885A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field related to equipment intelligent fault diagnosis, and more specifically, relates to a method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions and its application. Background Art
[0002] Intelligent fault diagnosis technology uses advanced technologies such as artificial intelligence, machine learning, and data analysis to monitor and analyze the operating status of equipment or systems in real time, thereby automatically identifying and locating faults. Intelligent fault diagnosis not only improves maintenance efficiency, but also significantly improves the reliability and operational safety of equipment. Traditional fault diagnosis methods that rely on expert knowledge and experience have slow response speeds and limited accuracy, and signal processing methods have difficulty processing complex aliasing signals and insufficient adaptive learning capabilities. In recent years, intelligent fault diagnosis technology has benefited from the rapid development of artificial intelligence and big data technologies. The introduction of machine learning and deep learning algorithms enables the system to automatically learn from a large amount of historical data, identify normal and abnormal modes of equipment operation, and thus perform more accurate fault prediction and diagnosis.
[0003] In modern industry and manufacturing, equipment and systems often operate under time-varying conditions, which makes fault diagnosis challenging. In practical applications, the working environment and conditions of equipment may change significantly in real time, such as different loads, temperatures, humidity, or operating modes. Such real-time changes may cause changes in the distribution of equipment fault data, reducing the accuracy of intelligent fault diagnosis. There are distribution differences between training data and data in actual applications. At the same time, time-varying working conditions lead to overlapping and difficult classification of fault features, which makes the model perform poorly in new environments. Domain generalization technology enhances the generalization ability of the model by addressing the data distribution differences between the source domain (training data) and the target domain (actual application environment). Most existing methods focus on learning domain-invariant feature representations from multiple source domains. However, it is challenging to collect valuable fault samples from different time-varying working conditions, so the available data usually comes from a single operating condition. When only data from a single operating condition is available, the fault diagnosis performance of existing multi-source domain generalization models inevitably deteriorates. Summary of the invention
[0004] In view of the above defects or improvement needs of the prior art, the present invention provides a method for constructing a generalized fault diagnosis model in a single source domain under time-varying working conditions and its application, which is used to solve the problems of low fault identification accuracy and poor model generalization ability caused by the existing fault diagnosis methods when only single working condition data is available.
[0005] To achieve the above object, according to one aspect of the present invention, a method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions is provided, comprising:
[0006] S1, collect vibration signals of equipment under different fault modes in a single working condition, and construct a single source domain training set. The samples in the single source domain training set form the source domain;
[0007] S2, establishing a fault diagnosis training model, the fault diagnosis training model includes a domain extension module and a domain-invariant feature discrimination module; the domain extension module includes a generator, the generator is used to generate new samples according to samples in the source domain to form an extended domain, the domain extension module is also used to generate new samples again according to samples in the source domain and samples in the extended domain to form an intermediate domain; the domain-invariant feature discrimination module includes a feature extractor and a classifier, the feature extractor is used to extract fault features of samples, and the classifier is used to output fault mode classification results of samples according to the fault features of samples extracted by the feature extractor;
[0008] S3, performing parameter optimization training on the fault diagnosis training model by combining samples in the source domain, the extended domain, and the intermediate domain;
[0009] S4, outputting the trained feature extractor and the classifier to form a constructed fault diagnosis model for online fault diagnosis of equipment.
[0010] According to the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions provided by the present invention, generating new samples according to samples in the source domain to form an extended domain in S2 specifically includes:
[0011] Extract features from samples in the source domain to obtain initial sample features;
[0012] AdaIN is used to randomly generate extended sample features for the initial sample features;
[0013] Restoring the extended sample features, acquiring new samples with the same dimension as the samples in the source domain to form the extended domain;
[0014] Generating new samples again according to the samples in the source domain and the samples in the extended domain to form the intermediate domain specifically includes:
[0015] The samples belonging to the same fault mode in the source domain and the extended domain are linearly combined to generate new samples to form the intermediate domain.
[0016] According to the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions provided by the present invention, feature extraction is performed on samples in the source domain to obtain initial sample features, specifically including:
[0017] Performing morphological opening and closing operations on samples in the source domain to enhance signals, fusing the signals after the morphological opening and closing operations, and performing feature extraction on the fused signals to obtain first initial sample features;
[0018] Accordingly, the first initial sample feature is randomly generated using AdaIN to generate a first extended sample feature.
[0019] According to the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions provided by the present invention, feature extraction is performed on samples in the source domain to obtain initial sample features, and the method also includes:
[0020] Directly extracting features from samples in the source domain to obtain second initial sample features, wherein the second initial sample features have the same dimension as the first initial sample features;
[0021] Accordingly, the second initial sample feature is randomly generated using AdaIN to generate a second extended sample feature;
[0022] The first extended sample feature and the second extended sample feature are fused, and the fused feature is restored to obtain a sample in the extended domain.
[0023] According to the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions provided by the present invention, the initial sample features are randomly generated using AdaIN to generate extended sample features specifically through the following formula:
[0024]
[0025] Among them, z represents the initial sample characteristics; n represents random noise n~N(0,1); μ and σ represent the mean and variance of samples in the source domain; FC represents a single-layer fully connected neural network.
[0026] According to the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions provided by the present invention, the generator adopts a dual encoder-randomization-feature fusion-decoder structure, the dual encoder includes a morphological encoder and a universal encoder, the morphological encoder adopts a dual-branch morphological opening and closing operation and a 3-layer fully connected neural network, the universal encoder and decoder are both 5-layer fully connected neural networks, and the randomization adopts AdaIN.
[0027] According to the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions provided by the present invention, S3 specifically includes:
[0028] S31, performing supervised contrastive learning based on samples in the source domain, the extended domain, and the intermediate domain, respectively, and training and optimizing the domain-invariant feature discrimination module;
[0029] S32, based on the samples in the source domain, the extended domain, and the intermediate domain, respectively perform adversarial contrast learning on the samples in the extended domain and the intermediate domain and the samples in the source domain, and perform training optimization on the domain extension module;
[0030] Among them, S31 and S32 are performed alternately.
[0031] According to the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions provided by the present invention, S31 specifically includes:
[0032] Determine a first optimization loss based on the source domain classification loss, the extended domain classification loss, the intermediate domain classification loss, and the supervised contrast loss, and train and optimize the feature extractor and the classifier in the domain-invariant feature discrimination module based on the first optimization loss;
[0033] S32 specifically includes:
[0034] A second optimization loss is determined based on the extended domain classification loss, the intermediate domain classification loss, and the adversarial contrast loss, and the generator in the domain extension module and the intermediate domain generation parameters are trained and optimized based on the second optimization loss.
[0035] According to the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions provided by the present invention, the first optimization loss in S31 is specifically:
[0036]
[0037] The second optimization loss in S32 is specifically:
[0038]
[0039] Among them, L SD is the source domain classification loss; L ED is the extended domain classification loss; L ID is the intermediate domain classification loss; L sup is the supervised contrast loss; L adv is the adversarial contrast loss; θ f and θ c They represent the weight parameters of the feature extractor and classifier in the domain-invariant feature discrimination module; θ G and w represent the weight parameters of the generator and the intermediate domain generation strategy in the domain extension module; γ1 and γ2 are the balancing parameters of the above optimization loss function, respectively.
[0040] According to another aspect of the present invention, a single-source domain generalized fault diagnosis method under time-varying working conditions is provided, and the fault diagnosis model output by the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions described in any one of the above is applied. The fault diagnosis method comprises:
[0041] Collecting actual vibration signals of the equipment to form test samples, and inputting the test samples into the feature extractor of the fault diagnosis model to extract fault features;
[0042] The extracted fault features are input into the classifier to obtain the corresponding fault mode and realize fault diagnosis.
[0043] In general, compared with the prior art, the above technical solutions conceived by the present invention provide a method for constructing a generalized fault diagnosis model in a single source domain under time-varying working conditions and its application:
[0044] 1. The designed domain extension module uses source domain samples to generate extended domains and intermediate domains, increasing the diversity of training samples and making up for the lack of fault knowledge caused by the only single source domain. It also proposes to generate intermediate domains for transition between source domains and extended domains, which is conducive to further improving the generalization performance of the model and making the model more suitable for time-varying working conditions with continuously changing working conditions. The designed domain-invariant feature discrimination module extracts fault features of the source domain, extended domain and intermediate domain and performs fault diagnosis. The fault diagnosis model trained based on the source domain, extended domain and intermediate domain overcomes the performance degradation problem caused by changes in working conditions, effectively improves the accuracy of cross-domain generalized fault diagnosis, and thus improves the accuracy of fault identification and the level of intelligent fault diagnosis of equipment.
[0045] 2. Adaptive instance normalization AdaIN is used to randomize source domain samples and then generate extended domains, which is conducive to generating rich and diverse extended domain samples and improving the generalization performance of the model; the dual encoder structure design of the generator ensures that the noise components in the signal can be effectively removed while protecting the fault feature components in the signal;
[0046] 3. Use the supervised contrastive learning strategy to mine the feature representation of the source domain to achieve inter-class contrast, force the domain-invariant discriminant module to learn the domain-invariant feature representation, cluster the features of the same category, separate the features of different categories, and reduce the domain shift, further improving the generalization performance; use the adversarial contrastive learning strategy to mine the feature representation of the extended domain and the intermediate domain to achieve intra-class contrast, and force the extended domain and the intermediate domain generated by the domain extension module to have both specificity and domain invariance; use supervised contrastive learning and adversarial contrastive learning to aggregate the same category of features and disperse the different category of features from the perspective of inter-class and intra-class, respectively, to overcome the problem of small inter-class distribution differences and large intra-class distribution differences caused by time-varying working conditions, and the overlapping and difficult separation of fault features;
[0047] 4. When the constructed fault diagnosis model is used for online detection of equipment faults, there is no need to perform complex preprocessing on the original signal, and it can be highly robust to changes in operating conditions and environmental noise. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a training flow chart of a method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions provided by the present invention;
[0049] Figure 2 It is a structural block diagram of a method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions provided by the present invention. DETAILED DESCRIPTION
[0050] 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.
[0051] See also Figure 1 and Figure 2 This embodiment 1 provides a method for constructing a single-source domain generalized fault diagnosis model under time-varying conditions. The single-source domain fault diagnosis problem under time-varying conditions refers to the model training phase in which only source domain data under a single time-varying condition is used to train the model, so that the trained model can have good generalized diagnostic performance under unknown single or multiple time-varying or steady-state conditions. This construction method is mainly a training method in the offline training phase, including:
[0052] S1, collect vibration signals of equipment under different fault modes in a single working condition, and construct a single source domain training set. The samples in the single source domain training set form the source domain;
[0053] In this embodiment, at least one of a triaxial acceleration sensor, a rotation speed sensor, and a current sensor is installed on the fault test bench to complete data collection under different fault modes. The collected signals are subjected to maximum and minimum normalization processing to eliminate the influence of the signal dimension under different fault modes. The calculation formula is:
[0054]
[0055] Among them, x i represents the i-th input sample, and Respectively represent samples x i The minimum and maximum values in Represents the i-th normalized signal sample, and N represents the number of samples. For each fault mode, the data set is divided into 1024 sampling points as one sample, and the normalized original signal is used as the input signal sample, that is, the source domain data. The collected monitoring signal is normalized to reduce the impact of abnormal peaks.
[0056] S2, establishing a fault diagnosis training model, the fault diagnosis training model includes a domain extension module and a domain-invariant feature discrimination module; the domain extension module includes a generator, the generator is used to generate new samples according to samples in the source domain to form an extended domain, the domain extension module is also used to generate new samples again according to samples in the source domain and samples in the extended domain to form an intermediate domain; the domain-invariant feature discrimination module includes a feature extractor and a classifier, the feature extractor is used to extract fault features of samples, and the classifier is used to output fault mode classification results of samples according to the fault features of samples extracted by the feature extractor;
[0057] The domain extension module may be provided with an intermediate domain generation strategy. The domain extension generator is used to generate the extended domain. Meanwhile, the intermediate domain generation strategy generates the intermediate domain using the source domain and the extended domain, and improves the generalization of the model through the generated extended domain and intermediate domain. The intermediate domain serves as an intermediate transition between the source domain and the extended domain. By gradually improving the domain difference, the model can effectively learn the domain-invariant fault features, thereby alleviating the difficulty of model training and the failure to capture the domain-invariant fault features caused by the large difference between the generated extended domain and the source domain.
[0058] S3, performing parameter optimization training on the fault diagnosis training model by combining samples in the source domain, the extended domain, and the intermediate domain;
[0059] S4, outputting the trained feature extractor and the classifier to form a constructed fault diagnosis model for online fault diagnosis of equipment.
[0060] This embodiment takes into account that most existing time-varying operating condition fault diagnosis methods focus on learning domain-invariant feature representations from multiple source domains, while ignoring the study of time-varying operating conditions; this embodiment deeply analyzes the operating condition variation rules of time-varying operating conditions and finds that the operating conditions of time-varying operating conditions usually do not switch back and forth between several different operating conditions, but usually undergo continuous changes.
[0061] Based on this, a single-source domain generalized fault diagnosis model under time-varying conditions is established, including a domain extension module and a domain-invariant feature discrimination module. The domain extension module includes a generator and an intermediate domain generation strategy, which can generate an extended domain and an intermediate domain. The intermediate domain is used to connect and transition the source domain and the extended domain, so that the continuity between samples is enhanced; the domain-invariant feature discrimination module is trained based on samples in the three domains, aggregating similar features and dispersing different types of features, which can overcome the problem of feature overlap and difficulty in classification caused by time-varying conditions; this embodiment solves the problem of low accuracy of single-source domain generalized fault recognition under time-varying conditions, and improves the single-source domain generalized diagnosis performance under time-varying conditions.
[0062] In some specific embodiments, generating new samples according to samples in the source domain to form an extended domain in S2 specifically includes:
[0063] Extract features from samples in the source domain to obtain initial sample features;
[0064] AdaIN is used to randomly generate extended sample features for the initial sample features;
[0065] Restoring the extended sample features, acquiring new samples with the same dimension as the samples in the source domain to form the extended domain;
[0066] Generating new samples again according to the samples in the source domain and the samples in the extended domain to form the intermediate domain specifically includes:
[0067] The samples belonging to the same fault mode in the source domain and the extended domain are linearly combined to generate new samples to form the intermediate domain. The intermediate domain generation strategy adopts the linear combination strategy of the source domain and the extended domain to achieve sample amplification, that is, two samples are randomly selected from the source domain and the extended domain to synthesize new samples through a certain proportional weight. The domain extension module uses the source domain data to generate the extended domain, and generates the intermediate domain through the linear combination strategy to ensure that the generated intermediate domain and the extended domain have both domain specificity and domain invariance. The specific process of intermediate domain generation can be expressed as:
[0068]
[0069] in, represents the intermediate domain sample, X represents the source domain sample, represents the extended domain sample, w represents the random weight, w~Beta(α,α), α=100.
[0070] Furthermore, feature extraction is performed on samples in the source domain to obtain initial sample features, specifically including:
[0071] Performing morphological opening and closing operations on samples in the source domain to enhance signals, fusing the signals after the morphological opening and closing operations, and performing feature extraction on the fused signals to obtain first initial sample features;
[0072] Accordingly, the first initial sample feature is randomly generated using AdaIN to generate a first extended sample feature.
[0073] Extract features from samples in the source domain to obtain initial sample features, which also includes:
[0074] Directly extracting features from samples in the source domain to obtain second initial sample features, wherein the second initial sample features have the same dimension as the first initial sample features;
[0075] Accordingly, the second initial sample feature is randomly generated using AdaIN to generate a second extended sample feature;
[0076] The first extended sample feature and the second extended sample feature are fused, and the fused feature is restored to obtain a sample in the extended domain.
[0077] Specifically, the initial sample features are randomly generated using AdaIN to generate extended sample features by the following formula:
[0078]
[0079] Among them, z represents the initial sample characteristics; n represents random noise n~N(0,1); μ and σ represent the mean and variance of samples in the source domain; FC represents a single-layer fully connected neural network.
[0080] In some specific embodiments, the generator adopts a dual encoder-randomization-feature fusion-decoder structure, the dual encoder includes a morphological encoder and a universal encoder, the morphological encoder adopts a dual-branch morphological opening and closing operation and a 3-layer fully connected neural network, the universal encoder and decoder are both 5-layer fully connected neural networks, and randomization adopts AdaIN. The encoder part in the generator will extract the fault features of the source domain data.
[0081] In the Morphological Encoder section:
[0082] The morphological encoder is a structure of a dual-branch morphological opening and closing operation network layer and a three-layer fully connected neural network, in which one branch is a morphological opening operation network layer and the other branch is a morphological closing operation network layer. The signals of the two branches are then fused, which can be superimposed or averaged. The fused branches are input into the three-layer fully connected neural network for feature extraction. Specifically, the normalized signal samples are processed separately by the dual-branch one-dimensional morphological operator network layer, and then the processed signals are processed by a three-layer fully connected neural network to extract their feature maps. The morphological opening operation layer is that the signal passes through the corrosion layer and the expansion layer in sequence, which can effectively remove the noise interference components in the signal. The morphological closing operation is that the signal passes through the expansion layer and the corrosion layer in sequence, which can effectively enhance the fault feature components in the signal, in which the corrosion layer operation and the expansion layer operation are respectively expressed as:
[0083]
[0084] in, and is the morphological kernel of the corrosion and expansion operations. The samples after morphological processing are then combined to form an enhanced signal with the same dimension as the original source domain sample signal. The enhanced signal is then input into the next three layers of the neural network to obtain the corresponding feature map z m In the universal encoder part, the universal encoder directly extracts the corresponding feature map z from the normalized source domain signal samples g .
[0085] By extracting the fault feature map (where H and W represent the height and width of the feature map) the mean μ and variance σ of the source domain samples can be calculated as follows:
[0086]
[0087] Secondly, in order to improve the generalization performance of the model, it is necessary to generate rich and diverse signal samples. Therefore, adaptive instance normalization AdaIN is used to randomize sample generation. AdaIN converts the randomly generated noise n into variance FC1(n) and mean FC2(n) through a single-layer fully connected neural network, and applies the obtained variance FC1(n) and mean FC2(n) to the mean μ and variance σ of the source domain to randomly improve the initial sample features extracted based on the source domain samples, and generate new sample features. The randomization process can be expressed as:
[0088]
[0089] Among them, FC represents a single-layer fully connected neural network, and the random noise is n~N(0,1). Through AdaIN, the source domain feature information graph can realize domain difference representation by adaptively integrating the features of random noise.
[0090] Through the above AdaIN randomization steps, the two randomized feature maps are obtained and The two feature maps are fused, for example, superimposed and fused, to obtain a new feature map:
[0091]
[0092] Finally, the decoder in the generator restores the new sample features to the original signal size, thereby obtaining samples in the extended domain. The dual encoder structure design of the generator ensures that the noise components in the signal can be effectively removed while protecting the fault feature components in the signal. The symmetric structure design of the generator ensures that the generator and decoder have the same representation capabilities without destroying the potential relationship between the features in the feature space.
[0093] In some embodiments, S3 specifically includes:
[0094] S31, based on the samples in the source domain, the extended domain and the intermediate domain, supervised contrast learning is performed respectively, and the domain-invariant feature discrimination module is trained and optimized; the domain-invariant feature discrimination module extracts features from the source domain, the extended domain and the intermediate domain samples respectively, inputs the extracted features into the classifier, and trains and optimizes to obtain the optimal feature extractor and classifier. Through supervised contrast learning, feature mining is performed using the sample features obtained by the feature extractor, sample features of the same type are aggregated, and sample features of different types are pulled apart, thereby improving the fault diagnosis performance.
[0095] S32, based on the samples in the source domain, the extended domain, and the intermediate domain, respectively perform adversarial contrast learning on the samples in the extended domain and the intermediate domain and the samples in the source domain, and perform training optimization on the domain extension module;
[0096] Among them, S31 and S32 are performed alternately.
[0097] The domain-invariant feature discrimination module includes a feature extractor and a classifier; the feature extractor adopts a one-dimensional ResNet18 neural network structure, and its input is 64×1×1024; the classifier adopts a three-layer fully connected neural network and a Softmax layer. The feature extractor is used to extract feature representations of the source domain, the extended domain, and the intermediate domain; the feature map (feature representation) extracted by the feature extractor will be used for supervised contrastive learning and adversarial contrastive learning; the classifier is used to identify the feature representation as the corresponding fault mode.
[0098] The feature extractor is used to extract fault features from the source domain, extended domain, and intermediate domain, and the classifier is ensured to accurately identify the corresponding fault mode. The classification loss of the source domain, extended domain, and intermediate domain is used to ensure the correct identification of the source domain, extended domain, and intermediate domain samples. The predicted probability output by the classifier is used to calculate the classification loss to ensure the accuracy of identification. At the same time, in order to ensure the validity of the generated extended domain and intermediate domain, the fault features of the extended domain and intermediate domain are also extracted to calculate the classification loss to ensure the accuracy of fault identification in the extended domain and intermediate domain.
[0099] Supervised contrastive learning uses the feature representation of the source domain to achieve inter-class contrast, forcing the domain-invariant feature discrimination module to learn domain-invariant feature representation, clustering features of the same category, separating features of different categories, achieving intra-class contrast, and reducing domain shift to improve generalization performance. Supervised contrastive learning is performed simultaneously in three domains. Therefore, the features of fault samples of the same category are regarded as positive sample features, and the features of fault samples of different categories are regarded as negative sample features. The supervisory labels of positive and negative samples are 0 and 1, respectively, that is, domain-invariant feature representations of the class layer are mined through inter-class contrastive learning. Inter-class contrast is achieved through supervised contrastive learning, and the features of samples of the same category are clustered, while the features of samples of different categories are pulled apart, thereby improving the performance of fault diagnosis.
[0100] The adversarial contrastive learning strategy is used to mine the feature representations of the extended domain and the intermediate domain to achieve intra-class comparison, forcing the extended domain and the intermediate domain generated by the domain extension module to have both specificity and domain invariance, making up for the lack of fault knowledge caused by the only single source domain and improving the generalization performance.
[0101] The generated extended domain and intermediate domain are optimized by using adversarial contrastive learning strategy. The source domain samples, extended domain and intermediate domain samples have the same label space. The generated extended domain and intermediate domain can effectively improve the generalization performance. The generated extended domain and intermediate domain should be different from the source domain and maintain certain feature similarity with the source domain. Therefore, the source domain samples are taken as positive samples, and the extended domain and intermediate domain samples are taken as negative samples respectively. Through the contrastive learning of positive and negative samples, the extended domain and intermediate domain samples are kept away from the source domain samples, so that there are differences between the generated extended domain and intermediate domain samples and the source domain, which are specific. During the training process, the samples in the extended domain and intermediate domain are respectively subjected to adversarial contrastive learning with the samples in the source domain, and the negative sample set is constructed by randomly selecting samples from the extended domain and intermediate domain. Through adversarial training, the samples in the source domain are kept away from the samples in the extended domain or intermediate domain, so that they have domain distribution differences and achieve intra-class comparison, that is, the samples of the same type between different domains have both differences and similarities, ensuring that the generated extended domain and intermediate domain are different from the source domain, that is, the generated extended domain and intermediate domain have domain-specific information.
[0102] S31 specifically includes:
[0103] Determine a first optimization loss based on source domain classification loss, extended domain classification loss, intermediate domain classification loss and supervised contrast loss, and train and optimize the feature extractor and the classifier in the domain-invariant feature discrimination module based on the first optimization loss; the domain-invariant feature discrimination module uses source domain, extended domain and intermediate domain samples as input, and optimizes using source domain classification loss, extended domain classification loss, intermediate domain classification loss and supervised contrast learning;
[0104] S32 specifically includes:
[0105] A second optimization loss is determined based on the extended domain classification loss, the intermediate domain classification loss, and the adversarial contrast loss, and the generator in the domain extension module and the intermediate domain generation parameters are trained and optimized based on the second optimization loss. The extended domain classification loss, the intermediate domain classification loss, and the adversarial contrast loss are used to ensure that the extended domain is in the correct label space, and the generator is optimized to generate samples with domain specificity.
[0106] The above steps are used to optimize the parameters of the intelligent fault diagnosis model. Specifically, the domain extension module and the domain-invariant feature discrimination module of the intelligent device fault diagnosis model, i.e., the fault diagnosis training model, are optimized according to the classification loss function, supervised contrastive learning loss and adversarial contrastive learning loss, and finally the optimal feature extractor and classifier are obtained.
[0107] Specifically, in order to optimize all deep neural network parameters end-to-end, the domain-invariant feature discrimination module and the domain extension module are optimized alternately. Therefore, for each sample, back propagation is performed, and according to the gradient of the loss, the parameter optimization of the domain extension module and the domain-invariant feature discrimination module of the equipment intelligent fault diagnosis model can be achieved. Through multiple iterative optimizations, the domain extension module and the domain-invariant feature discrimination module of the equipment intelligent fault diagnosis model that are finally optimized can be obtained.
[0108] The first optimization loss in S31 is specifically:
[0109]
[0110] The second optimization loss in S32 is specifically:
[0111]
[0112] Among them, L SD is the source domain classification loss; L ED is the extended domain classification loss; L ID is the intermediate domain classification loss; L sup is the supervised contrast loss; L adv is the adversarial contrast loss; θ f and θc They represent the weight parameters of the feature extractor and classifier in the domain-invariant feature discrimination module; θ G and w represent the weight parameters of the generator and the intermediate domain generation strategy in the domain extension module. γ1 and γ2 are the balancing parameters of the above optimization loss function, respectively.
[0113] Among them, the source domain classification loss L SD It can be expressed as:
[0114]
[0115] Among them, Y represents the label of the fault sample, N represents the number of fault samples, C(x i ) represents the predicted label of the i-th fault sample classifier, y i represents the true fault label of the i-th fault sample, Represents the predicted probability of the classifier, and c represents the fault category index. In order to ensure the effectiveness of the generated extended domain and intermediate domain, the fault features of the extracted extended domain and intermediate domain are also required to calculate the classification loss, which is expressed as:
[0116]
[0117] The loss function of the supervised contrastive learning process can be expressed as:
[0118]
[0119] Among them, n c represents the number of samples of type c faults, P c (i) is the set of positive samples of type c faults in the source domain, N c (i) is the set of negative samples of type c faults in the extended domain or the intermediate domain, S(·) represents the cosine similarity metric, z i represents the i-th sample feature, represents the positive sample feature, represents the negative sample feature, and τ represents the ratio parameter. Therefore, through supervised contrastive learning, sample features of the same type are aggregated, and sample features of different types are pulled apart, thereby improving the fault diagnosis performance.
[0120] The adversarial contrast loss can be expressed as:
[0121]
[0122] Among them, n c represents the number of samples of type c faults, P c (i) is the set of positive samples of type c faults in the source domain, N c (i) is the set of negative samples of type c faults in the extended domain or the intermediate domain, S(·) represents the cosine similarity metric, zi represents the i-th sample feature, represents the positive sample feature, Denotes the negative sample feature, and τ denotes the ratio parameter. During the training process, the negative sample set is constructed by randomly selecting samples from the extended domain and the intermediate domain. Through adversarial training, the c-th sample of the source domain is far away from the c-th sample of the extended domain or the intermediate domain, so that they produce domain distribution differences, ensuring that the generated extended domain and intermediate domain are different from the source domain, that is, the generated extended domain and intermediate domain have domain-specific information.
[0123] Furthermore, the second embodiment provides a single-source domain generalized fault diagnosis method under time-varying working conditions, using the fault diagnosis model output by the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions described in any one of the above items, the fault diagnosis method includes:
[0124] Collecting actual vibration signals of the equipment to form test samples, and inputting the test samples into the feature extractor of the fault diagnosis model to extract fault features;
[0125] The extracted fault features are input into the classifier to obtain the corresponding fault mode and realize fault diagnosis.
[0126] That is, the online test part is: collecting vibration signals online through sensors and inputting them into the trained model, which mainly includes trained feature extractors and classifiers. For the test samples, the fault mode detection is divided into two steps:
[0127] Input the test sample into the trained feature extractor to extract effective discriminant features;
[0128] The extracted effective discriminant features are input into the trained classifier to obtain the corresponding fault mode and realize fault diagnosis.
[0129] The present invention also provides a system for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions. The system includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it executes the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions as described above.
[0130] The present invention also provides a computer-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions as described above.
[0131] 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 method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions, characterized in that: include: S1, collect vibration signals of equipment under different fault modes in a single working condition, and construct a single source domain training set. The samples in the single source domain training set form the source domain; S2, establishing a fault diagnosis training model, the fault diagnosis training model includes a domain extension module and a domain-invariant feature discrimination module; the domain extension module includes a generator, the generator is used to generate new samples according to samples in the source domain to form an extended domain, the domain extension module is also used to generate new samples again according to samples in the source domain and samples in the extended domain to form an intermediate domain; the domain-invariant feature discrimination module includes a feature extractor and a classifier, the feature extractor is used to extract fault features of samples, and the classifier is used to output fault mode classification results of samples according to the fault features of samples extracted by the feature extractor; S3, performing parameter optimization training on the fault diagnosis training model by combining samples in the source domain, the extended domain, and the intermediate domain; S4, outputting the trained feature extractor and the classifier to form a constructed fault diagnosis model for online fault diagnosis of equipment.
2. The method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions according to claim 1, characterized in that: In S2, new samples are generated according to samples in the source domain to form an extended domain, which specifically includes: Extract features from samples in the source domain to obtain initial sample features; AdaIN is used to randomly generate extended sample features for the initial sample features; Restoring the extended sample features, acquiring new samples with the same dimension as the samples in the source domain to form the extended domain; Generating new samples again according to the samples in the source domain and the samples in the extended domain to form the intermediate domain specifically includes: The samples belonging to the same fault mode in the source domain and the extended domain are linearly combined to generate new samples to form the intermediate domain.
3. The method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions as claimed in claim 2, characterized in that: Extract features from samples in the source domain to obtain initial sample features, including: Performing morphological opening and closing operations on samples in the source domain to enhance signals, fusing the signals after the morphological opening and closing operations, and performing feature extraction on the fused signals to obtain first initial sample features; Accordingly, the first initial sample feature is randomly generated using AdaIN to generate a first extended sample feature.
4. The method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions as claimed in claim 3, characterized in that: Extract features from samples in the source domain to obtain initial sample features, which also includes: Directly extracting features from samples in the source domain to obtain second initial sample features, wherein the second initial sample features have the same dimension as the first initial sample features; Accordingly, the second initial sample feature is randomly generated using AdaIN to generate a second extended sample feature; The first extended sample feature and the second extended sample feature are fused, and the fused feature is restored to obtain a sample in the extended domain.
5. The method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions as claimed in claim 2, characterized in that: The initial sample features are randomly generated using AdaIN to generate extended sample features, specifically by the following formula: Among them, z represents the initial sample characteristics; n represents random noise n~N(0,1); μ and σ represent the mean and variance of samples in the source domain; FC represents a single-layer fully connected neural network.
6. The method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions as claimed in claim 4, characterized in that: The generator adopts a dual encoder-randomization-feature fusion-decoder structure. The dual encoder includes a morphological encoder and a universal encoder. The morphological encoder adopts a dual-branch morphological opening and closing operation and a 3-layer fully connected neural network. The universal encoder and decoder are both 5-layer fully connected neural networks, and the randomization adopts AdaIN.
7. The method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions according to any one of claims 1 to 6, characterized in that: S3 specifically includes: S31, performing supervised contrastive learning based on samples in the source domain, the extended domain, and the intermediate domain, respectively, and training and optimizing the domain-invariant feature discrimination module; S32, based on the samples in the source domain, the extended domain, and the intermediate domain, respectively perform adversarial contrast learning on the samples in the extended domain and the intermediate domain and the samples in the source domain, and perform training optimization on the domain extension module; Among them, S31 and S32 are performed alternately.
8. The method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions as claimed in claim 7, characterized in that: S31 specifically includes: Determine a first optimization loss based on the source domain classification loss, the extended domain classification loss, the intermediate domain classification loss, and the supervised contrast loss, and train and optimize the feature extractor and the classifier in the domain-invariant feature discrimination module based on the first optimization loss; S32 specifically includes: A second optimization loss is determined based on the extended domain classification loss, the intermediate domain classification loss, and the adversarial contrast loss, and the generator in the domain extension module and the intermediate domain generation parameters are trained and optimized based on the second optimization loss.
9. The method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions as claimed in claim 8, characterized in that: The first optimization loss in S31 is specifically: The second optimization loss in S32 is specifically: Among them, L SD is the source domain classification loss; L ED is the extended domain classification loss; L ID is the intermediate domain classification loss; L sup is the supervised contrast loss; L adv is the adversarial contrast loss; θ f and θ c They represent the weight parameters of the feature extractor and classifier in the domain-invariant feature discrimination module; θ G and w represent the weight parameters of the generator and the intermediate domain generation strategy in the domain extension module; γ1 and γ2 are the balancing parameters of the above optimization loss function, respectively.
10. A single-source domain generalized fault diagnosis method under time-varying working conditions, characterized in that: The fault diagnosis model output by the method for constructing a single-source domain generalized fault diagnosis model under time-varying working conditions according to any one of claims 1 to 9 is applied, and the fault diagnosis method comprises: Collecting actual vibration signals of the equipment to form test samples, and inputting the test samples into the feature extractor of the fault diagnosis model to extract fault features; The extracted fault features are input into the classifier to obtain the corresponding fault mode and realize fault diagnosis.
Citation Information
Patent Citations
Single-source-domain generalization intelligent diagnosis method under invisible working condition
CN117056805A
Cross-working-condition open-set fault diagnosis method and device based on self-supervised contrast learning enhancement
CN118427681A
Domain generalization hyperspectral image classification method based on three-dimensional frequency domain transformation
CN118799655A
Cited By
Single-source-domain generalization intelligent identification method based on flow model feature enhancement
CN120386992A