Neural network module implementation method based on domestic DCS platform
By using model file transfer and setting of model update variables on the domestic DCS platform, online update of neural network models is realized, solving the problem that traditional DCS platforms are difficult to update neural network models online, and improving the practical application effect of modeling algorithms.
Patent Information
- Application Number
- CN202411788356.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-28
AI Technical Summary
Traditional DCS platforms are difficult to achieve online updates of neural network models, resulting in poor effectiveness of neural network modeling algorithms in actual applications.
Through model file transfer, the neural network model is saved in the form of a file to an independent loading area, and combined with the settings of model update variables, the online update of the neural network model is realized.
The online update of the neural network model is realized, so that it can accurately reflect the characteristics of the system and operating equipment, and improve the automation level of the unit.
Smart Images

Figure CN119721166A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent coal-fired thermal power generation units, and in particular to a method for realizing a neural network module based on a domestic DCS platform. Background Art
[0002] The systems and operating equipment of thermal power units have the characteristics of large inertia, strong nonlinearity, and many interference factors, which makes it difficult to establish an accurate model of the unit using traditional mechanism modeling methods. Neural networks have been widely used in the unit modeling process due to their powerful feature extraction and expression of nonlinear mapping capabilities.
[0003] The traditional DCS (Distributed Control System) is limited by the closed system and insufficient computing power, and it is impossible to realize the embedded application of neural network algorithms. With the research and promotion of the domestic DCS platform, based on the characteristics of independent development, flexible application and high-performance controller of the domestic DCS platform, it provides a platform foundation for the embedded application of neural network modeling algorithms. However, due to factors such as equipment aging and system transformation, the characteristics of generator equipment and systems will gradually change. In order to prevent the model from not matching the actual situation, the neural network model needs to be retrained from time to time, and the model structure and parameters need to be updated to ensure the accuracy of the model. The operation of updating the neural network model in DCS requires recompiling and downloading the controller. For the sake of safe operation, it usually needs to be performed during the unit shutdown, resulting in the inability to update the neural network model in time. Since the established model cannot accurately reflect the current system operation, the actual application effect of the neural network modeling algorithm is not good.
[0004] In traditional DCS, the neural network modeling algorithm can only be implemented by using PLC or server "plug-in" methods, which has many problems such as poor openness, difficult operation and maintenance, inconsistent standards, and chaotic system.
[0005] With the continuous demand for intelligence, many domestic DCS platforms have begun to open up the development rights of DCS systems, providing a foundation for the embedded application of neural network modeling algorithms. However, if the existing solution needs to update the model, it can only recompile and download the controller after offline training. For safety reasons, this operation needs to be performed during the unit shutdown. Due to the inability to solve the problem of online model update, the neural network modeling algorithm is not effective in actual engineering applications. Summary of the invention
[0006] The purpose of the present invention is to provide a method for realizing a neural network module based on a domestic DCS platform. Aiming at the problem that it is difficult to update the neural network model online when the DCS embedded neural network module is embedded, a model file transmission method is adopted to save each neural network model in the form of a file to an independent loading area. With the setting of the model update variable, the model can be flexibly loaded, and the online update of the neural network model is realized, so that the neural network model can accurately reflect the characteristics of the system and the running equipment.
[0007] The purpose of the present invention can be achieved by the following technical solutions:
[0008] A method for implementing a neural network module based on a domestic DCS platform includes the following steps:
[0009] According to the development specifications of the domestic DCS platform, a neural network algorithm program is developed, and the parameters of the neural network model required by the algorithm are represented by matrix variables. The input of the neural network algorithm program includes the input features required by the algorithm and the model update variables;
[0010] Save the matrix variables of the neural network model after offline training as a data file and store it in the set path;
[0011] The neural network algorithm program sets the neural network model parameters by reading the matrix variables in the data file under the set path, loads the neural network model, and determines the program running state according to the value of the current model update variable, and the program running state includes the normal running state and the model loading state;
[0012] When the program is in normal operation, the input features required by the algorithm are obtained, and the operation results are output using the neural network model;
[0013] When the program is in the loading model state, it re-reads the latest data file in the set path. The latest data file is calculated by offline training to obtain new matrix variables and saved. The neural network model is updated according to the matrix variables in the data file. During the update process, the program continuously outputs the output at the last moment when it entered the loading model state as the running result.
[0014] The model update variable is of Boolean type. When its value is true, the neural network model needs to be updated and the program enters the model loading state. When its value is false, the neural network model does not need to be updated and the program is in normal operation.
[0015] The parameters of the neural network model include the weights and thresholds of neurons in each layer.
[0016] The data file is updated in an overwrite mode. When a data file is updated, the original data file is overwritten in the corresponding path.
[0017] When the program enters the model loading state and reaches a preset time, the model is updated and the values of the update variables are updated so that the program enters the normal operating state. The program outputs the operating results according to the updated neural network model.
[0018] In the domestic DCS platform development environment, the neural network algorithm program is compiled into a dynamic link library file and packaged into a graphical neural network module according to the packaging rules. The input of the program is packaged as the input pin in the corresponding graphical neural network module. The module performs calculations by loading the dynamic link library file, reads the input required by the program by obtaining the value of the input pin, and outputs it through the output pin.
[0019] The graphical neural network module reads the module ID number assigned to itself by the domestic DCS platform, and automatically establishes a corresponding folder in the controller as the set path based on the module ID number; when multiple graphical neural network modules are added to the domestic DCS platform, the modules read the data files under the respective paths through the set paths generated by the module ID numbers.
[0020] When the method is used for modeling a thermal power unit, the input features required by the algorithm are the actual values of the operating parameters of the thermal power unit, and the output operating results are the predicted values of the operating parameters of the thermal power unit.
[0021] The thermal power unit operation parameters include analog quantities such as temperature, pressure, flow rate, etc. of the thermal power unit equipment and digital quantity signals such as operation status, stop status, manual / automatic status, etc. The model update variables are set by manual adjustment.
[0022] Compared with the prior art, the present invention has the following beneficial effects:
[0023] In view of the problem that it is difficult to update the neural network model parameters online in a DCS embedded neural network module, the present invention adopts a model file transmission method to save the neural network model parameters used by each graphical neural network module in the form of a file to an independent loading area, and combines the setting of model update variables to flexibly load the model, thereby realizing the online update of the neural network model, enabling the neural network model to accurately reflect the characteristics of the system and operating equipment, and providing strong support for improving the automation level of the unit. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a flow chart of the method of the present invention;
[0025] Figure 2 A schematic diagram of input and output pins of a graphical BP neural network module in an embodiment;
[0026] Figure 3 A comparison curve diagram of the main steam temperature prediction value output by the neural network module in one embodiment and the actual main steam temperature. DETAILED DESCRIPTION
[0027] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0028] Example 1
[0029] This embodiment provides a method for implementing a neural network module based on a domestic DCS platform. Figure 1 As shown, the following steps are included:
[0030] S1, develop a neural network algorithm program and use matrix variables to represent the parameters of the neural network model required by the algorithm.
[0031] This embodiment develops a neural network algorithm program according to the development specifications of the domestic DCS platform, and establishes a matrix variable G as the weight and threshold of each layer of neurons in the neural network model. The program loads G by reading the data file under the set path.
[0032] Add a special input signal in the neural network algorithm program - model update variable s. Model update variable s is of Boolean type, with values of True or False. When its value is True, the neural network model needs to be updated and the program enters the model loading state; when its value is False, the neural network model does not need to be updated and the program is in normal operation.
[0033] In this embodiment, the model update variable is manually set according to actual needs. In other embodiments, an automatic setting method can also be adopted. For example, when a data file update is detected, the value of the model update variable is automatically changed from False to True.
[0034] That is, the input of the neural network algorithm program in this application includes the input features required by the algorithm and the model update variables.
[0035] S2, saves the matrix variables of the neural network model completed by offline training as a data file and stores it in the set path.
[0036] In this embodiment, the update of the data file adopts the overwrite mode. When the data file is updated, the original data file is overwritten in the corresponding path. After the neural network model is obtained through offline training, the weights and thresholds of the neurons in each layer of the model are saved as data files and updated to the data files in the set path.
[0037] S3, the neural network algorithm program sets the neural network model parameters by reading the matrix variables in the data file under the set path, loads the neural network model, and determines the program running state according to the value of the current model update variable, wherein the program running state includes a normal running state and a model loading state;
[0038] In this embodiment, in the domestic DCS platform development environment, the neural network algorithm program is compiled into a dynamic link library file, and is packaged into a graphical neural network module according to the packaging rules. The input of the program is packaged as the input pin in the corresponding graphical neural network module. The module performs calculations by loading the dynamic link library file, reads the input required by the program by obtaining the value of the input pin, and outputs it through the output pin.
[0039] The graphical neural network module reads the module ID number assigned to itself by the domestic DCS platform, and automatically creates a corresponding folder in the controller as the set path based on the module ID number; when multiple graphical neural network modules are added to the domestic DCS platform, the modules read the data files under their respective paths through the set paths generated by the module ID numbers, avoiding confusion in reading file paths and ensuring unique correspondence between files and modules.
[0040] S4, when the program is in normal operation, the input features are obtained and the neural network model composed of the matrix variable G is used to output the operation results.
[0041] S5, when the program is in the loading model state, it re-reads the latest data file in the set path and updates the neural network model according to the matrix variable G in the data file. During the updating process, the program continuously outputs the output at the last moment when entering the loading model state (that is, the output at the last moment when the value of s is False) as the running result.
[0042] In this embodiment, when the data file under the set path is updated, the variable s corresponding to the input pin of the graphical neural network module is set to True, so that the program enters the loading model state.
[0043] When the program enters the model loading state and reaches the preset time, the value of the model update variable is updated so that the program enters the normal operation state, and the program outputs the operation result according to the updated neural network model. In this embodiment, the preset time is set to 10 seconds.
[0044] During the online commissioning process, if it is found that the module output does not accurately reflect the modeled system, the neural network model can be retrained offline, and the value of the model update variable s can be set to update the model online without compiling and downloading the controller.
[0045] Example 2
[0046] This embodiment further illustrates the method described in Embodiment 1 by taking the application to modeling of thermal power units as an example.
[0047] The boiler of a 660MW power generation unit is prone to steam overtemperature problems due to factors such as the blending of low-quality coal, large changes in load conditions, start-up and shutdown of the pulverizer, and low-nitrogen combustion adjustments, which seriously affects the safe and stable operation of the unit. In order to facilitate early intervention by operating personnel when overtemperature may occur, a neural network modeling algorithm was implemented based on a domestic control platform, and a main steam temperature neural network prediction model was established. However, due to the changes in the characteristics of the boiler combustion system over time, the prediction effect of the neural network model gradually deteriorated, and the model needed to be updated during the unit shutdown period. The model could not be updated in time, resulting in the neural network modeling algorithm being difficult to play its due role. The embedded BP neural network modeling algorithm is implemented using the technical solution of the present invention, and the implementation process is as follows:
[0048] (1) According to the development specifications of the domestic DCS platform, the algorithm program of the BP neural network model is developed, and the matrix variable G is established as the weights and thresholds of the neurons in the input layer, hidden layer, and output layer of the BP neural network model. The program loads G by reading the data file under the set path.
[0049] (2) Add a special input signal to the BP neural network modeling algorithm program - model update variable s, and perform logical judgment on s. The program needs to read the input features required by the BP neural network model in real time, and also needs to read the value of s in real time. The value of s is True or False. When the value of s is False, the program switches to the normal operation state, and the BP neural network model based on the matrix variable G obtains the calculation result as the main steam temperature prediction value output by the model; when the value of s is True, the program switches to the loading model state, and the output keeps the main steam temperature prediction value unchanged at the last moment when s is False. At the same time, the program reads the data file under the set path, assigns the read data to the matrix variable G, and updates the structure and parameters of the BP neural network model online. The input features required for the BP neural network model are shown in Table 1.
[0050] Table 1 Input characteristics of main steam temperature BP neural network model
[0051] Serial number Feature Name 1 Final superheater outlet temperature 2 Superheater secondary spray desuperheater inlet temperature 3 Secondary spray desuperheater desuperheating water flow 4 Oxygen 5 Total air volume 6 Instantaneous coal quantity feedback of coal feeder 7 Coal mill outlet air and powder temperature 8 Boiler fuel air damper valve position 9 Coal mill primary air volume
[0052] (3) In a domestic DCS platform development environment, the BP neural network modeling algorithm program is compiled into a dynamic link library file and encapsulated into a graphical BP neural network module according to the encapsulation rules. The input and output of the program are encapsulated as the input and output pins in the corresponding graphical module. The module performs calculations by loading the dynamic link library file and reads the input required by the program by obtaining the value of the input pin.
[0053] (4) Add BP neural network module in the configuration interface of the domestic DCS platform, such as Figure 2 As shown, the input pins IN1-IN9 except s are connected to the corresponding values in the order of Table 1. The module ID number assigned by DCS is 1. The module creates a folder named "DATA1" in the controller based on the ID number as the setting path described in steps (1) and (2).
[0054] (5) After the BP neural network model is obtained through offline training, the weights and thresholds of the neurons in each layer of the model are saved as data files, updated to the data files under the set path, and the variable s corresponding to the input pin of the BP neural network module is set to True, and set to False after 10 seconds to complete the online update of the model.
[0055] (6) After the online update of the model is completed, the module performs output calculation normally. The comparison curve between the main steam temperature prediction value output by the BP neural network module and the actual value of the main steam temperature over a period of time is shown in the figure below: Figure 3 As shown, during the online operation, if the module output is found to be inaccurate, you can continue to repeat step (5) and perform online update again without recompiling and downloading.
[0056] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A method for implementing a neural network module based on a domestic DCS platform, characterized in that: The following steps are involved: Developing a neural network algorithm program, and representing the parameters of the neural network model required by the algorithm with matrix variables, wherein the input of the neural network algorithm program includes input features required by the algorithm and model update variables; Save the matrix variables of the neural network model after offline training as a data file and store it in the set path; The neural network algorithm program sets the neural network model parameters by reading the matrix variables in the data file under the set path, loads the neural network model, and determines the program running state according to the value of the current model update variable, and the program running state includes the normal running state and the model loading state; When the program is in normal operation, the input features required by the algorithm are obtained, and the operation results are output using the neural network model; When the program is in the loading model state, it re-reads the latest data file in the set path. The latest data file is calculated by offline training to obtain new matrix variables and saved. The neural network model is updated according to the matrix variables in the data file. During the update process, the program continuously outputs the output at the last moment when it entered the loading model state as the running result.
2. The method for implementing a neural network module based on a domestic DCS platform according to claim 1, characterized in that: The model update variable is of Boolean type. When its value is true, the neural network model needs to be updated and the program enters the model loading state. When its value is false, the neural network model does not need to be updated and the program is in normal operation.
3. The method for implementing a neural network module based on a domestic DCS platform according to claim 1, characterized in that: The parameters of the neural network model include the weights and thresholds of neurons in each layer.
4. The method for implementing a neural network module based on a domestic DCS platform according to claim 1, characterized in that: The data file is updated in an overwrite mode. When a data file is updated, the original data file is overwritten in the corresponding path.
5. The method for implementing a neural network module based on a domestic DCS platform according to claim 1 is characterized in that: When the program enters the model loading state and reaches a preset time, the model is updated and the values of the update variables are updated so that the program enters the normal operating state. The program outputs the operating results according to the updated neural network model.
6. The method for implementing a neural network module based on a domestic DCS platform according to claim 1, characterized in that: In the domestic DCS platform development environment, the neural network algorithm program is compiled into a dynamic link library file and packaged into a graphical neural network module according to the packaging rules. The input of the program is packaged as the input pin in the corresponding graphical neural network module. The module performs calculations by loading the dynamic link library file, reads the input required by the program by obtaining the value of the input pin, and outputs it through the output pin.
7. The method for implementing a neural network module based on a domestic DCS platform according to claim 6 is characterized in that: The graphical neural network module reads the module ID number assigned to itself by the domestic DCS platform, and automatically establishes a corresponding folder in the controller as the set path based on the module ID number; when multiple graphical neural network modules are added to the domestic DCS platform, the modules read the data files under the respective paths through the set paths generated by the module ID numbers.
8. The method for implementing a neural network module based on a domestic DCS platform according to claim 1, characterized in that: When the method is used for modeling a thermal power unit, the input features required by the algorithm are the actual values of the operating parameters of the thermal power unit, and the output operating results are the predicted values of the operating parameters of the thermal power unit.
9. The method for implementing a neural network module based on a domestic DCS platform according to claim 8, characterized in that: The operating parameters of the thermal power unit include analog quantities such as temperature, pressure, and flow rate of the thermal power unit equipment, and digital quantity signals such as operating status, stop status, and manual / automatic status.
10. The method for implementing a neural network module based on a domestic DCS platform according to claim 1, characterized in that: The model update variables are set by manual tuning.
Citation Information
Cited By
Nuclear reactor containment vessel thermal hydraulic state prediction method based on machine learning and system program coupling
CN121880825A
Method for predicting thermal-hydraulic state of nuclear reactor containment based on coupling of machine learning and system program
CN121880825B