A generative zero-shot fault diagnosis method guided by physical knowledge
Through the generative zero-sample fault diagnosis method guided by physical knowledge, the unknown fault data space is established and expanded, which solves the problems of missing unknown fault data feature space and insufficient generation model, achieves accurate classification and diagnosis of unseen faults, and improves the efficiency of Classification accuracy.
Patent Information
- Application Number
- CN202410961551.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-18
AI Technical Summary
Existing zero-sample fault diagnosis methods are difficult to accurately diagnose unknown faults due to the lack of unknown fault data feature space and the generation model only contains known fault data space, resulting in the generated unknown fault data possibly being offset or falling into unreasonable locations. space.
Through the generative zero-sample fault diagnosis method guided by physical knowledge, we establish the feature space and attribute space of known faults, use the generative model and decoder to reconstruct the unknown fault data space, and identify the unknown fault attribute space through physical knowledge to generate accurate Unknown fault data feature space,retrains the encoder model to improve diagnosis accuracy.
It achieves accurate classification of unseen faults in the latent space, improves the classification accuracy of unknown faults, and makes up for the problems of missing feature space and insufficient generation models, and can effectively diagnose faults without modeling unknown samples.
Smart Images

Figure CN118503714B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of fault diagnosis, and in particular relates to a generative zero-sample fault diagnosis method guided by physical knowledge. Background Art
[0002] In order to ensure the safe and efficient operation of industrial processes, it is crucial to accurately monitor the process status and accurately identify the type of anomalies when they occur, which is the core task of fault diagnosis. Current fault diagnosis models are mainly divided into two categories: mechanism-based models and data-based models. Mechanism models rely deeply on physical knowledge, while data-driven models have attracted increasing attention due to their high flexibility and easy implementation. However, the performance of data-driven models often depends on sufficient training data, which is often a challenge in actual industrial production. Since most equipment operates under normal operating conditions, the fault data that can be collected is relatively limited, especially for those types of faults that have not yet occurred. In addition, deliberately causing equipment to fail to collect data will cause huge losses.
[0003] Although all possible fault data are included in the training set, in real applications, new fault types may appear at any time, which makes it difficult for existing methods to cope with them. In particular, when faced with unseen fault data, existing few-shot learning methods may misclassify them as known faults, resulting in diagnostic errors.
[0004] With the development of cutting-edge technologies in the field of machine learning, such as transfer learning, it is possible to extract knowledge from labeled data (source domain) and successfully transfer this knowledge to unlabeled data (target domain) to achieve accurate prediction and classification. In addition, in traditional deep learning, a large labeled data set is usually required to train the model. However, in practical applications, especially in the field of fault diagnosis, the cost of obtaining fault data is extremely expensive because fault events are relatively rare. Therefore, the emergence of zero-sample fault diagnosis technology provides a new perspective for solving this problem.
[0005] The core of zero-sample fault diagnosis is to use information or knowledge related to the fault to perform fault diagnosis using a data-driven approach without prior fault samples. This information may come from other similar systems or fields, or a deep understanding of the system failure mechanism. Incorporating this information into model training enables diagnosis of specific faults even in the absence of direct labeled data.
[0006] There are two main types of methods developed for zero-shot fault diagnosis: embedding-based and generative-based. The embedding method aims to establish a relationship between known fault data and attributes, and then use the trained model to make attribute judgments on the newly received data. This method passively waits for the arrival of data before making judgments, so it has limitations in diagnosing unknown faults. The generative-based method not only uses known fault data to establish a relationship with attributes, but also actively generates data for unknown faults through trained generative models. Although these methods have achieved certain results, there are still two major problems to be solved. First, the lack of feature space for unknown fault data. Due to the lack of corresponding fault features, the generated unknown fault data may be offset. Second, the generative model usually only contains the space of known fault data, which is not enough to fully describe the space of unknown fault data, resulting in the generated unknown fault data falling in an unreasonable space. Summary of the invention
[0007] In view of the deficiencies in the prior art, the present invention provides a generative zero-sample fault diagnosis method guided by physical knowledge.
[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0009] A physical knowledge-guided generative zero-sample fault diagnosis method comprises the following steps:
[0010] Step 1: Establish a feature space of known faults from the known fault data space;
[0011] The physical knowledge of the process is used to establish the attributes of the process variables. Each process variable has a different number of attributes to represent the occurrence or non-occurrence of a fault. The attributes are combined into a vector to describe the fault data. Then, the attribute space of the fault that has occurred is identified through physical knowledge, that is, the known fault attribute space, denoted as A. S ;
[0012] Define the known fault data space as D S , known fault data space D S Projected to the known fault feature space Z through the encoder S , and then reconstructed by the decoder; the known fault attribute space A S Mapping to known fault feature space Z by generating models S , and then reconstructed by the decoder to complete the training of the encoder, decoder and generative model; the superscript S represents a known fault, and the decoder reconstructs the simulated known fault data space ;
[0013] Step 2: Use the generation model and the decoder reconstruction model to expand the unknown fault data space and generate unknown fault data;
[0014] Identify the unknown fault attribute space that will occur but has not yet occurred through physical knowledge, denoted as A U ; Using known fault attribute A S and unknown fault attribute space A U The known fault feature space Z is obtained by generating model mapping S and unknown fault feature space Z U , use known fault features and unknown fault features to train the decoder, use the decoder to reconstruct the fault data space, and obtain the simulated fault data space , and in the simulated fault data space Add a discriminator to retrain the decoder to obtain a decoder reconstruction model that contains unknown fault data space;
[0015] Step 3: Retrain the encoder model with the generated unknown fault data and known fault data;
[0016] Use the real known fault data and the simulated unknown fault data generated in step 2 to retrain the encoder model according to the method in step 1.
[0017] Furthermore, the specific steps of step 1 are as follows:
[0018] Step 101: Use the known fault data space D S All known fault data in and known fault attribute space A S All known fault attributes in A conditional variational autoencoder model is established, where the superscript S represents known faults, the subscript N is the number of data of each fault type, and the subscript K is the total number of known fault data types, so there are a total of N×K data;
[0019] Step 102: The nth known fault data of the kth category Projected to the known fault feature space Z through the encoder S Get the characteristics of the nth known fault of the kth category , the feature of the nth known fault of the kth category obtained by projection Then reconstruct it back to simulate known fault data space through the decoder ;
[0020] Step 103: The attribute variables of the known faults are mapped one-to-one with the known fault data. Therefore, the known fault attribute space A S Mapping to known fault feature space Z S , and the known fault data space DS Mapping to known fault feature space Z S The same, because the collected known fault data space D S The fault data contains noise, so it is not chosen to directly use the k-th known fault attribute and the nth known fault data of the kth category The relationship is established by using the nth known fault feature of the kth category after feature extraction using the encoder. as the generated object; and the generated features need to use the known fault data space D S The fault data is established to ensure accuracy, so the n-th known fault feature of the k-th class generated by the forced generation model is The nth known fault feature of the kth category obtained by projection with the encoder Therefore, the conditional variational autoencoder is used to constrain the generation model and requires the kth class to have known fault attributes. Can generate the nth known fault data of the kth category The maximum probability of occurrence, its objective function can be expressed as:
[0021] (1);
[0022] in, Represents the kth known fault attribute Generate the nth known fault data of the kth category Probability of occurrence.
[0023] Furthermore, when calculating the objective function in step 103, the k-th attribute feature and the situation of generating the n-th data of the k-th class are first considered, and finally all situations are added together and the logarithm of equation (1) is taken:
[0024] (2);
[0025] in, It represents the probability of the nth known fault feature generated by the nth known fault data in the k-type attribute. represents the probability that the k-th known fault attribute simultaneously generates the n-th known fault data and the n-th known fault feature, It represents the probability of the nth known fault feature generated by the nth known fault data and the kth known fault attribute;
[0026] Since the KL term in the last line of the right side of equation (2) is non-negative, the lower bound of the maximum value of the objective function falls on the first term. , then continue to Expand:
[0027] (3);
[0028] in, The probability that the n-th known fault data of the k-th class represents the n-th known fault number feature of the k-th class; represents the probability that the k-th known fault attribute and the n-th known fault feature of the k-th class generate the n-th known fault data of the k-th class; represents the probability that the nth known fault data of the kth type generates the nth known fault feature of the kth category; represents the probability that the k-th known fault attribute generates the n-th known fault feature of the k-th class;
[0029] The KL term in the last line of the right side of equation (3) is comparing and The distribution similarity of The term is the reconstruction term of the known fault data, corresponding to the decoder from the feature space to the simulation space in step 1. Step 1 is now completed.
[0030] Furthermore, when judging the category of fault data, the known fault feature space Z generated in step 1 S Add constraints to establish a constrained variational autoencoder, and use a linear discriminator to separate different types of known fault data, while the same type of known fault data is closely connected;
[0031] It is known that there are K categories of fault data in total, and the objective function of the linear discriminant analysis LDA is:
[0032] (4);
[0033] Objective function J LDA is the sum of K linear discriminators, represents the weight vector associated with the kth category, is the variation of data between categories, which is the mean of each category minus the square of the mean of all categories. is the variation of the data within the category, which is the square of the average value of all data in each category minus the average value of all data in that category. The definitions of the two are:
[0034] (5);
[0035] in is the average value of the k-th category data, is the average value of all data, is the nth known fault data of the kth category. Each linear discriminator has a parameter to split the data. Finally, the total objective function Loss is the loss L of all categories. b And the objective function JLDA The sum of:
[0036] (6);
[0037] in, It represents the probability that the n-th known fault data of the k-th category generates the n-th known fault number feature; represents the probability that the k-th known fault attribute and the n-th known fault feature of the k-th class generate the n-th known fault data of the k-th class; It represents the probability that the n-th known fault data of the k-th category generates the n-th known fault feature of the k-th category; It represents the probability that the k-th known fault attribute generates the n-th known fault feature of the k-th category.
[0038] Furthermore, step 2 specifically includes the following process:
[0039] Step 201: First, fix the encoder so that the known fault feature space Z obtained in step 1 S The characteristics remain unchanged; then, the physical knowledge of the process is used to establish the attributes of the process variables. Each process variable has a different number of attributes to represent the occurrence or non-occurrence of a fault, and the attributes are combined into a vector to describe the fault data; then, the unknown fault attribute space that will occur but has not occurred is identified through physical knowledge, denoted as A U , the attribute space where no failure occurs is recorded as A Never ; and the feature spaces of known fault data and unknown fault data are different, using the unknown fault attribute space A U Obtain unknown fault feature space Z by generating model mapping U ; The superscript U represents an unknown fault;
[0040] Step 202: Using the known fault attribute space A S The generated known fault features and unknown fault attribute space A U The decoder is trained together with the unknown fault features generated; the simulated known fault data space generated by the decoder is and simulate unknown fault data space The storage space is defined as the simulated fault data space , so that the simulated fault data space Simulated known fault data With real known fault data Same; and in the simulated fault data space Add a discriminator to force the simulated fault data space The data are respectively corresponded to the attribute space to which they belong, and the known fault data are simulated separately and simulate unknown fault data , retrain the decoder reconstruction model that includes the unknown fault data space; where the subscript N is the number of data of each fault type; the subscript K is the total number of known fault types, and L is the total number of unknown fault types.
[0041] Furthermore, in step 2, the known fault feature space is expanded using the unknown fault attribute to obtain the unknown fault feature space, wherein the two are forced to be separated by a linear discriminator during the expansion to generate unknown fault data;
[0042] In step 201, the attributes of the process variables are established by using the physical knowledge of the process, and the attributes are combined into a vector to describe the fault data; specifically, the values in the attribute vector are composed of 0 and 1, and the value of the attribute is 1, which means that the fault data is affected by a certain fault interval of a certain process variable, and vice versa.
[0043] In step 201, the encoder model is fixed, so the k-th known fault attribute With the nth known fault data The reconstruction term in the objective function of the maximum probability of occurrence uses the encoder model parameters trained in step 1, which means that the reconstruction space does not change, so the loss function is simplified to:
[0044] (8);
[0045] In addition, in the feature space, the fault attributes are known The generated features will be related to the unknown fault attributes The generated features are used to train the linear discriminator together, so the number of feature types in the feature space is K+L, where L represents the number of unknown fault categories. Similarly, formula (8) is transformed into the objective function of all data and added to the objective function of the linear discriminator model to become:
[0046] (9);
[0047] The generated model is retrained through this objective function, and this model contains known fault feature space and unknown fault feature space;
[0048] In step 202, the objective function of training the decoder reconstruction model is:
[0049] (10);
[0050] in, is the nth simulated fault data of the kth category, represents the probability that the nth fault data of the kth category generates the nth fault feature of the kth category; represents the probability that the nth fault data of the kth category generates the kth category fault attribute; the superscript V includes known faults and unknown faults, that is, , the first term of formula (10) is the reconstruction term of known data, and the second term is the objective function of the discriminator. Through this objective function, the decoder reconstruction model containing the unknown data space is retrained.
[0051] Furthermore, in step 3, the objective function of retraining the encoder model is:
[0052] (11);
[0053] In this formula, It consists of simulated unknown fault data and real known fault data; represents the probability that the nth fault feature of the kth category and the kth fault attribute generate the nth fault data of the kth category; It represents the probability that the k-th fault attribute generates the n-th fault feature of the k-th category.
[0054] Compared with the prior art, the present invention has the following advantages:
[0055] (1) In view of the defect problem 1 of the prior art: the lack of feature space of unknown fault data, the lack of corresponding fault features will cause the generated unknown fault data to be offset. In step 2, the present invention uses physical knowledge to generate the attribute space of unknown faults, and then establishes its corresponding feature space based on this attribute space. This method fills the gap of missing feature space and provides a solid foundation for generating accurate simulated unknown fault data.
[0056] (2) In view of defect problem 2 in the prior art: the generated model only contains the space of known fault data, which is insufficient to describe the space of unknown fault data, and also causes the generated unknown fault data to fall into an unreasonable space. In step 3, the present invention reconstructs the Decoder model and regenerates the model with the simulated unknown fault data and the real known fault data to solve the problem of insufficient space for unknown fault data.
[0057] (3) Solve the fault diagnosis problem without modeling unknown samples. Unlike previous methods, this invention incorporates the physical knowledge of the process into the attribute space and uses process attributes instead of process variables to describe known and unknown faults in more detail, thereby replacing the label space. The three-stage fault diagnosis method generates unknown faults, thereby achieving the goal of accurately classifying unseen faults in the latent space. Not only can physical information be incorporated into the model, but the classification accuracy of unknown faults can also be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0059] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0060] Figure 2 It is a diagram of the serial process structure of continuous stirred tank reactors;
[0061] Figure 3 is a symbolic directed graph model diagram;
[0062] Figure 4 The impact of the change of cooling water in the first tank on the process;
[0063] Figure 5 Attributes corresponding to all faults. DETAILED DESCRIPTION
[0064] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0065] like Figure 1 As shown, this embodiment provides a physical knowledge-guided generative zero-sample fault diagnosis method, comprising the following steps:
[0066] Step 1: Establish the feature space of known faults from the known fault data space;
[0067] Step 2: Use the generation model and the decoder reconstruction model to expand the unknown fault data space and generate unknown fault data;
[0068] Step 3: Retrain the encoder model with the generated unknown fault data and known fault data.
[0069] The following describes each step in detail.
[0070] Step 1: Establish the feature space of known faults from the known fault data space.
[0071] The physical knowledge of the process is used to establish the attributes of the process variables. Each process variable has a different number of attributes to represent the occurrence or non-occurrence of a fault. Finally, the attributes are combined into a vector to describe the fault data. Then, the attribute space of the fault that has occurred is identified through physical knowledge, that is, the known fault attribute space, denoted as A. S .
[0072] Define the known fault data space as D S , known fault data space D SProjected to the known fault feature space Z through the encoder S , and then reconstructed by the decoder; the known fault attribute space A S Mapping to known fault feature space Z by generating models S , and then reconstructed by the decoder to complete the training of the encoder, decoder and generative model; the superscript S represents a known fault, and the decoder reconstructs the simulated known fault data space .
[0073] The specific steps of step 1 are as follows:
[0074] Step 101: Use the known fault data space D S All known fault data in and known fault attribute space A S All known fault attributes in A conditional variational autoencoder model is established, where the superscript S represents known faults, the subscript N is the number of data of each fault type, and the subscript K is the total number of known fault data types, so there are N×K data in total.
[0075] Step 102: The nth known fault data of the kth category Projected to the known fault feature space Z through the encoder S Get the characteristics of the nth known fault of the kth category , the feature of the nth known fault of the kth category obtained by projection Then reconstruct it back to simulate known fault data space through the decoder .
[0076] Step 103: The attribute variables of the known faults are mapped one-to-one with the known fault data. Therefore, the known fault attribute space A S Mapping to known fault feature space Z S , and the known fault data space D S Mapping to known fault feature space Z S The same, because the collected known fault data space D S The fault data contains noise, so we do not choose to directly use the k-th known fault attribute The nth known fault data of the kth category The relationship is established by using the nth known fault feature of the kth category after feature extraction using the encoder. as the generated object; and the generated features need to use the known fault data space D S The fault data is established to ensure accuracy, so the n-th known fault feature of the k-th class generated by the forced generation model is The nth known fault feature of the kth category obtained by projection with the encoder Therefore, the conditional variational autoencoder is used to constrain the generation model and requires the kth class to have known fault attributes. Can generate the nth known fault data of the kth category The maximum probability of occurrence, its objective function can be expressed as:
[0077] (1);
[0078] in, Represents the kth known fault attribute Generate the nth known fault data of the kth category Probability of occurrence.
[0079] When calculating the objective function in step 103, first consider the k-th attribute feature and the situation of generating the n-th data of the k-th class, and finally add all the situations and take the logarithm of equation (1):
[0080] (2);
[0081] in, It represents the probability of the nth known fault feature generated by the nth known fault data in the k-type attribute. represents the probability that the k-th known fault attribute simultaneously generates the n-th known fault data and the n-th known fault feature, It represents the probability of the nth known fault feature being generated by the nth known fault data and the kth known fault attribute.
[0082] Since the KL term in the last line of the right side of equation (2) is non-negative, the lower bound of the maximum value of the objective function falls on the first term. , then continue to Expand:
[0083] (3);
[0084] in, The probability that the n-th known fault data of the k-th class represents the n-th known fault number feature of the k-th class; represents the probability that the k-th known fault attribute and the n-th known fault feature of the k-th class generate the n-th known fault data of the k-th class; represents the probability that the nth known fault data of the kth type generates the nth known fault feature of the kth category; It represents the probability that the k-th known fault attribute generates the n-th known fault feature of the k-th category.
[0085] The KL term in the last line of the right side of equation (3) is comparing and The distribution similarity of The term is the reconstruction term of the known fault data, corresponding to the decoder from the feature space to the simulation space in step 1. Step 1 is now completed.
[0086] In addition, it should be noted that when judging the category of fault data, the known fault feature space Z generated in step 1 S Constraints are added to establish a constrained variational autoencoder, and a linear discriminator is used to separate different types of known fault data, while the known fault data of the same type are closely connected.
[0087] It is known that there are K categories of fault data in total, and the objective function of the linear discriminant analysis LDA is:
[0088] (4);
[0089] Objective function J LDA is the sum of K linear discriminators, represents the weight vector associated with the kth category, is the variation of data between categories, which is the mean of each category minus the square of the mean of all categories. is the variation of the data within the category, which is the square of the average value of all data in each category minus the average value of all data in that category. The definitions of the two are:
[0090] (5);
[0091] in is the average value of the k-th category data, is the average value of all data, is the nth known fault data of the kth category. Each linear discriminator has a parameter to split the data. Finally, the total objective function Loss is the loss L of all categories. b And the objective function J LDA The sum of L b It is the same calculation method as formula (3), and formula (3) is just one of the parts, that is, the k-th attribute feature and the generation of the n-th data, L b is to sum up all the data;
[0092] (6);
[0093] in, It represents the probability that the n-th known fault data of the k-th category generates the n-th known fault number feature; represents the probability probability that the k-th known fault attribute and the n-th known fault feature of the k-th class generate the n-th known fault data of the k-th class; represents the probability that the n-th known fault data of the k-th category generates the n-th known fault feature of the k-th category; It represents the probability that the k-th known fault attribute generates the n-th known fault feature of the k-th category.
[0094] Step 2: Use the generation model and the decoder reconstruction model to expand the unknown fault data space and generate unknown fault data.
[0095] Identify the unknown fault attribute space that will occur but has not yet occurred through physical knowledge, denoted as A U ; Using known fault attribute A S and unknown fault attribute space A U The known fault feature space Z is obtained by generating model mapping S and unknown fault feature space Z U , use known fault features and unknown fault features to train the decoder, use the decoder to reconstruct the fault data space, and obtain the simulated fault data space , and in the simulated fault data space The discriminator is added to retrain the decoder to obtain a decoder reconstruction model containing the unknown fault data space.
[0096] Step 2 specifically includes the following processes:
[0097] Step 201: First, fix the encoder so that the known fault feature space Z obtained in step 1 S The characteristics remain unchanged; then, the physical knowledge of the process is used to establish the attributes of the process variables. Each process variable has a different number of attributes to represent the occurrence or non-occurrence of a fault, and the attributes are combined into a vector to describe the fault data; then, the unknown fault attribute space that will occur but has not occurred is identified through physical knowledge, denoted as A U , the attribute space where no failure occurs is recorded as A Never ; and the feature spaces of known fault data and unknown fault data are different, using the unknown fault attribute space A U Obtain unknown fault feature space Z by generating model mapping U ; The superscript U represents an unknown fault.
[0098] Step 202: Using the known fault attribute space A S The generated known fault features and unknown fault attribute space A U The decoder is trained together with the unknown fault features generated; the simulated known fault data space generated by the decoder is and simulate unknown fault data space The storage space is defined as the simulated fault data space , so that the simulated fault data space Simulated known fault data With real known fault data Same; and in the simulated fault data space Add a discriminator to force the simulated fault data space The data are respectively corresponded to the attribute space to which they belong, and the known fault data are simulated separately and simulate unknown fault data , retrain the decoder reconstruction model that includes the unknown fault data space; where the subscript N is the number of data of each fault type; the subscript K is the total number of known fault types, and L is the total number of unknown fault types.
[0099] It should be noted that in step 2, the known fault feature space is expanded using the unknown fault attributes to obtain the unknown fault feature space, wherein the two are forced to be separated by a linear discriminator during the expansion to generate unknown fault data.
[0100] It should be noted that the present invention proposes an innovative concept for the first time, that is, to establish the attributes of process variables using the physical knowledge of the process, and to combine the attributes into a vector to describe the fault data. Specifically, the values in the attribute vector are composed of 0 and 1, and the value of the attribute is 1, which means that the fault data is affected by a certain fault interval of a certain process variable, and vice versa.
[0101] Now assume that the attribute dimension is 3-dimensional, that is, there are 3 attributes that affect the operation procedure, then the number of types that these 3 attributes can correspond to is 8. If the fault attribute space A is known S If there are five of these categories, then the other three unknown fault attributes will be created, and physical knowledge will be used to limit which attribute spaces may fail as unknown fault attribute space A. U , A Never This is the attribute space that does not occur:
[0102] (7).
[0103] In step 201, the encoder model is fixed, so the k-th known fault attribute With the nth known fault data The reconstruction term in the objective function of the maximum probability of occurrence uses the encoder model parameters trained in step 1, which means that the reconstruction space does not change, so the loss function is simplified to:
[0104] (8);
[0105] In addition, in the feature space, the known fault attributes The generated features will be different from the unknown fault attributes The generated features are used to train the linear discriminator together, so the number of feature types in the feature space is K+L, where L represents the number of unknown fault categories. Similarly, formula (8) is transformed into the objective function of all data and added to the objective function of the linear discriminator model to become:
[0106] ;
[0107] Through this objective function, the generative model can be retrained, and this model contains known fault feature space and unknown fault feature space. (Use the known fault attributes and the unknown fault attributes obtained through physical knowledge to retrain the generative model. According to the principle, the objective function is deduced, and then the model is trained according to the objective function).
[0108] In step 202, the objective function of training the decoder reconstruction model is:
[0109] (10);
[0110] in, is the nth simulated fault data of the kth category, represents the probability that the nth fault data of the kth category generates the nth fault feature of the kth category; It represents the probability that the nth fault data of the kth class generates the kth fault attribute. The superscript V includes known faults and unknown faults, that is, , the first term of formula (10) is the reconstruction term of known data, and the second term is the objective function of the discriminator. Through this objective function, the decoder reconstruction model containing the unknown data space is retrained.
[0111] Step 3: Retrain the encoder model with the generated unknown fault data and known fault data.
[0112] Use the real known fault data and the simulated unknown fault data generated in step 2 to retrain the encoder model according to the method in step 1.
[0113] After adding the simulated unknown fault data, the objective function of the retrained encoder model is:
[0114] (11);
[0115] In this formula, for convenience, It consists of simulated unknown fault data and real known fault data; represents the probability that the nth fault feature of the kth category and the kth fault attribute generate the nth fault data of the kth category; It represents the probability that the k-th fault attribute generates the n-th fault feature of the k-th category.
[0116] The technical effects of the present invention are described below by giving application examples.
[0117] In the industrial example, two continuous stirred tank reactors were used in series to simulate the actual fault conditions that might occur by changing different flow rates or temperatures. Figure 2 This is a schematic diagram of two continuous stirred tank reactors in series. The mechanism model of the process is as follows:
[0118] (12);
[0119] (13);
[0120] The meanings of the variables in formula (12) and formula (13) are listed in Table 1 and Table 2 respectively.
[0121] Table 1 Measurement variables and their significance
[0122]
[0123] Table 2 Equation parameters
[0124]
[0125] The symbolic directed graph (SDG) model uses the process flow chart to construct a relationship model between process variables, which can have a good correspondence with the process of chemical engineering. Figure 3 The SDG model established for the continuous stirred tank reactor series program can be used to understand the influence relationship between various variables. For example, the change of the inlet temperature of the cooling water of the first tank will affect the outlet temperature of the cooling water of the first tank, and then affect the outlet temperature of the first tank, and then continue to affect the concentration of the first tank, the outlet temperature of the second tank, and the concentration of the second tank. The entire influence path is as follows: Figure 4 In this path, the influence relationship between variables has 19 attributes. The way to set the attributes is to observe whether the relationship between the variables on the path has changed. In the SDG model, it is assumed that the relationship between variables is an attribute. If the relationship between any two variables has changed, the value of the attribute is 1, otherwise it is 0. There are a total of 19 relationships between variables (in Figure 3 and Figure 4 In order to more clearly identify and describe each relationship, this patent adopts digital coding).
[0126] Therefore each path will have 19 attributes Then, by changing different flow rates or temperatures, we observe whether the relationship between any nodes has changed. We divide all the data into 28 paths according to the different impact levels, and treat these 28 paths as 28 types of faults and determine the corresponding attributes. The attributes of all faults are as follows: Figure 5 shown.
[0127] During the training phase, 25 types of fault data are used as known fault data for training, with 400 data in each type, for a total of 10,000 data. In the test phase, the same 400 data in each type are used. After adding the remaining 3 types of data as unknown faults, there are a total of 28 types of fault data and 11,200 data for testing classification accuracy.
[0128] Among these fault categories, different categories of data will be selected as unknown faults and divided into two groups for testing. The fault categories of these two groups are shown in Table 3 (where the values indicate the category of the data).
[0129] Table 3. Faults in each training and test group
[0130]
[0131] Step 1: Establish the feature space of known faults from the known fault data space
[0132] Use known fault data and attributes to train the encoder model, decoder model, and generative model, train a model that can generate known fault data, and classify it in the feature space. The result of this stage of training is that the known fault data generated by the generative model is the same as the real known fault data. The results show that the model is well trained in each space, and the classification accuracy of known fault data and features is above 0.99.
[0133] Step 2: Expand the unknown fault data space using the generative model and encoder reconstruction model
[0134] At this stage, the generative model and decoder model need to be retrained. The generative model part requires the generative model to generate the same distribution as the features of the known fault data, and at the same time, it needs to generate the features of the unknown fault data, and ensure that the feature spaces of the known fault data and the unknown fault data are different, so as to create the unknown fault feature space. The decoder model part is to make the known fault data reconstructed back to the fault data space the same as the real data, and to separate the known fault data from the unknown fault data. Therefore, a discriminant is added to the fault data space to force the data reconstructed back to the fault data space to be divided into the corresponding attribute space, so as to separate the known fault data from the unknown fault data, and expand the reconstruction space of the generative model for generating unknown fault data.
[0135] Step 3: Retrain the encoder model with the generated unknown fault data and known fault data
[0136] The encoder model is retrained using real known fault data and generated unknown fault data. In step 2, it has been determined that the generated fault data can fit the real data. Therefore, in step 3, it is only necessary to ensure that the encoder model has been trained. At this time, the encoder can realize the classification of unknown faults and known faults.
[0137] The data collected in industry all contain noise. If the noisy data is modeled directly, the model performance may decrease. Therefore, as a probabilistic modeling method, the constrained variational autoencoder model can remove the noise contained in the fault data and extract the true behavior of the program, thereby improving the accuracy of classification. The fault data is processed by the probabilistic model, and the original fault data distribution will be extracted to show the true program behavior.
[0138] Performance evaluation and comparison:
[0139] In zero-shot learning fault diagnosis, both embedded and generative methods determine which category the received fault data belongs to during the test phase. Therefore, classification accuracy is used as a benchmark. Classification accuracy is defined as the number of samples N that are correctly classified. c Divide by the total number of samples N.
[0140] Therefore, the upper limit of the classification accuracy is 100%, and the closer the value is to 1, the better the model performance. To demonstrate the effectiveness of the proposed constrained variational autoencoder model for zero-shot classification, the classification accuracy comparison between this method and the existing method is shown in Table 4. "Unknown" (see the method comparison results in Table 4) is to use only unknown fault data for classification, and "all" is to classify all fault data (known and unknown) together. Note that the unknown fault categories in group H and group G are different, thereby verifying the applicability of the model to different unknown fault categories.
[0141] Since the ratio of known faults to unknown faults is 25:3, assuming that only known fault data can be classified correctly, the classification accuracy is 89.2%, so the accuracy of classifying all fault data should be greater than 89.2%. Naive Bayes classifier and random forest method are embedded methods. The accuracy obtained by the NB method is much lower than 0.892, which may be due to the small amount of data and the model that is sufficient to describe the fault data has not been established. The classification accuracy of the RF method for all fault data is slightly lower than 0.892, and the accuracy of group H and group G is almost the same, which may be due to the limitation of the modeling method, affecting the classification of all fault data. The unknown part is affected by the selected data. The accuracy of each method in group H is very high, but the accuracy of group G has declined to some extent.
[0142] The generative-based method in Table 4 is a method for generating data by zero-shot learning in the past. The constrained variational autoencoder also expands the unknown fault data space based on the generative-based method for comparison. Good accuracy can be obtained by only classifying the unknown part, but when classifying all fault data, the constrained variational autoencoder after the unknown fault data space expansion can separate unknown faults from known fault data, and its accuracy is higher than that of previous methods.
[0143] Table 4 Classification accuracy of each method
[0144]
[0145] The constrained variational autoencoder model also has some restrictions on the generation of unknown fault data. When there is sufficient known fault data, the knowledge of the known fault data can be well transferred to the unknown fault data during the training process. On the contrary, when the information contained in the known fault data is not enough for the model to learn the entire program behavior, the generated unknown fault data will be inaccurate. Using different ratios of known faults and unknown faults for testing, it is found that the classification accuracy increases with the increase in the ratio. When the ratio rises to 3:1, the classification accuracy increases significantly.
[0146] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Any changes, modifications, additions or substitutions made by ordinary technicians in this technical field within the essential scope of the present invention should fall within the protection scope of the present invention.
Claims
1. A physical knowledge-guided generative zero-sample fault diagnosis method, characterized in that: The following steps are involved: Step 1: Establish a feature space of known faults from the known fault data space; The physical knowledge of the process is used to establish the attributes of the process variables. Each process variable has a different number of attributes to represent the occurrence or non-occurrence of a fault. The attributes are combined into a vector to describe the fault data. Then, the attribute space of the fault that has occurred is identified through physical knowledge, that is, the known fault attribute space, denoted as A. S ; Define the known fault data space as D S , known fault data space D S Projected to the known fault feature space Z through the encoder S , and then reconstructed by the decoder; the known fault attribute space A S Mapping to known fault feature space Z by generating models S , and then reconstructed by the decoder to complete the training of the encoder, decoder and generative model; The superscript S represents a known fault, and the decoder reconstructs the simulated known fault data space. ; Step 2: Use the generation model and the decoder reconstruction model to expand the unknown fault data space and generate unknown fault data; Identify the unknown fault attribute space that will occur but has not yet occurred through physical knowledge, denoted as A U ; Using known fault attribute A S and unknown fault attribute space A U The known fault feature space Z is obtained by generating model mapping S and unknown fault feature space Z U , use known fault features and unknown fault features to train the decoder, use the decoder to reconstruct the fault data space, and obtain the simulated fault data space , and in the simulated fault data space Add a discriminator to retrain the decoder to obtain a decoder reconstruction model that contains unknown fault data space; Step 3: Retrain the encoder model with the generated unknown fault data and known fault data; Use the real known fault data and the simulated unknown fault data generated in step 2 to retrain the encoder model according to the method in step 1.
2. A physical knowledge-guided generative zero-sample fault diagnosis method according to claim 1, characterized in that: The specific steps of step 1 are as follows: Step 101: Use the known fault data space D S All known fault data in and known fault attribute space A S All known fault attributes in A conditional variational autoencoder model is established, where the superscript S represents known faults, the subscript N is the number of data of each fault type, and the subscript K is the total number of known fault data types, so there are a total of N×K data; Step 102: The nth known fault data of the kth category Projected to the known fault feature space Z through the encoder S Get the characteristics of the nth known fault of the kth category , the feature of the nth known fault of the kth category obtained by projection Then reconstruct it back to simulate known fault data space through the decoder ; Step 103: The attribute variables of the known faults are mapped one-to-one with the known fault data. Therefore, the known fault attribute space A S Mapping to known fault feature space Z S , and the known fault data space D S Mapping to known fault feature space Z S The same, because the collected known fault data space D S The fault data contains noise, so it is not chosen to directly use the k-th known fault attribute and the nth known fault data of the kth category The relationship is established by using the nth known fault feature of the kth category after feature extraction using the encoder. as the generated object; and the generated features need to use the known fault data space D S The fault data is established to ensure accuracy, so the n-th known fault feature of the k-th class generated by the forced generation model is The nth known fault feature of the kth category obtained by projection with the encoder Therefore, the conditional variational autoencoder is used to constrain the generation model and requires the kth class to have known fault attributes. Can generate the nth known fault data of the kth category The maximum probability of occurrence, its objective function can be expressed as: (1); in, Represents the kth known fault attribute Generate the nth known fault data of the kth category Probability of occurrence.
3. A physical knowledge-guided generative zero-sample fault diagnosis method according to claim 2, characterized in that: When calculating the objective function in step 103, first consider the k-th attribute feature and the situation of generating the n-th data of the k-th class, and finally add all the situations and take the logarithm of equation (1): (2); in, It represents the probability of the nth known fault feature generated by the nth known fault data in the k-type attribute. represents the probability that the k-th known fault attribute simultaneously generates the n-th known fault data and the n-th known fault feature, It represents the probability of the nth known fault feature generated by the nth known fault data and the kth known fault attribute; Since the KL term in the last line of the right side of equation (2) is non-negative, the lower bound of the maximum value of the objective function falls on the first term. , then continue to Expand: (3); in, The probability that the n-th known fault data of the k-th class represents the n-th known fault number feature of the k-th class; represents the probability that the k-th known fault attribute and the n-th known fault feature of the k-th class generate the n-th known fault data of the k-th class; represents the probability that the nth known fault data of the kth type generates the nth known fault feature of the kth category; represents the probability that the k-th known fault attribute generates the n-th known fault feature of the k-th class; The KL term in the last line of the right side of equation (3) is comparing and The distribution similarity of The term is the reconstruction term of the known fault data, corresponding to the decoder from the feature space to the simulation space in step 1. Step 1 is now completed.
4. The method of generating zero-sample fault diagnosis guided by physical knowledge according to claim 3, characterized in that: When judging the category of fault data, the known fault feature space Z generated in step 1 S Add constraints to establish a constrained variational autoencoder, and use a linear discriminator to separate different types of known fault data, while the same type of known fault data is closely connected; It is known that there are K categories of fault data in total, and the objective function of the linear discriminant analysis LDA is: (4); Objective function J LDA is the sum of K linear discriminators, represents the weight vector associated with the kth category, is the variation of data between categories, which is the mean of each category minus the square of the mean of all categories. is the variation of the data within the category, which is the square of the average value of all data in each category minus the average value of all data in that category. The definitions of the two are: (5); in is the average value of the k-th category data, is the average value of all data, is the nth known fault data of the kth category. Each linear discriminator has a parameter to split the data. Finally, the total objective function Loss is the loss L of all categories. b And the objective function J LDA The sum of: (6); in, It represents the probability that the n-th known fault data of the k-th category generates the n-th known fault number feature; represents the probability that the k-th known fault attribute and the n-th known fault feature of the k-th class generate the n-th known fault data of the k-th class; It represents the probability that the n-th known fault data of the k-th category generates the n-th known fault feature of the k-th category; It represents the probability that the k-th known fault attribute generates the n-th known fault feature of the k-th category.
5. The method of generating zero-sample fault diagnosis guided by physical knowledge according to claim 1, characterized in that: Step 2 Specific The process includes: Step 201: First, fix the encoder so that the known fault feature space Z obtained in step 1 S The characteristics remain unchanged; Then, the physical knowledge of the process is used to establish the attributes of the process variables. Each process variable has a different number of attributes to represent the occurrence or non-occurrence of a fault. The attributes are combined into a vector to describe the fault data. Then, the physical knowledge is used to identify the unknown fault attribute space that will occur but has not yet occurred, which is recorded as A. U , the attribute space where no failure occurs is recorded as A Never ; and the feature spaces of known fault data and unknown fault data are different, using the unknown fault attribute space A U Obtain unknown fault feature space Z by generating model mapping U ; in The superscript U represents an unknown fault; Step 202: Using the known fault attribute space A S The generated known fault features and unknown fault attribute space A U The decoder is trained together with the unknown fault features generated; the simulated known fault data space generated by the decoder is and simulate unknown fault data space The storage space is defined as the simulated fault data space , so that the simulated fault data space Simulated known fault data With real known fault data Same; and in the simulated fault data space Add a discriminator to force the simulated fault data space The data are respectively corresponded to the attribute space to which they belong, and the known fault data are simulated separately and simulate unknown fault data , retrain the decoder reconstruction model that includes the unknown fault data space; where the subscript N is the number of data of each fault type; the subscript K is the total number of known fault types, and L is the total number of unknown fault types.
6. A physical knowledge-guided generative zero-sample fault diagnosis method according to claim 5, characterized in that: In step 2, the known fault feature space is expanded by using the unknown fault attribute to obtain the unknown fault feature space, wherein the two are forced to be separated by a linear discriminator during the expansion to generate unknown fault data; In step 201, the attributes of the process variables are established by using the physical knowledge of the process, and the attributes are combined into a vector to describe the fault data; specifically, the values in the attribute vector are composed of 0 and 1, and the value of the attribute is 1, which means that the fault data is affected by a certain fault interval of a certain process variable, and vice versa. In step 201, the encoder model is fixed, so the k-th known fault attribute With the nth known fault data The reconstruction term in the objective function of the maximum probability of occurrence uses the encoder model parameters trained in step 1, which means that the reconstruction space does not change, so the loss function is simplified to: (8); In addition, in the feature space, the known fault attributes The generated features will be different from the unknown fault attributes The generated features are used to train the linear discriminator together, so the number of feature types in the feature space is K+L, where L represents the number of unknown fault categories. Similarly, formula (8) is transformed into the objective function of all data and added to the objective function of the linear discriminator model to become: (9); The generated model is retrained through this objective function, and this model contains known fault feature space and unknown fault feature space; In step 202, the objective function of training the decoder reconstruction model is: (10); in, is the nth simulated fault data of the kth category, represents the probability that the nth fault data of the kth category generates the nth fault feature of the kth category; represents the probability that the nth fault data of the kth category generates the kth category fault attribute; the superscript V includes known faults and unknown faults, that is, , the first term of formula (10) is the reconstruction term of known data, and the second term is the objective function of the discriminator. Through this objective function, the decoder reconstruction model containing the unknown data space is retrained.
7. A physical knowledge-guided generative zero-sample fault diagnosis method according to claim 6, characterized in that: In step 3, the objective function of retraining the encoder model is: (11); In this formula, It consists of simulated unknown fault data and real known fault data; represents the probability that the nth fault feature of the kth category and the kth fault attribute generate the nth fault data of the kth category; It represents the probability that the k-th fault attribute generates the n-th fault feature of the k-th category.
