Hvac intelligent fault diagnosis method suitable for sample extremely scarce scene

By using a customized denoising diffusion probability model and self-supervised learning, fault data balanced with normal samples is generated, solving the problem of scarce fault data in HVAC systems and achieving efficient and robust fault diagnosis.

CN121412778BActive Publication Date: 2026-03-24HUNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Fault data in HVAC systems is extremely scarce, making it difficult to apply data-driven fault diagnosis methods. Existing data augmentation methods suffer from problems such as single or unstable synthetic samples or the introduction of pseudo-label noise.

Method used

A customized denoising diffusion probability model (CDDPM) is used to generate synthetic fault samples. Combined with self-supervised learning, a label-free dataset balanced with normal samples is generated through mask reconstruction pre-training and supervised fine-tuning. This captures the correlation between features, calibrates the domain offset, and builds a robust fault diagnosis model.

Benefits of technology

It enables efficient and robust fault diagnosis of HVAC systems in scenarios with extremely scarce samples, improving the accuracy and stability of fault detection and diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121412778B_ABST
    Figure CN121412778B_ABST
Patent Text Reader

Abstract

The application discloses a kind of warm air conditioning intelligent fault diagnosis methods suitable for sample extremely scarce scene, comprising: the historical operation data of warm air conditioning is exported to local computer, and constructs CDDPM for the operation data of warm air conditioning, and a small amount of real fault sample is trained;On this basis, CDDPM generates a large number of synthetic fault samples;The class label of synthetic fault sample is discarded, and is used in mask reconstruction type self-supervised training with equal amount of unmarked normal sample;After completing self-supervised training, encoder parameter is migrated to classifier, and a small amount of real fault sample is combined with equal amount of normal sample to carry out supervised fine-tuning, to calibrate the domain offset introduced by synthetic data, so that representation space is aligned with real operating condition;The classifier after fine-tuning is used as final fault diagnosis model, realizes robust fault detection and diagnosis.The application effectively solves the technical problem that intelligent diagnosis method is difficult to be applied to actual scene due to the scarcity of fault data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of HVAC system fault diagnosis, specifically to an intelligent fault diagnosis method for HVAC systems suitable for scenarios with extremely scarce samples. Background Technology

[0002] Buildings are a significant contributor to global energy demand, with HVAC systems accounting for the largest share (38%) of building energy consumption. Fault diagnosis is a highly efficient energy-saving strategy for HVAC systems; timely troubleshooting can reduce building energy consumption by approximately 15%-30%. For high-energy-consuming systems such as data centers, developing effective fault diagnosis tools is crucial, as it helps avoid unnecessary operational risks. Data-driven fault diagnosis methods have gained widespread attention in recent years due to their high accuracy and robust classification results. Despite significant progress in current research, applying these methods to practical HVAC systems remains challenging because they require sufficient and balanced datasets for reliable diagnosis.

[0003] However, collecting fault samples from actual HVAC systems is extremely difficult. These systems operate in normal conditions most of the time, resulting in a scarcity of various fault data. The severe imbalance between fault and normal data restricts the application of data-driven fault diagnosis methods. To address this challenge, data augmentation methods such as oversampling and generative adversarial networks (GANs) have been used to expand the number of fault samples. While oversampling methods can quickly synthesize fault data through interpolation strategies, the synthesized samples are homogeneous and lack diversity. GANs can generate realistic and diverse fault samples, but the model suffers from poor stability and is prone to mode collapse.

[0004] To achieve stable and efficient synthesis of scarce samples, data generation methods based on the Denoising Diffusion Probabilistic Model (DDPM) have been widely used in the field of fault diagnosis in recent years. The concept of DDPM is based on the physical diffusion process, achieving stable sample synthesis through forward diffusion and reverse denoising. However, traditional DDPM models are designed for image synthesis tasks and cannot be directly adapted to HVAC system data. Therefore, how to customize DDPM to achieve efficient synthesis of HVAC system fault samples is a key problem that urgently needs to be solved. Furthermore, the reliability of synthesized data remains uncertain, especially when the generation model relies on only a small number of fault samples for training. If supervised training is entirely based on such data, false label noise may be introduced, leading to incorrect decisions by the fault diagnosis model. Therefore, designing a reasonable strategy for utilizing synthesized samples is another key issue that needs to be addressed. Summary of the Invention

[0005] The purpose of this invention is to provide an intelligent fault diagnosis method for HVAC systems suitable for scenarios with extremely scarce samples, so as to solve the problems existing in HVAC fault diagnosis as mentioned in the background art.

[0006] To achieve the above objectives, this invention provides an intelligent fault diagnosis method for HVAC systems suitable for scenarios with extremely scarce samples, comprising the following steps:

[0007] Step 1: Export the historical operating data of the HVAC system from the data center to the local computer; wherein, the historical operating data of the HVAC system includes a large amount of normal sample data and a small amount of real fault sample data. , For the set of real numbers, For feature dimensions;

[0008] Step 2: Construct a customized noise reduction and diffusion probability model for HVAC operation data, utilizing the small amount of real fault sample data. A customized denoising diffusion probability model is trained to fully explore potential data patterns. The trained model generates a large number of synthetic fault sample data points from different random noise vectors, with the number of synthetic fault sample data points being the same as the number of normal sample data points. The forward diffusion process of the customized denoising diffusion probability model involves progressively adding Gaussian noise to the small number of real fault sample data points. Fault samples gradually transform into approximately pure noise. The inverse denoising process of the customized denoising diffusion probability model utilizes learned Gaussian transitions to progressively reconstruct data from real fault sample data. Similar sample data;

[0009] Step 3: Remove the labels from the large amount of synthetic fault sample data and an equal amount of normal sample data. The unlabeled sample data after label removal together form an unlabeled dataset for mask reconstruction self-supervised learning. Input the unlabeled dataset into a pre-trained model for mask reconstruction pre-training. The encoder in the pre-trained model learns useful representations from the large amount of unlabeled data. After the mask reconstruction pre-training is completed, the encoder parameters are transferred to the classifier. Combine the small amount of real fault sample data and an equal amount of normal sample data to form a labeled dataset. Input the labeled dataset into the classifier to supervise and fine-tune the encoder parameters, thereby calibrating the domain offset introduced by the synthetic fault sample data.

[0010] Step 4: Use the fine-tuned classifier as the final fault diagnosis model, and use the fault diagnosis model to detect and diagnose faults in the real-time operation data of HVAC systems, thereby obtaining robust fault diagnosis results.

[0011] Compared with the prior art, the present invention has the following beneficial effects:

[0012] This invention presents an intelligent fault diagnosis method for HVAC systems applicable to scenarios with extremely scarce samples. First, historical HVAC operating data is exported from the data center to a local computer, and a customized denoising diffusion probability model (CDDPM) is constructed for the HVAC operating data. This model is trained on a limited number of fault samples to fully explore potential data patterns. Based on this, CDDPM generates a large-scale synthetic fault sample, balancing its quantity with normal samples. Given that the synthetic samples, while close to the true distribution, still exhibit domain shift, their class labels are discarded and used together with an equal number of unlabeled normal samples for mask-reconstruction-based self-supervised learning. The self-supervised model employs a lightweight multilayer perceptron structure for rapid training and fully captures high-order interactions and structural associations between features under label-free constraints. After self-supervised training, the encoder parameters are transferred to the downstream classifier, where supervised fine-tuning is performed using a small number of real fault samples and an equal number of normal samples. This calibrates the domain shift introduced by the synthetic data, aligning the representation space with real operating conditions. The fine-tuned classifier serves as the final fault diagnosis model, achieving robust fault detection and diagnosis. This invention effectively solves the technical problem that the scarcity of fault data makes it difficult to apply intelligent diagnostic methods to real-world scenarios.

[0013] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description

[0014] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:

[0015] Figure 1 This is a flowchart illustrating an intelligent fault diagnosis method for HVAC systems applicable to scenarios with extremely scarce samples, according to the present invention.

[0016] Figure 2 This is a structural diagram of the noise prediction network in this invention;

[0017] Figure 3 This is a structural diagram of the fault diagnosis model based on reconstructive self-supervised learning in this invention. Detailed Implementation

[0018] The present invention will now be described in detail with reference to the embodiments shown in the accompanying drawings. However, it should be noted that these embodiments are not intended to limit the present invention. Equivalent transformations or substitutions in function, method, or structure made by those skilled in the art based on these embodiments are all within the scope of protection of the present invention.

[0019] Please see Figure 1 This embodiment provides an intelligent fault diagnosis method for HVAC systems suitable for scenarios with extremely scarce samples. To overcome the challenge of limited HVAC fault samples, this invention proposes a Customized Denoising Diffusion Probabilistic Model (CDDPM) to generate more robust fault data. Unlike the U-Net backbone structure in traditional DDPM, which is geared towards image tasks, this invention employs a lightweight Multilayer Perceptron (MLP) to efficiently capture multidimensional feature information from tabular data of HVAC systems. Furthermore, introducing conditional information during training not only generates multi-class fault data but also improves the separability between different fault types. Based on this, the generation process is redefined and reconstructed according to the forward diffusion and backward denoising forms of the diffusion model. The method includes the following steps:

[0020] Step 1: Export the historical operating data of the HVAC system from the data center to the local computer; the historical operating data of the HVAC system includes a large amount of normal sample data and a small amount of real fault sample data. , For the set of real numbers, For feature dimensions.

[0021] Step 2: Utilize a small amount of real fault sample data A customized denoising diffusion probability model is trained to fully explore potential data patterns. The trained model generates a large number of synthetic fault sample data points from different random noise vectors, with the number of synthetic fault sample data points being the same as the number of normal sample data points.

[0022] (1) Forward diffusion process

[0023] Operating data for HVAC systems is typically stored in tabular form: each row corresponds to a sampling time, recording readings from multiple sensors and the variables calculated from them; each column corresponds to a feature, containing the raw records from relevant sensors or values ​​calculated based on multiple sensors. The input to CDDPM is a finite number of fault samples. The diffusion process gradually adds Gaussian noise to reduce the amount of real fault sample data. Fault samples gradually transform into approximately pure noise. Distribution of the forward diffusion process Defined as a Markov chain Its expression is:

[0024] (1)

[0025] In form, at each time step , =1000 represents the total number of time steps, from arrive The transition is defined by the following conditional distribution:

[0026] (2)

[0027] In equation (2), Represents a Gaussian distribution; coefficients It is a time step The noise scaling factor is used to control the amount of noise added at each step, and its value increases gradually over time. This determines the degree to which the original data components are preserved in this step; the identity matrix This is used to ensure that noise is added evenly in all dimensions.

[0028] To simplify the representation, we define α t =1-β t and By utilizing reparameterization techniques, state variables... It can be represented in the following closed form:

[0029] (3)

[0030] in, It is standard Gaussian noise. This closed-form form allows for direct calculation at any time step. From real fault sample data Generate the corresponding noise state This eliminates the need for recursive sampling of intermediate steps. Therefore, given... The marginal distribution can be represented as:

[0031] (4)

[0032] Formula (4) describes The process that gradually approaches pure noise over time; when At that time, fault sample data It approximately follows a standard Gaussian distribution.

[0033] (2) Reverse noise reduction process

[0034] The reverse denoising process starts with Gaussian noise and gradually reconstructs the data from the real fault samples through a series of learned Gaussian transitions. Similar sample data, which are represented as Markov chains:

[0035] (5)

[0036] in, Indicates the initial Gaussian noise distribution; Indicates the current noise state Under the given conditions, the previous state predicted by the model The conditional probability distribution is given. To generate conditions for different fault types, the fault category label y is embedded in the denoising process. Subsequently, the conditional inverse process is defined as:

[0037] (6)

[0038] Transition distribution at each step Modeled as a Gaussian distribution, its mean and covariance are determined by the noise prediction network under condition (x t The prediction obtained under (t,y) is as follows:

[0039] (7)

[0040] in, and Let represent the mean and covariance of the predictions, respectively, and be determined by the parameters θ of the noisy prediction network. Following the DDPM framework, the covariance is typically simplified to a fixed diagonal matrix form. This reduces training complexity. Under this assumption, the main task of the neural network is transformed into calculating the mean. The prediction can be further derived as follows:

[0041] (8)

[0042] in, It is a noise prediction function based on a neural network, and its training objective can be expressed as:

[0043] (9)

[0044] During the sampling process, the predicted noise is used to reconstruct the denoised state of the previous time step:

[0045] (10)

[0046] in, , The trained, customized denoising diffusion probability model learns to progressively predict and remove noise, reconstructing samples that approximate the true distribution. By starting from different random noise vectors, a large number of synthetic fault samples can be generated.

[0047] (3) Noise prediction network

[0048] To adapt to the characteristics of HVAC system data, the denoising network adopts a multilayer perceptron (MLP) architecture. For example... Figure 2 As shown, the backbone network of this multilayer perceptron consists of seven stacked linear layers (i.e., fully connected layers), with layer dimensions of 512, 256, 256, 256, 256, 128, and 128 respectively. The first six layers are activated using the ReLU function. The input to this multilayer perceptron includes noisy states. , label y and time step t. Specifically:

[0049] 1) Noise status :set up The feature dimension is , ( (The set of real numbers) is projected onto a 128-dimensional feature embedding through a linear layer. middle:

[0050] (11)

[0051] Where, d s =128, It is the weight matrix of the above linear transformation. It is a bias term.

[0052] 2) Fault category label y: The label y∈{1,2,…,K} is mapped to a continuous representation through a learnable embedding layer, enabling the diffusion model to effectively fuse discrete category information. Formally, the embedding layer consists of a parameter matrix. This indicates that K represents the number of fault categories, and d s =128 represents the embedding dimension; the label y is represented by a dense vector through the label embedding layer. :

[0053] (12)

[0054] The label embedding is then obtained by performing a nonlinear transformation using the Sigmoid Linear Unit (SiLU) activation function. :

[0055] SiLU has a continuous first derivative, which provides a smoother gradient and helps improve the differentiability and training stability of conditional embeddings.

[0056] (13)

[0057] 3) Time step t: Time step t first passes through the sinusoidal position encoding function Generate a continuous vector representation containing multiple frequency components:

[0058] (14)

[0059] Each frequency component Decays exponentially:

[0060] (15)

[0061] in, The maximum periodicity constant (usually taken as 10) 4 Sinusoidal position coding provides temporal representations at different frequency levels, enabling the network to understand the diffusion process across multiple time scales. Based on this, temporal embedding... The nonlinear modeling capability is further enhanced by two layers of linear transformation and the SiLU activation function:

[0062] (16)

[0063] in, It is the weight matrix of the first-level linear transformation; It is the bias term of the first-level linear transformation; It is the weight matrix of the second-level linear transformation; It is the bias term of the second-level linear transformation.

[0064] Feature embedding Tag embedding and time embedding These three types of embeddings are combined together through element-wise addition:

[0065] (17)

[0066] Fusion representation This is then processed by the backbone network of a multilayer perceptron, whose output is a noise vector. That is, the model's estimation of the injected noise at time step t.

[0067] Step 3: Fault diagnosis based on reconstructive self-supervised learning

[0068] Synthetic data offers a promising approach to mitigating the severe imbalance between faulty and normal samples. However, due to the uncertainty of the reliability of synthetic data, relying entirely on it for supervised training may introduce false label noise and lead to incorrect model decisions. To address this technical problem, this invention proposes a novel fault diagnosis framework based on self-supervised learning (SSL) to utilize synthetic fault samples more cautiously and efficiently.

[0069] In the framework proposed in this invention, synthetic fault data is treated as unlabeled input during the mask reconstruction pre-training stage. By leveraging the richness and diversity of synthetic samples, the representation network can fully capture the intrinsic correlations between features and the structural information related to fault modes. Subsequently, the pre-trained representation is fine-tuned under supervision using a limited number of real fault data labels, thereby aligning the learned features with actual fault categories and achieving reliable fault diagnosis. Therefore, the fault diagnosis method based on SSL proposed in this invention includes two stages: mask reconstruction pre-training and supervised fine-tuning, such as... Figure 3 As shown.

[0070] (1) Mask reconstruction pre-training

[0071] Given that HVAC system data is presented in a high-dimensional tabular format and has complex correlations between features, this invention employs a mask-based reconstruction-based representation learning strategy to model and synthesize fault data during the pre-training stage. This mechanism forces the model to capture the underlying structural relationships between features, thereby learning robust and transferable representations. Specifically:

[0072] First, labels are removed from a large amount of synthetic faulty sample data and an equal amount of normal sample data. The unlabeled sample data after label removal together form an unlabeled dataset D for mask reconstruction-based self-supervised learning. U ;

[0073] (18)

[0074] in, To represent the number of unlabeled samples, Indicates the feature dimension; Let i be the i-th unlabeled sample. Dataset D U It consists of unlabeled normal samples and synthetic faulty samples, while maintaining a balance in the number of samples in each category.

[0075] Subsequently, the unlabeled dataset is input into the pre-trained model for mask reconstruction pre-training. The encoder in the pre-trained model learns useful representations from a large amount of unlabeled data. Figure 3As shown, the pre-trained model consists of an encoder and a decoder. The encoder is composed of five fully connected layers stacked together, with output dimensions of 512, 512, 512, 256, and 128, respectively. To alleviate the vanishing gradient problem in the negative interval, each fully connected layer uses LeakyReLU as the activation function. Dropout regularization layers are introduced in the first to fourth layers (i.e., the four fully connected layers with output dimensions of 512, 512, 512, and 256) to reduce the risk of overfitting and enhance the robustness of the learned feature representation. The dropout ratio (used to control how many neurons are randomly "dropped" during training) is set to 0.1. The fifth layer serves as the output layer for the latent representation. The decoder structure is roughly symmetrical to the encoder, consisting of five fully connected layers stacked together, with output dimensions of 256, 512, 512, 512, and 128, respectively. The first to fourth fully connected layers (fully connected layers with output dimensions of 256, 512, 512, and 512) use LeakyReLU as the activation function, while the fifth fully connected layer does not use an activation function. Dropout is not used in the decoder because it introduces additional randomness and hinders accurate recovery of masked features.

[0076] Unlabeled data from the unlabeled dataset is fed into the pre-trained model for iterative training. In each iteration, a random mask vector is generated. Its elements are independently sampled from the Bernoulli distribution:

[0077] (19)

[0078] In equation (19), The mask ratio; the mask is applied to the input vector. Thus, a damaged sample is obtained:

[0079] (20)

[0080] In equation (20), ⊙ represents the Hadamard product; R represents the substitution value, which is the zero vector in this invention. Let represent the random mask vector for the i-th sample. In this way, some information is intentionally masked, forcing the model to rely on the unmasked features to infer the missing parts, thereby capturing the conditional dependencies between features.

[0081] Input after mask It was then sent to the encoder. The encoder maps it to the latent space to obtain the latent representation:

[0082] (twenty one)

[0083] In equation (21), Representing a potential representation, The dimension representing the potential representation.

[0084] Subsequently, the decoder potential representation Map back to the original feature space to obtain the reconstructed output:

[0085] (twenty two).

[0086] To avoid the model merely replicating the input and instead driving it to infer missing information, the loss function during the pre-training phase is designed to calculate the mean squared error only at the masked locations:

[0087] (twenty three)

[0088] In equation (23), This represents the number of features masked in the i-th sample, and its denominator ensures that the loss function does not depend on the mask ratio. This is to prevent the denominator from being 0 in extreme cases where no position is masked. This represents the true value of the k-th dimension mask data for the i-th sample; This represents the predicted value of the k-th dimension mask data of the i-th sample after model reconstruction. In the entire unlabeled dataset D... U The pre-training objective can be formalized as follows:

[0089] (twenty four)

[0090] After the mask reconstruction pre-training is completed, the encoder parameters have a representation that can capture the statistical correlation of input features. The encoder parameters are then transferred to the classifier, thus laying a solid foundation for downstream tasks.

[0091] (2) Supervision and fine-tuning

[0092] A labeled dataset is formed by combining a small amount of real fault sample data with an equal amount of normal sample data. The labeled dataset is then input into the classifier to perform supervised fine-tuning of the encoder parameters, thereby calibrating the domain offset introduced by the synthetic fault sample data and aligning the representation space with the real operating conditions.

[0093] Let the labeled dataset be D. L :

[0094] (25)

[0095] in, and These are the features and labels of labeled samples, respectively; N LThe number of labeled samples is represented by ; C represents the number of categories in the dataset, C=K+1, meaning the total number of categories equals the number of fault categories plus the number of normal categories. Labeled dataset D L It consists of a finite number of real fault samples and normal samples, with the number of normal samples balanced with each fault category.

[0096] During the fine-tuning phase, the trained encoder With linear classification head The classifier is composed of a classifier head, which is a fully connected layer with an output dimension of C. Within the classifier, the encoder will... Transformation into latent representation Linear classification head Will Mapping to category space :

[0097] (26)

[0098] in, Here are the weight matrix and bias terms for the classification head. A complete classifier is constructed by combining the classification head with the encoder; subsequently, [the following is applied to...] Normalization is performed using the Softmax function to obtain the class probability distribution:

[0099] (27)

[0100] The loss function for supervised training is defined as the standard cross-entropy loss:

[0101] (28)

[0102] At this stage, encoder parameters With classifier parameters Jointly optimized, while the decoder They no longer participate. Through this process, the representational knowledge acquired by the encoder during the pre-training phase is further refined, thus enabling it to be optimally adapted to fault detection and diagnosis tasks in real-world scenarios.

[0103] (3) Setting self-supervised training parameters

[0104] In the pre-training phase, a sufficient number of samples are used, with a batch size of 256 and a learning rate of 0.0001 for each training iteration, enabling fast self-supervised training of the model. In the supervised fine-tuning phase, training is conducted only with real-labeled data, with a batch size of 32 and a learning rate of 0.0001. Due to the limited number of real-labeled fault samples, the fine-tuning phase also allows for very fast training. Therefore, the self-supervised learning model can achieve extremely fast training (10-20 seconds) and supports online training.

[0105] Step 4: Use the fine-tuned classifier as the final fault diagnosis model. Use the fault diagnosis model to detect and diagnose faults in the real-time operation data of HVAC systems, thereby obtaining robust fault diagnosis results.

[0106] Example 1

[0107] I. Data Selection

[0108] To verify the generalization ability of the method proposed in this invention, this embodiment uses two datasets describing the operating states of different HVAC systems; specifically:

[0109] The first dataset originates from the American Society of Heating, Refrigerating and Air-Conditioning Engineers (ASHRAE) RP-1043 project. ASHRAE RP-1043 is an authoritative and widely used dataset for validating fault diagnosis performance. This project used a centrifugal chiller unit with a cooling capacity of approximately 316 kW. Both its evaporator and condenser are shell-and-tube heat exchangers, and the refrigerant is R134a. The chiller unit was tested under normal operating conditions and seven typical faults, each with four degradation levels. Due to the high diagnostic complexity of the Level 1 fault severity data, this embodiment selects the Level 1 fault data shown in Table 1 for study. The original Level 1 fault data contains 64 features, with a sampling interval of 10 seconds. To eliminate redundancy, this embodiment selects 10 important features as shown in Table 2 for the experiment.

[0110] Table 1. Level 1 Fault Data for ASHRAE RP-1043 Project

[0111]

[0112] Table 2 Key Features of ASHRAE RP-1043 Level 1 Fault Dataset

[0113]

[0114] The second dataset comes from the Automated HVAC Fault Diagnosis Project at Lawrence Berkeley National Laboratory (LBNL). Published more recently, this dataset is more representative of modern HVAC systems. It records operational data for a single-zone constant air volume (SZCAV) air handling unit system. The system operates according to a fixed staffing schedule, from 6:00 AM to 6:00 PM daily. Data is recorded at 1-minute intervals and includes 13 operational variables. After removing variables with constant values, 11 valid variables were retained, as shown in Table 4. As shown in Table 3, this dataset contains 14 fault types involving three components: outdoor air dampers, heating coil valves, and cooling coil valves.

[0115] Table 3 Fault Types in the LBNL SZCAV Dataset

[0116]

[0117] Table 4. Characteristics of effective variables in the SZCAV dataset.

[0118]

[0119] II. Experiment Setup

[0120] To simulate a real-world scenario with a large number of normal samples and a very small number of fault samples, this embodiment constructs various fault sample scarcity scenarios. From two datasets, 10 to 50 real fault samples (i.e., 10, 20, 30, 40, and 50 samples) are randomly selected for each fault category as fault data that can be used to train the fault diagnosis model. Specifically, the RP-1043 dataset contains 1000 normal samples for training, and the SZCAV dataset contains 500 normal samples.

[0121] A small number of real fault samples (10-50) are used for training. A large number of synthetic fault samples are then generated using CDDPM to balance the number of samples between the normal class and each fault class. Specifically, 1000 samples are generated for each fault type in the RP-1043 dataset, and 500 samples are generated for each fault category in the SZCAV dataset. These synthetic fault data and normal data are used together in the pre-training phase of the self-supervised learning model, while real fault data and an equal amount of normal data are used in the fine-tuning phase.

[0122] During the testing phase, real samples (including faulty and normal samples) that had not appeared before were selected as the test set. For the RP-1043 dataset, 300 real samples were used for testing each category; for the SZCAV dataset, 150 real samples were used for testing each category.

[0123] III. Comparison Model

[0124] To verify the superiority of the proposed method in HVAC fault diagnosis, five representative generative models were selected as baselines for comparison: SMOTE, MCVAE, CWGAN-GP, CTABGAN+, and CVAE-WGAN-GP. These methods represent typical HVAC data augmentation techniques based on oversampling (SMOTE), variational autoencoder (MCVAE), generative adversarial network (CWGAN-GP, CTABGAN+), and hybrid model (CVAE-WGAN-GP), respectively. These generative models synthesize constrained fault data, balancing the fault data with normal data. The balanced dataset is then used to train the fault diagnosis model based on supervised learning. During the fault diagnosis phase, XGBoost was used as the classifier to test the performance of the generative models, with its default parameter settings.

[0125] In addition, to verify the effectiveness of the self-supervised learning-based fault diagnosis model proposed in this invention for the scientific use of synthetic data, a fault diagnosis method (CDDPM) that uses XGBoost for supervised learning after sample synthesis via CDDPM was also used for comparison.

[0126] To ensure the reproducibility of experimental results, the random seed for all model training was fixed at 42.

[0127] IV. Experimental Results

[0128] As shown in Tables 5 and 6, the fault diagnosis performance of the proposed method and other advanced models is compared on two datasets.

[0129] Table 5. Accuracy of different models on different amounts of real fault data in the RP-1043 dataset.

[0130]

[0131] Table 6. Accuracy of different models on different amounts of real fault data in the SZCAV dataset.

[0132]

[0133] As can be seen from Tables 5 and 6, the model proposed in this invention outperforms existing data augmentation-based methods in terms of fault diagnosis accuracy. Among various generative models, the CDDPM proposed in this invention performs best, but its classification accuracy is consistently lower than that of CDDPM-SSL, the method proposed in this invention that combines CDDPM with self-supervised learning.

[0134] Because it can fully learn the feature association characteristics from unlabeled synthetic fault data and make reasonable use of the synthetic data, the overall performance of the fault diagnosis method based on CDDPM and self-supervised learning (CDDPM-SSL) in this invention is better than that of the supervised fault diagnosis method (CDDPM) enhanced only by CDDPM.

[0135] When there are only 10 real fault samples per class, the fault diagnosis accuracy of the model proposed in this invention reaches 0.8221 on the RP-1043 dataset, while the fault diagnosis accuracy of XGBoost trained only on the original data is only 0.7229, representing an accuracy improvement of nearly 10%. The fault diagnosis accuracy of the model proposed in this invention reaches 0.8124 on the SZCAV dataset, while the fault diagnosis accuracy of XGBoost trained only on the original data is only 0.7227, representing an accuracy improvement of approximately 9%.

[0136] The above results fully verify that the HVAC system fault data generation model proposed in this invention has a better data synthesis capability than existing models; the proposed fault diagnosis method based on self-supervised learning can make reasonable use of synthesized data, fully explore feature correlation characteristics, and thus improve fault diagnosis performance.

[0137] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A smart fault diagnosis method for HVAC systems suitable for scenarios with extremely scarce samples, characterized in that, Includes the following steps: Step 1: Export the historical operating data of the HVAC system from the data center to the local computer; wherein, the historical operating data of the HVAC system includes a large amount of normal sample data and a small amount of real fault sample data. , For the set of real numbers, For feature dimensions; Step 2: Construct a customized noise reduction and diffusion probability model for HVAC operation data, utilizing the small amount of real fault sample data. A customized denoising diffusion probability model is trained to fully explore potential data patterns. The trained model generates a large number of synthetic fault sample data points from different random noise vectors, with the number of synthetic fault sample data points being the same as the number of normal sample data points. The forward diffusion process of the customized denoising diffusion probability model involves progressively adding Gaussian noise to the small number of real fault sample data points. Fault samples gradually transform into approximately pure noise. The inverse denoising process of the customized denoising diffusion probability model utilizes learned Gaussian transitions to progressively reconstruct data from real fault sample data. Similar sample data; Step 3: Remove the labels from the large amount of synthetic fault sample data and an equal amount of normal sample data. The unlabeled sample data after label removal together form an unlabeled dataset for mask reconstruction self-supervised learning. Input the unlabeled dataset into a pre-trained model for mask reconstruction pre-training. The encoder in the pre-trained model learns useful representations from the large amount of unlabeled data. After the mask reconstruction pre-training is completed, the encoder parameters are transferred to the classifier. Combine the small amount of real fault sample data and an equal amount of normal sample data to form a labeled dataset. Input the labeled dataset into the classifier to supervise and fine-tune the encoder parameters, thereby calibrating the domain offset introduced by the synthetic fault sample data. Step 4: Use the fine-tuned classifier as the final fault diagnosis model, and use the fault diagnosis model to perform fault detection and diagnosis on the real-time operation data of HVAC, so as to obtain robust fault diagnosis results.

2. The intelligent fault diagnosis method for HVAC systems according to claim 1, characterized in that, In step 2, the distribution of the forward diffusion process Defined as a Markov chain Its expression is: (1) In equation (1), For time steps, satisfy , This represents the total number of time steps. =1000; from Transferred to The conditional distribution is: (2) In equation (2), Represents a Gaussian distribution; coefficients It is a time step The noise scaling factor; It is the identity matrix; To simplify the representation, we define α t =1-β t and ; Using reparameterization techniques, noise state It can be represented in the following closed form: (3) In equation (3), It is standard Gaussian noise; this closed form makes it possible to achieve the desired noise at any time step. In this context, data can be directly obtained from real fault sample data. Generate the corresponding noise state This eliminates the need for recursive sampling of intermediate steps; thus, real fault sample data... The marginal distribution can be represented as: (4) Formula (4) describes the noise state. The process that gradually approaches pure noise over time; when At that time, fault sample data It approximately follows a standard Gaussian distribution.

3. The intelligent fault diagnosis method for HVAC systems according to claim 2, characterized in that, In step 2, the reverse denoising process is represented as a Markov chain. : (5) In equation (5), Indicates the initial Gaussian noise distribution; Indicates the current noise state Under the given conditions, the previous state predicted by the model The conditional probability distribution; to achieve condition generation for different fault types, the fault category label y is embedded in the denoising process; subsequently, the conditional inverse process is defined as: (6) Transition distribution at each step Modeled as a Gaussian distribution, its mean and covariance are determined by the noise prediction network under condition (x t The prediction obtained under (t,y) is as follows: (7) in, and These represent the mean and covariance of the predictions, respectively, and are determined by the noise prediction network parameter θ. Using a noise prediction network to predict the mean To make a prediction, its expression can be further derived as follows: (8) in, It is a noise prediction function; During the sampling process, the predicted noise is used to reconstruct the denoised state of the previous time step: (10) In formula (10) , .

4. The intelligent fault diagnosis method for HVAC systems according to claim 3, characterized in that, The noise prediction network employs a multilayer perceptron, whose backbone network consists of seven linear layers stacked with layer dimensions of 512, 256, 256, 256, 256, 128, and 128 respectively. The first six layers are activated using the ReLU function. The input features of the multilayer perceptron include the noise state. Fault category label y and time step t, where: 1) Noise status :set up The feature dimension is , It is projected onto a 128-dimensional feature embedding through a linear layer. middle: (11) In equation (11), d s =128, It is the weight matrix of the linear transformation. It is a bias term; 2) Fault category label y: The label y∈{1,2,…,K} is mapped to a continuous representation through a learnable embedding layer, thereby enabling the diffusion model to effectively fuse discrete category information; the embedding layer consists of a parameter matrix. This represents the number of fault categories, where K represents the number of fault categories, and d s =128 represents the embedding dimension; the label y is represented by a dense vector through the label embedding layer. : (12) Then, a nonlinear transformation was performed using the SiLU activation function to obtain the label embedding. : (13) 3) Time step t: Time step t first passes through the sinusoidal position encoding function Generate a continuous vector representation containing multiple frequency components: (14) In equation (14), each frequency component Decays exponentially: (15) In equation (15), The maximum period constant; time embedding The nonlinear modeling capability is further enhanced by two layers of linear transformation and the SiLU activation function: (16) In equation (16), It is the weight matrix of the first-level linear transformation; It is the bias term of the first-level linear transformation; It is the weight matrix of the second-level linear transformation; It is the bias term of the second-level linear transformation; Feature embedding Tag embedding and time embedding Combining elements together using element-wise addition: (17) The fusion will then be represented The input is processed by the backbone network of the multilayer perceptron, and the final output is a noise vector. .

5. The intelligent fault diagnosis method for HVAC systems according to claim 1, characterized in that, In step 3, the pre-trained model consists of an encoder and a decoder, wherein: the encoder is composed of five fully connected layers stacked together, and the output dimensions of the first to fifth fully connected layers are 512, 512, 512, 256 and 128 respectively; each fully connected layer uses LeakyReLU as the activation function, and Dropout regularization layers are introduced in the first to fourth layers, with the Dropout ratio set to 0.1; the fifth layer serves as the output layer of the latent representation. The decoder consists of five fully connected layers stacked together, with the output dimensions of the first to fifth fully connected layers being 256, 512, 512, 512, and 512, respectively. The first to fourth fully connected layers use LeakyReLU as the activation function, while the fifth fully connected layer does not use an activation function.

6. The intelligent fault diagnosis method for HVAC systems according to claim 5, characterized in that, Let D U For unlabeled datasets: (18) In equation (18), To represent the number of unlabeled samples, Indicates the feature dimension; This is the i-th unlabeled sample; In each iteration, a random mask vector is generated. Its elements are independently sampled from the Bernoulli distribution: (19) In equation (19), The mask ratio; the mask is applied to the input vector. Thus, a damaged sample is obtained: (20) In equation (20), ⊙ represents the Hadamard product, and R represents the substitution value; Represents the random mask vector for the i-th sample; Input after mask It was then sent to the encoder. The encoder maps it to the latent space to obtain the latent representation: (21) In equation (21), Representing a potential representation, The dimension representing the potential representation; Subsequently, the decoder potential representation Map back to the original feature space to obtain the reconstructed output: (22)。 7. The intelligent fault diagnosis method for HVAC systems according to claim 6, characterized in that, The loss function during the pre-training phase is designed to be the mean squared error calculated only at the masked locations: (23) In equation (23), This represents the number of features masked in the i-th sample, and its denominator ensures that the loss function does not depend on the mask ratio. This is to prevent the denominator from being 0 in extreme cases where no position is masked. This represents the true value of the k-th dimension mask data for the i-th sample; This represents the predicted value of the k-th dimension mask data of the i-th sample after model reconstruction.

8. The intelligent fault diagnosis method for HVAC systems according to claim 7, characterized in that, Throughout the unlabeled dataset D U The pre-training objective can be formalized as follows: (24) After pre-training, the encoder's parameters will have a representation that can capture the statistical correlation of input features.

9. The intelligent fault diagnosis method for HVAC systems according to claim 1, characterized in that, In step 3, let the labeled dataset be D. L : (25) In equation (25), and These are the features and labels of labeled samples, respectively. N L This represents the number of labeled samples; C represents the number of categories in the dataset, C=K+1, that is, the total number of categories equals the number of fault categories plus the number of normal categories.

10. The intelligent fault diagnosis method for HVAC systems according to claim 9, characterized in that, During the fine-tuning phase, the trained encoder With linear classification head The classifier is composed of a classifier head, which is a fully connected layer with an output dimension of C; in the classifier, the encoder will... Transformation into latent representation Linear classification head Will Mapping to category space : (26) in, The weight matrix and bias terms of the classification head are given; a complete classifier is constructed by combining the classification head with the encoder; subsequently, the... Normalization is performed using the Softmax function to obtain the class probability distribution: (27) The loss function for supervised training is defined as the standard cross-entropy loss: (28) At this stage, encoder parameters With classifier parameters It was jointly optimized.

Citation Information

Patent Citations

  • Time sequence equipment fault diagnosis method based on comparison self-supervised learning

    CN116070128A

  • Multi-modal dynamic fusion and incremental learning fault diagnosis method for deep vertical shaft equipment

    CN121188721A