# Research on Simulation and State Prediction of Nuclear Power System Based on LSTM Neural Network

Authors: Yusheng Chen; Meng Lin; Ren Yu; Tianshu Wang
Journal: Science and Technology of Nuclear Installations
 (2021)

---

## Abstract

The nuclear power plant systems are coupled with each other, and their operation conditions are changeable and complex. In the case of an operation fault in these systems, there will be a large number of alarm parameters, which can cause humans to be hurt in the accidents under great pressure. Therefore, it is necessary to predict the values of the key parameters of a device system. The prediction of the key parameters’ values can help operators determine the changing trends of system parameters in advance, which can effectively improve system safety. In this paper, a deep learning long short-term memory (LSTM) neural network model is developed to predict the key parameters of a nuclear power plant. The proposed network is verified by simulations and compared with the traditional grey theory. The simulation and comparison results show that the proposed LSTM neural network is effective and accurate in predicting the key parameters of the nuclear power plant.


---

## Body

## 1. Introduction

The existing control methods are based on the detection-response principle, so the safety control system makes the judgment on the system state and takes the corresponding action only after detecting abnormal situations [1, 2]. This type of control method, based on the feedback of the nuclear power plant system that uses the data generated by the reactor, is slow and incapable of making real-time decisions. The traditional statistical methods cannot accurately predict the nuclear power plant state under abnormal conditions since this is a nonlinear process [3, 4]. In recent years, the deep learning methods have been used to predict the operation state of various systems under different working conditions using the mining and analysis of massive historical data. These methods can predict the changing trend of the system’s operational parameters under different working conditions in real-time and, accordingly, upgrade the safety control of nuclear power plants from the response after occurrence to the prediction and early intervention. In this way, the safety margin of a nuclear power plant can be significantly improved, and the problem of inevitable abnormal conditions that the previous passive control methods face can be overcome. The change in key parameters of a nuclear power plant represents the operation state of the plant, that is why it plays an important role in the operation safety of the nuclear power plant and has been the subject of many operational and safety analyses of a nuclear power plant systems [5–7]. Thus, an accurate prediction of the changing trend of key parameters can help operators to discover abnormal parameters timely; thus, it is of great significance in the field of system control. In recent years, machine learning-based methods have been widely used in the image recognition field, speech recognition field, and other fields, and great progress has been achieved [8, 9]. Wei et al. combined the principal component analysis with the least squares support vector machine method, predicting the power plant load, and improved the prediction speed and accuracy by reducing the size of the prediction model input [10]. Hui et al. used the grey theory-based prediction to control the regulator in order to achieve the optimal control parameters [11]. Peng et al. proposed to track the changing trend of the dissolved gas concentration in the oil using the combination of the empirical mode decomposition and long short-term memory (LSTM) [12]. Zhang et al. used the bidirectional LSTM model and dynamic particle swarm optimization (DPSO) algorithm to balance global and local search abilities by adaptively adjusting the learning factors. The prediction accuracy and convergence speed of the model are improved [13]. The strong memory ability of the bidirectional long short-term memory (BiLSTM) network that was proposed by Yang and Zhao can help accurately distinguish the true positive from the preliminary test results, thus greatly reducing the number of false alarms [14]. Kumar and Malarvizhi developed a prediction model combining the bidirectional LSTM and convolutional neural network (CNN), in which the bidirectional LSTM is used to store POS marked time data and CNN is employed to extract potential features. The accuracy of emotion analysis was improved by 98.6% [15].In this paper, a deep learning long short-term memory (LSTM) neural network is proposed to predict the key parameters of the nuclear power plant. The LSTM model is improved by using BiLSTM-attention. The experimental results show that this method has better effect on the processing of nuclear power plant fluctuation data. Finally, the correctness of the method is verified by the prediction of the key parameters of the AP1000.


## 2. Data Sources

### 2.1. Nuclear Power Plant Simulation System Model

A nuclear power plant represents a complex system, and due to the immature data acquisition procedures and other irresistible reasons, the fault data of a nuclear power plant can be obtained very difficultly, so the amount of the fault data that can be collected is limited [16–19]. In addition, a small number of available fault data samples cause limitations on the data mining technology, which leads to inadequate data mining, which further reduces the prediction accuracy of a deep learning neural network model. In order to overcome the problem of a small amount of the nuclear power plant data, in this work, a cosine platform is used to build the primary-circuit system model of a nuclear power plant [20]. Through the simulation test of the developed model under the steady conditions and typical accident conditions, the operation characteristics of the proposed prediction model are analyzed qualitatively under different conditions. The obtained results can provide the necessary theoretical foundation and massive data support for further performance and accident analysis of nuclear power plants.The RELAP5 software is used to build the thermal-hydraulic model of the main system of the project analyzer. The proposed model consists of hydraulic components, thermal components, a point reactor model, control card, trip card, and signal interaction interface. Due to the limited space, in the following, only the development of hydraulic components, thermal components, and interfaces will be introduced. The AP1000 is used as a research object, and the established simulation model of a nuclear power plant system is shown in Figure1.Figure 1
The node diagram of the primary circuit of a nuclear power plant system.


### 2.2. Simulation of Steady-State Operation of Nuclear Power Plant

Under the condition of a full power steady-state operation, all operation control types are switched to the automatic state. The comparison between the predicted parameters and the parameters provided in the design handbook when the reactor system is operating at full power is provided in Table1. Through the analysis of the comparison results, it can be concluded that the steady-state conditions can be simulated well.Table 1
Comparison between the predicted and designed values of the main state parameters of the reactor.
NameUnitDesign valueCalculated valueErrorNuclear powerMW3400.03420.540.6%Turbine powerMW3415.03415.00Pressurizer pressureMPa15.515.500Average temperature of the primary circuitK574.04573.90−0.14Reactor inlet/outlet temperatureK553.8/596.5553.5/594.27−0.3/−2.23Steam generator secondary side pressureMPa6.025.98−0.04Steam generator water levelm13.4513.32−1.34%Main feed water temperatureK499.8499.85+0.05Steam flow ratekg/s950.0950.40.04%


### 2.3. Simulation of Nuclear Power Plant Transient Operation

Under the condition of a linear increase in the load, the turbine power is increased from 70% FP to 100% FP at the speed of 5% FP/min. The change in the turbine flow with the load is presented in Figure2, where it can be seen that the turbine flow increases linearly from 70% of the rated flow to 100% of the rated flow at the speed of 5%/min.Figure 2
The changing trend of the turbine flow at a linear increase in the load.The change in nuclear power with the load is shown in Figure3. Under the action of the reactor power control system, the referenced average temperature after conversion increases gradually due to the gradual increase in the turbine load. The average measured temperature is about zero, so the average reference temperature is larger than the measured one. The negative temperature deviation is obtained by subtracting the average measured temperature from the referenced one, while the negative power deviation is obtained by subtracting the turbine load from the nuclear power due to the increase in the turbine load. The negative temperature deviation overlaps the negative power deviation, and the deviation signal is generated through the rod speed and rod direction control module to generate the rod lifting signal and rod speed signal. Then, the rod speed and rod lifting signals are transformed into the increase in the rod position of the M-Bar group and, after that, into the increase in the positive reactivity. The positive reactivity signal is sent to the thermal model via the database platform, and then the nuclear power starts to increase. The increased nuclear power is sent back to the control and protection model, reducing the deviation signal and reactivity and forming a closed-loop control. As can be seen in Figure 3, the nuclear power of the reactor increases slowly with the load of the steam turbine and finally stabilizes at 100%.Figure 3
The changing trend of nuclear power at a linear increase in the load.As the load of the steam turbine increases, the heat taken away by the secondary circuit increases. So, the primary circuit has an average downward trend at the initial stage, and then the average temperature rises with the increase in nuclear power. The changing trend is shown in Figure4.Figure 4
The average temperature change with a linear increase in the load.The transient pressure curve of the pressurizer is shown in Figure5. Based on the analysis of the reactor power control curve and average transient temperature, the average temperature change has a great impact on the pressurizer pressure. At the initial stage, with the decrease in the average temperature, the pressurizer pressure also decreases. Then, when the average temperature increases due to the increase in nuclear power, the pressurizer pressure increases too. When the pressurizer reaches a certain value, the pressurizer pressure is mainly regulated by the pressurizer pressure control system. The pressurizer pressure control system mainly controls the heater and spray valve by comparing the measured pressure of the pressurizer with the set value of 15.5 MPa according to the pressure deviation signal through the PI and PID controllers. Due to the high pressure of the pressurizer, there is a positive pressure deviation after subtracting the pressure setting value from it, and this deviation is compensated by the PI controller. The positive compensation pressure difference is not enough to open the spray valve. However, as this difference increases slowly, the opening degree of the proportional electric heating decreases gradually, while the information about the opening degree signal of the proportional heater is sent to the thermal model through the database platform. According to this information, the thermal model reduces the heating capacity of electric heating, which decreases the pressurizer pressure. Then, the information about the pressurizer pressure is sent back to the control protection model, forming a closed-loop control. As presented in Figure 5, the pressurizer pressure in the later period decreased slowly and finally stabilized at 15.5 MPa.Figure 5
The change in the transient pressure of a pressurizer with a linear increase in the load.The transient response curve of the water level of the pressurizer is shown in Figure6. As presented in Figure 6, in the early stage, the transient response curve is similar to the pressurizer pressure curve, mainly due to the influence of the average temperature of the primary circuit, and in this stage, there is the first decline. In the later stage, the average temperature of the primary circuit and the self-control system increases. When the reference water level of the linear conversion of the average temperature of the primary circuit is higher than the measured water level of the pressurizer, a positive deviation signal is obtained by subtracting the measured water level from the reference water level after the action of the water level control system of the pressurizer. The positive deviation signal generates the closing signal of the charging pump and the opening signal of the drain valve, and these two signals are sent through different limit modules signals to the thermal model. In the thermal model, the water level of the pressurizer is increased by regulating the charging and discharging flows, and the information about the increased water level is sent back to the control protection model to form a closed-loop control. As shown in Figure 6, the final pressurizer level control is stable at the reference level.Figure 6
The transient water level of the pressurizer with the linear increase in the load.The transient water level curve of the evaporator is shown in Figure7, where it can be seen that under the action of the water level control system of the evaporator, the turbine load increases linearly from 70% FP to 100% FP, and the reference water level of the evaporator increases slowly after the linear transformation of the turbine load. By subtracting the reference water level of the evaporator from the measured water level of the evaporator, a positive water level difference is obtained. After the deviation signal passes through the PID controller, the opening degree of the main water supply valve increases and the opening signal of the valve is sent to the thermal model. Based on the received opening signal, the thermal model increases the main feedwater flow, and the water level of the evaporator also increases. After the increase, the water level of the evaporator returns to the control and protection model, thus forming a closed-loop control. As shown in Figure 7, the final evaporator water level is stable at the reference water level. Since the pressure of the evaporator is maintained in the normal range, by the action of the bypass control system, the bypass valve and the air release valve are closed, and the result is normal. Figure 7 shows that the side discharge is zero. Through the analysis, it can be concluded that the established control and protection system can provide efficient basic control functions, and the analyzer model can complete the linear power-up condition well.Figure 7
The transient water level of the evaporator with the linear increase in the load.


### 2.4. Prediction Data Selection and Preprocessing

By using the safety analysis results of the nuclear power plant, the impact of each design basis accident on each operation parameter can be analyzed, and the main characteristic parameters of each accident can be summarized. Combined with reference to the selection of safety parameters of other nuclear power plant safety state supervision systems, the safety function of a nuclear power plant is determined, dividing into the following six aspects, which can directly reflect the reactor system. Following the principle of the effectiveness of these safety functions, the first-level safety key parameters are selected as follows: reactor nuclear power, reactor outlet temperature, reactor main coolant flow, pressurizer pressure, steam generator water level, containment temperature, containment pressure, and pressurizer water level. The relationship between key safety functions and monitoring parameters is shown in Table2.Table 2
The relationship between the safety functions and monitoring parameters.
Security functionFirst-level safety key parameters1Reactivity controlReactor nuclear power (N)2Core coolingReactor outlet temperature (Thoutlet)3Core heat exportReactor main coolant flow (FCO)4Pressure boundary integrityPressurizer pressure (Ppressurizer) and steam generator water level (Lsteam generator)5Coolant capacityPressurizer water level (Lpressurizer)However, since the containment integrity is not considered in the simulator, for the time being, the six key parameters, namely, the reactor nuclear power (N), reactor outlet temperature (thoutlet), reactor main coolant flow (FCO), pressurizer pressure (Ppressurizer), steam generator water level (Lsteam generator), and pressurizer water level (Lpressurizer) are predicted. The experimental data were the data generated by the simulator, as presented in the following section. The data are given in Table 3.Table 3
Some of the key parameters of a nuclear power plant in the case of the LOCA accident.
Acquisition time (s)Pressurizer water level (MPa)Pressurizer pressure (m)SGlevel (m)SGpressure (MPa)⋯⋯015.57749−0.0815619756.49865−0.00173⋯⋯0.2515.57776−0.0814488286.49972−0.00174⋯⋯0.515.57804−0.0813362786.50083−0.00165⋯⋯0.7515.57831−0.0812244576.50196−0.00158⋯⋯115.57858−0.0811118656.50308−0.00162⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯14913.147024−7.0335988972.880910.65328In the nuclear power plant system, the application and development of a digital I&C system, sensors, and other data acquisition equipment provide a large amount of high-speed real-time data. These data are massive, so it is necessary to detect and mine the timing data of the plant system. The LOCA accident is one of the very important research subjects in the safety analysis of a nuclear power plant, and it is also one of the accidents with a high probability of occurrence in system equipment. Namely, when a LOCA accident occurs in the system, the first obvious reaction is a significant change in the pressurizer pressure. Besides, the pressurizer pressure value can reflect the safety state of the nuclear power plant system, which is one of several key parameters of a plant system. Therefore, in this paper, the pressurizer pressure is chosen as a research object of key parameter prediction. The nuclear power plant simulator that is presented in the following section is used to generate the simulation pressurizer pressure value of the LOCA accident; the simulator collects one dataset every 0.25 s. In spite of the 30-minute nonintervention principle of a nuclear power plant, the goal is to predict and evaluate the state of the nuclear power plant system in 30 minutes. In the simulation of 24 minutes, 5760 data samples were generated and collected to be used in the analysis. Namely, nuclear power can produce a large amount of data at every moment. A system fault often happens suddenly. In the view of the timeliness of data mining, the data have analytical value only before and after the failure. In accordance with the continuous time-series data, the sliding window technology is used to select the limited data segments before and after the failure. Next, the time-series data generated by the simulator are divided, and the timet is taken as the time base point, and the data corresponding to the time interval of [T – 250, t] seconds are used as the prediction sample to predict the data corresponding to the time interval of [T, t + 100]. In short, 250 data samples before the current time are used to predict the data in the next 100 s. In the actual system operation process, it can provide the operators with 100 s of nuclear power plant status warning. The schematic diagram of a part of the time-series data is shown in Figure 8. The safety margin of a nuclear power plant is increased to a certain extent.Figure 8
The schematic diagram of a part of the time-series data.


## 2.1. Nuclear Power Plant Simulation System Model

A nuclear power plant represents a complex system, and due to the immature data acquisition procedures and other irresistible reasons, the fault data of a nuclear power plant can be obtained very difficultly, so the amount of the fault data that can be collected is limited [16–19]. In addition, a small number of available fault data samples cause limitations on the data mining technology, which leads to inadequate data mining, which further reduces the prediction accuracy of a deep learning neural network model. In order to overcome the problem of a small amount of the nuclear power plant data, in this work, a cosine platform is used to build the primary-circuit system model of a nuclear power plant [20]. Through the simulation test of the developed model under the steady conditions and typical accident conditions, the operation characteristics of the proposed prediction model are analyzed qualitatively under different conditions. The obtained results can provide the necessary theoretical foundation and massive data support for further performance and accident analysis of nuclear power plants.The RELAP5 software is used to build the thermal-hydraulic model of the main system of the project analyzer. The proposed model consists of hydraulic components, thermal components, a point reactor model, control card, trip card, and signal interaction interface. Due to the limited space, in the following, only the development of hydraulic components, thermal components, and interfaces will be introduced. The AP1000 is used as a research object, and the established simulation model of a nuclear power plant system is shown in Figure1.Figure 1
The node diagram of the primary circuit of a nuclear power plant system.


## 2.2. Simulation of Steady-State Operation of Nuclear Power Plant

Under the condition of a full power steady-state operation, all operation control types are switched to the automatic state. The comparison between the predicted parameters and the parameters provided in the design handbook when the reactor system is operating at full power is provided in Table1. Through the analysis of the comparison results, it can be concluded that the steady-state conditions can be simulated well.Table 1
Comparison between the predicted and designed values of the main state parameters of the reactor.
NameUnitDesign valueCalculated valueErrorNuclear powerMW3400.03420.540.6%Turbine powerMW3415.03415.00Pressurizer pressureMPa15.515.500Average temperature of the primary circuitK574.04573.90−0.14Reactor inlet/outlet temperatureK553.8/596.5553.5/594.27−0.3/−2.23Steam generator secondary side pressureMPa6.025.98−0.04Steam generator water levelm13.4513.32−1.34%Main feed water temperatureK499.8499.85+0.05Steam flow ratekg/s950.0950.40.04%


## 2.3. Simulation of Nuclear Power Plant Transient Operation

Under the condition of a linear increase in the load, the turbine power is increased from 70% FP to 100% FP at the speed of 5% FP/min. The change in the turbine flow with the load is presented in Figure2, where it can be seen that the turbine flow increases linearly from 70% of the rated flow to 100% of the rated flow at the speed of 5%/min.Figure 2
The changing trend of the turbine flow at a linear increase in the load.The change in nuclear power with the load is shown in Figure3. Under the action of the reactor power control system, the referenced average temperature after conversion increases gradually due to the gradual increase in the turbine load. The average measured temperature is about zero, so the average reference temperature is larger than the measured one. The negative temperature deviation is obtained by subtracting the average measured temperature from the referenced one, while the negative power deviation is obtained by subtracting the turbine load from the nuclear power due to the increase in the turbine load. The negative temperature deviation overlaps the negative power deviation, and the deviation signal is generated through the rod speed and rod direction control module to generate the rod lifting signal and rod speed signal. Then, the rod speed and rod lifting signals are transformed into the increase in the rod position of the M-Bar group and, after that, into the increase in the positive reactivity. The positive reactivity signal is sent to the thermal model via the database platform, and then the nuclear power starts to increase. The increased nuclear power is sent back to the control and protection model, reducing the deviation signal and reactivity and forming a closed-loop control. As can be seen in Figure 3, the nuclear power of the reactor increases slowly with the load of the steam turbine and finally stabilizes at 100%.Figure 3
The changing trend of nuclear power at a linear increase in the load.As the load of the steam turbine increases, the heat taken away by the secondary circuit increases. So, the primary circuit has an average downward trend at the initial stage, and then the average temperature rises with the increase in nuclear power. The changing trend is shown in Figure4.Figure 4
The average temperature change with a linear increase in the load.The transient pressure curve of the pressurizer is shown in Figure5. Based on the analysis of the reactor power control curve and average transient temperature, the average temperature change has a great impact on the pressurizer pressure. At the initial stage, with the decrease in the average temperature, the pressurizer pressure also decreases. Then, when the average temperature increases due to the increase in nuclear power, the pressurizer pressure increases too. When the pressurizer reaches a certain value, the pressurizer pressure is mainly regulated by the pressurizer pressure control system. The pressurizer pressure control system mainly controls the heater and spray valve by comparing the measured pressure of the pressurizer with the set value of 15.5 MPa according to the pressure deviation signal through the PI and PID controllers. Due to the high pressure of the pressurizer, there is a positive pressure deviation after subtracting the pressure setting value from it, and this deviation is compensated by the PI controller. The positive compensation pressure difference is not enough to open the spray valve. However, as this difference increases slowly, the opening degree of the proportional electric heating decreases gradually, while the information about the opening degree signal of the proportional heater is sent to the thermal model through the database platform. According to this information, the thermal model reduces the heating capacity of electric heating, which decreases the pressurizer pressure. Then, the information about the pressurizer pressure is sent back to the control protection model, forming a closed-loop control. As presented in Figure 5, the pressurizer pressure in the later period decreased slowly and finally stabilized at 15.5 MPa.Figure 5
The change in the transient pressure of a pressurizer with a linear increase in the load.The transient response curve of the water level of the pressurizer is shown in Figure6. As presented in Figure 6, in the early stage, the transient response curve is similar to the pressurizer pressure curve, mainly due to the influence of the average temperature of the primary circuit, and in this stage, there is the first decline. In the later stage, the average temperature of the primary circuit and the self-control system increases. When the reference water level of the linear conversion of the average temperature of the primary circuit is higher than the measured water level of the pressurizer, a positive deviation signal is obtained by subtracting the measured water level from the reference water level after the action of the water level control system of the pressurizer. The positive deviation signal generates the closing signal of the charging pump and the opening signal of the drain valve, and these two signals are sent through different limit modules signals to the thermal model. In the thermal model, the water level of the pressurizer is increased by regulating the charging and discharging flows, and the information about the increased water level is sent back to the control protection model to form a closed-loop control. As shown in Figure 6, the final pressurizer level control is stable at the reference level.Figure 6
The transient water level of the pressurizer with the linear increase in the load.The transient water level curve of the evaporator is shown in Figure7, where it can be seen that under the action of the water level control system of the evaporator, the turbine load increases linearly from 70% FP to 100% FP, and the reference water level of the evaporator increases slowly after the linear transformation of the turbine load. By subtracting the reference water level of the evaporator from the measured water level of the evaporator, a positive water level difference is obtained. After the deviation signal passes through the PID controller, the opening degree of the main water supply valve increases and the opening signal of the valve is sent to the thermal model. Based on the received opening signal, the thermal model increases the main feedwater flow, and the water level of the evaporator also increases. After the increase, the water level of the evaporator returns to the control and protection model, thus forming a closed-loop control. As shown in Figure 7, the final evaporator water level is stable at the reference water level. Since the pressure of the evaporator is maintained in the normal range, by the action of the bypass control system, the bypass valve and the air release valve are closed, and the result is normal. Figure 7 shows that the side discharge is zero. Through the analysis, it can be concluded that the established control and protection system can provide efficient basic control functions, and the analyzer model can complete the linear power-up condition well.Figure 7
The transient water level of the evaporator with the linear increase in the load.


## 2.4. Prediction Data Selection and Preprocessing

By using the safety analysis results of the nuclear power plant, the impact of each design basis accident on each operation parameter can be analyzed, and the main characteristic parameters of each accident can be summarized. Combined with reference to the selection of safety parameters of other nuclear power plant safety state supervision systems, the safety function of a nuclear power plant is determined, dividing into the following six aspects, which can directly reflect the reactor system. Following the principle of the effectiveness of these safety functions, the first-level safety key parameters are selected as follows: reactor nuclear power, reactor outlet temperature, reactor main coolant flow, pressurizer pressure, steam generator water level, containment temperature, containment pressure, and pressurizer water level. The relationship between key safety functions and monitoring parameters is shown in Table2.Table 2
The relationship between the safety functions and monitoring parameters.
Security functionFirst-level safety key parameters1Reactivity controlReactor nuclear power (N)2Core coolingReactor outlet temperature (Thoutlet)3Core heat exportReactor main coolant flow (FCO)4Pressure boundary integrityPressurizer pressure (Ppressurizer) and steam generator water level (Lsteam generator)5Coolant capacityPressurizer water level (Lpressurizer)However, since the containment integrity is not considered in the simulator, for the time being, the six key parameters, namely, the reactor nuclear power (N), reactor outlet temperature (thoutlet), reactor main coolant flow (FCO), pressurizer pressure (Ppressurizer), steam generator water level (Lsteam generator), and pressurizer water level (Lpressurizer) are predicted. The experimental data were the data generated by the simulator, as presented in the following section. The data are given in Table 3.Table 3
Some of the key parameters of a nuclear power plant in the case of the LOCA accident.
Acquisition time (s)Pressurizer water level (MPa)Pressurizer pressure (m)SGlevel (m)SGpressure (MPa)⋯⋯015.57749−0.0815619756.49865−0.00173⋯⋯0.2515.57776−0.0814488286.49972−0.00174⋯⋯0.515.57804−0.0813362786.50083−0.00165⋯⋯0.7515.57831−0.0812244576.50196−0.00158⋯⋯115.57858−0.0811118656.50308−0.00162⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯14913.147024−7.0335988972.880910.65328In the nuclear power plant system, the application and development of a digital I&C system, sensors, and other data acquisition equipment provide a large amount of high-speed real-time data. These data are massive, so it is necessary to detect and mine the timing data of the plant system. The LOCA accident is one of the very important research subjects in the safety analysis of a nuclear power plant, and it is also one of the accidents with a high probability of occurrence in system equipment. Namely, when a LOCA accident occurs in the system, the first obvious reaction is a significant change in the pressurizer pressure. Besides, the pressurizer pressure value can reflect the safety state of the nuclear power plant system, which is one of several key parameters of a plant system. Therefore, in this paper, the pressurizer pressure is chosen as a research object of key parameter prediction. The nuclear power plant simulator that is presented in the following section is used to generate the simulation pressurizer pressure value of the LOCA accident; the simulator collects one dataset every 0.25 s. In spite of the 30-minute nonintervention principle of a nuclear power plant, the goal is to predict and evaluate the state of the nuclear power plant system in 30 minutes. In the simulation of 24 minutes, 5760 data samples were generated and collected to be used in the analysis. Namely, nuclear power can produce a large amount of data at every moment. A system fault often happens suddenly. In the view of the timeliness of data mining, the data have analytical value only before and after the failure. In accordance with the continuous time-series data, the sliding window technology is used to select the limited data segments before and after the failure. Next, the time-series data generated by the simulator are divided, and the timet is taken as the time base point, and the data corresponding to the time interval of [T – 250, t] seconds are used as the prediction sample to predict the data corresponding to the time interval of [T, t + 100]. In short, 250 data samples before the current time are used to predict the data in the next 100 s. In the actual system operation process, it can provide the operators with 100 s of nuclear power plant status warning. The schematic diagram of a part of the time-series data is shown in Figure 8. The safety margin of a nuclear power plant is increased to a certain extent.Figure 8
The schematic diagram of a part of the time-series data.


## 3. Experimental Verification and Analysis

### 3.1. Prediction of Key Parameters of Nuclear Power Plant Based on Grey Theory

The collected time-series data of the steam generator water are used to predict the parameters of a nuclear power plant based on the grey theory. In order to ensure the feasibility of the modeling method, it should be tested. According to equation (1), the order ratio of the sequence can be calculated as follows:(1)λk=xok−1x0k,k=1,2,...,n.If all the grade ratios are in the range ofe−2/n+1,e2/n+2, the series can be used as the data of GM (1, 1) model for the grey theory-based prediction.As shown in Figures9–12, the prediction accuracy of the data series with a lower slope after 200 s was high, but there was an obvious fluctuation before the time reached the value 200 s. The error between the predicted and actual data was relatively large. The decline in the predicted data was not as severe as that of the measured data. According to the grey theory principle, the prediction model first accumulated the original data to generate a new sequence before the prediction. In this process, the irregular changes would be regarded as interference, and the sharp changes would be smoothed during the accumulation process. Therefore, though the predicted data reflected the trend of the target data, there were some errors. When the measured data were declining step-by-step, as shown in Figure 10, the predicted data fluctuated to a certain extent and showed certain inertia. Through the analysis, the system is too large in the calculation and then leads to the prediction data and the actual measurement data error.Figure 9
The comparison of the actual and predicted data of the pressurizer pressure.Figure 10
The comparison of actual and predicted data of the steam generator water level.Figure 11
The comparison of the actual and predicted coolant temperature data.Figure 12
The comparison of the actual and predicted data of the steam generator pressure.


### 3.2. Prediction of Key Parameters of Nuclear Power Plant Based on LSTM

The LSTM was first proposed by Hochreiter and Schmidhuber [19]. The LSTM can effectively model the long-term dependence of data and thus avoid gradient disappearance or explosion. In fact, the LSTM was designed to solve long-term dependency problems. Compared with the traditional RNN, the unique structure of the LSTM is its ingenious design of the circulatory structure. Since the information in the network can be persistent, the LSTM is more suitable to deal with the sequence prediction. The LSTM uses two gates to control the content of unit state, the forgetting gate, which determines how much the unit state ct−1 at the previous time is reserved to the current time ct, and the input gate, which determines how much the input xt of the current time is saved to the unit state ct. The output gate is used by the LSTM to control how much the unit state ct outputs to the current output value ht of the LSTM. The loop structure of the LSTM is shown in Figure 13.(1)
Forget the Doorft. The activation function of the forgetting gate is a sigmoidal function, and its output is between 0 and 1. When the output is 0, no information is allowed to pass; when the output result is 1, all information is allowed to pass; lastly, when the output result is between (0, 1), part of the information is allowed to pass, which is expressed by the following:(2)ft=σWf∗ht−1,xt+bf,whereσ () denotes the sigmoid function, Wf denotes the weight matrix of a variable, ht−1 denotes the hidden layer output at T−1, xt denotes the input at time t, and bf represents the offset.(2)
Input Gateit. The input gate decides which information will be retained in the memory unit. First, the updated information is determined by ht−1, xt, and sigmoid functions. Then, the tanh activation function is used to create a new vector z to determine the update value of the next state memory unit. Finally, the product of the last state value Ct−1 of the memory unit and the output ft of the forgetting gate is used to determine how much old information is left. The update value of a cell Ct is obtained from the sum of the retained old information ft⋅Ct−1 and the updated new information it⋅Z, as given by the following:(3)it=σWi∗ht−1,xt+bi,Z=tanhWc∗ht−1,xt+bc,Ct=ft∗Ct−1+it∗Z.(3)
The output gate consists of two parts. First, the output information is determined byht−1,xt, and activation function (sigmoid function), and then tanh activation function is applied to the memory unit Ct, and the output ht is obtained by multiplying with it. Since the memory unit Ct already contains the retained old information ft⋅Ct−1 and the updated new information it⋅Z, the final ht is determined based on the output, retaining the old and updated information.Figure 13
The structure of the LSTM neural network.The main advantages of this method compared with the neural networks used in noise processing are high accuracy, strong parallel distributed processing ability, large distributed storage and learning ability, and high robustness and fault tolerance. Also, it provides a full approximation of complex nonlinear relationships and associative memory. However, this method has certain disadvantages, which are as follows: the neural network needs a large number of training samples, it is unable to observe the learning process, and the output results are difficult to understand, which all affect the credibility and acceptability of the prediction results. When the collected time-series data were used as the input of the LSTM and neural network, the prediction results shown in Figures14–17 were obtained.Figure 14
The comparison of the actual and predicted data of the steam generator water level.Figure 15
The comparison of the actual and predicted data of the steam generator water level.Figure 16
The comparison of the actual and predicted data of the coolant temperature.Figure 17
The comparison of the actual and predicted data of the steam generator pressure.As presented in Figures14–17, there was a relatively stable change in the time-series data and the grey theory-based prediction achieved relatively high accuracy. However, the error between the LSTM prediction data and actual measurement data was even smaller. Also, for data sequences with obvious fluctuations, the LSTM prediction fluctuation has a certain lag without fluctuation. Thus, the LSTM prediction model using the forgetting gate, input gate, and output gate has better robustness in the time-series data prediction.


### 3.3. Comparative Analysis of Prediction Accuracy

In this section, the data predicted by the LSTM model were compared with the data generated by the nuclear power plant simulation system [20]. The similarity of these two datasets and the residuals was calculated under different working conditions. The changing trend and difference between the predicted and actual data were analyzed. The validity of the proposed prediction model was verified from different perspectives. In order to evaluate the prediction accuracy of the proposed model, the predictions based on the grey theory and the LSTM method were compared.Evaluation Index. The prediction accuracies of the models based on the grey theory and LSTM network were compared. The RMSE was used as the evaluation index, and it was calculated by equation (4) [21], where S denoted the dataset, i denoted the index of S, I denoted an input sequence, Mi represented the observed data, Ni represented the corresponding output data, and Ni denoted the data generated by the prediction model. The evaluation criteria are used based on the related literature [22], and they are shown in Table 4.(4)RMSE=1S∑i=1SNi−Mi21/2.Table 4
The precision inspection level reference table.
Model accuracy levelMean square deviation ratioCSmall error probabilityPExcellentC ≤ 0.350.95 ≤PGood0.35 <C ≤ 0.50.80 ≤P<0.95Qualified0.5 <C ≤ 0.650.70 ≤P<0.8Unqualified0.65 <CP<0.7By using equation (4), the RMSE values of the model based on the grey theory and the LSTM model were calculated, and they are presented in Table 5.Table 5
The prediction error of the model based on the grey theory.
Prediction error of the grey theory-based modelPrediction error of the LSTM modelPressurizer pressure0.447410.369274Steam generator water level0.619700.25622Steam generator pressure0.210470.12045Coolant temperature0.51230.33452As shown in Table5, the error of the LSTM model was smaller than that of the grey theory-based model, so the data predicted by the LSTM model reflected the system state of the nuclear power plant better.


### 3.4. Prediction of Key Parameters of Nuclear Power Plant Based on BiLSTM-Attention

It can be seen from the above that the prediction accuracy of ordinary LSTM for the fluctuation parameters of the nuclear power plant is low; although compared with the prediction results of grey theory, it has a certain improvement. However, there is a big error with the actual collected data. Therefore, it is necessary to further improve the LSTM. Through literature research, the bidirectional long short-term memory (BiLSTM) neural network has achieved good prediction results in other fields. Compared with BiLSTM, LSTM can only predict the output of the next moment according to the timing information of the previous time. However, in some problems, the output of the current moment is not only related to the previous state but also to the previous state. It may have something to do with the state of the future. There are two LSTM models in BiLSTM structure (Figure18), one is forward operation with time and the other is reverse operation with time. The reverse implementation essentially reverses the input timing data and then input it into the reverse LSTM. In this way, BiLSTM can obtain the data feature information in both positive and negative directions at the current node. In this way, the BiLSTM intermediate layer stores two values: one is to participate in forward calculation before Cpre and the other is to participate in reverse calculation after parameter Cpost. The final calculated value depends on Cpre and Cpost.Figure 18
Schematic diagram of BiLSTM.In addition, attention mechanism is widely studied in neuroscience and computational neuroscience. Attention mechanism has been used in deep learning, speech recognition, translation, reasoning, and visual recognition. The target mechanism can highlight more important information by assigning different weights to the hidden layer unit of the neural network. The input of attention is the data H1, H2, …… Ht−1, Ht. The weight vector is calculated according to the input vector of the current layer. Its function is to capture the internal relations of the output data of the BiLSTM layer, so as to pay more attention to BiLSTM and screen out important information. The weight calculation of the attention layer is shown in the following formula:(5)ui=vtanhwHt+uHi+b,σi=softmaxui=expui∑j=1tuj,H¯i=∑i=1tσiHi,where ơi is the attention weight of the historical hidden layer to the current input hidden layer, w and u are the weight matrix, b is the offset matrix, and H¯i is the output vector through the attention mechanism. A new vector is obtained by combining the weight and the input vector of the current layer. The vector is input into the full connection layer to calculate the predicted value. The output layer obtains the output Y = [y1, y2, ……yt]T which is shown in Figure 19, yi is the predicted output at the i moment, and wi is the weight matrix. It was calculated by the following equation:(6)yi=fwiH¯i+c.Figure 19
Schematic diagram of BiLSTM-attention.Therefore, based on the BiLSTM prediction model, this paper constructs a key parameter prediction model based on BiLSTM-attention to study the key operating parameters of the nuclear power plant. In this paper, the BiLSTM-attention nuclear power plant prediction model is established. The model is used for experimental verification and research.First of all, the target data are normalized; because after the data normalization, the optimization process of the optimal solution will obviously become smooth, and it is easier to correctly converge to the optimal solution. Then, the normalized data are constructed by sliding window because the data set can be input into the constructed neural network. Then, the BiLSTM-attention model is used to predict the data, and the data of the first 200 seconds are used to predict the data of the next second. Finally, the error between the predicted value and the actual measured value is calculated. If the error is large, the model parameters are adjusted and the adjusted model is trained. If the error is small, the model training is completed.


### 3.5. Analysis of Prediction Results

In this paper, the LSTM neural network program is developed by python, the LSTM prediction model with 128 hidden layers is established, and the initial key parameters are input into the LSTM prediction model, and the predicted values are calculated. The calculation results are shown in Figure20. At the same time, the prediction results of grey theory are given for comparison.Figure 20
The comparison of the actual and predicted data of the steam generator water level.It can be seen from the figure that the prediction model based on BiLSTM-attention has better predictability for the fluctuation data; especially when the target data show the fluctuation state, the prediction model can also generate the fluctuation trend, which is the effect that the grey theory and LSTM model cannot achieve. According to the error formula, the error calculation rate is 0.1345. Compared with grey theory and LSTM prediction model, the error is greatly reduced. Therefore, it can be seen that the prediction model of BiLSTM-attention has better prediction effect.


## 3.1. Prediction of Key Parameters of Nuclear Power Plant Based on Grey Theory

The collected time-series data of the steam generator water are used to predict the parameters of a nuclear power plant based on the grey theory. In order to ensure the feasibility of the modeling method, it should be tested. According to equation (1), the order ratio of the sequence can be calculated as follows:(1)λk=xok−1x0k,k=1,2,...,n.If all the grade ratios are in the range ofe−2/n+1,e2/n+2, the series can be used as the data of GM (1, 1) model for the grey theory-based prediction.As shown in Figures9–12, the prediction accuracy of the data series with a lower slope after 200 s was high, but there was an obvious fluctuation before the time reached the value 200 s. The error between the predicted and actual data was relatively large. The decline in the predicted data was not as severe as that of the measured data. According to the grey theory principle, the prediction model first accumulated the original data to generate a new sequence before the prediction. In this process, the irregular changes would be regarded as interference, and the sharp changes would be smoothed during the accumulation process. Therefore, though the predicted data reflected the trend of the target data, there were some errors. When the measured data were declining step-by-step, as shown in Figure 10, the predicted data fluctuated to a certain extent and showed certain inertia. Through the analysis, the system is too large in the calculation and then leads to the prediction data and the actual measurement data error.Figure 9
The comparison of the actual and predicted data of the pressurizer pressure.Figure 10
The comparison of actual and predicted data of the steam generator water level.Figure 11
The comparison of the actual and predicted coolant temperature data.Figure 12
The comparison of the actual and predicted data of the steam generator pressure.


## 3.2. Prediction of Key Parameters of Nuclear Power Plant Based on LSTM

The LSTM was first proposed by Hochreiter and Schmidhuber [19]. The LSTM can effectively model the long-term dependence of data and thus avoid gradient disappearance or explosion. In fact, the LSTM was designed to solve long-term dependency problems. Compared with the traditional RNN, the unique structure of the LSTM is its ingenious design of the circulatory structure. Since the information in the network can be persistent, the LSTM is more suitable to deal with the sequence prediction. The LSTM uses two gates to control the content of unit state, the forgetting gate, which determines how much the unit state ct−1 at the previous time is reserved to the current time ct, and the input gate, which determines how much the input xt of the current time is saved to the unit state ct. The output gate is used by the LSTM to control how much the unit state ct outputs to the current output value ht of the LSTM. The loop structure of the LSTM is shown in Figure 13.(1)
Forget the Doorft. The activation function of the forgetting gate is a sigmoidal function, and its output is between 0 and 1. When the output is 0, no information is allowed to pass; when the output result is 1, all information is allowed to pass; lastly, when the output result is between (0, 1), part of the information is allowed to pass, which is expressed by the following:(2)ft=σWf∗ht−1,xt+bf,whereσ () denotes the sigmoid function, Wf denotes the weight matrix of a variable, ht−1 denotes the hidden layer output at T−1, xt denotes the input at time t, and bf represents the offset.(2)
Input Gateit. The input gate decides which information will be retained in the memory unit. First, the updated information is determined by ht−1, xt, and sigmoid functions. Then, the tanh activation function is used to create a new vector z to determine the update value of the next state memory unit. Finally, the product of the last state value Ct−1 of the memory unit and the output ft of the forgetting gate is used to determine how much old information is left. The update value of a cell Ct is obtained from the sum of the retained old information ft⋅Ct−1 and the updated new information it⋅Z, as given by the following:(3)it=σWi∗ht−1,xt+bi,Z=tanhWc∗ht−1,xt+bc,Ct=ft∗Ct−1+it∗Z.(3)
The output gate consists of two parts. First, the output information is determined byht−1,xt, and activation function (sigmoid function), and then tanh activation function is applied to the memory unit Ct, and the output ht is obtained by multiplying with it. Since the memory unit Ct already contains the retained old information ft⋅Ct−1 and the updated new information it⋅Z, the final ht is determined based on the output, retaining the old and updated information.Figure 13
The structure of the LSTM neural network.The main advantages of this method compared with the neural networks used in noise processing are high accuracy, strong parallel distributed processing ability, large distributed storage and learning ability, and high robustness and fault tolerance. Also, it provides a full approximation of complex nonlinear relationships and associative memory. However, this method has certain disadvantages, which are as follows: the neural network needs a large number of training samples, it is unable to observe the learning process, and the output results are difficult to understand, which all affect the credibility and acceptability of the prediction results. When the collected time-series data were used as the input of the LSTM and neural network, the prediction results shown in Figures14–17 were obtained.Figure 14
The comparison of the actual and predicted data of the steam generator water level.Figure 15
The comparison of the actual and predicted data of the steam generator water level.Figure 16
The comparison of the actual and predicted data of the coolant temperature.Figure 17
The comparison of the actual and predicted data of the steam generator pressure.As presented in Figures14–17, there was a relatively stable change in the time-series data and the grey theory-based prediction achieved relatively high accuracy. However, the error between the LSTM prediction data and actual measurement data was even smaller. Also, for data sequences with obvious fluctuations, the LSTM prediction fluctuation has a certain lag without fluctuation. Thus, the LSTM prediction model using the forgetting gate, input gate, and output gate has better robustness in the time-series data prediction.


## 3.3. Comparative Analysis of Prediction Accuracy

In this section, the data predicted by the LSTM model were compared with the data generated by the nuclear power plant simulation system [20]. The similarity of these two datasets and the residuals was calculated under different working conditions. The changing trend and difference between the predicted and actual data were analyzed. The validity of the proposed prediction model was verified from different perspectives. In order to evaluate the prediction accuracy of the proposed model, the predictions based on the grey theory and the LSTM method were compared.Evaluation Index. The prediction accuracies of the models based on the grey theory and LSTM network were compared. The RMSE was used as the evaluation index, and it was calculated by equation (4) [21], where S denoted the dataset, i denoted the index of S, I denoted an input sequence, Mi represented the observed data, Ni represented the corresponding output data, and Ni denoted the data generated by the prediction model. The evaluation criteria are used based on the related literature [22], and they are shown in Table 4.(4)RMSE=1S∑i=1SNi−Mi21/2.Table 4
The precision inspection level reference table.
Model accuracy levelMean square deviation ratioCSmall error probabilityPExcellentC ≤ 0.350.95 ≤PGood0.35 <C ≤ 0.50.80 ≤P<0.95Qualified0.5 <C ≤ 0.650.70 ≤P<0.8Unqualified0.65 <CP<0.7By using equation (4), the RMSE values of the model based on the grey theory and the LSTM model were calculated, and they are presented in Table 5.Table 5
The prediction error of the model based on the grey theory.
Prediction error of the grey theory-based modelPrediction error of the LSTM modelPressurizer pressure0.447410.369274Steam generator water level0.619700.25622Steam generator pressure0.210470.12045Coolant temperature0.51230.33452As shown in Table5, the error of the LSTM model was smaller than that of the grey theory-based model, so the data predicted by the LSTM model reflected the system state of the nuclear power plant better.


## 3.4. Prediction of Key Parameters of Nuclear Power Plant Based on BiLSTM-Attention

It can be seen from the above that the prediction accuracy of ordinary LSTM for the fluctuation parameters of the nuclear power plant is low; although compared with the prediction results of grey theory, it has a certain improvement. However, there is a big error with the actual collected data. Therefore, it is necessary to further improve the LSTM. Through literature research, the bidirectional long short-term memory (BiLSTM) neural network has achieved good prediction results in other fields. Compared with BiLSTM, LSTM can only predict the output of the next moment according to the timing information of the previous time. However, in some problems, the output of the current moment is not only related to the previous state but also to the previous state. It may have something to do with the state of the future. There are two LSTM models in BiLSTM structure (Figure18), one is forward operation with time and the other is reverse operation with time. The reverse implementation essentially reverses the input timing data and then input it into the reverse LSTM. In this way, BiLSTM can obtain the data feature information in both positive and negative directions at the current node. In this way, the BiLSTM intermediate layer stores two values: one is to participate in forward calculation before Cpre and the other is to participate in reverse calculation after parameter Cpost. The final calculated value depends on Cpre and Cpost.Figure 18
Schematic diagram of BiLSTM.In addition, attention mechanism is widely studied in neuroscience and computational neuroscience. Attention mechanism has been used in deep learning, speech recognition, translation, reasoning, and visual recognition. The target mechanism can highlight more important information by assigning different weights to the hidden layer unit of the neural network. The input of attention is the data H1, H2, …… Ht−1, Ht. The weight vector is calculated according to the input vector of the current layer. Its function is to capture the internal relations of the output data of the BiLSTM layer, so as to pay more attention to BiLSTM and screen out important information. The weight calculation of the attention layer is shown in the following formula:(5)ui=vtanhwHt+uHi+b,σi=softmaxui=expui∑j=1tuj,H¯i=∑i=1tσiHi,where ơi is the attention weight of the historical hidden layer to the current input hidden layer, w and u are the weight matrix, b is the offset matrix, and H¯i is the output vector through the attention mechanism. A new vector is obtained by combining the weight and the input vector of the current layer. The vector is input into the full connection layer to calculate the predicted value. The output layer obtains the output Y = [y1, y2, ……yt]T which is shown in Figure 19, yi is the predicted output at the i moment, and wi is the weight matrix. It was calculated by the following equation:(6)yi=fwiH¯i+c.Figure 19
Schematic diagram of BiLSTM-attention.Therefore, based on the BiLSTM prediction model, this paper constructs a key parameter prediction model based on BiLSTM-attention to study the key operating parameters of the nuclear power plant. In this paper, the BiLSTM-attention nuclear power plant prediction model is established. The model is used for experimental verification and research.First of all, the target data are normalized; because after the data normalization, the optimization process of the optimal solution will obviously become smooth, and it is easier to correctly converge to the optimal solution. Then, the normalized data are constructed by sliding window because the data set can be input into the constructed neural network. Then, the BiLSTM-attention model is used to predict the data, and the data of the first 200 seconds are used to predict the data of the next second. Finally, the error between the predicted value and the actual measured value is calculated. If the error is large, the model parameters are adjusted and the adjusted model is trained. If the error is small, the model training is completed.


## 3.5. Analysis of Prediction Results

In this paper, the LSTM neural network program is developed by python, the LSTM prediction model with 128 hidden layers is established, and the initial key parameters are input into the LSTM prediction model, and the predicted values are calculated. The calculation results are shown in Figure20. At the same time, the prediction results of grey theory are given for comparison.Figure 20
The comparison of the actual and predicted data of the steam generator water level.It can be seen from the figure that the prediction model based on BiLSTM-attention has better predictability for the fluctuation data; especially when the target data show the fluctuation state, the prediction model can also generate the fluctuation trend, which is the effect that the grey theory and LSTM model cannot achieve. According to the error formula, the error calculation rate is 0.1345. Compared with grey theory and LSTM prediction model, the error is greatly reduced. Therefore, it can be seen that the prediction model of BiLSTM-attention has better prediction effect.


## 4. Conclusion

The LSTM neural network has great advantages in processing time-series data. In this paper, the LSTM neural network method is used to study the prediction technology of nuclear power plant key parameters, and the LSTM model is improved. The target mechanism and BiLSTM are combined to establish the data prediction model of the nuclear power plant based on BiLSTM-attention deep learning. By analyzing a large number of process parameters of the nuclear power plant, the original time-domain signal data are input into the neural network for training to improve the prediction accuracy. Compared with the prediction data based on the traditional grey theory model, the results show that the LSTM model has higher accuracy in the prediction of nuclear power plant time sequence data. BiLSTM-attention has a better accuracy for the prediction of fluctuation time-series data, which has certain reference significance for the application of the intelligent algorithm in the nuclear power plant.Authors are grateful to Chinese Nuclear Energy Development and Research Projects “Research on Fault Diagnosis Technology of Marine Nuclear Power System Based on Deep Learning Neural Network Artificial Intelligence” for providing the financial support for this study.



---

*Source: 8839867-2021-03-04.xml*