A control model generation method for sand and gravel production wastewater treatment system
Through the multi-time cycle control model and fluid simulation system, the control model of the sand and gravel production wastewater treatment system is quickly generated, which solves the problems of high calculation volume and energy consumption in the existing technology, and achieves rapid formation of available results and reduced maintenance costs. Effect.
Patent Information
- Application Number
- CN202411041482.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-31
Smart Images

Figure CN118567285B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for generating a control model of a sand and gravel production wastewater treatment system, and belongs to the technical field of computer systems based on specific calculation models. Background Art
[0002] At present, the main development direction of sand and gravel processing enterprises is to conduct systematic research on the principles of the process on the basis of existing engineering application experience and existing research results, carry out integrated innovation work on process equipment, and transform the technology into results to make it a flagship product. The main content is to upgrade the complete set of technology of wastewater equipment in the sand and gravel processing system to informatization and automation, build a smart operation and management cloud platform, further improve the operating efficiency of the wastewater treatment system, and reduce the operation and maintenance costs of the wastewater treatment system.
[0003] However, in the prior art, the control of the sand and gravel production wastewater treatment system is generally directly combined with the equipment itself to build a production line to match the model parameters. After the equipment is selected based on theoretical data, a semi-automatic control method is used to set the control logic, and there is no control model at all.
[0004] To solve the above problems, the existing technology also provides some control algorithms based on machine learning to generate control models that can be automatically controlled. The main idea is to achieve the fitting of complex system control by a rough fitting method of a large number of computing units based on neural network algorithms. This method has extremely high requirements on computer performance, especially since the sand and gravel production wastewater treatment system itself is already a complex system. The model based on the neural network algorithm has high computing power and operating energy consumption. After preliminary testing, the research and development time required for practical application is extremely long, and it is difficult to quickly form usable results, which does not meet the needs of gradual upgrading and iterative innovation. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a method for generating a control model for a sand and gravel production wastewater treatment system. The method for generating a control model for a sand and gravel production wastewater treatment system is based on a control model with multiple time periods, and is trained by obtaining data through simulation. It can quickly obtain a control model that is sufficient for practical application based on the selection of existing equipment.
[0006] The present invention is achieved through the following technical solutions.
[0007] The present invention provides a method for generating a control model for a sand and gravel production wastewater treatment system, comprising the following steps:
[0008] S1. Set equipment object: according to the equipment selection of the sand and gravel wastewater treatment production line, set the equipment parameters for simulation, and according to the average value of historical fluid data, set the fluid parameters for simulation;
[0009] S2. Offline simulation: Use a fluid simulation system to set device objects with device parameters, set a fluid simulation environment based on fluid parameters, perform fluid simulation under various operation modes and operation parameters of the device objects, and obtain multiple sets of operation data;
[0010] S3, setting the control model: taking the current fluid state value including the current fluid input end state value and the current fluid output end state value, and the control instruction output of the previous timing cycle as input, and taking the combination of the respective items in the control instructions of the previous three timing cycles and the current timing cycle as output, setting the control model; the parameters of the control model are adjusted according to the feedback of the current fluid output end state value, and the control model adopts a four-unit LSTM structure, and the control instruction output by each unit contains four items. In each timing cycle, only one item is taken in sequence for each unit, and each item corresponds to a device object. The corresponding relationship is that the data format and data range of the item are consistent with the data format and data range of the device object control instruction. The calculation formula of each unit is as follows:
[0011] {f}_{t}=σ({W}_{f}·[{h}_{tn},{X}^{3}_{t},{X}^{2}_{t},{X}_{t}]+{b}_{f}) ,
[0012] {i}_{t}=σ({W}_{i}·[{h}_{tn},{X}^{3}_{t},{X}^{2}_{t},{X}_{t}]+{b}_{i}) ,
[0013] {o}_{t}=σ({W}_{o}·[{h}_{tn},{X}^{3}_{t},{X}^{2}_{t},{X}_{t}]+{b}_{o}) ,
[0014] {C}_{t}={C}_{tn}{·{f}_{t}+i}_{t}·tanh({W'}_{f}·[{h}_{tn},{X}^{3}_{t},{X}^{2}_{t},{X}_{t}]+{b'}_{f}) ,
[0015] ,
[0016] In the formula, is the current fluid state value, is the output n timing cycles ago, is the internal state n timing cycles ago, is the generating function, are weight coefficients, Both are bias coefficients, and both weight coefficients and bias coefficients are parameters of the control model;
[0017] S4, model fitting: multiple groups of running data are divided into training sets and test sets, and the control model is fitted and trained. After running the training set once, the training accuracy is obtained by testing the test set;
[0018] S5, judging convergence: judging whether the control model has converged according to the training accuracy, if not, returning to step S4, if converged, proceeding to the next step;
[0019] S6. Output: Save the control model as a configuration file that can be read by an external controller.
[0020] The fluid simulation system includes a fluid simulation module, a three-dimensional simulation module, a dynamic simulation module and a self-defined adjustment function; the self-defined adjustment function writes and runs a turbulence model for given fluid limiting conditions for the operation of the fluid simulation module and the dynamic simulation module.
[0021] The equipment comprises a sand washing sedimentation tank, a flocculation sedimentation tank, a mechanical dehydrator which are connected in sequence, and a dispenser which is connected to the flocculation sedimentation tank.
[0022] The state value of the fluid input end is obtained by setting an online detector at the front stage of the sand washing sedimentation tank, and the state value of the fluid output end is obtained through a detection pipeline connected to the last stage of the pipeline.
[0023] After step S5, the following steps are performed:
[0024] S5.2, judging whether the standard is met: in the fluid simulation environment, the control model is used to control the equipment object, and the fluid simulation is performed to judge whether the fluid output state value meets the preset standard. If yes, proceed to step S6, otherwise proceed to the next step;
[0025] S5.3. Adjust initial parameters: re-randomly generate parameters of the control model, and return to step S3 to initialize the control model with the randomly generated parameters of the control model.
[0026] The fluid simulation system adopts Ansys Fluent.
[0027] Said and If it does not exist, the value is 0.
[0028] The four items correspond to the sand washing sedimentation tank, the flocculation sedimentation tank, the mechanical dehydrator and the dispenser respectively, and the corresponding items of the sand washing sedimentation tank, the dispenser, the flocculation sedimentation tank and the mechanical dehydrator are taken in sequence according to the time sequence cycle.
[0029] The external controller is an MCU.
[0030] The beneficial effects of the present invention are as follows: based on a control model with multiple time periods, data is obtained through simulation for training, and a control model sufficient for practical application can be quickly obtained based on the existing equipment selection. The required research and development time is relatively short, so that usable results can be quickly formed, and the information and automation upgrade of the sand and gravel production wastewater treatment system can be completed, thereby further improving the operating efficiency of the wastewater treatment system and reducing the operating and maintenance costs of the wastewater treatment system, which meets the needs of gradual upgrading and iterative innovation. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a schematic diagram of a process of at least one embodiment of the present invention;
[0032] Figure 2 It is a schematic diagram of equipment connection of the target system to which the present invention is applied;
[0033] Figure 3 yes Figure 1 Schematic diagram of the algorithm flow of the control model. DETAILED DESCRIPTION
[0034] The technical solution of the present invention is further described below, but the scope of protection claimed is not limited to the description.
[0035] A first embodiment of the present invention relates to Figure 1 A method for generating a control model for a sand and gravel production wastewater treatment system is shown, comprising the following steps:
[0036] S1. Set equipment object: according to the equipment selection of the sand and gravel wastewater treatment production line, set the equipment parameters for simulation, and according to the average value of historical fluid data, set the fluid parameters for simulation;
[0037] S2. Offline simulation: Use a fluid simulation system to set device objects with device parameters, set a fluid simulation environment based on fluid parameters, perform fluid simulation under various operation modes and operation parameters of the device objects, and obtain multiple sets of operation data;
[0038] S3, setting the control model: taking the current fluid state value including the current fluid input end state value and the current fluid output end state value, and the control instruction output of the previous timing cycle as input, and taking the combination of the respective single items in the control instructions of the previous three timing cycles and the current timing cycle as output, setting the control model; the control instruction output item in the control model is a cubic equation relative to the current fluid state value input item, and the parameters of the control model are adjusted according to the current fluid output end state value feedback;
[0039] S4, model fitting: multiple groups of running data are divided into training sets and test sets, and the control model is fitted and trained. After running the training set once, the training accuracy is obtained by testing the test set;
[0040] S5, judging convergence: judging whether the control model has converged according to the training accuracy, if not, returning to step S4, if converged, proceeding to the next step;
[0041] S6. Output: Save the control model as a configuration file that can be read by an external controller.
[0042] Therefore, based on the control model of multiple time periods, training with simulation data can quickly obtain a control model that is sufficient for practical application based on the existing equipment selection. The control instruction output is a cubic equation relative to the current fluid state numerical input. Such an equation is sufficient to match most fluid control problems. Through the error propagation and weight update methods in the existing technology, the equation can also be well fitted.
[0043] In step S1, based on the equipment selection, the type, specification and control method of the specific equipment are determined, and the equipment parameters include the type, specification and control amount of the corresponding equipment. For example, in a typical sand and gravel wastewater treatment production line, the equipment includes a sand washing sedimentation tank, a flocculation sedimentation tank, a mechanical dehydrator and a detection pipeline. Taking the sand washing sedimentation tank as an example, the equipment parameters such as "vertical flow sedimentation tank, volume 600m 3 , control quantity: outlet opening", its data form is expressed as {type: "vertical flow sedimentation tank", volume: 600, Valve_open: VO1}, where VO1 is the global variable name used to save and transfer the outlet opening control quantity for the sand washing sedimentation tank. Similarly, other equipment such as flocculation sedimentation tanks, mechanical dehydrators and detection pipelines can be set in the same way. Specifications and control quantities can be set, and types are mainly used.
[0044] The above fluid data (including the average value of historical fluid data and the fluid parameters used for simulation) mainly include density, flow rate and Reynolds number. For sand and gravel wastewater treatment, the main thing is to treat the particles and ions in the wastewater, and flocculation is generally an inevitable operation. The ions in the wastewater can become particulate matter after flocculation and are treated in a similar way to the treatment of particulate matter (such as precipitation). In fluid simulation, adding particulate matter to the calculation will cause the amount of calculation to soar. Therefore, density and Reynolds number can be used to reflect the overall impact of particulate matter on wastewater. In this way, wastewater can be simulated as a fluid with more special parameters in fluid simulation.
[0045] In the fluid simulation system of the prior art, there is generally an equipment template library that can be called. There are templates for various water treatment equipment in the equipment template library. Therefore, in step S2, based on the type in the equipment parameters, the corresponding equipment template can be selected in the fluid simulation system. Taking the above-mentioned production line as an example, the first group of equipment on the production line is a sand washing sedimentation tank, and its type is set to "vertical flow sedimentation tank". Then, the equipment object template of the vertical flow sedimentation tank can be automatically called from the equipment template library to create a new equipment object, and then the equipment object is set based on the specifications in the equipment parameters. For example, the vertical flow sedimentation tank equipment object newly created according to the equipment object template of the vertical flow sedimentation tank has only one volume parameter that can be set, and the default unit is m 3 , the volume parameter is automatically set to 600. Similarly, the control amount of the vertical flow sedimentation tank equipment object is set to VO1 in the form of a pointer object (that is, the value of the variable VO1). This completes the setting of the equipment object of the sand washing sedimentation tank. Other equipment can select templates, set specification parameters, and set operating parameters in the same way according to equipment parameters. It is easy to see that the equipment parameters should be ensured to fully correspond to the setting items of the equipment object template in the equipment template library in the fluid simulation system.
[0046] The simplest form of a cubic equation is , where w, a, b, c, and d are all parameters of the control model, which can be in numerical form or in formula form (using function calls to achieve numericalization). It is easy to see that in step S3, the current fluid input state value x and the current fluid output state value y can be easily known. The current fluid state values (including x and y) in multiple steps can be used to construct a set of equations to solve and update the parameters of the control model. Solving and updating parameters for such a set of equations is a mature technology of linear algebra in the prior art, and the present invention will not go into details. Even if the above cubic equation uses deep learning technology, its principle is similar, and the solution and update can also be solved in a similar way. Generally speaking, the feedback adjustment can be completed by directly calling the solution and update function in the open source library.
[0047] The second embodiment of the present invention is substantially the same as the first embodiment, mainly in that the fluid simulation system includes a fluid simulation module, a three-dimensional simulation module, a dynamic simulation module and a custom adjustment function; the custom adjustment function writes and runs the turbulence model for given fluid limiting conditions for the operation of the fluid simulation module and the dynamic simulation module.
[0048] Generally, the fluid simulation module and the three-dimensional simulation module realize the general simulation of fluid and structure respectively, which is easy to realize based on the existing fluid simulation system (such as Solidworks Flow Simulation, Ansys Fluent, etc.), while the dynamic simulation module mainly realizes the simulation adjustment of random impact dynamics of particles and thermal dynamics of flocculation reaction. Therefore, the customized adjustment function is more convenient to adjust the simulation environment, and this adjustment method is not directly written into the fluid simulation module, so it is very convenient for subsequent upgrades.
[0049] Further, such as Figure 2 As shown, the equipment includes a sand washing sedimentation tank, a flocculation sedimentation tank, a mechanical dewatering machine connected in sequence, and a dispenser connected to the flocculation sedimentation tank.
[0050] Preferably, the fluid simulation system adopts Ansys Fluent.
[0051] Furthermore, the state value of the fluid input end is obtained by setting an online detector at the front stage of the sand washing sedimentation tank, and the state value of the fluid output end is obtained through the detection pipeline connected to the last stage of the pipeline. Generally, the state value of the fluid input end will not change significantly.
[0052] Preferably, the external controller is an MCU.
[0053] The third embodiment of the present invention is substantially the same as the first embodiment, mainly in that the following steps are performed after step S5:
[0054] S5.2, judging whether the standard is met: in the fluid simulation environment, the control model is used to control the equipment object, and the fluid simulation is performed to judge whether the fluid output state value meets the preset standard. If yes, proceed to step S6, otherwise proceed to the next step;
[0055] S5.3. Adjust initial parameters: re-randomly generate parameters of the control model, and return to step S3 to initialize the control model with the randomly generated parameters of the control model.
[0056] The fourth embodiment of the present invention is substantially the same as the first embodiment, mainly in that the control model adopts the following Figure 3 In the four-unit LSTM structure shown, the control instruction output by each unit contains four items. In each timing cycle, only one item is taken in sequence for each unit. Each item corresponds to a device object. The corresponding relationship is that the data format and data range of the item are consistent with the data format and data range of the device object control instruction. The calculation formula of each unit is as follows:
[0057] {f}_{t}=σ({W}_{f}·[{h}_{tn},{X}^{3}_{t},{X}^{2}_{t},{X}_{t}]+{b}_{f}) ,
[0058] {i}_{t}=σ({W}_{i}·[{h}_{tn},{X}^{3}_{t},{X}^{2}_{t},{X}_{t}]+{b}_{i}) ,
[0059] {o}_{t}=σ({W}_{o}·[{h}_{tn},{X}^{3}_{t},{X}^{2}_{t},{X}_{t}]+{b}_{o}) ,
[0060] {C}_{t}={C}_{tn}{·{f}_{t}+i}_{t}·tanh({W'}_{f}·[{h}_{tn},{X}^{3}_{t},{X}^{2}_{t},{X}_{t}]+{b'}_{f}) ,
[0061] ,
[0062] In the formula, is the current fluid state value, is the output n timing cycles ago, is the internal state n timing cycles ago, is the generating function, are weight coefficients, are bias coefficients, and weight coefficients and bias coefficients are parameters of the control model. It is easy to understand that weight coefficients are numerical vectors, and each multiplication term has a specific value. They are only identified by a single letter in the above formula for clarity. Since weight coefficients and bias coefficients are not multi-terms, the error propagation and weight update related technologies in the prior art can be directly applied.
[0063] Generating functions The output is four items of the control instruction. Each item may actually contain multiple values to correspond to the data format and data range of the device object control instruction. A typical example of a control instruction is ,in, Each is a single item. Indicates the opening of the sand washing sedimentation tank inlet, Indicates the outlet opening of the sand washing sedimentation tank. Indicates the total output opening of the dispenser, Indicates the first medicine output opening of the dispenser, Indicates the second medicine output opening of the dispenser, Indicates the third medicine output opening of the dispenser. Indicates the stirring speed of the flocculation sedimentation tank, Indicates the outlet opening of the flocculation sedimentation tank. Indicates the filter pressing frequency of the mechanical dehydrator.
[0064] The four units correspond to four types of equipment, and the purpose of distinguishing based on the timing cycle is to reduce the timing deviation caused by the flow of the fluid on the production line, so that the single output of the control instruction for each device corresponds to the same fluid. Therefore, in the four timing cycles, the earliest output is the single item of the control instruction corresponding to the sand washing sedimentation tank, and the latest output is the single item of the control instruction corresponding to the mechanical dehydrator. On the whole, it is equivalent to all devices delaying four timing cycles to calculate the single item of the control instruction to ensure synchronization as much as possible, and the entire control model rolling calculation is also easy to implement with a linked list in software. Generally, the timing cycle corresponds to the working cycle of the equipment. The working cycles of the four types of equipment need to be adjusted to be consistent, and the working cycle needs to match the flow rate of the fluid in the system. This should be noted in the equipment selection stage.
[0065] Different from the LSTM architecture in the prior art, the above scheme uses the cubic equation as the core operator. The feedback calculation amount is much larger than the feedback calculation amount of the linear equation in the prior art. Therefore, the calculation unit is not set in the form of a neural network. Instead, the input and output process of the cubic equation is set with reference to the LSTM architecture calculation process, and the gradient of each weight is calculated according to the corresponding error term in the same way as the LSTM network.
[0066] Said and The value is 0 from time to time.
[0067] The four items correspond to the sand washing sedimentation tank, the flocculation sedimentation tank, the mechanical dehydrator and the dispenser respectively, and the corresponding items of the sand washing sedimentation tank, the dispenser, the flocculation sedimentation tank and the mechanical dehydrator are taken in sequence according to the time sequence cycle.
Claims
1. A method for generating a control model for a sand and gravel production wastewater treatment system, characterized in that: The following steps are involved: S1. Set equipment object: according to the equipment selection of the sand and gravel wastewater treatment production line, set the equipment parameters for simulation, and according to the average value of historical fluid data, set the fluid parameters for simulation; S2. Offline simulation: Use a fluid simulation system to set device objects with device parameters, set a fluid simulation environment based on fluid parameters, perform fluid simulation under various operation modes and operation parameters of the device objects, and obtain multiple sets of operation data; S3, setting the control model: taking the current fluid state value including the current fluid input end state value and the current fluid output end state value, and the control instruction output of the previous timing cycle as input, and taking the combination of the respective items in the control instructions of the previous three timing cycles and the current timing cycle as output, setting the control model; the parameters of the control model are adjusted according to the feedback of the current fluid output end state value, and the control model adopts a four-unit LSTM structure, and the control instruction output by each unit contains four items. In each timing cycle, only one item is taken in sequence for each unit, and each item corresponds to a device object. The corresponding relationship is that the data format and data range of the item are consistent with the data format and data range of the device object control instruction. The calculation formula of each unit is as follows: , , , , , In the formula, is the current fluid state value, is the output n timing cycles ago, is the internal state n timing cycles ago, is the generating function, are weight coefficients, Both are bias coefficients, and both weight coefficients and bias coefficients are parameters of the control model; S4, model fitting: multiple groups of running data are divided into training sets and test sets, and the control model is fitted and trained. After running the training set once, the training accuracy is obtained by testing the test set; S5, judging convergence: judging whether the control model has converged according to the training accuracy, if not, returning to step S4, if converged, proceeding to the next step; S6. Output: Save the control model as a configuration file that can be read by an external controller.
2. The control model generation method for sand and gravel production wastewater treatment system according to claim 1, characterized in that: The fluid simulation system includes a fluid simulation module, a three-dimensional simulation module, a dynamic simulation module and a self-defined adjustment function; the self-defined adjustment function writes and runs a turbulence model for given fluid limiting conditions for the operation of the fluid simulation module and the dynamic simulation module.
3. The control model generation method for sand and gravel production wastewater treatment system according to claim 1, characterized in that: The equipment comprises a sand washing sedimentation tank, a flocculation sedimentation tank, a mechanical dehydrator which are connected in sequence, and a dispenser which is connected to the flocculation sedimentation tank.
4. The method for generating a control model for a sand and gravel production wastewater treatment system according to claim 1, characterized in that: The state value of the fluid input end is obtained by setting an online detector at the front stage of the sand washing sedimentation tank, and the state value of the fluid output end is obtained through a detection pipeline connected to the last stage of the pipeline.
5. The control model generation method for sand and gravel production wastewater treatment system according to claim 1, characterized in that: After step S5, the following steps are performed: S5.2, judging whether the standard is met: in the fluid simulation environment, the control model is used to control the equipment object, and the fluid simulation is performed to judge whether the fluid output state value meets the preset standard. If yes, proceed to step S6, otherwise proceed to the next step; S5.
3. Adjust initial parameters: re-randomly generate parameters of the control model, and return to step S3 to initialize the control model with the randomly generated parameters of the control model.
6. The control model generation method for sand and gravel production wastewater treatment system according to claim 1, characterized in that: The fluid simulation system adopts Ansys Fluent.
7. The control model generation method for sand and gravel production wastewater treatment system according to claim 1, characterized in that: Said and If it does not exist, the value is 0.
8. The control model generation method for sand and gravel production wastewater treatment system according to claim 1, characterized in that: The four items correspond to the sand washing sedimentation tank, the flocculation sedimentation tank, the mechanical dehydrator and the dispenser respectively, and the corresponding items of the sand washing sedimentation tank, the dispenser, the flocculation sedimentation tank and the mechanical dehydrator are taken in sequence according to the time sequence cycle.
9. The method for generating a control model for a sand and gravel production wastewater treatment system according to claim 1, characterized in that: The external controller is an MCU.
