Sewage treatment optimization control method and system, electronic equipment and storage medium
By building a BSM1 model during sewage treatment, training the Elman neural network model, optimizing the parameter prediction model and using step-by-step fuzzy PID method for control, the problems of controlling dissolved oxygen and nitrate nitrogen concentrations and reducing energy consumption in sewage treatment are solved, and the sewage discharge meets the standards and improves economic benefits.
Patent Information
- Application Number
- CN202411725959.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-28
AI Technical Summary
How to effectively control the concentration of dissolved oxygen and nitrate nitrogen during sewage treatment, reduce energy consumption, and ensure that sewage discharge meets standards.
Simulink is used to build the BSM1 model of the sewage treatment process, based on the Elman neural network training parameter prediction model, the model is optimized using the prefabricated IMOGWO algorithm, and the stepwise fuzzy PID method is used for control.
It has achieved a reduction in energy consumption during sewage treatment, while ensuring the compliance of sewage discharge standards and improving the economic benefits of sewage treatment.
Smart Images

Figure CN119536088A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent garbage treatment, and specifically relates to a sewage treatment optimization control method, system, electronic equipment and storage medium. Background Art
[0002] For fresh water resources, in addition to expensive seawater desalination, sewage treatment, recycling and utilization is also an important source of fresh water. Sewage treatment is not only conducive to preventing and controlling water pollution, repairing the ecological environment, and reducing the number of deaths caused by water pollution, but also can alleviate the shortage of fresh water. Today's urban sewage treatment plants mainly use the activated sludge method to treat pollutants in sewage. The activated sludge method is a complex biochemical reaction process with nonlinear time-varying. Today's sewage treatment plants widely use PID control to control the concentration of components in sewage, thereby controlling the reaction process.
[0003] The activated sludge method requires the degradation of various pollutants in sewage through aerobic and anaerobic reactions of microorganisms. However, excessive concentrations of nitrate nitrogen will cause eutrophication of water bodies. Eutrophic water bodies will consume dissolved oxygen in the water. If not treated in time, aerobic organisms in the water will be inactivated due to low oxygen content, indirectly aggravating water pollution. In order to maintain aerobic reactions, blowers and other devices are needed to aerate the aerobic reaction area. At the same time, excessive dissolved oxygen will affect the reaction in the anaerobic zone, resulting in an impact on the nitrate nitrogen concentration in the anaerobic zone. In order to maintain anaerobic reactions, reflux pumps and other devices are needed to maintain the nitrate nitrogen concentration in the anaerobic zone. In order to meet the sewage discharge standards, high-energy-consuming equipment such as blowers and reflux pumps often need to work at high loads, which makes most sewage treatment plants have a high level of energy consumption.
[0004] Therefore, how to control the concentration of dissolved oxygen and nitrate nitrogen and effectively reduce energy consumption to achieve the goal of balancing sewage discharge standards and minimizing energy consumption is an urgent issue to be solved by technical personnel in this field. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a sewage treatment optimization control method, system, electronic equipment and storage medium, which can effectively reduce energy consumption while ensuring that sewage discharge meets the standards, thereby improving the economic benefits of sewage treatment.
[0006] In a first aspect, the invention provides a sewage treatment optimization control method, comprising:
[0007] Use Simulink to build the BSM1 model of the sewage treatment process;
[0008] Based on the BSM1 model, sewage simulation data is captured, and a parameter prediction model of the sewage treatment process is obtained by using Elman neural network training;
[0009] Optimizing the parameter prediction model using a prefabricated IMOGWO algorithm;
[0010] Obtaining predicted values of target control parameters according to the optimized parameter prediction model, wherein the target control parameters include dissolved oxygen parameters and nitrate nitrogen parameters;
[0011] The predicted value is controlled based on a step-by-step fuzzy PID method to optimize the control of the sewage treatment process.
[0012] Preferably, the steps of using Simulink to build a BSM1 model of the sewage treatment process specifically include:
[0013] Construct a corresponding mathematical model based on sewage inflow data and performance evaluation indicators;
[0014] Solving the data model to obtain an equation corresponding thereto;
[0015] Draw a block diagram corresponding to the equation;
[0016] The block diagram was constructed in Simulink to form a BSM1 model of the sewage treatment process.
[0017] Preferably, the step of capturing sewage simulation data based on the BSM1 model and using Elman neural network training to obtain a parameter prediction model for the sewage treatment process specifically includes:
[0018] Based on the historical sewage data, the sewage simulation data is captured by the BSM1 model;
[0019] Performing constraint processing on the sewage simulation data according to the predictive control optimization target;
[0020] The parameter prediction model of the sewage treatment process is obtained by using the sewage simulation data after the Elman neural network training constraints.
[0021] Preferably, the step of optimizing the parameter prediction model using the prefabricated IMOGWO algorithm specifically includes:
[0022] Iterative optimization of parameters based on the standard IMOGWO algorithm is used to obtain the prefabricated IMOGWO algorithm;
[0023] Adopting the prefabricated IMOGWO algorithm to rollingly optimize the parameter prediction model;
[0024] The parameter prediction model is corrected according to the error feedback of the predicted values and corresponding values at adjacent moments.
[0025] Preferably, the step of obtaining the prefabricated IMOGWO algorithm specifically includes:
[0026] In the standard IMOGWO algorithm, the optimization variable parameters are set, the population is initialized, and several individuals are randomly generated in the feasible domain;
[0027] Calculating target values corresponding to a number of the individuals;
[0028] Determine the dominance relationship between the individuals, and group all non-dominated individuals to obtain the index and sub-index of the grid where the non-dominated individuals are located;
[0029] Iterate based on the index and its corresponding sub-index until a maximum number of iterations is reached, and output a solution set of the non-dominated individuals;
[0030] The optimal solution and the objective function value corresponding thereto are extracted from the solution set so as to improve the standard IMOGWO algorithm to obtain the prefabricated IMOGWO algorithm.
[0031] Preferably, the step of controlling the predicted value based on the step-by-step fuzzy PID method to optimize the control of the sewage treatment process specifically includes:
[0032] Processing the predicted value based on the set value of the target control parameter, and using the result of the processing as the actual set value corresponding to the fuzzy PID control;
[0033] The actual setting value is processed by a quantization processing formula to obtain a quantization factor of the PID parameter;
[0034] Perform fuzzy reasoning based on the quantization factor to obtain a fuzzy processing result;
[0035] The maximum membership method is used to convert the fuzzy processing results into accurate quantities for online self-tuning of PID parameters;
[0036] The predicted value is controlled according to the self-tuned PID parameters to optimize the sewage treatment process.
[0037] Preferably, the quantization processing formula is specifically:
[0038] sf = fr max -fr min / tr max -tr min ;
[0039] Where: sf is the quantization factor of the fuzzy controller input and output, fr max With fr min are the upper and lower limits of the true domain of each variable, tr max With tr min are the upper and lower limits of the fuzzy domain of each variable respectively.
[0040] In a second aspect, a sewage treatment optimization control system comprises:
[0041] Building modules for building a BSM1 model of a wastewater treatment process using Simulink;
[0042] A training module, used to capture sewage simulation data based on the BSM1 model, and use Elman neural network training to obtain a parameter prediction model for the sewage treatment process;
[0043] An optimization module, for optimizing the parameter prediction model using a prefabricated IMOGWO algorithm;
[0044] A prediction module, used to obtain a predicted value of a target control parameter according to the optimized parameter prediction model;
[0045] A control module is used to control the predicted value based on a step-by-step fuzzy PID method so as to optimize the control of the sewage treatment process.
[0046] Preferably, the building module specifically includes:
[0047] A construction unit, used for constructing a corresponding mathematical model based on sewage inflow data and performance evaluation indicators;
[0048] A solving unit, used for solving the data model to obtain an equation corresponding thereto;
[0049] A drawing unit, used for drawing a block diagram corresponding to the equation according to the equation;
[0050] A building unit is used to build the block diagram in Simulink to form a BSM1 model of the sewage treatment process.
[0051] Preferably, the training module specifically includes:
[0052] A capture unit, used for capturing sewage simulation data through the BSM1 model based on sewage historical data;
[0053] A constraint unit, used for performing constraint processing on the sewage simulation data according to a predictive control optimization target;
[0054] The training unit is used to obtain a parameter prediction model of the sewage treatment process by using the sewage simulation data after the Elman neural network training constraints.
[0055] Preferably, the optimization module specifically includes:
[0056] An iteration unit, used for iteratively optimizing parameters based on a standard IMOGWO algorithm to obtain a prefabricated IMOGWO algorithm;
[0057] An optimization unit, used for rolling optimization of the parameter prediction model by using the prefabricated IMOGWO algorithm;
[0058] The correction unit is used to correct the parameter prediction model according to the error feedback of the predicted values and corresponding values at adjacent moments.
[0059] Preferably, the control module specifically includes:
[0060] a formulation unit, configured to process the predicted value based on the set value of the target control parameter, and use the result of the processing as the actual set value corresponding to the fuzzy PID control;
[0061] A quantization unit, used for processing the actual setting value using a quantization processing formula to obtain a quantization factor of a PID parameter;
[0062] An inference unit, used for performing fuzzy inference based on the quantization factor to obtain a fuzzy processing result;
[0063] The tuning unit is used to convert the fuzzy processing results into accurate quantities by using the maximum membership method to self-tune the PID parameters online;
[0064] The control unit is used to control the predicted value according to the self-tuned PID parameters so as to optimize the control of the sewage treatment process.
[0065] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the sewage treatment optimization control method as described in the first aspect is implemented.
[0066] In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the sewage treatment optimization control method as described in the first aspect.
[0067] Compared with the prior art, the present invention has the following beneficial effects:
[0068] 1. The use of simulink's graphical functions for simulation modeling can handle sewage treatment systems involving discrete, nonlinear, time-varying, multi-rate mixing, etc. that are difficult to solve using analytical methods, and improve the accuracy and effectiveness of the BSM1 model in handling multiple objective variables.
[0069] 2. The parameter prediction model obtained based on the BSM1 model and the Elman neural network makes full use of the universal approximation of the Elman neural network, so that the parameter prediction model can predict any nonlinear function; and the self-connected output method of the Elman neural network makes it highly sensitive to historical information.
[0070] 3. By prefabricating the IMOGWO algorithm to optimize the parameter prediction model, the problems commonly existing in the prediction model, such as low solution accuracy, slow convergence speed in the later stage of solution, and easy falling into local optimality during the solution process, can be solved, thereby ensuring that sewage discharge meets the standards.
[0071] 4. By controlling the target control parameters through the step-by-step fuzzy PID method, the sewage treatment control has the advantages of high control accuracy, strong real-time performance, and good robustness, thereby achieving low energy consumption in the sewage discharge process. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0073] Figure 1 A flow chart of the sewage treatment optimization control method provided in Example 1 of the present invention;
[0074] Figure 2 is a structural block diagram of a sewage treatment optimization control system corresponding to the method of Example 1 and provided in Example 2 of the present invention;
[0075] Figure 3 It is a schematic diagram of the hardware structure of the computer provided in Example 3 of the present invention.
[0076] Description of reference numerals:
[0077] 10-Building module, 11-Construction unit, 12-Solving unit, 13-Drawing unit, 14-Building unit;
[0078] 20-training module, 21-grasping unit, 22-constraint unit, 23-training unit;
[0079] 30- optimization module, 31- iteration unit, 32- optimization unit, 33- correction unit;
[0080] 40- prediction module;
[0081] 50-control module, 51-planning unit, 52-quantization unit, 53-reasoning unit, 54-setting unit, 55-control unit;
[0082] 60 - bus, 61 - processor, 62 - memory, 63 - communication interface. DETAILED DESCRIPTION
[0083] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete and will fully convey the concept of the example embodiments to those skilled in the art.
[0084] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0085] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0086] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0087] There are many technological methods for sewage treatment, which can be divided into three types according to their properties: physical method, chemical method and biological method. At present, biological method and related technologies are commonly used in sewage treatment. Biological method mainly includes activated sludge method, biological adsorption method, biological flocculation method and anaerobic biological treatment method. Among them, activated sludge method is a biological treatment method under aerobic environment. This method can effectively remove soluble and colloidal organic matter and suspended solids and other substances that can be adsorbed by activated sludge, and can also eliminate some phosphorus and nitrogen. However, due to changes in influent flow, pollutant concentration and weather conditions, the biochemical reaction process will be unstable, resulting in the sewage treatment process having strong nonlinear characteristics.
[0088] Example 1
[0089] Specifically, Figure 1 Shown is a schematic flow chart of the sewage treatment optimization control method provided in this embodiment.
[0090] like Figure 1 As shown, the sewage treatment optimization control method of this embodiment includes the following steps:
[0091] S101, use Simulink to build the BSM1 model of the sewage treatment process.
[0092] Specifically, the BSM1 model is established based on the pre-denitrification denitrification A / O process, and is mainly composed of a biochemical reaction tank, a secondary sedimentation tank, sludge discharge and two reflows. The BSM1 model mainly simulates the biochemical reaction mechanism in the biochemical reaction tank and the secondary sedimentation tank and the change mechanism of the concentration of each component. The establishment of the BSM1 model has laid a solid foundation for subsequent neural network modeling, multi-objective optimization and controller design. In the present embodiment, Simulink is used to build the BSM1 model. Simulink is a block diagram design environment based on MATLABO, which can be used to model, analyze and simulate various dynamic systems. Any system that can be described by a mathematical model can be simulated and analyzed in Simulink. For systems that are difficult to solve with analytical methods such as discrete, nonlinear, time-varying, and multi-rate mixing, they can be modeled and simulated by Simulink, thereby guiding the analysis and design of the system.
[0093] Furthermore, the specific steps of step S101 include:
[0094] S1011, construct a corresponding mathematical model based on sewage inflow data and performance evaluation indicators.
[0095] Specifically, the effluent quality at each sampling moment in the sewage treatment process is affected by the influent load, the concentration of influent components and the weather. The influent data of this embodiment are all the concentrations of pollutants detected before entering the biochemical reaction tank. In addition, the performance evaluation indicators of this embodiment refer to energy consumption evaluation and effluent water quality evaluation; in specific practice, there are many reasons for the energy consumption in the sewage treatment process, among which aeration energy consumption and pumping energy consumption account for more than 70% of the total energy consumption of the sewage treatment process; aeration energy consumption is the pumping energy consumption generated when the aeration device of the blower inputs oxygen from the outside to the biochemical pool, which refers to the electrical energy consumption of the water circulation pump when performing internal and external reflux and sludge discharge; in order to save operating costs and improve economic benefits, sewage treatment plants take reducing energy consumption as their main goal.
[0096] S1012, solving the data model to obtain a corresponding equation.
[0097] Specifically, to solve the problems of energy consumption and water quality, it is necessary to establish a corresponding mathematical model. For the dynamic system of sewage treatment, its mathematical model adopts a differential equation or a group of differential equations. After obtaining the corresponding mathematical model, the corresponding block diagram can be established in Simulink and solved and simulated. In this embodiment, the corresponding differential equation is obtained by solving the mathematical model, and one of the differential equations is as follows:
[0098] d2 V s / dt 2 +4dV S / dt+3V S =3u0(t);
[0099] Where V s It represents the double exponential settling velocity of the sludge settling process, and u0 represents the maximum theoretical settling rate.
[0100] S1013, drawing a block diagram corresponding to the equation.
[0101] Specifically, according to the above differentiation method, the following block diagram can be drawn.
[0102]
[0103] S1014, constructing the block diagram in Simulink to form a BSM1 model of the sewage treatment process.
[0104] Specifically, by building the above-mentioned block diagram in imulink, the BSM1 model used for sewage treatment is constructed based on the drawn block diagram, as follows:
[0105]
[0106] It should be noted that the use of simulink's graphical functions for simulation modeling can handle systems involving discrete, nonlinear, time-varying, multi-rate mixing, etc. that are difficult to solve using analytical methods, and can improve the accuracy and effectiveness of the BSM1 model in handling multiple objective variables.
[0107] S102, capturing sewage simulation data based on the BSM1 model, and using Elman neural network training to obtain a parameter prediction model for the sewage treatment process.
[0108] Specifically, the Elman neural network of this embodiment is based on the feedforward neural network, adding a receiving layer to the hidden layer, which plays a delay role to adapt to real-time changes and can directly and dynamically reflect the process of model operation. In addition, the Elman neural network has universal approximation. In theory, Elman can predict any nonlinear function.
[0109] Furthermore, the specific steps of step S102 include:
[0110] S1021, capturing sewage simulation data through the BSM1 model based on the sewage historical data.
[0111] Specifically, this embodiment provides the discharge standards of the average concentrations of five key effluent water quality indicators in the BSM1 model. The following table shows the limits of the five effluent water quality parameters specified by the BSM1 model, where the effluent total nitrogen concentration is the sum of the effluent nitrate nitrogen and effluent Kjeldahl nitrogen concentrations. Relevant sewage simulation data is captured from the sewage historical data through the given average concentration discharge standard.
[0112] Outlet water quality parameter name Constraint value (mg / L) Total suspended solids <30 Chemical oxygen demand <100 Ammonia nitrogen <4 Total Nitrogen <18
[0113] S1022: performing constraint processing on the sewage simulation data according to the predictive control optimization objective.
[0114] Specifically, this embodiment takes dissolved oxygen and nitrate nitrogen as examples. The prediction control optimization target of dissolved oxygen is as follows:
[0115]
[0116] Where: S o5,sp Indicates the dissolved oxygen set value, Represents the predicted value of dissolved oxygen; given q 11 =1,q 12 =0.
[0117] In addition, the prediction and control optimization objectives of nitrate nitrogen are as follows:
[0118]
[0119] Where: S NO2,sp Indicates the dissolved oxygen set value, Represents the predicted value of dissolved oxygen; given q 21 =1,q 22 =0.
[0120] S1023, using the sewage simulation data after the Elman neural network training constraints to obtain a parameter prediction model for the sewage treatment process.
[0121] Specifically, in the Elman neural network, the input layer is responsible for signal input, the output layer is responsible for linear weighting, and the hidden layer is responsible for transmission. The transfer function can be a linear function or a nonlinear function. The receiving layer is responsible for recording the output value of the hidden layer unit at the previous moment and returning it to the input layer of the neural network, which can be regarded as a one-step delay operator. Elman's receiving layer can delay and store the output of the hidden layer, and self-connect to the input of the hidden layer. This self-connected output mode makes the neural network highly sensitive to historical information. The addition of internal feedback neurons increases the ability of the neural network itself to process dynamic information, thereby achieving the purpose of dynamic modeling. Among them, the parameter prediction model of this embodiment is as follows:
[0122] min Jall (Kla5,Q a )=J DO (Kla5)+J NO (Q a )
[0123]
[0124] S103, using a prefabricated IMOGWO algorithm to optimize the parameter prediction model.
[0125] Specifically, the goal of the sewage treatment process optimization in this embodiment is to reduce the system's operating energy consumption while ensuring that the effluent water quality meets the standard. The standard IMOGWO algorithm is often used to solve multi-objective optimization problems, but its optimization ability is seriously affected by its shortcomings such as poor population diversity, easy to fall into local optimality and slow convergence speed. Therefore, this embodiment improves the MOGWO algorithm and applies the improved algorithm to the optimization of multi-objective optimization problems in the sewage treatment process, so as to find the optimal solution for the two conflicting objectives of dissolved oxygen and nitrate nitrogen. Since the prediction model is used to estimate the state or output at a future moment, the current appropriate input is selected to realize the control of the system. Therefore, a prediction model with high prediction accuracy is very necessary. The higher the accuracy of the prediction model, the better the effect of the prediction control.
[0126] Furthermore, the specific steps of step S103 include:
[0127] S1031, performing iterative optimization of parameters based on the standard IMOGWO algorithm to obtain a prefabricated IMOGWO algorithm.
[0128] Specifically, this embodiment can solve the problems commonly existing in the prediction model, such as low solution accuracy, slow convergence speed in the later stage of solution, and easy falling into local optimum during the solution process, by prefabricating the IMOGWO algorithm to optimize the parameter prediction model, thereby ensuring that the sewage discharge meets the standards.
[0129] The step of obtaining the prefabricated IMOGWO algorithm specifically includes:
[0130] Step 1: Set the optimization variable parameters in the standard IMOGWO algorithm, initialize the population, and randomly generate several individuals in the feasible domain.
[0131] Specifically, set the number of optimization variables dim, the upper and lower limits of the optimization variables ub and lb, the maximum number of algorithm iterations T, the population size GreyWolves_num, the size of the external elite library Archive_size, etc. Initialize the population and randomly generate GreyWolves_num individuals in the feasible domain.
[0132] Step 2: Calculate the target values corresponding to several individuals.
[0133] Specifically: the number of individuals is the GreyWolves_num mentioned above.
[0134] Step 3: Determine the dominance relationship between the individuals, and group all non-dominated individuals to obtain the index and sub-index of the grid where the non-dominated individuals are located.
[0135] Specifically: According to the above target value, after determining the dominance relationship between individuals, all non-dominated individuals are stored in Archive.
[0136] Step 4: Perform iterative processing based on the index and its corresponding sub-index until the maximum number of iterations is reached, and output the solution set of the non-dominated individuals.
[0137] Specifically, first, four leaders are selected from Archive using the roulette method, and their positions are recorded as X α , X β , X δ and X γ ; and update the position X of each individual according to the relevant formula, and observe a nearby position X observe , compare the dominance of the two positions. If the new position is more dominant or equally dominant as the original position, move to that position. Secondly, calculate the constraint violation value of each individual, and delete the individuals with constraint violation values greater than 0. Thirdly, calculate the target value of the remaining individuals, compare the non-dominated individuals with the individuals in the Archive one by one, and store the more dominant individuals in the Archive to update them; regroup the individuals in the Archive. Finally, determine whether the number of individuals in the Archive exceeds Archive_size. If so, after non-dominated sorting, delete individuals according to the mechanism of crowding distance from large to small until the number of individuals in the Archive reaches Archive_size.
[0138] Step 5: Extract the optimal solution and the corresponding objective function value from the solution set to improve the standard IMOGWO algorithm to obtain the prefabricated IMOGWO algorithm.
[0139] Specifically, determine whether the algorithm has reached the maximum number of iterations. If so, terminate the algorithm and output the Pareto non-dominated solution set, from which the optimal solution and the corresponding objective function value are extracted; otherwise, return to step 4. In order to compare the complexity of the algorithm before and after the improvement, the complexity of the steps during the iteration (step 4) needs to be calculated one by one. Assume that the number of individuals in the gray wolf population is m, the number of individuals in the current Archive is n, and the dimension of the independent variable is dim.
[0140] S1032: Use the prefabricated IMOGWO algorithm to rollingly optimize the parameter prediction model.
[0141] Specifically, the control law of the system at a future moment is determined based on the future output of the prediction model. The rolling optimization in predictive control refers to the optimal control within a limited time. From a certain moment, the rolling optimization algorithm only optimizes the performance indicators within a limited time domain from this moment. After the rolling optimization algorithm obtains the optimal control law, it only applies the current control amount to the current moment. At the next moment, the optimization time domain moves forward by one moment. The rolling is repeated during the operation, and each time the open-loop optimal control within a time domain is obtained to achieve a good control effect.
[0142] S1033, correcting the parameter prediction model according to the error feedback of the predicted values and corresponding values at adjacent moments.
[0143] Specifically, in the continuous operation process, due to the inevitable phenomenon of model mismatch in the actual prediction model, the actual optimization result is likely to deviate from the ideal optimization result. In order to reduce the impact of various interference factors on the model, the model needs to be feedback corrected. At each sampling moment, the actual state of the target is first detected, and then the predicted value of the previous moment and the actual value of this moment are used as error compensation to the target value of the next moment. Each step of predictive control makes the prediction model more accurate and the control effect better through the feedback of real-time information.
[0144] S104, obtaining a predicted value of a target control parameter according to the optimized parameter prediction model.
[0145] Specifically, the target control parameters of this embodiment include dissolved oxygen parameters and nitrate nitrogen parameters. Among them, reasonable control of dissolved oxygen concentration in sewage is the most critical link to ensure the benign growth and reproduction of microorganisms in activated sludge and save energy and cost in sewage treatment process; if the dissolved oxygen content in sewage is too low, the reproduction rate of filamentous bacteria in aerobic tanks will be greatly accelerated, resulting in a large accumulation of carbon sludge, and aerobic bacteria in anaerobic tanks will gradually inactivate due to low oxygen content, resulting in a longer sewage treatment time; if the dissolved oxygen content in sewage is too low, it will affect the precipitation of solid suspended particles and indirectly increase the operating cost of sewage treatment. In addition, the nitrate nitrogen concentration in sewage is the main basis for judging the denitrification effect of microbial denitrification reaction; if the nitrate nitrogen concentration is too low, the organic matter in sewage cannot be completely decomposed by microorganisms in the denitrification reaction; if the nitrate nitrogen concentration is too high, the water body is prone to eutrophication, and the sewage treatment process will slow down. It can be seen from this that from the perspective of control, the purpose of controlling the entire sewage treatment process can be achieved by adjusting the variables of dissolved oxygen parameters and nitrate nitrogen parameters.
[0146] S105, controlling the predicted value based on a step-by-step fuzzy PID method to optimize the control of the sewage treatment process.
[0147] Specifically, in the optimization control of the sewage treatment process, the optimized set value needs to be accurately tracked and controlled by the controller. The control accuracy directly affects the overall sewage treatment optimization control effect, but the complex and changeable biochemical reactions in the sewage treatment process make it difficult to control. The step-by-step fuzzy PID method used in this embodiment still has an excellent tracking and control effect even under complex working conditions, and this control method can further reduce the energy consumption of the sewage treatment process and improve the economic benefits of the enterprise while ensuring that the effluent water quality meets the standard.
[0148] Furthermore, the specific steps of step S105 include:
[0149] S1051: Processing the predicted value based on the set value of the target control parameter, and using the processed result as the actual set value corresponding to the fuzzy PID control.
[0150] Specifically, before the fuzzy PID control, the set value is judged and processed according to the conventional step-by-step process of processing the set value, S O,5 With S NO,2 The setting value ranges are [0.4,3] and [0.2,2] respectively. Therefore, the step lengths of the step-by-step adjustment process of the two setting values are specified to be 0.6 and 0.4, and the processed results are used as the actual setting values of the fuzzy PID controller.
[0151] S1052: Using a quantization processing formula to process the actual setting value to obtain a quantization factor of the PID parameter.
[0152] The quantization processing formula is specifically:
[0153] sf = fr max -fr min / tr max -tr min ;
[0154] Where: sf is the quantization factor of the fuzzy controller input and output, fr max With fr min are the upper and lower limits of the true domain of each variable, tr max With tr min are the upper and lower limits of the fuzzy domain of each variable respectively.
[0155] Specifically, the domains of the input and output of the two controllers for dissolved oxygen parameters and nitrate nitrogen parameters are set to [-6, 6]. First, the range of the deviation and deviation change rate of the controlled variable and the increment range of the three PID parameters must be determined based on the steady-state water inlet file and the closed-loop controller simulation of BSM1. The value of the quantization factor of each variable can be determined through the range of the real domain and the fuzzy domain.
[0156] S1053, performing fuzzy reasoning based on the quantization factor to obtain a fuzzy processing result.
[0157] Specifically, fuzzy reasoning is based on the fuzzy rule table. Since the control quantity and the controlled quantity in the two controllers of sewage treatment have the same change relationship, the same fuzzy rule table can be used. A larger and reasonable proportional coefficient can speed up the initial dynamic response speed. In the middle period, the proportional coefficient should be reduced to reduce the overshoot of the system; and in the later period, a larger proportional coefficient is required to reduce the steady-state error. Based on the change value of the proportional coefficient established by the above analysis, the fuzzy rule table is as follows.
[0158]
[0159] S1054, using the maximum membership method to convert the fuzzy processing results into accurate quantities for online self-tuning of PID parameters.
[0160] Specifically, this embodiment adopts the maximum membership method, the purpose of which is to make full use of its advantages of good control effect and high control accuracy, and is particularly suitable for sewage treatment systems with complex input-output nonlinear relationships. The parameters after the step-by-step fuzzy PID tuning of this embodiment are as follows:
[0161]
[0162] In the formula, K ,p , K ,i , K ,d K p , K i , K d The preset value of
[0163] S1055, controlling the predicted value according to the self-tuned PID parameters to optimize the control of the sewage treatment process.
[0164] Specifically, in order to solve the problem that the set value changes too much in a short period of time, resulting in the controller not tracking in time, a step modulation strategy is introduced to make the set value gradually accumulate according to the step size and finally approach the set value to reduce the overshoot of the system. After processing the set value, the controller self-tunes the PID parameters online according to certain fuzzy rules to overcome the disadvantage that the traditional PID parameters cannot be adjusted in real time under complex and changing weather conditions, so that the control has a higher precision tracking control effect.
[0165] In summary: First, the BSM1 model of the sewage treatment process is built using Simulink, which can handle sewage treatment systems involving discrete, nonlinear, time-varying, multi-rate mixing, etc. that are difficult to solve using analytical methods, and improve the accuracy and effectiveness of the BSM1 model in processing multiple target variables. Secondly, the parameter prediction model obtained based on the BSM1 model and the Elman neural network makes full use of the universal approximation of the Elman neural network, so that the parameter prediction model can predict any nonlinear function; and the self-connected output mode of the Elman neural network makes it highly sensitive to historical information. Thirdly, by prefabricating the IMOGWO algorithm to optimize the parameter prediction model, the problems of low solution accuracy, slow convergence speed in the later stage of solution, and easy to fall into local optimality in the solution process that are usually present in the prediction model can be solved. Finally, the target control parameters are controlled by the step-by-step fuzzy PID method, so that the sewage treatment control has the advantages of high control accuracy, strong real-time performance, good robustness, etc., thereby achieving low energy consumption in the sewage discharge process. Through this embodiment, the energy consumption in the sewage discharge process can be effectively reduced while ensuring that the sewage discharge meets the standards.
[0166] Example 2
[0167] This embodiment provides a structural block diagram of a system corresponding to the method described in Embodiment 1. Figure 3 is a structural block diagram of the sewage treatment optimization control system according to this embodiment, such as Figure 3 As shown, the system includes:
[0168] Building module 10 is used to build a BSM1 model of the sewage treatment process using Simulink.
[0169] The training module 20 is used to capture sewage simulation data based on the BSM1 model and use the Elman neural network training to obtain a parameter prediction model for the sewage treatment process.
[0170] The optimization module 30 is used to optimize the parameter prediction model by using a prefabricated IMOGWO algorithm.
[0171] The prediction module 40 is used to obtain the predicted value of the target control parameter according to the optimized parameter prediction model.
[0172] The control module 50 is used to control the predicted value based on a step-by-step fuzzy PID method to optimize the control of the sewage treatment process.
[0173] Furthermore, the building module 10 specifically includes:
[0174] The construction unit 11 is used to construct a corresponding mathematical model based on the sewage inflow data and the performance evaluation index.
[0175] The solving unit 12 is used to solve the data model to obtain the corresponding equation.
[0176] The drawing unit 13 is used to draw a block diagram corresponding to the equation according to the equation.
[0177] The building unit 14 is used to build the block diagram in Simulink to form a BSM1 model of the sewage treatment process.
[0178] Furthermore, the training module 20 specifically includes:
[0179] The capture unit 21 is used to capture sewage simulation data through the BSM1 model based on the sewage historical data.
[0180] The constraint unit 22 is used to perform constraint processing on the sewage simulation data according to the predictive control optimization target.
[0181] The training unit 23 is used to obtain a parameter prediction model of the sewage treatment process by using the sewage simulation data after the Elman neural network training constraints.
[0182] Furthermore, the optimization module 30 specifically includes:
[0183] The iteration unit 31 is used for iteratively optimizing parameters based on the standard IMOGWO algorithm to obtain a prefabricated IMOGWO algorithm.
[0184] The step of obtaining the prefabricated IMOGWO algorithm specifically includes:
[0185] Step 1: Set the optimization variable parameters in the standard IMOGWO algorithm, initialize the population, and randomly generate several individuals in the feasible domain;
[0186] Step 2: Calculate the target values corresponding to a number of the individuals;
[0187] Step 3: Determine the dominance relationship between the individuals, and group all non-dominated individuals to obtain the index and sub-index of the grid where the non-dominated individuals are located;
[0188] Step 4: performing iterative processing based on the index and its corresponding sub-index until a maximum number of iterations is reached, and outputting a solution set of the non-dominated individuals;
[0189] Step 5: Extract the optimal solution and the corresponding objective function value from the solution set to improve the standard IMOGWO algorithm to obtain the prefabricated IMOGWO algorithm.
[0190] The optimization unit 32 is used to use the prefabricated IMOGWO algorithm to rollingly optimize the parameter prediction model.
[0191] The correction unit 33 is used to correct the parameter prediction model according to the error feedback of the prediction values and corresponding values at adjacent moments.
[0192] Furthermore, the control module 50 specifically includes:
[0193] The formulation unit 51 is used to process the predicted value based on the set value of the target control parameter, and use the processed result as the actual set value corresponding to the fuzzy PID control.
[0194] The quantization unit 52 is used to process the actual setting value using a quantization processing formula to obtain a quantization factor of the PID parameter.
[0195] Among them, the specific quantization processing formula is:
[0196] sf = fr max -fr min / tr max -tr min ;
[0197] Where: sf is the quantization factor of the fuzzy controller input and output, fr max With fr min are the upper and lower limits of the true domain of each variable, tr max With tr min are the upper and lower limits of the fuzzy domain of each variable respectively.
[0198] The reasoning unit 53 is used to perform fuzzy reasoning based on the quantization factor to obtain a fuzzy processing result.
[0199] The tuning unit 54 is used to convert the fuzzy processing result into an accurate quantity by using the maximum membership method to self-tune the PID parameters online.
[0200] The control unit 55 is used to control the predicted value according to the self-tuned PID parameters so as to optimize the control of the sewage treatment process.
[0201] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0202] Example 3
[0203] Combination Figure 1 The described sewage treatment optimization control method can be implemented by a computer. Figure 3 Schematic diagram of the hardware structure of a computer according to this embodiment.
[0204] The computer may include a processor 61 and a memory 62 storing computer program instructions.
[0205] Specifically, the processor 61 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the present application.
[0206] Among them, the memory 62 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 62 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 62 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 62 may be inside or outside a data processing device. In a specific embodiment, the memory 62 is a non-volatile memory. In a specific embodiment, the memory 62 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable Programmable Read-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (Static Random-Access Memory, abbreviated as SRAM) or a dynamic random access memory (Dynamic Random Access Memory, abbreviated as DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (Fast Page Mode Dynamic Random Access Memory, abbreviated as FPMDRAM), an extended data output dynamic random access memory (Extended Date Out Dynamic Random Access Memory, abbreviated as EDODRAM), a synchronous dynamic random access memory (Synchronous Dynamic Random-Access Memory, abbreviated as SDRAM), etc.
[0207] The memory 62 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 61 .
[0208] The processor 61 implements the sewage treatment optimization control method of the above-mentioned embodiment 1 by reading and executing the computer program instructions stored in the memory 62 .
[0209] In some embodiments, the computer may further include a communication interface 63 and a bus 60. Figure 3 As shown, the processor 61, the memory 62, and the communication interface 63 are connected via a bus 60 and communicate with each other.
[0210] The communication interface 63 is used to realize the communication between the modules, devices, units and / or equipment in the present application. The communication interface 63 can also realize data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage and image / data processing workstations.
[0211] The bus 60 includes hardware, software, or both, and couples the components of the computer to each other. The bus 60 includes, but is not limited to, at least one of the following: a data bus (DataBus), an address bus (AddressBus), a control bus (ControlBus), an expansion bus (ExpansionBus), and a local bus (LocalBus). By way of example and not limitation, the bus 60 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, or a 100-pin bus. Bus 60 may include one or more buses. Although the present application describes and illustrates a specific bus, the present application considers any suitable bus or interconnect.
[0212] The computer can obtain the sewage treatment optimization control system and execute the sewage treatment optimization control method of Example 1.
[0213] In addition, in combination with the wastewater treatment optimization control method in the above embodiment 1, the present application can provide a storage medium for implementation. The storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the wastewater treatment optimization control method in the above embodiment 1 is implemented.
[0214] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0215] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A sewage treatment optimization control method, characterized in that: include: Use Simulink to build the BSM1 model of the sewage treatment process; Based on the BSM1 model, sewage simulation data is captured, and a parameter prediction model of the sewage treatment process is obtained by using Elman neural network training; Optimizing the parameter prediction model using a prefabricated IMOGWO algorithm; Obtaining predicted values of target control parameters according to the optimized parameter prediction model, wherein the target control parameters include dissolved oxygen parameters and nitrate nitrogen parameters; The predicted value is controlled based on a step-by-step fuzzy PID method to optimize the control of the sewage treatment process.
2. The sewage treatment optimization control method according to claim 1, characterized in that: The steps of using Simulink to build the BSM1 model of the sewage treatment process specifically include: Construct a corresponding mathematical model based on sewage inflow data and performance evaluation indicators; Solving the data model to obtain an equation corresponding thereto; Draw a block diagram corresponding to the equation; The block diagram was constructed in Simulink to form a BSM1 model of the sewage treatment process.
3. The sewage treatment optimization control method according to claim 1, characterized in that: The steps of capturing sewage simulation data based on the BSM1 model and using the Elman neural network to train a parameter prediction model for the sewage treatment process specifically include: Based on the historical sewage data, the sewage simulation data is captured by the BSM1 model; Performing constraint processing on the sewage simulation data according to the predictive control optimization target; The parameter prediction model of the sewage treatment process is obtained by using the sewage simulation data after the Elman neural network training constraints.
4. The sewage treatment optimization control method according to claim 1, characterized in that: The step of using the prefabricated IMOGWO algorithm to optimize the parameter prediction model specifically includes: Iterative optimization of parameters based on the standard IMOGWO algorithm is used to obtain the prefabricated IMOGWO algorithm; Adopting the prefabricated IMOGWO algorithm to rollingly optimize the parameter prediction model; The parameter prediction model is corrected according to the error feedback of the predicted values and corresponding values at adjacent moments.
5. The sewage treatment optimization control method according to claim 4 is characterized in that: The step of obtaining the prefabricated IMOGWO algorithm specifically includes: In the standard IMOGWO algorithm, the optimization variable parameters are set, the population is initialized, and several individuals are randomly generated in the feasible domain; Calculating target values corresponding to a number of the individuals; Determine the dominance relationship between the individuals, and group all non-dominated individuals to obtain the index and sub-index of the grid where the non-dominated individuals are located; Iterate based on the index and its corresponding sub-index until a maximum number of iterations is reached, and output a solution set of the non-dominated individuals; The optimal solution and the objective function value corresponding thereto are extracted from the solution set so as to improve the standard IMOGWO algorithm to obtain the prefabricated IMOGWO algorithm.
6. The sewage treatment optimization control method according to claim 1, characterized in that: The step of controlling the predicted value based on the step-by-step fuzzy PID method to optimize the control of the sewage treatment process specifically includes: Processing the predicted value based on the set value of the target control parameter, and using the result of the processing as the actual set value corresponding to the fuzzy PID control; The actual setting value is processed by a quantization processing formula to obtain a quantization factor of the PID parameter; Perform fuzzy reasoning based on the quantization factor to obtain a fuzzy processing result; The maximum membership method is used to convert the fuzzy processing results into accurate quantities for online self-tuning of PID parameters; The predicted values are controlled according to the self-tuned PID parameters to optimize the control of the sewage treatment process.
7. The sewage treatment optimization control method according to claim 1, characterized in that: The quantization processing formula is specifically: sf=fr max -fr min / tr max -tr min ; Where: sf is the quantization factor of the fuzzy controller input and output, fr max With fr min are the upper and lower limits of the true domain of each variable, tr max With tr min are the upper and lower limits of the fuzzy domain of each variable respectively.
8. A sewage treatment optimization control system, characterized in that: include: Building modules for building a BSM1 model of a wastewater treatment process using Simulink; A training module, used to capture sewage simulation data based on the BSM1 model, and use Elman neural network training to obtain a parameter prediction model for the sewage treatment process; An optimization module, for optimizing the parameter prediction model using a prefabricated IMOGWO algorithm; A prediction module, used to obtain a predicted value of a target control parameter according to the optimized parameter prediction model; A control module is used to control the predicted value based on a step-by-step fuzzy PID method so as to optimize the control of the sewage treatment process.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the sewage treatment optimization control method according to any one of claims 1 to 7 is implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the sewage treatment optimization control method as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Wastewater treatment system optimization method based on dynamic simulation and multi-objective optimization
CN120654365A
Method for optimizing wastewater treatment system based on dynamic simulation and multi-objective optimization
CN120654365B