Data reconstruction method and device for failure sensor in nuclear power system

Through the data reconstruction method combined with Transformer model and genetic algorithm, combined with the nuclear master element analysis method, the problem of low accuracy in sensor data reconstruction is solved, the accuracy and efficiency of nuclear power plant operation monitoring is improved, and the abnormal detection is enhanced ability.

CN119066326APending Publication Date: 2024-12-03CHINA NUCLEAR POWER ENGINEERING CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410841864.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The reconstruction accuracy of failed sensor data in the prior art is low, resulting in errors in the monitoring and control of nuclear power plants' operation, affecting system stability and safety.

Method used

The Transformer model is used to combine the multi-head self-attention mechanism and genetic algorithm for data reconstruction, the abnormal sensor is identified by the kernel main element analysis method, the correlation sensor is screened through Spearman correlation coefficient, and the position encoding is used for sine and cosine functions to capture data sequence information.

Benefits of technology

It improves the accuracy and efficiency of sensor data reconstruction, reduces the complexity of model calculation and training costs, and enhances the accuracy and rapid response capabilities of abnormal detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119066326A_ABST
    Figure CN119066326A_ABST
Patent Text Reader

Abstract

The invention discloses a data reconstruction method and device for a failed sensor in a nuclear power system. The method comprises the following steps: acquiring historical normal operation data of the sensor under steady-state operation of the nuclear power system and historical abnormal operation data of the failed sensor under a fault working condition of the nuclear power system; then calculating data correlation between the historical normal operation data and the historical abnormal operation data, screening associated sensors of the failed sensors according to the data correlation, and obtaining reconstructed reference sensor data of the associated sensors; preprocessing the reconstructed reference sensor data; the preprocessed reconstructed reference sensor data is input into a Transform reconstruction model, and the Transform reconstruction model is trained; acquiring operation data corresponding to a current failure sensor in the nuclear power system; and finally, the trained Transform reconstruction model is utilized to reconstruct the operation data. Through the method and the device, the problem that the data reconstruction accuracy of the failed sensor is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sensor information reconstruction, and in particular to a data reconstruction method and device for a failed sensor in a nuclear power system. Background Art

[0002] During the operation of nuclear power plants, when the operating parameters that characterize the systems and equipment are abnormal, it may be caused by system and equipment failures or sensor failures. Sensor measurement data is the basis for system and equipment status monitoring, and the validity and accuracy of its measurement values ​​must be guaranteed first. Nuclear power plant sensors are used under high temperature, high pressure, high humidity, high corrosion or high radioactivity conditions. As the operation time of nuclear power plants increases, sensors may age or fail to varying degrees, resulting in sensor data drift, reduced accuracy or even complete failure.

[0003] Statistics from the World Association of Nuclear Operators (WANO) show that about 10% of all operating events in nuclear power plants are directly related to sensor anomalies. Many related studies have been conducted at home and abroad on the detection and reconstruction of sensor failures, such as Olssn et al. using interpolation methods to reconstruct erroneous data in sensors; Ustoorikar and Deo et al. using genetic programming to fill in erroneous data through spatial correlation; Kullaa using covariance in sensor measurements and minimum mean square error technology to reconstruct sensor data; Chosun University proposed a fuzzy support vector regression data model (FSVR) for the reconstruction of the feedwater flow rate of steam generators in nuclear power plants; the Indian Institute of Science proposed a sensor reconstruction technology based on Kalman filtering, which can be used for steady-state and transient conditions of linear systems; the Pacific Northwest National Laboratory of the United States proposed a sensor reconstruction technology based on process models for the reconstruction of energy-related systems in nuclear power plants.

[0004] The existing patent CN116610973A discloses a sensor fault monitoring and failure information reconstruction method and system. The method first detects and identifies nuclear power plant sensor faults based on the robustness-improved principal component analysis method; then reconstructs the failure information of nuclear power plant sensors based on the maximum mutual information coefficient, convolutional autoencoder, long short-term memory network and self-attention mechanism; and finally completes the verification and testing of the model based on the automatic optimization of hyperparameters of the improved particle swarm optimization algorithm. In this scheme, the failure information of nuclear power plant sensors is reconstructed by combining long short-term memory network and self-attention mechanism, which may increase the computational complexity and training cost of the model. At the same time, the use of this hybrid model may reduce the accuracy of the reconstructed data.

[0005] The existing patent CN116429056A discloses an unsupervised residual network sensor data reconstruction method based on spatial correlation, which includes the following steps: first, collect the actual data measured by the angular position sensor and store it in the server; then, based on the expected measurement output data of the angular position sensor system and the actual collected data, obtain the measurement data residual and confirm the failed angular position sensor; based on the mutual information entropy theory and the measurement data residual, obtain the correlation between each angular position sensor and the failed angular position sensor; select a number of angular position sensors with the highest correlation with the failed angular position sensor; input the selected angular position sensor measurement data into the residual network for iteration, and if the residual network output data is less than the set threshold, obtain the optimized residual network output data; based on the optimized residual network output data, reconstruct the measurement data of the failed angular position sensor. When the scheme reconstructs sensor data through an unsupervised residual network, it has poor ability to capture complex patterns and relationships, and the accuracy of the reconstructed data is low.

[0006] In summary, the above two existing patents do not solve the problem of low accuracy of the reconstructed value when reconstructing the data of the failed sensor. Summary of the invention

[0007] Based on the above technical problems, the present invention proposes a method and device for reconstructing data of a failed sensor in a nuclear power system, so as to solve the problem of low accuracy in reconstructing data of a failed sensor in the prior art.

[0008] To achieve the above objective, the present invention proposes a data reconstruction method for a failed sensor in a nuclear power system.

[0009] A method for reconstructing data of a failed sensor in a nuclear power system, comprising:

[0010] Obtain the historical normal operation data of sensors under steady-state operation of the nuclear power system and the historical abnormal operation data of failed sensors under fault conditions of the nuclear power system;

[0011] Calculate the data correlation between historical normal operation data and historical abnormal operation data, select the associated sensors of the failed sensor according to the data correlation, and obtain the reconstructed reference sensor data of the associated sensors;

[0012] Preprocessing the reconstructed reference sensor data;

[0013] The preprocessed reconstructed reference sensor data is input into the Transformer reconstruction model to train the Transformer reconstruction model;

[0014] Obtaining the operating data corresponding to the currently failed sensor in the nuclear power system;

[0015] Use the trained Transformer reconstruction model to reconstruct the running data.

[0016] Furthermore, the data correlation between the historical normal operation data and the historical abnormal operation data is calculated, and the associated sensors of the failed sensor are screened according to the data correlation, including:

[0017] The Spearman method is used to calculate the correlation coefficient between the historical normal operation data and the historical abnormal operation data. The Spearman method is expressed by formula 1: Among them, R i represents the rank of the historical normal operation data X and the historical abnormal operation data Y to be analyzed after sorting, and n is the number of operation data;

[0018] comparing the correlation coefficient with a preset correlation coefficient;

[0019] It is determined that the sensor whose correlation coefficient is greater than the preset correlation coefficient is the associated sensor.

[0020] Furthermore, the reconstructed reference sensor data is preprocessed, including:

[0021] The reconstructed reference sensor data is standardized and the data value is projected between [0, 1]. The standardization method is expressed by Formula 2: * =(x-min) / (max-min), where max is the maximum value in the reconstructed reference sensor data, and min is the minimum value in the reconstructed reference sensor data.

[0022] Furthermore, preprocessing the reconstructed reference sensor data also includes:

[0023] The reconstructed reference sensor data after the standardization is position-encoded using the sine function and the cosine function to obtain the reconstructed reference sensor data with position information. The frequencies of the sine function and the cosine function are different.

[0024] The sine function is

[0025] The cosine function is

[0026] Where t represents the time step, d model Indicates the total number of dimensions of the input feature, i indicates the dimension number of the input feature, and the value range of i is [0, d model / 2].

[0027] Furthermore, the submodule of the Transformer reconstruction model includes a multi-head self-attention mechanism layer and a fully connected layer. The preprocessed reconstructed reference sensor data is input into the Transformer reconstruction model, and the Transformer reconstruction model is trained, including:

[0028] The preprocessed reconstructed reference sensor data matrix is ​​mapped to the query matrix Q, key matrix K and value matrix V through linear transformation.

[0029] Q=Linear(X)=XW Q

[0030] K=Linear(X)=XW K

[0031] V=Linear(X)=XW ν

[0032] Among them, W Q , W K , W ν are all linear transformation weight matrices, X is the reconstructed reference sensor data matrix;

[0033] The multi-head self-attention mechanism of the Transformer reconstruction model is used to determine the output head corresponding to the query matrix Q, key matrix K and value matrix V i , the formula corresponding to the multi-head self-attention mechanism is,

[0034] Formula 3:

[0035] Formula 4:

[0036] in, are the space vector matrices Q, K, V, the linear transformation weight matrix of the i-th head, d k is the dimension of each row of the spatial vector matrix Q, K, V, SelfAttention(Q,K,V) is the self-attention mechanism function, and softmax is the normalization function;

[0037] For output head i Splicing is performed to form the output of the multi-head self-attention mechanism layer. The splicing method is expressed by Formula 5:

[0038] MultiHead(Q,K,V)=Concat(head1,…,head h )W 0 , where Concat is the concatenation

[0039] Connection function, W 0is the linear transformation weight matrix corresponding to the concatenation of the multi-head self-attention matrix, and MultiHead(Q,K,V) represents the output of the multi-head self-attention mechanism layer;

[0040] The new output is obtained by adding the output of the multi-head self-attention mechanism layer and the preprocessed reconstructed reference sensor data, and the new output is layer normalized;

[0041] The new output after layer normalization is input to the fully connected layer, processed by the activation function of the fully connected layer, and the reconstructed result is output;

[0042] Based on the reconstruction results and the reconstructed reference sensor data, the training error is calculated using the standard root mean square error loss function;

[0043] The Transformer reconstruction model is iteratively trained based on the training error.

[0044] Furthermore, the new output is subjected to layer normalization, including:

[0045] The new output is layer normalized using Formula 6. Formula 6:

[0046]

[0047] Among them, x ij is the value of the i-th row and j-th column of the new output matrix, μ j is the mean of the jth column of the new output matrix, is the variance of the jth column of the new output matrix, ε is a constant, and LayerNorm(x) is the layer normalization function.

[0048] Furthermore, it includes: performing a Dropout random inactivation operation between the multi-head self-attention mechanism layer and the fully connected layer.

[0049] Furthermore, training the Transformer reconstruction model also includes:

[0050] Genetic algorithm is used to iteratively optimize the parameters in the Transformer reconstruction model to determine the optimal parameter combination.

[0051] Furthermore, the genetic algorithm is used to iteratively optimize the parameters in the Transformer reconstruction model to determine the optimal parameter combination, including:

[0052] The parameter combination in the Transformer reconstruction model is used as the population and the population is randomly initialized;

[0053] Use genetic algorithm to binary encode the value of each individual in the population;

[0054] The fitness of each individual is calculated by the fitness function, which is: Among them, d i is the expected output of the ith individual, v i is the network output of the i-th individual;

[0055] Based on fitness, individuals are selected from the population, and crossover and mutation operations are performed on the selected individuals;

[0056] The fitness calculation, individual selection, crossover and mutation operations are performed cyclically until the preset number of iterations is reached and the optimal parameter combination is output.

[0057] Furthermore, based on the fitness, individuals are selected from the population, and crossover and mutation operations are performed on the selected individuals, including:

[0058] The roulette wheel method is used to select individuals from the population, and the sum of the probabilities of all individuals being selected is 1;

[0059] According to the preset crossover probability, a multi-point crossover method is used to perform a crossover operation on two individuals among the selected individuals;

[0060] According to the preset mutation probability, the single-point mutation method is used to perform mutation operations on the selected individuals or individuals after the crossover operation.

[0061] Furthermore, before obtaining the operation data corresponding to the currently failed sensor in the nuclear power system, the method further includes:

[0062] The operating data of each sensor in the nuclear power system is obtained, and the operating data is analyzed using the nuclear principal component analysis method to identify the failed sensors.

[0063] Furthermore, the operating data of each sensor in the current nuclear power system is obtained, and the operating data is analyzed using the nuclear principal component analysis method to determine the failed sensor, including:

[0064] Based on historical normal operation data, the kernel principal component analysis method is used to determine the principal component space statistic threshold and the residual space statistic threshold;

[0065] Based on the operating data of each sensor in the nuclear power system, the kernel principal component analysis method is used to determine the principal component space projection statistics and the residual space projection statistics;

[0066] Determine whether the principal component space projection statistic is greater than the principal component space statistic threshold, and determine whether the residual space projection statistic is greater than the residual space statistic threshold;

[0067] When the principal component space projection statistic is greater than the corresponding principal component space statistic threshold, and / or the residual space projection statistic is greater than the residual space statistic threshold, it is determined that the nuclear power system is operating abnormally;

[0068] The contribution rate of each sensor is determined using kernel principal component analysis;

[0069] If the contribution rate of a certain sensor exceeds a preset contribution rate, the sensor is determined to be a failed sensor.

[0070] Furthermore, based on the historical normal operation data, the kernel principal component analysis method is used to determine the principal component space statistic threshold and the residual space statistic threshold, including:

[0071] The historical normal operation data is standardized by formula 7, which is: * =(x-mean) / std, where mean is the mean of each column of data and std is the standard deviation of the data;

[0072] Based on the standardized data, the Gaussian radial basis kernel function is used to obtain the kernel matrix. The Gaussian radial basis kernel function is: Where ∥xy∥ is the Euclidean distance, σ is the variance, and k(x,y) is the output of the kernel function;

[0073] The kernel matrix is ​​centralized by formula eight, which is: Where K is the kernel matrix, S n is an n×n matrix, all elements of which are 1 / n;

[0074] The eigenvalues ​​and eigenvectors of the centralized kernel matrix are solved using eigendecomposition;

[0075] Based on the eigenvalue, the number of principal components is determined according to the cumulative contribution rate of principal component variance CPV. The calculation method of the cumulative contribution rate of principal component variance CPV corresponds to Formula 9. Formula 9: Among them, k is the number of principal components, λ i and λ j are the i-th and j-th eigenvalues, PV represents the percentage of information contained in the i-th principal component to the total information of the original data; CPV represents the total percentage of original information contained in the first k principal components;

[0076] The eigenvector is divided based on the number of principal components, and the principal component space projection matrix and the residual space projection matrix are constructed according to the divided eigenvectors;

[0077] According to the principal component space projection matrix and the residual space projection matrix, the principal component space projection statistic threshold and the residual space projection statistic threshold are determined by formula 10 and formula 11 respectively. Formula 10: in, is the threshold of the principal component space projection statistic, α is the confidence level, and F α (k,nk) is a distribution with k and nk degrees of freedom;

[0078] Formula 11, Among them, Q α is the residual space projection statistic threshold, c α is the confidence interval of the standard normal distribution (1-α).

[0079] Furthermore, based on the operating data of each sensor in the nuclear power system, the kernel principal component analysis method is used to determine the principal component space projection statistics and the residual space projection statistics, including:

[0080] The principal component space projection statistic is determined by formula 12. Formula 12: Among them, T 2 is the principal component space projection statistic, Λ k is diag(λ1,λ2,…,λ n ), is the principal element space composed of the divided eigenvectors, for The transpose of x T is the transpose of x, where x is the vector of sensor operation data;

[0081] The residual space projection statistic is determined by formula 13. Formula 13: in, is the projection of the vector composed of sensor operation data in the residual space, I is the unit matrix, is the principal space projection matrix.

[0082] Furthermore, the kernel principal component analysis method is used to determine the contribution rate of each sensor, including:

[0083] The sensor T is determined by formula 14 2 The contribution rate of the statistic, formula 14, in, is the sensor pair T 2 The contribution rate of the statistic, t is the score vector, that is, P j,i is the eigenvector P of the covariance matrix j The i-th element of i =[0,…,0,x i ,0,…,0] T ;

[0084] The contribution rate of the sensor to the Q statistic is determined by formula 15. Formula 15: Among them, Q i is the contribution rate of the sensor to the Q statistic.

[0085] To achieve the above objective, the present invention proposes a data reconstruction device for a failed sensor in a nuclear power system.

[0086] A data reconstruction device for a failed sensor in a nuclear power system, comprising:

[0087] The first acquisition module is used to acquire the historical normal operation data of the sensor under the steady-state operation of the nuclear power system and the historical abnormal operation data of the failed sensor under the fault condition of the nuclear power system;

[0088] A calculation module, used to calculate the data correlation between the historical normal operation data and the historical abnormal operation data, and to select the associated sensors of the failed sensor according to the data correlation, and to obtain the reconstructed reference sensor data of the associated sensors;

[0089] A preprocessing module, used for preprocessing the reconstructed reference sensor data;

[0090] A training module, used for inputting the preprocessed reconstructed reference sensor data into the Transformer reconstruction model to train the Transformer reconstruction model;

[0091] The second acquisition module is used to acquire the operation data corresponding to the currently failed sensor in the nuclear power system;

[0092] The reconstruction module is used to reconstruct the running data using the trained Transformer reconstruction model.

[0093] Furthermore, the computing module is used to:

[0094] The Spearman method is used to calculate the correlation coefficient between the historical normal operation data and the historical abnormal operation data. The Spearman method is expressed by formula 1: Among them, R i represents the rank of the historical normal operation data X and the historical abnormal operation data Y to be analyzed after sorting, and n is the number of operation data;

[0095] comparing the correlation coefficient with a preset correlation coefficient;

[0096] It is determined that the sensor whose correlation coefficient is greater than the preset correlation coefficient is the associated sensor.

[0097] Furthermore, the preprocessing module is used to:

[0098] The reconstructed reference sensor data is standardized and the data value is projected between [0, 1]. The standardization method is expressed by Formula 2: * =(x-min) / (max-min), where max is the maximum value in the reconstructed reference sensor data, and min is the minimum value in the reconstructed reference sensor data.

[0099] Furthermore, the preprocessing module is also used for:

[0100] The reconstructed reference sensor data after the standardization is position-encoded using the sine function and the cosine function to obtain the reconstructed reference sensor data with position information. The frequencies of the sine function and the cosine function are different.

[0101] The sine function is

[0102] The cosine function is

[0103] Where t represents the time step, d model Indicates the total number of dimensions of the input feature, i indicates the dimension number of the input feature, and the value range of i is [0, d model / 2].

[0104] Furthermore, the submodules of the Transformer reconstruction model include a multi-head self-attention mechanism layer and a fully connected layer, a training module, which is used to:

[0105] The preprocessed reconstructed reference sensor data matrix is ​​mapped to the query matrix Q, key matrix K and value matrix V through linear transformation.

[0106] Q=Linear(X)=XW Q

[0107] K=Linear(X)=XW K

[0108] V=Linear(X)=XW ν

[0109] Among them, W Q , W K , W ν are all linear transformation weight matrices, X is the reconstructed reference sensor data matrix;

[0110] The multi-head self-attention mechanism of the Transformer reconstruction model is used to determine the output head corresponding to the query matrix Q, key matrix K and value matrix V i , the formula corresponding to the multi-head self-attention mechanism is,

[0111] Formula 3:

[0112] Formula 4:

[0113] in, are the space vector matrices Q, K, V, the linear transformation weight matrix of the i-th head, d k is the dimension of each row of the spatial vector matrix Q, K, V, SelfAttention(Q,K,V) is the self-attention mechanism function, and softmax is the normalization function;

[0114] For output head i Splicing is performed to form the output of the multi-head self-attention mechanism layer. The splicing method is expressed by Formula 5:

[0115] MultiHead(Q,K,V)=Concat(head1,…,head h )W 0 , where Concat is the concatenation

[0116] Connection function, W 0 is the linear transformation weight matrix corresponding to the concatenation of the multi-head self-attention matrix, and MultiHead(Q,K,V) represents the output of the multi-head self-attention mechanism layer;

[0117] The new output is obtained by adding the output of the multi-head self-attention mechanism layer and the preprocessed reconstructed reference sensor data, and the new output is layer normalized;

[0118] The new output after layer normalization is input to the fully connected layer, processed by the activation function of the fully connected layer, and the reconstructed result is output;

[0119] Based on the reconstruction results and the reconstructed reference sensor data, the training error is calculated using the standard root mean square error loss function;

[0120] The Transformer reconstruction model is iteratively trained based on the training error.

[0121] Furthermore, the new output is subjected to layer normalization, including:

[0122] The new output is layer normalized using Formula 6. Formula 6:

[0123]

[0124] Among them, x ij is the value of the i-th row and j-th column of the new output matrix, μ j is the mean of the jth column of the new output matrix, is the variance of the jth column of the new output matrix, ε is a constant, and LayerNorm(x) is the layer normalization function.

[0125] Furthermore, it includes: performing a Dropout random inactivation operation between the multi-head self-attention mechanism layer and the fully connected layer.

[0126] Furthermore, the training module is also used to:

[0127] Genetic algorithm is used to iteratively optimize the parameters in the Transformer reconstruction model to determine the optimal parameter combination.

[0128] Furthermore, the genetic algorithm is used to iteratively optimize the parameters in the Transformer reconstruction model to determine the optimal parameter combination, including:

[0129] The parameter combination in the Transformer reconstruction model is used as the population and the population is randomly initialized;

[0130] Use genetic algorithm to binary encode the value of each individual in the population;

[0131] The fitness of each individual is calculated by the fitness function, which is: Among them, d i is the expected output of the ith individual, v i is the network output of the i-th individual;

[0132] Based on fitness, individuals are selected from the population, and crossover and mutation operations are performed on the selected individuals;

[0133] The fitness calculation, individual selection, crossover and mutation operations are performed cyclically until the preset number of iterations is reached and the optimal parameter combination is output.

[0134] Furthermore, based on the fitness, individuals are selected from the population, and crossover and mutation operations are performed on the selected individuals, including:

[0135] The roulette wheel method is used to select individuals from the population, and the sum of the probabilities of all individuals being selected is 1;

[0136] According to the preset crossover probability, a multi-point crossover method is used to perform a crossover operation on two individuals among the selected individuals;

[0137] According to the preset mutation probability, the single-point mutation method is used to perform mutation operations on the selected individuals or individuals after the crossover operation.

[0138] Furthermore, before obtaining the operating data corresponding to the currently failed sensor in the nuclear power system, a third obtaining module is also included, which is used to:

[0139] The operating data of each sensor in the nuclear power system is obtained, and the operating data is analyzed using the nuclear principal component analysis method to identify the failed sensors.

[0140] Furthermore, the third acquisition module is used to:

[0141] Based on historical normal operation data, the kernel principal component analysis method is used to determine the principal component space statistic threshold and the residual space statistic threshold;

[0142] Based on the operating data of each sensor in the nuclear power system, the kernel principal component analysis method is used to determine the principal component space projection statistics and the residual space projection statistics;

[0143] Determine whether the principal component space projection statistic is greater than the principal component space statistic threshold, and determine whether the residual space projection statistic is greater than the residual space statistic threshold;

[0144] When the principal component space projection statistic is greater than the corresponding principal component space statistic threshold, and / or the residual space projection statistic is greater than the residual space statistic threshold, it is determined that the nuclear power system is operating abnormally;

[0145] The contribution rate of each sensor is determined using kernel principal component analysis;

[0146] If the contribution rate of a certain sensor exceeds a preset contribution rate, the sensor is determined to be a failed sensor.

[0147] Furthermore, based on the historical normal operation data, the kernel principal component analysis method is used to determine the principal component space statistic threshold and the residual space statistic threshold, including:

[0148] The historical normal operation data is standardized by formula 7, which is: * =(x-mean) / std, where mean is the mean of each column of data and std is the standard deviation of the data;

[0149] Based on the standardized data, the Gaussian radial basis kernel function is used to obtain the kernel matrix. The Gaussian radial basis kernel function is: Where ∥xy∥ is the Euclidean distance, σ is the variance, and k(x,y) is the output of the kernel function;

[0150] The kernel matrix is ​​centralized by formula eight, which is: Where K is the kernel matrix, S n is an n×n matrix, all elements of which are 1 / n;

[0151] The eigenvalues ​​and eigenvectors of the centralized kernel matrix are solved using eigendecomposition;

[0152] Based on the eigenvalue, the number of principal components is determined according to the cumulative contribution rate of principal component variance CPV. The calculation method of the cumulative contribution rate of principal component variance CPV corresponds to Formula 9. Formula 9: Among them, k is the number of principal components, λ i and λ j are the i-th and j-th eigenvalues, PV represents the percentage of information contained in the i-th principal component to the total information of the original data; CPV represents the total percentage of original information contained in the first k principal components;

[0153] The eigenvector is divided based on the number of principal components, and the principal component space projection matrix and the residual space projection matrix are constructed according to the divided eigenvectors;

[0154] According to the principal component space projection matrix and the residual space projection matrix, the principal component space projection statistic threshold and the residual space projection statistic threshold are determined by formula 10 and formula 11 respectively. Formula 10: in, is the threshold of the principal component space projection statistic, α is the confidence level, and F α (k,nk) is a distribution with k and nk degrees of freedom;

[0155] Formula 11, Among them, Q α is the residual space projection statistic threshold, c α is the confidence interval of the standard normal distribution (1-α).

[0156] Furthermore, based on the operating data of each sensor in the nuclear power system, the kernel principal component analysis method is used to determine the principal component space projection statistics and the residual space projection statistics, including:

[0157] The principal component space projection statistic is determined by formula 12. Formula 12: Among them, T 2 is the principal component space projection statistic, Λ k is diag(λ1,λ2,…,λ n ), is the principal element space composed of the divided eigenvectors, for The transpose of x T is the transpose of x, where x is the vector of sensor operation data;

[0158] The residual space projection statistic is determined by formula 13. Formula 13: in, is the projection of the vector composed of sensor operation data in the residual space, I is the unit matrix, is the principal space projection matrix.

[0159] Furthermore, the kernel principal component analysis method is used to determine the contribution rate of each sensor, including:

[0160] The sensor T is determined by formula 14 2 The contribution rate of the statistic, formula 14, in, is the sensor pair T 2 The contribution rate of the statistic, t is the score vector, that is, P j,i is the eigenvector P of the covariance matrix j The i-th element of i =[0,…,0,x i ,0,…,0] T ;

[0161] The contribution rate of the sensor to the Q statistic is determined by formula 15. Formula 15: Among them, Q i is the contribution rate of the sensor to the Q statistic.

[0162] Based on the above technical solution, the present invention has at least the following beneficial effects:

[0163] 1. The present invention selects the Transformer model as the reconstruction model, converts the reconstructed reference sensor data into vector form and inputs it into the reconstruction model, adds position encoding to capture the order information of the sequence elements, and uses the multi-head self-attention mechanism to realize automatic selection and weighting of features, so that the model can pay attention to the information of different parts of the input data, efficiently perform feature extraction, and realize adaptive, accurate and rapid prediction of the failure sensor detection value based on the reconstructed reference sensor operation data, avoiding the interference of abnormal sensor detection values ​​to the control system and operators.

[0164] 2. When training the Transformer reconstruction model, the present invention uses a genetic optimization algorithm to optimize the important parameters involved in the model. This method can reduce the error between the predicted value and the true value of the model under different application conditions, improve the accuracy of the reconstructed data, and solve the problem that manual adjustment of hyperparameters relies on manual experience guidance and is time-consuming.

[0165] 3. The present invention uses the kernel principal component analysis method to establish a nuclear power system abnormality cause identification model, by dividing the principal component space and the residual space to calculate the projection of the operation data vector, and then by calculating T 2and Q statistics to achieve anomaly detection and cause identification. Compared with the traditional neural network method, this method does not need to collect fault data for model training, which reduces the cost of obtaining training data while ensuring classification accuracy; in addition, this method reveals the intrinsic structure and characteristics of the data through the kernel function in the kernel principal component analysis method, improves the accuracy of feature extraction and classification, and does not require explicit complex nonlinear transformation, but directly calculates the inner product in the high-dimensional space, which can reduce the complexity of model calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0166] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:

[0167] Figure 1 This is a flow chart of a method for data reconstruction of a failed sensor in a nuclear power system according to an embodiment of the present invention;

[0168] Figure 2 A detailed flow chart of training a Transformer reconstruction model in one embodiment of the present invention;

[0169] Figure 3 A flowchart for iteratively optimizing the parameters in the Transformer reconstruction model using a genetic algorithm to determine the optimal parameter combination;

[0170] Figure 4 A basic flow chart of reconstructing failed sensor data based on a transformer reconstruction model optimized by a genetic algorithm in one embodiment of the present invention;

[0171] Figure 5 A detailed flow chart of determining a failed sensor in one embodiment of the present invention;

[0172] Figure 6 A flowchart of determining a principal component space statistic threshold and a residual space statistic threshold using a kernel principal component analysis method in one embodiment of the present invention;

[0173] Figure 7 The present invention is a schematic diagram of a data reconstruction device for a failed sensor in a nuclear power system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0174] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0175] The present invention is further described in detail below in conjunction with specific embodiments. These embodiments should not be construed as limiting the scope of protection claimed by the present invention.

[0176] Example

[0177] In order to solve the problem of low accuracy in reconstructing failed sensor data in the prior art, the present invention proposes a method and device for reconstructing data of a failed sensor in a nuclear power system.

[0178] To achieve the above objective, the present invention proposes a data reconstruction method for a failed sensor in a nuclear power system.

[0179] like Figure 1 FIG. 4 shows a flow chart of a method for reconstructing data of a failed sensor in a nuclear power system according to an embodiment of the present invention. Figure 1 The process shown includes the following steps:

[0180] S1, obtaining the historical normal operation data of the sensor under the steady-state operation of the nuclear power system and the historical abnormal operation data of the failed sensor under the fault condition of the nuclear power system.

[0181] The historical normal operation data and the historical abnormal operation data include parameters such as temperature, pressure, flow, etc. The nuclear power system failure conditions include: loss of flow accident conditions of the pump-controlled reactor coolant system, steam generator heat transfer tube rupture accident conditions, charging valve leakage accident conditions, etc.

[0182] S2, calculates the data correlation between the historical normal operation data and the historical abnormal operation data, and selects the associated sensors of the failed sensor according to the data correlation, and obtains the reconstructed reference sensor data of the associated sensors.

[0183] Furthermore, the data correlation between the historical normal operation data and the historical abnormal operation data is calculated, and the associated sensors of the failed sensor are screened according to the data correlation, including the following three steps:

[0184] S201, using the Spearman method to calculate the correlation coefficient between the historical normal operation data and the historical abnormal operation data.

[0185] The Spearman method can avoid interference caused by inconsistent parameter dimensions. Specifically, the Spearman method is expressed by Formula 1: Among them, R i represents the rank of the historical normal operation data X and the historical abnormal operation data Y to be analyzed after sorting, n is the number of operation data, ρ s is the correlation coefficient.

[0186] The correlation coefficient between the historical normal operating data and the historical abnormal operating data under each fault condition can be calculated by the above formula 1. In this embodiment, the average of the correlation coefficients between the historical normal operating data and the historical abnormal operating data under each fault condition is taken as the basis for evaluating the correlation between the sensor corresponding to the historical normal operating data and the fault sensor.

[0187] S202, comparing the correlation coefficient with a preset correlation coefficient.

[0188] S203: Determine that a sensor having a correlation coefficient greater than a preset correlation coefficient is an associated sensor.

[0189] For example, the preset correlation coefficient is set to 0.3, and the sensors with correlation coefficients greater than 0.3 are associated sensors. It can be understood that the corresponding preset correlation coefficients can be set according to different scenarios.

[0190] After the associated sensors are screened out, historical normal operation data corresponding to the associated sensors are obtained as reconstructed reference sensor data.

[0191] S3, preprocessing the reconstructed reference sensor data.

[0192] The preprocessing method includes: normalizing the reconstructed reference sensor data, projecting the data value to [0, 1], and eliminating the influence of the amplitude difference between each feature on the model. Specifically, the normalization method is expressed by Formula 2: * =(x-min) / (max-min), where max is the maximum value in the reconstructed reference sensor data, and min is the minimum value in the reconstructed reference sensor data.

[0193] Furthermore, the preprocessing operation performed on the reconstructed reference sensor data in this embodiment also includes: using sine function and cosine function to positionally encode the reconstructed reference sensor data after the standardization process to obtain reconstructed reference sensor data with position information, so that each position dimension will obtain a combination of values ​​of sin and cos functions with different periods in the position encoding, thereby generating unique position information, and finally enabling the model to learn the dependency between positions and the timing characteristics of the input data. Specifically,

[0194] The sine function is

[0195] The cosine function is

[0196] Where t represents the time step, d model Indicates the total number of dimensions of the input feature, i indicates the dimension number of the input feature, and the value range of i is [0, d model / 2].

[0197] S4, inputting the preprocessed reconstructed reference sensor data into the Transformer reconstruction model to train the Transformer reconstruction model.

[0198] Furthermore, the submodule of the Transformer reconstruction model includes a multi-head self-attention mechanism layer and a fully connected layer. In this embodiment, all the reconstructed reference sensor data are split into multiple batches of training samples for training. Figure 2 A detailed flowchart of training the Transformer reconstruction model in this embodiment is shown in FIG. 1 , and the process includes the following steps:

[0199] S401, mapping the preprocessed reconstructed reference sensor data matrix to the query matrix Q, the key matrix K and the value matrix V through linear transformation.

[0200] Q=Linear(X)=XW Q

[0201] K=Linear(X)=XW K

[0202] V=Linear(X)=XW ν

[0203] Among them, W Q , W K , W ν are all linear transformation weight matrices, and X is the reconstructed reference sensor data matrix. In this embodiment, the query matrix Q, key matrix K and value matrix V are linearly transformed multiple times, and then each performs a self-attention mechanism operation.

[0204] S402, using the multi-head self-attention mechanism of the Transformer reconstruction model to determine the output head corresponding to the query matrix Q, the key matrix K and the value matrix V i .

[0205] The formula corresponding to the multi-head self-attention mechanism is:

[0206] Formula 3:

[0207] Formula 4:

[0208] in, are the space vector matrices Q, K, V, the linear transformation weight matrix of the i-th head, d kis the dimension of each row of the spatial vector matrix Q, K, V, SelfAttention(Q, K, V) is the self-attention mechanism function, and softmax is the normalization function. The softmax normalization function is used to calculate the attention weight.

[0209] Compared with the self-attention mechanism model that only performs once, this model can pay attention to information from different aspects and integrate it, which plays a role in enhancing model performance.

[0210] S403, output head i Concatenate to form the output of the multi-head self-attention mechanism layer.

[0211] The splicing method is expressed by formula 5:

[0212] MultiHead(Q,K,V)=Concat(head1,…,head h )W 0 , where Concat is the concatenation

[0213] Connection function, W 0 It is the linear transformation weight matrix corresponding to the concatenation of the multi-head self-attention matrix, and MultiHead(Q,K,V) represents the output of the multi-head self-attention mechanism layer.

[0214] S404, adding the output of the multi-head self-attention mechanism layer and the preprocessed reconstructed reference sensor data to obtain a new output, and performing layer normalization processing on the new output.

[0215] Residual connection and normalization are used between the multi-head self-attention mechanism layer and the fully connected layer to process the data. The residual connection refers to the new output obtained by adding the output of the multi-head self-attention mechanism layer and the preprocessed reconstructed reference sensor data. The formula corresponding to the residual connection is: X = X input +MultiHead(Q,K,V). Then, the new output X is subjected to layer normalization. Specifically, in this embodiment, the new output is subjected to layer normalization by formula 6. Formula 6: Among them, x ij is the value of the i-th row and j-th column of the new output matrix, μ j is the mean of the jth column of the new output matrix, is the variance of the jth column of the new output matrix, ε is a constant and LayerNorm(x) is the layer normalization function.

[0216] To prevent overfitting of the fully connected layer, a Dropout random inactivation operation is performed between the multi-head self-attention mechanism layer and the fully connected layer to randomly remove some neurons. At the same time, the Dropout ratio is also used as a hyperparameter and optimized using a genetic algorithm to ensure that the model reaches a balance between accuracy and preventing overfitting during the training process.

[0217] S405, input the new output after layer normalization processing to the fully connected layer, and output the reconstruction result after being processed by the activation function of the fully connected layer.

[0218] Specifically, the activation function used by the fully connected layer in this embodiment is the sigmoid function, and the new output is processed by the activation function to output a reconstruction result.

[0219] S406 , calculating the training error using a standard root mean square error loss function based on the reconstruction result and the reconstructed reference sensor data.

[0220] The calculation formula corresponding to the standard root mean square error is: Where n is the number of running data, y i To reconstruct the i-th true value in the reference sensor data, is the i-th reconstruction value in the reconstruction result.

[0221] S407, iteratively training the Transformer reconstruction model according to the training error.

[0222] In this embodiment, the Adam algorithm is also used as an optimizer to adaptively adjust the learning rate and improve the training efficiency. As the number of training rounds increases, the training error gradually decreases, indicating that the reconstruction result of the reconstruction model can continuously approach the true value of the failed sensor.

[0223] Furthermore, there are a large number of parameters in the Transformer model, such as weights, biases, etc. In addition to model parameters, the Transformer architecture configuration is also an optimizable parameter, such as the number of layers in the model, the number of units in each layer, the number of heads in the multi-head self-attention mechanism, etc. If the hyperparameters are adjusted manually, it requires the guidance of manual experience and takes a lot of time. Even so, it is difficult to guarantee whether the parameters debugged manually are the optimal parameters. Based on this, this embodiment also uses a genetic algorithm to iteratively optimize the parameters in the Transformer reconstruction model to determine the optimal parameter combination.

[0224] like Figure 3 As shown, the genetic algorithm is used to iteratively optimize the parameters in the Transformer reconstruction model to determine the optimal parameter combination, including the following steps:

[0225] S4071, taking the parameter combination in the Transformer reconstruction model as the population, and randomly initializing the population.

[0226] The population is represented by the following equation,

[0227]

[0228] Among them, k represents the total number of parameters, m represents the population size, and a i,j The value is 0 or 1, 0 means the gene feature is not selected, and 1 means the gene feature is selected.

[0229] S4072, using a genetic algorithm to binary encode the value of each individual in the population.

[0230] S4073, calculate the fitness of each individual through the fitness function.

[0231] The fitness function is: Among them, d i is the expected output of the ith individual, v i is the network output of the ith individual. Specifically, the smaller the fitness, the smaller the individual network error and the higher the adaptability.

[0232] S4074, based on fitness, select individuals from the population and perform crossover and mutation operations on the selected individuals.

[0233] Furthermore, based on the fitness, individuals are selected from the population, and crossover and mutation operations are performed on the selected individuals, including the following steps:

[0234] 1) The roulette wheel method is used to select individuals from the population, so that the probability of an individual being selected is proportional to its fitness, and the sum of the probabilities of all individuals being selected is 1. The population is updated once in each round of iteration.

[0235] 2) According to the preset crossover probability, a multi-point crossover method is used to perform a crossover operation on two individuals among the selected individuals. The crossover operation can be understood as exchanging part of the information between the two individuals according to the probability. Specifically, a crossover operation is performed on the genes of each individual in each iteration, and a probability between 0 and 1 is randomly generated. If the randomly generated probability is less than the preset crossover probability, gene exchange is performed, otherwise no exchange is performed;

[0236] 3) According to the preset mutation probability, a single-point mutation method is used to perform a single-point mutation operation on the genes of the selected individuals or individuals after the crossover operation. Each round of iteration performs a mutation operation on each individual, and randomly generates a probability between 0 and 1. If the probability is less than the preset mutation rate, the individual is mutated, otherwise no mutation is performed;

[0237] S4075, cyclically executing fitness calculation, individual selection, crossover and mutation operations until the preset number of iterations is reached, and outputting the optimal parameter combination.

[0238] like Figure 4 The figure shows the basic process of reconstructing failed sensor data based on the Transformer reconstruction model optimized by genetic algorithm. In this process, a new population is generated through selection, crossover and mutation operations, and the model parameters are continuously optimized iteratively to obtain the optimal parameter combination. Then, the parameters optimized by genetic algorithm are used to train the Transformer reconstruction model to further optimize the model performance.

[0239] The Transformer reconstruction model includes an encoding layer and a decoding layer. The encoding layer contains two main sublayers: a multi-head self-attention mechanism layer and a feedforward neural network (i.e., a fully connected layer). The input of each encoding layer first passes through a multi-head self-attention mechanism layer, which allows the model to consider all positions in the sequence when encoding, thereby capturing long-distance dependencies. The output of the multi-head self-attention mechanism layer then enters the feedforward neural network. The structure of the decoding layer is similar to that of the encoding layer, but a masked multi-head self-attention mechanism layer is added to prevent information from future positions from flowing into the current position. In addition, each layer of the decoding layer also contains a multi-head self-attention mechanism layer and a feedforward neural network. Furthermore, each sublayer of the decoding layer and the encoding layer contains residual connections and normalization layers to avoid the gradient vanishing problem in deep network training. The output of the encoding layer is used as the input of the decoding layer, and the output of the decoding layer is passed through a linear layer and a softmax function to generate the final prediction.

[0240] S5, obtaining the operating data corresponding to the currently failed sensor in the nuclear power system.

[0241] Furthermore, before obtaining the operating data corresponding to the currently failed sensor in the nuclear power system, the method further includes: obtaining the operating data of each sensor in the nuclear power system, analyzing the operating data using the kernel principal component analysis method, and determining the failed sensor. The kernel principal component analysis method can realize accurate identification of the cause of the fault without relying on extracting the features of the fault data, thereby reducing the difficulty of model construction.

[0242] like Figure 5 A detailed flow chart for determining a failed sensor is shown in FIG. 1 , which includes the following steps:

[0243] S501, based on historical normal operation data, using the kernel principal component analysis method to determine the principal component space statistic threshold and the residual space statistic threshold.

[0244] like Figure 6 The main process of this step is shown in Figure 6As shown, this step mainly includes the following seven sub-steps:

[0245] S5011, standardize the historical normal operation data using Formula 7.

[0246] Formula 7 is, x * =(x-mean) / std, where mean is the mean of each column of data and std is the standard deviation of the data.

[0247] S5012, based on the standardized data, a Gaussian radial basis kernel function is used to obtain a kernel matrix.

[0248] The Gaussian radial basis kernel function is, Where ∥xy∥ is the Euclidean distance, σ is the variance, and k(x,y) is the output of the kernel function. Compared with other kernel functions such as exponential kernel function, polynomial kernel function and perceptron kernel function, the Gaussian radial basis kernel function has better kernel function value variation characteristics and separability, and has the advantages of fewer parameters and high parameter sensitivity.

[0249] S5013, centralize the kernel matrix using Formula 8.

[0250] The formula eight is, Where K is the kernel matrix, S n is an n×n matrix whose elements are all 1 / n.

[0251] S5014, using eigendecomposition to solve the eigenvalues ​​and eigenvectors of the centralized kernel matrix.

[0252] Assume that the sample data matrix after centering is X m*n , m represents the number of samples, n represents the number of sensors to be monitored, and according to statistical principles, the following formula is used to calculate X m*n The covariance matrix of is: Based on the relationship between the covariance matrix and the eigenvalues ​​and eigenvectors: ∑=P×diag(λ1,λ2,…,λ n )×P T Obtain the eigenvalues ​​and eigenvectors of the centralized kernel matrix, where the orthogonal matrix P = [P1, P2, ..., P n ],P1,P2,...,P n is the eigenvector, diag(λ1,λ2,…,λ n ) represents the eigenvalues ​​λ1,λ2,…,λ n For an n-order diagonal matrix of diagonal elements, arrange the eigenvalues ​​from large to small and adjust the corresponding eigenvector sorting.

[0253] S5015, based on the eigenvalue, determine the number of principal components according to the cumulative contribution rate of principal component variance CPV. The calculation method of the cumulative contribution rate of principal component variance CPV corresponds to Formula 9, Formula 9, Among them, k is the number of principal components, λ i and λ j is the i-th and j-th eigenvalues, PV represents the percentage of information contained in the i-th principal component to the total information of the original data, and CPV represents the total percentage of original information contained in the first k principal components.

[0254] S5016, dividing the eigenvector based on the number of principal components, and constructing a principal component space projection matrix and a residual space projection matrix according to the divided eigenvectors.

[0255] Specifically, through the above steps, we can determine the number of principal components to be k, and take the first k eigenvectors to form the matrix P ′ , based on the matrix P ′ and its transposed matrix to construct the principal element space projection matrix and the residual space projection matrix

[0256] S5017, according to the principal component space projection matrix and the residual space projection matrix, determine the principal component space projection statistic threshold and the residual space projection statistic threshold by formula 10 and formula 11 respectively.

[0257] Formula 10, in, is the threshold of the principal component space projection statistic, α is the confidence level, and F α (k,nk) is a distribution with k and nk degrees of freedom.

[0258] Formula 11, Among them, Q α is the residual space projection statistic threshold, c α is the confidence interval of the standard normal distribution (1-α).

[0259] S502, based on the operating data of each sensor in the nuclear power system, using the kernel principal component analysis method to determine the principal component space projection statistics and the residual space projection statistics.

[0260] This example uses Hotelling's T 2 (T 2 ) statistic and the squared prediction error (Q statistic) describe the projection statistics of x in the principal component space and residual space. Specifically, T 2The statistic represents the change of vector x in the principal component space, describes the degree to which x deviates from the PCA model in terms of change trend and change amplitude, and is a measure of the change within the principal component space. The Q statistic describes the square value of the projection of vector x in the residual space, that is, the Euclidean distance from x to the principal component space defined by the model, and quantifies the degree of mismatch between x and the PCA model.

[0261] Specifically, the principal component space projection statistic is determined by formula 12. Formula 12: Among them, T 2 is the principal component space projection statistic, Λ k is diag(λ1,λ2,…,λ n ), is the principal element space composed of the divided eigenvectors, for The transpose of x T is the transpose of x, where x is the vector consisting of sensor operation data.

[0262] The residual space projection statistic is determined by formula 13. Formula 13: in, is the projection of the vector composed of sensor operation data in the residual space, I is the unit matrix, The principal element space projection matrix is ​​the projection matrix of the principal element space. Based on the vector composed of the sensor operation data, the principal element space projection matrix and the residual space projection matrix can be calculated. The specific calculation formula is: It is the projection of the vector composed of sensor running data into the principal element space.

[0263] S503, judging whether the principal component space projection statistic is greater than the principal component space statistic threshold, and judging whether the residual space projection statistic is greater than the residual space statistic threshold.

[0264] S504: When the principal component space projection statistic is greater than the corresponding principal component space statistic threshold, and / or the residual space projection statistic is greater than the residual space statistic threshold, it is determined that the nuclear power system is operating abnormally.

[0265] Specifically, when the principal component space projection statistic is greater than the corresponding principal component space statistic threshold, the nuclear power system operates abnormally, and step S505 is executed to determine the contribution rate of each sensor to the principal component space projection statistic using the kernel principal component analysis method. When the residual space projection statistic is greater than the residual space statistic threshold, the nuclear power system operates abnormally, and step S505 is executed to determine the contribution rate of each sensor to the residual space projection statistic using the kernel principal component analysis method. When the principal component space projection statistic is greater than the corresponding principal component space statistic threshold, and the residual space projection statistic is greater than the residual space statistic threshold, step S505 is executed to determine the contribution rate of each sensor to the principal component space projection statistic and the residual space projection statistic respectively using the kernel principal component analysis method.

[0266] S505, using kernel principal component analysis method to determine the contribution rate of each sensor.

[0267] When it is determined that the nuclear power system is operating abnormally, the kernel principal component analysis method is further used to determine the contribution rate of each sensor and determine the cause of the abnormal system operation.

[0268] Specifically, the sensor response to T is determined by formula 14 2 The contribution rate of the statistic, formula 14, in, is the sensor pair T 2 The contribution rate of the statistic, t is the score vector, that is, P j,i is the eigenvector P of the covariance matrix j The i-th element of i =[0,…,0,x i ,0,…,0] T .

[0269] The contribution rate of the sensor to the Q statistic is determined by formula 15. Formula 15: Among them, Q i is the contribution rate of the sensor to the Q statistic.

[0270] S506: If the contribution rate of a certain sensor exceeds a preset contribution rate, the sensor is determined to be a failed sensor.

[0271] S6, reconstruct the running data using the trained Transformer reconstruction model.

[0272] To achieve the above objective, the present invention proposes a data reconstruction device for a failed sensor in a nuclear power system.

[0273] like Figure 7 FIG. 4 is a schematic diagram of a data reconstruction device for a failed sensor in a nuclear power system according to an embodiment of the present invention. Figure 7As shown, the device includes: a first acquisition module 51, a calculation module 52, a preprocessing module 53, a training module 54, a second acquisition module 55 and a reconstruction module 56.

[0274] The first acquisition module 51 is used to acquire the historical normal operation data of the sensor under the steady-state operation of the nuclear power system and the historical abnormal operation data of the failed sensor under the fault condition of the nuclear power system.

[0275] The calculation module 52 is used to calculate the data correlation between the historical normal operation data and the historical abnormal operation data, and to select the associated sensors of the failed sensor according to the data correlation, and to obtain the reconstructed reference sensor data of the associated sensors.

[0276] Furthermore, the calculation module 52 is used to:

[0277] The Spearman method is used to calculate the correlation coefficient between the historical normal operation data and the historical abnormal operation data. The Spearman method is expressed by formula 1: Among them, R i It represents the rank of the historical normal operation data X and the historical abnormal operation data Y to be analyzed after sorting, and n is the number of operation data.

[0278] Compare the correlation coefficient with the preset correlation coefficient.

[0279] It is determined that the sensor whose correlation coefficient is greater than the preset correlation coefficient is the associated sensor.

[0280] The preprocessing module is used to preprocess the reconstructed reference sensor data.

[0281] Furthermore, the preprocessing module 53 is used to:

[0282] The reconstructed reference sensor data is standardized and the data value is projected between [0, 1]. The standardization method is expressed by Formula 2: * =(x-min) / (max-min), where max is the maximum value in the reconstructed reference sensor data, and min is the minimum value in the reconstructed reference sensor data.

[0283] Furthermore, the preprocessing module 53 is also used for:

[0284] The reconstructed reference sensor data after the standardization is position-encoded using the sine function and the cosine function to obtain the reconstructed reference sensor data with position information. The frequencies of the sine function and the cosine function are different.

[0285] The sine function is

[0286] The cosine function is

[0287] Where t represents the time step, d model Indicates the total number of dimensions of the input feature, i indicates the dimension number of the input feature, and the value range of i is [0, d model / 2].

[0288] The training module 54 is used to input the preprocessed reconstructed reference sensor data into the Transformer reconstruction model to train the Transformer reconstruction model.

[0289] Furthermore, the submodules of the Transformer reconstruction model include a multi-head self-attention mechanism layer and a fully connected layer, training module 54, which are used to:

[0290] The preprocessed reconstructed reference sensor data matrix is ​​mapped to the query matrix Q, key matrix K and value matrix V through linear transformation.

[0291] Q=Linear(X)=XW Q

[0292] K=Linear(X)=XW K

[0293] V=Linear(X)=XW ν

[0294] Among them, W Q , W K , W ν are all linear transformation weight matrices, and X is the reconstructed reference sensor data matrix.

[0295] The multi-head self-attention mechanism of the Transformer reconstruction model is used to determine the output head corresponding to the query matrix Q, key matrix K and value matrix V i , the formula corresponding to the multi-head self-attention mechanism is,

[0296] Formula 3:

[0297] Formula 4:

[0298] in, are the space vector matrices Q, K, V, the linear transformation weight matrix of the i-th head, d k is the dimension of each row of the spatial vector matrix Q, K, V matrix, SelfAttention(Q,K,V) is the self-attention mechanism function, and softmax is the normalization function.

[0299] For output head iSplicing is performed to form the output of the multi-head self-attention mechanism layer. The splicing method is expressed by Formula 5:

[0300] MultiHead(Q,K,V)=Concat(head1,…,head h )W 0 , where Concat is the concatenation

[0301] Connection function, W 0 It is the linear transformation weight matrix corresponding to the concatenation of the multi-head self-attention matrix, and MultiHead(Q,K,V) represents the output of the multi-head self-attention mechanism layer.

[0302] The new output is obtained by adding the output of the multi-head self-attention mechanism layer and the preprocessed reconstructed reference sensor data, and the new output is layer normalized.

[0303] The new output after layer normalization is input to the fully connected layer, processed by the activation function of the fully connected layer, and the reconstructed result is output.

[0304] Based on the reconstruction results and the reconstructed reference sensor data, the training error is calculated using the standard root mean square error loss function.

[0305] The Transformer reconstruction model is iteratively trained based on the training error.

[0306] Furthermore, the new output is subjected to layer normalization, including:

[0307] The new output is layer normalized using Formula 6. Formula 6:

[0308]

[0309] Among them, x ij is the value of the i-th row and j-th column of the new output matrix, μ j is the mean of the jth column of the new output matrix, is the variance of the jth column of the new output matrix, ε is a constant, and LayerNorm(x) is the layer normalization function.

[0310] Furthermore, it includes: performing a Dropout random inactivation operation between the multi-head self-attention mechanism layer and the fully connected layer.

[0311] Furthermore, the training module 54 is also used for:

[0312] Genetic algorithm is used to iteratively optimize the parameters in the Transformer reconstruction model to determine the optimal parameter combination.

[0313] Furthermore, the genetic algorithm is used to iteratively optimize the parameters in the Transformer reconstruction model to determine the optimal parameter combination, including:

[0314] The parameter combination in the Transformer reconstruction model is used as the population and the population is randomly initialized.

[0315] Genetic algorithms are used to binary encode the value of each individual in the population.

[0316] The fitness of each individual is calculated by the fitness function, which is: Among them, d i is the expected output of the ith individual, v i is the network output of the i-th individual.

[0317] Based on fitness, individuals are selected from the population, and crossover and mutation operations are performed on the selected individuals.

[0318] The fitness calculation, individual selection, crossover and mutation operations are performed cyclically until the preset number of iterations is reached and the optimal parameter combination is output.

[0319] Furthermore, based on the fitness, individuals are selected from the population, and crossover and mutation operations are performed on the selected individuals, including:

[0320] The roulette wheel method is used to select individuals from the population, and the sum of the probabilities of all individuals being selected is 1.

[0321] According to the preset crossover probability, the multi-point crossover method is used to perform a crossover operation on two individuals among the selected individuals.

[0322] According to the preset mutation probability, the single-point mutation method is used to perform mutation operations on the selected individuals or individuals after the crossover operation.

[0323] The second acquisition module 55 is used to acquire the operating data corresponding to the currently failed sensor in the nuclear power system.

[0324] Furthermore, before obtaining the operating data corresponding to the currently failed sensor in the nuclear power system, a third obtaining module 57 is also included, which is used to:

[0325] The operating data of each sensor in the nuclear power system is obtained, and the operating data is analyzed using the nuclear principal component analysis method to identify the failed sensors.

[0326] Furthermore, the third acquisition module 57 is used to:

[0327] Based on historical normal operation data, the kernel principal component analysis method is used to determine the principal component space statistic threshold and the residual space statistic threshold.

[0328] Based on the operating data of each sensor in the nuclear power system, the kernel principal component analysis method is used to determine the principal component space projection statistics and the residual space projection statistics.

[0329] It is determined whether the principal component space projection statistic is greater than the principal component space statistic threshold, and it is determined whether the residual space projection statistic is greater than the residual space statistic threshold.

[0330] When the principal component space projection statistic is greater than the corresponding principal component space statistic threshold, and / or the residual space projection statistic is greater than the residual space statistic threshold, it is determined that the nuclear power system is operating abnormally.

[0331] The kernel principal component analysis method is used to determine the contribution rate of each sensor.

[0332] If the contribution rate of a certain sensor exceeds a preset contribution rate, the sensor is determined to be a failed sensor.

[0333] Furthermore, based on the historical normal operation data, the kernel principal component analysis method is used to determine the principal component space statistic threshold and the residual space statistic threshold, including:

[0334] The historical normal operation data is standardized by formula 7, which is: * =(x-mean) / std, where mean is the mean of each column of data and std is the standard deviation of the data.

[0335] Based on the standardized data, the Gaussian radial basis kernel function is used to obtain the kernel matrix. The Gaussian radial basis kernel function is: Where ∥xy∥ is the Euclidean distance, σ is the variance, and k(x,y) is the output of the kernel function.

[0336] The kernel matrix is ​​centralized by formula eight, which is: Where K is the kernel matrix, S n is an n×n matrix whose elements are all 1 / n.

[0337] The eigenvalues ​​and eigenvectors of the centralized kernel matrix are solved using eigendecomposition.

[0338] Based on the eigenvalue, the number of principal components is determined according to the cumulative contribution rate of principal component variance CPV. The calculation method of the cumulative contribution rate of principal component variance CPV corresponds to Formula 9. Formula 9: Among them, k is the number of principal components, λ i and λ jis the i-th and j-th eigenvalues, PV represents the percentage of information contained in the i-th principal component to the total information of the original data, and CPV represents the total percentage of original information contained in the first k principal components.

[0339] The eigenvectors are divided based on the number of principal components, and the principal component space projection matrix and the residual space projection matrix are constructed according to the divided eigenvectors.

[0340] According to the principal component space projection matrix and the residual space projection matrix, the principal component space projection statistic threshold and the residual space projection statistic threshold are determined by Formula 10 and Formula 11 respectively. Formula 10: in, is the threshold of the principal component space projection statistic, α is the confidence level, and F α (k,nk) is a distribution with k and nk degrees of freedom.

[0341] Formula 11, Among them, Q α is the residual space projection statistic threshold, c α is the confidence interval of the standard normal distribution (1-α).

[0342] Furthermore, based on the operating data of each sensor in the nuclear power system, the kernel principal component analysis method is used to determine the principal component space projection statistics and the residual space projection statistics, including:

[0343] The principal component space projection statistic is determined by formula 12. Formula 12: Among them, T 2 is the principal component space projection statistic, Λ k is diag(λ1,λ2,…,λ n ), is the principal element space composed of the divided eigenvectors, for The transpose of x T is the transpose of x, where x is the vector consisting of sensor operation data.

[0344] The residual space projection statistic is determined by formula 13. Formula 13: in, is the projection of the vector composed of sensor operation data in the residual space, I is the unit matrix, is the principal space projection matrix.

[0345] Furthermore, the kernel principal component analysis method is used to determine the contribution rate of each sensor, including:

[0346] The sensor T is determined by formula 14 2The contribution rate of the statistic, formula 14, in, is the sensor pair T 2 The contribution rate of the statistic, t is the score vector, that is, P j,i is the eigenvector P of the covariance matrix j The i-th element of i =[0,…,0,x i ,0,…,0] T .

[0347] The contribution rate of the sensor to the Q statistic is determined by formula 15. Formula 15: Among them, Q i is the contribution rate of the sensor to the Q statistic.

[0348] The reconstruction module 56 is used to reconstruct the running data using the trained Transformer reconstruction model.

[0349] It should be understood that a data reconstruction device for a failed sensor in a nuclear power system is consistent with the description of a corresponding data reconstruction method for a failed sensor in a nuclear power system, so this embodiment will not be repeated.

[0350] In summary, it can be seen from the above description that the above embodiments of the present invention achieve the following technical effects:

[0351] 1. The present invention selects the Transformer model as the reconstruction model, converts the reconstructed reference sensor data into vector form and inputs it into the reconstruction model, adds position encoding to capture the order information of the sequence elements, and uses the multi-head self-attention mechanism to realize automatic selection and weighting of features, so that the model can pay attention to the information of different parts of the input data, efficiently perform feature extraction, and realize adaptive, accurate and rapid prediction of the failure sensor detection value based on the reconstructed reference sensor operation data, avoiding the interference of abnormal sensor detection values ​​to the control system and operators.

[0352] 2. When training the Transformer reconstruction model, the present invention uses a genetic optimization algorithm to optimize the important parameters involved in the model. This method can reduce the error between the predicted value and the true value of the model under different application conditions, improve the accuracy of the reconstructed data, and solve the problem that manual adjustment of hyperparameters relies on manual experience guidance and is time-consuming.

[0353] 3. The present invention uses the kernel principal component analysis method to establish a nuclear power system abnormality cause identification model, by dividing the principal component space and the residual space to calculate the projection of the operation data vector, and then by calculating T 2and Q statistics to achieve anomaly detection and cause identification. Compared with the traditional neural network method, this method does not need to collect fault data for model training, which reduces the cost of obtaining training data while ensuring classification accuracy; in addition, this method reveals the intrinsic structure and characteristics of the data through the kernel function in the kernel principal component analysis method, improves the accuracy of feature extraction and classification, and does not require explicit complex nonlinear transformation, but directly calculates the inner product in the high-dimensional space, which can reduce the complexity of model calculation.

[0354] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0355] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0356] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.

[0357] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0358] It should be noted that, in the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

Claims

1. A method for reconstructing data of a failed sensor in a nuclear power system, characterized in that: include: Obtain the historical normal operation data of sensors under steady-state operation of the nuclear power system and the historical abnormal operation data of failed sensors under fault conditions of the nuclear power system; Calculating data correlation between the historical normal operation data and the historical abnormal operation data, and screening associated sensors of the failed sensor according to the data correlation, and acquiring reconstructed reference sensor data of the associated sensors; Preprocessing the reconstructed reference sensor data; Inputting the preprocessed reconstructed reference sensor data into a Transformer reconstruction model to train the Transformer reconstruction model; Acquire operation data corresponding to a currently failed sensor in the nuclear power system; The operating data is reconstructed using the trained Transformer reconstruction model.

2. The method according to claim 1, characterized in that Calculating the data correlation between the historical normal operation data and the historical abnormal operation data, and selecting the associated sensors of the failed sensor according to the data correlation, including: The Spearman method is used to calculate the correlation coefficient between the historical normal operation data and the historical abnormal operation data. The Spearman method is expressed by Formula 1: Among them, R i represents the rank of the historical normal operation data X and the historical abnormal operation data Y to be analyzed after sorting, and n is the number of operation data; comparing the correlation coefficient with a preset correlation coefficient; The sensor whose correlation coefficient is greater than the preset correlation coefficient is determined as the associated sensor.

3. The method according to claim 1, characterized in that Preprocessing the reconstructed reference sensor data includes: The reconstructed reference sensor data is normalized to project the data value between [0, 1]. The normalization method is expressed by Formula 2: * =(x- min) / (max-min), where max is the maximum value in the reconstructed reference sensor data, min is the minimum value in the reconstructed reference sensor data.

4. The method according to claim 3, characterized in that Preprocessing the reconstructed reference sensor data further includes: Position encoding is performed on the reconstructed reference sensor data after the standardization process using a sine function and a cosine function to obtain reconstructed reference sensor data with position information, wherein the sine function and the cosine function have different frequencies, The sine function is The cosine function is Where t represents the time step, d model Indicates the total number of dimensions of the input feature, i indicates the dimension number of the input feature, and the value range of i is [0, d model / 2].

5. The method according to claim 1, characterized in that: The submodule of the Transformer reconstruction model includes a multi-head self-attention mechanism layer and a fully connected layer. The preprocessed reconstructed reference sensor data is input into the Transformer reconstruction model, and the Transformer reconstruction model is trained, including: The preprocessed reconstructed reference sensor data matrix is ​​mapped to the query matrix Q, key matrix K and value matrix V through linear transformation. Q=Linear(X)=XW Q K=Linear(X)=XW K V=Linear(X)=XW ν Among them, W Q , W K , W ν are all linear transformation weight matrices, X is the reconstructed reference sensor data matrix; The multi-head self-attention mechanism of the Transformer reconstruction model is used to determine the output head corresponding to the query matrix Q, the key matrix K and the value matrix V i , the formula corresponding to the multi-head self-attention mechanism is, Formula 3: Formula 4: in, are the space vector matrices Q, K, V, the linear transformation weight matrix of the i-th head, d k is the dimension of each row of the spatial vector matrix Q, K, V, SelfAttention(Q,K,V) is the self-attention mechanism function, and softmax is the normalization function; For the output head i The output of the multi-head self-attention mechanism layer is formed by splicing. The splicing method is expressed by Formula 5: MultiHead(Q,K,V)=Concat(head1,…,head h )W 0 , where Concat is the splicing function, W 0 is the linear transformation weight matrix corresponding to the concatenation of the multi-head self-attention matrix, and MultiHead(Q,K,V) represents the output of the multi-head self-attention mechanism layer; A new output is obtained by adding the output of the multi-head self-attention mechanism layer and the preprocessed reconstructed reference sensor data, and performing layer normalization processing on the new output; The new output after normalization of the layer is input to the fully connected layer, and after being processed by the activation function of the fully connected layer, a reconstruction result is output; Calculating a training error using a standard root mean square error loss function based on the reconstruction result and the reconstructed reference sensor data; The Transformer reconstruction model is iteratively trained according to the training error.

6. The method according to claim 5, characterized in that The new output is subjected to layer normalization, including: The new output is subjected to layer normalization processing by formula 6, wherein: Among them, x ij is the value of the i-th row and j-th column of the new output matrix, μ j is the mean of the jth column of the new output matrix, is the variance of the jth column of the new output matrix, ε is a constant, and LayerNorm(x) is the layer normalization function.

7. The method according to claim 5, characterized in that include: A Dropout random deactivation operation is performed between the multi-head self-attention mechanism layer and the fully connected layer.

8. The method according to claim 1, characterized in that Training the Transformer reconstruction model also includes: The parameters in the Transformer reconstruction model are iteratively optimized using a genetic algorithm to determine the optimal parameter combination.

9. The method according to claim 8, characterized in that The parameters in the Transformer reconstruction model are iteratively optimized using a genetic algorithm to determine the optimal parameter combination, including: Using the parameter combination in the Transformer reconstruction model as a population, and randomly initializing the population; Using the genetic algorithm to binary encode the value of each individual in the population; The fitness of each individual is calculated by the fitness function, which is: Among them, d i is the expected output of the ith individual, v i is the network output of the i-th individual; Based on the fitness, individuals are selected from the population, and crossover and mutation operations are performed on the selected individuals; The fitness calculation, individual selection, crossover and mutation operations are performed cyclically until the preset number of iterations is reached and the optimal parameter combination is output.

10. The method according to claim 9, characterized in that Based on the fitness, individuals are selected from the population, and crossover and mutation operations are performed on the selected individuals, including: The roulette wheel method is used to select individuals from the population, and the sum of the probabilities of all individuals being selected is 1; According to the preset crossover probability, a multi-point crossover method is used to perform a crossover operation on two individuals among the selected individuals; According to the preset mutation probability, the single-point mutation method is used to perform mutation operations on the selected individuals or individuals after the crossover operation.

11. The method according to claim 1, characterized in that: Before obtaining the operation data corresponding to the currently failed sensor in the nuclear power system, the method further includes: The operating data of each sensor in the nuclear power system is obtained, and the operating data is analyzed using a kernel principal component analysis method to determine the failed sensor.

12. The method according to claim 11, characterized in that Acquiring the operating data of each sensor in the current nuclear power system, analyzing the operating data using the nuclear principal component analysis method, and determining the failed sensor, including: Based on the historical normal operation data, a principal component space statistic threshold and a residual space statistic threshold are determined using a kernel principal component analysis method; Based on the operating data of each sensor in the nuclear power system, the principal component space projection statistics and the residual space projection statistics are determined by using the kernel principal component analysis method; Determining whether the principal component space projection statistic is greater than the principal component space statistic threshold, and determining whether the residual space projection statistic is greater than the residual space statistic threshold; When the principal component space projection statistic is greater than the corresponding principal component space statistic threshold, and / or the residual space projection statistic is greater than the residual space statistic threshold, it is determined that the nuclear power system is operating abnormally; Determine the contribution rate of each sensor by using the kernel principal component analysis method; If the contribution rate of a certain sensor exceeds a preset contribution rate, the sensor is determined to be a failed sensor.

13. The method according to claim 12, characterized in that Based on the historical normal operation data, the principal component space statistic threshold and the residual space statistic threshold are determined using the kernel principal component analysis method, including: The historical normal operation data is standardized by Formula 7, where: * =(x-mean) / std, where mean is the mean of each column of data and std is the standard deviation of the data; Based on the standardized data, the kernel matrix is ​​obtained using the Gaussian radial basis kernel function, where the Gaussian radial basis kernel function is: Where ∥xy∥ is the Euclidean distance, σ is the variance, and k(x,y) is the output of the kernel function; The core matrix is ​​centralized by formula eight, and the formula eight is: Where K is the kernel matrix, S n is an n×n matrix, all elements of which are 1 / n; Solving the eigenvalues ​​and eigenvectors of the centralized kernel matrix by eigendecomposition; Based on the eigenvalue, the number of principal components is determined according to the cumulative contribution rate of principal component variance CPV. The calculation method of the cumulative contribution rate of principal component variance CPV corresponds to Formula 9. Formula 9: Among them, k is the number of principal components, λ i and λ j are the i-th and j-th eigenvalues, PV represents the percentage of information contained in the i-th principal component to the total information of the original data; CPV represents the total percentage of original information contained in the first k principal components; Dividing the eigenvector based on the number of principal components, and constructing a principal component space projection matrix and a residual space projection matrix according to the divided eigenvectors; According to the principal component space projection matrix and the residual space projection matrix, the principal component space projection statistic threshold and the residual space projection statistic threshold are determined by formula 10 and formula 11 respectively. The formula 10: in, is the threshold of the principal component space projection statistic, α is the confidence level, and F α (k,nk) is a distribution with k and nk degrees of freedom; The formula 11, Among them, Q α is the residual space projection statistic threshold, c α is the confidence interval of the standard normal distribution (1-α).

14. The method according to claim 12, characterized in that Based on the operation data of each sensor in the nuclear power system, the principal component space projection statistics and the residual space projection statistics are determined by using the kernel principal component analysis method, including: The principal component space projection statistic is determined by formula 12, wherein: Among them, T 2 is the principal component space projection statistic, Λ k is diag(λ1,λ2,…,λ n ), is the principal element space composed of the divided eigenvectors, for The transpose of x T is the transpose of x, where x is the vector of sensor operation data; The residual space projection statistic is determined by formula 13, wherein: in, is the projection of the vector composed of sensor operation data in the residual space, I is the unit matrix, is the principal space projection matrix.

15. The method according to claim 12, characterized in that The contribution rate of each sensor is determined by using the kernel principal component analysis method, including: The sensor T is determined by formula 14 2 The contribution rate of the statistic, the formula 14, in, is the sensor pair T 2 The contribution rate of the statistic, t is the score vector, that is, P j,i is the eigenvector P of the covariance matrix j The i-th element of i =[0,…,0,x i ,0,…,0] T ; The contribution rate of the sensor to the Q statistic is determined by Formula 15, wherein: Among them, Q i is the contribution rate of the sensor to the Q statistic.

16. A data reconstruction device for a failed sensor in a nuclear power system, characterized in that: include: The first acquisition module is used to acquire the historical normal operation data of the sensor under the steady-state operation of the nuclear power system and the historical abnormal operation data of the failed sensor under the fault condition of the nuclear power system; a calculation module, configured to calculate the data correlation between the historical normal operation data and the historical abnormal operation data, and to select the associated sensors of the failed sensor according to the data correlation, and to obtain the reconstructed reference sensor data of the associated sensors; A preprocessing module, used for preprocessing the reconstructed reference sensor data; A training module, used for inputting the preprocessed reconstructed reference sensor data into the Transformer reconstruction model to train the Transformer reconstruction model; A second acquisition module is used to acquire the operation data corresponding to the currently failed sensor in the nuclear power system; The reconstruction module is used to reconstruct the operating data using the trained Transformer reconstruction model.

17. The device according to claim 16, characterized in that The computing module is used for: The Spearman method is used to calculate the correlation coefficient between the historical normal operation data and the historical abnormal operation data. The Spearman method is expressed by Formula 1: Among them, R i represents the rank of the historical normal operation data X and the historical abnormal operation data Y to be analyzed after sorting, and n is the number of operation data; comparing the correlation coefficient with a preset correlation coefficient; The sensor whose correlation coefficient is greater than the preset correlation coefficient is determined as the associated sensor.

18. The device according to claim 16, characterized in that The preprocessing module is used to: The reconstructed reference sensor data is normalized to project the data value between [0, 1]. The normalization method is expressed by Formula 2: * =(x- min) / (max-min), where max is the maximum value in the reconstructed reference sensor data, min is the minimum value in the reconstructed reference sensor data.

19. The device according to claim 18, characterized in that The preprocessing module is further used for: Position encoding is performed on the reconstructed reference sensor data after the standardization process using a sine function and a cosine function to obtain reconstructed reference sensor data with position information, wherein the sine function and the cosine function have different frequencies, The sine function is The cosine function is Where t represents the time step, d model Indicates the total number of dimensions of the input feature, i indicates the dimension number of the input feature, and the value range of i is [0, d model / 2].

20. The device according to claim 16, characterized in that The submodule of the Transformer reconstruction model includes a multi-head self-attention mechanism layer and a fully connected layer. The training module is used to: The preprocessed reconstructed reference sensor data matrix is ​​mapped to the query matrix Q, key matrix K and value matrix V through linear transformation. Q=Linear(X)=XW Q K=Linear(X)=XW K V=Linear(X)=XW ν Among them, W Q , W K , W ν are all linear transformation weight matrices, X is the reconstructed reference sensor data matrix; The multi-head self-attention mechanism of the Transformer reconstruction model is used to determine the output head corresponding to the query matrix Q, the key matrix K and the value matrix V i , the formula corresponding to the multi-head self-attention mechanism is, Formula 3: Formula 4: in, are the space vector matrices Q, K, V, the linear transformation weight matrix of the i-th head, d k is the dimension of each row of the spatial vector matrix Q, K, V, SelfAttention(Q,K,V) is the self-attention mechanism function, and softmax is the normalization function; For the output head i The output of the multi-head self-attention mechanism layer is formed by splicing. The splicing method is expressed by Formula 5: MultiHead(Q,K,V)=Concat(head1,…,head h )W 0 , where Concat is the splicing function, W 0 is the linear transformation weight matrix corresponding to the concatenation of the multi-head self-attention matrix, and MultiHead(Q,K,V) represents the output of the multi-head self-attention mechanism layer; A new output is obtained by adding the output of the multi-head self-attention mechanism layer and the preprocessed reconstructed reference sensor data, and performing layer normalization processing on the new output; The new output after normalization of the layer is input to the fully connected layer, and after being processed by the activation function of the fully connected layer, a reconstruction result is output; Calculating a training error using a standard root mean square error loss function based on the reconstruction result and the reconstructed reference sensor data; The Transformer reconstruction model is iteratively trained according to the training error.

21. The device according to claim 20, characterized in that The new output is subjected to layer normalization, including: The new output is subjected to layer normalization processing by formula 6, wherein: Among them, x ij is the value of the i-th row and j-th column of the new output matrix, μ j is the mean of the jth column of the new output matrix, is the variance of the jth column of the new output matrix, ε is a constant, and LayerNorm(x) is the layer normalization function.

22. The device according to claim 20, characterized in that include: A Dropout random deactivation operation is performed between the multi-head self-attention mechanism layer and the fully connected layer.

23. The device according to claim 16, characterized in that The training module is also used for: The parameters in the Transformer reconstruction model are iteratively optimized using a genetic algorithm to determine the optimal parameter combination.

24. The device according to claim 23, characterized in that The parameters in the Transformer reconstruction model are iteratively optimized using a genetic algorithm to determine the optimal parameter combination, including: Using the parameter combination in the Transformer reconstruction model as a population, and randomly initializing the population; Using the genetic algorithm to binary encode the value of each individual in the population; The fitness of each individual is calculated by the fitness function, which is: Among them, d i is the expected output of the ith individual, v i is the network output of the i-th individual; Based on the fitness, individuals are selected from the population, and crossover and mutation operations are performed on the selected individuals; The fitness calculation, individual selection, crossover and mutation operations are performed cyclically until the preset number of iterations is reached and the optimal parameter combination is output.

25. The device according to claim 24, characterized in that Based on the fitness, individuals are selected from the population, and crossover and mutation operations are performed on the selected individuals, including: The roulette wheel method is used to select individuals from the population, and the sum of the probabilities of all individuals being selected is 1; According to the preset crossover probability, a multi-point crossover method is used to perform a crossover operation on two individuals among the selected individuals; According to the preset mutation probability, the single-point mutation method is used to perform mutation operations on the selected individuals or individuals after the crossover operation.

26. The device according to claim 16, characterized in that Before obtaining the operation data corresponding to the currently failed sensor in the nuclear power system, a third obtaining module is also included, which is used to: The operating data of each sensor in the nuclear power system is obtained, and the operating data is analyzed using a kernel principal component analysis method to determine the failed sensor.

27. The device according to claim 26, characterized in that The third acquisition module is used to: Based on the historical normal operation data, a principal component space statistic threshold and a residual space statistic threshold are determined using a kernel principal component analysis method; Based on the operating data of each sensor in the nuclear power system, the principal component space projection statistics and the residual space projection statistics are determined by using the kernel principal component analysis method; Determining whether the principal component space projection statistic is greater than the principal component space statistic threshold, and determining whether the residual space projection statistic is greater than the residual space statistic threshold; When the principal component space projection statistic is greater than the corresponding principal component space statistic threshold, and / or the residual space projection statistic is greater than the residual space statistic threshold, it is determined that the nuclear power system is operating abnormally; Determine the contribution rate of each sensor by using the kernel principal component analysis method; If the contribution rate of a certain sensor exceeds a preset contribution rate, the sensor is determined to be a failed sensor.

28. The device according to claim 27, characterized in that Based on the historical normal operation data, the principal component space statistic threshold and the residual space statistic threshold are determined using the kernel principal component analysis method, including: The historical normal operation data is standardized by Formula 7, where: * =(x-mean) / std, where mean is the mean of each column of data and std is the standard deviation of the data; Based on the standardized data, the kernel matrix is ​​obtained using the Gaussian radial basis kernel function, where the Gaussian radial basis kernel function is: Where ∥xy∥ is the Euclidean distance, σ is the variance, and k(x,y) is the output of the kernel function; The core matrix is ​​centralized by formula eight, and the formula eight is: Where K is the kernel matrix, S n is an n×n matrix, all elements of which are 1 / n; Solving the eigenvalues ​​and eigenvectors of the centralized kernel matrix by eigendecomposition; Based on the eigenvalue, the number of principal components is determined according to the cumulative contribution rate of principal component variance CPV. The calculation method of the cumulative contribution rate of principal component variance CPV corresponds to Formula 9. Formula 9: Among them, k is the number of principal components, λ i and λ j are the i-th and j-th eigenvalues, PV represents the percentage of information contained in the i-th principal component to the total information of the original data; CPV represents the total percentage of original information contained in the first k principal components; Dividing the eigenvector based on the number of principal components, and constructing a principal component space projection matrix and a residual space projection matrix according to the divided eigenvectors; According to the principal component space projection matrix and the residual space projection matrix, the principal component space projection statistic threshold and the residual space projection statistic threshold are determined by formula 10 and formula 11 respectively. The formula 10: in, is the threshold of the principal component space projection statistic, α is the confidence level, and F α (k,nk) is a distribution with k and nk degrees of freedom; The formula 11, Among them, Q α is the residual space projection statistic threshold, c α is the confidence interval of the standard normal distribution (1-α).

29. The device according to claim 27, characterized in that Based on the operation data of each sensor in the nuclear power system, the principal component space projection statistics and the residual space projection statistics are determined by using the kernel principal component analysis method, including: The principal component space projection statistic is determined by formula 12, wherein: Among them, T 2 is the principal component space projection statistic, Λ k is diag(λ1,λ2,…,λ n ), is the principal element space composed of the divided eigenvectors, for The transpose of x T is the transpose of x, where x is the vector of sensor operation data; The residual space projection statistic is determined by formula 13, wherein: in, is the projection of the vector composed of sensor operation data in the residual space, I is the unit matrix, is the principal space projection matrix.

30. The device according to claim 27, characterized in that The contribution rate of each sensor is determined by using the kernel principal component analysis method, including: The sensor T is determined by formula 14 2 The contribution rate of the statistic, the formula 14, in, is the sensor pair T 2 The contribution rate of the statistic, t is the score vector, that is, P j,i is the eigenvector P of the covariance matrix j The i-th element of i =[0,…,0,x i ,0,…,0] T ; The contribution rate of the sensor to the Q statistic is determined by Formula 15, wherein: Among them, Q i is the contribution rate of the sensor to the Q statistic.

Citation Information

Cited By

  • Sensor data reconstruction method, system and device based on unsupervised residual network and medium

    CN116429056A

  • VOC sensor on-site management method and system based on spatiotemporal topology and Clifford algebra

    CN119780358A