Method for optimizing wastewater treatment system based on dynamic simulation and multi-objective optimization
By combining simulation models and multi-objective particle swarm optimization algorithms in Simulink and MATLAB, the decision variables of a wastewater treatment system are optimized, solving the nonlinearity and time-varying problems of the wastewater treatment system, achieving the balance and stability of multi-objective optimization, and improving the wastewater treatment efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2025-04-23
- Publication Date
- 2026-04-28
AI Technical Summary
Due to their nonlinearity, time-varying nature, and uncertainty, wastewater treatment systems are difficult to optimize using simple dynamic simulations, such as reducing energy consumption and controlling sludge production while ensuring that the effluent quality meets standards.
An optimization method for wastewater treatment systems based on dynamic simulation and multi-objective optimization is constructed. By combining simulation models and multi-objective particle swarm optimization algorithms in Simulink and MATLAB, decision variables are optimized to achieve multi-objective optimization.
It improves the accuracy and reusability of the simulation model of the wastewater treatment system, solves the balance and stability of multi-objective optimization problems, and realizes efficient optimization of wastewater treatment.
Smart Images

Figure CN120654365B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wastewater treatment system optimization technology, and in particular to a wastewater treatment system optimization method based on dynamic simulation and multi-objective optimization. Background Technology
[0002] Wastewater treatment is a typical dynamic system, with its inputs (such as wastewater flow rate and pollutant concentration) and outputs (such as treatment effect and energy consumption) fluctuating over time and subject to complex influences from various internal and external factors, such as climate conditions and operating conditions. These factors lead to wastewater treatment systems exhibiting high nonlinearity, time-varying characteristics, and uncertainty, posing significant challenges to the stable operation and optimized management of the system.
[0003] Simple dynamic simulation is insufficient to address the multi-objective optimization problems faced by wastewater treatment systems. This means that while ensuring effluent quality meets standards, multiple dimensions such as minimizing energy consumption, controlling sludge production, and reducing operating costs must also be considered. Therefore, developing a method that can comprehensively consider multiple objectives, dynamically adjust operating parameters, and achieve global optimization of the wastewater treatment system is of great significance for improving wastewater treatment efficiency and promoting the sustainable use of water resources. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this application provides a wastewater treatment system optimization method based on dynamic simulation and multi-objective optimization.
[0005] According to a first aspect of the embodiments of this application, a wastewater treatment system optimization method based on dynamic simulation and multi-objective optimization is provided, comprising:
[0006] Based on the physical topology, actual operating process, and operating conditions of the wastewater treatment system, a simulation model of the wastewater treatment system is constructed.
[0007] Based on the wastewater treatment system discharge standards, define the evaluation indicators for the treatment performance of the wastewater treatment system;
[0008] Based on the working principle of wastewater treatment, the operating parameters of the wastewater treatment system as decision variables are determined based on the actual operating conditions, and the input and output of the simulation model of the wastewater treatment system are determined. The input is the decision variables, the output is the evaluation index, and the NGU file corresponding to the model is exported.
[0009] The NGU file is imported into the FMU module of Simulink, the input and output interfaces are parsed and obtained, and based on the obtained input and output interfaces, the corresponding Constant and Outport modules are set and connected in Simulink, and finally the Simulink file is generated.
[0010] Based on the working principle of the wastewater treatment system and optimization algorithm, a multi-objective particle swarm optimization algorithm was written in MATLAB, and the fitness function was defined with the optimal evaluation index as the optimization objective.
[0011] The Simulink file is processed using the sim() function in MATLAB. The optimal value of the fitness function is calculated by calling the output value of the Outport module corresponding to the evaluation index. MATLAB outputs the input value of the Constant module under the corresponding condition based on the optimal value of the fitness function, thus obtaining the optimal decision variable setting value.
[0012] According to a second aspect of the embodiments of this application, a wastewater treatment system optimization device based on dynamic simulation and multi-objective optimization is provided, comprising:
[0013] The model building module is used to build a simulation model of the wastewater treatment system based on the physical topology, actual operating process and operating conditions of the wastewater treatment system.
[0014] The evaluation index definition module is used to define evaluation indexes for the treatment performance of wastewater treatment systems based on the wastewater treatment system discharge standards.
[0015] The input / output determination module is used to determine the operating parameters of the wastewater treatment system as decision variables based on the working principle of wastewater treatment and the actual operating conditions, and to determine the input and output of the simulation model of the wastewater treatment system. The input is the decision variables, the output is the evaluation index, and the module exports the NGU file corresponding to the model.
[0016] The parsing and generation module is used to import the NGU file into the Simulink FMU module, parse the input and output interfaces, set and connect the corresponding Constant and Outport modules in Simulink based on the obtained input and output interfaces, and finally generate the Simulink file.
[0017] The algorithm writing module is used to write a multi-objective particle swarm optimization algorithm in MATLAB based on the working principle of the wastewater treatment system and the optimization algorithm, and to define the fitness function with the optimal evaluation index as the optimization objective.
[0018] The optimization module is used to process the Simulink file using the sim() function in MATLAB, call the output value of the Outport module corresponding to the evaluation index to calculate the optimal value of the fitness function, and MATLAB outputs the input value of the Constant module under the corresponding condition based on the optimal value of the fitness function to obtain the optimal decision variable setting value.
[0019] According to a third aspect of the embodiments of this application, an electronic device is provided, comprising:
[0020] One or more processors;
[0021] Memory, used to store one or more programs;
[0022] When the one or more programs are executed by the one or more processors, the one or more processors perform the method as described in the first aspect.
[0023] The technical solutions provided by the embodiments of this application may include the following beneficial effects:
[0024] As can be seen from the above embodiments, this application constructs a wastewater treatment system simulation model based on NGM software according to the physical topology, actual operating process, and operating conditions of the wastewater treatment system, and determines the input and output of the module; defines the evaluation index of the wastewater treatment system's treatment performance according to the wastewater treatment system's discharge standards; determines the operating parameters as decision variables in the wastewater treatment system based on the actual operating conditions according to the working principle of wastewater treatment, and determines the input and output of the wastewater treatment system simulation model, with the input being the decision variables and the output being the evaluation index, and exports the NGU file corresponding to the model; imports the NGU file into the Simulink FMU module, parses and obtains the input and output interfaces, and based on the obtained... Input and output interfaces are configured and connected to the corresponding Constant and Output modules in Simulink, finally generating a Simulink file. Based on the working principle of the wastewater treatment system and optimization algorithm, a multi-objective particle swarm optimization (MOPSO) algorithm is written in MATLAB, defining a fitness function with the optimal evaluation index as the optimization objective. The Simulink file is processed using the sim() function, calling the Output module values corresponding to the evaluation index to calculate the optimal value of the fitness function. MATLAB will output the Constant module input values under the corresponding conditions based on the optimal value of the fitness function, thus obtaining the optimal decision variable settings. A dynamic simulation model of the wastewater treatment system is built based on the actual physical topology, actual operating process, and operating conditions, overcoming the technical problems of nonlinearity, time-varying nature, and uncertainty in the wastewater treatment system, thereby improving the accuracy and reusability of the wastewater treatment system simulation model. Based on the multi-objective algorithm, the technical problem of traditional single-objective optimization algorithms easily getting trapped in local optima in multi-objective problems is overcome, thereby improving the balance and stability of solving multi-objective optimization problems. By applying actual physical topology, actual operating processes, and dynamic simulation to the modeling and simulation of wastewater treatment systems, and combining this with MATLAB-based multi-objective optimization algorithms, we can achieve accurate simulation and efficient optimization of wastewater treatment processes, providing strong support for technological innovation and green development in the field of wastewater treatment.
[0025] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0027] Figure 1 This is a flowchart illustrating an optimization method for a wastewater treatment system based on dynamic simulation and multi-objective optimization, according to an exemplary embodiment.
[0028] Figure 2 This is a schematic diagram of a simulation model of a wastewater treatment system according to an exemplary embodiment.
[0029] Figure 3 This is a schematic diagram illustrating the combination of a dynamic model and a multi-objective algorithm according to an exemplary embodiment.
[0030] Figure 4 This is a Pareto diagram illustrating equilibrium optimization according to an exemplary embodiment.
[0031] Figure 5 This is a block diagram illustrating a wastewater treatment system optimization device based on dynamic simulation and multi-objective optimization according to an exemplary embodiment. Detailed Implementation
[0032] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0033] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0034] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0035] Figure 1 This is a flowchart illustrating an optimization method for a wastewater treatment system based on dynamic simulation and multi-objective optimization, according to an exemplary embodiment. Figure 1 As shown, this method, when applied to a terminal, may include the following steps:
[0036] S1: Construct a simulation model of the wastewater treatment system based on its physical topology, actual operating process, and operating conditions;
[0037] Specifically, based on the actual wastewater treatment system information provided by the manufacturer, data corresponding to the physical topology, operating process, and operating conditions are obtained. The operating process of the wastewater treatment system is as follows: Figure 2 As shown, a dynamic simulation model was established using the modeling software NGM, which included models of the primary sedimentation tank, nitrification tank, denitrification tank, and secondary sedimentation tank.
[0038] The above steps construct a dynamic simulation model of the wastewater treatment system. This model is used to calculate the effluent results of the actual wastewater treatment system and can describe the effluent characteristic curves of the wastewater treatment system under different operating conditions.
[0039] S2: Based on the wastewater treatment system discharge standards, define evaluation indicators for the treatment performance of the wastewater treatment system. These evaluation indicators are used to quantify the treatment effect of the wastewater treatment system.
[0040] Specifically, based on the wastewater treatment system discharge standards, evaluation indicators for the performance of the wastewater treatment system are determined. These evaluation indicators include at least chemical oxygen demand (COD), total nitrogen, and ammonia nitrogen, and may also include biological oxygen demand (BOD), nitrate nitrogen, and dissolved phosphorus.
[0041] Chemical oxygen demand (COD) measures the total amount of organic and inorganic matter in water that can be oxidized by strong oxidants (such as potassium dichromate), reflecting the degree of organic pollution in the water body; total nitrogen includes ammonia nitrogen and nitrate nitrogen (NO3). - ), nitrite nitrogen (NO2) - The sum of nitrogen in the form of free ammonia (NH3) and organic nitrogen; ammonia nitrogen is expressed as free ammonia (NH3) and ammonium ions (NH4+). + Nitrogen exists in the form of organic matter. Using chemical oxygen demand (COD), total nitrogen, and ammonia nitrogen as evaluation indicators can fully reflect the concentration of organic matter and the degree of pollution in water.
[0042] Biological oxygen demand (BOD) represents the amount of oxygen required by microorganisms to decompose organic matter in water within 5 days at 20°C; nitrate nitrogen represents the amount of nitrate (NO3) in water. - The nitrogen content in the figure; dissolved phosphorus refers to phosphorus existing in the form of soluble orthophosphate. Adding the aforementioned biological oxygen demand, nitrate nitrogen, and dissolved phosphorus as evaluation indicators of wastewater treatment system performance allows for a more comprehensive assessment of organic pollution, monitoring of the denitrification process, and prevention of eutrophication of water bodies.
[0043] S3: Based on the working principle of wastewater treatment, determine the operating parameters of the wastewater treatment system as decision variables based on actual operating conditions, and determine the input and output of the wastewater treatment system simulation model. The input is the decision variables, and the output is the evaluation index. Export the NGU file corresponding to the model. This step may include the following sub-steps:
[0044] S31: Based on the operating process of the wastewater treatment system, determine the two operating parameters, dissolved oxygen concentration in the aeration tank and dissolved oxygen concentration in the anoxic tank, as decision variables in the wastewater treatment system.
[0045] Specifically, the operating parameters include at least the dissolved oxygen concentration in the aeration tank and the dissolved oxygen concentration in the anoxic tank, and may also include the external return rate, the volume of the aeration tank, and the volume of the anoxic tank.
[0046] The dissolved oxygen concentration in the aeration tank primarily affects the nitrification reaction and organic matter degradation efficiency in the wastewater treatment system; the dissolved oxygen concentration in the anoxic tank primarily affects the denitrification reaction. By using the dissolved oxygen concentrations in the aeration tank and the anoxic tank as decision parameters, the wastewater treatment reaction pathway can be controlled through dissolved oxygen concentration.
[0047] The external return rate, or sludge return ratio, primarily affects sludge age and denitrification capacity. A high return rate enhances denitrification but increases energy consumption, requiring optimization to achieve economic efficiency. The aeration tank volume determines the hydraulic retention time, directly impacting the completion of organic matter degradation and nitrification reactions. The anoxic tank volume determines the time required for denitrification; insufficient volume prevents nitrate nitrogen from being fully reduced to N2, leading to excessive total nitrogen in the effluent. Incorporating these factors allows for the regulation of sludge and substrate distribution using the external return rate, and ensures sufficient reaction time using the aeration and anoxic tank volumes, thus optimizing the microbial metabolic environment.
[0048] S32: Based on the decision variables and evaluation indicators, determine the input and output of the wastewater treatment system simulation model, where the input is the decision variables and the output is the evaluation indicators;
[0049] S33: Based on the wastewater treatment system simulation model, use the FMU export function of the NGM modeling software to export the NGU file corresponding to the wastewater treatment system simulation model, such as... Figure 3 The first and second steps are shown in the diagram.
[0050] The above steps construct the NGU file corresponding to the wastewater treatment system simulation model. The NGU file is used to encapsulate the wastewater treatment system simulation model and provide an interface for combining dynamic models and multi-objective algorithms.
[0051] S4: Import the NGU file into the Simulink FMU module, parse out the input and output interfaces, and based on the obtained input and output interfaces, set up and connect the corresponding Constant and Outport modules in Simulink, finally generating the Simulink file. This step may include the following sub-steps:
[0052] S41: According to the internationally unified FMI standard, the NGU file is imported using the FMU module in Simulink to realize the simulation of the wastewater treatment system model in Simulink. Figure 3 As shown in step three;
[0053] S42: Based on the actual operating conditions of the wastewater treatment system and the input and output results of the NGU file, the input and output interfaces are set to obtain the input interface for inputting the decision variables and the output interface for outputting the evaluation indicators.
[0054] This example provides 6 input interfaces and 5 output interfaces;
[0055] S43: Based on the obtained input and output interfaces, set up and connect the corresponding Constant and Outport modules in Simulink.
[0056] The Simulink file is constructed using the steps described above, as follows: Figure 3 As shown. The Simulink file is used to load the NGU file to form a complete system with input / output modules.
[0057] S5: Based on the working principles of the wastewater treatment system and optimization algorithm, write a multi-objective particle swarm optimization (MOPSO) algorithm in MATLAB, defining a fitness function with the optimal evaluation index as the optimization objective. This step may include the following sub-steps:
[0058] S51: Based on the working principle of the wastewater treatment system and the evaluation indicators, this problem is determined to be a multi-objective optimization problem and the multi-objective particle swarm optimization algorithm is used to solve the problem;
[0059] S52: Based on the working principle of optimization algorithms, write a multi-objective particle swarm optimization (MOPSO) algorithm in MATLAB, and define the fitness function with the optimal evaluation index as the optimization objective.
[0060] Specifically, assuming the performance evaluation indicators for the wastewater treatment system are set as Chemical Oxygen Demand (COD), Biological Oxygen Demand (BOD), Total Nitrogen (TN), Ammonia Nitrogen (NH4-H), and Nitrate Nitrogen (NO4-H),... XThe optimization objective is to find the minimum value of these six indicators in a balanced manner. The fitness function f is calculated using the optimization ratio of each indicator, as shown below.
[0061] (1)
[0062] (2)
[0063] (3)
[0064] (4)
[0065] (5)
[0066] (6)
[0067] (7)
[0068] In the formula, Let be the overall objective function. The optimized efficiency corresponding to the chemical oxygen demand of the effluent. The optimized efficiency corresponds to the oxygen demand of effluent organisms. The optimized efficiency corresponding to total nitrogen in the effluent. To optimize the efficiency corresponding to ammonia nitrogen in the effluent. To optimize the efficiency corresponding to nitrate nitrogen in the effluent, To optimize the efficiency of phosphorus dissolution in the effluent, The simulation model of the wastewater treatment system obtained Simulation results, For actual wastewater treatment systems Measurement results The simulation model of the wastewater treatment system obtained Simulation results, For actual wastewater treatment systems Measurement results The simulation model of the wastewater treatment system obtained Simulation results, For actual wastewater treatment systems Measurement results The simulation model of the wastewater treatment system obtained Simulation results, For actual wastewater treatment systems Measurement results The simulation model of the wastewater treatment system obtained Simulation results, For actual wastewater treatment systems Measurement results The simulation model of the wastewater treatment system obtained Simulation results, For actual wastewater treatment systems Measurement results.
[0069] S6: Process the Simulink file using the sim() function in MATLAB, calculate the optimal value of the fitness function by calling the output value of the Outport module corresponding to the evaluation index, and MATLAB outputs the input value of the Constant module under the corresponding condition based on the optimal value of the fitness function, thus obtaining the optimal decision variable settings. This step may include the following sub-steps:
[0070] S61: Based on the MOPSO algorithm and fitness function, load, simulate, set parameters, and obtain results for the Simulink file using the sim() function;
[0071] S62: Based on the Simulink calculation results, call the Outport module value corresponding to the evaluation index to calculate the optimal value of the fitness function, and obtain the optimized setting value of the decision variable. Figure 4 The optimal values of each fitness function obtained from 150 optimizations were summarized to obtain the optimal setting values of the decision variables.
[0072] As can be seen from the above embodiments, this application constructs a wastewater treatment system simulation model based on NGM software according to the physical topology, actual operating process, and operating conditions of the wastewater treatment system, and determines the input and output of the module; defines the evaluation index of the wastewater treatment system's treatment performance according to the wastewater treatment system's discharge standards; determines the operating parameters as decision variables in the wastewater treatment system based on the actual operating conditions according to the working principle of wastewater treatment, and determines the input and output of the wastewater treatment system simulation model, with the input being the decision variables and the output being the evaluation index, and exports the NGU file corresponding to the model; imports the NGU file into the Simulink FMU module, parses and obtains the input and output interfaces, and based on the obtained... Input and output interfaces are configured and connected to the corresponding Constant and Output modules in Simulink, finally generating a Simulink file. Based on the working principle of the wastewater treatment system and optimization algorithm, a multi-objective particle swarm optimization (MOPSO) algorithm is written in MATLAB, defining a fitness function with the optimal evaluation index as the optimization objective. The Simulink file is processed using the sim() function, calling the Output module values corresponding to the evaluation index to calculate the optimal value of the fitness function. MATLAB will output the Constant module input values under the corresponding conditions based on the optimal value of the fitness function, thus obtaining the optimal decision variable settings. A dynamic simulation model of the wastewater treatment system is built based on the actual physical topology, actual operating process, and operating conditions, overcoming the technical problems of nonlinearity, time-varying nature, and uncertainty in the wastewater treatment system, thereby improving the accuracy and reusability of the wastewater treatment system simulation model. Based on the multi-objective algorithm, the technical problem of traditional single-objective optimization algorithms easily getting trapped in local optima in multi-objective problems is overcome, thereby improving the balance and stability of solving multi-objective optimization problems. By applying actual physical topology, actual operating processes, and dynamic simulation to the modeling and simulation of wastewater treatment systems, and combining this with MATLAB-based multi-objective optimization algorithms, we can achieve accurate simulation and efficient optimization of wastewater treatment processes, providing strong support for technological innovation and green development in the field of wastewater treatment.
[0073] Corresponding to the aforementioned embodiments of the wastewater treatment system optimization method based on dynamic simulation and multi-objective optimization, this application also provides embodiments of the wastewater treatment system optimization method based on dynamic simulation and multi-objective optimization.
[0074] Figure 5 This is an exemplary embodiment illustrating a wastewater treatment system optimization device based on dynamic simulation and multi-objective optimization. (Refer to...) Figure 5 The device includes:
[0075] The model building module is used to build a simulation model of the wastewater treatment system based on the physical topology, actual operating process and operating conditions of the wastewater treatment system.
[0076] The evaluation index definition module is used to define evaluation indexes for the treatment performance of wastewater treatment systems based on the wastewater treatment system discharge standards.
[0077] The input / output determination module is used to determine the operating parameters of the wastewater treatment system as decision variables based on the working principle of wastewater treatment and the actual operating conditions, and to determine the input and output of the simulation model of the wastewater treatment system. The input is the decision variables, the output is the evaluation index, and the module exports the NGU file corresponding to the model.
[0078] The parsing and generation module is used to import the NGU file into the Simulink FMU module, parse the input and output interfaces, set and connect the corresponding Constant and Outport modules in Simulink based on the obtained input and output interfaces, and finally generate the Simulink file.
[0079] The algorithm writing module is used to write a multi-objective particle swarm optimization algorithm in MATLAB based on the working principle of the wastewater treatment system and the optimization algorithm, and to define the fitness function with the optimal evaluation index as the optimization objective.
[0080] The optimization module is used to process the Simulink file using the sim() function in MATLAB, call the output value of the Outport module corresponding to the evaluation index to calculate the optimal value of the fitness function, and MATLAB outputs the input value of the Constant module under the corresponding condition based on the optimal value of the fitness function to obtain the optimal decision variable setting value.
[0081] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0082] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0083] Accordingly, this application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; and when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the wastewater treatment system optimization method based on dynamic simulation and multi-objective optimization as described above.
[0084] Accordingly, this application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the wastewater treatment system optimization method based on dynamic simulation and multi-objective optimization as described above.
[0085] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.
[0086] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A wastewater treatment system optimization method based on dynamic simulation and multi-objective optimization, characterized in that, include: Based on the physical topology, actual operating process, and operating conditions of the wastewater treatment system, a simulation model of the wastewater treatment system is constructed. Based on the wastewater treatment system discharge standards, define the evaluation indicators for the treatment performance of the wastewater treatment system; Based on the working principle of wastewater treatment, the operating parameters of the wastewater treatment system as decision variables are determined based on the actual operating conditions, and the input and output of the simulation model of the wastewater treatment system are determined. The input is the decision variables, the output is the evaluation index, and the NGU file corresponding to the model is exported. The NGU file is imported into the FMU module of Simulink, the input and output interfaces are parsed and obtained, and based on the obtained input and output interfaces, the corresponding Constant and Outport modules are set and connected in Simulink, and finally the Simulink file is generated. Based on the working principle of the wastewater treatment system and optimization algorithm, a multi-objective particle swarm optimization algorithm was written in MATLAB, and the fitness function was defined with the optimal evaluation index as the optimization objective. The Simulink file is processed using the sim() function in MATLAB. The optimal value of the fitness function is calculated by calling the output value of the Outport module corresponding to the evaluation index. MATLAB outputs the input value of the Constant module under the corresponding condition based on the optimal value of the fitness function, thus obtaining the optimal decision variable setting value.
2. The method according to claim 1, characterized in that, Based on the wastewater treatment system discharge standards, evaluation indicators for the treatment performance of wastewater treatment systems are defined, including: According to the wastewater treatment system discharge standards, chemical oxygen demand, total nitrogen, and ammonia nitrogen are used as evaluation indicators for the performance of wastewater treatment systems.
3. The method according to claim 1, characterized in that, Based on the working principle of wastewater treatment, the operating parameters of the wastewater treatment system as decision variables are determined based on actual operating conditions. The input and output of the wastewater treatment system simulation model are also determined, with the decision variables as the input and the evaluation index as the output. The corresponding NGU file for the model is exported, including: Based on the operating process of the wastewater treatment system, two operating parameters, namely the dissolved oxygen concentration in the aeration tank and the dissolved oxygen concentration in the anoxic tank, are determined as decision variables in the wastewater treatment system. Based on the decision variables and evaluation indicators, the input and output of the wastewater treatment system simulation model are determined, where the input is the decision variables and the output is the evaluation indicators. Based on the wastewater treatment system simulation model, the NGU file corresponding to the wastewater treatment system simulation model is exported using the FMU export function of the NGM modeling software.
4. The method according to claim 1, characterized in that, Import the NGU file into the Simulink FMU module, parse out the input and output interfaces, and based on the obtained input and output interfaces, set up and connect the corresponding Constant and Outport modules in Simulink. Finally, generate a Simulink file, including: According to the internationally unified FMI standard, the NGU file is imported using the FMU module in Simulink to realize the simulation of the wastewater treatment system model in Simulink. Based on the actual operating conditions of the wastewater treatment system and the input and output results of the NGU file, input and output interfaces are set up. The input interface is used to input the decision variables, and the output interface is used to output the evaluation indicators. Based on the obtained input and output interfaces, set up and connect the corresponding Constant and Outport modules in Simulink.
5. The method according to claim 1, characterized in that, Based on the working principles of wastewater treatment systems and optimization algorithms, a multi-objective particle swarm optimization algorithm is written in MATLAB. The fitness function is defined with the optimization objective of achieving the optimal evaluation index, including: Based on the working principle of the wastewater treatment system and the evaluation indicators, the problem is identified as a multi-objective optimization problem and is solved using a multi-objective particle swarm optimization algorithm. Based on the working principle of optimization algorithms, a multi-objective particle swarm optimization (MOPSO) algorithm was written in MATLAB, with the fitness function defined as the optimization objective of achieving the optimal evaluation index.
6. The method according to claim 5, characterized in that, The Simulink file is processed using the `sim()` function in MATLAB. The optimal value of the fitness function is calculated by calling the output value of the `Outport` module corresponding to the evaluation metric. MATLAB then outputs the corresponding input value of the `Constant` module based on the optimal value of the fitness function, thus obtaining the optimal decision variable settings, including: Based on the MOPSO algorithm and fitness function, the Simulink file is loaded, simulated, parameters are set, and results are obtained using the sim() function in MATLAB; Based on the Simulink calculation results, the optimal value of the fitness function is calculated by calling the Outport module value corresponding to the evaluation index, thereby obtaining the optimized setting value of the decision variable.
7. A wastewater treatment system optimization device based on dynamic simulation and multi-objective optimization, characterized in that, include: The model building module is used to build a simulation model of the wastewater treatment system based on the physical topology, actual operating process and operating conditions of the wastewater treatment system. The evaluation index definition module is used to define evaluation indexes for the treatment performance of wastewater treatment systems based on the wastewater treatment system discharge standards. The input / output determination module is used to determine the operating parameters of the wastewater treatment system as decision variables based on the working principle of wastewater treatment and the actual operating conditions, and to determine the input and output of the simulation model of the wastewater treatment system. The input is the decision variables, the output is the evaluation index, and the module exports the NGU file corresponding to the model. The parsing and generation module is used to import the NGU file into the Simulink FMU module, parse the input and output interfaces, set and connect the corresponding Constant and Outport modules in Simulink based on the obtained input and output interfaces, and finally generate the Simulink file. The algorithm writing module is used to write a multi-objective particle swarm optimization algorithm in MATLAB based on the working principle of the wastewater treatment system and the optimization algorithm, and to define the fitness function with the optimal evaluation index as the optimization objective. The optimization module is used to process the Simulink file using the sim() function in MATLAB, call the output value of the Outport module corresponding to the evaluation index to calculate the optimal value of the fitness function, and MATLAB outputs the input value of the Constant module under the corresponding condition based on the optimal value of the fitness function to obtain the optimal decision variable setting value.
8. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.
9. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Algorithm configurable system for multi-stage production resource scheduling simulation optimization
CN117763943A
Sewage treatment optimization control method and system, electronic equipment and storage medium
CN119536088A