Steam generator water level intelligent control method, training method, device, system and equipment
Through the combination of LSTM network and real-time communication framework, intelligent control of steam generator water level is realized, the problem of hysteresis of steam generator water level control is solved, the control effect and reliability are improved, and the continuous upgrade of the model is supported.
Patent Information
- Application Number
- CN202510409545.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, the water level control of steam generators has a lag, it is difficult to respond to water level changes in time, it is impossible to predict future trends in advance, and its control ability is limited.
The LSTM network is used to perform PID control error prediction, combined with the real-time communication framework, and the steam generator water level control is used to use the trained intelligent control model to decouple intelligent logic from traditional control logic, and realize water level prediction and control through cascading PID controllers.
It improves the effect and reliability of steam generator water level control, can better adapt to dynamic changes, and supports subsequent upgrade and iteration of network models.
Smart Images

Figure CN120255590A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automatic control technologies, and particularly to an intelligent control method, a training method, a device, a system and equipment for the water level of a steam generator. Background Art
[0002] A steam generator is one of the key equipment of a pressurized water nuclear power plant, which realizes the heat transfer between the coolant in the primary loop and the feed water in the secondary loop, and at the same time forms a physical isolation between the primary loop and the secondary loop, ensuring the safe operation of the reactor. To achieve this heat transfer, the cooling water in the secondary loop must maintain a relatively stable amount to fully absorb the heat provided by the coolant in the primary loop, form high-temperature steam with a certain pressure, and then enter the steam turbine to do work. Whether the steam generator can operate safely and reliably will have a significant impact on the economy, safety and reliability of the entire nuclear power plant. And the liquid level height of the steam generator is one of the key indicators to measure the current working state of the steam generator.
[0003] A steam generator is a fourth-order system with a large time delay, and its water level can usually be controlled by a cascade (series) proportional integral derivative (PID) control method through two controllers, namely an outer-layer PID and an inner-layer PID. However, the PID control method has the characteristic of hysteresis, is difficult to respond to the change of the water level in a timely manner, and cannot predict the future change trend of the water level in advance, so the control ability is limited. Summary of the Invention
[0004] The present application provides an intelligent control method, a training method, a device, a system and equipment for the water level of a steam generator, which can solve one of the problems existing in the background art.
[0005] To achieve the above object, the present application adopts the following technical solutions:
[0006] In a first aspect, a training method for an intelligent control model of the water level of a steam generator is provided, and the training method includes:
[0007] Obtaining training data; and
[0008] Using the training data to train the intelligent control model,
[0009] wherein the training data is cascade proportional integral derivative PID historical control data, and the intelligent control model is used to obtain a prediction result required for cascade PID control by using a loss function defined by a true value and a predicted value.
[0010] Based on the above technical solution, the implementation of the LSTM network for PID control error prediction, combined with the real-time communication framework, can not only achieve the water level control of the steam generator in the nuclear power plant with better effect and high reliability, but also make full use of the advanced framework and network structure of artificial intelligence to decouple the intelligent logic from the traditional control logic, which is suitable for the subsequent upgrade and iteration of the network model.
[0011] It can be understood that the predicted result required for PID control is the input of the outer PID controller. The outer PID controller obtains the corresponding control quantity according to this input to control the water level of the steam generator.
[0012] In a possible design of the first aspect, the intelligent control model includes: a long short-term memory network (LSTM) cascade unit with an input gate, a forget gate, and an output gate, and a fully connected layer. The output of the LSTM cascade unit serves as the input of the fully connected layer.
[0013] In a possible design of the first aspect, the method includes:
[0014] Using the backpropagation tool method provided by the PyTorch language and the Adam optimizer to initialize the intelligent control model; and
[0015] In each round of training, adjusting the parameters of the intelligent control model according to the loss function value using the gradient descent algorithm.
[0016] In a possible design of the first aspect, the training data is obtained by preprocessing the original data. The original data is the steam generator liquid level error data expressed as a one-dimensional data matrix. The preprocessing includes:
[0017] Using the PyTorch language to two-dimensionalize the original data.
[0018] In the second aspect, a method for intelligent control of the water level of a steam generator is provided. The control method includes:
[0019] Obtaining the historical control data of the cascade PID controller for a predetermined historical period;
[0020] Using the trained intelligent control model as described above to process the historical control data of the cascade PID controller to obtain the predicted value required for cascade PID control; and
[0021] Controlling the water level of the steam generator according to the predicted value required for cascade PID control.
[0022] In the third aspect, a training device for an intelligent control model of the water level of a steam generator is provided. The training device includes:
[0023] A first acquisition unit for acquiring training data; and
[0024] A training unit for training the intelligent control model by using the training data,
[0025] wherein the training data is cascaded PID historical control data, and the intelligent control model is used to: obtain a cascaded PID control prediction result by using a loss function defined by a true value and a predicted value.
[0026] In a fourth aspect, an intelligent control device for the water level of a steam generator is provided. The control device includes:
[0027] A second acquisition unit for acquiring the cascaded PID controller historical control data for a predetermined historical period;
[0028] A prediction unit for processing the cascaded PID controller historical control data by using the trained intelligent control model as described above to obtain a predicted value required for cascaded PID control; and
[0029] A control unit for controlling the water level of the steam generator according to the predicted value required for cascaded PID control.
[0030] In a fifth aspect, an electronic device is provided. The electronic device includes: a processor, and a memory coupled to the processor. The memory is used for storing a computer program; the processor is used for executing the computer program stored in the memory so that the electronic device executes the training method according to any possible implementation manner in the first aspect, or executes the control method according to the second aspect.
[0031] In a sixth aspect, a computer-readable storage medium is provided, including a computer program or instruction. When the computer program or instruction runs on a computer, the computer is enabled to execute the training method according to any possible implementation manner in the first aspect, or execute the control method according to the second aspect.
[0032] In a seventh aspect, a computer program product is provided, including: a computer program or instruction. When the computer program or instruction runs on a computer, the computer is enabled to execute the training method according to any possible implementation manner in the first aspect, or execute the control method according to the second aspect. Description of the Drawings
[0033] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the accompanying drawings required for use in the embodiments or the description of related technologies. Obviously, the accompanying drawings in the following description are only some embodiments of the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0034] Figure 1 It is a working schematic structural diagram of the intelligent control system for the water level of a nuclear power plant steam generator provided by the embodiment of the present application. Specific implementation manners
[0035] In order to make the objectives, technical solutions and advantages of the present application clearer, the following further details the present application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0036] It should be noted that although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from the module division in the device or the flowchart. Terms such as "first" and "second" in the description, claims and the above-mentioned accompanying drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence.
[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0038] One of the objectives of the present invention is to provide a communication protocol that decouples the intelligent control logic from the traditional control logic.
[0039] Another objective of the present invention is to provide an intelligent control method for the water level of a nuclear power plant steam generator that incorporates the communication protocol.
[0040] A third objective of the present invention is to provide a control simulation system that implements the communication protocol and the intelligent control method.
[0041] To achieve the above objectives, the present invention is implemented according to the following technical solutions. The following content is an exemplary illustration:
[0042] 1. The communication protocol for decoupling the intelligent control logic from the traditional control logic provided in this embodiment includes the following components:
[0043] The encapsulation and decapsulation methods of the original data.
[0044] The protocol stipulates that the original data obtained from simulating each component must be encapsulated into 8-byte data chunks. Every two data chunks form a group, which is divided into a head data chunk and a tail data chunk. The head data chunk stores the valid length information of the tail data segment, and the tail data segment stores the generated data. When all bytes in the tail data segment are valid bytes, the head data segment consists of all zero bytes. For data chunks less than 8 bytes, 0x0 bytes are filled at the head of the tail data chunk to make it up; for data exceeding 8 bytes, the data is sliced into 8-byte tail data slices, and the slices less than 8 bytes are filled and made up. Each tail data slice corresponds to a head data slice.
[0045] For a specific component in a particular simulation, assuming the length of the original data it generates is fixed, therefore, for a specific component, the number of data chunks generated at each sampling time is determined.
[0046] The unpacking method is the reverse process of encapsulation. By performing the reverse processing of the above encapsulation on the data chunks, the original data information of the corresponding platform is obtained;
[0047] Timer setting. To ensure the unified calculation of the global time, a unique timer is set, and the time step is t. The sampling time of the simulation software is obtained through software parsing and calculation. The time step corresponding to the i-th sampling is t i , and there is actually a situation where the parsed value is not an integer multiple of t i To avoid the influence of these uneven data, the following regulations are made for the sampling protocol:
[0048] The sampling time step t is 1×10 -n , where n is a positive integer;
[0049] The sampling time points t that meet the requirements i must be integer multiples of the sampling time step t.
[0050] The above regulations ensure that the timestamps of the sampled data are uniform, and its mathematical expression is:
[0051]
[0052] Transmission buffer setting. The TCP / IP protocol is a C / S architecture. If one party is set as the Server, the other party is the Client. Since there may be a difference between the data generation speed and the reception speed, in order to avoid the loss of the required data, the corresponding buffer needs to be specified. For component j (1 ≤ j ≤ N), the required buffer size S[j] (unit: byte) is determined by the following formula:
[0053] S[j] = d[j] × T0 / t
[0054] Among them, d[j] is the byte length of the required original data. T0 is the time scale determined by the user, and this value can be freely adjusted to change the buffer size. When implementing in actual programming or hardware deployment, S[j] stipulates the minimum requirement for the buffer size of component i, that is, it can accommodate at least all the data generated within the specified time.
[0055] The implementation part of the system framework includes the implementation part on the simulation system side and the implementation part on the intelligent side.
[0056] For the external intelligent control program, a TCP / IP server implemented in the corresponding programming language is used to support data transmission for connection.
[0057] For the simulation system that supports external access, a TCP / IP client implemented in the corresponding programming language is used to support data transmission.
[0058] For the simulation system that supports TCP / IP programming internally (such as MATLAB Simulink), the internal provided module can be used to implement the TCP / IP client.
[0059] For the components implemented in a specific programming language in the simulation system, a TCP / IP server implemented in the specific programming language can be used for communication.
[0060] It should be noted that: the intelligent control model or the intelligent control module described later actually predicts the input required by the next steam generator PID controller, that is, the error between the actual value and the target value of the controlled object, because PID works based on the feedback of the error.
[0061] The intelligent control method for the water level of the nuclear power plant steam generator provided in this embodiment includes the following steps:
[0062] S1. Obtain the historical data information of the cascade PID control system of the nuclear power plant steam generator;
[0063] S2. Preprocess the data information obtained in step S1 to obtain the training data set;
[0064] S3. Based on the LSTM network, construct an initial model for predicting the water level error of the PID input of the nuclear power plant steam generator;
[0065] S4. Use the data set obtained in step S2 to train the initial model for predicting the water level error of the PID input of the nuclear power plant cascade steam generator constructed in step S3 to obtain a prediction model for the PID input error of the nuclear power plant steam generator;
[0066] S5. When the nuclear power plant steam generator is running, use the prediction model for the water level error of the PID input of the nuclear power plant steam generator obtained in step S4 to intelligently predict the water level error required by the steam generator PID controller;
[0067] S6. The input water level error predicted based on step S5 is the input of the PID controller, realizing the cascade PID control of the water level of the steam generator in the nuclear power plant.
[0068] Among them, constructing the initial model for predicting the PID control error of the steam generator in the nuclear power plant based on the LSTM network in step S3 includes the following steps:
[0069] The constructed prediction model for the PID input error of the steam generator in the nuclear power plant includes three layers: an input layer, a hidden layer, and an output layer.
[0070] For the said input layer, the input and output are mapped using the following formula:
[0071] O (1) = x1
[0072] where O (1) represents the output of the first layer, and the superscript 1 represents the layer number; x1 represents the input of the first layer.
[0073] For the said hidden layer, the input and output are mapped using the following formula:
[0074] O (2) = LSTM(O (1) )
[0075] The said LSTM function is composed of an LSTM cell and a linear output layer.
[0076] The said LSTM cell includes a forget gate, an input gate, an output gate, and a cell gate, and has a cell state and a hidden state.
[0077] The said input gate is used to calculate the new information stored in the cell state of the LSTM, and is calculated through the following formula:
[0078] i t = σ(W ii x t + b ii + W hi h t-1 + b hi )
[0079] In the formula, W is the adjustable weight of the input gate, b is the adjustable bias value; x t is the input of the neuron at time t, h t-1 is the hidden state at time t - 1, and when it is time 0, it represents the initial hidden state. σ is the sigmoid function, and i t is the output of the input gate.
[0080] The forget gate is used to calculate what information to discard from the cell state. It is calculated by the following formula:
[0081] f t = σ(W if x t + b if + W hf h t-1 + b hf )
[0082] where W is the adjustable weight of the forget gate and b is the adjustable bias value; f t is the calculation result of the forget gate.
[0083] The output gate is used to calculate the output at the current time. It is calculated by the following formula:
[0084] o t = σ(W io x t + b io + W ho h t-1 + b ho )
[0085] where W is the adjustable weight of the output gate and b is the adjustable bias value; o t is the calculation result of the output gate.
[0086] The cell gate is used to participate in the calculation of the cell state. It is calculated by the following formula:
[0087] g t = tanh(W ig x t + b ig + W hg h t-1 + b hg )
[0088] where tanh is the tanh function, and its calculation formula is:
[0089]
[0090] W is the adjustable weight of the cell gate and b is the adjustable bias value.
[0091] The formula for updating the cell state of the LSTM cell is:
[0092] c t = f t ⊙ c t-1 + i t ⊙ g t
[0093] where ct , c t-1 Output corresponding to the unit states at time t and t-1. ⊙ is the Hadamard product.
[0094] The formula for updating the hidden state of the LSTM unit is as follows:
[0095] h t = o t ⊙ tanh(c t )
[0096] In the formula, h t is the hidden state output.
[0097] The function of the linear output layer is to reduce the output of the high-dimensional LSTM network to the dimension of the required result. Its calculation method is:
[0098] O (3) = A T O (2) + b
[0099] In the formula, A T is the linear output layer matrix, which performs a multiplication operation with the output matrix O (2) of the LSTM network output, and b is the linear output layer bias vector.
[0100] The training described in step S4 specifically includes the following steps:
[0101] The following function is used as the loss function:
[0102]
[0103] In the formula, E represents the value of the loss function; N is the total number of training samples, y i is the true value of the i-th sample, and y' i is the predicted value of the i-th sample.
[0104] This embodiment also provides a nuclear power plant steam generator water level intelligent control simulation system for implementing the foregoing communication protocol and intelligent prediction method. Its structure is as Figure 1 shown, including three parts: an intelligent control module, a real-time communication framework, and a control system. The real-time communication framework implements the foregoing communication protocol and is responsible for data encapsulation and data transfer between the intelligent control module and the control system; the intelligent control module encapsulates the above neural network and provides a control error prediction value; the control system uses the above error control value as input to the PID to control the steam generator.
[0105] The intelligent control module is implemented using the PyTorch programming framework and the Python language.
[0106] The described control system is implemented using the Simulink graphical simulation framework in conjunction with the MATLAB programming language.
[0107] The implementation of the described real-time communication framework is divided into two parts, located on the intelligent system side and the control system side respectively. On the intelligent system side, a TCP / IP client and data encapsulation and sending logic are implemented using the Python language; on the control system side, a TCP / IP server is implemented using the MATLAB language, and a clock is provided. At the same time, the functions of data encapsulation, sending, and timestamp verification are implemented.
[0108] The intelligent control simulation system for the water level of the steam generator in a nuclear power plant provided in this embodiment realizes the prediction of the PID control error by the LSTM network by introducing the PyTorch programming framework. In conjunction with the real-time communication framework, it can not only control the water level of the steam generator in the nuclear power plant with better effect and high reliability, but also make full use of the advanced framework and network structure of artificial intelligence to decouple the intelligent logic from the traditional control logic, which is suitable for subsequent network model upgrade and iteration. In addition, LSTM is a network structure with temporal memory and has a strong ability to learn historical information.
[0109] Further exemplarily, as Figure 1 shown, the intelligent control simulation system for the water level of the steam generator in a nuclear power plant provided in this embodiment includes the following working steps:
[0110] S101. Establish a TCP / IP connection at the steam generator and the neural network intelligent module.
[0111] S201. Package the measured liquid level height value at the steam generator of the nuclear power plant to form a data slice.
[0112] S301. Use the real-time communication framework to transmit the packaged data of the steam generator liquid level height measurement to the intelligent module.
[0113] S401. The framework unpacks the packaged value and hands it over to the intelligent module for data prediction to obtain the liquid level control amount at the next time step.
[0114] S5. The framework packages the control amount and uses the TCP / IP communication protocol to transmit the control amount to the steam generator to adjust the liquid level height.
[0115] The construction of the simulation system includes the following steps:
[0116] S11. Use Simulink to build a basic model of the simulated steam generator system. The specific steps include:
[0117] Set the simulation time and sampling step size;
[0118] Set the water level regulation target. The regulation target value is achieved according to specific goals. The regulation target value can be set as a constant, that is, to keep the water level in the steam generator at a constant value. It is implemented using the Simulink Constant function module, which can output a stable constant value during simulation;
[0119] Select the transfer function of the steam generator and determine the parameters. Without loss of generality, the steam generator transfer function model identified by Irving from actual operation data can be used:
[0120]
[0121] Among them, Y(s) is the water level transfer function of the steam generator, s is the Laplace operator; G1, G2, G3 are constants; τ0 represents the delay time when the steam generator produces the "false water level" phenomenon; τ is the oscillation delay time; T is the oscillation period; G w (s) is the feed water flow transfer function, G s (s) is the steam flow transfer function. The setting of relevant parameters is related to the power of the steam generator in specific simulations and can be simplified under certain circumstances. The transfer function is implemented using the Simulink TransferFunction module;
[0122] Feed water or steam disturbances can also be set, which are implemented using a unit step signal and can send a step signal at a specified time point;
[0123] Build a cascaded PID controller, as shown by PID Controller 1 and PID Controller 2 in Figure 1 . The calculation formula of the PID controller is:
[0124]
[0125] Among them, K p is the proportional coefficient, which controls the magnification of the error; e(t) is the error received by the PID controller at time t (PID input); K p e(t) expresses the error information at the current time point; K i is the integral coefficient, ∫e(t)dt is the integral of the historical error, and K i ∫e(t)dt expresses the error information within the past time points; K p is the differential coefficient, is the differential of the error at the current time point, expresses the trend information of the next error change. The sum of these three parts forms the control quantity u(t) generated by the PID controller.
[0126] The cascade PID parameters can be set using an experience-based method or methods such as the Ziegler–Nichols method;
[0127] Set up a cascade feedback unit. The PID controller requires a feedback unit, which is implemented using a gain element, and the gain parameter is set to 1;
[0128] Set up an observation unit, which is used to observe the output of the steam generator system. It is implemented using an oscilloscope component, and the observed data is the liquid level height of the steam generator.
[0129] S21. Construct a PyTorch intelligent prediction module. The intelligent prediction module includes a network implemented as a cascade of 128 LSTM units and a fully connected output layer for the initial intelligent control model of the water level of the nuclear power plant steam generator. The output of the LSTM cascade is the computational output of all LSTM units at the last time step, which is converted into a 1D output, i.e., the predicted control error, through the output fully connected layer and fed back to the outer PID controller for control quantity calculation.
[0130] During specific implementation, it includes the following steps:
[0131] Obtain the historical data information of the nuclear power plant steam generator, perform preprocessing, and obtain a training dataset;
[0132] The preprocessing mentioned above is the process of organizing the original information into a dataset using a program.
[0133] The original information is a series of steam generator liquid level error data (i.e., the original PID historical error input data) obtained by sampling at equal time intervals. Each data is of the double 8-byte data type, and the original data can be regarded as a one-dimensional numerical matrix (matrix dimension 1×L, where L is the number of data sampling points);
[0134] The dataset is composed of several tensors in time order. Each tensor contains 10 sampling results of PID historical error input data and 1 sampling result of future input data. The dataset is obtained by two-dimensionalizing the original information using the method provided by the PyTorch programming framework. The two-dimensionalization means traversing the original data in sequence, each time selecting 10 data starting from the current position and forming a row of a two-dimensional matrix. Finally, all rows are concatenated into a new numerical matrix of L×10. Subsequently, this matrix can be converted into the tensor form required for PyTorch input using the method provided by the PyTorch framework, and the dimension of the tensor is also L×10. The first row is the data at time 0, the second row is the data at time 1, and so on until the last row of data.
[0135] Build a network using the PyTorch framework that consists of 128 cascaded LSTM units and 1 fully connected layer for output.
[0136] For the said network, the output of each layer is calculated by input data in conjunction with an activation function. The following formula is used as the activation function for the input gate of the LSTM unit:
[0137] i t = σ(W ii x t + b ii + W hi h t-1 + b hi )
[0138] In the formula, i t is the calculation result of the input gate; W ii is the input gate weight; W hi is the output weight of the input gate at time t-1, b ii is the input gate bias, b hi is the output bias of the input gate at time t-1; x t is the input data at time t, i.e., the (t + 1)-th row in the tensor input.
[0139] The following formula is used as the processing function for the forget gate of the LSTM unit:
[0140] f t = σ(W if x t + b if + W hf h t-1 + b hf )
[0141] In the formula, f t is the calculation result of the forget gate; W if is the forget gate weight; W hf is the output weight of the forget gate at time t-1, b if is the forget gate bias, b hf is the output bias of the forget gate at time t-1;
[0142] The following formula is used as the processing function for the output gate of the LSTM:
[0143] o t = σ(W io x t + b io + W ho h t-1 + b ho )
[0144] In the formula, o tis the calculation result of the output gate; W io is the output gate weight; W hf is the output weight of the output gate at time t-1, b if is the output gate bias, b hf is the output bias of the output gate at time t-1;
[0145] The following formula is used as the LSTM cell gate processing function:
[0146] g t =tanh(W ig x t +b ig +W hg h t-1 +b hg )
[0147] In the formula, g t is the calculation result of the cell gate; W ig is the cell gate weight; W hg is the output weight of the cell gate at time t-1, b ig is the cell gate bias, b hg is the output bias of the cell gate at time t-1;
[0148] The following formula is used as the LSTM cell state update method:
[0149] c t =f t ⊙c t-1 +i t ⊙g t
[0150] In the formula, c t is the new LSTM cell state, and ⊙ is the Hadamard product.
[0151] The following formula is used as the LSTM cell hidden state update method:
[0152] h t =o t ⊙tanh (c t )
[0153] In the formula, h t is the new LSTM cell hidden state, and ⊙ is the Hadamard product.
[0154] For the said network, the calculation method of the fully connected linear layer is:
[0155] O (3) =A T O (2) +b
[0156] In the formula, A Tis the linear output layer matrix, which performs a multiplication operation with the output matrix O of the LSTM network. b is the bias vector of the linear output layer. (2) During training, the network extracts the final hidden state h of all LSTM layers
[0157] (where L is the number of the aforementioned sampling points and also represents the final stopping time) tensor, that is, the aforementioned O L ; input it into the fully connected linear layer, and according to the calculation method of the output of the aforementioned linear layer, finally obtain the output of the overall network. (2)
[0158] S31. Use the training data set obtained in step S2 to train the initial model of the intelligent control of the water level of the nuclear power plant steam generator constructed in step S3.
[0159] For the said training, the following function is used as the loss function:
[0160]
[0161] In the formula, E represents the value of the loss function; N is the total number of training samples, y i is the true value of the i-th sample, and y' i is the predicted value of the i-th sample.
[0162] Using the backpropagation tool method provided by the PyTorch language and the Adam optimizer, first pass in the network parameter information for initialization; subsequently, after each round of training in step S2, pass in the value calculated by the loss function; finally, Adam can automatically adjust the values of the weight matrix and bias in the above activation function. After multiple trainings, make E reach a stable low level (10 -4 ~10 -5 order of magnitude) value to complete the network training.
[0163] The said Adam optimizer is a program tool that uses the gradient descent technology algorithm with an adaptive matrix to automatically adjust the network weights. This algorithm is used to accelerate the gradient descent algorithm by considering the "exponentially weighted average" of the gradient. Using the average value makes the algorithm converge to the minimum value at a faster speed. The following formula is used to adjust the weights at each step:
[0164] w t+1 = w t -αm t
[0165] where
[0166]
[0167] m t is the sum of gradients at time t, m t-1is the total gradient at time (t - 1), w t is the weight adjusted at time t, w t+1 is the weight at time (t + 1), α is the learning rate hyperparameter, which can be used to control the rate of weight change in each round of optimization. The hyperparameter can be specified by oneself, and α = 0.001 is taken during the training process; δL is the derivative of the loss function with respect to time, δw t is the derivative of the weight with respect to time at time t; β is the moving average exponent, which is used to control the proportion of the gradient from the previous moment and the current newly added gradient change in the calculation of the gradient matrix m t in the calculation. Here, m t is the default value 0.9 selected by PyTorch.
[0168] For the Adam optimizer described above, the PyTorch framework provides a utility function that can be directly utilized.
[0169] S41. Use the MATLAB language to implement an M function with TCP / IP server function, connect it to the steam generator transfer function module to collect and send data.
[0170] S51. Use the Python language to implement a program with TCP / IP client function, connect it to the intelligent module trained in step S3, collect the original liquid level error value and provide it to the intelligent control module for prediction. The intelligent control module predicts a new adjustment error value based on 10 historical error values and transmits it back to the PID controller through the real-time communication framework.
[0171] The embodiment of the present application also provides a training device for the intelligent control model of the steam generator water level. The training device includes:
[0172] The first acquisition unit is used to obtain training data; and
[0173] The training unit is used to train the intelligent control model by using the training data,
[0174] wherein, the training data is the cascaded proportional integral differential PID historical control data, and the intelligent control model is used to: obtain the prediction result required for cascaded PID control by using the loss function defined by the true value and the predicted value.
[0175] The embodiment of the present application also provides an intelligent control device for the steam generator water level. The control device includes:
[0176] The second acquisition unit is used to obtain the cascaded PID controller historical control data of a predetermined historical period;
[0177] A prediction unit, configured to process the historical control data of the cascade PID controller by using the trained intelligent control model as described above, to obtain a predicted value required for cascade PID control; and
[0178] A control unit, configured to perform water level control of the steam generator according to the predicted value required for cascade PID control.
[0179] An embodiment of the present application further provides an electronic device, including: a processor, and a memory coupled to the processor, where the memory is configured to store a computer program; the processor is configured to execute the computer program stored in the memory, so that the electronic device executes the method described in any one of the above embodiments.
[0180] The electronic device may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The electronic device may include, but is not limited to, a processor and a memory.
[0181] The so-called processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may also be any conventional processor, etc. The processor is the control center of the electronic device, and connects various parts of the entire device through various interfaces and lines.
[0182] The memory may be used to store the computer program. The processor realizes various functions of the electronic device by running or executing the computer program stored in the memory and calling the data stored in the memory.
[0183] The memory may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function, etc.; the data storage area may store data created according to the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
[0184] The embodiments of the present application also provide a storage medium, which is a computer-readable storage medium. The computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0185] The embodiments of the present application also provide a computer program product, including: a computer program or instruction. When the computer program or instruction runs on a computer, the computer is enabled to execute the method of any of the above possible implementation manners.
[0186] The above is the preferred implementation manner of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present application.
Claims
1. A training method for an intelligent control model of the water level of a steam generator, characterized in that, The training method includes: Obtaining training data; and Using the training data to train the intelligent control model, wherein the training data is cascade PID historical control data, and the intelligent control model is used to: obtain the prediction results required for cascade PID control by using a loss function defined by a true value and a predicted value.
2. The training method according to claim 1, wherein The intelligent control model includes: a long short-term memory network (LSTM) cascade unit provided with an input gate, a forget gate, and an output gate, and a fully connected layer, and the output of the LSTM cascade unit serves as the input of the fully connected layer.
3. The training method according to claim 1, characterized in that The method includes: Using the backpropagation tool method provided by the PyTorch language and using the Adam optimizer to initialize the intelligent control model; and In each round of training, adjusting the parameters of the intelligent control model according to the loss function value by using the gradient descent algorithm.
4. The training method according to claim 1, wherein, The training data is obtained by preprocessing the original data, and the original data is steam generator liquid level error data expressed as a one-dimensional data matrix. The preprocessing includes: Using the PyTorch language to two-dimensionalize the original data.
5. An intelligent control method for the water level of a steam generator, characterized in that, The control method includes: Obtaining the cascade PID controller historical control data for a predetermined historical period; Using the trained intelligent control model according to any one of claims 1-4 to process the cascade PID controller historical control data to obtain the prediction values required for cascade PID control; and Performing steam generator water level control according to the prediction values required for cascade PID control.
6. A training device for an intelligent control model of the water level of a steam generator, characterized in that, The training device includes: A first acquisition unit for obtaining training data; and A training unit for using the training data to train the intelligent control model, wherein the training data is cascade PID historical control data, and the intelligent control model is used to: obtain the prediction results required for cascade PID control by using a loss function defined by a true value and a predicted value.
7. An intelligent water level control device for a steam generator, characterized in that, The control device includes: A second acquisition unit for obtaining the cascade PID controller historical control data for a predetermined historical period; A prediction unit for using the trained intelligent control model according to any one of claims 1-4 to process the cascade PID controller historical control data to obtain the prediction values required for cascade PID control; and A control unit for performing steam generator water level control according to the prediction values required for cascade PID control.
8. An intelligent control system for the water level of a steam generator, characterized in that, The control system includes: A PID controller; The trained intelligent control model according to any one of claims 1-4, and A real-time communication framework disposed between the cascade PID controller and the intelligent control model for realizing communication between the cascade PID controller and the intelligent control model.
9. An electronic device, characterized in that, The electronic device includes: a processor and a memory coupled to the processor, The memory is used to store a computer program; and The processor is used to execute the computer program stored in the memory so that the electronic device executes the training method according to any one of claims 1-4 or executes the control method according to claim 5.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program or instructions that, when run on a computer, cause the computer to execute the training method according to any one of claims 1-4, or execute the control method according to claim 5.