Nuclear power station fault diagnosis method based on data balance
By using SA-TimeGAN to generate balanced data in nuclear power plant fault diagnosis and combining with CNN-BiLSTM model for diagnosis, the problem of low diagnostic accuracy of a few types of fault samples is solved, and the accuracy and generalization ability of diagnosis are significantly improved.
Patent Information
- Application Number
- CN202411749017.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-14
AI Technical Summary
Traditional deep learning models tend to favor normal samples in nuclear power plants, and the diagnosis accuracy of a few types of fault samples is low, resulting in a high misdiagnosis rate.
Data augmentation using a time series generation adversarial network (SA-TimeGAN) combined with a self-attention mechanism is used for data augmentation, synthetic data is generated to balance the data set, and fault diagnosis is performed through a convolutional bidirectional long and short-term memory network (CNN-BiLSTM).
It effectively solves the problem of data imbalance, significantly improves the classification accuracy and generalization ability of the model, and improves the ability to identify a few types of fault samples.
Smart Images

Figure CN119622209A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of nuclear power plant safety technology, and in particular to a nuclear power plant fault diagnosis method based on data balancing. Background Art
[0002] Fault diagnosis is crucial in ensuring the safety and economy of nuclear power plants. Since nuclear power plant equipment has a complex structure and radioactive risks, once a key equipment fails, it may lead to serious accidents such as shutdown, threatening the safe operation and operating costs of the nuclear power plant. In order to fully grasp the operating status of the equipment, nuclear power plants are equipped with a large number of sensors for real-time monitoring. However, when anomalies occur, especially when there is a trend towards serious accidents, it is often difficult for operators and emergency responders to identify anomalies from a large amount of monitoring data and make correct decisions quickly. Therefore, being able to quickly and accurately diagnose the fault status of key equipment in nuclear power plants is of great significance to timely eliminate hidden dangers and ensure the safe operation of nuclear power plants.
[0003] In recent years, deep learning algorithms based on big data have achieved good results in fault diagnosis. However, nuclear power plant equipment is usually in a normal state for a long time, resulting in a scarcity of fault data, especially the difficulty in collecting major fault data, and the problem of data imbalance (i.e., more normal samples and fewer fault samples). Under such unbalanced data, traditional deep learning models tend to favor normal samples, and the diagnostic accuracy of minority samples is low, and even lead to a high misdiagnosis rate.
[0004] At present, the mainstream method for processing unbalanced small samples is to perform data enhancement through generative adversarial networks (GANs). However, traditional GANs have obvious deficiencies in generating time series data. First, the GAN model lacks effective capture of time dependencies, resulting in the possibility that the generated data lacks time structure; second, mode collapse is prone to occur during training, and the diversity of generated samples is insufficient, which affects the accuracy of diagnosis. Therefore, the present invention proposes to use a time series generative adversarial network (SA-TimeGAN) combined with a self-attention mechanism for data enhancement, and then perform fault diagnosis through a convolutional bidirectional long short-term memory network (CNN-BiLSTM). SA-TimeGAN effectively enhances the balance of the data set and can better capture the global dependencies of the time series, while CNN-BiLSTM performs well in automatically extracting fault features, thereby effectively solving the diagnosis problem of unbalanced small samples, improving the accuracy and generalization ability of the model, and making this method more suitable for the fault diagnosis needs of nuclear power plants in complex environments.
[0005] Chinese patent application number: CN202410013626.X discloses a method and system for diagnosing faults in nuclear power plant equipment, which specifically includes the following steps: the monitoring equipment collects information of power plant equipment in real time, uploads the collected information to the monitoring system, and sets a threshold range for data fluctuations; the monitoring system performs data backup after receiving the information, and analyzes the data, and triggers a secondary alarm when the data is abnormal; the data processing system receives the abnormal data, and performs detailed analysis on the abnormal data to obtain the analysis results, and at the same time determines the source signal of the abnormal data and the fault location; the correction system receives the analysis results, and adjusts and corrects the equipment according to the analysis results, and collects the information of power plant equipment for synchronous analysis while adjusting and correcting, and then outputs the analysis results. The present invention can speed up the speed of troubleshooting the source of the fault, and automatically correct some faults, reducing the output of manpower and improving the efficiency of troubleshooting and maintenance.
[0006] However, the prior art still has the following problems:
[0007] Traditional deep learning models tend to be biased towards normal samples, and have low diagnostic accuracy for minority samples, and may even lead to a high misdiagnosis rate. Summary of the invention
[0008] To this end, the present invention provides a nuclear power plant fault diagnosis method based on data balancing to overcome the problem in the prior art that traditional deep learning models tend to favor normal samples, have low diagnostic accuracy for minority samples, and may even lead to a high misdiagnosis rate.
[0009] To achieve the above objectives, the present invention provides a nuclear power plant fault diagnosis method based on data balancing. It includes:
[0010] Step S1, obtaining original data, dividing the original data into normal data and fault data, and identifying small sample fault data in the fault data to obtain original data samples;
[0011] Step S2, constructing the SA-TimeGAN model, the construction process includes: embedding network, recovery network, generation network, discriminant network, self-attention mechanism and loss function;
[0012] Step S3, inputting the small sample fault data into the SA-TimeGAN model for adversarial training, and optimizing the network parameters of the model using the loss function to generate synthetic data;
[0013] Step S4, normalizing the original data and the generated synthetic data, dividing the data set and constructing a balanced training set and a test set;
[0014] Step S5, building a CNN-BiLSTM diagnostic model to form a complete neural network structure with an input layer and an output layer;
[0015] Step S6, using the CNN-BiLSTM diagnostic model to iteratively train the balanced training set, and evaluating on the test set to verify the diagnostic performance of the CNN-BiLSTM diagnostic model.
[0016] Furthermore, the obtaining of original data includes:
[0017] The normal data and fault data of the nuclear power plant are obtained through the simulation software PCTRAN.
[0018] Furthermore, the construction of the SA-TimeGAN model includes:
[0019] Step S2.1, constructing an embedding network, including:
[0020] Using H S and H X They are represented as the latent vector space corresponding to the static feature S and the dynamic feature X respectively. The embedding network realizes the mapping of static features and dynamic features, extracts the latent feature representation of the data, and the embedding network outputs the latent feature formula as follows:
[0021] h S =e S (S), h t =e X (h S ,h t-1 ,X t )
[0022] Among them, h S and h t is the potential feature corresponding to the static feature and the dynamic feature, e S and e X are the embedding functions of static features and dynamic features respectively;
[0023] Step S2.2, integrate the self-attention mechanism, and the calculation formula after integration is as follows:
[0024] Q t =h t W Q , K t =h t W K , V t =h t W V
[0025]
[0026] Among them, WQ ,W K ,W V is a learnable weight matrix, Q t , K t , V t represents the query vector, key vector, and value vector at the current time t, A t is the attention weight matrix, It is the dynamic latent feature output after applying the self-attention mechanism;
[0027] Step S2.3, construct a recovery network, and reconstruct the potential features into the original static features and dynamic features through the recovery network. The recovery network output reconstructs the original feature formula as follows:
[0028]
[0029] in, and represents the original static and temporal feature representations restored by the latent features through the recovery network, γ S and γ X are the reproduction functions of static and dynamic features respectively;
[0030] Step S2.4, construct a generative network and add a self-attention mechanism to it. The potential feature formula of the generated network data is as follows:
[0031]
[0032] in, and represents the potential features of the data generated by the generative network, z S and z t represents static random vectors and dynamic random vectors, represents the weighted value of the self-attention mechanism, represents the dynamic potential features at time t-1, g S and g X They are the generating functions of static features and dynamic features respectively;
[0033] Step S2.5, using the potential feature formula to generate time series data, constructing a discriminant network, and using the discriminant function of the discriminant network to discriminate the true or false of the time series data. The discriminant result formula is as follows:
[0034]
[0035] in, and is the discrimination result corresponding to the static and dynamic features, and are the sequences of forward and backward hidden states, respectively, and is a recursive function;
[0036] Step S2.6, construct the loss function, the loss function formula is as follows:
[0037]
[0038]
[0039] Among them, L R represents the reconstruction loss, L U represents the unsupervised loss, L S represents the supervision loss, S and X t Respectively represent the static and dynamic characteristics of the original data, y S and t Respectively represent the discriminator’s predicted values for the static and dynamic features of the real data, and They represent the predicted values of the discriminator for the static and dynamic features of the generated data respectively.
[0040] Furthermore, in step S3, the small sample fault data is input into the SA-TimeGAN model for adversarial training, including:
[0041] Step S3.1, optimizing the parameters of the SA-TimeGAN encoder component, the formula is as follows:
[0042]
[0043] Among them, θ e ,θ r represents the embedding network parameters and the recovery network parameters, λ≥0 is a hyperparameter used to balance the two losses, L R is the reconstruction loss, L S To monitor losses;
[0044] Step S3.2, optimize the parameters of the generative adversarial components (generator network and discriminator network) of the SA-TimeGAN model, the formula is as follows:
[0045]
[0046] Among them, θ g ,θ d Represents the generation network parameters and the discrimination network parameters, η is the weight coefficient, and the above steps are iterated multiple times to continuously optimize the model parameters.
[0047] Furthermore, in step S4, the original data and the generated synthetic data are normalized, wherein:
[0048] After normalizing the original data, 70% of the data is used for the training set and 30% of the data is used for the test set. Subsequently, the generated data is added to the training set to construct a balanced training data set.
[0049] Among them, the test set only contains the original data.
[0050] Furthermore, the CNN-BiLSTM diagnostic model is constructed in step S5, including:
[0051] The convolution layer extracts local features, the pooling layer performs dimensionality reduction, the batch normalization layer improves the convergence speed, the bidirectional long short-term memory layer captures time dependency, the Dropout layer prevents overfitting, the fully connected layer outputs the classification results, and the Softmax layer converts the output into a probability distribution. The model is constructed in this order to form a CNN-BiLSTM neural network framework with input and output layers.
[0052] Furthermore, in step S6, the CNN-BiLSTM diagnostic model is used to iteratively train the balanced training set, including:
[0053] Step S6.1, input the balanced training data set into the CNN-BiLSTM model in batches, generate initial output through forward propagation, take cross entropy loss as the optimization target, combine Adam optimization algorithm and gradient descent method to update weights, and gradually adjust the network layer weights in back propagation;
[0054] Step S6.2, input the test set divided in step S4 into the CNN-BiLSTM diagnostic model for classification test, and use accuracy and precision indicators to evaluate the model performance. If it does not meet the expectations, adjust the hyperparameters until the requirements are met;
[0055] Step S6.3, input the real-time operation data of the nuclear power plant into the CNN-BiLSTM diagnosis model with final parameter adjustment and performance optimization, and output the fault diagnosis results.
[0056] Furthermore, in step S6.2, the hyper parameters are adjusted, wherein:
[0057] Hyperparameters include: number of neurons, batch size, learning rate, and number of training epochs.
[0058] Furthermore, the step S3 uses the loss function to optimize the network parameters of the model, including:
[0059] The model parameters of the constructed embedding network, recovery network, generation network and discriminant network are optimized through the loss function.
[0060] Furthermore, the parameters of the SA-TimeGAN encoder component are optimized, wherein the encoder component includes an embedding network and a recovery network.
[0061] Compared with the prior art, the beneficial effect of the present invention lies in that a data set balancing technology for deep learning through SA-TimeGAN is established in the present invention, which can effectively solve the data imbalance problem caused by the large amount of normal data and the small amount of fault data in nuclear power plants. The method first preprocesses the small sample fault data, and then uses SA-TimeGAN to perform adversarial training on multi-category small sample fault data, and adds the generated fault samples to the original training data set to achieve the balance of sample data. Finally, the balanced data set is input into the CNN-BiLSTM diagnostic model for training, thereby significantly improving the classification accuracy and accurately realizing fault classification. This method effectively enhances the model's recognition ability for minority class fault samples.
[0062] Furthermore, the present invention adopts an embedding network and a recovery network to jointly constitute an encoder component, compresses the time series data into a low-dimensional representation and reconstructs it to capture the time-dependent characteristics. The generation network and the discriminant network constitute an adversarial generation component, which is used to generate and evaluate the authenticity of synthetic data, and approximate the real data distribution through adversarial training, thereby generating high-quality synthetic data.
[0063] Furthermore, the present invention measures the difference between the input data and the reconstructed data by means of reconstruction loss, ensuring that the low-dimensional latent features generated by the embedding network can be reconstructed into a representation close to the original data through the recovery network. By optimizing this loss, the encoding and decoding processes are improved, so that the latent features can more accurately represent the characteristics of the original data.
[0064] Furthermore, in the present invention, it is considered that the TimeGAN model may have insufficient performance when processing time series with long-term dependencies, because most embedded networks use traditional RNN or LSTM models, which have certain limitations in capturing long-range dependencies. In order to improve this, a self-attention mechanism can be added to the TimeGAN model to help the model better focus on the long-range dependency characteristics in the time series, making the generated long sequence data more accurate.
[0065] Furthermore, the present invention adds a self-attention mechanism to the TimeGAN model to enhance the model's ability to capture dynamic features. The self-attention mechanism can calculate the similarity between time steps and assign weights according to the similarity, so that the model can refer to the long-range dependency information in the entire sequence when generating data for each time step. Since static features do not change over time in the entire sequence, the self-attention mechanism only needs to be applied to dynamic features that change over time. For dynamic latent feature output h tWith the self-attention processing, the features of each time step can interact with each other through the self-attention mechanism to better capture the long-term dependencies in the time series.
[0066] Furthermore, in the present invention, after completing the data division, the generated data is added to the training set to construct a balanced training data set for the training of the diagnostic model. The test set contains only the original data, thereby ensuring its accuracy in evaluating the actual diagnostic performance of the model; and the balanced training set contains a combination of generated data and original data to enhance the model's learning ability for minority class samples. This data construction strategy fully reflects the distribution characteristics of each category's features during the model training stage, and effectively supplements the minority sample category, thereby significantly improving the classification accuracy and robustness of the model in fault diagnosis tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 It is an overall flow chart of the nuclear power plant fault diagnosis method based on data balancing of the present invention;
[0068] Figure 2 This is the adversarial training flow chart of the SA-TimeGAN algorithm;
[0069] Figure 3 This is the training flow chart of the CNN-BiLSTM diagnostic algorithm;
[0070] Figure 4 Flowchart for iterative training of a balanced training set for a CNN-BiLSTM diagnostic model. DETAILED DESCRIPTION
[0071] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0072] It should be pointed out that the data in this embodiment are obtained by comprehensive analysis and evaluation of the historical data of the system of the present invention in the six months before this determination and the corresponding historical determination results. It can be understood by those skilled in the art that the determination method of the system of the present invention for a single parameter mentioned above can be to select the value with the highest proportion as the preset standard parameter according to the data distribution, use weighted summation to use the obtained value as the preset standard parameter, substitute each historical data into a specific formula and use the value obtained by the formula as the preset standard parameter or other selection methods, as long as the system of the present invention can clearly define different specific situations in the single determination process through the obtained values.
[0073] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0074] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0075] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0076] See also Figure 1-Figure 4 As shown, Figure 1 The overall flow chart of the nuclear power plant fault diagnosis method based on data balancing of the present invention is as follows: Figure 2 This is the adversarial training flow chart of the SA-TimeGAN algorithm. Figure 3 This is the training flow chart of the CNN-BiLSTM diagnostic algorithm. Figure 4 Flowchart for iterative training of a balanced training set for a CNN-BiLSTM diagnostic model.
[0077] The nuclear power plant fault diagnosis method based on data balancing provided by an embodiment of the present invention includes:
[0078] Step S1, obtaining original data, dividing the original data into normal data and fault data, and identifying small sample fault data in the fault data to obtain original data samples;
[0079] Step S2, constructing the SA-TimeGAN model, the construction process includes: embedding network, recovery network, generation network, discriminant network, self-attention mechanism and loss function;
[0080] Step S3, inputting the small sample fault data into the SA-TimeGAN model for adversarial training, and optimizing the network parameters of the model using the loss function to generate synthetic data;
[0081] Step S4, normalizing the original data and the generated synthetic data, dividing the data set and constructing a balanced training set and a test set;
[0082] Step S5, building a CNN-BiLSTM diagnostic model to form a complete neural network structure with an input layer and an output layer;
[0083] Step S6, using the CNN-BiLSTM diagnostic model to iteratively train the balanced training set, and evaluating on the test set to verify the diagnostic performance of the CNN-BiLSTM diagnostic model.
[0084] Specifically, in this embodiment, the fault classification method based on SA-TimeGAN and CNN-BiLSTM uses a time series generative adversarial network (SA-TimeGAN) combined with a self-attention mechanism to perform data enhancement on the original data set, generate high-quality synthetic samples similar to the original samples, and construct a balanced sample data set. The balanced sample data set is then input into the CNN-BiLSTM model for feature extraction and fault classification, and the Softmax function is used to convert the neuron output into the probability distribution of faults, effectively improving the accuracy of unbalanced small sample fault classification.
[0085] Specifically, in the process of model training and verification of nuclear power plant fault diagnosis, ideally, real nuclear power plant operating data should be used. However, due to the extremely low frequency of nuclear power plant emergencies, the relevant data resources are extremely limited, and it is difficult to obtain sufficient actual data to support effective training and verification of the model. The present invention is designed to use a computer transient analyzer (PCTRAN) to simulate various operating scenarios and accident conditions of nuclear power plants to obtain the data set required for training.
[0086] Specifically, the embodiment of the present invention includes three loss functions.
[0087] In the present invention, an embedding network and a recovery network are used together to form an encoder component, which compresses time series data into a low-dimensional representation and reconstructs it to capture the time-dependent characteristics. The generation network and the discriminant network constitute an adversarial generation component, which is used to generate and evaluate the authenticity of synthetic data. The real data distribution is approximated through adversarial training, thereby generating high-quality synthetic data.
[0088] The present invention establishes a data set balancing technology for deep learning through SA-TimeGAN, which can effectively solve the data imbalance problem caused by the large amount of normal data and the small amount of fault data in nuclear power plants. The method first preprocesses the small sample fault data, and then uses SA-TimeGAN to perform adversarial training on multi-category small sample fault data, and adds the generated fault samples to the original training data set to achieve the balance of sample data. Finally, the balanced data set is input into the CNN-BiLSTM diagnostic model for training, thereby significantly improving the classification accuracy and accurately realizing fault classification. This method effectively enhances the model's recognition ability for minority class fault samples.
[0089] Specifically, obtaining the original data includes:
[0090] The normal data and fault data of the nuclear power plant are obtained through the simulation software PCTRAN.
[0091] Specifically, the construction of the SA-TimeGAN model includes:
[0092] Step S2.1, constructing an embedding network, including:
[0093] Using H S and H X They are represented as the latent vector space corresponding to the static feature S and the dynamic feature X respectively. The embedding network realizes the mapping of static features and dynamic features, extracts the latent feature representation of the data, and the embedding network outputs the latent feature formula as follows:
[0094] h S =e S (S), h t =e X (h S ,h t1 ,X t )
[0095] Among them, h S and h t is the potential feature corresponding to the static feature and the dynamic feature, e S and e X are the embedding functions of static features and dynamic features respectively;
[0096] Step S2.2, integrate the self-attention mechanism, and the calculation formula after integration is as follows:
[0097] Q t =h t W Q , K t =h t W K , V t =h tW V
[0098]
[0099] Among them, W Q ,W K ,W V is a learnable weight matrix, Q t , K t , V t represents the query vector, key vector, and value vector at the current time t, A t is the attention weight matrix, It is the dynamic latent feature output after applying the self-attention mechanism;
[0100] Step S2.3, construct a recovery network, and reconstruct the potential features into the original static features and dynamic features through the recovery network. The recovery network output reconstructs the original feature formula as follows:
[0101]
[0102] in, and represents the original static and temporal feature representations restored by the latent features through the recovery network, γ S and γ X are the reproduction functions of static and dynamic features respectively;
[0103] Step S2.4, construct a generative network and add a self-attention mechanism to it. The potential feature formula of the generated network data is as follows:
[0104]
[0105] in, and represents the potential features of the data generated by the generative network, z S and z t represents static random vectors and dynamic random vectors, represents the weighted value of the self-attention mechanism, represents the dynamic potential features at time t-1, g S and g X They are the generating functions of static features and dynamic features respectively;
[0106] Step S2.5, using the potential feature formula to generate time series data, constructing a discriminant network, and using the discriminant function of the discriminant network to discriminate the true or false of the time series data. The discriminant result formula is as follows:
[0107]
[0108] in, and is the discrimination result corresponding to the static and dynamic features, and are the sequences of forward and backward hidden states, respectively, and is a recursive function;
[0109] Step S2.6, construct the loss function, the loss function formula is as follows:
[0110]
[0111] Among them, L R represents the reconstruction loss, L U represents the unsupervised loss, L S represents the supervision loss, S and X t Respectively represent the static and dynamic characteristics of the original data, y S and t Respectively represent the discriminator’s predicted values for the static and dynamic features of the real data, and They represent the predicted values of the discriminator for the static and dynamic features of the generated data respectively.
[0112] Specifically, in this embodiment, the reconstruction loss acts on the embedding network and the recovery network, which is the error between the input data and the reconstructed data (such as mean square error or cross entropy), ensuring that the generated potential features contain enough original information to restore the original data. The unsupervised loss acts on the generative network and the discriminative network, and improves the authenticity of the data generated by the generator by measuring the gap between the generated data and the real data distribution, so that the overall distribution of the synthetic data is consistent with the real data. The supervised loss acts on the embedding network and the generative network, and helps the model generate more realistic time series data through supervisory signals, while retaining the time-dependent characteristics.
[0113] In the present invention, the difference between the input data and the reconstructed data is measured by the reconstruction loss to ensure that the low-dimensional latent features generated by the embedding network can be reconstructed into a representation close to the original data through the recovery network. By optimizing this loss, the encoding and decoding processes are improved, so that the latent features can more accurately represent the characteristics of the original data.
[0114] Specifically, in step S5, the CNN-BiLSTM algorithm is used to classify the time series data. The algorithm first uses a convolutional neural network (CNN) to extract local features of the time series data, capture patterns and trends within a short time range, and reduce the dimension of the data to reduce the impact of noise. Then, a bidirectional long short-term memory network (BiLSTM) further processes the extracted features to model the long-term dependencies of the time series, thereby more comprehensively capturing the contextual information of the sequence. By combining the feature extraction capability of CNN with the time dependency modeling capability of BiLSTM, the algorithm can more accurately classify complex patterns in time series data, improve the accuracy of classification and the generalization ability of the model, and ultimately achieve accurate identification of various types of faults to ensure the safety and stability of the system.
[0115] In the present invention, it is considered that the TimeGAN model may have insufficient performance when processing time series with long-term dependencies, because most embedded networks use traditional RNN or LSTM models, which have certain limitations in capturing long-range dependencies. In order to improve this, a self-attention mechanism can be added to the TimeGAN model to help the model better focus on the long-range dependency characteristics in the time series, making the generated long sequence data more accurate.
[0116] In this paper, the self-attention mechanism is added to the TimeGAN model to enhance the model's ability to capture dynamic features. The self-attention mechanism can calculate the similarity between time steps and assign weights according to the similarity, so that the model can refer to the long-range dependency information in the entire sequence when generating data for each time step. Since the static features do not change over time in the entire sequence, the self-attention mechanism only needs to be applied to the dynamic features that change over time. For the dynamic potential feature output h t With the self-attention processing, the features of each time step can interact with each other through the self-attention mechanism to better capture the long-term dependencies in the time series.
[0117] Specifically, in step S3, the small sample fault data is input into the SA-TimeGAN model for adversarial training, including:
[0118] Step S3.1, optimizing the parameters of the SA-TimeGAN encoder component, the formula is as follows:
[0119]
[0120] Among them, θ e ,θ r represents the embedding network parameters and the recovery network parameters, λ≥0 is a hyperparameter used to balance the two losses, L S To monitor the loss, L RFor reconstruction loss;
[0121] Step S3.2, optimize the parameters of the generative adversarial components (generator network and discriminator network) of the SA-TimeGAN model, the formula is as follows:
[0122]
[0123] Among them, θ g ,θ d represents the generation network parameters and the discrimination network parameters, and η is the weight coefficient used to balance the supervision loss L S and the unsupervised loss L U , and iterate the above steps multiple times to continuously optimize the model parameters.
[0124] Specifically, in this embodiment, the role of the hyperparameter λ is to adjust the weight distribution of the reconstruction loss and the adversarial loss during the model training process to ensure that the embedding and recovery network can strike a balance between capturing potential features and generating high-quality data.
[0125] Specifically, by constructing the unsupervised loss L U With the supervision loss L S The parameters of the generator and discriminator networks are optimized during the training process. The combination of unsupervised loss and supervised loss aims to ensure that the generated data not only conforms to the overall distribution of the real data, but also has consistency at each time step of the time series.
[0126] Specifically, the supervision loss L S It is used to guide the generative network so that the samples generated at each time step are consistent with the real data, thereby strengthening the temporal dependency of the generated sequence. The discriminative network uses the unsupervised loss L U To learn to distinguish between real samples and generated samples, the generation network and the discriminant network continuously improve the quality of generated data through adversarial games during the optimization process. Specifically, the supervision loss L S It is used to guide the generative network so that the samples generated at each time step are consistent with the real data, thereby strengthening the temporal dependency of the generated sequence. The discriminative network uses the unsupervised loss L U To learn to distinguish between real samples and generated samples, during the optimization process, the generative network and the discriminative network continuously improve the quality of generated data through adversarial games.
[0127] Specifically, in step S4, the original data and the generated synthetic data are normalized, wherein:
[0128] After normalizing the original data, 70% of the data is used for the training set and 30% of the data is used for the test set. Subsequently, the generated data is added to the training set to construct a balanced training data set.
[0129] Among them, the test set only contains the original data.
[0130] Specifically, after the original data and generated data are normalized, the normalized original data are divided into a training set and a test set according to a certain ratio. After the data division is completed, the generated data is added to the training set to construct a balanced training data set for the training of the diagnostic model. The test set contains only the original data to ensure its accuracy in evaluating the actual diagnostic performance of the model; while the balanced training set contains a combination of generated data and original data to enhance the model's learning ability for minority class samples. This data construction strategy fully reflects the distribution characteristics of each category's features during the model training stage, and effectively supplements the minority sample category, thereby significantly improving the classification accuracy and robustness of the model in fault diagnosis tasks.
[0131] Specifically, the CNN-BiLSTM diagnostic model is constructed in step S5, including:
[0132] The convolution layer extracts local features, the pooling layer performs dimensionality reduction, the batch normalization layer improves the convergence speed, the bidirectional long short-term memory layer captures time dependency, the Dropout layer prevents overfitting, the fully connected layer outputs the classification results, and the Softmax layer converts the output into a probability distribution. The model is constructed in this order to form a CNN-BiLSTM neural network framework with input and output layers.
[0133] Specifically, in step S6, the CNN-BiLSTM diagnostic model is used to iteratively train the balanced training set, including:
[0134] Step S6.1, input the balanced training data set into the CNN-BiLSTM model in batches, generate initial output through forward propagation, take cross entropy loss as the optimization target, combine Adam optimization algorithm and gradient descent method to update weights, and gradually adjust the network layer weights in back propagation;
[0135] Step S6.2, input the test set divided in step S4 into the CNN-BiLSTM diagnostic model for classification test, and use accuracy and precision indicators to evaluate the model performance. If it does not meet the expectations, adjust the hyperparameters until the requirements are met;
[0136] Specifically, after the model training is completed, the test set divided in step S4 is input into the fault diagnosis model for classification test to evaluate the classification performance of the model. The model is evaluated using evaluation indicators such as accuracy and precision. If the evaluation indicators fail to meet expectations, the hyperparameters (number of neurons, batch size, initial learning rate, number of training iterations, etc.) are adjusted until the evaluation indicators meet the requirements. The accuracy and precision formulas are as follows:
[0137] Accuracy=(TP+TN) / (TP+TN+FP+FN)
[0138] Precision=TP / (TP+FP)
[0139] Among them, Accuracy is the accuracy, Precision is the precision, TN is the number of normal cases diagnosed as normal, FP is the number of normal cases diagnosed as faults, FN is the number of faults diagnosed as normal, and TP is the number of faults diagnosed as faults.
[0140] Step S6.3, input the real-time operation data of the nuclear power plant into the CNN-BiLSTM diagnosis model with final parameter adjustment and performance optimization, and output the fault diagnosis results.
[0141] Specifically, in step S6.2, the hyper parameters are adjusted, wherein:
[0142] Hyperparameters include: number of neurons, batch size, learning rate, and number of training epochs.
[0143] Specifically, the step S3 uses the loss function to optimize the network parameters of the model, including:
[0144] The model parameters of the constructed embedding network, recovery network, generation network and discriminant network are optimized through the loss function.
[0145] Specifically, the parameters of the SA-TimeGAN encoder component are optimized, where the encoder component includes an embedding network and a recovery network.
[0146] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0147] 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.
Claims
1. A nuclear power plant fault diagnosis method based on data balancing, characterized in that: include: Step S1, obtaining original data, dividing the original data into normal data and fault data, and identifying small sample fault data in the fault data to obtain original data samples; Step S2, constructing the SA-TimeGAN model, the construction process includes: embedding network, recovery network, generation network, discriminant network, self-attention mechanism and loss function; Step S3, inputting the small sample fault data into the SA-TimeGAN model for adversarial training, and optimizing the network parameters of the model using the loss function to generate synthetic data; Step S4, normalizing the original data and the generated synthetic data, dividing the data set and constructing a balanced training set and a test set; Step S5, building a CNN-BiLSTM diagnostic model to form a complete neural network structure with an input layer and an output layer; Step S6, using the CNN-BiLSTM diagnostic model to iteratively train the balanced training set, and evaluating on the test set to verify the diagnostic performance of the CNN-BiLSTM diagnostic model.
2. The method for nuclear power plant fault diagnosis based on data balancing according to claim 1, characterized in that: The obtaining of original data comprises: The normal data and fault data of the nuclear power plant are obtained through the simulation software PCTRAN.
3. The method for nuclear power plant fault diagnosis based on data balancing according to claim 1, characterized in that: The construction of the SA-TimeGAN model includes: Step S2.1, constructing an embedding network, including: Using H S and H X They are represented as the latent vector space corresponding to the static feature S and the dynamic feature X respectively. The embedding network realizes the mapping of static features and dynamic features, extracts the latent feature representation of the data, and the embedding network outputs the latent feature formula as follows: h S =e S (S),h t =e X (h S ,h t1 ,X t ) Among them, h S and h t is the potential feature corresponding to the static feature and the dynamic feature, e S and e X are the embedding functions of static features and dynamic features respectively; Step S2.2, integrate the self-attention mechanism, and the calculation formula after integration is as follows: Q t =h t W Q ,K t =h t W K ,V t =h t W V Among them, W Q ,W K ,W V is a learnable weight matrix, Q t , K t , V t represents the query vector, key vector, and value vector at the current time t, A t is the attention weight matrix, It is the dynamic latent feature output after applying the self-attention mechanism; Step S2.3, construct a recovery network, and reconstruct the potential features into the original static features and dynamic features through the recovery network. The recovery network output reconstructs the original feature formula as follows: in, and represents the original static and temporal feature representations restored by the latent features through the recovery network, γ S and γ X are the reproduction functions of static and dynamic features respectively; Step S2.4, construct a generative network and add a self-attention mechanism to it. The potential feature formula of the generated network data is as follows: in, and represents the potential features of the data generated by the generative network, z S and z t represents static random vectors and dynamic random vectors, represents the weighted value of the self-attention mechanism, represents the dynamic potential features at time t-1, g S and g X They are the generating functions of static features and dynamic features respectively; Step S2.5, using the potential feature formula to generate time series data, constructing a discriminant network, and using the discriminant function of the discriminant network to discriminate the true or false of the time series data. The discriminant result formula is as follows: in, and is the discrimination result corresponding to the static and dynamic features, and are the sequences of forward and backward hidden states, respectively, and is a recursive function; Step S2.6, construct the loss function, the loss function formula is as follows: Among them, L R represents the reconstruction loss, L U represents the unsupervised loss, L S represents the supervision loss, S and X t Respectively represent the static and dynamic characteristics of the original data, y S and t Respectively represent the discriminator’s predicted values for the static and dynamic features of the real data, and They represent the predicted values of the discriminator for the static and dynamic features of the generated data respectively.
4. The method for nuclear power plant fault diagnosis based on data balancing according to claim 1, characterized in that: In step S3, the small sample fault data is input into the SA-TimeGAN model for adversarial training, including: Step S3.1, optimizing the parameters of the SA-TimeGAN encoder component, the formula is as follows: Among them, θ e ,θ r represents the embedding network parameters and the recovery network parameters, λ≥0 is a hyperparameter used to balance the two losses, L S To monitor the loss, L R For reconstruction loss; Step S3.2, optimize the parameters of the generative adversarial components (generator network and discriminator network) of the SA-TimeGAN model, the formula is as follows: Among them, θ g ,θ d Represents the generation network parameters and the discrimination network parameters, η is the weight coefficient, and the above steps are iterated multiple times to continuously optimize the model parameters.
5. The method for nuclear power plant fault diagnosis based on data balancing according to claim 1, characterized in that: In step S4, the original data and the generated synthetic data are normalized, wherein: After normalizing the original data, 70% of the data is used for the training set and 30% of the data is used for the test set. Subsequently, the generated data is added to the training set to construct a balanced training data set. Among them, the test set only contains the original data.
6. The method for nuclear power plant fault diagnosis based on data balancing according to claim 1, characterized in that: The step S5 constructs a CNN-BiLSTM diagnostic model, including: The convolution layer extracts local features, the pooling layer performs dimensionality reduction, the batch normalization layer improves the convergence speed, the bidirectional long short-term memory layer captures time dependency, the Dropout layer prevents overfitting, the fully connected layer outputs the classification results, and the Softmax layer converts the output into a probability distribution. The model is constructed in this order to form a CNN-BiLSTM neural network framework with input and output layers.
7. The method for nuclear power plant fault diagnosis based on data balancing according to claim 1, characterized in that: In step S6, the CNN-BiLSTM diagnostic model is used to iteratively train the balanced training set, including: Step S6.1, input the balanced training data set into the CNN-BiLSTM model in batches, generate initial output through forward propagation, take cross entropy loss as the optimization target, combine Adam optimization algorithm and gradient descent method to update weights, and gradually adjust the network layer weights in back propagation; Step S6.2, input the test set divided in step S4 into the CNN-BiLSTM diagnostic model for classification test, and use accuracy and precision indicators to evaluate the model performance. If it does not meet the expectations, adjust the hyperparameters until the requirements are met; Step S6.3, input the real-time operation data of the nuclear power plant into the CNN-BiLSTM diagnosis model with final parameter adjustment and performance optimization, and output the fault diagnosis results.
8. The method for nuclear power plant fault diagnosis based on data balancing according to claim 7, characterized in that: In step S6.2, the hyper parameters are adjusted, wherein: Hyperparameters include: number of neurons, batch size, learning rate, and number of training epochs.
9. The method for nuclear power plant fault diagnosis based on data balancing according to claim 1, characterized in that: In step S3, the network parameters of the model are optimized by using the loss function, including: The model parameters of the constructed embedding network, recovery network, generation network and discriminant network are optimized through the loss function.
10. The method for nuclear power plant fault diagnosis based on data balancing according to claim 4, characterized in that: The parameters of the SA-TimeGAN encoder component are optimized, wherein the encoder component includes an embedding network and a recovery network.
Citation Information
Patent Citations
Nuclear power station equipment fault diagnosis method and system
CN117930807A
Cited By
Fault detection method, device and equipment for crane mistaken hoisting scene and storage medium
CN120724353A
Crane mislifting scene fault detection method, device and equipment and storage medium
CN120724353B