A refrigeration unit fault detection method based on improved deep learning model
The data set is processed through the LOF-ADASYN algorithm and combined with the ResNet-CBAM model, the problems of network degradation and data imbalance in refrigeration unit fault diagnosis are solved, and high-accuracy fault identification and key feature extraction are achieved, which enhances the generalization of the model ability.
Patent Information
- Application Number
- CN202410931991.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-24
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-07-12
AI Technical Summary
The prior art has network degradation problems in refrigeration unit fault diagnosis, lack of weighting on key features, and low fault detection rate caused by data imbalance, and abnormal points in the operating data affect the diagnostic results.
The data set is processed by LOF-ADASYN algorithm, combined with the ResNet-CBAM model, overfitting is alleviated through the Dropout layer, the spatial attention module captures multi-scale features, and weights key features through the channel attention mechanism, eliminates exception points and expands the fault data set .
It improves the accuracy of fault diagnosis of refrigeration units, overcomes network degradation and data imbalance problems, enhances model generalization capabilities and extracts key features, and achieves high-accuracy fault identification.
Smart Images

Figure CN118468204B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of refrigeration unit fault diagnosis, and in particular to a refrigeration unit fault detection method based on an improved deep learning model. Background Art
[0002] Building energy consumption is a hot issue in today's social development. Refrigeration units are an important part of air conditioning energy consumption. Relevant studies have shown that the operating energy consumption of refrigeration units accounts for about 30-40% of building energy consumption. When the unit is in a faulty operating state, its equipment energy consumption will increase by about 15-30%. Timely troubleshooting of refrigeration unit failures is of great significance to improving energy utilization.
[0003] Machine learning has been successfully applied in the early fault diagnosis of refrigeration units. In recent years, methods based on deep learning have developed rapidly in the field of fault diagnosis of refrigeration units. On the one hand, deep learning achieves high fault diagnosis accuracy by learning the complex nonlinear characteristics of time series data. For example, Han used a deep neural network (DNN) to learn the nonlinear characteristics of fault data, and the model achieved efficient and stable performance, improving the accuracy of fault diagnosis. On the other hand, deep learning has the ability to extract deep features through the combination of multi-layer neural networks. Long short-term memory networks (LSTMs) have advantages in processing high-dimensional, strongly coupled, and highly time-varying data. He et al. successfully used a combination of multi-layer LSTMs in the field of refrigeration unit fault diagnosis to deeply extract fault data features.
[0004] However, in the actual training of deep learning models, as the number of network layers increases, gradient vanishing and network degradation problems are prone to occur, leading to difficulties in network training, performance degradation and other negative effects. To address the above problems, Glorot X et al. proposed the Xavier initialization parameter improvement strategy, which improved the performance and convergence speed of the network in deep structures; later, Ioffe S et al. proposed the batch normalization technology (Batch Normalization, BN), which helps to suppress internal covariate shift and alleviate the network degradation problem.
[0005] The emergence of residual neural network (ResNet) has made great progress in solving the above problems. The ResNet model effectively solves the network degradation problem through residual connection. Compared with Xavier initialization parameters and BN technology, it focuses more on improving gradient flow, avoiding information loss in deep networks, and has the ability to deeply mine data features. For example, Liu Feitian et al. used ResNet_21 for centrifugal refrigeration unit fault diagnosis, which was better than CNN in refrigerant leakage fault. However, the ResNet_21 model has a deep number of layers, including 21 convolutional layers, which leads to poor training efficiency and overfitting problems, and there are still many misjudgments and missed judgments in the refrigerant overload fault state. The reason is that the model in this paper focuses on deepening the number of network layers and ignores the impact of key features in the fault on the fault diagnosis results.
[0006] In the field of fault diagnosis, fault diagnosis should pay attention to the importance of key features for fault identification. Deep learning without attention mechanism usually uses fixed weights to process the features of each element in the sequence. Studies have shown that the introduction of attention mechanism can strengthen the focus on key features, and this mechanism is in a stage of continuous development. The Convolutional Block Attention Module (CBAM) captures key features more comprehensively through channel attention and spatial attention mechanisms, improving the fault diagnosis performance of the model on refrigeration unit time series data.
[0007] Therefore, the present invention comprehensively considers the above problems and aims to use the shallower ResNet model as the research basis. Each residual block contains two convolutional layers. ResNet deeply mines data features and can alleviate the degradation problem that is prone to occur in deep neural network training. Combined with CBAM's perception of key features, the advantages of the two are combined. While having a higher fault recognition rate, it also reduces the complexity of the existing model and establishes a ResNet-CBAM refrigeration unit fault detection model.
[0008] However, in actual engineering situations, there are some abnormal points (outliers) in the operation data of the refrigeration unit. Their local distribution density is low, which causes misjudgment of the diagnosis results of the classifier. The present invention adopts the LOF (Local Outlier Factor) algorithm to detect and eliminate abnormal points in the data set to ensure the quality of the data set.
[0009] In actual engineering situations, refrigeration units usually operate in a healthy state, which leads to the relative scarcity of fault data. Data imbalance may cause the machine learning model to be biased towards the majority category during fault diagnosis, resulting in a low fault detection rate, reducing the generalization performance of the model and affecting the fault diagnosis results. There are many data enhancement methods to address the problem of imbalanced operating data of refrigeration units. ADASYN has more intuitive explanation and stability than GAN and VAE, and is more targeted and adaptable when dealing with imbalanced data compared to other oversampling methods such as SMOTE.
[0010] The LOF algorithm is used to remove abnormal points (outliers) in the data set, and then the data set is expanded using ADASYN. Finally, the ResNet-CBAM detection model is used for fault diagnosis. Summary of the invention
[0011] In order to eliminate some abnormal points (outliers) in the operating data of refrigeration units in actual projects and to cope with the problem of scarce fault data, the present invention adopts the LOF-ADASYN algorithm to process the data set. At the same time, in order to improve the accuracy of refrigeration unit fault diagnosis and solve the problem that the existing refrigeration unit fault diagnosis technology is prone to network degradation and the detection model generally lacks weighting of key features, the present invention proposes a refrigeration unit deep learning fault diagnosis method based on LOF-ADASYN combined with the ResNet-CBAM model to achieve accurate diagnosis of refrigeration unit faults.
[0012] In a first aspect, the present invention provides a refrigeration unit fault detection method based on an improved deep learning model, which comprises the following steps:
[0013] Step 1: Obtain the operating parameters of the refrigeration unit under normal operating conditions and under different fault types as a data set.
[0014] Step 2: Use the local outlier factor algorithm to detect and remove local outliers in the data set, and then use the adaptive synthetic sampling algorithm to expand the data set;
[0015] Step 3: Normalize and preprocess the data set.
[0016] Step 4: Build a fault detection model. The fault detection model includes a ResNet module and a CBAM module. The ResNet module includes three residual blocks connected in sequence; each residual block introduces a Dropout layer. The Dropout layer discards Randomly shut down some neurons in the 1DCNN layer that are connected to it. The input of the residual block is added to the output of the Dropout layer with the same mapping as the residual block output.
[0017] The output of the ResNet module is used as the input of the CBAM module; the CBAM module includes a channel attention module and a spatial attention module connected in sequence. In the spatial attention module, the channel attention weights output by the channel attention module are subjected to maximum pooling and average pooling on the channel of each feature point to obtain feature maps. , ; For feature map , Channel-based splicing is performed, and the obtained features are subjected to convolution operations of three different scales; the three convolution operation results are fused and activated. The convolution kernel sizes n1, n2, and n3 of the three different scale convolution operations meet the following constraints: , .
[0018] The output features of the CBAM module are input into the fully connected layer. The fault detection model is trained using the dataset obtained in step 2.
[0019] Step 5: Input the parameters of the tested refrigeration unit into the fault detection model to determine whether the tested refrigeration unit has a fault and the type of the fault.
[0020] Preferably, in the ResNet module, the input of the first residual block is the operation data of the refrigeration unit, and the output of the last residual block is the output of the ResNet module; the ResNet module outputs to the middle hidden layer; the hidden layer output features obtained by extracting relevant features from the ResNet module It passes through the channel attention module and the spatial attention module in sequence.
[0021] As a preference, the output feature Y of the Dropout layer d The expression is as follows:
[0022]
[0023] in, is the input of the Dropout layer, is the discard rate.
[0024] As a preference, the discard rate The value of is 0.2.
[0025] Preferably, the residual block includes a first 1DCNN layer, an activation function layer, a BN layer, a second 1DCNN layer, a Dropout layer and an identity mapping layer connected in sequence; the input of the first 1DCNN layer and the output of the Dropout layer are jointly input to the identity mapping layer for superposition.
[0026] Preferably, in the channel attention module, the hidden layer output features output by the ResNet module are subjected to global maximum pooling and global average pooling operations to obtain feature maps , ; Feature map , Both are input into the multi-layer perceptron to generate two features respectively Figure 1 and Features Figure 2 In a multi-layer perceptron, channel reduction is used to reduce the channel dimension of the feature map. The reduction ratio r of channel reduction is a factor of the number of operating parameters, and r>1. Figure 1 and Features Figure 2 After element splicing, a new feature map is obtained; the new feature map is activated using the Sigmoid function, and a new weight is assigned to each element in the new feature map; this weight is the channel attention weight .
[0027] Preferably, the feature vector obtained after weighting by the CBAM module is Input to the fully connected layer. The weight parameters in the fully connected layer combine the input features to generate high-dimensional global features. The weight parameters will be learned and updated through the back propagation algorithm during the training process. Input to the output layer of the fully connected layer. The output layer uses the Softmax function. The output layer contains n neurons. n is the number of refrigeration unit states; n neurons are used to judge n-1 fault states and normal states of the refrigeration unit.
[0028] As a preference, the specific process of step 2 is:
[0029] 1) Construct the reachable distance of any point b in the data set The expression is as follows:
[0030] (1)
[0031] Among them, point o is any neighboring point of point b; is the distance between the kth neighboring point and point o; Indicate point With point The Euclidean distance of .
[0032] 2) Calculate the local reachability density as follows:
[0033] (2)
[0034] in, For point With A collection of neighboring data points:
[0035] 3) Calculation point The local outlier factor :
[0036] (3)
[0037] 4) Local outlier factor After elimination, determine the number of samples G that need to be generated:
[0038] (4)
[0039] in, Represents the number of existing majority class samples; represents the number of existing minority class samples, .
[0040] 5) Calculate the value of each minority class sample The proportion of majority class samples among the nearest neighbors r i :
[0041] (5)
[0042] in, It is The minority class samples The number of samples belonging to the majority category among the neighbors;
[0043] 6) Calculate the standardized ratio as follows:
[0044] (6)
[0045] 7) Calculate the number of new samples g required to generate for each minority class sample i as follows:
[0046] (7)
[0047] 8) For each minority class sample ,generate New samples:
[0048] (8)
[0049] in, is the newly generated sample; In the minority class samples No. A minority class sample randomly selected from the nearest neighbors; is a random number.
[0050] Preferably, the operating parameters include one or more temperature parameters, one or more valve position parameters, one or more pressure parameters, one or more flow parameters, one or more power parameters, and one or more current parameters.
[0051] Preferably, the identified refrigeration unit is a water chiller; the fault types of the water chiller include one or more of excessive lubricating oil, condenser scaling, refrigerant leakage, excessive refrigerant, non-condensable gas, insufficient cooling water, and insufficient chilled water.
[0052] In a second aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the memory stores the computer program; the processor executes the aforementioned refrigeration unit fault detection method based on the improved deep learning model.
[0053] In a third aspect, the present invention provides a readable storage medium storing a computer program; when the computer program is executed by a processor, it is used to implement the aforementioned refrigeration unit fault detection method based on the improved deep learning model.
[0054] The present invention has the following advantages:
[0055] 1. The present invention introduces a Dropout layer in the ResNet module of the ResNet-CBAM model. The Dropout layer discards Randomly shut down some neurons in the 1DCNN layer connected to itself to reduce the risk of overfitting and enhance the generalization ability of the model; and the spatial attention module of the present invention introduces multi-scale convolution to capture different receptive field features in the feature map; based on this, the present invention alleviates the problem of network degradation and focuses on the extraction of key features, overcoming the problems of "prone to network degradation" and "lack of weighting of key features of fault data" in the existing deep learning model for refrigeration unit fault diagnosis
[0056] 2. The present invention uses the LOF algorithm to successfully remove abnormal points in the data set, ensuring the quality of the data set, and then uses ADASYN (adaptive synthetic sampling) to successfully increase the samples of fault data, achieve data enhancement, and solve the problem of data imbalance in actual engineering.
[0057] 3. The detection model of the present invention overcomes the characteristics that "EO, RO and RL are refrigeration unit system faults with strong coupling and are difficult to identify", and achieves high-accuracy identification of these three types of faults. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 is a refrigeration unit fault diagnosis flow chart of the present invention;
[0059] Figure 2 is a residual block structure diagram in the present invention;
[0060] Figure 3 It is the model structure diagram of CBAM in the present invention;
[0061] Figure 4 Schematic diagram of the LOF-ADASYN-ResNet-CBAM model structure used in the present invention;
[0062] Figure 5 This is the model parameter tuning diagram of ResNet-CBAM in the present invention;
[0063] Figure 6 The loss function curves of the training sample set and the validation sample set under the balanced data set of the ResNet-CBAM model in the present invention;
[0064] Figure 7 It is an iterative curve diagram of the accuracy of each detection model of the present invention at an oversampling rate of 200%;
[0065] Figure 8 This is a comparison chart of the diagnosis results of the model used in the present invention and multiple existing models on the test sample set at an oversampling rate of 200%. DETAILED DESCRIPTION
[0066] In order to more clearly illustrate the purpose, technical solution and advantages of the refrigeration unit of the present invention, the present invention will be described in more detail below in combination with specific embodiments and with reference to the accompanying drawings. The embodiments only represent some implementation methods of the present invention.
[0067] Example 1
[0068] like Figures 1 to 4 As shown, a refrigeration unit fault detection method based on an improved deep learning model is based on an end-to-end fault detection model. The fault detection model is based on the Python3.7.0 platform, and the fault detection model is constructed based on the Pytorch1.13.1 deep learning framework, and is trained on the hardware device of the NVIDIA GeForce RTX 3060 Ti GPU. In this embodiment, the refrigeration unit is specifically a chiller; in some other embodiments, the refrigeration unit may also adopt an air-cooled heat pump unit or other types of refrigeration units.
[0069] The refrigeration unit fault detection method comprises the following steps:
[0070] Step 1: Obtain the operating parameters of the chiller in normal operation and different fault types, and form a sample set with labels. In this embodiment, the ASHRAE RP-1043 data set is used, which is derived from the description of the chiller fault simulation experiment in the ASHRAE RP-1043 standard. The experiment involves a centrifugal chiller with a rated power of 90 tons (about 316kW) and R134a as the refrigerant. ASHRAE simulated the normal state and 7 fault states under 27 operating conditions by adjusting the three control variables of chilled water temperature, condenser water inlet temperature and condenser cooling load. Each fault state has been tested with four different degrees of fault levels. The simulation experiment runs for about 14 hours in each state, and the data sampling interval is 10 seconds. Here, Nor represents the normal state, EO, RL, and RO represent system faults, CF, NC, FWC, and FWE represent local faults, and the specific fault type names are shown in Table 1.
[0071] Table 1 ASHRAE RP-1043 SL1 failure types
[0072] Fault number Fault type abbreviation Normal value deviation 1 Excessive lubrication oil EO 10kg +14% 2 Condenser fouling CF 164 root canals -12% 3 Refrigerant leak RL 136kg -10% 4 Excessive refrigerant RO 136kg +10% 5 Non-condensable gas NC 0kg +0.045kg 6 Insufficient cooling water FWC 17kg / s -10% 7 Insufficient chilled water FWE 13.6kg / s +10%
[0073] In this embodiment, the ASHRAE-1043-RP data acquisition interval is 10 seconds, and a total of 64 parameters are recorded. Among them, 48 parameters are directly collected by sensors, including 29 temperature parameters, 7 valve position parameters, 5 pressure parameters, 2 flow parameters, 1 power parameter and 1 current parameter. The remaining 16 parameters are calculated in real time by VisSim software. Due to the large changes in some variables during the short time of starting and stopping of the chiller, the validity of these data is low during data acquisition. Therefore, when selecting a data set, steady-state data is used.
[0074] Two different embodiments are set up, corresponding to a balanced data set and an unbalanced data set respectively.
[0075] The embodiment under the balanced data set uses seven types of fault data (fault types see Table 1) with the mildest fault level (SL1) and normal data as the sample set, and selects 1200 items for each state to form a sample data set of 9600×64 dimensional matrix. , randomly divided into training set, validation set and test set in a ratio of 6:2:2;
[0076] In the embodiment under the unbalanced data set, 1200 normal data are used, 300 fault data of each type are selected, and the experiment is carried out under the unbalanced ratio of 4:1. The data set division method is consistent with the embodiment under the balanced data set;
[0077] Step 2: Use the LOF (Local Outlier Factor) algorithm to detect and remove local outliers in the data set, and then use ADASYN (Adaptive Synthetic Sampling) to expand the data set;
[0078] In the embodiment of using LOF-ADASYN to expand the fault data set, under the balanced data set, the training set and the validation set have 1200 data in each state. For this purpose, 1200 data are taken in the normal state, and the LOF algorithm is first used to remove the abnormal points in the fault data set for each of the remaining fault states, and then the ADASYN method is used to collect different amounts of data according to different oversampling rates (when the oversampling rate is 100%, the original data for each fault is 600; and when the oversampling rate is 200%, the original data for each fault is 400). Finally, data balance is achieved, and the training set and the validation set have a total of about 9600 data, and the ratio of the training set and the validation set is divided into 5:1. The test set also uses 3000 ASHRAE RP-1043 original data, that is, 375 of each type, to verify the generalization ability of the deep learning model.
[0079] The “oversampling ratio” refers to the ratio of the number of synthetic samples generated by oversampling techniques relative to the number of original minority class samples when dealing with data imbalance problems.
[0080] The steps of LOF-ADASYN to expand the fault data set are as follows:
[0081] 1) Calculate the local density of each point:
[0082] calculate Point and The distance between neighbors is denoted by ,remember express Point and Euclidean distance of points:
[0083] (1)
[0084] 2) Calculate local reachability density ,remember for Point and A collection of neighboring data points:
[0085] (2)
[0086] 3) Calculation Local outlier factor of a point :
[0087] (3)
[0088] 4) After removing the local outlier factors determined in the above steps, determine the number of samples to be generated:
[0089] (4)
[0090] in represents the number of existing majority class samples, and represents the number of existing minority class samples, .when When , the majority class and the synthesized minority class samples are finally equal, is the total number of samples that need to be generated in the end;
[0091] 5) Calculate each minority class sample The proportion of majority class samples among the nearest neighbors:
[0092] (5)
[0093] Calculate ratio ,molecular It is The minority class samples The number of samples belonging to the majority category among the neighbors;
[0094] 6) Standardization :
[0095] (6)
[0096] 7) Calculate the number of new samples needed to generate for each minority class sample:
[0097] (7)
[0098] 8) For each minority class sample ,generate New samples:
[0099] (8)
[0100] In the above formula, is the newly generated sample; is No. A minority class sample randomly selected from the nearest neighbors, is a random number.
[0101] Step 3: Sample data set Normalization preprocessing is performed, and Min-Max normalization technology is used to ensure that the result value is mapped between [0-1], as follows:
[0102] Divide the sample set processed in step 2 into training sample sets in proportion , test sample set and validation samples ; and for the sample data set Normalization preprocessing is performed, and Min-Max normalization technology is used to ensure that the output value is mapped between [0-1]. The formula of this technology is as follows:
[0103] (9)
[0104] in, , These are the data before and after normalization, respectively; , are the maximum and minimum values in the data respectively.
[0105] Step 4: Build and train the ResNet-CBAM model.
[0106] The parameter selection in the detection model has an important impact on the detection performance of the model. Therefore, this embodiment performs parameter tuning on the ResNet-CBAM model to achieve the best performance of the model. However, the setting of hyperparameters is random and largely depends on experimental experience.
[0107] Since the input dimension of the chiller fault data is 64, the channel reduction ratio in the multi-layer perceptron (MLP) in CBAM is generally a factor of the input dimension of the chiller fault data. After trying various reduction ratios (e.g., 8, 16, and 32), it was determined through experiments Can provide the best diagnostic performance.
[0108] The function of the two fully connected layers in the multi-layer perceptron (MLP) in CBAM is to compress and expand features, and to calculate the channel attention weights in conjunction with nonlinear activation functions, thereby enhancing the model's ability to focus on key features. MLP includes two fully connected layers in the channel attention module. The first fully connected layer reduces the number of channels to 4 by reducing the ratio, and performs feature screening in a low-dimensional space. The dimension reduction process reduces the number of parameters and computational complexity, and retains the key feature information in the input MLP by reducing the dimension and amount of information; the second fully connected layer restores the compressed channel number 4 to 64 dimensions, maps the low-dimensional features back to the high-dimensional space, and reconstructs a richer feature representation, that is, strengthens the features; the weighting of key features is achieved through the activation function (Sigmoid) in the second fully connected layer. In summary, the expansion process strengthens and weights the key features screened out by the above compression process.
[0109] The initial hyperparameters of the detection model used are shown in Table 2 below. This example compares the impact of key hyperparameters on the model diagnostic performance through experiments. Each experiment adjusts one hyperparameter while keeping other hyperparameters unchanged. Each experiment is repeated 5 times and the average value of the diagnostic index is recorded. The experimental results are shown in the attached Figure 5 As shown in the figure. Finally, the number of residual blocks of the ResNet-CBAM model is determined to be 3, the number of convolutional layers in each residual block is 2, and the total number of convolutional layers is 6, which is recorded as ResNet_6. ResNet_6 has 15 fewer convolutional layers than ResNet_21. The convolution kernel size of ResNet_6 is 3, the learning rate is 0.001, and the fault diagnosis effect is the best. The other hyperparameters are consistent with Table 2.
[0110] Table 2 Initial hyperparameters of ResNet-CBAM network structure
[0111] Model parameters Hyperparameter settings Batch_size 128 Epoch 80 Learning Rate 0.001 ResNet Module Number of residual blocks: 5 Convolution kernel size: 7 Number of convolution kernels: 64 dropout: 0.2 Activation function: Relu CBAM module Channel Attention Module Input dimension: 64 (same as ResNet output dimension) Channel reduction ratio: 16 Spatial Attention Module Multi-scale convolution kernel size: 3, 5, 7 FC (Linear Layer) Input dimension: 64 (same as CBAM output dimension) Output dimension: 8 (same as the number of classification categories)
[0112] The ResNet-CBAM model includes the ResNet module and the CBAM module.
[0113] The ResNet module includes three residual blocks connected in sequence; each residual block includes the first 1DCNN (one-dimensional convolutional neural network) layer, activation function layer, BN (batch normalization) layer, second 1DCNN layer, Dropout (random loss) layer, and identity mapping layer connected in sequence, and each layer extracts relevant features; the input of the first 1DCNN layer and the output of the Dropout (random loss) layer are jointly input to the identity mapping layer for superposition.
[0114] Based on the above structure, the internal structure of the residual block contains two main branches, one branch performs the identity mapping , which is the input feature of the first residual block, and the other branch is the residual information learned by each neural network layer , the two are added to form the output of the residual block ;
[0115] The formula for constructing the residual block is:
[0116] (10)
[0117] The CBAM module consists of a channel attention module and a spatial attention module connected in sequence. The spatial attention module introduces multi-scale convolution to capture different receptive field features in the feature map.
[0118] The working process of the ResNet-CBAM model is as follows:
[0119] Step 4-1. During the working process of the ResNet-CBAM model, N sequence data of one time step are The sample is input into the ResNet module.
[0120] The first 1DCNN layer of the first residual block receives the chiller operation sequence data, and then each layer extracts features in turn. The output features of the Dropout layer :
[0121] (11)
[0122] is the input of Dropout, is the discard rate, is the scaling factor to ensure that the expected value of the retained neuron is the original expected value times, keeping the expected value of the Dropout layer output unchanged;
[0123] Input Features Output features of the Dropout layer The identity map is added and then input into the next residual block;
[0124] The input of the first residual block is the chiller operation data, and the output of the last residual block is the output of the ResNet module; the ResNet module outputs to the middle hidden layer;
[0125] The weight layer in ResNet is a 1DCNN layer. During training, the weight layer in the ResNet module is Perform one-dimensional convolution and BN operations. BN helps to alleviate internal covariate shift. The Dropout layer is The probability of randomly shutting down some neurons in the second 1DCNN layer is 0.001, which can reduce the risk of overfitting and enhance the generalization ability of the model.
[0126] The formula for one-dimensional convolution is:
[0127] (12)
[0128] In the formula Indicates The number of convolution kernels in the layer, Indicates Layer feature maps, represents the corresponding convolution kernel weight matrix, represents the bias term, Represents a nonlinear activation function. The Relu activation function is used in the ResNet module of the present invention;
[0129] The main function of the ReLU (Rectified Linear Unit) activation function is to introduce nonlinear mapping, so that the network can learn more complex feature representations. The formula of the ReLU activation function is as follows: Represents input features;
[0130] (13)
[0131] The formula for BN is as follows:
[0132] (14)
[0133] In the formula, is the normalized eigenvalue, indicating the input feature The result after batch normalization. and For input features The mean and standard deviation over a batch. A small positive constant to ensure the stability of division, used to prevent the variance from being zero and avoid the division by zero problem;
[0134] The relevant features are extracted through the ResNet module to obtain the hidden layer output features ;
[0135] Step 4-2. Hidden layer output In the CBAM module, the channel attention module (ChannelAttention Module) first performs global maximum pooling (Maxpool) and global average pooling (Avgpool) operations to obtain and , which is then processed by a multi-layer perceptron (MLP) and Generate the features in the instruction manual channel attention module figure respectively Figure 1 and Features Figure 2 , maximum pooling is used to capture the most significant features in each channel, while average pooling is used to capture the average features of each channel. In the hidden layer of MLP, channel reduction ( ,in To reduce the channel dimension (for downscaling). Features Figure 1 and Features Figure 2 After element concatenation (Concat) and Sigmoid function activation, a new weight is assigned to each element in the new feature map, namely the channel attention weight The specific process of weight calculation is as shown in Formula 5:
[0136] (15)
[0137] in and is the weight of the multi-layer perceptron, and the input of the two is shared. and Represent the maximum pooling and average pooling operations respectively. Represents the Sigmoid function, which is shown in Formula 6:
[0138] (16)
[0139] Then, the spatial attention module receives the channel attention weight feature as input and performs maximum pooling and average pooling on the channel of each feature point to obtain and , the two feature maps are concatenated based on channels, and multi-scale convolution operations are performed. Multi-scale convolution can simultaneously consider receptive fields of different sizes, capture information of different scales in space, and then perform feature fusion to obtain a richer and more comprehensive feature representation and improve the performance of the model. Afterwards, the spatial attention weight is obtained through Sigmoid function activation. , and get the weighted feature vector of the CBAM module The specific process of weight calculation is as shown in Formula 7:
[0140] (17)
[0141] In the formula, , , , is the convolution kernel size of the three convolutional layers in the spatial attention module, satisfying the constraint , .
[0142] Step 4-3. The feature vector obtained by weighting the CBAM module Input to the fully connected layer. The weight parameters in the fully connected layer combine the features extracted by the ResNet-CBAM model to generate high-dimensional global features. The weight parameters will be learned and updated through the back propagation algorithm during the training process to minimize the loss function and optimize the performance of the network. Input to the output layer. This process ensures that the output and input dimensions of the fully connected layer and the output layer are consistent. The output layer uses the Softmax function to convert the original scores output by the model into probability distributions for classification decisions.
[0143] (18)
[0144] in, Represents the first elements, is the base of natural logarithms, is a vector The Softmax function takes each element of this vector Convert to a real number between (0,1) so that the sum of all elements is 1;
[0145] The output dimension of the output layer contains neurons, the purpose is to The diagnosis of the state is The optimization algorithm uses Yogi, which is an optimization algorithm based on second-order gradient estimation. It combines the characteristics of Adam and RMSProp and adjusts the learning rate according to the historical gradient information of the parameters. The loss function uses Categorical Cross-Entropy to update the model parameters. and , in order to increase the probability of correct classification. After training the ResNet-CBAM model, save the model's optimal weights;
[0146] Step 5: In the training sample set and validation sample set After the ResNet-CBAM model is trained, the optimal weights of the model are saved. At the same time, a loss function curve is generated. The loss function curve refers to a chart used to measure the difference between the model's predicted value and the observed value during the iterative training of the model. As the training progresses, the loss curve decreases, indicating that the model's fit to the training data is gradually improving. The loss function curve of the embodiment under the balanced data set is as follows Figure 6 As shown. The optimization algorithm uses Yogi, which is an optimization algorithm based on second-order gradient estimation. It combines the characteristics of Adam and RMSProp and adjusts the learning rate according to the historical gradient information of the parameters. The loss function uses Categorical Cross-Entropy, which aims to update the model parameters in order to increase the probability of correct classification.
[0147] Step 6: Test sample set Load the model weights obtained in step 4 and obtain the diagnosis results of the final output layer as the basis for fault detection;
[0148] Step 7: In an embodiment of expanding the fault data set using LOF-ADASYN, different oversampling rates are used to collect different amounts of fault data during the fault data expansion process. After data balance is achieved, the training process repeats the above steps.
[0149] The classic deep learning model 1DCNN, GRU, ResNet model and the combined model are selected for fault diagnosis performance comparison (SA is the self-attention mechanism, MHSA is the multi-head self-attention mechanism). The fault diagnosis results of the three embodiments are shown in Tables 3 to 7 below.
[0150] Table 3 Balanced Example Chiller Fault Diagnosis Model Results
[0151]
[0152] Table 4 Overall evaluation index of the results of the chiller fault diagnosis model of the balanced embodiment
[0153] Detection Model Acc / % P / % R / % F1 / % 1DCNN 91.0 91.6 89.7 90.2 GRU 92.7 92.8 93.0 92.7 ResNet_6 96.4 96.5 96.9 96.7 ResNet_6-CBAM 97.3 97.3 97.4 97.3
[0154] It can be concluded from Table 3 and Table 4 that, under the balanced data set, the recognition accuracy of 1DCNN and GRU models for the three types of system faults, EO, RO, and RL, is significantly lower than that of the ResNet_6 model. ResNet_6, by deeply mining the information in the data and integrating the CBAM module, pays more attention to the extraction of key features. For the four types of local faults, the ResNet_6-CBAM model is slightly better than the other three detection models.
[0155] Table 5 Results of the chiller fault diagnosis model for the unbalanced embodiment
[0156]
[0157] Table 6 Overall evaluation index of the chiller fault diagnosis model results of the unbalanced embodiment
[0158] Detection Model Acc / % P / % R / % F1 / % 1DCNN 89.1 89.0 87.9 88.4 GRU 87.8 87.7 90.4 88.6 ResNet_6 90.9 91.0 89.6 89.9 ResNet_6-CBAM 96.0 96.7 92.7 94.0
[0159] It can be concluded from Table 5 and Table 6 that, under the unbalanced data set, the diagnostic accuracy of RO and RL faults has a significant downward trend compared with the previous embodiment. Especially for RL faults, the diagnostic rate of each model has dropped significantly. For the four types of local faults, the fault recognition degree of the four models has dropped slightly.
[0160] As shown in Table 6, for the ResNet_6 model, whose overall evaluation indicators dropped most significantly, the accuracy dropped by 5.9%, the precision dropped by 5.5%, the recall dropped by 7.3%, and the F1 dropped by 6.8%.
[0161] Table 7 Overall evaluation index of chiller fault model under different oversampling rates of LOF-ADASYN
[0162]
[0163] SA in Table 7 above represents the self-attention mechanism, and MHSA represents the multi-head self-attention mechanism. As can be seen from Table 7, the seven models were experimented at four different oversampling rates. It can be seen that at each oversampling rate, the ResNet_6-CBAM model proposed in this embodiment outperforms other control models in the three overall evaluation indicators. At an oversampling rate of 200%, compared with the GRU with the lowest indicator, its diagnostic accuracy is increased by 6.1%, recall rate is increased by 5.8%, and F1 is increased by 6.0%. Figure 7 The accuracy iteration curves of each detection model under the oversampling rate of 200% show that the accuracy curve of the ResNet_6-CBAM model is the most stable compared to the other three models. Figure 8 The following is a diagram of the diagnostic results of each detection model on the test set with an oversampling rate of 200%. It can be concluded that the ResNet_6-CBAM model has the highest robustness and the strongest generalization.
[0164] Table 8 Comparison of chiller fault diagnosis results under different conditions of ResNet_6-CBAM model
[0165] Detection Model Acc / % P / % R / % F1 / % Balancing the Dataset 97.3 97.3 97.4 97.3 Imbalanced Dataset 96.0 96.7 92.7 94.0 Only ADASYN is used at an oversampling rate of 200% 98.0 98.0 98.0 98.0 LOF-ADASYN with 200% oversampling rate 98.5 98.5 98.5 98.5
[0166] Embodiment 2:
[0167] A refrigeration unit fault detection method based on an improved deep learning model. The difference between this embodiment and embodiment 1 is that the refrigeration unit being tested is specifically an air-cooled heat pump unit.
[0168] This embodiment relies on the existing air-cooled heat pump unit experimental equipment in the laboratory to design and build a fault simulation test bench. Based on the enthalpy difference method test bench, the object to be diagnosed is introduced, and various sensors are arranged on the air-cooled heat pump unit to be tested, and the original system is appropriately modified, and a plan on how to simulate the fault is formulated to simulate the fault state of the air-cooled heat pump unit.
[0169] The tested machine is a split-type heat pump floor-standing air conditioner, model: KFR-72LW, the rated cooling capacity of the unit is 7.2kW, the heating capacity is 8 kW, the evaporator and condenser both use air fin tube heat exchangers, the throttling device uses a thermal expansion valve, and the compressor inlet is equipped with a thermal expansion valve temperature sensor.
[0170] The C# host computer software was designed on the experimental bench of a small air-cooled heat pump unit in the laboratory. By arranging 18 temperature sensors and 4 pressure sensors and collecting data every 10 seconds, 22 channels of sensor data were successfully acquired.
[0171] Table 9 Fault types of air-cooled heat pump units
[0172] English Fault Abbreviation Chinese name Condenser Surface Area Fouling CSAF Condenser surface area blocked Refrigerant Undercharge RU Too little refrigerant Four-way Valve Leakage FWf Four-way valve leakage Normal Nor normal
[0173] Example under balanced data set 400 items are selected for each state to form a sample data set of 1600×22 dimensional matrix , randomly divided into training set, validation set and test set in a ratio of 6:2:2;
[0174] In the embodiment under the unbalanced data set, 400 normal data are used, 200 fault data of each type are selected, and the experiment is carried out under the unbalanced ratio of 2:1. The data set division method is consistent with the embodiment under the balanced data set;
[0175] In the embodiment of using LOF-ADASYN to expand the fault data set, under the balanced data set, the training set and the validation set have 400 data in each state. For this purpose, 400 data are taken in the normal state, and the LOF algorithm is first used to remove the abnormal points in the fault data set for each of the remaining fault states, and then the ADASYN method is used to collect different amounts of data according to different oversampling rates (when the oversampling rate is 100%, the original data for each fault is 200; and when the oversampling rate is 200%, the original data for each fault is 133). Finally, data balance is achieved, and the training set and the validation set have a total of about 1,600 data, and the ratio of the training set to the validation set is 5:1. The test set also uses 500 original data of the air-cooled heat pump data set, that is, 125 of each type, to verify the generalization ability of the deep learning model.
[0176] In this embodiment, the ResNet_6-CBAM model has a different input dimension of the ResNet module and the channel reduction ratio of the multi-layer perceptron (MLP) in the CBAM. The input dimension of the ResNet module is 22, and the channel reduction ratio in the multi-layer perceptron (MLP) in the CBAM is the input dimension factor of the air-cooled heat pump unit fault data. After trying two reduction ratios of 2 and 11, it was determined through experiments. It can provide the best diagnostic performance. The other hyper parameters of the ResNet_6-CBAM model are consistent with the chiller fault diagnosis implementation example.
[0177] Table 10 Balanced Example Air-cooled Heat Pump Unit Fault Diagnosis Model Results
[0178]
[0179] Table 11 Overall evaluation index of the fault diagnosis model results of the air-cooled heat pump unit in the balanced embodiment
[0180] Detection Model Acc / % P / % R / % F1 / % 1DCNN 89.0 90.9 90.9 90.9 GRU 78.2 84.2 82.1 81.0 ResNet_6 89.8 91.7 91.6 91.6 ResNet_6-CBAM 98.2 98.2 98.2 98.2
[0181] Table 12 Results of the fault diagnosis model for the air-cooled heat pump unit in the unbalanced embodiment
[0182]
[0183] Table 13 Overall evaluation index of the fault diagnosis model results of the air-cooled heat pump unit in the unbalanced embodiment
[0184] Detection Model Acc / % P / % R / % F1 / % 1DCNN 87.6 92.8 89.7 89.3 GRU 71.6 78.7 73.4 71.7 ResNet_6 85.6 88.3 88.1 88.1 ResNet_6-CBAM 95.6 96.8 96.3 96.3
[0185] Table 14 Overall evaluation index of the fault model of air-cooled heat pump units under different oversampling rates of LOF-ADASYN
[0186]
[0187] Table 15 Comparison of fault diagnosis results of air-cooled heat pump units under different conditions of ResNet_6-CBAM model
[0188] Detection Model Acc / % P / % R / % F1 / % Balancing the Dataset 97.6 97.7 97.6 97.6 Imbalanced Dataset 88.0 87.9 99.3 93.3 Only ADASYN is used at an oversampling rate of 200% 97.4 97.6 97.4 97.4 LOF-ADASYN with 200% oversampling rate 98.7 98.8 98.7 98.7
[0189] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, ordinary technicians in the relevant field should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present disclosure (including claims) is limited to these examples. Under the thinking of the present invention, the parameters (such as the number of network layers, etc.), hyperparameters (such as batch size, learning rate, dropout, etc.), optimization algorithms, activation functions, etc. in the above embodiments or different embodiments can be modified according to actual conditions, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity.
[0190] The embodiments of the present invention are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, all are included within the scope of protection of the present invention.
Claims
1. A refrigeration unit fault detection method based on an improved deep learning model, Features: The following steps are involved: Step 1: Obtain operating parameters of the refrigeration unit under normal operating conditions and under different fault types as a data set; Step 2: Use the local outlier factor algorithm to detect and remove local outliers in the data set, and then use the adaptive synthetic sampling algorithm to expand the data set; Step 3: Normalize and preprocess the data set; Step 4: Build a fault detection model. The fault detection model includes a ResNet module and a CBAM module. The ResNet module includes three residual blocks connected in sequence. Each residual block introduces a Dropout layer. The Dropout layer uses a dropout rate Randomly shut down some neurons in the 1DCNN layer connected to it; the input of the residual block is added to the output of the Dropout layer with the same mapping as the residual block output; The output of the ResNet module is used as the input of the CBAM module; The CBAM module includes a channel attention module and a spatial attention module connected in sequence; In the spatial attention module, the channel attention weights output by the channel attention module are subjected to maximum pooling and average pooling on the channel of each feature point to obtain feature maps , ; For feature map , Channel-based splicing is performed, and the obtained features are subjected to convolution operations of three different scales; the three convolution operation results are fused and activated; the convolution kernel sizes n1, n2, and n3 of the three different scale convolution operations meet the following constraints: , ; The output features of the CBAM module are input into the fully connected layer; the fault detection model is trained using the data set obtained in step 2; Step 5: Input the parameters of the tested refrigeration unit into the fault detection model to determine whether the tested refrigeration unit has a fault and the type of the fault.
2. According to claim 1, a refrigeration unit fault detection method based on an improved deep learning model, Features: In the ResNet module, the input of the first residual block is the operation data of the refrigeration unit, and the output of the last residual block is the output of the ResNet module; the ResNet module outputs to the middle hidden layer; the hidden layer output features obtained by extracting relevant features from the ResNet module It passes through the channel attention module and the spatial attention module in sequence; Output feature Y of the Dropout layer in the residual block d The expression is as follows: ; in, is the input of the Dropout layer, is the discard rate.
3. According to claim 2, a refrigeration unit fault detection method based on an improved deep learning model, Features: Discard rate The value of is 0.
2.
4. According to claim 1, a refrigeration unit fault detection method based on an improved deep learning model, Features: The residual block includes a first 1DCNN layer, an activation function layer, a BN layer, a second 1DCNN layer, a Dropout layer and an identity mapping layer connected in sequence; the input of the first 1DCNN layer and the output of the Dropout layer are input to the identity mapping layer for superposition.
5. According to claim 1, a refrigeration unit fault detection method based on an improved deep learning model, Features: In the channel attention module, the hidden layer output features output by the ResNet module are subjected to global maximum pooling and global average pooling operations to obtain feature maps , ; Feature map , All are input into the multi-layer perceptron to generate two feature maps 1 and feature map 2 respectively; in the multi-layer perceptron, the channel dimension of the feature map is reduced by channel reduction; the reduction ratio r of channel reduction is a factor of the number of operating parameters, and r>1; feature map 1 and feature map 2 are concatenated to obtain a new feature map; the new feature map is activated by the Sigmoid function, and a new weight is assigned to each element in the new feature map; this weight is the channel attention weight .
6. According to claim 1, a refrigeration unit fault detection method based on an improved deep learning model, Features: The feature vector obtained after weighting by the CBAM module Input to the fully connected layer; the weight parameters in the fully connected layer combine the input features to generate high-dimensional global features ; The weight parameters will be learned and updated through the back propagation algorithm during the training process; the global features Input to the output layer of the fully connected layer; the output layer uses the Softmax function; the output layer contains n neurons; n is the number of refrigeration unit states; n neurons are used to judge n-1 fault states and normal states of the refrigeration unit respectively.
7. According to claim 1, a refrigeration unit fault detection method based on an improved deep learning model, Features: The specific process of step 2 is: 1) Construct the reachable distance of any point b in the data set The expression is as follows: (1) Among them, point o is any neighboring point of point b; is the distance between the kth neighboring point and point o; Indicate point With point The Euclidean distance of 2) Calculate local reachability density as follows: (2) in, For point With A collection of neighboring data points: 3) Calculation point The local outlier factor : (3) 4) Local outlier factor After elimination, determine the number of samples G that need to be generated: (4) in, Represents the number of existing majority class samples; represents the number of existing minority class samples, ; 5) Calculate the value of each minority class sample The proportion of majority class samples among the nearest neighbors r i : (5) in, It is The minority class samples The number of samples belonging to the majority category among the neighbors; 6) Calculate the standardized ratio as follows: (6) 7) Calculate the number of new samples g required to generate each minority class sample i as follows: (7) 8) For each minority class sample ,generate New samples: (8) in, is the newly generated sample; In the minority class samples No. A minority class sample randomly selected from the nearest neighbors; is a random number.
8. According to claim 5, a refrigeration unit fault detection method based on an improved deep learning model, Features: The identified refrigeration unit is a water chiller; the fault types of the water chiller include one or more of excessive lubricating oil, condenser scaling, refrigerant leakage, excessive refrigerant, non-condensable gas, insufficient cooling water, and insufficient chilled water; the operating parameters include one or more temperature parameters, one or more valve position parameters, one or more pressure parameters, one or more flow parameters, one or more power parameters, and one or more current parameters.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, Features: The memory stores a computer program; the processor executes the refrigeration unit fault detection method based on an improved deep learning model as described in any one of claims 1 to 8.
10. A readable storage medium storing a computer program; Features: When the computer program is executed by a processor, it is used to implement the refrigeration unit fault detection method based on the improved deep learning model as described in any one of claims 1 to 8.
Citation Information
Cited By
Fault detection method for refrigeration units based on improved deep learning model
US12442551B1
