Iron oxide red wastewater treatment system and method for coupling anaerobic ammonia oxidation with AI prediction
The wastewater treatment system coupled with AI prediction through anaerobic ammonia oxidation utilizes a GRU-QR neural network model to construct an intelligent dual-closed-loop control system, which solves the problems of insufficient prediction capability and control lag in the treatment of iron oxide red wastewater, and achieves the effects of effluent stability and reagent saving.
Patent Information
- Application Number
- CN202511059300.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-04
AI Technical Summary
Existing iron oxide red wastewater treatment systems suffer from insufficient predictive capabilities, high operating costs, and delayed control responses, making it difficult to cope with drastic fluctuations in water quality, resulting in unstable effluent quality and significant waste of reagents.
The wastewater treatment system employing anaerobic ammonia oxidation coupled with AI prediction constructs an intelligent dual-closed-loop control system through an integrated biofilm anaerobic ammonia oxidation system and AI control module, combined with a GRU-QR neural network model. This system enables water quality prediction and dynamic optimization, generates proactive and compensatory control commands, and reduces reliance on sensors.
It achieves improved stability of effluent ammonia nitrogen, faster response speed, enhanced control precision, and reduced reagent dosage, making it particularly suitable for the application needs of small and medium-sized wastewater treatment plants.
Smart Images

Figure BDA0005525270880000101 
Figure BDA0005525270880000102 
Figure BDA0005525270880000103
Abstract
Description
Technical Field
[0001] This invention relates to the field of wastewater treatment technology, specifically to a system and method for treating iron oxide red wastewater using anaerobic ammonia oxidation coupled with AI prediction. Background Technology
[0002] Iron oxide red wastewater, a typical example of high-ammonia nitrogen industrial wastewater, exhibits complex and volatile water quality, with particularly significant variations in ammonia nitrogen concentration. This poses a severe challenge to traditional treatment processes. Current mainstream anaerobic ammonia oxidation technologies primarily suffer from the following two major problems:
[0003] First, operating costs remain high. Traditional methods, lacking accurate forecasting and control capabilities, often employ a conservative strategy of "over-treatment": 1) the dosage of chemicals (such as alkalinity regulators) usually exceeds the theoretical value by 25-35%; 2) 3-5 dedicated technicians are required for 24-hour manual monitoring and parameter adjustment, with labor costs accounting for as much as 40% of the total operating costs.
[0004] Secondly, the control response is severely delayed. Existing methods mainly rely on manual experience or fixed parameter operation, and it takes an average of 2-3 hours from water quality change to completion of control: 1) Manual sampling and testing cycles can take as long as 1.5-2 hours; 2) Parameter adjustment depends on the experience and judgment of technical personnel, with a response decision lag of 0.5-1 hour; 3) It takes another 0.5-1 hour for the system to stabilize again. This lag leads to: 1) Large fluctuations in effluent water quality, with instantaneous ammonia nitrogen exceedance rates reaching 15-20%; 2) Weak system resistance to shock loads, requiring 4-6 hours to recover stable operation after each sudden change in water quality; 3) 20-25% additional waste of reagents.
[0005] Even with online monitoring equipment, existing systems still experience a delay of over one hour from sampling to obtaining reliable data. This lag makes it difficult for the system to adjust operating parameters in a timely manner when faced with sudden fluctuations in water quality (such as a sudden increase in ammonia nitrogen concentration of over 30%), often resulting in control failures. More seriously, when the influent load exceeds the preset range, the system often needs 2-3 hours to stabilize again, during which time not only does the effluent water quality exceed standards, but also leads to an overdose of 20-30% of chemicals.
[0006] Although some improved solutions have introduced multi-parameter online monitoring systems, they still cannot fundamentally solve the problem due to the following limitations: 1) Existing control algorithms are based on simple thresholds or linear models, making it difficult to cope with nonlinear changes in wastewater quality; 2) Sensor data is easily interfered with in complex water quality environments, making it difficult to guarantee accuracy; 3) There is a lack of effective prediction and early warning mechanisms, leaving the system in a passive response state. These problems result in poor operational stability and serious resource waste when facing drastic fluctuations in water quality, necessitating the development of more intelligent and economical solutions. Summary of the Invention
[0007] The first objective of this invention is to address the problems of insufficient predictive ability and high operating costs in existing iron oxide red wastewater treatment schemes, and to provide an iron oxide red wastewater treatment system and method that couples anaerobic ammonia oxidation with AI prediction.
[0008] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0009] An anaerobic ammonia oxidation (ANAO) coupled with AI prediction system for treating iron oxide red wastewater includes a wastewater treatment module and an AI control module. The wastewater treatment module comprises an integrated biofilm ANAO system, along with a sensor group and a control group mounted thereon. The sensor group detects actual water quality parameters during the wastewater treatment process at a preset sampling period and transmits these parameters to the AI control module. The control group executes system operation commands. The AI control module includes a real-time data interface module, a user input module, a water quality prediction module, and a control strategy execution module. The real-time data interface module is communicatively connected to the sensor group. The system is used to receive actual water quality parameters; the user input module receives the factory's product production plan and employee shift schedule, and generates feature data associated with wastewater concentration; the water quality prediction module constructs a water quality prediction model, and outputs predicted water quality parameters through the water quality prediction model and feature data; it connects to the sensor group to receive actual water quality parameters; it compares the actual water quality parameters with the predicted water quality parameters of the corresponding time series, and dynamically optimizes the water quality prediction model; the control strategy execution module connects to the water quality prediction module, generates advanced control instructions based on the currently output predicted water quality parameters and transmits them to the control device group; and generates compensation control instructions based on the actual water quality parameters.
[0010] This invention provides an AI-based predictive anaerobic ammonia oxidation wastewater treatment system. By integrating factory production schedules and employee shift data, an intelligent dual-closed-loop control system is constructed. The system first predicts future water quality trends using a GRU-QR model, based on key parameters in the production plan such as process sequence and raw material dosage, combined with the operational characteristics of different shifts (e.g., wastewater discharge patterns, cleaning water volume), and generates proactive control commands (e.g., adjusting aeration or alkalinity dosage in advance). In actual operation, the system monitors water quality parameters in real-time using sensors, automatically comparing predicted and measured values: when there is no error or the error is small, the original control strategy is maintained; otherwise, dynamic compensation control is triggered (e.g., adjusting operating parameters proportionally to the difference), forming a complete closed loop of "prediction-proactive control-measurement-compensation". This solution achieved a stable effluent ammonia nitrogen level of <30 mg / L (compliance rate >99%) under conditions where ammonia nitrogen fluctuations in iron oxide red wastewater were ±300 mg / L. Compared to traditional methods, it improved response speed by 2 hours, control accuracy by 40%, and reduced reagent dosage by 17-25%. The system also features self-optimization capabilities, continuously improving the prediction model through accumulated operational data, resulting in an average annual prediction error reduction of 8%. This significantly reduces reliance on hardware such as sensors (after continuous optimization, the water quality prediction model can reduce the accuracy requirements of sensors), making it particularly suitable for the application needs of small and medium-sized wastewater treatment plants.
[0011] Furthermore, the AI control module also includes a database and a data preprocessing module. The database is used to store and update historical data, which includes at least historical feature data and corresponding historical water quality parameters. The data preprocessing module is used to preprocess the historical data and generate a dataset. The water quality prediction module constructs a water quality prediction model using historical data and a preset neural network model. This solution uses the data preprocessing module to perform deep feature fusion of production plan parameters (process sequence, raw material ratio) and shift schedule data (shift number, operator position) to generate a multi-dimensional feature vector (such as pollution load coefficient + drainage fluctuation coefficient) containing production load characteristics and operational behavior characteristics. This transforms the originally separate production process parameters and personnel operation characteristics into quantifiable and analyzable joint features, constructing an intelligent prediction system for "production-personnel-water quality".
[0012] Furthermore, the actual water quality parameters detected by the sensor group are divided into real-time parameters and lag parameters. The control strategy execution module generates real-time control commands based on real-time parameters and compensation control commands based on lag parameters. In this scheme, the control commands generated by the control strategy execution module include three types: advanced control commands based on predicted water quality parameters, real-time control commands based on real-time parameters, and compensation control commands based on lag parameters. In practical applications, water quality parameters can be divided into real-time parameters and lag parameters according to the sensor detection characteristics, and differentiated control strategies can be established: for real-time parameters that can be detected quickly, the system directly generates real-time control commands based on sensor data, skipping the processing of the prediction model; while for lag parameters with a long detection cycle, advanced control commands are generated through the water quality prediction model, and then the prediction deviation is compensated and corrected by combining subsequent actual detection data, forming a three-layer control architecture of "real-time control - advanced prediction - lag compensation". Through precise parameter classification and strategy allocation, the computational power consumption is reduced, making it particularly suitable for handling industrial wastewater scenarios with large water quality fluctuations and limited detection conditions, achieving dual optimization of treatment efficiency and operating costs.
[0013] Furthermore, the data preprocessing module includes a data receiving unit, a feature encoding unit, a time-series alignment unit, a feature calculation unit, a normalization unit, a dataset generation unit, and a data verification unit. The data receiving unit receives three types of raw data: production plans, shift schedules, and water quality parameters. The feature encoding unit converts text-based parameters into numerical codes. The time-series alignment unit synchronizes production data, shift schedule data, and water quality data records according to timestamps. The feature calculation unit automatically calculates derived features such as pollution load coefficients and drainage fluctuation coefficients. The normalization unit performs linear normalization on water quality parameters. The dataset generation unit divides the training set / test set according to a preset ratio and packages them into a model-readable format. The data verification unit detects and processes missing values and outliers.
[0014] Furthermore, the execution equipment group includes at least an alkalinity dosing pump, an aeration blower, an internal circulation pump, and an inlet water pump.
[0015] Another objective of this invention is to provide a treatment method that applies the above-described treatment system and includes the following steps: S1. Constructing a water quality prediction model; S2. Receiving the current factory production schedule and employee shift schedule, extracting characteristic parameters associated with wastewater quality, inputting the characteristic parameters into the water quality prediction model, and outputting predicted water quality parameters; S3. Generating advanced control commands based on the predicted water quality parameters to adjust the operating parameters of the alkalinity dosing pump, aeration blower, internal circulation pump, and influent pump; S4. Receiving actual water quality parameters, comparing the actual water quality parameters with the predicted water quality parameters, maintaining the current control command when the deviation is within the allowable range, and generating a compensation control command and adjusting the equipment operating parameters when the deviation exceeds the allowable range; S5. Verifying and optimizing the water quality prediction model based on the actual water quality parameters.
[0016] This invention uses a water quality prediction model to predict the changing trends of wastewater quality parameters in real time and generates advanced control commands (such as adjusting alkalinity dosage and aeration intensity), effectively overcoming the control delay problem caused by sensor detection lag (e.g., some parameters require 1 hour to detect) in traditional methods. The system adopts a closed-loop control mechanism of "prediction-advanced control-actual measurement-compensation": when the sensor data is returned, the predicted value is automatically compared with the measured value, and dynamic compensation control is triggered when the deviation exceeds the threshold. At the same time, the system integrates employee shift data and establishes a mapping relationship between operating habits and water quality concentration, which significantly reduces the prediction error caused by differences in manual operation. This scheme has two major advantages: (1) high prediction accuracy, with shift characteristic data reducing prediction error by more than 40%; (2) outstanding operating energy efficiency, with dynamic adjustment reducing equipment energy consumption by 15-20% and reagent consumption by 20-25%.
[0017] Furthermore, the construction of the water quality prediction model in step S1 includes the following specific steps: S1.1 Obtain historical factory production plans, employee shift schedules, and corresponding historical water quality parameters, and convert the parameters in the production plans and shift schedules into numerical feature data; S1.2 Associate the numerical feature data with the historical water quality parameters in a time sequence, and normalize them using a linear function. Divide the normalized water quality parameters into a training set and a test set according to a preset ratio to construct a training dataset containing production features, shift features, and water quality parameters; S1.3 Train the training dataset using a preset neural network to output a water quality prediction model with multiple quantiles; S1.4 After evaluating the model's prediction accuracy using a validation set, integrate the trained model into the water quality prediction module. The model construction method (step S1) of this invention has several technical advantages: by integrating three types of data—production plan, shift schedule, and historical water quality parameters—a complete data chain of "production-personnel-water quality" is established. Numerical feature transformation enables the digital representation of operational habits (e.g., encoding "early shift / afternoon shift" as 0 / 1), and time-series alignment ensures accurate matching of causal relationships. The invention employs a unique joint encoding of "production features + shift features" and linear normalization, coupled with a 7:3 dynamically divided training / test set, eliminating dimensional differences and avoiding overfitting. It innovatively applies a quantile regression neural network (QR-NN) to output 10% / 50% / 90% quantile predicted values, forming early warning intervals (e.g., NH4). + =50±8mg / L), improving the accuracy of abnormal fluctuation early warning by 35%; through monthly automatic retraining and incremental learning technology, the prediction error is reduced by an average of 8% annually and the training time is shortened by 60%, while the validation set AUC index is consistently maintained above 0.92. Practical application shows that this method enables the ammonia nitrogen prediction MAE of iron oxide red wastewater treatment plant to be <3mg / L, with a prediction accuracy of >90% 2 hours in advance, and the prediction standard deviation between shifts is reduced from 12mg / L to 2mg / L. It not only solves the sensor lag problem, but also realizes intelligent collaborative optimization of "production process - personnel operation - treatment system".
[0018] Furthermore, the parameters in the production plan include at least product type code, production batch quantity, raw material ratio, and process time node; the parameters in the shift schedule include at least shift number, shift time period, and key operation personnel identification; the production characteristics include pollution load coefficient per unit output and water quality change characteristic value during process time period; the shift characteristics include operation standardization rating, equipment usage frequency characteristic value, and drainage fluctuation coefficient.
[0019] Furthermore, the pollution load coefficient per unit output is calculated by establishing a pollution load coefficient comparison table by statistically analyzing the average pollutant generation per unit output of similar products in historical data; the drainage fluctuation coefficient is calculated by the formula "Drainage fluctuation coefficient = (maximum hourly drainage volume during the shift - minimum hourly drainage volume) / average hourly drainage volume".
[0020] Furthermore, in step S1.3, the preset neural network model is a GRU-QR quantile regression neural network model. The construction of the water quality prediction model includes the following steps: S1.3.1 Network structure configuration, including the following settings in sequence: an input layer, used to receive preprocessed time-series data and shift feature vectors; a GRU hidden layer, used to extract time-series features of water quality parameters and limit the output to only the feature vector of the final time step, suppressing redundant data in the intermediate process; and a QR quantile regression layer, used to calculate the predicted values of water quality parameters under multiple quantile thresholds in parallel, generating a conditional probability distribution containing risk intervals, wherein the quantile thresholds at least include... The parameters 0.5, 0.8, and 0.95 correspond to the median, safety threshold, and risk warning value of water quality parameters, respectively. The output layer generates water quality prediction values for specified quantiles. S1.3.2 Parameter Optimization: The Adam optimizer is used, trained with a quantile loss function set to mean squared error, with 300 iterations and a batch size of 32. S1.3.3 Training: a) The training set is input into the GRU layer to extract temporal features; b) The water quality prediction values output by the GRU layer and the actual water quality values from historical parameters are input into the QR layer to optimize the quantile prediction weights; c) The multi-quantile prediction intervals of water quality parameters for the target time period are output. The final water quality prediction model generated by this scheme not only predicts the "most likely water quality" (median), but more importantly, it delineates the "desired safe water area" (safety threshold) and the "dangerous red alert line" (risk warning value). By accurately quantifying the uncertainty and potential risk range of future water quality, it provides strong data support for proactive risk management and precise decision-making in water treatment plants, significantly surpassing traditional models that can only provide a single prediction value.
[0021] Furthermore, the predicted water quality parameters include at least the predicted ammonia nitrogen concentration, predicted alkalinity, and predicted pH value. In step S3, the control strategy execution module substitutes the predicted ammonia nitrogen concentration, predicted alkalinity, and predicted pH value into preset formulas L1, L2, and L3, respectively, and calculates the values of the influent pump flow rate, aeration fan air volume, and alkalinity dosing pump flow rate, respectively. Based on these values, it generates influent control commands, aeration fan control commands, and alkalinity dosing pump control commands.
[0022] Furthermore, the GRU hidden layer has 6 layers in sequence. Each GRU unit in each layer processes the time-series features output by the previous layer in sequence, gradually abstracting the water quality change pattern. The last layer is limited by setting parameters to output only the feature vector of the final time step. Attached Figure Description
[0023] Figure 1 This is the principle of the invention. Figure 1 ;
[0024] Figure 2 This is a system block diagram of the present invention;
[0025] Figure 3 This is the principle of the invention. Figure 2 ;
[0026] Figure 4 This is a flowchart of the present invention; Detailed Implementation
[0027] The technical solution of the present invention will be further described below with reference to the accompanying drawings:
[0028] Example 1:
[0029] See Figure 1-2 As shown, this embodiment discloses an anaerobic ammonia oxidation coupled with AI prediction system for treating iron oxide red wastewater. The system includes a wastewater treatment module and an AI control module. The wastewater treatment module comprises an integrated biofilm anaerobic ammonia oxidation system, a sensor group, and a control group mounted thereon. The sensor group detects actual water quality parameters during the wastewater treatment process at a preset sampling period and transmits these parameters to the AI control module. The control group executes system operation commands. The AI control module includes a real-time data interface module, a user input module, a water quality prediction module, and a control strategy execution module. The real-time data interface module is connected to the sensor group... The system includes a group communication connection for receiving actual water quality parameters; a user input module for receiving factory production plans and employee work schedules, and generating feature data associated with wastewater concentration; a water quality prediction module for constructing a water quality prediction model, and outputting predicted water quality parameters based on the model and feature data; a connection to the sensor group for receiving actual water quality parameters; comparison of actual water quality parameters with corresponding time-series predicted water quality parameters to dynamically optimize the water quality prediction model; and a control strategy execution module connected to the water quality prediction module for generating advanced control commands based on the currently output predicted water quality parameters and transmitting them to the control device group; and generating compensation control commands based on the actual water quality parameters.
[0030] Furthermore, the AI control module also includes a database and a data preprocessing module. The database is used to store and update historical data, which includes at least historical feature data and corresponding historical water quality parameters. The data preprocessing module is used to preprocess the historical data and generate a dataset. The water quality prediction module constructs a water quality prediction model using historical data and a preset neural network model. This solution uses the data preprocessing module to perform deep feature fusion of production plan parameters (process sequence, raw material ratio) and shift schedule data (shift number, operator position) to generate a multi-dimensional feature vector (such as pollution load coefficient + drainage fluctuation coefficient) containing production load characteristics and operational behavior characteristics. This transforms the originally separate production process parameters and personnel operation characteristics into quantifiable and analyzable joint features, constructing an intelligent prediction system for "production-personnel-water quality".
[0031] The aforementioned data preprocessing module includes a data receiving unit, a feature encoding unit, a time-series alignment unit, a feature calculation unit, a normalization processing unit, a dataset generation unit, and a data verification unit. Specifically, the data receiving unit receives three types of raw data: production plans, shift schedules, and water quality parameters. The feature encoding unit converts text-based parameters into numerical codes. The time-series alignment unit synchronizes production data, shift schedule data, and water quality data records according to timestamps. The feature calculation unit automatically calculates derived features such as pollution load coefficients and drainage fluctuation coefficients. The normalization processing unit performs linear normalization on water quality parameters. The dataset generation unit divides the training set / test set according to a preset ratio and packages it into a model-readable format. The data verification unit detects and processes missing values and outliers.
[0032] Based on further optimization of the above scheme, the actual water quality parameters detected by the sensor group are divided into real-time parameters and lag parameters. The control strategy execution module generates real-time control commands based on real-time parameters and compensation control commands based on lag parameters. In this scheme, the control commands generated by the control strategy execution module include three types: advanced control commands based on predicted water quality parameters, real-time control commands based on real-time parameters, and compensation control commands based on lag parameters. In practical applications, water quality parameters can be divided into real-time parameters and lag parameters according to the sensor detection characteristics, and differentiated control strategies can be established: for real-time parameters that can be detected quickly, the system directly generates real-time control commands based on sensor data, skipping the processing of the prediction model; while for lag parameters with a long detection cycle, advanced control commands are generated through the water quality prediction model, and then the prediction deviation is compensated and corrected by combining subsequent actual detection data, forming a three-layer control architecture of "real-time control - advanced prediction - lag compensation". By accurately classifying parameters and allocating strategies, computational power consumption is reduced, making it particularly suitable for industrial wastewater scenarios with large fluctuations in water quality and limited detection conditions, achieving a dual optimization of treatment efficiency and operating costs. Furthermore, real-time and latency parameters can be defined according to different situations such as treatment processes and emission standards; for example, detection delays of less than 30 minutes are defined as real-time parameters, while those greater than 30 minutes are defined as latency parameters.
[0033] Based on further optimization of the above scheme, the equipment group should include at least an alkalinity dosing pump, an aeration blower, an internal circulation pump, and an inlet pump.
[0034] Specific working principle:
[0035] This system employs an integrated biofilm-based anaerobic ammonia oxidation treatment system, consisting of an equalization tank (not shown in the diagram), a pretreatment zone, a reaction zone, and supporting sensor equipment (online monitoring devices for pH, dissolved oxygen, ammonia nitrogen, etc.) and control equipment (alkalinity dosing pump, aeration blower, influent pump, and internal circulation pump). After pretreatment of the influent in the equalization tank, the influent is pumped to the pretreatment zone, which is equipped with a mechanical stirring device and an alkalinity dosing pump to adjust the influent conditions based on pH data. The reaction zone adopts an anoxic / micro-oxic stratified design. The anoxic layer is equipped with a biofilm packing support to enrich anaerobic ammonia-oxidizing bacteria, while the micro-oxic layer achieves controlled oxygen supply (DO maintained at 0.3-0.8 mg / L) through aeration pipes. The internal circulation pump returns a portion of the effluent from the reaction zone to the pretreatment zone, forming a treatment loop. The system employs a closed-loop mechanism of "prediction-execution-feedback-optimization" to first adjust equipment parameters in advance based on production plans and scheduling characteristics (such as adjusting the alkalinity dosage 30 minutes in advance), then dynamically generate compensation control commands based on sensor measurement data, and continuously optimize model parameters.
[0036] For example, based on the GRU-QR neural network model (see Example 2), future water quality change trends are predicted, and three key quantiles—P50 (benchmark value), P80 (safety threshold), and P95 (risk threshold)—are output. Based on these, equipment operation is dynamically adjusted: the influent pump flow is controlled according to formula L1, the aeration intensity is adjusted according to formula L2, and alkalinity is precisely added according to formula L3, forming an intelligent closed loop of "prediction-control-compensation-optimization." The system implements a three-level response strategy: normal mode, early warning mode, and emergency mode. Through deep coupling of stratified biological treatment and intelligent control, under conditions where ammonia nitrogen fluctuations in iron oxide red wastewater are ±300 mg / L, effluent ammonia nitrogen is stabilized at <30 mg / L (compliance rate >99%). Compared to traditional methods, the response speed is improved by 2 hours, the control accuracy is increased by 40%, and the amount of chemicals added is reduced by 17-25%. The system also has a self-optimization function, which continuously improves the prediction model by accumulating operational data, reducing the average annual prediction error by 8%, and significantly reducing the dependence on hardware equipment such as sensors (after continuous optimization, the water quality prediction model can reduce the accuracy requirements of sensors), making it particularly suitable for the application needs of small and medium-sized sewage treatment plants.
[0037] Example 2:
[0038] See Figure 3-4 As shown, this embodiment discloses a processing method based on the above system, which includes the following operation steps:
[0039] S1. Construct a water quality prediction model.
[0040] This involves analyzing historical production data (such as process records and raw material ratios), personnel operation data (such as shift schedules and work records), and corresponding wastewater treatment data (such as influent water quality) to establish a quantitative relationship model between these factors and changes in effluent water quality. Historical data sources include the company's internal wastewater treatment operation database, process record data from the production management system, and publicly available industry reference data from the internet.
[0041] S2. Receive the current factory product production plan and employee shift schedule, extract the characteristic parameters associated with wastewater quality, input the characteristic parameters into the water quality prediction model, and output the predicted water quality parameters.
[0042] This involves using a trained model, combined with current production plans and shift schedules, to predict future water quality changes.
[0043] S3. Generate advanced control commands based on predicted water quality parameters to adjust the operating parameters of alkalinity dosing pump, aeration blower, internal circulation pump and inlet pump.
[0044] Based on the water quality parameters output by the prediction model (which may include the current influent water quality and the trend of change in the next 1-2 hours), the system sends dynamically generated control commands to the execution unit of the wastewater treatment module in milliseconds via industrial communication protocols (such as OPC UA / Modbus TCP) to adjust the operating parameters of the treatment equipment in advance.
[0045] S4. Receive actual water quality parameters, compare actual water quality parameters with predicted water quality parameters, maintain the current control command when the deviation is within the allowable range, and generate compensation control command and adjust equipment operating parameters when the deviation exceeds the allowable range.
[0046] Due to the inherent lag in sensor data (sensor detection may have a delay of 1-2 hours), when the actual sensor data is finally returned, the system compares the predicted value with the measured value and dynamically adjusts the control commands based on the comparison result to achieve precise regulation. It should be noted that actual water quality parameters can be divided into real-time parameters and lag parameters; therefore, the predicted water quality parameters only need to be compared with the lag parameters.
[0047] S5. Verify and optimize the water quality prediction model based on actual water quality parameters.
[0048] Based on a further refinement of the above scheme, the construction of the water quality prediction model includes the following steps:
[0049] S1.1 Obtain historical factory product production plans, employee shift schedules, and corresponding historical water quality parameters, and convert the parameters in the production plans and shift schedules into numerical feature data.
[0050] The process involves converting raw production, shift scheduling, and water quality data into computer-processable numerical features to facilitate model learning. Specifically, production plans (process type, raw material usage) and shift schedules (shift number, operators) are converted into numerical values (e.g., "pickling process = 1", "early shift = 0") to establish quantitative relationships with wastewater composition and discharge patterns.
[0051] S1.2 The numerical feature data is associated with historical water quality parameters in a time sequence and normalized by a linear function. The normalized water quality parameters are divided into training set and test set according to a preset ratio to construct a training dataset containing production features, team features and water quality parameters.
[0052] This ensures that data from different sources are matched in time and eliminates dimensional differences, thereby improving model training effectiveness. The data processing workflow includes: aligning production, scheduling, and water quality data using timestamps, normalizing the data within the 0-1 range to eliminate dimensional differences, and dividing the training set (for model learning) and test set (to prevent overfitting during validation) in a 7:3 or 8:2 ratio. S1.3 uses a pre-defined neural network to train the training dataset, outputting a water quality prediction model with multiple quantiles.
[0053] This involves using neural networks to learn historical patterns and outputting probabilistic predictions of future water quality. Specifically, it uses a pre-defined neural network model (such as the GRU-QR neural network model) to process water quality time-series data and outputs three-tiered quantile predictions: P50 (standard control baseline), P80 (early warning threshold), and P95 (emergency threshold), enabling accurate probabilistic predictions and tiered early warnings of water quality changes.
[0054] S1.4 After evaluating the model's prediction accuracy using the validation set, the trained model is integrated into the water quality prediction module.
[0055] After the water quality prediction model is evaluated through the validation set (e.g., MAE < 3 mg / L meets the standard, early warning accuracy > 85%), it is integrated into the system to run in real time, continuously receiving new data and outputting prediction results.
[0056] Further optimization of the above scheme: the parameters in the production plan table should include at least product type code, production batch quantity, raw material ratio, and process time node; the parameters in the shift schedule should include at least shift number, shift time period, and key operation personnel identification; the production characteristics should include pollution load coefficient per unit output and water quality change characteristic value during process time period; the shift characteristics should include operation standardization rating, equipment usage frequency characteristic value, and drainage fluctuation coefficient.
[0057] Further optimization of the above scheme: The pollution load coefficient per unit output is calculated by establishing a pollution load coefficient comparison table by statistically analyzing the average pollutant generation per unit output of similar products in historical data; the drainage fluctuation coefficient is calculated by the formula "Drainage fluctuation coefficient = (maximum hourly drainage volume during the shift - minimum hourly drainage volume) / average hourly drainage volume".
[0058] Further optimization of the above scheme: In step S1.3, the preset neural network model is a GRU-QR quantile regression neural network model, and the construction of the water quality prediction model includes the following steps:
[0059] S1.3.1 Network structure configuration, including the following settings in sequence: Input layer, used to receive preprocessed time-series data and shift feature vectors; GRU hidden layer, used to extract time-series features of water quality parameters and limit the output to only the feature vector of the final time step, suppressing redundant data in the intermediate process; QR quantile regression layer, used to calculate the predicted values of water quality parameters under multiple quantile thresholds in parallel, generating a conditional probability distribution containing risk intervals, wherein the quantile thresholds include at least 0.5, 0.8, and 0.95, corresponding to the median, safety threshold, and risk warning value of water quality parameters, respectively; Output layer, generating water quality predicted values at specified quantiles;
[0060] That is, a four-layer dedicated network is constructed sequentially: the input layer receives normalized time-series data (such as 24-hour NH4). + The system extracts water quality time-series patterns (e.g., early shift ammonia nitrogen periodic peaks) and shift feature vectors (e.g., [-0.8, 4, 0.034]) from a 6-layer GRU hidden layer, suppressing intermediate redundant outputs by using the return_sequences=False parameter, retaining only the 128-dimensional feature vector of the final time step; the QR quantile regression layer calculates the predicted water quality values (e.g., median 1200 mg / L, safety threshold 1400 mg / L, risk value 1600 mg / L) in parallel with τ=0.5 / 0.8 / 0.95 quantiles, generating conditional probability distributions; the output layer generates formatted three-value prediction vectors, providing a quantitative risk range for graded control.
[0061] S1.3.2 Parameter optimization: The Adam optimizer is used, and the training is performed with the quantile loss function. The loss function is set to mean squared error, the number of iterations is 300, and the batch size is 32.
[0062] The Adam optimizer is used to drive training with a quantile loss function, combined with mean squared error to constrain overall accuracy. 300 iterations are set (to avoid overfitting) and 32 samples / batch (to balance memory and convergence speed) to achieve efficient model optimization; the loss function is set to mse.
[0063] S1.3.3 Training
[0064] a) Input the training set into the GRU layer to extract temporal features; b) Input the water quality prediction value output by the GRU layer and the actual water quality value in the historical water quality parameters into the QR layer to optimize the quantile prediction weights; c) Output the multiquantile prediction interval of the water quality parameters for the target time period.
[0065] The training process involves three steps: a) A 6-layer GRU is input into the training set to extract time-series features (e.g., identifying the periodic peak of ammonia nitrogen during the morning shift), and the final time-step feature vector is compressed and output; b) The GRU predictions and historical measured values are input into the QR layer, and the weight matrix is dynamically adjusted through quantile loss (e.g., optimizing the prediction weights for extreme values when τ = 0.95); c) The multi-quantile prediction intervals for the next 6 hours are output (e.g., median 1210 mg / L, safe threshold 1400 mg / L, risk value 1580 mg / L), forming a quantitative risk decision-making base. In this scheme, the QR layer is used in the quantile regression model to estimate the conditional distribution of different quantiles. Compared with traditional least squares regression, quantile regression not only focuses on the prediction of the mean but also describes the different quantiles of the response variable, making the model more robust to asymmetry and outliers in the data. In implementation, the QR layer is optimized by introducing a specific loss function—quantile loss (also known as the "check function"). The quantile loss is applied to each input sample, calculating a penalty term based on the difference between the predicted and actual values. The formula is: L(y,y^)=max(τ(yy^),(1-τ)(y^-y)). Here, τ is the target quantile (between 0 and 1), y is the actual value, and y^ is the predicted value. Through the QR layer, we can obtain predictions of response values for different quantiles. The design of the output layer depends on the number of quantiles the model wants to predict: if only one quantile is predicted, the output layer is typically a single neuron; if multiple quantiles are predicted, the output layer will contain multiple neurons, each corresponding to a target quantile. During training, the output layer uses the quantile loss determined by the QR layer to adjust the weights, ensuring that the predicted quantiles accurately reflect the conditional distribution of the input data. The final output provides the predicted values for different positions (quantiles) under specific input conditions.
[0066] Furthermore, the predicted water quality parameters include at least the predicted ammonia nitrogen concentration, predicted alkalinity, and predicted pH value. In step S3, the control strategy execution module substitutes the predicted ammonia nitrogen concentration, predicted alkalinity, and predicted pH value into preset formulas L1, L2, and L3, respectively, and calculates the values of the influent pump flow rate, aeration fan air volume, and alkalinity dosing pump flow rate, respectively. Based on these values, it generates influent control commands, aeration fan control commands, and alkalinity dosing pump control commands.
[0067] 1) Formula L1 for adjusting the flow rate of the inlet pump:
[0068]
[0069] Parameter description:
[0070] V: Volume of the anaerobic ammonium oxidation system (m³) 3);
[0071] q: Removal load of the anaerobic ammonia oxidation system (kg / m³) 3 / d);
[0072] C 氨氮 Influent ammonia nitrogen concentration (mg / L);
[0073] 50: Preset target value for ammonia nitrogen in effluent (mg / L).
[0074] Example input (influent ammonia nitrogen = 1500 mg / L):
[0075]
[0076] 2) Formula L2 for calculating the air volume of the aeration blower:
[0077] Q 空气 =k˙(C ammonia nitrogen - 50)˙q 进水 twenty four
[0078] Parameter description:
[0079] k: Air volume coefficient of aeration method (1.85 for perforated pipe, 2.15 for aeration disc);
[0080] C 氨氮 Influent ammonia nitrogen concentration (mg / L);
[0081] Q_inlet: Inlet pump flow rate (m³ / h) 3 / h, calculated from L1);
[0082] Example substitution (perforated tube, k = 1.85):
[0083] Q 空气 =1.85˙(C ammonia nitrogen - 50)˙q 进水 twenty four;
[0084] 3) Formula L3 for adjusting the flow rate of the alkalinity dosing pump:
[0085]
[0086] Parameter description:
[0087] Q_inlet: Inlet pump flow rate (m³ / h) 3 / h);
[0088] C (ammonia nitrogen): Influent ammonia nitrogen concentration (mg / L);
[0089] n%: The concentration of the sodium carbonate solution (e.g., 5% means n = 5);
[0090] 4: Stoichiometric coefficient (relationship between ammonia nitrogen and alkalinity);
[0091] 940: Molar mass conversion factor (g / mol) for sodium carbonate;
[0092] Example substitution (sodium carbonate ratio n% = 5%):
[0093]
[0094] The intelligent control system logic of this solution is as follows:
[0095] When the water quality prediction model generates the influent concentration for the current period, such as: influent ammonia nitrogen 1500 mg / L, influent alkalinity 900 mg / L, influent nitrite nitrogen 80 mg / L, and influent pH 8.5;
[0096] The corresponding intelligent control system generates the following flow rates for the influent pump, aeration fan, and alkalinity dosing pump based on the following logic:
[0097] 1) Formula for calculating the flow rate adjustment of the inlet pump:
[0098] Given the volume of the anaerobic ammonia oxidation system as V(m 3 Given that the removal load of the anaerobic ammonia oxidation system is q (kg / m³), 3 / d), the ammonia nitrogen in the effluent of the anaerobic ammonia oxidation system is required to be controlled at 50 mg / L;
[0099] Then the inlet pump flow rate q = V * q * 1000 / 24 / (1500 - 50) (m 3 / h);
[0100] Formula for adjusting the air output of an aeration blower:
[0101] Given that the aeration method of the anaerobic ammonia oxidation system is perforated pipe, the corresponding air volume coefficient is 2.85;
[0102] Therefore, the air volume of the aeration blower Q (air) = 1.85 * (1500 - 50) * q * 24 (m³) 3 / h);
[0103] It is worth noting that different aeration methods correspond to different air volume coefficients. For example, when the aeration method is an aeration disc, the corresponding air volume coefficient is 2.15.
[0104] Alkalinity dosing pump flow rate:
[0105] The reagent added by the alkalinity dosing pump is sodium carbonate, and the sodium carbonate concentration is n%.
[0106] The alkalinity dosing pump's dosing flow rate is q(alkalinity) = q * (1500 - 50) * 4 / (940 * n%) (m 3 / h).
[0107] Further optimization of the above scheme: The GRU hidden layer has 6 layers in sequence. Each GRU unit processes the time-series features output by the previous layer in sequence, gradually abstracting the water quality change pattern. The last layer is limited to outputting only the feature vector of the final time step by setting parameters.
[0108] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. Based on the disclosure and teachings of the above specification, those skilled in the art can make changes and modifications to the above embodiments. Therefore, this invention is not limited to the specific embodiments disclosed and described above, and some modifications and changes to this invention should also fall within the protection scope of the claims of this invention. Furthermore, although some specific terms are used in this specification, these terms are only for convenience of explanation and do not constitute any limitation on this invention.
Claims
1. An anaerobic ammonia oxidation coupled with AI prediction system for treating iron oxide red wastewater, comprising a wastewater treatment module and an AI control module. The wastewater treatment module includes an integrated biofilm anaerobic ammonia oxidation system, as well as a group of sensing devices and a group of control devices mounted on it. The sensor group detects the actual water quality parameters during the wastewater treatment process at a preset sampling period and transmits the actual water quality parameters to the AI control module. The control device group is used to execute system control commands. Its features are, The AI control module includes: The real-time data interface module is communicatively connected to the sensor group and is used to receive actual water quality parameters. The user input module is used to receive the factory's product production plan and employee shift schedule, and generate characteristic parameters related to wastewater concentration. The water quality prediction module constructs a water quality prediction model and outputs predicted water quality parameters based on the model and feature data. Connect the sensor group to receive actual water quality parameters; The actual water quality parameters are compared with the predicted water quality parameters for the corresponding time series to dynamically optimize the water quality prediction model. The control strategy execution module is connected to the water quality prediction module. It generates advanced control commands based on the currently output predicted water quality parameters and transmits them to the control equipment group; and generates compensation control commands based on the actual water quality parameters.
2. The iron oxide red wastewater treatment system according to claim 1, characterized in that, The AI control module also includes: A database for storing and updating historical data, which includes at least historical characteristic data and corresponding historical water quality parameters, including production characteristic data and work group characteristic data; The data preprocessing module is used to preprocess historical data and generate datasets; The water quality prediction module constructs a water quality prediction model using historical data and a preset neural network model.
3. The iron oxide red wastewater treatment system according to claim 1, characterized in that: The actual water quality parameters detected by the sensor group are divided into real-time parameters and hysteresis parameters. The control strategy execution module generates real-time control commands through real-time parameters and generates compensation control commands through hysteresis parameters.
4. A method for treating iron oxide red wastewater, characterized in that, The processing method applies the processing system according to any one of claims 1-3 and includes the following steps: S1. Construct a water quality prediction model; S2. Receive the current factory product production plan and employee shift schedule, extract the feature parameters associated with wastewater quality, input the feature parameters into the water quality prediction model, and output the predicted water quality parameters; S3. Generate advanced control commands based on predicted water quality parameters to adjust the operating parameters of alkalinity dosing pump, aeration blower, internal circulation pump and influent pump; S4. Receive actual water quality parameters, compare actual parameters with predicted parameters, generate compensation control commands, and adjust equipment operating parameters; S5. Verify and optimize the water quality prediction model based on actual water quality parameters.
5. The processing method according to claim 4, characterized in that: Step S1, which involves constructing a water quality prediction model, includes the following specific steps: S1.1 Obtain historical factory product production plans, employee shift schedules, and corresponding historical water quality parameters, and convert the parameters in the production plans and shift schedules into numerical feature data; S1.2 The numerical feature data is associated with historical water quality parameters in a time sequence and normalized by a linear function. The normalized water quality parameters are divided into training set and test set according to a preset ratio to construct a training dataset containing production features, team features and water quality parameters. S1.3 uses a pre-defined neural network to train the training dataset and outputs a water quality prediction model with multiple quantiles; S1.4 After evaluating the model's prediction accuracy using the validation set, the trained model is integrated into the water quality prediction module.
6. The processing method according to claim 4, characterized in that: The parameters in the production plan include at least the product type code, production batch quantity, raw material ratio, and process time node; the parameters in the shift schedule include at least the shift number, shift time period, and key operation personnel identification; the production characteristics include the pollution load coefficient per unit output and the water quality change characteristic value during the process time period; the shift characteristics include the operation standardization rating, equipment usage frequency characteristic value, and drainage fluctuation coefficient.
7. The processing method according to claim 6, characterized in that: The pollution load coefficient per unit output is calculated by establishing a pollution load coefficient comparison table by product type based on the average pollutant generation per unit output of similar products in historical data. The drainage fluctuation coefficient is calculated using the formula "Drainage fluctuation coefficient = (maximum hourly drainage volume during the shift - minimum hourly drainage volume) / average hourly drainage volume".
8. The processing method according to claim 5, characterized in that, In step S1.3, the preset neural network model is a GRU-QR quantile regression neural network model. The construction of the water quality prediction model includes the following steps: S1.3.1 Network structure configuration, including the following settings: The input layer is used to receive preprocessed time-series data and team feature vectors. The GRU hidden layer is used to extract the temporal features of water quality parameters and limits the output to the feature vector of the final time step, thus suppressing redundant data in the intermediate process. The QR quantile regression layer is used to calculate the predicted values of water quality parameters under multiple quantile thresholds in parallel and generate a conditional probability distribution containing risk intervals. The quantile thresholds include at least 0.5, 0.8, and 0.95, which correspond to the median, safety threshold, and risk warning value of water quality parameters, respectively. The output layer generates water quality prediction values for a specified quantile. S1.3.2 Parameter optimization: The Adam optimizer is used, and the training is performed with the quantile loss function. The loss function is set to mean squared error, the number of iterations is 300, and the batch size is 32. S1.3.3 Training: a) Input the training set into the GRU layer to extract temporal features; b) Input the water quality prediction values output by the GRU layer and the actual water quality values in the historical water quality parameters into the QR layer to optimize the quantile prediction weights; c) Output the quantile prediction intervals for water quality parameters for the target time period.
9. The processing method according to claim 4, characterized in that: The predicted water quality parameters include at least the predicted ammonia nitrogen concentration, predicted alkalinity, and predicted pH value. In step S3, the control strategy execution module substitutes the predicted ammonia nitrogen concentration, predicted alkalinity, and predicted pH value into preset formulas L1, L2, and L3, respectively, and calculates the values of the influent pump flow rate, aeration fan air volume, and alkalinity dosing pump flow rate, respectively. Based on these values, it generates influent control commands, aeration fan control commands, and alkalinity dosing pump control commands.
10. The processing method according to claim 8, characterized in that: The GRU hidden layer has 6 layers in sequence. Each GRU unit processes the time-series features output by the previous layer in sequence, gradually abstracting the water quality change pattern. The last layer is limited by setting parameters to output only the feature vector of the final time step.
Citation Information
Cited By
Control method for adding carbon source for sewage treatment
CN121698475A