Sewage and wastewater treatment control system and method based on intelligent optimization algorithm
Through the intelligent optimization algorithm, the wastewater treatment control system of the wastewater treatment control system responds to water quality changes in real time and dynamically adjusts the control parameters, solving the problems of unstable treatment efficiency and unoptimized energy consumption of the wastewater treatment system when water quality changes dynamically, and achieving efficient and stable wastewater treatment.
Patent Information
- Application Number
- CN202510481168.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-08-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing wastewater treatment system cannot respond in real time when the water quality changes, the treatment efficiency is unstable, the energy consumption and chemical consumption are not optimized, the system is poorly robust, and it is difficult to balance the treatment efficiency, energy consumption and stability in complex working conditions.
The wastewater treatment control system based on intelligent optimization algorithm is adopted, including data acquisition, prediction, multi-objective optimization, parameter optimization and dynamic optimization modules. Through the water quality dynamic prediction model and adaptive fuzzy network, control parameters are adjusted in real time, and combined with multi-objective optimization algorithm and multi-level fault tolerance mechanism to ensure the stable operation of the system.
Real-time response to fluctuations in incoming water quality is achieved, control parameters are flexibly adjusted, treatment efficiency and water quality meet standards, operating costs are reduced, resource utilization efficiency is improved, and system stability and equipment operation flexibility are ensured.
Smart Images

Figure CN120561484A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sewage treatment, and in particular to a sewage and wastewater treatment control system and method based on an intelligent optimization algorithm. Background Art
[0002] Currently, wastewater treatment systems primarily rely on traditional fixed-parameter control strategies, achieving water purification through preset process parameters such as aeration volume and reagent dosage. For example, these strategies employ empirically based PID (Proportional-Integral-Derivative) control to adjust aeration volume, or set a fixed carbon source dosage based on historical data. These methods can maintain basic treatment effectiveness under stable water quality conditions, but lack adaptability to dynamic changes in water quality.
[0003] In the process of implementing the present invention, the inventors found that the traditional method has the following defects: First, it is unable to respond to fluctuations in the influent water quality (such as sudden changes in chemical oxygen demand and ammonia nitrogen concentration) in real time, resulting in unstable treatment efficiency and even the risk of excessive emissions; second, energy consumption and reagent consumption are not optimized. Although high aeration volume improves treatment efficiency, it increases energy consumption, and low aeration volume may lead to insufficient biochemical reactions; third, the system has poor robustness. When the equipment ages or fails, the control strategy cannot be adjusted quickly, which can easily cause the treatment process to be interrupted.
[0004] Existing technologies have yet to address the challenges of multi-objective dynamic optimization, particularly in complex operating conditions where it is difficult to balance treatment efficiency, energy consumption, and stability. For example, during the high-load rainy season, traditional methods cannot simultaneously improve denitrification efficiency and energy conservation. Furthermore, during the colder months, when microbial activity decreases, there is a lack of intelligent parameter compensation mechanisms. Therefore, a new wastewater treatment technology that can integrate real-time data and dynamically optimize control parameters is urgently needed. Summary of the Invention
[0005] In view of this, an embodiment of the present invention provides a sewage and wastewater treatment control system and method based on an intelligent optimization algorithm to solve at least one of the above technical problems.
[0006] To achieve the above objectives, in a first aspect, a sewage treatment and wastewater control system based on an intelligent optimization algorithm is provided, comprising:
[0007] A data acquisition module is used to obtain raw water quality data and pre-process the raw water quality data to obtain a water quality characteristic matrix;
[0008] A prediction module, configured to input the water quality characteristic matrix into a trained water quality dynamic prediction model to obtain a water quality prediction result;
[0009] A multi-objective optimization module, configured to process the water quality prediction results using a multi-objective optimization algorithm to obtain control parameters;
[0010] a parameter optimization module for obtaining sewage and wastewater treatment data after operation according to the control parameters, and calculating the water load fluctuation rate, the confidence level of the water quality dynamic prediction model, and the equipment operating status based on the sewage and wastewater treatment data; inputting the water load fluctuation rate, the confidence level of the water quality dynamic prediction model, and the equipment operating status into an adaptive fuzzy network to obtain multi-objective parameter optimization recommendations;
[0011] a dynamic optimization module, configured to optimize the parameters in the multi-objective optimization algorithm according to the multi-objective parameter optimization suggestion to obtain a multi-objective optimization model, and input the water quality prediction result into the multi-objective optimization model to obtain optimized control parameters;
[0012] A control module is used to control the sewage and wastewater treatment according to the optimized control parameters.
[0013] In a second aspect, the present invention provides a sewage and wastewater treatment control method based on an intelligent optimization algorithm, comprising the following steps:
[0014] Obtaining original water quality data, and preprocessing the original water quality data to obtain a water quality characteristic matrix;
[0015] Inputting the water quality characteristic matrix into the trained water quality dynamic prediction model to obtain a water quality prediction result;
[0016] Using a multi-objective optimization algorithm to process the water quality prediction results to obtain control parameters;
[0017] Obtaining sewage and wastewater treatment data after operation according to the control parameters, and calculating the water load fluctuation rate, the confidence level of the water quality dynamic prediction model, and the equipment operating status based on the sewage and wastewater treatment data, inputting the water load fluctuation rate, the confidence level of the water quality dynamic prediction model, and the equipment operating status into an adaptive fuzzy network to obtain a multi-objective parameter optimization recommendation;
[0018] Optimizing the parameters in the multi-objective optimization algorithm according to the multi-objective parameter optimization suggestion to obtain a multi-objective optimization model, and inputting the water quality prediction result into the multi-objective optimization model to obtain optimized control parameters;
[0019] The wastewater treatment is controlled according to the optimized control parameters.
[0020] The above technical solution has the following beneficial technical effects:
[0021] With the help of a dynamic water quality prediction model and an adaptive fuzzy network, the system can respond to fluctuations in influent water quality in real time, such as high load in the rainy season or low temperature season, and flexibly adjust control parameters to ensure that treatment efficiency and water quality meet standards.
[0022] The multi-objective optimization algorithm takes into account processing efficiency, energy consumption and reagent consumption, and combines the entropy weight TOPSIS method to select the optimal solution from the Pareto solution set to improve resource utilization efficiency.
[0023] The present invention adopts a multi-level fault-tolerant mechanism and equipment status monitoring. When a sensor fails or the equipment stops, the system can be guaranteed to run stably through soft measurement and spare equipment scheduling.
[0024] The present invention avoids excessive aeration and reagent waste by dynamically adjusting the aeration volume and the carbon source dosage, reduces operating costs, and meets dual carbon goals.
[0025] The data preprocessing and verification mechanism of the present invention ensures that the input data is accurate and complete, and improves the model prediction accuracy and optimization effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.
[0027] Figure 1 This is a structural block diagram of a sewage and wastewater treatment control system based on an intelligent optimization algorithm of the present invention;
[0028] Figure 2 This is a structural block diagram of a data acquisition module in a sewage treatment control system based on an intelligent optimization algorithm of the present invention;
[0029] Figure 3 This is a structural block diagram of a prediction module in a sewage and wastewater treatment control system based on an intelligent optimization algorithm of the present invention;
[0030] Figure 4 This is a structural block diagram of a multi-objective optimization module in a sewage treatment control system based on an intelligent optimization algorithm of the present invention;
[0031] Figure 5 This is a structural block diagram of a dynamic optimization module in a sewage and wastewater treatment control system based on an intelligent optimization algorithm of the present invention;
[0032] Figure 6 This is a structural block diagram of a solution unit in a sewage and wastewater treatment control system based on an intelligent optimization algorithm of the present invention;
[0033] Figure 7 This is a flow chart of a sewage and wastewater treatment control method based on an intelligent optimization algorithm of the present invention;
[0034] Figure 8 Schematic diagram of the structure of a computer system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0036] Example 1
[0037] like Figure 1 As shown, a sewage treatment control system based on an intelligent optimization algorithm includes: a data acquisition module, a prediction module, a multi-objective optimization module, a parameter optimization module, a dynamic optimization module and a control module.
[0038] The data acquisition module is used to obtain raw water quality data and pre-process the first water quality data to obtain a water quality characteristic matrix. Specifically, the data acquisition module is used to collect raw water quality data of sewage and wastewater in real time, including but not limited to key water quality parameters such as pH value, dissolved oxygen (DO), chemical oxygen demand (COD), biochemical oxygen demand (BOD), ammonia nitrogen (NH3-N), total nitrogen (TN), and total phosphorus (TP). The data acquisition equipment may include an online water quality monitor, a sensor array, and a data acquisition terminal. The collected raw water quality data is pre-processed, including noise filtering, missing value filling, data standardization, etc., to form a water quality characteristic matrix. Data pre-processing uses principal component analysis (PCA) and outlier detection technology to improve data quality and stability, providing high-quality input data for subsequent predictive analysis.
[0039] Specifically, a water quality characteristic matrix is an ordered two-dimensional array structure organized in a unified format, consisting of raw data collected from wastewater treatment systems at different time points, monitoring locations, and water quality parameters. After noise filtering, missing value filling, and standardization, the matrix's rows represent the time of each sampling (for example, sampling every 5 minutes), while the columns include the sampling timestamp, sampling location, and the values of various key water quality parameters, such as pH, dissolved oxygen (DO), chemical oxygen demand (COD), ammonia nitrogen (NH3-N), and flow rate. The water quality characteristic matrix not only intuitively displays the temporal trends of different parameters but also reflects the interrelationships between them.
[0040] The prediction module is used to input the water quality characteristic matrix into the trained water quality dynamic prediction model to obtain the water quality prediction result. Specifically, the prediction module uses the trained water quality dynamic prediction model to process the water quality characteristic matrix to obtain the water quality change trend in the future period of time. The prediction module can use the Long Short-Term Memory (LSTM) neural network to construct a water quality prediction model, train it based on historical water quality data, input current and historical water quality characteristics, and output water quality prediction results at different time steps (for example, 1 hour, 6 hours, and 24 hours later). During the prediction model training process, the mean squared error (MSE) is used as the loss function, and the adaptive moment estimation (Adam) optimizer is used to update the parameters to improve the prediction accuracy and model generalization ability.
[0041] A multi-objective optimization module is used to use a multi-objective optimization algorithm to process the water quality prediction results to obtain control parameters. Specifically, the multi-objective optimization module can use a multi-objective evolutionary optimization algorithm based on the water quality prediction results to calculate the optimal sewage treatment control parameters. The optimization objectives of the multi-objective optimization module may include maximizing the effluent water quality compliance rate, minimizing treatment costs (such as chemical consumption, energy consumption), minimizing sludge production and maximizing equipment operating efficiency. The optimization process first analyzes the water quality prediction results, combines them with the sewage treatment process model, constructs the optimization objective function and constraints, and then calculates the optimal control parameters, such as aeration volume, recirculation ratio and sludge age, through the evolutionary algorithm to form an optimized control plan.
[0042] Specifically, the multi-objective evolutionary optimization algorithm may adopt the second generation non-dominated sorting genetic algorithm (NSGA-II) or the multi-objective evolutionary algorithm based on decomposition (MOEA / D).
[0043] The parameter optimization module is configured to acquire wastewater treatment data after operation according to the control parameters and, based on this data, calculate the water load fluctuation rate, the confidence level of the dynamic water quality prediction model, and the equipment operating status. These water load fluctuation rate, the confidence level of the dynamic water quality prediction model, and the equipment operating status are then input into an adaptive fuzzy network to generate multi-objective parameter optimization recommendations. Specifically, the parameter optimization module further optimizes control parameters to ensure system stability and adaptability under different operating conditions. This module acquires treated water quality data from the wastewater treatment system in real time and calculates the water load fluctuation rate, the confidence level of the dynamic water quality prediction model, and the equipment operating status. The calculation results are input into the adaptive fuzzy network, which makes decisions based on a fuzzy rule base and / or an expert system. The input variables include the water load fluctuation rate, the confidence level of the prediction model, and the equipment operating status. The output is a multi-objective parameter optimization recommendation, such as adjusting the aeration rate, changing the sludge return ratio, or optimizing the reagent dosage, to ensure system stability and efficiency.
[0044] Specifically, the equipment in this embodiment refers to various hardware devices involved in water quality treatment and monitoring in the sewage treatment system, mainly including aeration equipment (such as fans, blowers), sludge return pumps, lift pumps, agitators, dosing pumps, dehydrators, and online water quality monitoring instruments and sensors. The equipment operating status refers to the real-time operating conditions and health status information of these devices during operation, mainly reflecting whether the equipment is in normal, efficient, faulty or inefficient operating state. Specifically, the equipment operating status can be evaluated by monitoring parameters such as current, voltage, vibration, temperature, speed, start-stop frequency, and equipment alarm information. For example, the operating status of the aeration fan can be determined by monitoring its current and vibration changes to determine whether there is motor overload or mechanical failure; the operating status of the sludge return pump can be determined by flow rate, pressure, and number of starts and stops to determine whether there is blockage or fatigue operation; the operating status of the dosing pump can be evaluated by the amount of chemical added and the frequent start-stop situation to determine whether it needs maintenance or calibration. Good equipment operating status means that the equipment is operating efficiently within the rated load and normal range. Otherwise, optimization adjustment or maintenance is required to ensure the overall stable operation of the system.
[0045] The dynamic optimization module is used to optimize the parameters in the multi-objective optimization algorithm according to the multi-objective parameter optimization suggestion, obtain a multi-objective optimization model, input the water quality prediction result into the multi-objective optimization model, and obtain the optimized control parameters. Specifically, the dynamic optimization module adaptively adjusts the hyperparameters of the multi-objective optimization algorithm according to the optimization suggestion provided by the parameter optimization module to improve the optimization efficiency and control accuracy. In this embodiment, a genetic algorithm (GA) can be used to dynamically adjust the multi-objective optimization model to adapt it to different water quality environments and process conditions. After obtaining the optimization suggestion, the dynamic optimization module adjusts the key hyperparameters of the multi-objective optimization algorithm, such as the mutation rate, crossover rate and convergence threshold, and recalculates the optimized control parameters. The optimized multi-objective optimization algorithm continuously iterates and optimizes to achieve intelligent dynamic control of the sewage and wastewater treatment system and improve the system's adaptability and optimization efficiency.
[0046] A control module is used to control the sewage and wastewater treatment according to the optimized control parameters. Specifically, the control module performs real-time control of the sewage and wastewater treatment system according to the optimized control parameters. The control module adopts a programmable logic controller (PLC) or a distributed control system (DCS) as the core control unit, combined with a supervisory control and data acquisition system (SCADA) for remote monitoring and automatic adjustment. The control strategy includes adjusting the fan speed of the aeration system to increase the dissolved oxygen concentration, controlling the sludge return pump to optimize the sludge age, dynamically adjusting the dosage of the agent to reduce the consumption of chemical agents, and adjusting the start-stop strategy according to the equipment load to improve the equipment operation efficiency. The control system supports both automatic control and manual intervention modes, and can automatically adjust the strategy according to the system operation status to ensure the stability and economy of the sewage and wastewater treatment process.
[0047] The embodiment of the present invention realizes dynamic closed-loop optimization of the sewage and wastewater treatment process by constructing a multi-module collaborative intelligent optimization control system. Among them, the water quality dynamic prediction model based on pre-treated water quality data improves the parameter prediction accuracy, and combines the multi-objective optimization algorithm to effectively balance multiple objectives such as treatment efficiency, energy consumption and effluent quality; the parameter optimization module introduces a three-dimensional evaluation system of water load fluctuation rate, model confidence and equipment status, and realizes online calibration of control parameters through an adaptive fuzzy network; the dynamic optimization module further establishes a feedback adjustment mechanism for algorithm parameters to enhance the system's adaptability to changes in working conditions such as water inlet fluctuations and equipment losses. The overall technical architecture has the characteristics of high prediction accuracy, good multi-objective coordination, and strong anti-interference ability, which can reduce treatment energy consumption, improve effluent compliance rate, and extend equipment maintenance cycle.
[0048] Specifically, if Figure 2 As shown, the data acquisition module specifically includes:
[0049] The sensor unit is installed in the sewage and wastewater treatment plant to obtain raw water quality data;
[0050] an original pre-processing unit, configured to process the original water quality data using a sliding window mean filtering method, an interpolation method, and a minimum-maximum normalization method to obtain processed water quality data;
[0051] a matrix construction unit, configured to convert the processed water quality data into a water quality feature matrix using sampling time as matrix rows and sensor type as matrix columns;
[0052] The verification unit is used to verify the integrity of the water quality characteristic matrix using a cross-validation method, and output the water quality characteristic matrix if the verification result satisfies the integrity.
[0053] The advantages of the above technical solutions in this embodiment are: the sensor unit adopts a multi-dimensional data acquisition architecture to ensure the comprehensiveness and real-time nature of the original water quality data collection; the original preprocessing unit integrates the sliding window mean filtering (eliminating short-term fluctuation noise), interpolation (repairing missing data) and minimum-maximum normalization (eliminating dimensional differences) triple processing technologies to effectively enhance data quality and comparability; the matrix construction unit reorganizes the data through structured time and space dimensions to form a water quality feature matrix with clear engineering semantics, providing adaptive high-dimensional feature input for subsequent models; the verification unit introduces cross-validation and anomaly marking mechanisms to establish a human-machine collaborative verification channel while ensuring data integrity, reducing the risk of misjudgment caused by sensor failure or transmission interference.
[0054] Specifically, the sensor unit includes a chemical oxygen demand (COD) sensor, an ammonia nitrogen sensor, an acid-base sensor, a dissolved oxygen sensor, and a turbidity sensor. The acquisition frequency of each sensor in the sensor unit is 5 minutes / time, and the installation locations of each sensor include but are not limited to the water inlet, biochemical reaction tank, and water outlet. The measurement range of each sensor covers the characteristic parameters of sewage and wastewater, as follows: COD is 200mg / L to 600mg / L, ammonia nitrogen concentration range is 15mg / L to 50mg / L, pH is 6.5 to 8.5, and dissolved oxygen concentration range is 1.5mg / L to 4mg / L. The measurement error of each sensor is within ±3%. The raw water quality data collected by the sensor unit passes through the signal conditioning circuit (including amplification circuit, filtering circuit, and analog-to-digital conversion circuit) and is uploaded to the original preprocessing unit for processing through the industrial Internet of Things, network cable, or wireless transmission. The gateway supports multi-protocol conversion to ensure data compatibility of different types of sensors. The transmission channel adopts a redundant design and is equipped with primary and backup communication links to ensure the reliability of data transmission.
[0055] Specifically, in the original preprocessing unit, the original water quality data is first subjected to a sliding window mean filtering method, the sliding window length is set to 15 minutes, and the continuously collected data points in the original water quality data are locally smoothed to effectively suppress high-frequency noise interference and reduce the impact of instantaneous outliers on data quality to obtain first data. Then, based on the three times standard deviation interval, data points that deviate from the normal distribution in the first data are identified and marked as abnormal data. The abnormal data is repaired by an interpolation method (for example, a linear interpolation method) to ensure data continuity to obtain second data. Finally, the second data is mapped to the [0,1] interval to eliminate dimensional differences. By adopting the Min-Max Normalization method, the relative size relationship of the data is retained to obtain the first water quality data. Min-Max Normalization is a data normalization method used to map data to a specified interval, usually the [0,1] interval, with the purpose of eliminating dimensional differences between different variables while retaining the relative size relationship of the data.
[0056] Specifically, in the matrix construction unit, the matrix rows represent time series (i.e., sampling time, 5 min / time), and the columns represent different water quality parameters (i.e., sensor type, chemical oxygen demand, ammonia nitrogen, acidity and alkali, dissolved oxygen or flow, etc.). The matrix structure integrates the correlation between the time dimension and the parameter dimension, providing a structured data basis for subsequent input. The water quality feature matrix can also include timestamp and sampling location information to improve the accuracy of the data.
[0057] Specifically, in the verification unit, a sensor cross-validation is first performed, and the deviation is calculated by calculating the difference between the maximum and minimum values of the water quality characteristic matrix, and then the quotient of the deviation and the average value of the water quality characteristic matrix is calculated to obtain the deviation rate. When the deviation rate is greater than the preset deviation threshold, it is judged that the data is abnormal, otherwise it is judged that the data is normal. The Pearson correlation coefficient between any two water quality characteristic matrices from different sensor sources is calculated. If the absolute value of the Pearson correlation coefficient is less than the preset correlation threshold, it is judged that the data is abnormal, otherwise it is judged that the data is normal. The number of missing values is retrieved in all the water quality characteristic matrices. If the quotient of the number of missing values and the total amount of the water quality characteristic matrix is greater than the preset missing threshold, it is judged that the data is abnormal, otherwise it is judged that the data is normal. For abnormal data, linear interpolation is used to supplement the data before and after the abnormal data, or a long short-term memory network is used to predict the missing values with historical data as input, thereby completing the filling of abnormal values.
[0058] Specifically, if Figure 3 As shown, the prediction module specifically includes:
[0059] A historical data acquisition unit, used for acquiring historical water quality data;
[0060] Model building unit, used to build long short-term memory network model;
[0061] A training unit, configured to input the historical water quality data into the long short-term memory network model for training to obtain a trained water quality dynamic prediction model;
[0062] The prediction unit is used to input the water quality feature matrix into the trained water quality dynamic prediction model to obtain a water quality prediction result.
[0063] Specifically, the time span of the historical water quality data is greater than or equal to 6 months. The historical water quality data is first subjected to feature extraction before training. The feature extraction includes time feature extraction (for example, hours, weeks or months). The historical water quality data is divided according to the time series and divided into training set, validation set and test set according to a preset ratio to improve the generalization ability of the model. Preferably, the ratio of training set, validation set and test set is 7:2:1.
[0064] Specifically, the long short-term memory network model includes an input layer, a hidden layer, an attention mechanism layer and an output layer. The input layer is used to receive historical water quality data after feature extraction. The hidden layer includes a three-layer long short-term memory network with 64, 32 and 16 neurons respectively. The attention mechanism layer is used to enhance the sensitivity to important data in historical water quality parameters. The output layer outputs the trend of water quality data changes in the future. Preferably, the future is the next two hours, and the time resolution of the output layer is 15 minutes. The long short-term memory network model selects an adaptive moment estimation optimizer with a learning rate of 0.001, a batch size of 32, and a loss function using mean square error. Overfitting is prevented by setting the L2 regularization (also known as Ridge regularization) term. An early stopping mechanism is provided during the training process, that is, when the validation set loss does not improve within 10 consecutive rounds, training is stopped.
[0065] Specifically, the output layer is equipped with a probability distribution mechanism, and the water quality prediction results are presented in the form of a probability distribution. This is achieved through the Monte Carlo method, which randomly discards some neurons during the inference phase and runs the prediction distribution multiple times to quantify the uncertainty of the prediction results. The water quality prediction results include the prediction mean, prediction variance, and confidence interval (typically 95%).
[0066] Specifically, the prediction module further includes a dynamic incremental unit, which is used to obtain cross-regional water quality historical data, perform incremental training on the trained water quality dynamic model based on the cross-regional historical data, and update the trained water quality dynamic model.
[0067] Specifically, the dynamic incremental unit acquires cross-regional historical data from the cloud every 24 hours. This cross-regional historical data is first standardized to obtain standard historical data. Incremental training of the trained water quality dynamic model is performed based on this standard historical data. This is achieved by freezing some underlying network parameters and fine-tuning the top-level network. The initial learning rate is 0.001, which decays exponentially as the learning progresses, preserving the original knowledge while adapting to the standard historical data distribution.
[0068] Specifically, the updated water quality dynamic model is calculated by calculating its root mean square error, mean absolute error, R 2 The coefficient of determination and confidence are used to evaluate the performance of the updated water quality dynamic model. When the prediction confidence is lower than 80%, retraining or structural adjustment is performed.
[0069] Specifically, the prediction module also includes a seasonal feature unit. The seasonal feature unit first performs discrete Fourier transform on the historical water quality data, then calculates the power spectral density based on the discrete Fourier transform results, selects several frequencies with the largest power spectral density as significant frequencies, generates sine features and cosine features based on the significant frequencies, and splices the sine features, cosine features and historical water quality data to obtain Fourier data. The Fourier data is input into the long short-term memory network model, and periodic position coding is introduced into the long short-term memory network model to enhance attention to seasonal patterns. Then, for the long short-term memory network model, a seasonal trend decomposition algorithm is used to decompose the time series into trend, season and residual components, which are modeled separately and then fused to obtain a water quality dynamic model that integrates seasonal characteristics.
[0070] The advantage of the above prediction module is that the prediction module based on the long short-term memory network fully extracts the multi-scale time series correlation characteristics in the historical water quality data, effectively capturing the dynamic evolution laws and nonlinear coupling relationships of parameters such as dissolved oxygen and pollutant concentration; the dynamic prediction model established through historical data training can accurately predict the evolution trend of water quality under complex working conditions such as process disturbances and changes in influent load; combined with the real-time water quality feature matrix input, the high-confidence prediction results generated by the model provide a decision-making basis for the subsequent multi-objective optimization algorithm.
[0071] Specifically, if Figure 4 As shown, the multi-objective optimization module specifically includes:
[0072] A multi-objective optimization function establishment unit is used to establish a multi-objective optimization function with the objectives of maximizing treatment efficiency, minimizing energy consumption, and minimizing reagent consumption according to the water quality prediction result;
[0073] Constraint establishment unit, used to set decision variables and constraints;
[0074] A genetic unit, configured to generate an initial population according to the decision variables and the constraint conditions, and to generate an elite population using a genetic algorithm based on the initial population;
[0075] a screening unit, configured to establish a fitness function according to the multi-objective optimization function, calculate the fitness corresponding to each individual in the elite population according to the fitness function, and select individuals whose fitness is greater than an individual threshold as elite individuals;
[0076] The particle swarm unit is used to use the decision variables corresponding to the elite individuals as the initial positions of the particles to obtain an initial particle swarm, use the particle swarm optimization algorithm to obtain the optimal solution based on the initial particle swarm, and output the decision variables corresponding to the optimal solution as control parameters.
[0077] Specifically, the energy consumption value and the drug consumption value are both normalized values.
[0078] Specifically, the decision variables include aeration volume x1, carbon source input volume x2, sludge return ratio x3, and mixed liquor return ratio x4. The constraints include ammonia nitrogen constraint, dissolved oxygen constraint, and chemical oxygen demand constraint. Decision variable X = [x1, x2, x3, x4], x1∈[500,1500]m 3 / h, x2∈[10,60]mg / L, x3∈[30%,80%], x4∈[100%,300%]. The ammonia nitrogen constraint is: the ammonia nitrogen concentration is less than or equal to 5mg / L. The dissolved oxygen constraint is: the absolute deviation between the actual dissolved oxygen and the target dissolved oxygen does not exceed 0.3mg / L. The chemical oxygen demand constraint is: COD is less than or equal to 50mg / L.
[0079] Specifically, the decision variables include aeration volume x1, carbon source input volume x2, sludge return ratio x3 and mixed liquor return ratio x4, which together determine the operating status and effluent quality during the sewage treatment process. Aeration volume x1 refers to the flow rate of air transported into the aeration tank (unit: m 3 / h), which directly affects the dissolved oxygen concentration and microbial activity and is a key parameter for maintaining an aerobic environment in biochemical reactions; the carbon source dosage x2 (unit: mg / L) refers to the dosage of the external carbon source added to the denitrification process to adjust the carbon-nitrogen ratio of the system and promote the removal of total nitrogen; the sludge return ratio x3 indicates the proportion of residual sludge returned from the secondary sedimentation tank to the biochemical tank (30% to 80%), which is used to maintain appropriate sludge concentration and activity and improve treatment capacity; the mixed liquor return ratio x4 indicates the proportion of mixed liquor flow returned from the subsequent tank body to the front-end denitrification tank (100% to 300%), which is used to adjust the denitrification conditions and balance the carbon source and nitrate supply.
[0080] In other embodiments, the decision variables may also include: sludge retention time (SRT), which can be controlled by adjusting the residual sludge discharge volume, affecting microbial activity and system stability; influent distribution ratio, which can optimize load distribution in multi-stage processes and improve overall reaction efficiency; alkali dosage, adjusting the alkali dosage is conducive to maintaining a suitable pH value and promoting nitrification and denitrification reactions; circulation pump start-stop strategy, dynamically adjusting the circulation pump start-stop frequency or operating time period according to load fluctuations, which saves energy and avoids excessive equipment fatigue; for large tanks, setting the aeration intensity zoning control coefficient can achieve a refined distribution of dissolved oxygen to avoid local hypoxia or excess oxygen; residual sludge discharge cycle and discharge volume, reasonable adjustment of which is conducive to controlling system sludge age and load fluctuations; stirring frequency of the biological selection tank or anaerobic tank, by adjusting the operating frequency or cycle of the agitator, the microbial growth environment and sludge settling performance can be improved.
[0081] Specifically, in the genetic unit, the population size is 100, the chromosome encoding is real number encoding, the crossover rate is 0.8, the mutation rate is 0.05, the maximum number of iterations is 200, and the fitness function is a multi-objective optimization function. Roulette wheel selection, single-point crossover or multi-point crossover, and Gaussian mutation strategies are used to achieve random search and evolution of the entire population. By using real number encoding to represent the actual value of each decision variable as the gene of the chromosome, Latin Hypercube sampling is used within the range of the decision variable values to generate the initial population, ensuring uniform coverage of the parameter space. The fitness function is used to calculate the fitness of each individual in the population. Taking the roulette wheel selection method as an example, the proportion of each individual's fitness to the total fitness is calculated, and this is used as the probability of being selected. Through random sampling, a certain number of individuals are selected according to the probability of being selected to enter the next generation population. The crossover rate is set to 0.8, and single-point crossover or multi-point crossover is used. Two individuals are randomly selected as parents, and one or more crossover points are randomly selected on the chromosome to exchange the genes on both sides of the crossover point to generate offspring individuals. The mutation rate is set to 0.05, and Gaussian mutation is used. For each gene of each individual, the mutation rate is used to determine whether it mutates probabilistically. If a mutation occurs, a random perturbation that obeys the normal distribution is added to the gene value. The iteration is terminated when the maximum number of iterations is reached or the convergence condition is met (for example, the change rate of the optimal solution for ten consecutive generations is less than 0.1%, the population diversity index is less than 0.2, or the fluctuation of the objective function value is less than 0.5%, etc.).
[0082] Specifically, in the screening unit, individuals with fitness in the top 10% do not mutate and are directly retained as elite individuals to the next generation.
[0083] Specifically, in the particle swarm unit, the number of particles in the initial swarm is 50. The initial positions and initial velocities are set based on the individual decision variables in the elite population. Each particle's initial position is set to its individual optimal position (pbest), and the particle with the best fitness value is selected from all initial positions as the global optimal position (gbest). The fitness value of each particle is calculated based on its current position. For each particle, if its current fitness value is better than that of its individual optimal position, the current position is updated to the individual optimal position. The particle with the best fitness value is selected from all individual optimal positions as the global optimal position. A dynamic inertia weight is used, with an initial value of 0.9 that gradually decreases to 0.6 as the number of iterations increases. In addition, the individual learning factor (c1) and the social learning factor (c2) are both set to 2 to control the particle's reliance on its own experience and the experience of the group. The maximum velocity (Vmax) is limited to 10% of the variable range to prevent particles from moving too fast and causing search failure.
[0084] Specifically, in the multi-objective optimization module, whether convergence has occurred is determined by a convergence index. The robustness of the multi-objective optimization module is determined by a robustness index.
[0085] The calculation formula of the above convergence index is as follows:
[0086]
[0087] Among them, CM represents the convergence index, F current Represents the objective function value of the current optimal solution, F best It represents the objective function value of the historical optimal solution. If CM is lower than a certain set threshold, the optimization process is considered to have converged.
[0088] The robustness index is calculated as follows: RI = f(CV, SV). RI represents the robustness index, CV represents the convergence metric, which measures the convergence of the algorithm under different initial conditions, and SV represents the stability of the global optimal solution, which measures the stability of the final solution.
[0089] The calculation formula of the above convergence measure (CV) is as follows:
[0090]
[0091] Among them, σ(F final ) is the standard deviation of the final optimization results under different initial conditions, μ(F final ) is the mean of the final optimization results under different initial conditions.
[0092] The calculation formula of the stability (SV) of the above global optimal solution is as follows:
[0093]
[0094] Among them, X best,i is the global optimal solution obtained in the i-th run, is the mean of the global optimal solutions of all experiments, and ∥·∥ represents the vector norm (e.g., Euclidean distance).
[0095] Finally, the robustness index RI is a weighted combination of the above two indicators, for example: RI = αCV + βSV, where α and β are weight parameters.
[0096] Specifically, the multi-objective parameter optimization suggestions include:
[0097] When the water load fluctuation rate is greater than a preset fluctuation rate threshold (for example, 15%), the inertia weight of the particle swarm optimization algorithm is a preset weight value (for example, 0.9). When the water load fluctuation rate is less than or equal to the preset fluctuation rate threshold, the inertia weight is proportional to the current number of iterations of the particle swarm optimization algorithm (for example, inertia weight = 0.6 + 0.3 * (current number of iterations / maximum number of iterations)). The water load fluctuation rate is the fluctuation rate of the load under the action of water waves, which is obtained by the sensor unit in the data acquisition module.
[0098] When the confidence of the water quality dynamic prediction model is less than a preset confidence threshold (for example, 0.8), the mutation rate of the genetic algorithm is a first value (for example, 0.1); when the confidence of the water quality dynamic prediction model is greater than or equal to the preset confidence threshold, the mutation rate of the genetic algorithm is a second value (for example, 0.05), and the second value is less than the first value.
[0099] Specifically, the parameter optimization module also includes a dissolved oxygen constraint adaptive control unit, which is used to reduce the weight of the aeration volume in the optimization process when the absolute deviation between the actual dissolved oxygen and the target dissolved oxygen (i.e., the absolute value of the deviation) exceeds a preset dissolved oxygen threshold, so as to ensure the stable operation of the biochemical reaction system.
[0100] Specifically, if Figure 5 As shown, the dynamic optimization module specifically includes:
[0101] An optimization unit, configured to optimize the genetic algorithm and the particle swarm algorithm according to the multi-objective parameter optimization suggestion to obtain a multi-objective optimization model;
[0102] A solution set generating unit, configured to generate a Pareto optimal solution set according to the multi-objective optimization model;
[0103] The solution unit is used to calculate the comprehensive score of each solution in the Pareto optimal solution set by using the superior and inferior solution distance method, and select the solution with the highest comprehensive score as the optimization control parameter for output.
[0104] Specifically, in the solution set generation unit, in each round of iteration (cycle is 10 minutes), all solutions in the population are first compared in pairs, and all non-dominated solutions (there are no other solutions that are better than it in terms of the objective) are retained. All non-dominated solutions constitute a Pareto optimal solution set, and the crowding distance or fitness sharing method is used to maintain the diversity of the Pareto optimal solution set to avoid convergence to a local area.
[0105] Specifically, the multi-objective optimization model is an optimized genetic algorithm and an optimized particle swarm algorithm.
[0106] Specifically, the dynamic optimization module combines the advantages of genetic algorithms and particle swarm optimization to enhance algorithm performance and improve solution quality through multi-objective parameter optimization. The optimization unit ensures that the algorithm can adaptively adjust according to optimization suggestions, thereby enhancing global search capabilities and convergence. The solution generation unit uses an improved optimization algorithm to generate Pareto optimal solution sets, achieving efficient multi-objective optimization. The solution unit uses the superior-inferior solution distance method to quantitatively evaluate the Pareto solution set, ensuring that the final selected optimization control parameters have the best overall performance.
[0107] Specifically, if Figure 6 As shown, the solving unit specifically includes:
[0108] A standardization subunit, configured to standardize the processing efficiency, energy consumption, and reagent consumption of each solution in the Pareto solution set to obtain a standardized index;
[0109] The entropy value calculation subunit is used to calculate the information entropy of each standardized indicator and the entropy weight of each standardized indicator;
[0110] a distance calculation subunit, configured to establish a standardized matrix based on the information entropy of each standardized indicator and the entropy weight of each standardized indicator, solve the standardized matrix to obtain a positive ideal solution and a negative ideal solution, and calculate the Euclidean distance based on the positive ideal solution and the negative ideal solution;
[0111] The comprehensive score calculation subunit is used to calculate the comprehensive score according to the Euclidean distance and select the solution with the highest comprehensive score as the optimized control parameter output.
[0112] Specifically, in the standardization subunit, the positive indicators (e.g., processing efficiency) and negative indicators (e.g., energy consumption value or agent consumption value) in each solution are standardized to obtain standardized indicators. The standardization formula is as follows:
[0113] Positive indicators:
[0114] Negative indicators:
[0115] The larger the positive indicators are after standardization, the better; the smaller the negative indicators are after standardization, the better.
[0116] Specifically, in the entropy value calculation subunit, for each indicator j, the information entropy of the indicator j is first calculated, and then the entropy weight is calculated based on the information entropy. The information entropy E ij The calculation formula is as follows:
[0117]
[0118] Where m is the number of samples, p ij is the normalized value of sample i on index j.
[0119] The entropy weight W j The calculation formula is as follows:
[0120]
[0121] Specifically, in the distance calculation subunit, the normalized matrix V ij =W j *x * ij , the positive ideal solution is V j + , the negative ideal solution is V j - , the calculation formula of the Euclidean distance is as follows:
[0122] Distance to the positive ideal solution:
[0123] Distance to the negative ideal solution:
[0124] Specifically, the calculation formula of the comprehensive score is as follows:
[0125]
[0126] Where C i It represents the comprehensive score. The closer the comprehensive score is to 1, the better the solution is.
[0127] Specifically, in the control module, the grid machine operating frequency satisfies the following formula:
[0128]
[0129] Among them, f is the operating frequency of the grid machine, f min is the minimum value of the grid machine operating frequency, f max is the maximum value of the grid machine operating frequency, COD pred is the predicted COD concentration, that is, the chemical oxygen demand predicted based on the model or measurement data, COD th is the COD threshold, which is the reference value used to normalize the COD impact.
[0130] The sludge discharge cycle of the primary sedimentation tank satisfies the following formula:
[0131]
[0132] T is the sludge discharge cycle of the primary sedimentation tank, T min is the minimum value of the mud discharge cycle, T max is the maximum value of the sludge discharge cycle, COD pred is the predicted COD concentration, that is, the chemical oxygen demand predicted based on the model or measurement data, CODmax is the maximum COD value, which is the reference value used to normalize the COD impact.
[0133] An adaptive control model based on the predicted value of influent COD is established, and the operating parameters of key equipment in the pretreatment unit are dynamically adjusted through a nonlinear mapping method.
[0134] The PID control model is as follows:
[0135] The control error is: e(t) = target dissolved oxygen - actual dissolved oxygen;
[0136] The control output is: u(t) = Kp*e(t) + Ki*∫e(t)dt + Kd*de(t) / dt;
[0137] The parameters are configured as a proportional coefficient Kp of 0.8, an integral time Ti of 2 minutes, a differential time Td of 0.5 minutes, Ki is the integral gain, and Kd is the differential gain. Using the classic incremental PID control algorithm, the aeration tube valve opening and carbon source dosage intensity are precisely adjusted.
[0138] The carbon source addition control model is as follows:
[0139] The pulse frequency of the carbon source pump satisfies the following formula:
[0140]
[0141] Where, f is the pulse frequency of the carbon source pump, f min is the minimum value of the carbon source pump pulse frequency, f max is the maximum value of the carbon source pump pulse frequency, COD act is the actual COD concentration, that is, the currently measured chemical oxygen demand, COD target is the target COD concentration, that is, the chemical oxygen demand expected to be achieved, COD th is the COD threshold, which is the maximum allowable deviation value used for normalization error.
[0142] Through the carbon source addition control model and the adaptive control strategy based on COD deviation, precise regulation of carbon source addition can be achieved.
[0143] Specifically, the control module further includes a control unit based on fuzzy logic, whose control rule base takes the effluent ammonia nitrogen concentration as an input variable, and takes the ultraviolet disinfection intensity and flocculant addition acceleration rate as output variables.
[0144] An example of fuzzy rules is as follows: if the ammonia nitrogen concentration is low and the ultraviolet intensity is low, the flocculant addition is slow; if the ammonia nitrogen concentration is high and the ultraviolet intensity is high, the flocculant addition is accelerated.
[0145] Specifically, the control module also includes an ultraviolet disinfection intensity control model as follows:
[0146]
[0147] Among them, P is the ultraviolet intensity, P min is the minimum value of UV intensity (e.g. 30), P max is the maximum value of UV intensity (e.g. 100), N act is the actual ammonia nitrogen concentration, that is, the ammonia nitrogen content of the water body currently measured, N target is the target ammonia nitrogen concentration, that is, the ammonia nitrogen concentration expected to be achieved, N th is the ammonia nitrogen threshold, i.e., the maximum allowable deviation value used for normalization error. The above nonlinear mapping based on ammonia nitrogen concentration deviation is conducive to dynamically adjusting the working intensity of the UV disinfection system.
[0148] Specifically, the control module also includes the following flocculant addition control model:
[0149] Flocculant dosing rate, R = f(effluent ammonia nitrogen concentration, suspended solids concentration, water quality indicators). R represents the flocculant dosing rate, which refers to the amount of flocculant added per unit time or flow rate (e.g., kg / h or mg / L). f() represents a functional relationship, indicating that R is determined by the effluent ammonia nitrogen concentration, suspended solids concentration, and other comprehensive water quality indicators. This function can be an empirical formula, regression model, neural network model, or fuzzy logic model to describe the dynamic relationship between water quality changes and dosing requirements.
[0150] By comprehensively considering the complexity of water quality, it is beneficial to accurately control the addition of flocculants.
[0151] Specifically, the control module also includes the following edge node monitoring model:
[0152] Monitoring indicators = {equipment operating status, control parameters, execution error, system performance indicators}.
[0153] Specifically, in a wastewater treatment control system based on an intelligent optimization algorithm, the aforementioned module is deployed on a server to perform edge-cloud collaborative optimization and model updates. Every 15 minutes, edge nodes encrypt and upload local optimization data (including decision variables, actual treatment results, and energy consumption data) to the cloud. After the cloud aggregates data from multiple plant sites, a federated learning framework is used to update the global optimization model. While ensuring data privacy, water quality characteristics from different regions are integrated through horizontal federated learning.
[0154] Reinforcement learning (e.g., the DQN algorithm) is used to discover optimal control strategy patterns across plant sites. Updated model parameters (e.g., weight matrix, fuzzy rule base) are distributed to edge nodes every morning, enabling global experience sharing and continuous improvement of local model performance. By aggregating data from multiple plant sites (e.g., high COD data from Plant A, low temperature data from Plant B), a globally shared optimization model is trained. Its weight matrix reflects the common patterns across different water quality, environmental, and equipment conditions. The output is a generalizable feature extractor (e.g., hidden layer weights in a long-short-term memory network model), enhancing the model's adaptability to regional water quality fluctuations. By simulating the interaction of control strategies across different plant sites, optimal control strategy patterns across plant sites are discovered. For example, under conditions of "high ammonia nitrogen and low pH," increasing aeration volume over carbon source addition is prioritized; and under conditions of "high ammonia nitrogen and low pH," the decision threshold for automatically switching to backup equipment is established when blower efficiency declines. The output is a Q-value table (state-action value function) that guides edge nodes to respond quickly under similar operating conditions. Within the federated learning framework, each edge node uploads local model parameters (e.g., gradient information) to the cloud. The cloud uses a federated averaging algorithm to average the weight matrices of all nodes (weights are determined by the data volume of each node) to generate a global unified weight matrix. For example, if node A contributes 60% and node B contributes 40%, the global weight = 0.6 × A's weight + 0.4 × B's weight.
[0155] Specifically, a sewage treatment control system based on an intelligent optimization algorithm also includes a multi-level fault tolerance mechanism as follows:
[0156] A Kalman filter is used to estimate the true value of the sensor. When the residual exceeds the threshold for three consecutive times (for example, the COD deviation is greater than 20 mg / L), it automatically switches to soft measurement mode (based on LSTM prediction value);
[0157] If no feasible solution is found after two consecutive rounds of optimization, the case-based reasoning (CBR) emergency strategy library is activated to match the optimal control parameters of similar historical operating conditions (Euclidean distance less than 0.15);
[0158] When a key device (such as a blower) stops working, the topology reconstruction algorithm is immediately triggered to reallocate aeration tasks to the backup device group and adjust the treatment process priority through dynamic planning.
[0159] Specifically, the emergency strategy library based on case reasoning refers to the formation of a knowledge base containing different water quality conditions, operating parameters and optimization results by constructing and storing a large number of historical operating cases in the sewage treatment control system. When the system fails to find a feasible solution after two consecutive rounds of optimization, the emergency strategy library based on case reasoning will automatically start. First, the similarity between the current operating parameters (such as water quality characteristics, load fluctuations, and equipment status) and the historical cases is calculated using the Euclidean distance calculation method. When the distance is less than the set threshold (such as 0.15), it is considered that a historical condition with high similarity is found. The system then extracts the verified optimal control parameters (such as aeration volume, recirculation ratio, carbon source dosage, etc.) from these matching cases and quickly applies them to the current control as an emergency regulation plan. This method can guide current decisions through past successful experiences in the case of model failure or complex scenarios, enhance the robustness and emergency response capabilities of the system, and ensure the continuous and stable operation of the treatment process.
[0160] Example 2
[0161] like Figure 7 As shown, a sewage and wastewater treatment control method based on an intelligent optimization algorithm includes the following steps:
[0162] S10: Obtaining original water quality data, and preprocessing the original water quality data to obtain a water quality feature matrix;
[0163] S20: Inputting the water quality feature matrix into the trained water quality dynamic prediction model to obtain a water quality prediction result;
[0164] S30: Processing the water quality prediction result using a multi-objective optimization algorithm to obtain control parameters;
[0165] S40: Obtaining sewage and wastewater treatment data after operation according to the control parameters, and calculating the water load fluctuation rate, the confidence level of the water quality dynamic prediction model, and the equipment operating status based on the sewage and wastewater treatment data, inputting the water load fluctuation rate, the confidence level of the water quality dynamic prediction model, and the equipment operating status into an adaptive fuzzy network to obtain a multi-objective parameter optimization recommendation;
[0166] S50: Optimizing the parameters in the multi-objective optimization algorithm according to the multi-objective parameter optimization suggestion to obtain a multi-objective optimization model, inputting the water quality prediction result into the multi-objective optimization model to obtain optimized control parameters;
[0167] S60: Controlling wastewater treatment according to the optimized control parameters.
[0168] Specifically, the step S10 includes the following steps:
[0169] S11: Obtaining raw water quality data;
[0170] S12: Processing the original water quality data using a sliding window mean filtering method, an interpolation method, and a minimum-maximum normalization method to obtain processed water quality data;
[0171] S13: using sampling time as matrix rows and sensor type as matrix columns, converting the processed water quality data into a water quality feature matrix;
[0172] S14: Using a cross-validation method, verify the integrity of the water quality characteristic matrix. If the verification result shows that the integrity is met, output the water quality characteristic matrix.
[0173] Specifically, the step S20 includes the following steps:
[0174] S21: Obtain historical water quality data;
[0175] S22: Constructing a long short-term memory network model;
[0176] S23: Inputting the historical water quality data into the long short-term memory network model for training to obtain a trained water quality dynamic prediction model;
[0177] S24: Inputting the water quality feature matrix into the trained water quality dynamic prediction model to obtain a water quality prediction result.
[0178] Specifically, the long short-term memory network model includes an input layer, a hidden layer, an attention mechanism layer and an output layer. The input layer is used to receive historical water quality data after feature extraction. The hidden layer includes a three-layer long short-term memory network with 64, 32 and 16 neurons respectively. The attention mechanism layer is used to enhance the sensitivity to important data in historical water quality parameters. The output layer outputs the trend of water quality data changes in the future. Preferably, the future is the next two hours, and the time resolution of the output layer is 15 minutes. The long short-term memory network model selects an adaptive moment estimation optimizer with a learning rate of 0.001, a batch size of 32, and a loss function using mean square error. Overfitting is prevented by setting an L2 regularization term. An early stopping mechanism is provided during the training process. When the patience value is 10, the training is stopped.
[0179] Specifically, the output layer is equipped with a probability distribution mechanism, and the water quality prediction results are presented in the form of a probability distribution. This is achieved through the Monte Carlo method, which randomly discards some neurons during the inference phase and runs the prediction distribution multiple times to quantify the uncertainty of the prediction results. The water quality prediction results include the prediction mean, prediction variance, and confidence interval (typically 95%).
[0180] Specifically, the step S30 includes the following steps:
[0181] S31: establishing a multi-objective optimization function with the goals of maximizing treatment efficiency, minimizing energy consumption, and minimizing chemical consumption according to the water quality prediction result;
[0182] S32: Set decision variables and constraints;
[0183] S33: generating an initial population according to the decision variables and the constraint conditions, and generating an elite population using a genetic algorithm based on the initial population;
[0184] S34: establishing a fitness function according to the multi-objective optimization function, calculating the fitness corresponding to each individual in the elite population according to the fitness function, and selecting individuals whose fitness is greater than an individual threshold as elite individuals;
[0185] S35: Using the decision variables corresponding to the elite individuals as the initial positions of the particles to obtain an initial particle swarm, using the particle swarm optimization algorithm to obtain an optimal solution based on the initial particle swarm, and outputting the decision variables corresponding to the optimal solution as control parameters.
[0186] Specifically, in step S50, the following steps are included:
[0187] S51: Optimizing the genetic algorithm and the particle swarm algorithm according to the multi-objective parameter optimization suggestion to obtain a multi-objective optimization model;
[0188] S52: Generate a Pareto optimal solution set according to the multi-objective optimization model;
[0189] S53: The superior-inferior solution distance method is used to calculate the comprehensive score of each solution in the Pareto optimal solution set, and the solution with the highest comprehensive score is selected as the output of the optimized control parameters.
[0190] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0191] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned sewage and wastewater treatment control methods based on the intelligent optimization algorithm.
[0192] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. Of course, there are other ways of readable storage media, such as quantum memory, graphene memory, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0193] The present invention also provides an electronic device. The electronic device in an embodiment of the present invention includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement a wastewater treatment control method based on an intelligent optimization algorithm provided by the present invention.
[0194] Reference below Figure 8 , which shows a schematic structural diagram of a computer system 800 of an electronic device suitable for implementing an embodiment of the present invention. Figure 8 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0195] like Figure 8As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage unit 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the computer system 800 are also stored in the RAM 803. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0196] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, and the like; an output section 807 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 808 including a hard disk; and a communication section 809 including a network interface card such as a LAN card or a modem. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 810 as needed, so that computer programs read therefrom can be installed in the storage section 808 as needed.
[0197] In particular, according to embodiments disclosed herein, the processes described in the main step diagrams above can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the methods shown in the main step diagrams. In the above embodiments, the computer program can be downloaded and installed from a network via the communication section 809 and / or installed from removable media 811. When the computer program is executed by the central processing unit 801, the above-described functions defined in the system of the present invention are performed.
[0198] It should be noted that the computer-readable medium described in the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical cable, RF, or any suitable combination thereof.
[0199] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0200] The units involved in the embodiments of the present invention may be implemented in software or hardware. The units described may also be provided in a processor. For example, a processor may include a pre-response unit, a receiving unit, and a requesting unit.
[0201] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A sewage and wastewater treatment control system based on intelligent optimization algorithm, characterized in that: include: A data acquisition module is used to obtain raw water quality data and pre-process the raw water quality data to obtain a water quality characteristic matrix; A prediction module, configured to input the water quality characteristic matrix into a trained water quality dynamic prediction model to obtain a water quality prediction result; A multi-objective optimization module, configured to process the water quality prediction results using a multi-objective optimization algorithm to obtain control parameters; a parameter optimization module for obtaining sewage and wastewater treatment data after operation according to the control parameters, and calculating the water load fluctuation rate, the confidence level of the water quality dynamic prediction model, and the equipment operating status based on the sewage and wastewater treatment data; inputting the water load fluctuation rate, the confidence level of the water quality dynamic prediction model, and the equipment operating status into an adaptive fuzzy network to obtain multi-objective parameter optimization recommendations; a dynamic optimization module, configured to optimize the parameters in the multi-objective optimization algorithm according to the multi-objective parameter optimization suggestion to obtain a multi-objective optimization model, and input the water quality prediction result into the multi-objective optimization model to obtain optimized control parameters; A control module is used to control the sewage and wastewater treatment according to the optimized control parameters.
2. The sewage and wastewater treatment control system based on the intelligent optimization algorithm according to claim 1 is characterized in that: The data acquisition module specifically includes: The sensor unit is installed in the sewage and wastewater treatment plant to obtain raw water quality data; an original pre-processing unit, configured to process the original water quality data using a sliding window mean filtering method, an interpolation method, and a minimum-maximum normalization method to obtain processed water quality data; a matrix construction unit, configured to convert the processed water quality data into a water quality feature matrix using sampling time as matrix rows and sensor type as matrix columns; The verification unit is used to verify the integrity of the water quality characteristic matrix using a cross-validation method, and output the water quality characteristic matrix if the verification result satisfies the integrity.
3. The sewage and wastewater treatment control system based on intelligent optimization algorithm according to claim 1 is characterized in that: The prediction module specifically includes: A historical data acquisition unit, used for acquiring historical water quality data; Model building unit, used to build long short-term memory network model; A training unit, configured to input the historical water quality data into the long short-term memory network model for training to obtain a trained water quality dynamic prediction model; The prediction unit is used to input the water quality feature matrix into the trained water quality dynamic prediction model to obtain a water quality prediction result.
4. The sewage and wastewater treatment control system based on intelligent optimization algorithm according to claim 1 is characterized in that: The multi-objective optimization module specifically includes: A multi-objective optimization function establishment unit is used to establish a multi-objective optimization function with the objectives of maximizing treatment efficiency, minimizing energy consumption, and minimizing reagent consumption according to the water quality prediction result; Constraint establishment unit, used to set decision variables and constraints; A genetic unit, configured to generate an initial population according to the decision variables and the constraint conditions, and to generate an elite population using a genetic algorithm based on the initial population; a screening unit, configured to establish a fitness function according to the multi-objective optimization function, calculate the fitness corresponding to each individual in the elite population according to the fitness function, and select individuals whose fitness is greater than an individual threshold as elite individuals; The particle swarm unit is used to use the decision variables corresponding to the elite individuals as the initial positions of the particles to obtain an initial particle swarm, use the particle swarm optimization algorithm to obtain the optimal solution based on the initial particle swarm, and output the decision variables corresponding to the optimal solution as control parameters.
5. The sewage and wastewater treatment control system based on intelligent optimization algorithm according to claim 4 is characterized in that: The multi-objective parameter optimization suggestions include: When the water load fluctuation rate is greater than a preset fluctuation rate threshold, the inertia weight of the particle swarm optimization algorithm is a preset weight value; when the water load fluctuation rate is less than or equal to the preset fluctuation rate threshold, the inertia weight is proportional to the current number of iterations of the particle swarm optimization algorithm; When the confidence of the water quality dynamic prediction model is less than a preset confidence threshold, the mutation rate of the genetic algorithm is a first value; when the confidence of the water quality dynamic prediction model is greater than or equal to the preset confidence threshold, the mutation rate of the genetic algorithm is a second value, and the second value is less than the first value.
6. The sewage and wastewater treatment control system based on intelligent optimization algorithm according to claim 4 is characterized in that: The decision variables include aeration volume, carbon source input volume, sludge return ratio and mixed liquor return ratio, and the constraints include ammonia nitrogen constraint, dissolved oxygen constraint and chemical oxygen demand constraint.
7. The sewage and wastewater treatment control system based on intelligent optimization algorithm according to claim 4 is characterized in that: The dynamic optimization module specifically includes: An optimization unit, configured to optimize the genetic algorithm and the particle swarm algorithm according to the multi-objective parameter optimization suggestion to obtain a multi-objective optimization model; A solution set generating unit, configured to generate a Pareto optimal solution set according to the multi-objective optimization model; The solution unit is used to calculate the comprehensive score of each solution in the Pareto optimal solution set by using the superior and inferior solution distance method, and select the solution with the highest comprehensive score as the optimization control parameter for output.
8. The sewage and wastewater treatment control system based on intelligent optimization algorithm according to claim 7 is characterized in that: The solution unit specifically includes: A standardization subunit, configured to standardize the processing efficiency, energy consumption, and reagent consumption of each solution in the Pareto solution set to obtain a standardized index; An entropy value calculation subunit, configured to calculate the information entropy of each of the standardized indicators and the entropy weight of each of the standardized indicators; a distance calculation subunit, configured to establish a standardized matrix based on the information entropy of each standardized indicator and the entropy weight of each standardized indicator, solve the standardized matrix to obtain a positive ideal solution and a negative ideal solution, and calculate the Euclidean distance based on the positive ideal solution and the negative ideal solution; The comprehensive score calculation subunit is used to calculate the comprehensive score according to the Euclidean distance, and select the solution with the highest comprehensive score as the optimization control parameter for output.
9. The sewage and wastewater treatment control system based on intelligent optimization algorithm according to claim 3 is characterized in that: The prediction module also includes a dynamic incremental unit, which is used to obtain cross-regional water quality historical data, perform incremental training on the trained water quality dynamic model based on the cross-regional water quality historical data, and update the trained water quality dynamic model.
10. A sewage and wastewater treatment control method based on intelligent optimization algorithm, characterized in that: The following steps are involved: S10: Obtaining original water quality data, and preprocessing the original water quality data to obtain a water quality feature matrix; S20: Inputting the water quality feature matrix into the trained water quality dynamic prediction model to obtain a water quality prediction result; S30: Processing the water quality prediction result using a multi-objective optimization algorithm to obtain control parameters; S40: Obtaining sewage and wastewater treatment data after operation according to the control parameters, and calculating the water load fluctuation rate, the confidence level of the water quality dynamic prediction model, and the equipment operating status based on the sewage and wastewater treatment data, inputting the water load fluctuation rate, the confidence level of the water quality dynamic prediction model, and the equipment operating status into an adaptive fuzzy network to obtain a multi-objective parameter optimization recommendation; S50: Optimizing the parameters in the multi-objective optimization algorithm according to the multi-objective parameter optimization suggestion to obtain a multi-objective optimization model, inputting the water quality prediction result into the multi-objective optimization model to obtain optimized control parameters; S60: Controlling wastewater treatment according to the optimized control parameters.
Citation Information
Cited By
Intelligent regulation and control method and system for sewage treatment and program product
CN120781306A
Sewage treatment distributed control system based on PLC
CN120831932A
Neural network-based wastewater denitrification method and device
CN120864681A
Sewage treatment method and system based on deep learning
CN121030476A
Pretreatment method for printing wastewater in carton packaging
CN121032484A