Knowledge adaptive embedding-based hard-light magnetic water chilling unit few-sample diagnosis method

Through the knowledge adaptive embedding method, the labelless data is enhanced and pre-trained, and combined with a small amount of labeled data is fine-tuned, which solves the problem of labelless data utilization in the fault diagnosis of strong-optical magnetic chiller units, and achieves high-accuracy low-sample fault diagnosis and Model interpretability is improved.

CN119226709APending Publication Date: 2024-12-31ANHUI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411434812.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

High-optical magnetic chiller units are prone to failure in harsh environments, and existing diagnostic methods are difficult to effectively utilize unlabeled data, resulting in a degradation in diagnostic model performance and lack of support for small sample diagnosis.

Method used

Adopting knowledge adaptive embedding methods to enhance label-free data, adaptively empower multiple knowledge embedding methods through exponential weighted average strategy, pre-training convolutional neural networks, fine-tuning with a small amount of label data, and improving the diagnostic performance of the model and interpretability.

Benefits of technology

It realizes high accuracy and low sample fault diagnosis in strong-optical magnetic chiller units, improves the interpretability and diagnostic performance of the model, and can effectively utilize the fault knowledge in labelless data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226709A_ABST
    Figure CN119226709A_ABST
Patent Text Reader

Abstract

The invention provides a knowledge-adaptive-embedding-based few-sample diagnosis method for a high-light-magnetic water chilling unit, which can realize few-sample fault diagnosis of the high-light-magnetic water chilling unit. Firstly, a large amount of label-free data and a small amount of label data in the high-light magnetic water chilling unit are obtained and preprocessed, secondly, the label-free data are enhanced through multiple knowledge embedding methods closely related to fault symptoms, and a corresponding pseudo label is generated for each enhanced sample. And pre-training the convolutional neural network through the enhanced training set and cross entropy loss, and adaptively allocating weights to various knowledge embedding methods by using an exponential weighted average strategy, thereby obtaining better feature knowledge embedding. And then a small amount of label data is used to carry out fine tuning on the pre-trained convolutional neural network, so that the model is more suitable for subsequent few-sample fault diagnosis tasks. And finally, testing the fine-tuned model by using the divided few-sample diagnosis test set, and evaluating the few-sample diagnosis performance of the model by using an accuracy index.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of strong light magnetic chiller fault diagnosis, and specifically relates to a strong light magnetic chiller small sample diagnosis method (SSAD) based on knowledge adaptive embedding. Background Art

[0002] The "Strong Light and Magnetic Experimental Device" is the first emerging large-scale scientific device in China that integrates free electron laser, strong magnetic field, low temperature and other functions. The device can not only support cutting-edge research in materials, life sciences and other disciplines, but also has the ability to promote the cross-integration of automation theory and technology in emerging fields. As one of the most important auxiliary support systems in the "Strong Light and Magnetic Experimental Device", the strong light and magnetic chiller directly serves the free electron laser device.

[0003] Due to the harsh working environment of the strong light magnetic chiller and the long-term impact of flow changes, thermal expansion, and strong radiation, performance degradation or even failure is inevitable, which will cause the free electron laser device to operate in an overheated state, and even cause damage and explosion of the magnet under extreme conditions. The chiller usually includes two circulation systems: the chilled water system and the cooling water system. The water pump plays a key role in both systems to maintain the necessary pressure of each circuit in the chiller and ensure that the chilled water and cooling water can flow smoothly throughout the system. If the system pressure is insufficient, the water flow will decrease, thereby affecting the cooling efficiency. The normal operation of the water pump directly affects the overall performance of the chiller. If the water pump fails or the efficiency is reduced, it may cause insufficient cooling capacity of the chiller or even system shutdown. Therefore, the state monitoring and fault diagnosis of the vibration signal generated by the water pump during the operation of the strong light magnetic chiller have important theoretical support and far-reaching engineering practical significance for improving the safety margin of the unit and ensuring the efficient and stable operation of the "strong light magnetic test device".

[0004] However, since the strong optical magnetic chiller has completely different characteristics and working scenarios from ordinary civil / commercial cold storage systems, it brings the following challenges to the fault diagnosis of the unit: ① Due to the impact of strong electromagnetic, eddy current effects, large vibrations, etc., the sensor data is missing and the value density is low, that is, labeled fault data is difficult to obtain from some machines, and unlabeled operating data accounts for the majority. ② Existing methods are difficult to fully utilize the fault knowledge contained in a large amount of unlabeled data, resulting in a decrease in the performance of the diagnostic model. ③ Existing methods rarely quantitatively characterize the impact of different features on the performance of the few-sample diagnostic model during the training process, which is not conducive to improving the interpretability of the model.

[0005] In response to the above problems, this paper uses a variety of knowledge embedding methods to enhance unlabeled data, and then uses the enhanced data pre-training model to enable it to learn the inherent feature knowledge of the signal, fully mining the fault information contained in a large amount of unlabeled data. In the pre-training process, the exponential weighted average strategy is used to adaptively weight various knowledge embedding methods, quantitatively characterize the impact of different knowledge embedding methods on the performance of the model, and improve the diagnostic performance and interpretability of the model through multiple rounds of iterations. Then, a small number of labeled samples are used to fine-tune the pre-trained network, so that the model can achieve higher accuracy in the task of few-sample fault diagnosis of strong optical magnetic chillers. Summary of the invention

[0006] In order to solve the problems existing in the prior art, the purpose of the present invention is to provide a method for diagnosing a small number of samples of a strong light magnetic chiller based on adaptive knowledge embedding. The network model proposed in the present invention uses a small amount of label data of a strong light magnetic chiller to complete the fault diagnosis task with high accuracy. The method of the present invention is applied in the field of mechanical manufacturing fault diagnosis, and can timely diagnose the fault of a strong light magnetic chiller to solve the deficiencies of the above-mentioned prior art.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] A method for diagnosing a small number of samples of a strong light and magnetic chiller based on adaptive knowledge embedding includes the following steps:

[0009] Step 1: data acquisition and preprocessing: using sensors to obtain raw vibration signal data from the chiller, including sufficient unlabeled data and partially labeled data, and using a sliding window to segment and sample the raw data;

[0010] Step 2, data set division, constructing the unlabeled training set required by the present invention, as well as the labeled data set for fine-tuning and the test set for few-sample diagnosis.

[0011] Step 3: Use four knowledge embedding methods closely related to fault symptoms to enhance the unlabeled training set data and generate corresponding pseudo labels for each sample.

[0012] In step 4, the convolutional neural network is pre-trained based on the enhanced training set and cross entropy loss, and the exponential weighted average strategy is used to adaptively assign weights to the four knowledge embedding methods to obtain better feature knowledge embedding.

[0013] Step 5: Use a small amount of labeled data to fine-tune the pre-trained convolutional neural network to make the model more suitable for subsequent few-sample fault diagnosis tasks.

[0014] In step 6, the fine-tuned model is tested using the divided few-shot diagnosis test set, and the accuracy (Acc) indicator is used to evaluate the few-shot diagnosis performance of the model.

[0015] In step 1, the vibration signal is collected from the chiller by installing sensors at key locations such as the pump housing. Since the collected vibration signal is a long-time series signal, it is not conducive to learning the characteristic information of the signal, so a sliding window method is used to obtain the signal sample. Assume that the vibration signal sequence collected from the chiller has n sample points, S O is the length of the overlap of two adjacent segments, L is the length of each segment, and M is the number of segments, then their relationship is expressed as follows:

[0016] n=(M-1)×(LS O )+L

[0017] By setting the appropriate S O and L to obtain the required signal samples, each segment represents a sample, and X(t) = [x 1 ,x 2 ,...x, L ] represents, where L represents the length of the signal.

[0018] In the present invention, due to the limited number of collected signal points, it is inevitable that there are repeated data points between different samples. Although the use of sliding window segmentation increases the number of training samples, the information capacity of the data set does not increase. Therefore, if experimental conditions permit, we recommend collecting as much experimental data as possible to increase the information capacity of the data set.

[0019] In step 2, based on the three locations of the outer ring, inner ring and ball of the bearing and the three fault severity levels, we regard the same fault location but different fault severity levels as an independent type. Together with the normal condition, the data set includes a total of 10 fault types. 2000 signal samples are randomly selected to form the unlabeled training set. Construct a dataset using 50 labeled samples for each fault type Then construct a data set with 100 labeled samples for each fault type. They are used for fine-tuning and testing of the model respectively, and D u ∩D l ∩D s =Φ. Among them, D u ,D l ,D s The length of each signal sample in is 2048.

[0020] In order to make the model fully utilize unlabeled data and learn useful knowledge from it, the present invention obtains an enhanced training set through knowledge embedding and allows the model to recognize different knowledge embeddings. We believe that if a model can correctly recognize different knowledge embeddings, then different fault signals can be recognized in fault diagnosis tasks. Because different faults present different signal forms on vibration signals, by allowing the network to learn to recognize the type of knowledge embedding, the network is forced to have the ability to learn useful information from the signal. Then, this ability is transferred to the few-sample diagnosis task to greatly improve its performance.

[0021] In step 3, different knowledge embedding methods are used to enhance the unlabeled training set data, and the enhanced data is represented as Among them G g (·) is the knowledge embedding operator applied to the original vibration signal X(t), p is an integer and p∈[1,E], E=5 represents the total number of knowledge embedding methods (including the initial signal), and pseudo labels are automatically generated while knowledge embedding Different knowledge embedding methods correspond to different pseudo labels.

[0022] Four different knowledge embedding methods are used, namely random zeroing, random increase, random decrease and time disturbance. The process and representation of each method are as follows:

[0023] Method 1: Randomly set zeros, first generate a vector 25% of the elements are 0, and the remaining 75% are 1. The positions of the elements with a value of 0 are random. Then, for the signal X(t) and the vector C 1 (t) Perform Hadamard product operation to obtain the embedded signal

[0024]

[0025] Method 2: Randomly increase and generate a vector first 25% of the elements have values ​​between 4 and 10, 75% of the elements have values ​​of 1, and the positions of elements with values ​​greater than 1 are random. 2 (t) Perform Hadamard product operation to obtain the embedded signal

[0026]

[0027] Method 3: Random reduction, generate a vector 25% of the elements have values ​​between 4 and 10, 75% of the elements have values ​​of 1, and the positions of elements with values ​​greater than 1 are random. Then divide the signal X(t) by the vector C. 3(t) Obtaining embedded signal

[0028]

[0029] Method 4: Time perturbation: First, divide the original vibration signal X(t) into m segments Again Randomly shuffle the m fragments, and finally reassemble the shuffled m fragments to obtain the embedded signal

[0030] After all unlabeled signal data are enhanced through knowledge embedding, the original unlabeled training set containing 2,000 samples is expanded to an enhanced dataset containing 10,000 pseudo-labeled samples. Indicates that Represents X t The pth embedded signal of is a label automatically generated based on the corresponding knowledge embedding. Since there are N unlabeled samples in total and each sample is embedded in E ways, D p contains EN embedded signal samples. Use the enhanced dataset to pre-train a knowledge embedding network model And identify the input signal The knowledge embedding type, where θ F Represents the parameters of model F.

[0031] In step 4, a feature extraction module F(·) based on a convolutional neural network is constructed, including 5 convolutional layers, 5 pooling layers, 3 fully connected layers and 5 activation function layers. According to the characteristics and structure of the signal data, one-dimensional convolution is used to process the data in the time dimension. In order to make the network pay more attention to the inherent characteristics of the signal, the maximum pooling method is used to reduce the dimension of the data. Specifically, each one-dimensional convolutional layer is followed by a RELU activation function layer, followed by a maximum pooling layer. The number of convolution kernels corresponding to the first two convolutional layers is 16 and 32 respectively, and the number of kernels of the last three convolutional layers is 64. The size of the convolution kernel is 2, the step size of the first three layers is 4, the step size of the last two layers is 2, the size of the pooling layer is 2, and the number of neurons in the last fully connected layer is consistent with the total number of knowledge embedding methods E, which is used to identify the knowledge embedding type to which the enhanced sample belongs during the pre-training process.

[0032] The training process of the network model F(·) in the pre-training stage includes the following steps:

[0033] 1) Perform E different knowledge embeddings on N unlabeled samples to obtain an enhanced dataset

[0034] 2) Initialize the parameters θ of the network model F(·) F, and the weights corresponding to different knowledge embeddings {w 1 ,w 2 ,...,w E};

[0035] 3) Calculate pseudo labels based on cross entropy and network output The loss between , and adaptively assign weights to all knowledge embedding methods through an exponentially weighted average strategy, where the cross entropy loss is expressed as:

[0036]

[0037] First calculate N in each batch i The loss of samples is:

[0038]

[0039] Then calculate the weighted total loss based on the weights of different knowledge embeddings:

[0040]

[0041] At this point we introduce the exponential weighted average (EMA) to smooth the loss curve:

[0042]

[0043] where w p is the weight of knowledge embedding, L p (h) is the loss of the p-th knowledge embedding in the h-th iteration, is the EMA loss of the p-th embedding in the h-1th iteration, α is the smoothing coefficient of EMA, 0<α<1, and the larger α is, the smoother the loss curve is, so that the weight of each knowledge embedding can be better adjusted. Therefore, we designed an adaptive weight update formula based on EMA:

[0044]

[0045] Where τ is a parameter that controls the amplitude of weight adjustment. In addition, we set upper and lower limits on the weights to avoid gradient vanishing and dynamically adjust the weights of knowledge embedding after each training cycle.

[0046] The weight adjustment mechanism we designed is actually a "reward-penalty" mechanism: if the loss of a certain knowledge embedding is low, it means that the model performs better under this knowledge embedding. Therefore, the weight adjustment formula will "reward" this knowledge embedding and give it a higher weight, thereby further emphasizing this knowledge embedding in the next iteration. On the contrary, if the loss of a certain knowledge embedding is high, it means that the model performs poorly under this knowledge embedding. Therefore, the weight adjustment formula will "penalize" this knowledge embedding and give it a lower weight, thereby reducing the impact of this knowledge embedding in the next iteration.

[0047] 4) By minimizing the total loss function, the network parameters are iteratively updated until the loss function converges, and finally a pre-trained network model is obtained. The present invention uses AdamW as the optimizer, which has a faster convergence speed than the general Adam, and updates the model parameters through the gradient descent algorithm:

[0048]

[0049] Among them, α represents the learning rate when the gradient is updated.

[0050] In step 5, V labeled samples are randomly selected from each fault type of C faults to form a fine-tuning dataset. It is used to fine-tune the network. The loss function of the fine-tuning stage is expressed as follows:

[0051]

[0052] where θ cls represents the model parameters, y i,c is the true label of the i-th sample in the c-th category. If the i-th sample belongs to the c-th category, y i,c is 1, otherwise it is 0; is the probability that the model predicts that the i-th sample belongs to the c-th class.

[0053] In step 6, the fine-tuned model is evaluated using the divided few-sample diagnostic test set, and then the fault labels of the test set are output. Finally, the overall classification accuracy of the model is measured by the Acc indicator:

[0054]

[0055] Among them, TP is the number of positive samples predicted as positive, FP is the number of negative samples predicted as positive, TN is the number of negative samples predicted as negative, and FN is the number of positive samples predicted as negative. In multi-classification problems, the Acc indicator is defined as the ratio of the number of correctly classified samples to the total number of samples.

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

[0057] 1. The vibration signal data in the strong optical magnetic chiller is enhanced through a variety of knowledge embedding methods closely related to fault signs, and the inherent feature knowledge hidden in a large number of unlabeled samples is fully learned to provide more comprehensive input samples for the few-sample diagnosis model.

[0058] 2. In the process of pre-training the model, an exponentially weighted average strategy is used to adaptively weight various knowledge embedding methods to quantitatively characterize the impact of different knowledge embedding methods on the performance of the model, and to improve the few-sample diagnostic accuracy and interpretability of the model through a small amount of labeled data and multiple rounds of iteration strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a flow chart of a few-sample diagnosis method for strong light and magnetic chillers based on adaptive knowledge embedding;

[0060] Figure 2 is an example diagram of the knowledge embedding method;

[0061] Figure 3 It is the loss curve of the pre-training stage;

[0062] Figure 4 It is the adaptive weight change diagram of each knowledge embedding in the pre-training stage;

[0063] Figure 5 It is the accuracy curve of the fine-tuning stage and the testing stage; DETAILED DESCRIPTION

[0064] The following uses various faults of the chiller as an example and combines the drawings of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0065] A small sample diagnosis method (SSAD) for a strong light and magnetic chiller based on knowledge adaptive embedding, the diagnosis method comprising the following steps:

[0066] Step 1: The strong light magnetic chiller is mainly composed of evaporator, condenser, electric control box and water pump. The water pump plays a vital role in the chiller. It is responsible for driving the refrigerant or water to circulate in the system, thereby ensuring the normal operation and efficient refrigeration of the entire system. By installing sensors at key locations such as the pump casing, vibration signals are collected from the chiller. Since the collected vibration signals are long-term series signals, it is not conducive to learning the characteristic information of the signal, so a sliding window method is used to obtain signal samples. Assume that the vibration signal sequence collected from the chiller has n sample points, SO is the overlapping length of two adjacent segments, L is the length of each segment, and M is the number of segments, then their relationship is expressed as follows:

[0067] n=(M-1)×(LS O )+L

[0068] By setting the appropriate S O and L to obtain the required signal samples, each segment represents a sample, and use X(t) = [x 1 ,x 2 ,...,x L ]express.

[0069] Step 2: Based on the three locations of the outer ring, inner ring and ball of the bearing and the three fault severity levels, we regard the same fault location but different fault severity as an independent type, plus one normal condition, so the data set includes a total of 10 fault types. 2000 signal samples are randomly selected to form the unlabeled training set Construct a dataset using 50 labeled samples for each fault type Then construct a data set with 100 labeled samples for each fault type. They are used for fine-tuning and testing of the model respectively, and D u ∩D l ∩D s =Φ. Among them, D u ,D l ,D s The length of each signal sample in is 2048.

[0070] Step 3: Use different knowledge embedding methods to embed D u The data in is enhanced, and the enhanced data is expressed as Among them G g (·) is the knowledge embedding operator applied to the original vibration signal X(t), p is an integer and p∈[1,E], E=5 represents the total number of knowledge embedding methods (including the initial signal), and pseudo labels are automatically generated while knowledge embedding Different embedding methods correspond to different pseudo labels.

[0071] Four different knowledge embedding methods are used, namely random zeroing, random increase, random decrease and time disturbance. Figure 2 Example diagrams of all embedding methods are given, and the process and representation of each method are as follows:

[0072] Method 1: Randomly set zeros, first generate a vector 25% of the elements are 0, and the remaining 75% are 1. The positions of the elements with a value of 0 are random. Then, for the signal X(t) and the vector C1 (t) Perform Hadamard product operation to obtain the embedded signal

[0073]

[0074] Method 2: Randomly increase and generate a vector first 25% of the elements have values ​​between 4 and 10, 75% of the elements have values ​​of 1, and the positions of elements with values ​​greater than 1 are random. 2 (t) Perform Hadamard product operation to obtain the embedded signal

[0075]

[0076] Method 3: Random reduction, generate a vector 25% of the elements have values ​​between 4 and 10, 75% of the elements have values ​​of 1, and the positions of elements with values ​​greater than 1 are random. Then divide the signal X(t) by the vector C. 3 (t) Obtaining embedded signal

[0077]

[0078] Method 4: Time perturbation: First, divide the original vibration signal X(t) into m segments Again Randomly shuffle the m fragments, and finally reassemble the shuffled m fragments to obtain the embedded signal

[0079] After all unlabeled signal data are enhanced through knowledge embedding, the original training set containing 2000 unlabeled signal samples is expanded to an enhanced dataset containing 10000 pseudo-labeled samples, expressed as in Represents X t The pth knowledge embedding signal, is a pseudo-label automatically generated based on the corresponding embedding. Since there are N unlabeled samples and each sample is embedded in E ways, D p contains EN embedded signal samples. Use the enhanced dataset to pre-train a knowledge embedding network model And identify the input signal The knowledge embedding type, where θ F Represents the parameters of model F.

[0080] Step 4: Construct a knowledge embedding network model F(·) based on a convolutional neural network, including 5 convolutional layers, 5 pooling layers, 3 fully connected layers, and 5 activation function layers. According to the characteristics and structure of the signal data, one-dimensional convolution is used to process the data in the time dimension. In order to make the network pay more attention to the inherent characteristics of the signal, the maximum pooling method is used to reduce the dimension of the data. Specifically, each one-dimensional convolution layer is followed by a RELU activation function layer, followed by a maximum pooling layer. The number of convolution kernels corresponding to the first two convolutional layers is 16 and 32 respectively, and the number of kernels in the last three convolutional layers is 64. The size of the convolution kernel is 2, the stride of the first three layers is 4, the stride of the last two layers is 2, the size of the pooling layer is 2, and the number of neurons in the last fully connected layer is consistent with the total number of knowledge embedding methods E, which is used to identify the knowledge embedding type to which the enhanced samples belong during the pre-training process.

[0081] The training process of the network model F(·) in the pre-training stage includes the following steps:

[0082] 1) Perform E different knowledge embeddings on N unlabeled samples to obtain an enhanced dataset

[0083] 2) Initialize the parameters θ of the network model F(·) F , and the weights {w 1 ,w 2 ,...,w E};

[0084] 3) Calculate pseudo labels based on cross entropy and network output The loss between , and adaptively assign weights to all knowledge embedding methods through an exponentially weighted average strategy, where the cross entropy loss is expressed as:

[0085]

[0086] First calculate N in each batch i The loss of samples is:

[0087]

[0088] Then calculate the weighted total loss based on the weights of different embeddings:

[0089]

[0090] At this point we introduce the exponential weighted average (EMA) to smooth the loss curve:

[0091]

[0092] where w p is the weight of knowledge embedding, Lp (h) is the loss of the p-th knowledge embedding in the h-th iteration, is the EMA loss of the p-th knowledge embedding in the h-1th iteration, α is the smoothing coefficient of EMA, 0<α<1 and is generally set to 0.9-0.999. The larger α is, the smoother the loss curve is, so that the weight of each knowledge embedding can be better adjusted. Therefore, we designed an adaptive weight update formula based on EMA:

[0093]

[0094] Where τ is a parameter that controls the amplitude of weight adjustment, which is set to 0.1 in the present invention. At the same time, we set the upper and lower limits of the weight to 0.1 and 1 respectively to avoid gradient vanishing, and dynamically adjust the weight of knowledge embedding after each training cycle. In addition, in order to see the changes in model performance more clearly, a part of the data in the training set is separately divided as a validation set, and the training effect of the model is observed in time through the validation loss. Figure 3 A curve chart of the model's loss changes during pre-training is given. We find that the model's training loss curve is smooth and shows a continuous downward trend, and the validation loss is also relatively stable, showing an overall downward trend.

[0095] 4) By minimizing the total loss function and using the gradient descent algorithm to iteratively update the network parameters with a learning rate α until the loss function converges, the pre-trained network model is finally obtained:

[0096]

[0097] The weight adjustment mechanism we designed is actually a "reward-penalty" mechanism: if the loss of a certain transformation is low, it means that the model performs better under this knowledge embedding. Therefore, the weight adjustment formula will "reward" this knowledge embedding and give it a higher weight, thereby further emphasizing this knowledge embedding in the next iteration. On the contrary, if the loss of a certain knowledge embedding is high, it means that the model performs poorly under this embedding. Therefore, the weight adjustment formula will "penalize" this knowledge embedding and give it a lower weight, thereby reducing the impact of this embedding in the next iteration.

[0098] Figure 4The weight changes of different knowledge embeddings during the training process are given in , from which we can see that with the increase of iteration rounds, the weight of each knowledge embedding is adaptively adjusted. Overall, the weight of the randomly added embedding is relatively large, first increasing and then stabilizing at more than 0.5, the weight of the randomly set zero embedding continues to rise, and finally stabilizes at around 0.33, the randomly reduced embedding shows a slow upward trend, and the weight of the initial signal and time disturbance embedding gradually decreases and finally stabilizes at 0.1, which shows that the randomly added embedding contributes the most to the model, and the model can better identify the knowledge embedding, while the contribution of the initial signal and time disturbance embedding is relatively small, so the model pays less attention to it.

[0099] 1) By minimizing the total loss function, the network parameters are iteratively updated until the loss function converges, and finally a pre-trained network model is obtained. The present invention uses AdamW as the optimizer, which has a better convergence speed than the general Adam, and updates the model parameters through the gradient descent algorithm parameters:

[0100]

[0101] Among them, α represents the learning rate when the gradient is updated.

[0102] Step 5: Randomly select V labeled samples from each fault type of C faults to form a fine-tuning dataset In order to retain the feature knowledge embedded in the model, the first four convolutional layers are frozen, and only the parameters of the last convolutional layer and the fully connected layer are fine-tuned. The loss function of the fine-tuning stage is expressed as follows:

[0103]

[0104] where θ cls represents the model parameters, y i,c is the true label of the i-th sample in the c-th category. If the i-th sample belongs to the c-th category, y i,c is 1, otherwise it is 0; is the probability that the model predicts that the i-th sample belongs to the c-th class. After minimizing the loss function in the fine-tuning phase and making it converge, the optimal network model parameters suitable for the few-sample diagnosis task can be obtained.

[0105] Step 6: Use the divided few-sample diagnostic test set D s Evaluate the fine-tuned model, then output the fault labels of the test set, and finally measure the overall classification accuracy of the model through the Acc indicator:

[0106]

[0107] Among them, TP is the number of positive samples predicted as positive, FP is the number of negative samples predicted as positive, TN is the number of negative samples predicted as negative, and FN is the number of positive samples predicted as negative. In multi-classification problems, the Acc indicator is defined as the ratio of the number of correctly classified samples to the total number of samples.

[0108] Figure 5 A curve chart of the change in accuracy of the model during fine-tuning with 10 labeled samples of each type is given. The fine-tuning accuracy of the model continues to increase, and the accuracy on the few-sample diagnosis test set also shows an overall upward trend, reflecting the superiority and stability of the model.

[0109] Table 1 shows the few-shot diagnostic performance after fine-tuning the model with 3, 5, 10, 30, and 50 samples, respectively. -FINE-TUNE represents the model without the fine-tuning stage, and -WEIGHTS represents the model without the adaptive weight module.

[0110] method 3 5 10 30 50 -FINE-TUNE 59.90 59.90 59.90 59.90 59.90 -WEIGHTS 64.20 69.24 77.40 93.17 94.63 SSAD 66.40 70.63 82.90 93.86 95.70

[0111] It is not difficult to see from the table that after removing the fine-tuning stage and the adaptive weights, the accuracy of the model is significantly reduced, which is enough to illustrate the effectiveness of these two methods. It is worth noting that the model also has a certain diagnostic ability when only pre-training is performed without fine-tuning, indicating that the knowledge embedding method can enable the model to obtain the inherent feature knowledge of the signal, so that it can be better applied to downstream tasks. In addition, the designed adaptive weight adjustment method allows the model to adaptively reduce its dependence on certain embedded features based on the contribution of knowledge embedding to performance, and pay more attention to embedded features with better performance, thereby effectively improving the diagnostic performance. Since the model has learned the inherent feature knowledge of the signal after pre-training, only a small number of fine-tuning samples are needed to obtain a higher accuracy rate and complete the few-sample fault diagnosis task of the strong light magnetic chiller.

Claims

1. A small sample diagnosis method for strong light and magnetic chillers based on knowledge adaptive embedding, characterized in that: The following steps are involved: Step 1: data acquisition and preprocessing: using sensors to obtain raw vibration signal data from the chiller, including sufficient unlabeled data and partially labeled data, and using a sliding window to segment and sample the raw data; Step 2, data set division, constructing the unlabeled training set required by the present invention, as well as the labeled data set for fine-tuning and the test set for few-sample diagnosis. Step 3: Use four knowledge embedding methods closely related to fault symptoms to enhance the unlabeled training set data and generate corresponding pseudo labels for each sample. In step 4, the convolutional neural network is pre-trained based on the enhanced training set and cross entropy loss, and the exponential weighted average strategy is used to adaptively assign weights to the four knowledge embedding methods to obtain better feature knowledge embedding. Step 5: Use a small amount of labeled data to fine-tune the pre-trained convolutional neural network to make the model more suitable for subsequent few-sample fault diagnosis tasks. In step 6, the fine-tuned model is tested using the divided few-shot diagnosis test set, and the accuracy (Acc) indicator is used to evaluate the few-shot diagnosis performance of the model.

2. According to claim 1, a method for diagnosing a small number of samples of a strong light and magnetic chiller based on adaptive knowledge embedding is characterized in that: In step 1, the specific method is: By installing sensors at key locations such as the pump housing, vibration signals are collected from the chiller. Since the collected vibration signals are long-time series signals, which are not conducive to learning the characteristic information of the signals, a sliding window method is used to obtain signal samples. Assume that the vibration signal sequence collected from the chiller has n sample points, S O is the length of the overlap of two adjacent segments, L is the length of each segment, and M is the number of segments, then their relationship is expressed as follows: n=(M-1)×(L-S O )+L By setting the appropriate S O and L to obtain the required signal samples, each segment represents a sample, and use X(t) = [x1, x2, ..., x L ]express.

3. According to claim 2, a method for diagnosing a small number of samples of a strong light and magnetic chiller based on adaptive knowledge embedding is characterized in that: In step 2, the training set required by the present invention is Consists of a large number of unlabeled samples, labeled datasets and are used for model fine-tuning and testing respectively, and D u ∩D l ∩D s =Φ. Among them, D u ,D l ,D s The sample dimension in is consistent with X(t) in claim 1; N, B, S represent D u ,D l ,D s The number of samples in .

4. According to claim 3, a method for diagnosing a small number of samples of a strong light and magnetic chiller based on adaptive knowledge embedding is characterized in that: In step 3, different knowledge embedding methods are used to embed D u The data in is enhanced, and the enhanced data is expressed as Among them G g (·) is the knowledge embedding operator applied to the original vibration signal X(t), p is an integer and p∈[1,E], E represents the total number of knowledge embedding methods (including the initial signal), and pseudo labels are automatically generated while knowledge embedding Different knowledge embedding methods correspond to different pseudo labels. Four different knowledge embedding methods are used, namely random zeroing, random increase, random decrease and time disturbance. The process and representation of each method are as follows: Method 1: Randomly set zeros, first generate a vector 25% of the elements are 0, and the remaining 75% are 1. The positions of the elements with a value of 0 are random. Then, the Hadamard product operation is performed on the signal X(t) and the vector C1(t) to obtain the embedded signal Method 2: Randomly increase and generate a vector first 25% of the elements have values ​​between 4 and 10, 75% of the elements have values ​​of 1, and the positions of elements with values ​​greater than 1 are random. Then perform Hadamard product operation on signal X(t) and vector C2(t) to obtain the embedded signal Method 3: Random reduction, generate a vector 25% of the elements have values ​​between 4 and 10, 75% of the elements have values ​​of 1, and the positions of elements with values ​​greater than 1 are random. Then divide the signal X(t) by the vector C3(t) to obtain the embedded signal Method 4: Time perturbation: First, divide the original vibration signal X(t) into m segments Again Randomly shuffle the m fragments, and finally reassemble the shuffled m fragments to obtain the embedded signal After all unlabeled signal data are enhanced by knowledge embedding, the enhanced dataset is obtained. in Represents X t The p-th knowledge embedding of is a pseudo-label automatically generated based on the corresponding knowledge embedding. Since there are N unlabeled samples in total, and each sample is embedded with E kinds of knowledge, D p contains EN knowledge embedding signal samples. Use the enhanced dataset to pre-train a knowledge embedding network model And identify the input signal The knowledge embedding type, where θ F Represents the parameters of model F.

5. According to claim 4, a method for diagnosing a small number of samples of a strong light and magnetic chiller based on adaptive knowledge embedding is characterized in that: In step 4, a knowledge embedding network model F(·) based on convolutional neural network is constructed, including 5 convolutional layers, 5 pooling layers, 3 fully connected layers and 5 activation function layers. According to the characteristics and structure of the signal data, one-dimensional convolution is used to process the data in the time dimension. In order to make the network pay more attention to the inherent characteristics of the signal, the maximum pooling method is used to reduce the dimension of the data. The number of neurons in the last fully connected layer is consistent with the total number of knowledge embedding methods E, which is used to identify the knowledge embedding type to which the enhanced sample belongs during the pre-training process. The training process of the network model F(·) in the pre-training stage includes the following steps: 1) Perform E different knowledge embeddings on N unlabeled samples to obtain an enhanced dataset 2) Initialize the parameters θ of the network model F(·) F , and the weights {w1,w2,...,w E }; 3) Calculate pseudo labels based on cross entropy and network output The loss between , and adaptively assign weights to all knowledge embedding methods through an exponentially weighted average strategy, where the cross entropy loss is expressed as: First calculate N in each batch i The loss of samples is: Then calculate the weighted total loss based on the weights of different knowledge embeddings: At this point we introduce the exponential weighted average (EMA) to smooth the loss curve: where w p is the weight of knowledge embedding, L p (h) is the loss of the p-th knowledge embedding in the h-th iteration, is the EMA loss of the p-th knowledge embedding in the h-1th iteration, α is the smoothing coefficient of EMA, 0<α<1, and the larger α is, the smoother the loss curve is, so that the weight of each knowledge embedding can be better adjusted. Therefore, we designed an adaptive weight update formula based on EMA: Where τ is a parameter that controls the amplitude of weight adjustment. In addition, we set upper and lower limits on the weights to avoid gradient vanishing and dynamically adjust the weights of knowledge embedding after each training cycle. 4) By minimizing the total loss function and using the gradient descent algorithm to iteratively update the network parameters with a learning rate α until the loss function converges, the pre-trained network model is finally obtained:

6. According to claim 5, a method for diagnosing a small number of samples of a strong light and magnetic chiller based on adaptive knowledge embedding is characterized in that: In step 5, V labeled samples are randomly selected from each fault type of C faults to form a fine-tuning dataset It is used to fine-tune the network. The loss function of the fine-tuning stage is expressed as follows: where θ cls represents the model parameters, y i,c is the true label of the i-th sample in the c-th category. If the i-th sample belongs to the c-th category, y i,c is 1, otherwise it is 0; is the probability that the model predicts that the i-th sample belongs to the c-th class.

7. According to claim 6, a method for diagnosing a small number of samples of a strong light and magnetic chiller based on adaptive knowledge embedding is characterized in that: In step 6, the fine-tuned model is evaluated using the divided few-sample diagnostic test set, and then the fault labels of the test set are output. Finally, the overall classification accuracy of the model is measured by the Acc indicator: Among them, TP is the number of positive samples predicted as positive, FP is the number of negative samples predicted as positive, TN is the number of negative samples predicted as negative, and FN is the number of positive samples predicted as negative. In multi-classification problems, the Acc indicator is defined as the ratio of the number of correctly classified samples to the total number of samples.