Semi-supervised water chilling unit fault diagnosis method fusing hybrid expert nerve process and memory contrast learning
By fusion of the semi-supervised method of hybrid expert neural process and memory comparison learning, a probability distribution fault diagnosis model is constructed and unsupervised data feature representation is enhanced. This solves the problem of lack of generalization of chiller fault diagnosis algorithms in the existing technology and requires a large number of labeled samples, and realizes accurate fault diagnosis in the absence of sufficient labeled samples.
Patent Information
- Application Number
- CN202411949683.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-23
AI Technical Summary
The existing chiller fault diagnosis algorithm based on supervised learning requires a large number of supervised samples and lacks generalization, making it difficult to obtain robust results in the test data.
Using a semi-supervised fault diagnosis method that combines mixed expert neural processes and memory contrast learning, a fault diagnosis model based on probability distribution is constructed, diagnostic category prediction distribution is fitted, and an unsupervised sample training strategy based on memory contrast learning is designed to enhance the category distinction of unsupervised data feature representation.
The generalization of the model is improved, accurate chiller fault diagnosis is achieved in the absence of sufficient labeling samples, and the effectiveness of the method in actual scenarios is verified.
Smart Images

Figure CN120030405A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis of chillers in air-conditioning systems, and in particular to a semi-supervised fault diagnosis method for chillers that integrates hybrid expert neural processes and memory contrast learning. Background Art
[0002] According to the "Research Report on Energy Consumption and Carbon Emissions in China's Buildings (2023)" released by the China Building Energy Conservation Association, in 2021, the total energy consumption of the entire housing construction process (excluding infrastructure construction) in the country is 1.91 billion tce, accounting for 36.3% of the national energy consumption. In the energy consumption of housing buildings, the proportion of building heating, ventilation and air conditioning systems (HVAC) accounts for more than 40%, which is the main source of energy consumption. As a key equipment in the HVAC system, the chiller will inevitably have faults such as compressor exhaust valve leakage, condenser dirty blockage, and refrigerant leakage during long-term operation. If the fault diagnosis of the chiller is not timely or an incorrect diagnosis is given, it may cause equipment shutdown, equipment damage, etc., resulting in serious energy waste. Therefore, it is necessary to design an accurate and efficient chiller fault diagnosis algorithm to achieve high-quality fault prevention work and extend the service life of the chiller.
[0003] Thanks to the development of wireless sensor networks and artificial intelligence technology, a large number of data-driven fault diagnosis algorithms have emerged in recent years. Such algorithms only use historical data for model training and do not require the construction of complex physical models or rich expert knowledge in the fault field as support. However, traditional data-driven fault diagnosis algorithms are all based on supervised learning, training a robust diagnostic model through sufficient supervised samples. However, supervised samples need to be manually labeled, and creating a training data set with sufficient supervised samples is time-consuming and labor-intensive. Therefore, traditional fault diagnosis methods based on supervised learning are not suitable for chiller fault diagnosis in actual scenarios.
[0004] In order to alleviate the problem of limited number of labeled samples, many fault diagnosis algorithms based on semi-supervised learning have been proposed. These algorithms assist in model training with a small number of supervised samples by mining the data distribution information implicit in unsupervised samples. For example, the semi-supervised fault diagnosis algorithm based on self-training adds the highly credible pseudo labels predicted by the model for unsupervised samples to the supervised learning during the training process, and improves the model's diagnostic accuracy by continuously iteratively expanding the number of labels. The semi-supervised fault diagnosis algorithm based on collaborative learning assumes that learning consistent information from unsupervised samples that is not affected by data perturbations can effectively enhance the model's distinction between fault categories. In order to realize this assumption, the algorithm enhances the unsupervised samples through data enhancement methods to obtain perturbed samples, and on this basis designs a collaborative training method to constrain the model's diagnostic predictions for perturbed samples to remain consistent.
[0005] Although the existing semi-supervised fault diagnosis algorithms have achieved good results, the current algorithms are all decision-based fault diagnosis algorithms, which directly output a diagnostic prediction result for each sample. Such algorithms do not consider the probability distribution of learning diagnostic predictions, and the final predictions lack generalization. When making diagnostic predictions on test data, especially when predicting test data with a large distribution difference from the training set data, it is difficult to obtain robust results using a fixed trained model. This problem can be effectively alleviated by constructing a fault diagnosis algorithm based on probability distribution. The algorithm fits the diagnostic prediction distribution and samples to generate multiple prediction results about the fault category, so as to select the optimal result as the output based on the new samples that appear in the test.
[0006] Based on this, this application proposes a semi-supervised chiller fault diagnosis method that integrates hybrid expert neural process and memory contrast learning. The semi-supervised chiller fault diagnosis algorithm is modeled based on the hybrid expert joint neural process, and the diagnosis prediction distribution is fit through the probability distribution method. At the same time, an unsupervised sample training strategy based on memory contrast learning is constructed to enhance the learned unsupervised data feature representation. Finally, a chiller fault diagnosis network is created to complete the fault category prediction task. Summary of the invention
[0007] The purpose of the present invention is to provide a semi-supervised chiller fault diagnosis method that integrates hybrid expert neural process and memory contrast learning, propose a new chiller fault diagnosis model based on hybrid expert joint neural process, fit the fault category prediction distribution to alleviate the problem of insufficient generalization of existing algorithms; design an unlabeled sample training strategy based on memory contrast learning to learn unsupervised data representation with category distinction; integrate the above contents to create a chiller fault diagnosis network, and accurately diagnose the chiller fault in the absence of sufficient labeled samples.
[0008] To achieve the above object, the present invention provides the following solutions:
[0009] The present invention provides a semi-supervised chiller fault diagnosis method integrating hybrid expert neural process and memory contrast learning, comprising the following steps:
[0010] S1. Construct a modeling method for refrigeration unit fault diagnosis algorithm based on hybrid expert joint neural process, introduce the neural process idea to achieve the fitting of fault category prediction distribution, and design the evidence lower bound function to guide model training;
[0011] S2. Design an unlabeled sample training strategy based on memory contrastive learning;
[0012] S3. Create a chiller fault diagnosis network and use the fitted category prediction distribution under semi-supervised training conditions to complete the fault diagnosis task.
[0013] Preferably, step S1 comprises:
[0014] According to the Kolmogorov expansion theory, given the input data and the corresponding fault category Where N represents the number of samples, D represents the data dimension, and the neural process learns the probability distribution of fault categories through an instantiated random process f, as shown in formula (1):
[0015]
[0016] The instantiated random process f is represented by a neural network The network g represents the input data and a function of a random latent variable z sampled from a multivariate Gaussian distribution.
[0017] Preferably, step S1 further comprises: in the semi-supervised chiller fault diagnosis task, a small number of supervised samples are used as the context set Unsupervised samples are the target set And fit its fault category prediction distribution, and design the evidence lower bound function as the objective function, as shown in formula (2):
[0018]
[0019] The first term of the formula is the cross entropy loss during actual model training, which is used for the model to learn fault category information from labels or pseudo labels obtained by model self-training. The second term of the formula is the Kulbak-Leibler divergence loss, which maintains and The two posterior distributions are close to each other.
[0020] Preferably, the unlabeled samples Enhanced and As weakly enhanced samples and strongly enhanced samples respectively, a mixed expert is used to fit the joint distribution based on the enhanced samples. In addition, in order to obtain a tighter evidence lower bound function, a multi-sampling method is used to calculate the probability distribution of supervised data and unsupervised data. Taking the unsupervised sample distribution as an example, S is the number of samples, thus, formula (2) is further improved:
[0021]
[0022] By learning about and The joint distribution of will fully explore the implicit consistent essential patterns in the unlabeled samples and enhance the category discrimination of the fitted diagnostic prediction distribution;
[0023] When calculating the Kulbak-Leibler divergence, given that the learned posterior distribution follows a multivariate Gaussian distribution, and The second term of formula (3), the Kulbak-Leibler divergence loss, is further expanded as follows:
[0024]
[0025] Similarly,
[0026]
[0027] In the specific implementation, all mean vectors and variance vector All of them are obtained through neural networks, using mean vector and variance vector to fit the fault category prediction distribution, and sampling from the distribution to obtain the data Category feature representation z;
[0028] The loss of the refrigeration unit fault diagnosis modeling based on the hybrid expert joint neural process consists of two parts. The first is the cross entropy loss, which is used for the model to learn the fault category information from the label or the pseudo label obtained by the model self-training:
[0029]
[0030] in, represents the cross entropy loss of model training using labels, represents the cross entropy loss of model training using pseudo labels, and H represents the cross entropy;
[0031] The second loss is the Kulbak-Leibler divergence loss for unsupervised samples, and the overall formula is as follows:
[0032]
[0033] Preferably, step S2 comprises:
[0034] First, we build a class center generation algorithm based on memory units, and use the memory unit update method to build class center representation based on supervised samples:
[0035]
[0036] Among them, e j , represents the central representation of the j-th fault category, j∈{1,…,K}, K represents the number of fault categories, nj represents the number of supervised samples of the j-th fault category, represents the i-th sample feature of the current fault category, and η represents the model training learning rate;
[0037] The class center representation distance of the i-th sample with respect to the j-th class is calculated as:
[0038]
[0039] Among them, dist represents the Euclidean distance;
[0040] For a sample, the calculated distance is used to determine whether it belongs to the current category. The specific method is shown in formula (11):
[0041]
[0042] During model training, the category representation in the memory unit is updated through iterative updating. As the number of training times increases, the memory unit combines the historical model output and the currently acquired category feature representation to enhance the category center representation.
[0043] After obtaining the central representation of all fault categories, a new memory contrast loss function is designed to avoid samples of the same category being treated as negative samples. The memory contrast loss is shown in formula (12):
[0044]
[0045] Where τ represents the temperature coefficient;
[0046] The contrast loss for all samples is:
[0047]
[0048] Because the number of supervised samples is limited, the class center representation needs to be constantly updated to ensure the accuracy of its classification information. In order to optimize the update process of the class center representation based on the memory unit, a new memory regularization loss is designed:
[0049]
[0050] in, represents the memory unit’s prediction about the jth category, represents the diagnosis model's prediction about the jth category. The first term of the formula is used to guide the memory unit to generate a reasonable class center, narrowing the distance between the class probability predicted by the memory unit and the class probability predicted by the diagnosis network. The second term is the information entropy loss, which maximizes the predicted class information. In addition, v j The class center is obtained by taking the one-hot vector b obtained by the classifier softmax as input and updating the memory. The specific calculation is shown in formula (15):
[0051]
[0052] Preferably, in step S3, the overall loss function is formed by combining the first part and the second part of the implementation method, and the formula is as follows:
[0053]
[0054] In this implementation, the hyperparameters α and β are set to 0.1 and 0.001, respectively.
[0055] Preferably, the model is trained using the above loss function, specifically:
[0056] S31. Extracting data features using an encoder;
[0057] S32. Design a parallel dual-channel module to learn and fit the predicted distribution of fault categories;
[0058] S33. Fault category prediction using semi-supervised fault diagnosis network.
[0059] Preferably, step S31 is specifically as follows: before the data is sent to the encoder, data enhancement is performed on the unlabeled samples. Weakly enhanced samples are obtained by scaling and variable shifting operations At the same time, strong enhanced samples are obtained by adding noise and changing the position of data groups. Then, the processed unlabeled samples and labeled samples are sent to the encoder for feature extraction.
[0060] Preferably, step S32 is specifically as follows: after obtaining the encoder features, a dual parallel channel module is designed to fit the fault category prediction distribution and obtain the final latent variable by sampling, and concatenate the features of the supervised samples and the corresponding label vectors. C , sent to the latent channel module Latent_Path, and the mean vector and variance vector are obtained through MeanNet and VarNet to fit the fault category prediction distribution. On this basis, 5 samplings are performed to obtain At the same time, the concatenated vector is sent to the decision channel module Deterministic_Path to obtain Then the features obtained from the encoder and Concatenate and use the feature concatenation module Concatenate_Block to get the output z C ;
[0061] For unsupervised samples, the model first directly uses the classifier Classifer to predict the pseudo label, and then concatenates the unsupervised sample features and the corresponding pseudo label vector and sends them to the latent channel module Latent_Path, which also obtains the output by sampling. and Corresponding to weakly enhanced data and strongly enhanced data respectively, then, the unsupervised samples use the features of the supervised samples as the input calculation of the decision channel module Deterministic_Path during training At the same time, the potential channel and decision channel outputs of weakly enhanced and strongly enhanced data are saved to storage unit a l and a r , the unit capacity is 2560 dimensions, and then the output is obtained through the feature concatenation module Concatenate_Block and
[0062] Preferably, step S33 is specifically as follows: after obtaining z T After that, the model uses the decoder to predict the fault category. When testing the performance of the fault diagnosis model, considering that there is no label or pseudo label as input, the model uses the storage unit a constructed during training. l and a r , as the output of the potential channel module and the decision channel module, and then, it is compared with the input test sample feature The concatenation is performed through the feature concatenation module Concatenate_Block and sent to the decoder Decoder to obtain the final result.
[0063] Compared with the prior art, the present invention has achieved the following beneficial technical effects:
[0064] The present invention provides a semi-supervised chiller fault diagnosis method that integrates hybrid expert neural process and memory contrast learning, and proposes a new chiller fault diagnosis algorithm based on probability distribution. By fitting the predicted distribution of fault categories, the generalization of the model is effectively improved, and accurate chiller fault diagnosis is achieved. Through semi-supervised fault diagnosis experiments, it is verified that the present invention can accurately diagnose chiller faults. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0066] Figure 1 A framework diagram of a semi-supervised chiller fault diagnosis method that integrates hybrid expert neural process and memory contrast learning provided by the present invention;
[0067] Figure 2 A basic flow chart of a semi-supervised chiller fault diagnosis method that integrates hybrid expert neural process and memory contrast learning provided by the present invention. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] The purpose of the present invention is to provide a semi-supervised chiller fault diagnosis method integrating hybrid expert neural process and memory contrast learning to solve the problems existing in the prior art.
[0070] like Figure 1 and Figure 2As shown, a semi-supervised chiller fault diagnosis method that integrates hybrid expert neural process and memory contrast learning of the present invention includes three parts: modeling of refrigeration unit fault diagnosis algorithm based on hybrid expert combined neural process, design of unlabeled data training strategy based on memory contrast learning, and implementation of chiller fault diagnosis network. First, a new fault diagnosis objective function based on hybrid expert neural process is proposed to guide the model to learn the predicted distribution of fault categories instead of directly predicting fault categories, thereby alleviating the generalization problem. Then, traditional contrast learning is improved for unsupervised data feature representation learning, and when selecting negative samples for contrast learning, all samples belonging to the same category as the positive samples are filtered to enhance the category discrimination of feature representation. Finally, a chiller fault diagnosis network is constructed to achieve complete fault category prediction.
[0071] The specific steps are as follows:
[0072] Step 1: Construct a modeling method for refrigeration unit fault diagnosis algorithm based on hybrid expert joint neural process;
[0073] In actual scenarios, the model can only be trained using a small amount of supervised fault diagnosis data, which makes it easy for the test set to contain samples that have not appeared during the model training process. Most existing fault diagnosis algorithms are decision-based classification algorithms, which lack generalization for unseen samples and are difficult to make effective predictions. In order to solve this problem, the present invention proposes to introduce the idea of neural process, construct a fault diagnosis model based on probability distribution, fit the diagnosis category prediction distribution, sample from the category prediction distribution to generate multiple diagnosis results, and combine these results to obtain the final output.
[0074] According to the Kolmogorov expansion theory, given the input data and the corresponding fault category N represents the number of samples, D represents the data dimension, and the neural process learns the probability distribution of fault categories through an instantiated random process f, as shown in formula (1):
[0075]
[0076] The instantiated random process f is represented by a neural network The network g represents the input data and a function of a random latent variable z sampled from a multivariate Gaussian distribution.
[0077] In the semi-supervised chiller fault diagnosis task, in order to ensure that the model can fit the generalized fault category prediction distribution for unsupervised samples, a small number of supervised samples are used as the context set. Unsupervised samples are the target set And fit its fault category prediction distribution, and design the evidence lower bound function as the objective function, as shown in formula (2):
[0078]
[0079] The first term in the formula is the cross entropy loss during actual model training, which is used for the model to learn fault category information from labels or pseudo labels obtained by model self-training. The second term in the formula is the Kulbak-Leibler divergence loss, which keeps and The two posterior distributions are close to each other.
[0080] Furthermore, the unlabeled samples Enhanced and As weakly enhanced samples and strongly enhanced samples respectively, a mixed expert is used to fit the joint distribution based on the enhanced samples. In addition, in order to obtain a tighter evidence lower bound function, a multi-sampling method is used to calculate the probability distribution of supervised data and unsupervised data. Taking the unsupervised sample distribution as an example, S is the number of samples. Therefore, formula (2) is further improved:
[0081]
[0082] By learning about and The joint distribution of will fully explore the implicit consistent essential patterns in the unlabeled samples and enhance the category discrimination of the fitted diagnostic prediction distribution.
[0083] When calculating the Kulbak-Leibler divergence, given that the learned posterior distribution follows a multivariate Gaussian distribution, and The second term of formula (3), the Kulbak-Leibler divergence loss, is further expanded as follows:
[0084]
[0085] Similarly,
[0086]
[0087] In the specific implementation, all mean vectors and variance vector All are obtained through neural networks. The mean vector and variance vector are used to fit the fault category prediction distribution, and the data is sampled from the distribution. The categorical feature represents z.
[0088] In summary, the loss of the refrigeration unit fault diagnosis modeling based on the hybrid expert joint neural process consists of two parts. The first is the cross entropy loss, which is used for the model to learn the fault category information from the label or the pseudo label obtained by the model self-training:
[0089]
[0090] in, represents the cross entropy loss of model training using labels, represents the cross entropy loss of model training using pseudo labels, and H represents the cross entropy.
[0091] The second loss is the Kulbak-Leibler divergence loss for unsupervised samples, and the overall formula is as follows:
[0092]
[0093] Step 2: Construct an unsupervised sample training strategy based on memory contrastive learning;
[0094] Considering that the premise for the deep network model to accurately predict that an unlabeled sample belongs to a certain class is to obtain high-quality category feature representation z, D h is the feature representation dimension. The present invention designs a new unsupervised sample training strategy based on memory contrast learning, and uses contrast learning to train the unsupervised data category feature representation z T . Traditional contrastive learning forces the categories of each sample feature to be distanced, resulting in the problem that sample features of the same category are also distanced. In order to alleviate this problem and enhance the category discrimination of the learned unsupervised sample features, the present invention first constructs a category center generation algorithm based on memory units, and uses the memory unit update method to construct a category center representation based on supervised samples:
[0095]
[0096] Among them, e j , represents the central representation of the jth fault category, j∈{1,…,K}, K represents the number of fault categories. nj represents the number of supervised samples of the jth fault category, represents the i-th sample feature of the current fault category, and η represents the model training learning rate. In this way, the distance between the i-th sample and the class center of the j-th category is calculated as:
[0097]
[0098] Where dist represents the Euclidean distance. For a sample, the calculated distance is used to determine whether it belongs to the current category. The specific method is shown in formula (11):
[0099]
[0100] During model training, the category representation in the memory unit is updated through iterative updating. As the number of training increases, the memory unit combines the historical model output and the currently acquired category feature representation to enhance the category center representation.
[0101] After obtaining the central representation of all fault categories, a new memory contrast loss function is designed to avoid samples of the same category being treated as negative samples. The memory contrast loss is shown in formula (12):
[0102]
[0103] τ represents the temperature coefficient. The contrast loss for all samples is:
[0104]
[0105] Because the number of supervised samples is limited, the class center representation needs to be constantly updated to ensure the accuracy of its classification information. In order to optimize the update process of the class center representation based on the memory unit, a new memory regularization loss is designed:
[0106]
[0107] in, represents the memory unit’s prediction about the jth category, Represents the diagnosis model's prediction about the jth category. The first term of the formula is used to guide the memory unit to generate a reasonable class center, narrowing the distance between the class probability predicted by the memory unit and the class probability predicted by the diagnosis network. The second term is the information entropy loss, which maximizes the predicted class information. In addition, v j The class center is obtained by taking the one-hot vector b obtained by the classifier softmax as input and updating the memory. The specific calculation is shown in formula (15):
[0108]
[0109] Step 3: Implement the chiller fault diagnosis network;
[0110] In the specific implementation, the present invention adopts the encoding-decoding structure as the basic framework to construct the chiller fault diagnosis network. The entire model architecture is shown in Table 1.
[0111] Table 1: The chiller fault diagnosis network structure designed by the present invention.
[0112]
[0113]
[0114] Among them, Linear() represents the fully connected layer, in_features and out_features are the input and output data dimensions of this layer, bias=True means that this layer has bias parameters in addition to weight parameters, ReLU() is the activation function of each layer. Input_dim is the input dimension, and Class_dim is the prediction category dimension.
[0115] The overall loss function is composed of the first and second parts of the implementation method, and the formula is as follows:
[0116]
[0117] In the implementation, the hyperparameters α and β are set to 0.1 and 0.001 respectively. The model is trained using the above loss function. The specific implementation steps are:
[0118] Step 3.1, use the encoder to extract data features;
[0119] Before the data is fed into the encoder, the unlabeled samples are augmented. Weakly enhanced samples are obtained by scaling and variable shifting operations At the same time, strong enhanced samples are obtained by adding noise and changing the position of data groups. Then, the processed unlabeled samples and labeled samples are sent to the encoder for feature extraction. The encoder consists of a network with multiple fully connected layers. The specific structure is shown in Table 1.
[0120] Step 3.2, design a parallel dual-channel module to learn and fit the predicted distribution of fault categories;
[0121] After obtaining the encoder features, a dual parallel channel module is designed to fit the fault category prediction distribution and obtain the final latent variable by sampling. The features of the supervised samples and the corresponding label vectors are concatenated. C , sent to the latent channel module Latent_Path, and the mean vector and variance vector are obtained through MeanNet and VarNet to fit the fault category prediction distribution. On this basis, 5 samplings are performed to obtain At the same time, the concatenated vector is sent to the decision channel module Deterministic_Path to obtain Then the features obtained from the encoder and Concatenate and use the feature concatenation module Concatenate_Block to get the output z C .
[0122] For unsupervised samples, the model first directly uses the classifier Classifer to predict the pseudo label. Then the unsupervised sample features and the corresponding pseudo label vector are concatenated and sent to the latent channel module Latent_Path, and the output is also obtained by sampling. and Corresponding to weakly enhanced data and strongly enhanced data respectively. Then, the unsupervised samples use the features of the supervised samples as the input calculation of the decision channel module Deterministic_Path during training At the same time, the potential channel and decision channel outputs of weakly enhanced and strongly enhanced data are saved to storage unit a l and a r , the unit capacity is 2560 dimensions. Then, similar to the supervised sample training method mentioned above, the output is obtained through the feature concatenation module Concatenate_Block and
[0123] Step 3.3: Use the semi-supervised fault diagnosis network to predict the fault category;
[0124] In getting z T After that, the model uses the decoder to predict the fault category. The specific structure is shown in Table 1. In particular, when testing the performance of the fault diagnosis model, considering that there is no label or pseudo label as input, the model uses the storage unit a constructed during training. l and a r , as the output of the potential channel module and the decision channel module. Then, it is compared with the input test sample feature The concatenation is performed through the feature concatenation module Concatenate_Block and sent to the decoder Decoder to obtain the final result.
[0125] The overall process of the present invention is divided into three parts. First, an encoder for semi-supervised data is constructed, and the encoding network is used to extract sample features. Then a parallel dual-channel module is designed to fit the fault category prediction distribution and learn the data category feature representation. Finally, the category feature representation is sent to the decoder to predict the fault category. In order to make the category feature representation obey the fault category prediction distribution, the designed refrigeration unit fault diagnosis algorithm based on hybrid expert joint neural process is used to guide model training. At the same time, in order to make the unsupervised data category feature representation have category discrimination, the unlabeled sample training strategy based on memory contrast learning is added to the objective function. The specific process is shown in Figure 2 .
[0126] Verification results:
[0127] The present invention verifies the effect of the proposed method through two sets of experiments. The first set of experiments verifies the performance of model fault diagnosis on a public centrifugal chiller. The second set of experiments verifies the model effect using data generated from a falling membrane chiller LS320B1B in a real scene.
[0128] ASHRAE RP-1043 dataset: The ASHRAE RP-1043 dataset is a public centrifugal chiller fault dataset. The data input dimension is 65, including parameters such as condenser inlet water temperature and condenser water flow. There are 7 fault diagnosis categories, and these 7 fault categories have 4 fault severity levels in the experiment, namely level 1 fault level, level 2 fault level, level 3 fault level, and level 4 fault level. This experiment randomly selects 1500 samples from each fault category sample as the experimental dataset.
[0129] LS320B1B falling film chiller dataset: The LS320B1B falling film chiller dataset comes from an actual project. The data input dimensions are 9, including compressor load, system evaporation return water temperature, system evaporation outlet water temperature, evaporator temperature difference, system condensation return water temperature, system condensation outlet water temperature, condenser temperature difference, exhaust superheat, and exhaust temperature. There are a total of 8 fault categories, including suction liquid, refrigerant leakage, condenser dirty blockage, reduced chilled water volume, reduced cooling water volume, suction liquid and fluorine leakage at the same time, condenser dirty blockage and fluorine leakage at the same time, and liquid and condenser dirty blockage at the same time.
[0130] The experiment randomly selects 1% and 5% samples from each fault category as supervised data, and the rest are unlabeled data to construct a semi-supervised dataset. Classification accuracy and F1 score are used as evaluation criteria for diagnostic performance.
[0131] In terms of algorithm comparison, 7 commonly used traditional fault diagnosis algorithms based on supervised learning and 4 semi-supervised fault diagnosis algorithms based on deep learning were selected as comparison algorithms: Random Forest (RF), Support Vector Machine (SVM), Decision Tree (DT), Multinomial Naive Bayes (NB), Multilayer Perception Machine (MLP), K-Nearest Neighbor (KNN) and Logistic Regression (LR); visual representation learning model based on contrastive learning (Simclr, Simple Framework for Contrastive Learning of Representations), representation learning model based on contrastive predictive coding (CPC), and time series classification model CA-TCC (CA-TCC, Class-Aware Time-Series representation learning framework via Temporal and Contextual Contrasting) based on semi-supervised contrastive learning.
[0132] The method proposed in the present invention, Semi-supervised Chiller Diagnosis via Mixture-of-Experts Neural Process and Memory Contrastive Learning (MMCD), and the comparative method were experimented at four fault levels of the ASHRAE RP-1043 data set. Each algorithm was trained 5 times and the average value was taken for comparison. The specific diagnosis results are shown in Tables 2-5.
[0133] Table 2: Fault diagnosis rates on the ASHRAE RP-1043 dataset with 1% supervised data.
[0134]
[0135] Table 3: Fault diagnosis rates on the ASHRAE RP-1043 dataset with 1% supervised data.
[0136]
[0137]
[0138] Table 4: Fault diagnosis rates on the ASHRAE RP-1043 dataset with 5% supervised data.
[0139]
[0140]
[0141] Table 5: Fault diagnosis rates on the semi-supervised ASHRAE RP-1043 dataset constructed with 5% data.
[0142]
[0143]
[0144] As can be seen from the table, the method of the present invention has achieved 15 optimal values in total under four fault levels and two semi-supervised conditions, except for the experiment with 1% supervised fault level 2 data, which has the second best classification accuracy. The method proposed in the present invention shows excellent diagnostic performance on the ASHRAE RP-1043 dataset, proving that the present invention can accurately diagnose chiller faults.
[0145] The second set of experiments verifies the performance of the model fault diagnosis on the LS320B1B chiller fault data collected in the actual project. Each algorithm is trained 5 times and the best value is taken as the final result. As shown in Table 6, the method shows excellent performance on the actual data set, and achieves the best results in both classification accuracy and F1 score.
[0146] Table 6: Fault diagnosis rate on the LS320B1B falling film chiller dataset under semi-supervised conditions.
[0147]
[0148] The present invention uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only used to help understand the method and core ideas of the present invention. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A semi-supervised chiller fault diagnosis method integrating hybrid expert neural process and memory contrast learning, characterized by: The following steps are involved: S1. Construct a modeling method for refrigeration unit fault diagnosis algorithm based on hybrid expert joint neural process, introduce the neural process idea to achieve the fitting of fault category prediction distribution, and design the evidence lower bound function to guide model training; S2. Design an unlabeled sample training strategy based on memory contrastive learning; S3. Create a chiller fault diagnosis network and use the fitted category prediction distribution under semi-supervised training conditions to complete the fault diagnosis task.
2. The semi-supervised chiller fault diagnosis method integrating hybrid expert neural process and memory contrast learning according to claim 1 is characterized by: Step S1 includes: According to the Kolmogorov expansion theory, given the input data X∈R N×D :=(x1,K,x N ) and the corresponding fault category Y∈R N :=(y1,K,y N ), where N represents the number of samples and D represents the data dimension. The neural process learns the probability distribution of fault categories through an instantiated random process f, as shown in formula (1): p(Y|X)=∫p(f)p(Y|f,X)df (1); The instantiated random process f is represented by a neural network g(z,X), where the network g represents a function of the input data X and a random latent variable z sampled from a multivariate Gaussian distribution.
3. The semi-supervised chiller fault diagnosis method integrating hybrid expert neural process and memory contrast learning according to claim 2 is characterized by: Step S1 also includes: in the semi-supervised chiller fault diagnosis task, a small number of supervised samples are used as the context set (X C ,Y C ), the unsupervised samples are the target set (X T ,Y T ), and fit its fault category prediction distribution, and design the evidence lower bound function as the objective function, as shown in formula (2): The first term of the formula is the cross entropy loss during actual model training, which is used for the model to learn fault category information from labels or pseudo labels obtained by model self-training. The second term of the formula is the Kulbak-Leibler divergence loss, which keeps q(z|X T ,Y T ) and q(z|X T ,Y T )The two posterior distributions are close to each other.
4. The semi-supervised chiller fault diagnosis method integrating hybrid expert neural process and memory contrast learning according to claim 3 is characterized by: The unlabeled sample X T Enhanced and X^ T As weakly enhanced samples and strongly enhanced samples respectively, a mixed expert is used to fit the joint distribution based on the enhanced samples. In addition, in order to obtain a tighter evidence lower bound function, a multi-sampling method is used to calculate the probability distribution of supervised data and unsupervised data. Taking the unsupervised sample distribution as an example, S is the number of samples, thus, formula (2) is further improved: By learning about and The joint distribution of will fully explore the implicit consistent essential patterns in the unlabeled samples and enhance the category discrimination of the fitted diagnostic prediction distribution; When calculating the Kulbak-Leibler divergence, given that the learned posterior distribution follows a multivariate Gaussian distribution, and The second term of formula (3), the Kulbak-Leibler divergence loss, is further expanded as follows: Similarly, In the specific implementation, all mean vectors and variance vector All are obtained through neural networks, using mean vectors and variance vectors to fit the fault category prediction distribution, and sampling from the distribution to obtain the X category feature representation z about the data; The loss of the refrigeration unit fault diagnosis modeling based on the hybrid expert joint neural process consists of two parts. The first is the cross entropy loss, which is used for the model to learn the fault category information from the label or the pseudo label obtained by the model self-training: in, represents the cross entropy loss of model training using labels, represents the cross entropy loss of model training using pseudo labels, and H represents the cross entropy; The second loss is the Kulbak-Leibler divergence loss for unsupervised samples, and the overall formula is as follows:
5. The semi-supervised chiller fault diagnosis method integrating hybrid expert neural process and memory contrast learning according to claim 1 is characterized by: Step S2 includes: First, we build a class center generation algorithm based on memory units, and use the memory unit update method to build class center representation based on supervised samples: Among them, e j , represents the central representation of the jth fault category, j∈{1,K,K}, K represents the number of fault categories, n j represents the number of supervised samples of the jth fault category, represents the i-th sample feature of the current fault category, and η represents the model training learning rate; The class center representation distance of the i-th sample with respect to the j-th class is calculated as: Among them, dist represents the Euclidean distance; For a sample, the calculated distance is used to determine whether it belongs to the current category. The specific method is shown in formula (11): During model training, the category representation in the memory unit is updated through iterative updating. As the number of training times increases, the memory unit combines the historical model output and the currently acquired category feature representation to enhance the category center representation. After obtaining the central representation of all fault categories, a new memory contrast loss function is designed to avoid samples of the same category being treated as negative samples. The memory contrast loss is shown in formula (12): Where τ represents the temperature coefficient; The contrast loss for all samples is: Because the number of supervised samples is limited, the class center representation needs to be constantly updated to ensure the accuracy of its classification information. In order to optimize the update process of the class center representation based on the memory unit, a new memory regularization loss is designed: in, represents the memory unit’s prediction about the jth category, represents the diagnosis model's prediction about the jth category. The first term of the formula is used to guide the memory unit to generate a reasonable class center, narrowing the distance between the class probability predicted by the memory unit and the class probability predicted by the diagnosis network. The second term is the information entropy loss, which maximizes the predicted class information. In addition, v j The class center is obtained by taking the one-hot vector b obtained by the classifier softmax as input and updating the memory. The specific calculation is shown in formula (15):
6. The semi-supervised chiller fault diagnosis method integrating hybrid expert neural process and memory contrast learning according to claim 1 is characterized by: In step S3, the overall loss function is formed by combining the first part and the second part of the implementation method, and the formula is as follows: In this implementation, the hyperparameters α and β are set to 0.1 and 0.001, respectively.
7. The semi-supervised chiller fault diagnosis method integrating hybrid expert neural process and memory contrast learning according to claim 6 is characterized by: The model is trained using the above loss function, specifically: S31. Extracting data features using an encoder; S32. Design a parallel dual-channel module to learn and fit the predicted distribution of fault categories; S33. Fault category prediction using semi-supervised fault diagnosis network.
8. The semi-supervised chiller fault diagnosis method integrating hybrid expert neural process and memory contrast learning according to claim 7 is characterized by: Step S31 is as follows: before the data is sent to the encoder, data enhancement is performed on the unlabeled samples. Weakly enhanced samples are obtained by scaling and variable shifting operations At the same time, strong enhanced samples are obtained by adding noise and changing the position of data groups. Then, the processed unlabeled samples and labeled samples are sent to the encoder for feature extraction.
9. The semi-supervised chiller fault diagnosis method integrating hybrid expert neural process and memory contrast learning according to claim 7 is characterized by: Step S32 is specifically as follows: after obtaining the encoder features, a dual parallel channel module is designed to fit the fault category prediction distribution and obtain the final latent variable by sampling, and concatenate the features of the supervised samples and the corresponding label vectors. C , sent to the latent channel module Latent_Path, and the mean vector and variance vector are obtained through MeanNet and VarNet to fit the fault category prediction distribution. On this basis, 5 samplings are performed to obtain At the same time, the concatenated vector is sent to the decision channel module Deterministic_Path to obtain Then the features obtained from the encoder and Concatenate and use the feature concatenation module Concatenate_Block to get the output z C ; For unsupervised samples, the model first directly uses the classifier Classifer to predict the pseudo label, and then concatenates the unsupervised sample features and the corresponding pseudo label vector and sends them to the latent channel module Latent_Path, which also obtains the output by sampling. and Corresponding to weakly enhanced data and strongly enhanced data respectively, then, the unsupervised samples use the features of the supervised samples as the input calculation of the decision channel module Deterministic_Path during training At the same time, the potential channel and decision channel outputs of weakly enhanced and strongly enhanced data are saved to storage unit a l and a r , the unit capacity is 2560 dimensions, and then the output is obtained through the feature concatenation module Concatenate_Block and 10. The semi-supervised chiller fault diagnosis method integrating hybrid expert neural process and memory contrast learning according to claim 7 is characterized by: Step S33 is specifically as follows: after obtaining z T After that, the model uses the decoder to predict the fault category. When testing the performance of the fault diagnosis model, considering that there is no label or pseudo label as input, the model uses the storage unit a constructed during training. l and a r , as the output of the potential channel module and the decision channel module, and then, it is compared with the input test sample feature The concatenation is performed through the feature concatenation module Concatenate_Block and sent to the decoder Decoder to obtain the final result.