A wastewater treatment control method, apparatus, system and its storage medium

By combining the ASM2d model and artificial neural network, a dynamic simulation model was established and the neural network was trained, which solved the problem of insufficient adaptability of the activated sludge model in the face of sudden water quality disturbances, realized the automation and intelligent control of sewage treatment, and improved the control accuracy and system adaptability.

CN120757245BActive Publication Date: 2026-03-06WUHAN OPTICS VALLEY ENVIRONMENTAL TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing activated sludge models cannot reflect system changes in real time when faced with sudden water quality disturbances, and lack data-driven process control mechanisms, which limits the development of automation and intelligence in wastewater treatment processes.

Method used

A dynamic simulation model is established based on the ASM2d model. Combined with an artificial neural network, the control parameters are calculated based on actual influent water quality data by training the neural network model, thereby realizing the automation and intelligence of sewage treatment.

Benefits of technology

It improves the control precision and system adaptability of wastewater treatment, realizes the automation and intelligent control of the wastewater treatment process, and enhances the adaptability to complex water quality conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120757245B_ABST
    Figure CN120757245B_ABST
Patent Text Reader

Abstract

This application provides a wastewater treatment control method, apparatus, system, and storage medium thereof, relating to the field of wastewater treatment technology. The control method includes: establishing a dynamic simulation model; constructing a full dataset; constructing and training an artificial neural network model based on the full dataset; acquiring actual influent water quality data; and using the dynamic simulation model and the artificial neural network model to obtain actual process control parameters and control the operation of the wastewater treatment. This wastewater treatment control method utilizes simulation data to train the neural network model and calculates control parameters based on actual influent water quality, achieving automation and intelligence in wastewater treatment, and improving control accuracy and system adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wastewater treatment technology, and more specifically, to a wastewater treatment control method, apparatus, system, and storage medium thereof. Background Technology

[0002] Water pollution is becoming increasingly complex. In addition to common pollutants, emerging pollutants such as heavy metals, antibiotics, drug residues, and eutrophication are frequently appearing, significantly exacerbating the threats to ecosystems and public health. To address the diverse water quality conditions, the wastewater treatment field has developed various biological treatment processes, including CAST, A2O, AO, MBR, SBR, OD, and AB. These processes are based on activated sludge systems, removing pollutants through microbial metabolism, and are combined with operational control strategies to improve treatment efficiency.

[0003] Activated sludge models (such as ASM2d) have been increasingly applied to simulate biochemical processes and predict effluent quality, playing a significant role in assisting process optimization. However, these models are typically limited to biological treatment units and lack sufficient description of the combined effects of control mechanisms such as chemical dosing, aeration, and reflux within the system. They rely on a large number of parameters, have complex models structures, require high input accuracy, and are difficult to adapt to rapid changes in actual operation.

[0004] In the event of sudden water quality disturbances (such as rainstorms or pollution source leaks), activated sludge models cannot reflect system changes in real time and lack the ability to directly translate simulation results into process control commands. Currently, the control of wastewater treatment plants still largely relies on manual judgment, lacking an effective data-driven mechanism to connect predictive models with actual control systems.

[0005] Therefore, although the activated sludge model provides a certain foundation for water quality prediction, it still has significant shortcomings in dynamic and adaptive control, which limits the further development of wastewater treatment processes towards automation and intelligence. Summary of the Invention

[0006] In view of this, the purpose of the present invention is to provide a wastewater treatment control method, device, system and storage medium thereof. The wastewater treatment control method uses simulated data to train a neural network model and calculates control parameters based on the actual influent water quality to realize the automation and intelligence of wastewater treatment, thereby improving control accuracy and system adaptability.

[0007] In a first aspect, the present invention provides a wastewater treatment control method, comprising:

[0008] A dynamic simulation model of the wastewater treatment process was established based on the ASM2d model;

[0009] The process involves acquiring input water quality data from the target water source; using the dynamic simulation model to acquire output water quality data corresponding to the input water quality data under different operating conditions, as well as simulated process control parameters under the corresponding operating conditions; and constructing a full dataset based on the input water quality data, the output water quality data, and the simulated process control parameters; wherein, the input water quality data, the output water quality data, and the simulated process control parameters that do not meet the preset water quality standards are excluded from the full dataset.

[0010] An artificial neural network model is constructed based on the full dataset, and the artificial neural network model is trained to obtain the trained artificial neural network model; wherein, the artificial neural network model includes a first model trained based on the input water quality data and a second model trained based on the output water quality data;

[0011] The actual influent water quality data of the target water source is obtained, and the actual process control parameters corresponding to the target water source are obtained using the dynamic simulation model and the artificial neural network model. The operation of the wastewater treatment is controlled based on the actual process control parameters.

[0012] In an optional implementation, the dynamic simulation model of the wastewater treatment process based on the ASM2d model includes:

[0013] Construct a dynamic simulation model;

[0014] The historical operational data of the target water source is obtained, and the dynamic simulation model is verified by steady-state simulation based on the historical operational data.

[0015] Sensitivity analysis was performed on the dynamic simulation model after steady-state simulation verification, and the confirmed model parameters were individually optimized and adjusted based on the sensitivity to obtain the dynamic simulation model with optimized accuracy.

[0016] The predictive performance of the dynamic simulation model based on the individually optimized and adjusted model parameters is verified through dynamic simulation, thereby obtaining the dynamic simulation model after dynamic simulation.

[0017] In an optional implementation, the expression for the sensitivity analysis is:

[0018] ;

[0019] Wherein, a represents the input model parameter of the dynamic simulation model; a1 and a2 represent the typical value and the changed value of the model parameter, respectively; y represents the water quality index that the dynamic simulation model focuses on during the simulation process; y1 and y2 represent the corresponding simulated output y value of the water quality index under the conditions of a1 and a2, respectively; S represents the sensitivity coefficient of the model parameter to the water quality index.

[0020] In an optional implementation, the step of individually optimizing and adjusting the confirmed model parameters based on sensitivity includes:

[0021] Determine whether the absolute value of the sensitivity of the model parameters is greater than a preset sensitivity threshold;

[0022] If so, the model parameter whose absolute sensitivity value is greater than the preset sensitivity threshold is taken as the parameter to be adjusted;

[0023] Using the default value of the dynamic simulation model as the center, the variation range and step size of each parameter to be adjusted are set to construct the value sequence of the parameter to be adjusted;

[0024] Based on the value sequence, the values ​​of all the parameters to be adjusted are combined in an orthogonal manner to generate multiple parameter combinations for simulation analysis;

[0025] Each set of parameters is input into the dynamic simulation model to obtain the corresponding simulated output water quality index;

[0026] For each of the simulated output water quality indicators, the corresponding prediction error is calculated; the prediction error includes the coefficient of determination and the mean square error.

[0027] Among all the parameter combinations, the combination with the largest determination coefficient and the smallest mean square error is selected as the optimized model parameters, so as to update the dynamic simulation model according to the model parameters.

[0028] In an optional implementation, the determination coefficient is calculated as follows:

[0029] ;

[0030] Among them, R 2 Represents the coefficient of determination; Represents the true value of the i-th data point; This represents the predicted value of the i-th data point output by the dynamic simulation model. Represents the sample mean; To account for the error generated in the prediction, The error caused by the mean.

[0031] In an optional implementation, the mean square error is calculated as follows:

[0032] MSE= ;

[0033] Where MSE represents the mean squared error; m represents the total number of samples. This represents the true value of the i-th data point. This represents the predicted value of the i-th data point output by the dynamic simulation model. This represents the sample mean.

[0034] In an optional implementation, training the artificial neural network model includes:

[0035] The entire dataset is standardized, and principal component analysis is performed on the standardized dataset to divide it into training and validation sets.

[0036] Based on the training set, the first model and the second model in the artificial neural network model are trained, and the predictive performance of all the artificial neural network models is evaluated according to the absolute percentage error; wherein, the training involves inputting the input water quality data into the first model to obtain the simulated process control parameters corresponding to the input water quality data; and inputting the input water quality data and the output water quality data into the second model to obtain the simulated process control parameters corresponding to the input water quality data and the output water quality data;

[0037] Based on the predicted performance, the preferred type of artificial neural network model is determined, and a cyclic algorithm is used to determine the network structure and hyperparameter configuration of the preferred type of artificial neural network model as the preferred configuration;

[0038] According to the preferred configuration, the artificial neural network model is retrained until a well-trained artificial neural network model is obtained.

[0039] In an optional implementation, the expression for the standardization process is:

[0040] ;

[0041] in, σ represents the standardized score; x represents a specific variable in the entire dataset; μ represents the mean of the input variable in the entire dataset; σ represents the standard deviation of the input variable in the entire dataset.

[0042] In an optional implementation, the expression for the principal component analysis is:

[0043] ;

[0044] in, Represents the principal component analysis matrix; This represents the standardized numerical matrix prior to PCA; represent and Numerical matrix after principal component analysis.

[0045] In an optional implementation, the formula for calculating the absolute percentage error is:

[0046] ;

[0047] Where MAPE represents absolute percentage error; n represents the number of test sets; The simulated output value representing data point i; This represents the actual output value of data point i.

[0048] In an optional implementation, the step of acquiring the actual influent water quality data of the target water source and using the dynamic simulation model and the artificial neural network model to obtain the actual process control parameters corresponding to the target water source includes:

[0049] Collect actual influent water quality data of the target water source, and obtain predicted process parameters through the first model;

[0050] Based on the predicted process parameters, the actual influent water quality data are simulated using the dynamic simulation model to obtain the actual effluent water quality data of the target water source.

[0051] Determine whether the actual effluent data meets the preset water quality standard;

[0052] If so, the predicted process parameters are output as the actual process control parameters;

[0053] If not, the actual influent water quality data and the actual effluent water quality data are input into the second model to obtain new process parameters; the new process parameters are used as the predicted process parameters, and the process returns to the step of simulating the actual influent water quality data through the dynamic simulation model based on the predicted process parameters until the predicted process parameters that meet the preset water quality standards are obtained, and then output as the actual process control parameters.

[0054] In a second aspect, the present invention provides a wastewater treatment control device, comprising:

[0055] The model building module is used to build dynamic simulation models of wastewater treatment processes based on the ASM2d model;

[0056] The model building module is also used to acquire input water quality data of the target water source; use the dynamic simulation model to acquire output water quality data corresponding to the input water quality data under different operating conditions, as well as the simulated process control parameters under the corresponding operating conditions, and construct a full dataset based on the input water quality data, the output water quality data, and the simulated process control parameters; wherein, the input water quality data, the output water quality data, and the simulated process control parameters that do not meet the preset water quality standards are excluded from the full dataset;

[0057] The model training module is used to construct an artificial neural network model based on the full dataset and train the artificial neural network model to obtain the trained artificial neural network model; wherein, the artificial neural network model includes a first model trained based on the input water quality data and a second model trained based on the output water quality data;

[0058] The system control module is used to acquire the actual influent water quality data of the target water source, use the dynamic simulation model and the artificial neural network model to obtain the actual process control parameters corresponding to the target water source, and control the operation of the sewage treatment based on the actual process control parameters.

[0059] Thirdly, the present invention provides a wastewater treatment control system, which includes information collection equipment, a central control system, and a PLC execution system;

[0060] The central control system includes a processor and a memory; the memory stores a computer program, and the processor executes the computer program to implement the wastewater treatment control method described in any of the foregoing embodiments.

[0061] Fourthly, the present invention provides a computer storage medium storing a computer program, which, when executed on a processor, implements the wastewater treatment control method described in any of the foregoing embodiments.

[0062] The wastewater treatment control method, apparatus, system, and computer storage medium provided in this invention employ a dynamic simulation model of the wastewater treatment process based on the ASM2d model. A full dataset is constructed by combining the input and output data and process control parameters generated by the model under different operating conditions. Then, an artificial neural network model is trained, and the corresponding process control parameters are obtained based on the model and the actual influent water quality data to achieve wastewater treatment operation control.

[0063] This invention combines the mechanism simulation capability of the ASM2d model with the nonlinear mapping capability of artificial neural networks. Based on the construction of an integrated model of dynamic simulation and data training, it can accurately calculate the actual process control parameters required for wastewater treatment, realize the automation and intelligent control of the wastewater treatment process, and improve the system's control accuracy, response speed and adaptability to complex water quality conditions.

[0064] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0065] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0066] Figure 1 This is a schematic diagram of the hardware operating environment involved in an embodiment of the wastewater treatment control method of the present invention;

[0067] Figure 2 This is a schematic flowchart of Embodiment 1 of the wastewater treatment control method of the present invention;

[0068] Figure 3 This is a detailed flowchart of step S100 in Embodiment 2 of the wastewater treatment control method of the present invention;

[0069] Figure 4 This is a detailed flowchart of step S130 in Embodiment 2 of the wastewater treatment control method of the present invention;

[0070] Figure 5 This is a detailed flowchart of step S300 in Embodiment 3 of the wastewater treatment control method of the present invention;

[0071] Figure 6 This is a detailed flowchart of step S400 in Embodiment 4 of the wastewater treatment control method of the present invention;

[0072] Figure 7 This is a schematic diagram of the module connection of the wastewater treatment control device of the present invention. Detailed Implementation

[0073] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0074] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0075] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.

[0076] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0077] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.

[0078] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0079] like Figure 1 The diagram shown is a structural schematic of the hardware operating environment of the terminal involved in an embodiment of the present invention.

[0080] The wastewater treatment control system of this invention can be a PC, or a mobile terminal device such as a smartphone, tablet, or laptop. This visual navigation wastewater treatment control system may include: a processor 1001 (e.g., a CPU), a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, an input unit such as a keyboard, or a remote control; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory, such as a disk storage device. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001. Optionally, the wastewater treatment control system may also include RF (Radio Frequency) circuitry, audio circuitry, a Wi-Fi module, etc. In addition, the VSLAM visual navigation optimization system can also be configured with other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, which will not be elaborated here.

[0081] Those skilled in the art will understand that Figure 1 The wastewater treatment control system shown is not intended to limit it and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Figure 1 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a data interface control program, a network connection program, and a wastewater treatment control program.

[0082] In summary, the method provided by this invention fully leverages the ASM2d model's ability to describe biochemical processes and the artificial neural network's ability to learn complex relationships, achieving the beneficial effects of intelligent, precise, and automated control of wastewater treatment systems.

[0083] Example 1

[0084] Reference Figure 2 This embodiment provides a wastewater treatment control method, including:

[0085] Step S100: Establish a dynamic simulation model of the wastewater treatment process based on the ASM2d model.

[0086] It should be noted that the ASM2d model is an abbreviation for Activated Sludge Model No. 2d, which is an improved activated sludge model 2d version. It is one of the activated sludge model series developed by the International Water Association (IWA) and is specifically used to simulate and optimize wastewater biological treatment processes, especially processes that simultaneously remove carbon, nitrogen and phosphorus.

[0087] This step improves the ASM2d model to establish a mathematical description model of the wastewater biochemical treatment process, which is applicable to processes such as AAO and simulates the removal process of pollutants such as organic matter, nitrogen, and phosphorus in wastewater.

[0088] Specifically, based on the ASM2d model, improvements were made according to the nitrogen transformation process in wastewater treatment to construct a dynamic simulation model. The improved model can simulate the nitrification process in greater detail, improving its prediction accuracy. Through sensitivity analysis and parameter adjustment, model parameters were optimized to further enhance the model's accuracy and reliability.

[0089] This step yields a model that can dynamically respond to different water quality conditions and predict effluent water quality; the improved model can more accurately simulate the nitrogen conversion mechanism and improve prediction accuracy; it is suitable for subsequent process parameter calculations.

[0090] Step S200: Obtain input water quality data of the target water source; use the dynamic simulation model to obtain output water quality data corresponding to the input water quality data under different operating conditions, as well as the simulated process control parameters under the corresponding operating conditions, and construct a full dataset based on the input water quality data, the output water quality data, and the simulated process control parameters; wherein, the input water quality data, the output water quality data, and the simulated process control parameters that do not meet the preset water quality standards are excluded from the full dataset.

[0091] The aforementioned target water source refers to the specific water source or influent source of a wastewater treatment plant that requires wastewater treatment. It is the specific object targeted by the wastewater treatment system or control method. "Target water source" refers to a specific water source that requires wastewater treatment, and may include, but is not limited to: influent from urban wastewater treatment plants: mixed influent from urban domestic sewage, industrial wastewater, etc.; influent from industrial wastewater treatment plants: wastewater generated during specific industrial production processes; and wastewater from a specific area: such as wastewater from an industrial park, residential area, or commercial area.

[0092] "Input water quality data" refers to a series of parameters used to describe the characteristics of wastewater, reflecting its pollution level, composition, and properties. This data forms the basis for the operation and control of wastewater treatment systems and is also a crucial input for dynamic simulation models and artificial neural network models.

[0093] The aforementioned preset water quality standard can be Class A, which is the highest wastewater treatment discharge standard stipulated in China's "Discharge Standard of Pollutants for Municipal Wastewater Treatment Plants" (GB 18918-2002). This standard mainly applies to the basic requirements for reuse of effluent from municipal wastewater treatment plants, or when the effluent is introduced into rivers or lakes with limited dilution capacity for urban landscaping and general reuse. Other water quality standards can also be used. In this embodiment, the preset water quality data used is GB 18918-2002, i.e., Class A standard.

[0094] In this step, a dynamic simulation model is used to obtain corresponding output water quality data and simulated process control parameters based on different operating conditions and input water quality data, and a complete dataset is constructed. Simultaneously, data that does not meet the preset water quality standards is excluded.

[0095] Input water quality data is fed into a dynamic simulation model, and the model is run to obtain output water quality data and simulated process control parameters. Then, according to preset water quality standards, data that meet the standards are selected, resulting in a complete dataset containing input water quality data, output water quality data, and simulated process control parameters that meet the water quality standards.

[0096] The construction of the complete dataset ensures the quality of the data used to train artificial neural networks, thereby improving the accuracy and reliability of the model.

[0097] It should be noted that during the construction of the full dataset, after comparing the effluent water quality data with the preset water quality standards (such as Class A standard), combinations that do not meet the standards can be deleted, and the remaining data that meet the standards can be combined to form the full dataset.

[0098] This step yields a complete dataset containing input and output water quality data under various operating conditions, as well as process control parameters. This provides abundant data for training the artificial neural network model, enabling it to learn the input-output relationships under different operating conditions. This improves the generalization ability and adaptability of the artificial neural network model, allowing it to better cope with the complexities of actual wastewater treatment processes.

[0099] Step S300: Construct an artificial neural network model based on the full dataset, and train the artificial neural network model to obtain the trained artificial neural network model; wherein, the artificial neural network model includes a first model trained based on the input water quality data and a second model trained based on the output water quality data;

[0100] Using the full dataset constructed in step S200, an artificial neural network model is built and trained to predict the corresponding process control parameters based on the input water quality data. This step yields a trained artificial neural network model capable of predicting the corresponding process control parameters based on the input water quality data.

[0101] It should be noted that "well trained" as mentioned above refers to the completion of training of the artificial neural network model, and the standard for completion is to achieve a high training accuracy, such as including but not limited to: training accuracy of not less than 80%.

[0102] Artificial neural network models possess powerful nonlinear fitting and adaptive learning capabilities, enabling them to handle complex input-output relationships. During training, the first model uses influent water quality data as input and process parameter A as output. The second model uses both influent and effluent water quality data as input and process parameter B as output.

[0103] Through training, the model can learn the potential relationship between input water quality and process control parameters under different operating conditions, providing better control parameters for actual operation.

[0104] Step S400: Obtain the actual influent water quality data of the target water source, use the dynamic simulation model and the artificial neural network model to obtain the actual process control parameters corresponding to the target water source, and control the operation of the sewage treatment based on the actual process control parameters.

[0105] The aforementioned actual influent water quality data can be the current water quality data of the target water source, or it can be the historical water quality data of the target water source. This data can be the same as or different from the "input water quality data". In this embodiment, the actual influent water quality data can be the influent water quality data of a certain current stage.

[0106] In this step, the trained artificial neural network model is applied to the actual wastewater treatment process. Based on the actual influent water quality data of the target water source, the corresponding process control parameters are predicted, and the wastewater treatment operation is controlled accordingly. It should be noted that the obtained process control parameters should meet the preset water quality standards to ensure that the wastewater treatment meets the standards.

[0107] For example, real-time influent water quality data of the target water source can be obtained. This data is then input into dynamic simulation models and artificial neural network models to obtain predicted process control parameters. Based on these predicted parameters, the operating parameters of the wastewater treatment equipment, such as aeration rate, chemical dosage, and sludge discharge rate, are adjusted using control systems such as PLCs (Programmable Logic Controllers).

[0108] In this step, the process control parameters for wastewater treatment are adjusted in real time based on actual influent water quality data to ensure the stability of the wastewater treatment process and the compliance of effluent quality standards. This achieves intelligent control of the wastewater treatment process, enabling automatic adjustment of process control parameters and reducing manual intervention. It improves the system's adaptability and flexibility, allowing for rapid responses to water quality changes and ensuring effluent quality meets standards. Furthermore, it optimizes operating parameters, reduces operating costs, and improves operating efficiency.

[0109] The wastewater treatment control method provided in this embodiment achieves accurate simulation, optimized control, and intelligent operation of the wastewater treatment process by coupling the ASM2d model and the artificial neural network model. Each step has clearly defined treatment content, results, and advantages, and the specific implementation method is also relatively clear. This method can effectively improve the stability of wastewater treatment and the compliance rate of effluent quality, while reducing operating costs, demonstrating significant engineering application value.

[0110] Example 2

[0111] Reference Figure 3 Based on the above embodiment 1, this embodiment provides a wastewater treatment control method. Step S100, establishing a dynamic simulation model of the wastewater treatment process based on the ASM2d model, includes:

[0112] Step S110: Construct a dynamic simulation model.

[0113] When constructing the dynamic simulation model, for the ASM2d model, its nitrogen conversion process was extended from a one-step reaction to a two-step reaction. Specifically, a nitrite component was added, and autotrophic nitrifying bacteria (AUT) were separated into ammonia-oxidizing bacteria (AOB) and nitrite-oxidizing bacteria (NOB). That is, ammonia nitrogen is first oxidized to nitrite by ammonia-oxidizing bacteria (AOB), and then nitrite is oxidized to nitrate by nitrite-oxidizing bacteria (NOB).

[0114] In step S110, the nitrogen conversion process used to construct the dynamic simulation model includes two reactions:

[0115] (1) Ammonia is oxidized to nitrite by ammonia-oxidizing bacteria;

[0116] (2) The nitrite is oxidized to nitrate by nitrite-oxidizing bacteria.

[0117] This step yields an improved ASM2d dynamic simulation model, capable of simulating the nitrogen conversion process in greater detail. This enhances the model's accuracy in simulating nitrogen conversion, enabling it to more accurately predict effluent water quality.

[0118] Specifically, a nitrite component can be added to the ASM2d model, and autotrophic nitrifying bacteria (AUT) can be separated into ammonia-oxidizing bacteria (AOB) and nitrite-oxidizing bacteria (NOB). Differential equations and conservation matrices for the reaction rates can be constructed using mathematical software (such as MATLAB). For example, the reaction matrix constructed in the ASM2D model can be solved using the Runge-Kutta-Felberg method in MATLAB.

[0119] Step S120: Obtain historical operating data of the target water source, and perform steady-state simulation verification of the dynamic simulation model based on the historical operating data.

[0120] The term "target water source" refers to the specific water source requiring wastewater treatment or the influent source of a wastewater treatment plant. This name is used to clearly identify the water source targeted by the wastewater treatment system or control method.

[0121] In this step, historical operational data from the target water source is used to perform steady-state simulation verification of the dynamic simulation model. Specific data processing requires collecting historical operational data from the target water source, including influent water quality, effluent water quality, and process control parameters. This historical operational data is then used to perform steady-state simulations on the dynamic simulation model, verifying its operational stability. Thus, the dynamic simulation model, after steady-state simulation verification, ensures its operational stability under steady-state conditions.

[0122] This step verifies the stability of the model under actual operating conditions, providing a foundation for subsequent sensitivity analysis and optimization.

[0123] Specifically, historical operational data of the target water source can be used as input to run the ASM2d dynamic simulation model. The effluent quality output by the model is compared with the effluent quality in the actual historical operational data to verify the model's operational stability.

[0124] Step S130: Perform sensitivity analysis on the dynamic simulation model after steady-state simulation verification, and optimize and adjust the confirmed model parameters individually based on the sensitivity to obtain the dynamic simulation model with optimized accuracy.

[0125] In this step, sensitivity analysis is performed on the dynamic simulation model after steady-state simulation verification, and the model parameters are individually optimized and adjusted based on the sensitivity analysis results. First, sensitivity analysis is conducted on the parameters in the model to determine which parameters have a greater impact on the model output. Then, the parameters with higher sensitivity are adjusted individually to optimize the model parameters. The result is a dynamic simulation model after sensitivity analysis and parameter optimization, which improves the model's prediction accuracy.

[0126] Through sensitivity analysis and parameter optimization, the model's prediction accuracy was improved, enabling it to more accurately reflect the actual wastewater treatment process.

[0127] Step S140: Verify the prediction effect of the dynamic simulation model based on the individually optimized and adjusted model parameters through dynamic simulation, and obtain the dynamic simulation model after dynamic simulation.

[0128] This step uses a dynamically simulated model with optimized parameters to perform dynamic simulations and verify the model's predictive effectiveness. The predicted effluent quality is then compared with the actual effluent quality from the operational data to validate the model's predictive performance.

[0129] The dynamic simulation model, validated through dynamic simulation, ensures its predictive performance under dynamic conditions. The model's predictive effectiveness under dynamic conditions has been verified, guaranteeing its ability to accurately predict effluent water quality under various operating conditions.

[0130] Specifically, historical operational data of the target water source is used as input to run a dynamic simulation model with optimized parameters. The predicted effluent quality is compared with the actual effluent quality in the operational data to evaluate the model's predictive effectiveness.

[0131] The method provided in this embodiment clarifies the specific steps and methods for constructing a dynamic simulation model. Through these steps, a more accurate dynamic simulation model that reflects the actual wastewater treatment process can be constructed, providing a more reliable foundation for subsequent full dataset construction and artificial neural network model training.

[0132] Furthermore, in step S130, the expression for sensitivity analysis is:

[0133] ;

[0134] Wherein, a represents the input model parameter of the dynamic simulation model; a1 and a2 represent the typical value and the changed value of the model parameter, respectively; y represents the water quality index that the dynamic simulation model focuses on during the simulation process; y1 and y2 represent the corresponding simulated output y value of the water quality index under the conditions of a1 and a2, respectively; S represents the sensitivity coefficient of the model parameter to the water quality index.

[0135] It should be noted that sensitivity analysis is a mathematical method used to assess how sensitive a model's output is to changes in its input parameters. Sensitivity analysis identifies which parameters have a greater impact on the model's output, allowing for focused attention on these parameters during model optimization.

[0136] Sensitivity analysis can identify parameters that significantly impact water quality indicators, allowing for focused optimization of these parameters during model development. Individually adjusting and optimizing highly sensitive parameters can improve the model's prediction accuracy. This avoids indiscriminate optimization of all parameters, saving computational resources and time.

[0137] Specifically, simulations can be performed using models or mathematical software (MATLAB, R studio). Each parameter is perturbed individually, and the sensitivity coefficient is calculated. Based on the sensitivity coefficient results, parameters with higher sensitivity are optimized and adjusted. Through the sensitivity analysis method in this approach, the impact of model parameters on water quality indicators can be systematically evaluated, providing a scientific basis for the optimization of dynamic simulation models.

[0138] refer to Figure 4 Step S130, which involves individually optimizing and adjusting the confirmed model parameters based on sensitivity, includes:

[0139] Step S131: Determine whether the absolute value of the sensitivity of the model parameter is greater than a preset sensitivity threshold.

[0140] In this step, the first step is to determine which model parameters have a significant impact on water quality indicators. This involves calculating the sensitivity coefficient S for each model parameter and comparing the absolute value of the sensitivity coefficient |S| with a preset sensitivity threshold. This identifies parameters whose absolute sensitivity values ​​are greater than the preset threshold, as these parameters have a greater impact on the model output.

[0141] This step identifies the parameters that have a significant impact on the model output, thus avoiding unnecessary adjustments to unimportant parameters.

[0142] Specifically, the sensitivity coefficient S for each parameter can be calculated using sensitivity analysis formulas. A sensitivity threshold (e.g., |S|>2) can then be set to filter out sensitive parameters.

[0143] Step S132: If yes, then the model parameter whose absolute sensitivity value is greater than the preset sensitivity threshold is taken as the parameter to be adjusted.

[0144] In this step, parameters with high sensitivity are identified as those requiring optimization. Specifically, parameters with absolute sensitivity values ​​greater than a preset threshold are marked as parameters to be adjusted, thus determining the set of parameters that need optimization.

[0145] This step ensures that optimization adjustments are focused on parameters that have a significant impact on the model output, thereby improving optimization efficiency. Specifically, parameters with absolute sensitivity values ​​greater than a threshold can be selected based on the sensitivity analysis results.

[0146] Furthermore, if the absolute value of the sensitivity of the model parameters is not greater than a preset sensitivity threshold (e.g., |S| ≤ 2), it indicates that these parameters have a relatively small impact on the model output. In this case, further optimization is usually not required.

[0147] For example, the following can be done:

[0148] (1) Retain default values: For parameters whose absolute sensitivity value is not greater than the preset threshold, the default values ​​in the model are directly retained. These parameters have little impact on the model output, so no optimization adjustment is required.

[0149] (2) Record and ignore: Mark these parameters as "low sensitivity parameters" and ignore them in subsequent optimization processes. These parameters will not be involved in subsequent optimization adjustment steps.

[0150] Step S133: Using the default value of the dynamic simulation model as the center, set the variation range and step size of each parameter to be adjusted, and construct the value sequence of the parameter to be adjusted.

[0151] In this step, a range and step size are set for each parameter to be adjusted, and a sequence of parameter values ​​is generated.

[0152] You can set the range of parameter variation (e.g., extending it vertically by 0.5) with the model's default value as the center. Set the step size (e.g., 0.1) to generate a sequence of parameter values, thus obtaining the value sequence of each parameter to be adjusted.

[0153] It provides a clear search range and step size for parameter optimization, ensuring the systematic and comprehensive nature of the optimization process.

[0154] Assuming the model's default value is a0, and the range of variation is [-0.5, 0.5], that is, extending up and down by 0.5 with a step size of 0.1, then the value sequence can be: [a0-0.5, a0-0.4, ... a0+0.5].

[0155] Step S134: Combine the values ​​of all the parameters to be adjusted in an orthogonal manner according to the value sequence to generate multiple parameter combinations for simulation analysis.

[0156] In this step, the values ​​of all parameters to be adjusted are combined to generate multiple parameter combinations for simulation analysis.

[0157] Using orthogonal design methods, the values ​​of all parameters to be adjusted are combined to generate multiple different parameter combinations, which are then used for subsequent simulation analysis.

[0158] Orthogonal design methods can efficiently cover the parameter space, reduce the number of simulations, and improve optimization efficiency.

[0159] Use orthogonal design tables or algorithms to generate parameter combinations. For example, if there are two parameters a and b to be adjusted, with value sequences [a1, a2, a3] and [b1, b2, b3] respectively, then the generated parameter combinations can be (a1, b1), (a1, b2), (a1, b3), (a2, b1), etc.

[0160] Step S135: Input each set of parameters into the dynamic simulation model to obtain the corresponding simulated output water quality index.

[0161] In this step, each parameter combination is input into the dynamic simulation model, the simulation is run, and the corresponding output water quality index is obtained. The dynamic simulation model can be run for each parameter combination. The simulated output water quality index corresponding to each parameter combination is recorded, thus obtaining the simulated output water quality index for each parameter combination.

[0162] Through simulation analysis, the impact of different parameter combinations on the model output is evaluated. Specifically, a dynamic simulation model (such as the ASM2d model) can be used to run each parameter combination and record the output water quality indicators.

[0163] Step S136: Calculate the corresponding prediction error for each of the simulated output water quality indicators; the prediction error includes the coefficient of determination and the mean square error.

[0164] In this step, the prediction error for each simulated output water quality index is calculated, including the coefficient of determination (R²). 2 ) and mean squared error (MSE).

[0165] Calculate the prediction error for each parameter combination. Use the coefficient of determination and mean squared error as evaluation metrics to obtain the prediction error for each parameter combination. Evaluate the performance of each parameter combination based on the prediction error, providing a basis for selecting the optimal parameter combination.

[0166] Furthermore, in step S136, the method for calculating the coefficient of determination is as follows:

[0167] ;

[0168] Among them, R 2 Represents the coefficient of determination; Represents the true value of the i-th data point; This represents the predicted value of the i-th data point output by the dynamic simulation model. Represents the sample mean; To account for the error generated in the prediction, The error caused by the mean.

[0169] Furthermore, in step S136, the mean square error is calculated as follows:

[0170] MSE= ;

[0171] Where MSE represents the mean squared error; m represents the total number of samples. This represents the true value of the i-th data point. This represents the predicted value of the i-th data point output by the dynamic simulation model. This represents the sample mean.

[0172] Step S137: Among all the parameter combinations, select the parameter combination with the largest determination coefficient and the smallest mean square error as the optimized model parameters, so as to update the dynamic simulation model according to the model parameters.

[0173] In this step, the optimal parameter combination is selected from all possible combinations to update the dynamic simulation model. The prediction errors of all parameter combinations can be compared, and the combination with the highest coefficient of determination and the lowest mean squared error is chosen to obtain the optimized model parameters.

[0174] By optimizing parameters, the prediction accuracy and reliability of the model can be improved. Specifically, this can be done by iterating through all parameter combinations and calculating the R-squared value for each combination. 2 And MSE. Select R 2 The parameter combination that has the maximum and minimum MSE.

[0175] This embodiment provides a specific method for optimizing model parameters based on sensitivity analysis. Through these steps, parameters that significantly impact model output can be systematically identified and optimized, improving the model's prediction accuracy and reliability. This method combines sensitivity analysis and orthogonal design to ensure the efficiency and comprehensiveness of the optimization process.

[0176] Example 3

[0177] Reference Figure 5 Based on the above embodiment 1, this embodiment provides a wastewater treatment control method. Step S300, training the artificial neural network model, includes:

[0178] Step S310: Standardize the entire dataset and perform principal component analysis on the data in the standardized dataset to divide it into a training set and a validation set.

[0179] In this step, the entire dataset undergoes preprocessing before training, including standardization and principal component analysis (PCA), and is divided into training and validation sets. Dividing the data into training and validation sets allows for effective evaluation and tuning of the model during training, thereby improving its performance and reliability.

[0180] Each feature in the entire dataset can be standardized to have a mean of 0 and a standard deviation of 1. Principal component analysis (PCA) is then performed on the standardized data to reduce dimensionality and remove redundant information. The processed data is then divided into training and test sets, typically in a 7:3 or 8:2 ratio, resulting in the standardized entire dataset, the PCA-reduced entire dataset, and the divided training and test sets.

[0181] Standardization can eliminate the influence of different feature units and improve the convergence speed of the model. PCA can reduce data dimensionality, remove redundant information, and improve the training efficiency and prediction accuracy of the model.

[0182] Furthermore, the expression for the standardization process is:

[0183] ;

[0184] in, σ represents the standardized score; x represents a specific variable in the entire dataset; μ represents the mean of the input variable in the entire dataset; σ represents the standard deviation of the input variable in the entire dataset.

[0185] Furthermore, the expression for the principal component analysis is:

[0186] ;

[0187] in, Represents the principal component analysis matrix; The standardized numerical matrix represents the matrix prior to principal component analysis. represent and Numerical matrix after principal component analysis.

[0188] Step S320: Train the first model and the second model in the artificial neural network model based on the training set, and evaluate the prediction performance of all the artificial neural network models according to the absolute percentage error.

[0189] The training process involves inputting the input water quality data into the first model to obtain the simulated process control parameters corresponding to the input water quality data; and inputting the input water quality data and the output water quality data into the second model to obtain the simulated process control parameters corresponding to the input water quality data and the output water quality data.

[0190] In this step, different types of artificial neural network models are trained using a training set, and their predictive performance is evaluated. Multiple types of artificial neural network models can be selected (such as multilayer perceptrons, convolutional neural networks, etc.); each model is trained using a training set. The predictive performance of each model is evaluated using a test set, and the absolute percentage error (MAPE) is calculated to obtain the predictive performance evaluation results for different types of neural network models.

[0191] This step compares the performance of different models and selects the model that best suits the current data.

[0192] Furthermore, the formula for calculating the absolute percentage error is as follows:

[0193] ;

[0194] Where MAPE represents absolute percentage error; n represents the number of test sets; The simulated output value representing data point i; This represents the actual output value of data point i.

[0195] Step S330: Determine the preferred type of artificial neural network model based on the prediction performance, and use a loop algorithm to determine the network structure and hyperparameter configuration of the preferred type of artificial neural network model as the preferred configuration.

[0196] In this step, the optimal neural network model type is selected based on the prediction performance, and its network structure and hyperparameters are optimized through a loop algorithm.

[0197] You can select the neural network model type with the best prediction performance; use iterative algorithms (such as grid search, random search) to optimize the network structure and hyperparameters of the model; determine the optimal network structure and hyperparameter configuration to obtain the optimized network structure and hyperparameter configuration.

[0198] By optimizing the network structure and hyperparameters, the prediction accuracy and generalization ability of the model can be improved.

[0199] For example, hyperparameter optimization can be performed using sklearn.model_selection.GridSearchCV or RandomizedSearchCV in Python. For instance, for a multilayer perceptron, hyperparameters such as the number of hidden layer nodes, learning rate, and activation function can be adjusted.

[0200] Step S340: According to the preferred configuration, retrain the artificial neural network model until a trained artificial neural network model is obtained.

[0201] In this step, the neural network model is retrained based on the optimized network structure and hyperparameter configuration until convergence. The neural network model can be reinitialized using the optimized network structure and hyperparameter configuration; it can also be retrained using the training set until convergence. The final performance of the model is evaluated using the test set, resulting in a well-trained artificial neural network model.

[0202] This step ensures that the model achieves optimal performance under the optimized configuration.

[0203] For example, you can use sklearn.neural_network.MLPRegressor or other neural network libraries in Python to train the model. You can set termination conditions for training, such as the maximum number of iterations or a convergence threshold.

[0204] This embodiment provides the training process for an artificial neural network model, including data preprocessing, model selection, hyperparameter optimization, and model retraining. These steps systematically optimize the neural network model, improving its prediction accuracy and generalization ability. This method combines standardization, PCA dimensionality reduction, model performance evaluation, and hyperparameter optimization, ensuring the efficiency and reliability of model training.

[0205] Example 4

[0206] Reference Figure 6 Based on the above embodiment 1, this embodiment provides a wastewater treatment control method. Step S400 involves acquiring the actual influent water quality data of the target water source, and using the dynamic simulation model and the artificial neural network model to obtain the actual process control parameters corresponding to the target water source, including:

[0207] Step S410: Collect actual influent water quality data of the target water source and obtain predicted process parameters through the first model;

[0208] In this step, the actual influent water quality data of the target water source is obtained, and this data will be used as input for subsequent processing.

[0209] Water quality monitoring equipment (such as online sensors and laboratory analytical instruments) can be used to collect in-process water quality data of the target water source in real time. The data may include, but is not limited to, COD, NH4-N, and NO3. - -N, TP, PO4 3- These water quality indicators allow us to obtain actual influent water quality data, which reflects the current water quality status of the target water source.

[0210] This step provides real-time water quality information, offering accurate input for subsequent model prediction and control. Specifically, online water quality monitoring systems, such as COD sensors and ammonia nitrogen sensors, can be used to collect data in real time. The collected data is then stored in a database or data management system.

[0211] Actual influent water quality data is collected using water quality monitoring equipment and input into the first model to obtain predicted process control parameters. This first model is then used to quickly predict process control parameters, providing a foundation for subsequent simulations and adjustments.

[0212] Specifically, water quality monitoring equipment, such as COD analyzers and ammonia nitrogen analyzers, can be installed at the inlet of the wastewater treatment plant to collect water quality data in real time and transmit the data to the control system. This data is then input into the first model to obtain the predicted process control parameters.

[0213] Assume the first model is a multilayer perceptron (MLP), with the number of neurons in the input layer corresponding to the dimension of the input water quality data, and the number of neurons in the output layer corresponding to the dimension of the process control parameters. The collected water quality data is input into the model, and the predicted process control parameters are obtained through forward propagation.

[0214] Step S420: Based on the predicted process parameters, the actual influent water quality data is simulated using the dynamic simulation model to obtain the actual effluent water quality data of the target water source.

[0215] In this step, a dynamic simulation model is used to simulate the wastewater treatment process based on predicted process control parameters and actual influent water quality data, thereby obtaining actual effluent water quality data. The predicted process control parameters and actual influent water quality data can be input into the dynamic simulation model, and the model can be run to obtain the actual effluent water quality data.

[0216] The effectiveness of the predicted process control parameters is verified by using dynamic simulation models to ensure the reliability of the effluent quality.

[0217] The predicted process control parameters and actual influent water quality data can be input into the dynamic simulation model through a computer program, and the actual effluent water quality data can be obtained by running the model.

[0218] Step S430: Determine whether the actual effluent data meets the preset water quality standard.

[0219] In this step, we check whether the actual effluent water quality data obtained from the simulation meets the preset water quality standards (such as Class A water quality standards).

[0220] By comparing the actual effluent water quality data with the Class A standard, it is determined whether the effluent water quality meets the standard, thereby ensuring that the effluent water quality meets environmental protection requirements and avoiding environmental pollution.

[0221] This step uses a computer program to compare the actual effluent water quality data with the Class A standard item by item.

[0222] For example, check whether COD is less than 50 mg / L, ammonia nitrogen is less than 5 mg / L (or 8 mg / L, depending on the specific season), and total phosphorus is less than 0.5 mg / L. If all indicators meet the standards, the effluent water quality is considered to be up to standard.

[0223] Step S440: If yes, then output the predicted process parameters as the actual process control parameters.

[0224] If the actual effluent water quality data meets the preset water quality standards, the predicted process control parameters will be used as the actual process control parameters, and the predicted process control parameters will be output to the control system, thereby obtaining the actual process control parameters.

[0225] This step directly uses the predicted process control parameters to improve control efficiency.

[0226] Predicted process control parameters can be output to the wastewater treatment equipment through a control system (such as a PLC). The predicted process control parameters (such as aeration rate, chemical dosage, etc.) are transmitted to the PLC, and the PLC adjusts the operation of the equipment based on these parameters.

[0227] Step S450: If not, input the actual influent water quality data and the actual effluent water quality data into the second model to obtain new process parameters; use the new process parameters as the predicted process parameters, and return to step S420; based on the predicted process parameters, simulate the actual influent water quality data through the dynamic simulation model until the predicted process parameters that meet the preset water quality standards are obtained, and output them as the actual process control parameters.

[0228] This step is an iterative process. If the actual effluent water quality data does not meet the preset water quality standards, the actual influent water quality data and the actual effluent water quality data are input into the second model to obtain new process parameters. The above steps are repeated until the effluent water quality meets the standards.

[0229] The actual influent and effluent water quality data are input into the second model, and the model is run to obtain new process parameters. Then, the new process parameters are used as predicted process parameters, and step S420 is repeated to finally obtain predicted process parameters that meet the preset water quality standards.

[0230] By iteratively adjusting the system, we ensure that the effluent water quality meets the standards, thereby improving the accuracy and reliability of the control.

[0231] The actual influent and effluent water quality data can be input into a second model using a computer program, and the model can be run to obtain new process parameters. Then, these new process parameters are used as predicted process parameters, and the simulation and judgment process is repeated.

[0232] Assuming the second model is also a multilayer perceptron (MLP), the number of neurons in the input layer corresponds to the dimensions of the actual influent and effluent water quality data, while the number of neurons in the output layer corresponds to the dimensions of the process control parameters. The actual influent and effluent water quality data are input into the model, and new process parameters are obtained through forward propagation. Then, these new process parameters are used as predicted process parameters, and step S420 is repeated until the effluent water quality meets the standards. Furthermore, in wastewater treatment control, the actual effluent water quality data is affected by various factors, including fluctuations in influent water quality and changes in equipment operating status. Therefore, directly inputting the output data of the dynamic simulation model into the artificial neural network model may not fully meet the accuracy requirements of the PLC control system. Through iterative optimization, the model's output can be gradually adjusted to better approximate actual operational needs.

[0233] For example, iterative optimization methods can include:

[0234] The assumptions include:

[0235] Target water source: A city's wastewater treatment plant;

[0236] Preset water quality standard: Class A standard, taking COD (chemical oxygen demand) as an example, the COD limit for effluent is 50 mg / L.

[0237] Input water quality data: The actual influent COD is 300 mg / L.

[0238] Process control parameters: aeration rate (unit: m³ / h) and coagulant dosage (unit: kg / h).

[0239] Initial steps: Collect actual influent water quality data: Assume the actual influent COD is 300 mg / L.

[0240] The predicted process parameters are obtained through the first model: it is assumed that the aeration rate predicted by the first model is 100 m³ / h and the coagulant dosage is 5 kg / h.

[0241] First iteration: (1) Dynamic simulation based on predicted process parameters: Input: Actual influent COD = 300mg / L, predicted aeration rate = 100m³ / h, coagulant dosage = 5kg / h; After the dynamic simulation model runs, the actual effluent COD is obtained as 60mg / L; (2) Determine whether the actual effluent data meets the preset water quality standard: The actual effluent COD = 60mg / L is higher than the Class A standard (50mg / L), and does not meet the standard. (3) Input the actual influent water quality data and the actual effluent water quality data into the second model: Input: Actual influent COD = 300mg / L, actual effluent COD = 60mg / L; The second model outputs new process parameters: Aeration rate = 120m³ / h, coagulant dosage = 6kg / h.

[0242] Second iteration: (1) Dynamic simulation based on new predicted process parameters: Input: Actual influent COD = 300 mg / L, new predicted aeration rate = 120 m³ / h, coagulant dosage = 6 kg / h; After the dynamic simulation model runs, the actual effluent COD is obtained as 55 mg / L; (2) Determine whether the actual effluent data meets the preset water quality standard: The actual effluent COD = 55 mg / L is still higher than the Class A standard (50 mg / L), and does not meet the standard. (3) Input the actual influent water quality data and the actual effluent water quality data into the second model: Input: Actual influent COD = 300 mg / L, actual effluent COD = 55 mg / L; The second model outputs new process parameters: Aeration rate = 140 m³ / h, coagulant dosage = 7 kg / h.

[0243] Third iteration: (1) Dynamic simulation based on new predicted process parameters: Input: Actual influent COD = 300 mg / L, new predicted aeration rate = 140 m³ / h, coagulant dosage = 7 kg / h; After the dynamic simulation model runs, the actual effluent COD is obtained as 48 mg / L. (2) Determine whether the actual effluent data meets the preset water quality standard: The actual effluent COD = 48 mg / L is lower than the Class A standard (50 mg / L), which meets the standard. (3) Output the predicted process parameters as actual process control parameters: Output process control parameters: Aeration rate = 140 m³ / h, coagulant dosage = 7 kg / h.

[0244] Through the three iterations described above, the final process control parameters (aeration rate = 140 m³ / h, coagulant dosage = 7 kg / h) ensure that the effluent COD meets the Class A standard (50 mg / L). These parameters will be used in actual wastewater treatment processes to ensure that the effluent quality meets the standards.

[0245] By using the above method, the actual process control parameters in step S420 can be optimized through iterative iteration to ensure that they meet the requirements of the PLC control system, thereby achieving more accurate and stable wastewater treatment control.

[0246] Furthermore, the operation of the wastewater treatment system can be controlled based on the actual process control parameters. The operating parameters of the wastewater treatment system can be adjusted according to the acquired actual process control parameters to achieve the optimal wastewater treatment effect. The acquired actual process control parameters can be transmitted to the control system (such as a PLC) of the wastewater treatment system.

[0247] The control system adjusts the operating parameters of the wastewater treatment equipment, such as aeration equipment, dosing equipment, and water pumps, based on these parameters, so that the operating parameters of the wastewater treatment system are adjusted to the optimal state, ensuring that the effluent water quality meets the standards.

[0248] This step enables automated and intelligent control of the wastewater treatment process, improving treatment efficiency and the stability of effluent quality.

[0249] This embodiment utilizes dynamic simulation models and artificial neural network models to obtain actual process control parameters based on the actual influent water quality data of the target water source, and controls the operation of the wastewater treatment system accordingly. Through these steps, automated and intelligent control of the wastewater treatment process can be achieved, improving treatment efficiency and the stability of effluent water quality. This method combines the advantages of dynamic simulation and artificial neural networks, ensuring the model's predictive accuracy and control effectiveness.

[0250] refer to Figure 7 In this embodiment of the application, a wastewater treatment control device is provided, comprising:

[0251] Model building module 10 is used to build a dynamic simulation model of the wastewater treatment process based on the ASM2d model;

[0252] The model building module 10 is further configured to acquire input water quality data of the target water source; acquire output water quality data corresponding to the input water quality data under different operating conditions, as well as simulation process control parameters under the corresponding operating conditions, using the dynamic simulation model; and construct a full dataset based on the input water quality data, the output water quality data, and the simulation process control parameters; wherein, the input water quality data, the output water quality data, and the simulation process control parameters that do not meet the preset water quality standards are excluded from the full dataset.

[0253] The model training module 20 is used to construct an artificial neural network model based on the full dataset and train the artificial neural network model to obtain the trained artificial neural network model; wherein, the artificial neural network model includes a first model trained based on the input water quality data and a second model trained based on the output water quality data;

[0254] The system control module 30 is used to acquire the actual influent water quality data of the target water source, use the dynamic simulation model and the artificial neural network model to obtain the actual process control parameters corresponding to the target water source, and control the operation of the sewage treatment based on the actual process control parameters.

[0255] In this embodiment of the application, a wastewater treatment control system is provided, which includes information collection equipment, a central control system, and a PLC (Programmable Logic Controller) execution system;

[0256] The central control system includes a processor and a memory; the memory stores a computer program, and the processor executes the computer program to implement the wastewater treatment control method described in any of the foregoing embodiments.

[0257] The aforementioned information collection equipment can collect various key parameters in the wastewater treatment process in real time, including but not limited to dissolved oxygen (O2), pH value, chemical oxygen demand (COD), and ammonia nitrogen (NH4). - ), nitrates (NO4) - ), phosphate (PO4) - Information such as temperature (T), flow rate (Q), dosage of coagulant (PAC) and flocculant (PAM), chlorination dosage, and flow rate will be transmitted to the central control system to provide a basis for subsequent processing and control.

[0258] The aforementioned central control system, as the core of the entire wastewater treatment control system, is responsible for receiving various data from information collection equipment. It performs simulation calculations using the ASM2D model to predict effluent quality data and compares it with discharge standards. If the predicted effluent quality is found to be non-compliant with discharge standards, the central control system will, according to a preset control strategy, issue instructions via the PLC system to the dosing equipment, aeration equipment, and recirculation equipment to adjust the operating parameters of the relevant equipment. This ensures that the wastewater treatment process reaches the set standard values, thereby guaranteeing that the effluent quality meets discharge standards.

[0259] The aforementioned PLC execution system is closely connected to the dosing equipment, aeration equipment, recirculation equipment, and sludge removal equipment. This part receives control commands and data transmitted from the central control system, precisely controlling the operation of each piece of equipment. For example, it adjusts the dosage of chemicals in the dosing equipment according to the instructions from the central control system, controls the aeration intensity of the aeration equipment, adjusts the recirculation ratio of the recirculation equipment, and controls the sludge removal operation of the sludge removal equipment, ensuring that each process link in the wastewater treatment process operates stably according to the optimized parameters, thereby achieving efficient and stable wastewater treatment results. Through the coordinated work of the information collection equipment, the central control system, and the PLC execution system, the entire wastewater treatment process achieves automated and intelligent control, effectively responding to water quality fluctuations, optimizing operating parameters, improving wastewater treatment efficiency, and ensuring that the effluent water quality consistently meets standards.

[0260] In this embodiment of the application, a computer storage medium is provided, which stores a computer program. When the computer program is executed on a processor, it implements the wastewater treatment control method described in any of the foregoing embodiments.

[0261] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. All should be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A sewage treatment control method characterized by, The method comprises the following steps: establishing a dynamic simulation model of a sewage treatment process based on an ASM2d model; obtaining input water quality data of a target water source; obtaining output water quality data corresponding to the input water quality data under different working conditions and simulation process control parameters under corresponding working conditions by using the dynamic simulation model, and constructing a full data set based on the input water quality data, the output water quality data and the simulation process control parameters; wherein the input water quality data, the output water quality data and the simulation process control parameters that do not meet the preset water quality standard are excluded from the full data set; constructing an artificial neural network model based on the full data set and training the artificial neural network model to obtain a trained artificial neural network model; wherein the artificial neural network model comprises a first model with the input water quality data as input and the simulation process control parameters as output, and a second model with the input water quality data and the output water quality data as input and the simulation process control parameters as output; obtaining actual inflow water quality data of the target water source, obtaining actual process control parameters corresponding to the target water source by using the dynamic simulation model and the artificial neural network model, and controlling the operation of sewage treatment based on the actual process control parameters; wherein the step of obtaining actual inflow water quality data of the target water source, obtaining actual process control parameters corresponding to the target water source by using the dynamic simulation model and the artificial neural network model comprises the following steps: collecting actual inflow water quality data of the target water source, and obtaining predicted process parameters through the first model; simulating the actual inflow water quality data through the dynamic simulation model based on the predicted process parameters to obtain actual effluent water quality data of the target water source; determining whether the actual effluent water quality data meets the preset water quality standard; if yes, outputting the predicted process parameters as the actual process control parameters; if no, inputting the actual inflow water quality data and the actual effluent water quality data into the second model to obtain new process parameters; taking the new process parameters as the predicted process parameters, and returning to execute the step of simulating the actual inflow water quality data through the dynamic simulation model based on the predicted process parameters until the predicted process parameters meeting the preset water quality standard are obtained, and outputting and taking the predicted process parameters as the actual process control parameters.

2. The sewage treatment control method according to claim 1, wherein The step of establishing a dynamic simulation model of a sewage treatment process based on an ASM2d model comprises the following steps: constructing a dynamic simulation model; obtaining historical operation data of the target water source, and performing steady-state simulation verification on the dynamic simulation model according to the historical operation data; performing sensitivity analysis on the dynamic simulation model after steady-state simulation verification, and individually optimizing and adjusting the confirmed model parameters based on the sensitivity to obtain the dynamic simulation model after optimization precision; verifying the prediction effect of the dynamic simulation model based on the model parameters after individual optimization and adjustment through dynamic simulation to obtain the dynamic simulation model after dynamic simulation.

3. The sewage treatment control method according to claim 2, wherein The expression of the sensitivity analysis is: ; Wherein, a represents a model parameter of an input of the dynamic simulation model; a1 and a2 respectively represent a typical value and a changed value of the model parameter; y represents a water quality index concerned in a simulation process of the dynamic simulation model; y1 and y2 respectively represent corresponding simulation output y values of the water quality index corresponding to the water quality index under a1 and a2 conditions; S represents a sensitivity coefficient of the model parameter to the water quality index; and / or, The separately optimizing and adjusting the confirmed model parameter based on the sensitivity comprises: determining whether an absolute value of the sensitivity of the model parameter is greater than a preset sensitivity threshold value; if yes, taking the model parameter with the absolute value of the sensitivity greater than the preset sensitivity threshold value as a to-be-adjusted parameter; centering on a default value of the dynamic simulation model, setting a change range and a step of each to-be-adjusted parameter, and constructing a value sequence of the to-be-adjusted parameter; combining values of all the to-be-adjusted parameters according to an orthogonal mode according to the value sequence, and generating a plurality of parameter combinations for simulation analysis; inputting each parameter combination into the dynamic simulation model, and obtaining a corresponding simulation output water quality index; calculating a corresponding prediction error for each simulation output water quality index; the prediction error comprises a determination coefficient and a mean square error; in all the parameter combinations, selecting a parameter combination with the maximum determination coefficient and the minimum mean square error as an optimized model parameter, so as to update the dynamic simulation model according to the model parameter.

4. The sewage treatment control method according to claim 3, characterized by, The calculation method of the determination coefficient is: ; wherein R 2 represents the determination coefficient; represents the true value of the i-th data point; represents the predicted value of the i-th data point output by the dynamic simulation model; represents the sample mean; is the error of the prediction; is the error of the mean; and / or, The calculation method of the mean square error is: ; wherein MSE represents the mean square error; m represents the total number of samples, represents the true value of the i-th data point, represents the predicted value of the i-th data point output by the dynamic simulation model; represents the sample mean.

5. The wastewater treatment control method as described in claim 1, characterized in that, The training of the artificial neural network model comprises: standardizing the full data set, and performing principal component analysis on data in the standardized full data set, and dividing into a training set and a validation set; training the first model and the second model in the artificial neural network model based on the training set, and evaluating prediction performance of all the artificial neural network models according to an absolute percentage error; wherein, the training is inputting the input water quality data into the first model to obtain the simulation process control parameter corresponding to the input water quality data; and inputting the input water quality data and the output water quality data into the second model to obtain the simulation process control parameter corresponding to the input water quality data and the output water quality data; determining a type of an optimal artificial neural network model according to the prediction performance, and adopting a cyclic algorithm to determine a network structure and a hyperparameter configuration of the optimal type artificial neural network model as an optimal configuration; retraining the artificial neural network model according to the optimal configuration until a trained artificial neural network model is obtained.

6. The wastewater treatment control method as described in claim 5, characterized in that, The expression of the standardization processing is: ; wherein, represents a standardized score; x represents a particular variable in the full dataset; μ represents the mean of the input variable across the full dataset; σ represents the standard deviation of the input variable across the full dataset; and / or, The expression of the principal component analysis is: ; wherein, represents a principal component analysis matrix; represents a standardized numerical matrix prior to principal component analysis; represents and represents a numerical matrix after principal component analysis; and / or, The calculation formula of the absolute percentage error is: ; Where MAPE represents absolute percentage error; n represents the number of test sets; The simulated output value representing data point i; This represents the actual output value of data point i.

7. A sewage treatment control device, characterized by comprising: comprises: a model construction module, configured to establish a dynamic simulation model of a sewage treatment process based on an ASM2d model; The model construction module is further configured to: acquire input water quality data of a target water source; acquire, by using the dynamic simulation model, output water quality data corresponding to the input water quality data under different working conditions, and simulation process control parameters under corresponding working conditions, and construct a full data set based on the input water quality data, the output water quality data, and the simulation process control parameters; and exclude the input water quality data, the output water quality data, and the simulation process control parameters that do not meet a preset water quality standard from the full data set. The model training module is configured to construct an artificial neural network model based on the full data set, and train the artificial neural network model to obtain a trained artificial neural network model; wherein the artificial neural network model includes a first model with the input water quality data as input and the simulation process control parameters as output, and a second model with the input water quality data and the output water quality data as input and the simulation process control parameters as output. The system control module is configured to acquire actual inflow water quality data of the target water source, obtain actual process control parameters corresponding to the target water source by using the dynamic simulation model and the artificial neural network model, and control the operation of the sewage treatment based on the actual process control parameters; wherein the acquisition of the actual inflow water quality data of the target water source, the obtaining of the actual process control parameters corresponding to the target water source by using the dynamic simulation model and the artificial neural network model, includes: acquiring actual inflow water quality data of the target water source, and obtaining predicted process parameters by using the first model; simulating the actual inflow water quality data based on the predicted process parameters by using the dynamic simulation model to obtain actual effluent water quality data of the target water source; determining whether the actual effluent water quality data meets the preset water quality standard; if yes, outputting the predicted process parameters as the actual process control parameters; if no, inputting the actual inflow water quality data and the actual effluent water quality data into the second model to obtain new process parameters; taking the new process parameters as the predicted process parameters, and returning to execute the step of simulating the actual inflow water quality data based on the predicted process parameters by using the dynamic simulation model until the predicted process parameters meeting the preset water quality standard are obtained, and outputting and taking the predicted process parameters as the actual process control parameters.

8. A sewage treatment control system characterised by, The sewage treatment control system includes an information collection device, a central control system, and a PLC execution system. The central control system includes a processor and a memory; the memory stores a computer program, and the processor is configured to execute the computer program to implement the sewage treatment control method in any one of claims 1-6.

9. A computer storage medium, characterized in that The memory stores a computer program, and the computer program, when executed on the processor, implements the sewage treatment control method in any one of claims 1-6.

Citation Information

Patent Citations

  • Method for predicting water quality COD (Chemical Oxygen Demand) by combining fuzzy neural network with spectrophotometric method

    CN113433086A

  • Sewage quality prediction method based on double-model combined application

    CN120072114A