A nuclear power plant fault diagnosis method based on interpretable deep transfer learning
By integrating the operating condition data of nuclear power plants at different power levels with a method based on interpretable deep transfer learning, a multi-condition fault diagnosis system was constructed, which solved the problems of low fault diagnosis accuracy and insufficient interpretability at different power levels of nuclear power plants, and achieved efficient and reliable fault diagnosis.
Patent Information
- Application Number
- CN202411799329.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-12-09
AI Technical Summary
When nuclear power plants operate at different power levels, differences in the probability distribution of sensor monitoring data lead to low accuracy of fault diagnosis results and insufficient interpretability of existing data-driven methods.
A method based on interpretable deep transfer learning is adopted to integrate the operating condition data of nuclear power plants at different power levels through a multivariate encoding gated recurrent unit model and a hybrid attention mechanism. The adaptive focus loss function and the hybrid loss function are used for training to construct a multi-condition fault diagnosis system.
It improves the fault diagnosis accuracy and model interpretability of nuclear power plants under different operating conditions, enhances the quantification ability of the contribution of input variables, simplifies the model structure, and ensures the accuracy and reliability of diagnostic performance.
Smart Images

Figure CN119668235B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of nuclear power plant safety, and relates to a nuclear power plant fault diagnosis method based on an interpretable deep transfer learning. BACKGROUND
[0002] The progress of science and technology has driven the development of industrial automation, and at the same time, it has also made the system more and more complex, thereby putting forward higher requirements for the safety and reliability of the system. Although the quality, reliability and robustness of the system components can be improved to a certain extent to enhance the safety and reliability of the system, the occurrence of faults is still difficult to completely avoid. Therefore, the fault diagnosis technology has become a key means to ensure the safety and reliability of industrial systems, especially complex nuclear power plant systems. The goal of fault diagnosis technology is to monitor the normal operation of the system and its components, detect the type of fault as soon as possible, determine the location and severity of the fault, and prevent further damage to the safe operation of the nuclear power plant.
[0003] Fault diagnosis methods can generally be divided into three categories: model-based methods, expert system-based methods and data-driven methods. The model-based method requires an accurate mathematical model to be established for the diagnosis object, but for a complex system such as a nuclear power plant, this method is usually difficult to implement. The expert system method is difficult to implement a complete expert rule base due to the difficulty of constructing a knowledge base, numerous rules and the difficulty of exhaustiveness, thereby greatly limiting its practical application. In contrast, the data-driven method trains a diagnostic model by using historical operation data of the diagnosis object. These data can be obtained through increasingly popular digital instruments and control systems, reducing the dependence on artificial assumptions and improving the accuracy and robustness of the model when dealing with a large amount of diversified data. With these advantages, the data-driven method has high flexibility and wide applicability, and has become the mainstream in the field of fault diagnosis in recent years.
[0004] Although intelligent fault diagnosis of nuclear power plants based on data-driven methods has achieved much success, there are still two challenges in expanding the application of fault diagnosis. First, due to the influence of many factors in reality (such as changes in power demand, equipment maintenance and repair, fuel management, etc.), nuclear power plants are usually operated at different power levels. Therefore, for faults occurring at different power levels, it is difficult to achieve accurate fault diagnosis by relying on a single data-driven model. Second, current data-driven methods, especially neural network methods, have made significant progress in diagnostic performance in handling multivariate data, but still have shortcomings in interpretability. Due to the complex and opaque hidden layer structure of neural networks, it is difficult to explicitly identify and quantify the specific contribution of each input variable in the model training process.
[0005] Therefore, how to overcome the problem that the probability distribution of sensor monitoring data of a nuclear power plant at different power levels may be significantly different, resulting in low accuracy of fault diagnosis results when integrating and transmitting operation condition data at each power level into a single model for training and diagnosis, and improve the interpretability of the model, is a technical problem to be solved at present. SUMMARY
[0006] To this end, the present application provides a nuclear power plant fault diagnosis method based on interpretable deep transfer learning, which realizes high accuracy of fault diagnosis results when integrating and transmitting operation condition data at each power level into a single model for training and diagnosis, and improves the interpretability of the model as much as possible.
[0007] To achieve this purpose, the present application provides a nuclear power plant fault diagnosis method based on interpretable deep transfer learning, which comprises the following steps:
[0008] Step S1, obtaining real normal operation data, real fault operation data of a nuclear power plant at multiple power levels, and / or simulated normal operation data and simulated fault operation data at multiple power levels generated by a nuclear power plant simulator, dividing and preprocessing the real normal operation data, the real fault operation data, and / or the simulated normal operation data, the simulated fault operation data according to their corresponding power levels to generate source domain data and target domain data;
[0009] Step S2, using the source domain data and the target domain data to simplify and construct the model structure of a multivariate encoding gating recurrent unit model;
[0010] Step S3, taking the source domain data as the input of the simplified encoding gating recurrent unit model, training it through a self-adaptive focal loss function, and generating a source domain nuclear power plant fault diagnosis model of the source domain;
[0011] Step S4, migrating the source domain nuclear power plant fault diagnosis model to the target domain, and taking the target domain data as its input to train it through a self-adaptive focal mixed maximum mean difference loss function, and generating a target domain nuclear power plant fault diagnosis model;
[0012] Step S5, combining the source domain nuclear power plant fault diagnosis model and the target domain nuclear power plant fault diagnosis model in parallel to form a nuclear power plant multi-condition fault diagnosis system for detecting whether a nuclear power plant at multiple power levels has failed;
[0013] Wherein, the source domain is one or more power levels of a nuclear power plant, and the target domain is one or more power levels of a nuclear power plant not including the source domain.
[0014] Further, in the step S1, the real normal operation data, the real fault operation data and / or the simulated normal operation data, the simulated fault operation data are divided and preprocessed according to the corresponding power levels to generate the source domain data and the target domain data, which includes:
[0015] obtaining the real normal operation data and the real fault operation data of the nuclear power plant under multiple power levels and / or the simulated normal operation data and the simulated fault operation data;
[0016] dividing the real normal operation data and the real fault operation data under the maximum power level in the multiple power levels into the source domain data set, and dividing the real normal operation data and the real fault operation data under the remaining power levels into multiple target domain data sets respectively;
[0017] extracting the maximum value and the minimum value in the source domain data set, and performing normalization operation on the source domain data set and the target domain data set according to the maximum value and the minimum value to generate the source domain data and the target domain data.
[0018] Further, in the step S2, the multi-variable encoding gating recurrent unit model includes an independent variable encoding gating recurrent unit and a hybrid attention mechanism;
[0019] The independent variable encoding gating recurrent unit encodes the hidden state of the source domain data and the target domain data;
[0020] The hybrid attention mechanism is connected to the independent variable encoding gating recurrent unit and is used to integrate the hidden state and output the global variable contribution degree;
[0021] The independent variable encoding gating recurrent unit calculates an optimal contribution threshold according to the global variable contribution degree, and constructs a simplified model structure according to the optimal contribution threshold.
[0022] Further, the step S2 includes the following steps:
[0023] Step S21, after the input source domain data and the target domain data are divided according to the time step, the corresponding weight is multiplied by the matrix to obtain a first output matrix;
[0024] Step S22, the hidden state and the corresponding weight matrix are multiplied by the matrix to obtain a second output matrix;
[0025] Step S23, accumulation of the hidden state is performed through a loop of time steps to generate an overall sequence for representing an overall hidden state;
[0026] Step S24, the hidden state is integrated and feature extracted through the hybrid attention mechanism, and the data of the update gate, reset gate, candidate hidden state and hidden state of the independent variable encoding gated recurrent unit are input to simplify the construction of the model structure.
[0027] Further, the hybrid attention mechanism includes a variable-by-variable time attention sub-mechanism and a feature attention sub-mechanism, and the step S24 includes:
[0028] The overall hidden state is passed through the variable-by-variable time attention sub-mechanism to generate an influence weight of each time step in the overall sequence and a contribution degree of the hidden state of each time step;
[0029] The contribution degree is dynamically adjusted through the feature attention mechanism.
[0030] Further, the dynamic adjustment of the contribution degree through the feature attention mechanism is specifically:
[0031] After the contribution degree is spliced with the hidden state of the current time step, the attention weight of the feature is calculated, the confidence is calculated according to the attention weight, and the confidence is used to adjust the hybrid attention mechanism.
[0032] Further, the global variable contribution degree is quantitatively calculated by the attention weight of a single variable in the hybrid attention layer of the hybrid attention mechanism;
[0033] Features with a contribution degree lower than an initial contribution degree threshold are removed, and the hybrid attention mechanism is trained again using the source domain data to verify whether the diagnostic accuracy of the hybrid attention mechanism is consistent with that before the feature variables are removed. If consistent, the initial contribution degree threshold is increased to train and verify the hybrid attention mechanism again until the diagnostic accuracy is inconsistent with that before the feature variables are removed, and the current initial contribution degree threshold is determined as an optimal contribution degree threshold.
[0034] Alternatively, a genetic algorithm is used, the contribution degree threshold is set as an individual and a chromosome, the diagnostic accuracy is set as fitness, and the optimal contribution degree threshold is obtained.
[0035] Further, the step S3 includes the following steps:
[0036] Step S31, the self-adaptive focal loss function calculates the average accuracy of fault classification for multiple training data belonging to the same batch of samples, and calculates the individual accuracy of fault classification for a single training data of a single sample.
[0037] Step S32, calculating the attention degree of various faults by using the difference between the individual accuracy and the average accuracy;
[0038] Wherein, the fault classification includes difficult-to-classify faults and easy-to-classify faults.
[0039] Further, in the step S4, the adaptive focal point mixed maximum mean difference loss function includes an adaptive focal point loss strategy and a maximum mean difference strategy.
[0040] Further, the nuclear power plant multi-working condition fault diagnosis system includes the source domain nuclear power plant fault diagnosis model, the target domain nuclear power plant fault diagnosis model and a data allocator.
[0041] The data classifier adopts a KNN clustering method for classification, and by calculating the distance between the input data and different power level data sets, the input data is classified into the power level closest to the input data.
[0042] After the input data is preprocessed, the data allocator identifies the power level to which the input data belongs, and inputs the source domain nuclear power plant fault diagnosis model and the target domain nuclear power plant fault diagnosis model of the corresponding power level for fault diagnosis.
[0043] Compared with the prior art, the beneficial effects of the present application are that,
[0044] 1. The present application improves the adaptability and fault diagnosis accuracy of the model under different working conditions through the division and transfer learning of multi-power level data.
[0045] 2. The present application constructs a multivariate interpretable gating recurrent unit model, enhances the quantification ability of the contribution of input variables, and improves the interpretability of the model.
[0046] 3. The present application uses an adaptive focal point loss function and a mixed loss function to optimize the transfer performance of the model between the source domain and the target domain, and improves the effectiveness of fault diagnosis.
[0047] 4. The present application retains key variables through feature screening, simplifies the model structure, and at the same time ensures the accuracy of the diagnosis performance.
[0048] 5. The multi-working condition fault diagnosis system finally constructed by the present application can efficiently diagnose nuclear power plant faults under multiple power levels, and improves the reliability and practicality of the diagnosis results.
[0049] 6. The method designed by the present application is a general multi-working condition fault diagnosis method under different power levels, and is applicable to the fault diagnosis of similar nuclear power plants. BRIEF DESCRIPTION OF DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. In the drawings:
[0051] Figure 1 A schematic flowchart of a nuclear power plant fault diagnosis method based on interpretable deep transfer learning provided by an embodiment of the present invention;
[0052] Figure 2 A model operation logic flow chart of a single sample as an example of a nuclear power plant fault diagnosis method based on interpretable deep transfer learning provided by an embodiment of the present invention;
[0053] Figure 3 A histogram of the global contributions of various variables in the nuclear power plant fault diagnosis method based on interpretable deep transfer learning provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are merely used to explain the present invention and are not intended to limit the present invention.
[0055] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0056] like Figures 1 to 3 As shown, the present invention provides a nuclear power plant fault diagnosis method based on interpretable deep transfer learning, which integrates the operating condition data at various power levels and transmits them into a single model for training and diagnosis. The fault diagnosis results have high accuracy and the interpretability of the model is improved as much as possible.
[0057] like Figures 1 to 3 As shown, this embodiment provides a nuclear power plant fault diagnosis method based on interpretable deep transfer learning, and the nuclear power plant fault diagnosis method includes the following steps:
[0058] Step S1: obtaining real normal operation data, real fault operation data of a nuclear power plant at multiple power levels, and / or simulated normal operation data and simulated fault operation data at multiple power levels generated by a nuclear power plant simulator, and dividing and preprocessing the real normal operation data, the real fault operation data, and / or the simulated normal operation data, and the simulated fault operation data according to their corresponding power levels to generate source domain data and target domain data;
[0059] It should be noted that, since the simulated normal operation data and the simulated fault operation data generated by the nuclear power plant simulator are used to supplement the real normal operation data and the real fault operation data respectively, when the real data is sufficient, the simulated data is not needed, and when the real data is difficult to obtain and has low accuracy, only the simulated data can be used.
[0060] Step S2, model structure simplification and construction of a multivariate encoding gating recurrent unit model using the source domain data and the target domain data;
[0061] Step S3, using the source domain data as the input of the simplified encoding gating recurrent unit model, training it through an adaptive focal loss function, and generating a source domain nuclear power plant fault diagnosis model;
[0062] Step S4, migrating the source domain nuclear power plant fault diagnosis model to the target domain, and training it through an adaptive focal mixed maximum mean difference loss function using the target domain data as its input, to generate a target domain nuclear power plant fault diagnosis model;
[0063] Step S5, combining the source domain nuclear power plant fault diagnosis model and the target domain nuclear power plant fault diagnosis model in parallel to form a nuclear power plant multi-condition fault diagnosis system for detecting whether a nuclear power plant fails at multiple power levels;
[0064] Wherein, the source domain is one or more power levels of the nuclear power plant, and the target domain is one or more power levels of the nuclear power plant that do not include the source domain.
[0065] Further, in the step S1, the real normal operation data, the real fault operation data and / or the simulated normal operation data, the simulated fault operation data are divided and preprocessed according to their corresponding power levels to generate the source domain data and the target domain data, including:
[0066] Obtaining the real normal operation data and the real fault operation data and / or the simulated normal operation data, the simulated fault operation data of the nuclear power plant running at multiple power levels;
[0067] Dividing the real normal operation data, the real fault operation data and / or the simulated normal operation data, the simulated fault operation data under the maximum power level of the multiple power levels into the source domain data set, and dividing the real normal operation data, the real fault operation data and / or the simulated normal operation data, the simulated fault operation data under the remaining power levels into multiple target domain data sets;
[0068] The maximum value and the minimum value in the source domain data set are extracted, and the source domain data set and the target domain data set are normalized based on the maximum value and the minimum value to generate the source domain data and the target domain data.
[0069] In a preferred embodiment, real or simulated data of normal operating conditions and multiple fault conditions of a nuclear power plant at 100% power level, 90% power level, and 80% power level are obtained; the 100% power level is used as the source domain data set, and the remaining power levels are used as target domain data sets; the maximum and minimum values of each variable in the source domain data set are extracted, and the source domain data set and each target domain data set are normalized based on this standard.
[0070] like Figure 1 As shown, step S1 includes the following specific steps:
[0071] S101: Acquire real normal operating data and real fault data of a nuclear power plant at multiple power levels, and / or multi-power level and multi-condition operating data generated by a simulator, divide the source domain data and the target domain data, and perform data preprocessing.
[0072] In the process of model training and verification of the source domain nuclear power plant fault diagnosis model, ideally, actual nuclear power plant operating data should be used. However, due to the extremely low frequency of nuclear power plant emergencies, the relevant data resources are extremely limited, and it is difficult to obtain sufficient actual data to support the effective training and verification of the model. This embodiment is designed to use a computer transient analyzer (PCTRAN) to simulate various operating scenarios and accident conditions of nuclear power plants. PCTRAN is a professional software tool for simulating various operating scenarios and accident conditions of nuclear power plants. It was developed by Micro-Simulation Technology (MST) Inc. and allows real-time simulation of nuclear reactor transients and accidents on personal computers.
[0073] In the embodiment of the present disclosure, PCTRAN was used to simulate the operating data of a nuclear power plant at 100%, 90% and 80% power levels. At each power level, stable operation was first simulated for 60 seconds, followed by the insertion of 16 different faults, and the smooth operation was continued without inserting a fault for 500 seconds. Through this process, a total of 17 sets of operating data under different working conditions were finally obtained at each power level (16 sets of fault working condition data and one set of normal working condition data). The 100% power level data was set as the source domain data, and the 90% and 80% power levels were set as the target domain data, which facilitated the subsequent transfer learning model training.
[0074] The data obtained by PCTRAN contains 81 characteristic variables (such as temperature, pressure, liquid level, flow, control rod position, valve opening, etc.), and the distribution dimensions of each data are not consistent. In order to ensure the comparability of different characteristics in the model training process and avoid unnecessary deviation of the model caused by some characteristics with large value range, it is necessary to normalize the data. The maximum value and the minimum value of each characteristic variable in the 100% power level data are extracted as the x imax and x imin data, and the simulation data under 100%, 90% and 80% power levels are sequentially normalized. The normalization operation is as follows:
[0075]
[0076] In the formula, X i is the output normalized simulation data, X i is the input simulation data, X imin is the minimum value of the characteristic variable and the power level to which the input simulation data belongs, and X imax is the maximum value of the characteristic variable and the power level to which the input simulation data belongs.
[0077] For the subsequent fault diagnosis model, since it is essentially a time series model, and the fault data of the nuclear power plant presents continuous time series characteristics, it contains important time-dependent information such as parameter trend changes, therefore, it is necessary to reasonably segment the data at each power level. Specifically, the original data is segmented with a time window of 5 seconds to generate a series of time series samples, so that the model can better capture the dynamic change characteristics in the data.
[0078] S102: Use the preprocessed data to construct a multivariate interpretable gated recurrent unit model for training and extracting the contribution of each variable. On the premise of not significantly affecting the performance of the model, extract the key variables according to the contribution, and simplify the model structure.
[0079] Further, in the step S2, the multivariate encoding gated recurrent unit model includes an independent variable encoding gated recurrent unit and a mixed attention mechanism;
[0080] The independent variable encoding gated recurrent unit encodes the hidden state of the source domain data and the target domain data;
[0081] The mixed attention mechanism is connected to the independent variable encoding gated recurrent unit and is used to integrate the hidden state and output the global variable contribution;
[0082] The independent variable encoding gated recurrent unit encodes the cycle unit, calculates the optimal contribution threshold according to the global variable contribution degree, and simplifies and constructs the model structure according to the optimal contribution threshold.
[0083] Further, the step S2 comprises the following steps:
[0084] Step S21, the input source domain data and the target domain data are divided according to the time step, and then the first output matrix is obtained by matrix point multiplication with the corresponding weight;
[0085] Step S22, the hidden state and the corresponding weight matrix are calculated by matrix multiplication to obtain the second output matrix;
[0086] Step S23, the accumulation of the hidden state is performed through the cycle of the time step, and the overall sequence for representing the overall hidden state is generated;
[0087] Step S24, the hidden state is integrated and feature extracted through the mixed attention mechanism, and the data of the update gate, the reset gate, the candidate hidden state and the hidden state of the independent variable encoding gated recurrent unit are input to simplify and construct the model structure.
[0088] The multivariate interpretable gated recurrent unit model is a new type of deep learning model with interpretability, which includes two parts: an independent variable encoding gated recurrent unit and a mixed attention mechanism.
[0089] In a preferred embodiment, in step S2, the independent variable encoding gated recurrent unit encodes the hidden state of a single variable by adjusting the operation logic of the basic unit of the gated recurrent unit, thereby facilitating the subsequent quantitative extraction and analysis of the contribution of each input variable; the mixed attention mechanism is connected to the independent variable encoding gated recurrent unit and is used to integrate the hidden states of each input variable, thereby outputting the evaluation results of the input data diagnosis of the model and the global variable contribution degree in the quantitative training process.
[0090] In a preferred embodiment, the independent variable encoding gated recurrent unit comprises an update gate z t , a reset gate r t , a candidate hidden state c t and a hidden state h t ; the independent variable encoding gated recurrent unit redesigns the linear transformation of the input vector x and the hidden state h on the basis of the original gated recurrent unit. The hidden state and the gate matrix in the independent variable encoding gated recurrent unit are denoted by ~ to distinguish from the operation in the gated recurrent unit. First, define the input variable X, where X∈R T×N , T represents the time step, and the input vector x twhere x t ∈R 1×N , N represents the number of variables, and w represents the corresponding weight matrix. The number of neurons in the layer is represented by d t . In the operation process, each variable in x is multiplied element by element (dot product) with each column to obtain the output matrix o x , o x ∈R n×d . For the linear transformation of the hidden state , the definition is , and the corresponding weight matrix is . In this operation, h and h perform standard matrix multiplication to obtain the output matrix o h , o h ∈R n×d . Through the loop accumulation of time steps, the overall hidden state is constructed in a way that retains the independent features of each input variable at all time steps, forming a complete hidden state representation. The overall hidden state can be regarded as a sequence composed of independent hidden states at each time step, and is represented as where The hidden state output by the independent variable encoding gated recurrent unit will be further integrated and feature extracted by the subsequent hybrid attention mechanism. The specific operation process of the independent variable encoding gated recurrent unit is as follows:
[0091]
[0092] In the formula, the definitions of the variables are as described above, the superscript ~ represents the independent variable encoding gated recurrent unit, the update gate of the independent variable encoding gated recurrent unit, the reset gate, the candidate hidden state, the hidden state, where the subscript t represents the t-th time step, the subscript t-1 represents the (t-1)-th time step, and represent the corresponding weight matrix, and · represents dot multiplication along the N axis.
[0093] The output matrix is In the formula, x represents the corresponding input variable, and w represents the weight of the corresponding input variable.
[0094] Further, the hybrid attention mechanism includes a variable-by-variable time attention sub-mechanism and a feature attention sub-mechanism, and the step S24 includes:
[0095] The whole hidden state generates the influence weight of each time step and the contribution degree of the hidden state of each time step in the whole sequence through the variable-by-variable time attention sub-mechanism;
[0096] The contribution degree is dynamically adjusted through the feature attention mechanism.
[0097] Further, the dynamic adjustment of the contribution degree through the feature attention mechanism is specifically:
[0098] The contribution degree is concatenated with the hidden state of the current time step to calculate the attention weight of the feature, the confidence is calculated according to the attention weight, and the confidence is used to adjust the hybrid attention mechanism.
[0099] In a preferred embodiment, the hybrid attention mechanism first applies the variable-by-variable time attention mechanism to the hidden state generated by the independent variable encoding gated recurrent unit, to dynamically allocate the influence weight of different time steps on the whole sequence representation: the variable-by-variable time attention mechanism calculates the relative contribution degree of the hidden state of each time step in the sequence through a weighted summation operation; on the basis of the global feature representation generated by the variable-by-variable time attention mechanism, the model further applies the feature attention mechanism to dynamically adjust the relative contribution degree of each input feature in the sequence: the feature attention mechanism concatenates the time attention output with the hidden state of the current time step through linear transformation, and calculates the attention weight of each feature; the two steps together constitute a probability mixture model, and the probability mixture model is specifically:
[0100]
[0101] Wherein, is the time attention weight, is the feature attention weight, is the confidence output of model diagnosis.
[0102] Further, the global variable contribution degree is quantitatively calculated by the attention weight of a single variable in the hybrid attention layer of the hybrid attention mechanism;
[0103] Features with a contribution degree lower than the initial contribution degree threshold are removed, and the source domain data is used again to train the hybrid attention mechanism, to verify whether the diagnostic accuracy of the hybrid attention mechanism is consistent with that before the feature variable is removed, if consistent, the initial contribution degree threshold is increased to train and verify the hybrid attention mechanism again, until the diagnostic accuracy is inconsistent with that before the feature variable is removed, and the current initial contribution degree threshold is determined as the optimal contribution degree threshold;
[0104] It should be noted that the consistency preferably refers to the difference between the diagnostic accuracy of the trained hybrid attention mechanism and the diagnostic accuracy before feature variable elimination within a set range.
[0105] Alternatively, a genetic algorithm is used to set the contribution threshold as an individual and a chromosome, and set the diagnostic accuracy as the fitness to obtain the optimal contribution threshold.
[0106] In a preferred embodiment, the model extracts the contribution of each feature in the model training by quantifying the contribution of global variables by the attention weight of individual variables in the hybrid attention layer, and the calculation formula of the global variable contribution is I n As follows:
[0107]
[0108] Wherein represents normalization. In the formula, M represents the number of samples of the training set, and T is the training times.
[0109] After obtaining the global variable contribution, a lower contribution threshold can be set to eliminate feature variables below the threshold, and then the source domain data is used for model training again to verify whether the diagnostic accuracy is equivalent to that before feature screening. If the diagnostic accuracy does not decrease, the contribution threshold is appropriately increased for screening and training again until the optimal contribution threshold is found. Alternatively, a genetic algorithm is used to set the contribution threshold as an individual and a chromosome, and set the diagnostic accuracy as the fitness to obtain the optimal contribution threshold.
[0110] Further, the step S3 comprises the following steps:
[0111] Step S31, the self-adaptive focal loss function calculates the average accuracy of fault classification for multiple training data belonging to the same batch of samples, and calculates the individual accuracy of fault classification for single training data of a single sample;
[0112] Step S32, the difference between the individual accuracy and the average accuracy is used to calculate the attention degree of various faults;
[0113] Wherein, the fault classification includes difficult-to-classify faults and easy-to-classify faults.
[0114] In a preferred embodiment, the adaptive focal point loss function in step S3 is improved on the basis of the original focal point loss function. The adaptive focal point loss function divides the fault categories into difficult-to-classify faults and easy-to-classify faults according to the average accuracy of the batch of samples by analyzing the fault classification in the training data. Then, the difference between the accuracy of each fault category and the average accuracy of the batch is used to measure the degree of attention required for each fault in subsequent training:
[0115]
[0116] wherein represents, η c represents the accuracy of the last batch of fault categories c in model training, represents the initial value of the adjustable focal point parameter set.
[0117] Further, in step S4, the adaptive focal point and maximum mean difference hybrid loss function includes adaptive focal point loss strategy and maximum mean difference strategy.
[0118] In a preferred embodiment, the adaptive focal point and maximum mean difference hybrid loss function in step S4 combines adaptive focal point loss and maximum mean difference strategies:
[0119]
[0120] wherein is the target domain classification label, is the target domain predicted output label, X S is the source domain data, X T is the target domain data.
[0121] Further, the nuclear power plant multi-working condition fault diagnosis system includes the source domain nuclear power plant fault diagnosis model, the target domain nuclear power plant fault diagnosis model and the data distributor;
[0122] The data classifier uses KNN clustering method for classification, and classifies the input data into the power level grade closest to it by calculating the distance between the input data and different power level grade data sets;
[0123] After preprocessing, the input data is identified by the data distributor to belong to the power level grade, and the source domain nuclear power plant fault diagnosis model and the target domain nuclear power plant fault diagnosis model of the corresponding power level grade are inputted for fault diagnosis.
[0124] In a preferred embodiment, the nuclear power plant multi-condition fault diagnosis system in step S5 comprises a source domain model, a target domain model and a data allocator; the classifier uses KNN clustering method for classification, and the input data is classified into the power level closest to it by calculating the distance between the input data and different power level data sets, so as to determine the running condition to which it belongs; the input data is identified by the data allocator after pre-processing to determine the running power level to which it belongs, and the corresponding power level model is input for fault diagnosis.
[0125] The multivariate interpretable gated recurrent unit model is constructed and preliminarily trained.
[0126] In the training model parameter setting, the number of input parameters is set to 29, the number of neurons is set to 64, the number of output parameters is set to 17, the batch size is set to 64, the optimizer is set to RMSprop algorithm, the learning rate is uniformly set to 0.001, the number of training iterations is set to 300 times, the loss function is set to adaptive focal loss function, and the model layer weights are randomly initialized. The data screened at 100% level power is used as the input of the model for retraining, and the data is randomly divided into a training set and a test set in a ratio of 7:3 to facilitate the verification of the model performance.
[0127] Taking a single training of a single time series training sample as an example, as shown in Figure 2As shown, the independent variable encoding gated recurrent unit can be approximately regarded as a set of 81 parallel gated recurrent units, each of which undertakes an independent task, i.e., processing the dynamic change of a certain specific input variable among the 81 input variables in the entire time series, and then generating a hidden state unique to the variable. After the 81 gated recurrent units extract the hidden states, they are assembled into an overall hidden state, which should have a dimension shape of 5 time windows, 81 variables, and 64 neurons, ensuring that the feature extraction process of each input variable is independent. In the mixed attention mechanism, the hidden state generated by the independent variable encoding gated recurrent unit is applied to the variable-by-variable time attention sub-mechanism, and the influence weight of each time step on the overall sequence representation is dynamically allocated. Through a weighted summation operation, the time attention sub-mechanism calculates the relative importance of different time steps in the sequence, thereby generating a feature representation of the time series, and the data dimension becomes 81 variables and 64 neurons. The model further applies a feature attention sub-mechanism to dynamically adjust the importance of the input features. Specifically, the output of the time attention is concatenated with the hidden state of the current time step to form a feature state representation. The feature attention sub-mechanism calculates the attention weights of each feature, reflecting the relative contribution of each input feature to the final prediction result. Then, through a linear transformation, the feature weights are weighted and summed to generate the final diagnostic output of the model. The relative contribution of each variable is plotted for all sample data, and the overall evaluation of the global contribution of each variable can be obtained by further quantization.
[0128] Subsequently, an adaptive focal loss function is used to diagnose the difference between the diagnostic categories and the true categories. Before the model reaches the set number of iterations, the random gradient descent algorithm is used to iteratively optimize the weights of each target category in the initial model along the negative gradient direction of the loss function until the model converges.
[0129] The adaptive focal loss function used in this embodiment is represented as follows:
[0130]
[0131] In the formula, the definition of each variable is the definition of a conventional loss function.
[0132] In the disclosed example, the extracted global contribution of each variable is as shown in Figure 3 As shown, it can be seen that most variables have a small contribution. Therefore, a contribution value threshold can be set to screen the variables below the set threshold. Taking 0.01, 0.0125, and 0.015 as examples of the contribution threshold, the variables below these thresholds are screened out, and the features after screening are retrained, and the accuracy performance of the model under different thresholds is verified. The model accuracy verified by the test set after retraining is shown in the following table:
[0133] Contribution threshold Number of screened variables Retraining accuracy 0 81 98.82% 0.01 43 98.94% 0.0125 29 98.75% 0.015 14 86.94%
[0134] Therefore, it can be preliminarily concluded that the 29 feature variables screened by using the contribution threshold of 0.0125 have met the needs of fault diagnosis. Therefore, the data after power level preprocessing is processed again to screen samples containing only the 29 data.
[0135] S103: A simplified multivariate interpretable gated recurrent unit model is constructed to use source domain data as input, and an adaptive focal loss function is used to train the source domain fault diagnosis model.
[0136] The simplified training model parameters are constructed, the number of input parameters is set to 29, the number of neurons is set to 64, the output parameter is set to 17, the batch size is set to 64, the optimizer is selected as RMSprop algorithm, the learning rate is uniformly set to 0.001, the training iteration number is set to 300 times, the loss function is selected as adaptive focal loss function, and the model layer weights are randomly initialized. The data screened at 100% power level is used as the input of the model for retraining, and the data is randomly divided into training set and test set in the ratio of 7 to 3 to facilitate the verification of the model performance.
[0137] The model with the highest accuracy based on the training set during the training process is saved as the fault diagnosis model for 100% power level and the pre-training model for the remaining faults.
[0138] S104: The trained source domain model is migrated to the target domain as a pre-training model, and the target domain data is further trained by using an adaptive focal mixed maximum mean difference loss function.
[0139] Based on the pre-training model obtained in S103, the fault diagnosis models for 90% and 80% power levels are constructed, and the model structure (number of input parameters, number of neurons and number of output parameters) and layer weights are retained.
[0140] RMSprop is used as the optimization algorithm, the learning rate of the independent variable encoding gated recurrent unit layer is set to 0.0001, and the learning rate of the mixed attention mechanism layer is set to 0.001. The reason for such setting is that the independent variable encoding gated recurrent unit is used to extract low-level features of the sequence, and under different power levels, the basic patterns of these low-level features are relatively similar, so only a small learning rate is needed for fine-tuning to retain the existing knowledge of the source domain model. The mixed attention mechanism layer is used to summarize the relationship between the input features and re-evaluate the importance of each feature. A larger learning rate is helpful for the model to adjust the high-level features faster and adapt to the new power level. The loss function uses an adaptive focal maximum mean difference mixed loss function:
[0141]
[0142] in is the target domain classification label, Predict the output label for the target domain, X S is the source domain data, X T For the target domain data, λ is set to λ=2 / (1+e -10p )-1, so that the loss function is L in the early stage of training MMD Dominant in the late training by L AF , where p represents the current number of training runs divided by the total number of training runs. This setting helps the model balance the need to reduce distribution differences and improve classification performance at different stages of training.
[0143] Since the model has already learned a large number of useful features in the source domain, only small-scale fine-tuning is needed to complete the training in the target domain. However, too high an iteration number may cause overfitting. Therefore, the number of iterations is set to 50.
[0144] The data after power screening at 90% and 80% levels were used as the input of the model for transfer learning, and the data were randomly divided into training and test sets in a ratio of 7 to 3 to facilitate verification of model performance.
[0145] The model with the highest accuracy based on the training set during the training process is saved as the diagnosis model for 90% and 80% power level faults.
[0146] S105: The above source domain model and target domain model are combined in parallel to form a final nuclear power plant multi-operating condition fault diagnosis system, and the data to be tested is clustered and input into the fault diagnosis system to obtain the fault diagnosis result.
[0147] The fault diagnosis models for the 100%, 90%, and 80% power levels obtained from training S103 and S104 were connected in parallel to form a multi-condition fault diagnosis system. The performance of the diagnostic system was verified using a test set randomly split between S103 and S104. The KNN clustering classifier was used to identify the power level of the sample data and fed it into the corresponding model for identification and diagnosis.
[0148] This embodiment addresses the problem of fault diagnosis at different power levels in nuclear power plants and discloses a method for nuclear power plant fault diagnosis based on interpretable deep transfer learning. Based on a multivariable interpretable gated recurrent unit model, by introducing an adaptive focal loss function and a maximum mean difference hybrid loss strategy, the method used in this embodiment can not only effectively handle fault diagnosis tasks at different power levels, but also significantly improve the accuracy and interpretability of the model. In addition, by introducing a hybrid attention mechanism, this embodiment enables the model to provide good interpretability while improving the accuracy of fault diagnosis, which helps to deeply understand the impact of each input variable on the model decision under different operating conditions. Visualization and variable importance analysis further verify the effectiveness and feasibility of the model, and provide a new solution for improving the intelligence and reliability of future nuclear power plant fault diagnosis systems.
[0149] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0150] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
Claims
1. A nuclear power plant fault diagnosis method based on interpretable deep transfer learning, characterized in that: include: Step S1: obtaining real normal operation data, real fault operation data of a nuclear power plant at multiple power levels, and / or simulated normal operation data and simulated fault operation data at multiple power levels generated by a nuclear power plant simulator, and dividing and preprocessing the real normal operation data, the real fault operation data, and / or the simulated normal operation data, and the simulated fault operation data according to their corresponding power levels to generate source domain data and target domain data; Step S2: using the source domain data and the target domain data to simplify the model structure of a multivariate encoded gated recurrent unit model; Step S3: using the source domain data as input of the simplified coding gated recurrent unit model, training it through an adaptive focal loss function to generate a source domain nuclear power plant fault diagnosis model; Step S4: Migrating the source domain nuclear power plant fault diagnosis model to the target domain, and using the target domain data as input to train the model through an adaptive focal hybrid maximum mean difference loss function to generate a target domain nuclear power plant fault diagnosis model; Step S5: combining the source domain nuclear power plant fault diagnosis model and the target domain nuclear power plant fault diagnosis model in parallel to form a nuclear power plant multi-operating condition fault diagnosis system for detecting whether a fault occurs in a nuclear power plant at multiple power levels; The source domain is one or more power levels of a nuclear power plant, and the target domain is one or more power levels of a nuclear power plant excluding the source domain; In step S2, the multivariate encoding gated recurrent unit model includes an independent variable encoding gated recurrent unit and a hybrid attention mechanism; The independent variable encoding gated recurrent unit encodes the hidden states of the source domain data and the target domain data; The hybrid attention mechanism is connected to the independent variable encoding gated recurrent unit to integrate the hidden state and output the global variable contribution; The independent variable encoding gated recurrent unit obtains an optimal contribution threshold according to the global variable contribution, and constructs a simplified model structure according to the optimal contribution threshold; The step S2 comprises the following steps: Step S21: Divide the input source domain data and the target domain data according to time steps and perform matrix dot multiplication with the corresponding weights to obtain a first output matrix; Step S22: performing matrix multiplication on the hidden state and the corresponding weight matrix to obtain a second output matrix; Step S23: accumulating the hidden state through a cycle of time steps to generate an overall sequence for representing the overall hidden state; Step S24: The hidden state is integrated and feature extracted through the hybrid attention mechanism, and the update gate, reset gate, candidate hidden state and hidden state data of the independent variable encoding gated recurrent unit are input to simplify the model structure; The hybrid attention mechanism includes a variable-by-variable temporal attention sub-mechanism and a feature attention sub-mechanism, and step S24 includes: The overall hidden state is used to generate the influence weight of each time step in the overall sequence and the contribution of the hidden state of each time step through the variable-by-variable time attention sub-mechanism; Dynamically adjusting the contribution through the feature attention mechanism; The dynamic adjustment of contribution through the feature attention mechanism is as follows: After concatenating the contribution with the hidden state of the current time step, the attention weight of the feature is calculated, the confidence is calculated based on the attention weight, and the confidence is used to adjust the hybrid attention mechanism; The global variable contribution is calculated by quantifying the attention weight of a single variable in the hybrid attention layer of the hybrid attention mechanism; Eliminate feature variables below the initial contribution threshold, re-use the source domain data to train the hybrid attention mechanism, verify whether the diagnostic accuracy of the hybrid attention mechanism is consistent with that before the feature variables are eliminated, and if consistent, increase the initial contribution threshold to train and verify the hybrid attention mechanism again until the diagnostic accuracy is inconsistent with that before the feature variables are eliminated, and determine the current initial contribution threshold as the optimal contribution threshold; Alternatively, a genetic algorithm is used, the contribution threshold is set as the individual and the chromosome, the diagnostic accuracy is set as the fitness, and the optimal contribution threshold is obtained.
2. The nuclear power plant fault diagnosis method based on interpretable deep transfer learning according to claim 1 is characterized in that: In step S1, dividing and preprocessing the real normal operation data, the real fault operation data and / or the simulated normal operation data, the simulated fault operation data according to their corresponding power levels to generate source domain data and target domain data includes: Acquiring the real normal operation data and the real fault operation data and / or the simulated normal operation data and the simulated fault operation data of the nuclear power plant operating at multiple power levels; The real normal operation data, the real fault operation data and / or the simulated normal operation data, and the simulated fault operation data under the maximum power level among the multiple power levels are divided into the source domain data set, and the real normal operation data, the real fault operation data and / or the simulated normal operation data, and the simulated fault operation data under the remaining power levels are divided into multiple target domain data sets respectively; The maximum value and the minimum value in the source domain data set are extracted, and the source domain data set and the target domain data set are normalized based on the maximum value and the minimum value to generate the source domain data and the target domain data.
3. The nuclear power plant fault diagnosis method based on interpretable deep transfer learning according to claim 1 is characterized in that: The step S3 comprises the following steps: Step S31, the adaptive focal loss function calculates the average accuracy of fault classification for multiple training data belonging to the same batch of samples, and calculates the individual accuracy of fault classification for a single training data of a single sample; Step S32: Calculate the degree of concern of various faults using the difference between the individual accuracy and the average accuracy; The fault classification includes difficult-to-classify faults and easy-to-classify faults.
4. The nuclear power plant fault diagnosis method based on interpretable deep transfer learning according to any one of claims 1 to 3, characterized in that: In step S4, the adaptive focus hybrid maximum mean difference loss function includes an adaptive focus loss strategy and a maximum mean difference strategy.
5. The nuclear power plant fault diagnosis method based on interpretable deep transfer learning according to any one of claims 1 to 3, characterized in that: The nuclear power plant multi-operating condition fault diagnosis system includes the source domain nuclear power plant fault diagnosis model, the target domain nuclear power plant fault diagnosis model and a data distributor; The data classifier uses KNN clustering to perform classification, and classifies the input data into the power level level closest to it by calculating the distance between the input data and the data sets of different power levels; After preprocessing, the input data is identified by the data distributor as the power level to which it belongs, and the source domain nuclear power plant fault diagnosis model and the target domain nuclear power plant fault diagnosis model of the corresponding power level are input for fault diagnosis.
Citation Information
Cited By
Nuclear power plant variable power fault diagnosis method and system based on confrontation feature gating
CN122153649A