Intelligent control method for pretreatment of mixed wastewater

By collecting and analyzing the flow rate and water quality data of multiple wastewater streams, and using a rolling optimization controller to generate collaborative setpoints, the problem of water quality control under mixed wastewater conditions was solved, and the stability and accuracy of the wastewater pretreatment process were improved.

CN123047413APending Publication Date: 2026-11-06BEIJING SHANNUO SHUIYUAN ENVIRONMENTAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611341551.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

The problems include the difficulty in synergistically constraining the control quantities of oil removal, flocculation sedimentation and high-efficiency activated carbon filtration processes under mixed wastewater conditions, as well as the inability to separate and correct model prediction biases and actuator response biases.

Method used

By collecting the influent flow rate and water quality of each stream, a spatiotemporal sequence of mixed operating conditions is formed. Based on the spatiotemporal sequence, the source ratio and pollution load trajectory are identified. The rolling optimization controller generates coordinated setpoints for oil removal, flocculation sedimentation and high-efficiency activated carbon filtration processes. These setpoints are then converted into control commands for the actuators by the execution control module. The feedback coordination module corrects the pretreated effluent target, ensuring control accuracy and stability.

Benefits of technology

It improves the stability and anti-interference ability of multi-stream wastewater mixing, reduces equipment failure misjudgment, enhances adaptability to toxicity inhibition effect, and improves the collaborative control accuracy of the pretreatment process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123047413A_ABST
    Figure CN123047413A_ABST
Patent Text Reader

Abstract

This invention relates to the field of industrial wastewater pretreatment process control, and provides an intelligent control method for pretreatment under mixed wastewater conditions. The method collects influent flow rates and water quality data from multiple locations in the equalization tank to form a spatiotemporal sequence of the mixed conditions. It identifies the source proportions and predicts the pollution load trajectory. It uses water temperature and conductivity to form a density stratification gradient to correct and predict hydraulic delays. It continuously calculates the coordinated setpoints for oil removal, flocculation sedimentation, and high-efficiency activated carbon filtration units. Based on the proportion of phenol and cyanide wastewater sources, it reduces the load that the biochemical treatment section can receive. The execution response, pretreated effluent, and subsequent treatment section loads are used to correct the closed-loop model and effluent target.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial wastewater pretreatment process control, specifically to an intelligent control method for pretreatment of mixed wastewater streams. Background Technology

[0002] Petrochemical production processes generate multiple streams of wastewater with varying sources, flow rates, and pollutant compositions. Oily wastewater carries free oil, dispersed oil, and suspended solids; phenol and cyanide wastewater contains components that inhibit subsequent biochemical processes; saline wastewater causes changes in conductivity; and wastewater with high organic loads causes a rapid increase in chemical oxygen demand (COD). After these multiple wastewater streams converge into the equalization tank via a pipe network, their arrival time, duration, and mixing ratio may change. Furthermore, water quality gradients distributed along the flow direction and vertically can form within the equalization tank. Density flows formed by the settling of high-salinity or low-temperature water may rapidly penetrate along the tank bottom, resulting in an actual propagation delay at the pollution front shorter than the hydraulic delay obtained under uniform mixing conditions.

[0003] Industrial wastewater pretreatment typically includes oil removal, coagulation or flocculation sedimentation, and filtration. Fixed dosages, fixed agitation intensities, and fixed backwash cycles cannot be adjusted synchronously with changes in the source proportions. When feedback is based solely on pretreated effluent, the controller experiences hydraulic propagation delays before detecting deviations. Simply increasing the number of water quality sensors does not automatically yield executable controllable quantities; monitoring data needs to be organized into state information reflecting source proportions, spatial migration, and density stratification, and integrated into the prediction, constraint, and feedback chain.

[0004] Existing intelligent dosing methods can predict chemical requirements using historical water quality data and solve for future control quantities using predictive model control. However, chemical dosing is only one execution dimension in the pretreatment of multiple streams of petrochemical wastewater. Changes in oil load affect the skimming mechanism, changes in suspended solids and colloid load affect mixing and flocculation, and changes in filtration differential pressure and adsorption load affect the high-efficiency activated carbon filter unit. When slippage occurs in the skimming mechanism, the feedback of the actuator to maintain the rotation speed may mask abnormal mechanical load. Continuing to increase the speed will increase wear, and the escaped oil load may also cause blockage of the activated carbon micropores.

[0005] An increase in the proportion of phenol and cyanide wastewater will alter the acceptable load of the biological treatment section, and a fixed chemical oxygen demand (COD) limit cannot represent the nonlinear inhibition caused by toxic components. If oil removal, flocculation and sedimentation, filtration, and subsequent treatment sections are adjusted separately, the changes in upstream actions and downstream loads may not be time-matched. Water quality change predictions are also affected by model bias, metering pump lag, agitator motor speed limits, level valve jamming, or backwash mechanism switching failures. When updating the algorithm only using effluent deviations, model errors and execution errors are easily mixed. Summary of the Invention

[0006] The purpose of this invention is to provide an intelligent control method for pretreatment of mixed wastewater flows, which solves the technical problems of the difficulty in synergistically constraining the control quantities of oil removal, flocculation sedimentation and high-efficiency activated carbon filtration processes under mixed wastewater conditions, as well as the inability to separate and correct model prediction deviations and actuator response deviations.

[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0008] Intelligent control methods for pretreatment of mixed wastewater flows include:

[0009] Collect the influent flow rate of each stream, the influent water quality of each stream, and the mixed water quality at multiple locations in the equalization tank, and form a spatiotemporal sequence of mixed operating conditions according to the collection location and collection time;

[0010] Based on the spatiotemporal sequence of mixed operating conditions, the source proportion of each influent stream is identified, and the pollution load trajectory of the pretreatment inlet is predicted by combining the source proportion and the spatiotemporal sequence of mixed operating conditions.

[0011] The pollution load trajectory and the operating status of the multi-stage pretreatment equipment are input into the rolling optimization controller to generate coordinated setpoints for the oil removal, flocculation sedimentation and high-efficiency activated carbon filtration processes.

[0012] The collaborative setpoints are converted into actuator control commands, and the actuator response status and pre-treated effluent indicators are collected.

[0013] Based on the actuator response status, pre-treated effluent indicators, and subsequent treatment section load, the rolling optimization controller's status parameters and effluent target are adjusted until both the pre-treated effluent deviation and the actuator response deviation fall within the corresponding allowable range.

[0014] As a preferred technical solution of the present invention, the rate of change and cross-location gradient of each water quality index within adjacent sampling windows are calculated. When the rate of change or cross-location gradient crosses the corresponding trigger boundary, the sampling interval at the corresponding location is shortened and an abnormal fluctuation indicator is generated. When the rate of change and cross-location gradient return to the corresponding recovery boundary and continue to reach the recovery time, the normal sampling interval is restored.

[0015] As a preferred technical solution of the present invention, the identification of the source ratio includes forming an initial value of the source ratio based on the flow rate of each influent stream, establishing a material balance residual based on the conductivity and chemical oxygen demand of each influent stream and the pretreatment inlet, determining the source ratio that makes the material balance residual satisfy the convergence condition, and using the direction of pH change and cross-location gradient to verify the consistency of the source ratio.

[0016] As a preferred technical solution of the present invention, the water quality change prediction model receives the spatiotemporal sequence of mixed operating conditions, the source ratio, the historical status of the actuator and the historical indicators of the pretreated effluent, and outputs the pollution load trajectory of chemical oxygen demand, turbidity and pH in the prediction time domain and the corresponding confidence interval; it uses the newly obtained measured value of the pretreatment inlet and the corresponding predicted value to form the prediction residual, and updates the water quality change prediction model based on the prediction residual.

[0017] As a preferred technical solution of the present invention, when the width of the prediction confidence interval exceeds the confidence boundary, the predicted value exceeds the equipment safety boundary, or the abnormal fluctuation indicator formed by the change rate of water quality index or the cross-location gradient exceeds the corresponding trigger boundary continues to exist, the safe operation mode is entered. The safe operation mode increases the weight of the effluent deviation in the rolling optimization target, limits the change range of the cooperative set value in adjacent control cycles, and exits the safe operation mode after the prediction residual, the pre-treated effluent deviation and the actuator response deviation all return to the corresponding allowable range.

[0018] As a preferred technical solution of the present invention, the rolling optimization controller uses the pollution load trajectory and source ratio as external disturbances, the actuator response state as the equipment state, and the pre-treated effluent target, actuator capacity and adjacent control cycle change range as constraints to jointly obtain the reagent dosing setting value, mixing and stirring setting value, reaction residence time setting value, oil skimming setting value and filter backwashing setting value, and only executes the cooperative setting value corresponding to the current control cycle.

[0019] As a preferred technical solution of the present invention, the response status of the actuator is obtained through the execution control module. The response status of the actuator includes the actual flow rate of the metering pump, the actual speed of the stirring motor, the actual opening degree of the liquid level valve, the actual liquid level in the reaction zone, the actual speed of the skimming mechanism, and the actual status of the backwashing mechanism. When the deviation between the collaborative set value and the response status of the actuator exceeds the execution allowable range, the continued increment of the associated execution quantity is frozen and the standby actuator or the preset safety set value is called.

[0020] As a preferred technical solution of the present invention, the feedback coordination module receives the oxidant consumption status of the advanced oxidation treatment section and the load status of the biochemical treatment section, corrects the pretreated effluent target according to the acceptable load range of the advanced oxidation treatment section and the biochemical treatment section, and uses the corrected pretreated effluent target for rolling optimization in the next control cycle.

[0021] As a preferred technical solution of the present invention, each stream of influent includes oily wastewater, phenolic cyanide wastewater, saline wastewater and high organic load wastewater generated during the petrochemical production process, and the pretreated effluent is sequentially sent to the advanced oxidation treatment section and the biochemical treatment section.

[0022] As a preferred embodiment of the present invention, before outputting the pollution load trajectory, the water quality change prediction model forms vertical stratification markers based on conductivity measurements at different depths of the same vertical cross-section. Furthermore, when forming the vertical stratification markers, it calculates the density stratification gradient using the water temperature and conductivity at the same depth in the front and middle sections of the mixing zone. The formula for calculating the density stratification gradient is as follows:

[0023] ;

[0024] In the formula, Represents density stratification gradient, subscript This is a density stratification identifier; This represents the spatial distance between the middle section and the front section of the mixing zone along the horizontal flow direction, in units of... ; This represents the difference operator; Represents the position coordinates along the horizontal water flow direction, in units of ; This represents the coefficient of thermal expansion, with units of 1000 ppm. ; This indicates the water temperature in the middle section of the mixing zone, in units of... ; This indicates the water temperature at the beginning of the mixing zone, in units of... ; This represents the salinity-density shrinkage coefficient, with units of... ; The conductivity of the middle section of the mixing region is expressed in units of... ; The conductivity of the front section of the mixing region is expressed in units of... ; Indicates the location marker in the middle section of the mixing zone; Indicates the location marker at the front of the mixing zone; This represents absolute value operations; the unit of density stratification gradient is... When the density stratification gradient exceeds the stratification threshold and the bottom pollution front moves toward the pretreatment inlet, the advection dispersion compensation term is obtained from the hydraulic tracer calibration relationship based on the density stratification gradient. The advection dispersion compensation term is used to shorten the predicted hydraulic delay of the pollution load trajectory, and the pollution load trajectory after shortening the predicted hydraulic delay is input into the rolling optimization controller.

[0025] As a preferred embodiment of the present invention, when the feedback coordination module corrects the pretreated effluent target, it multiplies the source ratio of phenol-cyanide wastewater with the predicted value of chemical oxygen demand (COD) of the pretreated effluent to form a predicted toxicity load value. The predicted toxicity load value is then used to calculate the acceptable load of the biochemical treatment section after dynamic shrinkage. The calculation formula is as follows:

[0026] ;

[0027] In the formula, This indicates the load that the biochemical treatment section can receive after dynamic shrinkage, in units of... ; Indicates dynamic adjustment of the identifier; This indicates the maximum acceptable load of the biochemical treatment section under uninhibited conditions, in units of... ; Indicates the maximum value identifier; This represents the predicted toxicity load, in units of... ; Indicates the current control cycle forecast value identifier; Represents the half-saturation constant, in units of . ; Indicates the half-saturation parameter identifier; Represents the suppression constant, in units of ; Indicates the suppression parameter identifier; and Using the same load unit, , and Using the same concentration unit; the feedback coordination module takes the receiveable load of the dynamically contracted biochemical treatment section as the upper limit of the pretreated effluent target for the next control cycle, and re-constrains the coordinated setting values ​​of oil removal, flocculation sedimentation and high-efficiency activated carbon filtration processes within the upper limit of the pretreated effluent target.

[0028] As a preferred technical solution of the present invention, the execution control module samples the three-phase current of the drive motor of the skimming mechanism according to the current sampling frequency, performs a fast Fourier transform on the sampled data after windowing, and normalizes the square of the spectrum amplitude according to the sampling frequency and the energy of the window function to obtain the power spectral density of the preset high frequency band. When the power spectral density exceeds the slippage judgment boundary and the cooperative setting value requires an increase in the skimming speed, the execution control module generates a slippage state indicator, freezes the target speed increment in the skimming setting value, and advances the backwash start time in the filter backwash setting value of the current control cycle when the backwash water availability state and downstream buffer capacity constraints are met.

[0029] This invention also discloses an intelligent control system for pretreatment of mixed wastewater streams, used to execute the intelligent control method for pretreatment of mixed wastewater streams as described above. The system includes a water quality sensing module, an edge computing module, a predictive control module, an execution control module, and a feedback coordination module. The water quality sensing module includes water quality sensors and flow sensors arranged at multiple horizontal positions and vertical depths at each inlet location and in the equalization tank. The water quality sensing module outputs measurement data with acquisition location and acquisition time to the edge computing module. The edge computing module includes an industrial controller for forming a spatiotemporal sequence of mixed wastewater streams and outputting source proportions, density stratification gradients, and pollution load trajectories. The measurement and control module receives the spatiotemporal sequence of mixed operating conditions, source ratio, density stratification gradient, and operating status of multi-stage pretreatment equipment, and outputs coordinated setpoints to the execution control module. The execution control module connects to the metering pump, stirring motor, level valve, oil skimming mechanism, oil skimming mechanism drive motor current acquisition circuit, and backwashing mechanism via a wired communication interface, and transmits the response status and slippage status indicators of the execution mechanism back to the feedback coordination module. The feedback coordination module connects to the pretreatment effluent sensor and the data interfaces of the advanced oxidation treatment section and the biochemical treatment section, and outputs the status parameter correction amount, the pretreatment effluent target correction amount, and the receivable load of the biochemical treatment section to the predictive control module.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] This invention collects the influent flow rate and water quality of each stream, as well as the mixed water quality at multiple locations in the equalization tank, forming a spatiotemporal sequence of mixed operating conditions based on the collection location and time. This allows for continuous characterization of the water quality gradient distributed along the flow direction and vertical direction within the equalization tank. Based on the spatiotemporal sequence of mixed operating conditions, this invention identifies the source proportion of each influent stream and predicts the pollution load trajectory at the pretreatment inlet by combining the source proportion and the spatiotemporal sequence of mixed operating conditions. This incorporates the flow fluctuations, component fluctuations, and mixing migration processes of wastewater from different sources into a unified disturbance description, avoiding operational confusion caused by different combinations of salinity, oil content, or inhibitory loads under similar chemical oxygen demand (COD) conditions. A rolling optimization controller receives the pollution load trajectory and the operating status of multi-stage pretreatment equipment, jointly determining the coordinated setpoints for oil removal, flocculation sedimentation, and high-efficiency activated carbon filtration processes. This ensures that reagent dosing, mixing, reaction residence time, oil skimming, and filtration backwashing actions are coordinated within the same control time domain, reducing the time mismatch between upstream actions and downstream load changes. The execution control module converts the coordinated setpoints into control commands for the actuators and collects the actuator response status and pretreated effluent indicators. Execution status feedback and effluent feedback are processed separately, reducing the probability of misjudging equipment failures as model errors. The feedback coordination module adjusts the pretreated effluent target based on the acceptable load of the advanced oxidation treatment section and the biochemical treatment section, ensuring that the pretreated control target falls within the subsequent treatment capacity range and avoiding overly conservative or aggressive approaches caused by fixed single-point limits.

[0032] This invention utilizes water temperature and conductivity to calculate density stratification gradients, correcting predicted hydraulic delays and improving response timeliness under high-salt or low-temperature density flow short-circuit conditions. It also generates toxicity load predictions based on the proportion of phenol and cyanide wastewater sources and reduces the acceptable load of the biochemical treatment section, enhancing adaptability to toxicity suppression effects. Furthermore, it identifies slippage states based on the current spectrum of the drive motor of the skimming mechanism, reducing ineffective mechanical movements and escaped oil loads, thereby comprehensively improving the stability, anti-interference capability, and collaborative control accuracy of pretreatment under mixed wastewater conditions. Attached Figure Description

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

[0034] Figure 1 This is a flowchart of the method of the present invention.

[0035] Figure 2 This is a flowchart of the adaptive sampling and abnormal fluctuation identification generation of the present invention.

[0036] Figure 3 This is a flowchart illustrating the triggering and exiting of the safe operation mode of this invention.

[0037] Figure 4 This is a flowchart illustrating the prediction of hydraulic delay using density stratification gradient correction in this invention. Detailed Implementation

[0038] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the embodiments of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0039] The following is in conjunction with the appendix Figures 1-4 The embodiments of the present invention will be described in detail below.

[0040] Example 1: In this example, the multiple influent streams include oily wastewater, phenol-cyanide wastewater, saline wastewater, and wastewater with high organic load. Each influent pipeline is equipped with a flow sensor, and measurement points for water temperature, pH, conductivity, turbidity, and chemical oxygen demand (COD) are set at locations representative of their respective sources. Similar measurement points are set in the equalization tank at the front, middle, and rear sections of the mixing zone, and at the pretreatment inlet. Dissolved oxygen, ammonia nitrogen, and total phosphorus can be used as supplementary indicators, but these do not replace flow rate, conductivity, and COD used for source proportion identification. All measurement terminals use a unified clock to record values, acquisition time, acquisition location, equipment status, and quality indicators.

[0041] The water quality sensing module acquires data at regular sampling intervals.

[0042] In some embodiments, the sampling interval is set to to The edge computing module calculates the rate of change of time for adjacent sampling windows and the cross-location gradient for adjacent locations. The rate of change of time reflects rapid fluctuations at the same location, while the cross-location gradient reflects the spatial differences in the movement of the mixing front edge regulation pool. When any key indicator crosses the trigger boundary, the edge computing module shortens the sampling interval of the associated location and generates an abnormal fluctuation indicator; after all key indicators return to the recovery boundary and continuously meet the recovery time, the edge computing module resumes the normal sampling interval. The trigger boundary is determined jointly by the historical distribution under normal operating conditions, sensor measurement errors, and the tolerance range of subsequent processing stages, without using any single percentage as a universal threshold.

[0043] Raw measurement data first undergoes physical range checks and quality label checks. Data exceeding the sensor's range, malfunctioning calibration status, or differing from redundant measurements at the same location by more than the permissible range are marked as failed data. Failed data is not directly used for source proportion identification and water quality change prediction. Short-term single-point missing data can be replaced by using valid data before and after the same location, as well as the propagation sequence of adjacent locations, to form a substitute value, while saving the substitute label; after continuous missing data reaches the fault determination time, the control system enters a safe operation mode. Filtering can only remove high-frequency components consistent with sensor noise characteristics; it cannot smooth out sudden changes in actual pollution load to normal variations.

[0044] Data that has passed quality checks is uniformly time-aligned. Different online instruments have different analysis cycles; chemical oxygen demand (COD) online monitoring instruments may have longer measurement delays than pH and conductivity sensors. The edge computing module aligns the measured values ​​to the sampling moment when the sample enters the instrument, rather than to the instrument output moment, based on the time required for the instrument to complete one measurement. Each time slice includes the influent flow rate, influent water quality, mixed water quality at each location, data quality indicators, and actuator status, thus forming a spatiotemporal sequence of mixed operating conditions.

[0045] Source proportion identification first calculates initial proportion values ​​using the influent flow rates of each stream, then corrects them using conservation indices. Conductivity is used to represent the contribution of salinity, and chemical oxygen demand (COD) is used to represent the contribution of organic load. pH is determined by hydrogen ion activity; linear material balance is not directly performed based on pH readings, but is only used for direction of change and feasibility verification. The edge computing module uses the difference between the measured value of the pretreatment inlet conservation index and the combined value of the conservation indices of each stream weighted according to the source proportion as the material balance residual. This is done when all source proportions are non-negative and the sum of the source proportions is zero. Under the constraints, the source proportion vector that minimizes the sum of squares of the weighted material balance residuals is obtained. This solution can be achieved using constrained least squares or quadratic programming methods.

[0046] The residual weights for each conservation index include a dimensional normalization factor and a data reliability factor, enabling comparison of the weighted residuals of different indices. The data reliability factor is set based on sensor calibration status, measurement uncertainty, and data missing flags. The solution terminates when the weighted residual change is below the residual convergence limit for two consecutive iterations and the change in the proportion of each source stream is below the proportion convergence limit. If the deviation between the solution result and the initial value of the flow proportion exceeds the allowable difference in the source proportion, the edge computing module checks the branch flow meters, sampling delay, and unmonitored branches, and does not directly send abnormal solution results to the rolling optimization controller.

[0047] The source proportion vector and the spatiotemporal sequence of mixed operating conditions are input into the water quality change prediction model. The water quality change prediction model can employ a recurrent neural network. The input window includes water temperature, pH, conductivity, turbidity, dissolved oxygen, and chemical oxygen demand (COD) at each location, as well as the source proportion vector, the flow rate of each stream, and the actuator status of the previous control cycle. The output is the sequence of COD, turbidity, and pH within the prediction time domain, along with confidence intervals. The confidence interval for each prediction step is determined based on the prediction residual distribution of the corresponding prediction step in the validation set and is updated as the online prediction residuals with valid quality indicators are updated. Training samples are constructed according to the actual hydraulic propagation sequence, with the input window endpoint earlier than the prediction target time to avoid leaking future measurements into the training input. The training set, validation set, and test set are separated according to continuous running segments; adjacent samples cannot be randomly split and placed into the training and test sets respectively.

[0048] The model structure, number of layers, and number of nodes of the water quality change prediction model are determined based on the amount of available data. In some embodiments, a recurrent neural network is used, with historical continuous monitoring data forming the input feature sequence; when the amount of available data is insufficient to support a complex network, a lower-dimensional state-space prediction model can be used. The state-space prediction model still receives the source proportion vector and the spatiotemporal sequence of mixed operating conditions, and outputs the same pollution load trajectory. The model selects outputs that do not change the source proportion as prediction inputs and prediction outputs as control disturbances, which is a technical dependence.

[0049] The rolling optimization controller receives the pollution load trajectory, source proportion vector, and operating status of the multi-stage pretreatment equipment. The operating status of the multi-stage pretreatment equipment includes the available flow rate range of the metering pump, the available speed range of the stirring motor, the liquid level range in the reaction zone, the available speed range of the skimming mechanism, the filtration differential pressure, and the status of the backwashing mechanism. Control variables include the reagent dosing setpoint, mixing and stirring setpoint, reaction residence time setpoint, skimming setpoint, and filtration backwashing setpoint. The rolling optimization objective can be expressed as:

[0050] ;

[0051] In the formula, This represents the target value for rolling optimization. Indicates the prediction step or control step number; Indicates the total number of prediction steps; Indicates the total number of control steps; Indicates the prediction time domain identifier; Indicates the control time domain identifier; Indicates the first Pre-treated effluent prediction vector for each prediction step; Indicates the first Preprocessed effluent target vector for each prediction step; Indicates the target identifier; Represents the weighting matrix for water discharge deviation; Indicates the first Cooperative control vector for each control step; This represents the change in the cooperative control vector between adjacent control steps; This represents the difference operator; Represents the control change weight matrix; This represents the weight matrix of drug consumption, energy consumption, and equipment operation costs; This represents the constraint relaxation penalty coefficient; Indicates the first Non-negative constraint relaxation amount for each prediction step; Indicates summation operation; superscript Represents the squaring operation; This represents the weighted square norm calculated based on the outflow deviation weight matrix; This represents the weighted square norm calculated based on the control change weight matrix; This represents the weighted square norm calculated based on the action cost weight matrix. , and Each of them contains a corresponding dimensionless normalization factor, making the three quadratic terms dimensionless. Includes and The corresponding dimensional normalization factor allows the constraint relaxation term to be added to the three quadratic terms. Each weight is determined based on the impact of effluent indicators on the load of subsequent treatment sections, unit chemical consumption, unit power consumption, and the allowable operating frequency of the equipment.

[0052] The rolling optimization controller obtains a control sequence covering the prediction time domain in each control cycle, but only issues the control vector corresponding to the current control cycle. Upon arrival of new measurements, the water quality change prediction model updates the pollution load trajectory, and the rolling optimization controller re-solves the problem based on the new equipment state. When the source proportion changes, the rolling optimization controller not only adjusts the reagent dosage but also simultaneously checks the proportion of oily wastewater sources and the filter inlet load. When the proportion of oily sources increases, the oil skimming setpoint can be increased in advance; when turbidity and colloidal load increase, the reagent and agitation setpoints can be adjusted; and when the filter inlet load and differential pressure rise, backwashing can be scheduled in advance. Each action is still limited by equipment capacity and the magnitude of changes in adjacent cycles.

[0053] The execution control module converts collaborative setpoints into field-executable signals. The reagent dosing setpoint, combined with real-time influent flow rate, is converted into the target flow rate of the metering pump; the mixing and stirring setpoint is converted into the target speed of the stirring motor; the reaction residence time setpoint is converted into the target opening degree of the level valve or the influent / outfluent flow rate setpoint through the relationship between the effective volume of the reaction zone and the flow rate; the oil skimming setpoint is converted into the target speed of the oil skimming mechanism and the scraper operating frequency; and the filter backwashing setpoint is converted into the backwashing start time, the target flow rate of the backwashing pump, and the backwashing duration. Control commands retain the generation time, target equipment, setpoint, effective time limit, and control cycle identifier.

[0054] The actuator returns its response status. The actual flow rate of the metering pump is obtained through the flow meter in the reagent pipeline; the actual speed of the stirring motor is obtained through frequency converter feedback; the actual opening degree of the level valve is obtained through valve position feedback; the actual liquid level in the reaction zone is obtained through the level sensor; the actual speed of the skimming mechanism is obtained through driver feedback; and the actual status of the backwashing mechanism is obtained through pump-valve interlock signals and filter differential pressure. When the deviation between the coordinated setpoint and the actuator response status continuously exceeds the allowable execution range, the execution control module freezes any further increments of the associated execution quantity to prevent the rolling optimization controller from continuously amplifying commands due to unimproved effluent quality, and switches to backup equipment or a safety setpoint.

[0055] The feedback coordination module receives pre-treated effluent indicators. The prediction residual is formed by subtracting the predicted value from the measured effluent value at the same target time, while the execution deviation is formed by subtracting the coordinated setpoint from the actuator response within the same control cycle. The prediction residual is used to update the water quality change prediction model or state estimate, while the execution deviation is used to correct equipment availability and select safe actions. These two types of deviations are not combined into a single error signal. The effluent deviation is used for rolling optimization weight adjustments in the next control cycle. The control system thus distinguishes between influent disturbances, model prediction deviations, and equipment execution deviations.

[0056] The operating condition knowledge base does not directly replace the rolling optimization controller. The edge computing module uses source ratio, cross-location gradient, pollution load trajectory, and equipment availability status as matching keys to select similar historical operating conditions from the operating condition knowledge base, and uses the effective control vectors of these historical operating conditions as the initial solutions for rolling optimization. The operating condition knowledge base matching can use Euclidean distance to calculate the similarity of the multi-dimensional feature vectors composed of source ratio, cross-location gradient, pollution load trajectory, and equipment availability status, selecting historical operating conditions with similarity higher than a similarity threshold as candidate initial solutions. The rolling optimization controller still checks the current effluent constraints, equipment constraints, and control change constraints. Only after the pre-processed effluent deviation, actuator response deviation, and prediction residual have entered their respective allowable ranges and continuously reached the recovery time is the current record written to the operating condition knowledge base, avoiding the use of control records that only occasionally meet standards or are not executed by the equipment as valid experience.

[0057] The safe operation mode is triggered by three entry points: the predicted confidence interval width exceeds the confidence boundary, the pollution load trajectory exceeds the equipment safety boundary, or the abnormal fluctuation indicator continues to reach the abnormal judgment duration. The confidence boundary is determined based on the historical predicted interval width of the quality indicator, the measurement uncertainty of online instruments, and the load variation range that the pretreatment equipment can withstand. After entering the safe operation mode, the rolling optimization controller increases the weight of the effluent deviation, tightens the upper limit of control quantity variation, stops writing low-confidence prediction results into the operating condition knowledge base, and shortens the sampling and control cycle. The exit condition is that the effluent deviation, execution deviation, and prediction residual have all recovered, and the sensor quality indicator is valid. When exiting, the normal settings are gradually restored to avoid step actions of pumps, motors, and valves caused by mode switching.

[0058] The water quality sensing module layout needs to cover the source end, mixing propagation section, and pretreatment inlet. Source end measurements are used to obtain the flow rate and composition baseline of each influent stream. Mixing propagation section measurements are used to determine the sequence of the pollution front's movement from the inlet location to the pretreatment inlet. Pretreatment inlet measurements are used to verify the source ratio and establish the current state of the rolling optimization controller. If there are backflow or short-flow zones within the equalization tank, the monitoring locations should be adjusted based on hydraulic tracing results, and not simply arranged at geometrically equal intervals. After a change in monitoring location, the propagation time difference between locations needs to be recalibrated, and the location version should be saved within the spatiotemporal sequence of the mixed operating conditions to prevent the water quality change prediction model from misinterpreting the layout change as a water quality change.

[0059] Water temperature, pH, conductivity, and turbidity can be measured continuously, while chemical oxygen demand (COD), ammonia nitrogen, and total phosphorus (TP) can generate low-frequency data based on the online instrument's analysis cycle. The edge computing module retains high-frequency data when using the lowest analysis frequency as a baseline. High-frequency data are retained on their respective time axes. When constructing the input window, the water quality change prediction model uses a mask and data age to represent the time elapsed since the most recent valid measurement. The longer the data age, the lower the confidence weight of the associated indicators. After the online instrument completes calibration, cleaning, or reagent replacement, the quality indicator switches from maintenance status to pending verification status, and then switches back to valid status after continuously acquiring data that meets the consistency conditions.

[0060] For situations where there are multiple branches at the inlet of the equalization tank, but some branches are temporarily shut down, the source proportion of the shut-down branches is fixed at zero. The source proportion calculation is only performed on branches with flow and valid quality identification. For emergency discharge branches without flow meters, when a conservation residual exists between the inlet and the pretreatment inlet that cannot be explained by known branches, the source proportion identification outputs an unknown source identifier. The unknown source identifier enters a safe operation mode, and the rolling optimization controller uses stricter effluent constraints and smaller control variation amplitudes until maintenance personnel identify the branch source or the conservation residual is restored. An unknown source cannot be forcibly assigned to a known branch.

[0061] Source ratio identification requires meeting identifiable conditions. If multiple influent streams are too similar in conductivity and chemical oxygen demand, the source ratio cannot be reliably distinguished based on only two conservation indicators. The edge computing module calculates the condition number of the conservation indicator matrix and uses this number as the condition state; when the condition state crosses the unstable boundary, the source ratio output includes a low-confidence flag. Oil content, characteristic ions, total organic carbon, or UV absorbance can be selected as supplementary conservation indicators based on the actual wastewater composition. These supplementary indicators must be detectable and have source differences, and corresponding sampling methods must be set. If supplementary detection conditions are not available, the concentration of characteristic pollutants is not used as a continuous online input.

[0062] The convergence condition for solving the source proportion problem includes both residual change and proportion change. The solution can be terminated when the objective function change is below the solution tolerance for two consecutive iterations, and the change in each source proportion is below the proportion tolerance. If the condition is not met even after reaching the upper limit of iterations, the most recent feasible solution and a non-convergence flag are output. The non-convergence flag reduces the confidence weight of the source proportion in the prediction model. The solver cannot output negative proportions or results where the sum of proportions deviates from one. The initial flow proportion value is used to narrow the solution range and cannot be used as a deterministic value in the event of a flow meter failure.

[0063] Before establishing a water quality change prediction model, a sample index needs to be created. Each sample consists of an input window, a prediction target window, a source proportion, equipment status, data quality identifiers, and operating condition labels. The input window covers the time required for the pollution load to propagate from the source to the pretreatment inlet, and the prediction target window covers the time required for the pretreatment equipment to complete its main response. The lengths of both types of windows are determined by hydraulic retention, instrument delay, and equipment response tests. If the input window is shorter than the propagation time, the source-end change has not yet appeared at the end of the input sequence; if the prediction target window is shorter than the equipment response time, the rolling optimization controller cannot evaluate the impact of control actions on the effluent.

[0064] The recurrent neural network (RNN) can be composed of an input mapping layer, a temporal state layer, and a multi-index output layer. The input mapping layer transforms water quality indicators, source proportions, and equipment status of different dimensions to a unified scale; the temporal state layer extracts the dependence of pollution load on time propagation; and the multi-index output layer provides the predicted sequences for chemical oxygen demand (COD), turbidity, and pH, respectively. The water quality change prediction model does not directly output the dosage of chemicals or the motor speed; instead, the dosage and motor speed are obtained by a rolling optimization controller under equipment constraints, structurally preventing the water quality change prediction model from bypassing physical execution constraints.

[0065] For example, the input window uses past continuous Data, with a time resolution of Each time step splices together the data from each monitoring location. The system inputs water quality indicators, influent flow rates, source proportions, and actuator response status. When low-frequency online instruments have not yet generated new measurements, it also inputs the data age and quality identifier. (Time-series status layer settings) Layer-long short-term memory units, set in the previous layer Each unit, set in the back layer One unit. The short-time output branch gives the future... to of Interval prediction points, mid-time output branch gives the future to of Interval prediction points. Both output branches provide predicted values ​​and confidence intervals for chemical oxygen demand, turbidity, and pH. The number of model layers and units is determined based on the amount of available data, validation error, and edge computing node capabilities.

[0066] Offline training of the model can employ an adaptive moment estimation optimization method, with the initial learning rate set to... The training loss is calculated as a weighted sum of the prediction errors of dimensionally normalized chemical oxygen demand (COD), turbidity, and pH. The weights for each item are determined based on the allowable fluctuation range of the corresponding effluent indicators. (Continuous) If the validation error does not decrease within a training epoch, training is stopped and the model version with lower validation error is reverted. The online update cycle can be set to... Each update uses newly acquired data with valid quality labels, and the update scope is limited to the multi-index output layer; the time-series state layer is updated after the accumulated samples cover the new source proportion range and are verified offline. This layered update avoids the time-series state layer forgetting the original working conditions due to a small number of mutation samples. The number of consecutive days of model training, the source proportion coverage range, and the number of abnormal working conditions are set according to the training sample coverage.

[0067] Model training employs time-sequential data partitioning. Earlier consecutive time periods are used for training, intermediate consecutive time periods for parameter selection, and later consecutive time periods for validation. For samples with sudden load changes, the training sampling weight can be increased, but samples from the validation period cannot be copied into the training set. Loss assessment statistically analyzes the error under normal operating conditions, the peak error under sudden operating conditions, the prediction phase deviation, and the confidence interval coverage. Only models with low average error but large phase deviation are unsuitable for upfront control, as control actions may occur only after the pollution load arrives.

[0068] During online application, each prediction result saves the model version, input window endpoint, prediction target time, and confidence interval. After the preprocessed inlet or outlet measured values ​​arrive, predicted values ​​are matched against the same target time, and prediction residuals are calculated. Late data can be used for offline training sample completion, but cannot be written back to real-time inputs that already exist in the past. After a model update, the old and new models receive the same input within a parallel validation window. The new model is switched to the running model only after it meets error and safety constraints. If the switch fails, the old model is retained, and the reason for the failure is recorded.

[0069] The dynamic model of the equipment used in the rolling optimization controller can be established by combining mechanistic relationships and operational data. Chemical dosing affects floc formation and has a reaction delay; stirring intensity affects chemical dispersion and floc shearing; reaction residence time is limited by both effective volume and flow rate; the response of the skimming mechanism is limited by oil layer formation and mechanical velocity; and the response of the high-efficiency activated carbon filter unit is affected by adsorption capacity, suspended solids retention, and filtration pressure difference. The equipment dynamic model must at least provide the control input, state variables, predicted effluent flow rate, and allowable range. Simply providing the equipment name without establishing the response relationship between the control variables and the effluent flow rate cannot support rolling optimization solutions.

[0070] The parameters of the equipment dynamic model can be obtained through step tests, historical operating records, or equipment design parameters. Step tests change a single actuator within the process safety range, recording changes in inlet load, actuator response status, and effluent; historical operating records exclude sensor failures and manual bypass periods; equipment design parameters are matched with effective volume, pump curves, and valve flow characteristics. In some embodiments, the control logic can also be verified in a simulation environment.

[0071] Rolling optimization constraints are categorized into effluent constraints, equipment constraints, motion constraints, and process interlock constraints. Effluent constraints stem from the pre-treated effluent target and the acceptable load of subsequent treatment sections; equipment constraints are determined by the available range of pumps, motors, valves, skimming mechanisms, and backwashing mechanisms; motion constraints limit changes between adjacent control cycles to avoid frequent start-ups and shutdowns and mechanical shocks; process interlock constraints ensure compatibility between filter path switching, chemical dosing, and flow status during backwashing. When constraints conflict, safety and effluent constraints take priority; energy consumption and chemical consumption targets can be adjusted using non-negative relaxation amounts, and the reasons for relaxation are recorded.

[0072] The rolling optimization solution is configured with feasibility termination, convergence termination, and computation time limit termination. Convergence termination occurs when a control sequence satisfying all hard constraints is obtained and the target value change during continuous iterations is below the solution tolerance; feasibility termination occurs when the target value cannot be improved but a feasible control sequence has been obtained; and computation time limit termination occurs when no feasible solution is found after the allowed computation time limit of the control cycle has been reached. The first two termination methods output the current control step setpoint, while computation time limit termination outputs the most recent safe setpoint and enters safe operation mode. The solution state is saved along with the control commands.

[0073] The dosing setting needs to be converted to a flow rate. The dosing setting, expressed as a mass concentration, is multiplied by the influent volumetric flow rate to obtain the mass of the pesticide per unit time. This mass is then converted to the metering pump volumetric flow rate based on the effective concentration and density of the pesticide solution. When the effective concentration of the pesticide solution changes, the operator inputs the new test value, and the control module updates the conversion parameters. If only the milligrams per liter value is directly mapped to the inverter frequency, changes in the influent flow rate or pesticide concentration will cause the actual dosing mass to deviate from the target.

[0074] The reaction residence time setpoint needs to be hydraulically calibrated. The effective reaction volume is calculated based on the liquid level, chamber geometry, and available area status, while the volumetric flow rate is obtained from the inlet and outlet flow meters. Dividing the effective reaction volume by the volumetric flow rate yields the current achievable residence time. If the target residence time exceeds the achievable range, the execution control module returns boundary information to the rolling optimization controller, which then coordinates the reagent and agitation setpoints. The level valve cannot solely handle residence time control in the absence of overflow and minimum liquid level interlocks.

[0075] Backwashing decisions for high-efficiency activated carbon filter units utilize filtration differential pressure, inlet turbidity, contaminant load trajectory, and the operating time since the last backwash. Filtration differential pressure reflects filtration resistance, inlet turbidity and contaminant load trajectory reflect future load, and operating time limits excessively short cycles. As activated carbon adsorption capacity decreases over time, media status needs to be generated based on influent and effluent organic indexes or on-site replacement criteria. Media failure cannot be recovered by increasing backwash intensity. Once media status is incorporated into equipment constraints, the rolling optimization controller can limit the load entering the filter unit and generate a media replacement signal.

[0076] The feedback coordination module uses bounded target corrections for the load of subsequent treatment stages. When the load of the biochemical treatment stage increases, the pretreatment chemical oxygen demand (COD) target and allowable fluctuation range can be tightened within the process design range; when the oxidant consumption in the advanced oxidation treatment stage approaches the supply limit, the organic load removal requirements of the pretreatment stage can be increased. The target correction amount is limited by the capacity of the pretreatment equipment and cannot convert all the insufficient capacity of subsequent treatment into control requirements for the pretreatment exceeding its capacity. When no feasible target is available, the feedback coordination module outputs a load mismatch flag and requests upstream flow restriction or diversion.

[0077] Each intermediate result in the data chain has a subsequent use. The mixed-condition spatiotemporal sequence is used for source proportion identification and water quality change prediction; the source proportion is used for water quality change prediction and rolling optimization disturbance description; the pollution load trajectory is used for collaborative setpoint solving and safety mode judgment; the collaborative setpoint is used for actuator control; the actuator response status is used for equipment constraint correction; the pretreated effluent is used for predicting residuals and calculating effluent deviations; and the load of subsequent treatment stages is used for effluent target correction. If any intermediate result cannot be used in subsequent stages, the implementation procedure should remove the associated calculation or add a clearly defined interface to avoid creating data branches that only collect data but do not control it.

[0078] The time consistency of the control system is maintained by the control cycle identifier. Source proportions, pollution load trajectories, coordinated setpoints, actuator response status, and effluent results all use the same control cycle identifier, and target time relationships are established based on hydraulic delay. Effluent results cannot be directly attributed to control commands issued at immediately adjacent times; instead, they should be matched to the influencing control cycle based on the equipment's dynamic model. Time matching errors will use the effects of old control actions to update new control parameters, causing feedback distortion.

[0079] Maintenance personnel can manually switch devices, but manual operation must generate a manual status indicator. The manual status indicator is entered into the device status constraints, and the rolling optimization controller will not continue to issue automatic increments to the manually taken-over actuators. After the manual operation ends, the execution control module compares the current actual state with the automatic control safety setpoint, completes a smooth takeover, and then restores automatic control. Manual time period data can be used for fault analysis but is not directly written into the operating condition knowledge base as valid samples for automatic strategies.

[0080] The control chain allows computational tasks to be distributed between edge computing nodes and industrial controllers, while the input-output relationships remain unchanged. Source proportion identification and water quality change prediction can be run on the edge computing nodes, while rolling optimization and process interlocking can be run on the industrial controllers. Edge computing node outputs must include source proportions, prediction trajectories, confidence intervals, model versions, and time stamps; industrial controller feedback must include collaborative setpoints, actuator response status, solution status, and fault flags. If any interface field is missing, the receiving end will refuse to use incomplete data and enter a safe operating mode.

[0081] Example 2: This example further illustrates the skid-mounted equipment based on Example 1. The skid-mounted pretreatment equipment consists of an oil removal unit, a flocculation and sedimentation unit, and a high-efficiency activated carbon filtration unit connected in sequence. The oil removal unit can adopt a combination structure of inclined plate oil separation and air flotation. The flocculation and sedimentation unit can include a rapid mixing zone, a slow flocculation zone, and a sedimentation zone. The high-efficiency activated carbon filtration unit includes a support layer, a filter layer, an activated carbon adsorption layer, an inlet and outlet water differential pressure sensor, and an air-water backwash pipeline.

[0082] In practice, the equipment structure is the controlled object, and the control scheme does not require a specific equipment model as a necessary condition.

[0083] The oil removal unit receives a sequence of oily wastewater source proportions. The rolling optimization controller generates the target speed and scraper operating frequency of the oil skimming mechanism based on the rise time of the oily wastewater source proportion and the processing delay of the oil removal unit.

[0084] For example, the skimming speed can be to The adjustment range is constrained by the allowable values ​​of the drive and mechanical structure. The execution control module checks the actual speed and motor current of the skimming mechanism. If the actual speed does not follow the target speed and the motor current exceeds the safety boundary, the increase in the target speed is stopped and a device fault flag is generated.

[0085] The flocculation and sedimentation unit receives predicted sequences of turbidity, chemical oxygen demand (COD), and source proportion. For example, the flocculant dosage range can be set... to The stirring speed range in the rapid mixing zone can be set to... to The stirring speed range in the slow flocculation zone can be set to... to The reaction residence time range can be set to to The rolling optimization controller combines the solutions for reagent dosage, two-stage agitation, and residence time based on equipment capacity. High reagent dosage is not fixedly tied to high agitation speed; the rolling optimization controller considers the difference between rapid dispersion and floc retention, avoiding excessive shear in the slow flocculation zone.

[0086] The residence time in a reaction cannot be obtained solely by changing the liquid level. The execution control module calculates the achievable residence time based on the effective reaction volume and real-time flow rate. If the liquid level range is insufficient to achieve the target residence time, it returns an infeasibility flag to the rolling optimization controller. The rolling optimization controller then reallocates reagent, agitation, and flow control quantities within permissible limits, and cannot continue to issue liquid level targets exceeding the effective volume of the chamber. The liquid level valve opening, actual liquid level, and real-time flow rate are used together to verify whether the residence time setpoint has been achieved.

[0087] The high-efficiency activated carbon filter unit receives predictions of turbidity in the flocculated sedimentation effluent, pollution load trajectories, and filtration differential pressure. The unit features an activated carbon adsorption layer and is capable of backwashing. When the inlet turbidity exceeds the operating boundary or the filtration differential pressure increases, the rolling optimization controller compares the effluent risk and energy consumption of three actions: continuing filtration, early backwashing, and reducing the upstream load. The backwashing action meets the constraints of minimum continuous filtration time, backwash water availability, and downstream buffer capacity, avoiding frequent backwashing due to single-point turbidity noise.

[0088] In this implementation, an industrial controller and edge computing nodes are used. The water quality sensing module is connected to the data acquisition terminal via an industrial communication bus. The edge computing nodes perform time alignment, source ratio identification, and water quality change prediction, while the industrial controller performs rolling optimization and interlock checks. When the network connection is interrupted, the industrial controller retains the most recently verified safety setpoint and performs amplitude limiting feedback based on the on-site effluent sensors. After the connection is restored, the edge computing nodes reconstruct the mixed operating condition spatiotemporal sequence from the cached data during the interruption, complete the state consistency check, and then resume predictive control.

[0089] This embodiment also includes fault diagnosis for sensors and actuators. Sensor fault diagnosis sequentially checks physical range, calibration status, rate of change, propagation sequence of adjacent locations, and consistency of redundant measurements. Actuator fault diagnosis compares commands, driver feedback, and independent process quantities. For example, an increase in a metering pump command without a change in the reagent flow meter is identified as a dosing link fault; a change in the level valve opening without a response in either the level or flow rate is identified as a valve or pipeline fault. The fault diagnosis output is incorporated into the equipment status constraints and is not used as an independent alarm function unrelated to water quality.

[0090] Example 3: This example uses the same source proportion identification, pollution load prediction, rolling optimization, execution feedback, and effluent feedback chain as Example 1. The difference lies in its application to the pretreatment of integrated petrochemical wastewater and its coordination with subsequent advanced oxidation and biochemical treatment processes. Flow rates and representative water quality measurements are set for oily wastewater, phenol-cyanide wastewater, saline wastewater, and wastewater with high organic loads, respectively. For toxic components that cannot be directly and continuously measured by general online sensors, alternative indicators verified by source discharge plans, branch flow rates, and periodic laboratory analysis results are used for model validation. When online specific detection conditions are not available, the concentration of toxic components is not used as a real-time measurement.

[0091] The feedback coordination module receives oxidant consumption status, reactor available load, and inlet water quality from the advanced oxidation treatment section, and dissolved oxygen, sludge concentration, microbial activity characterization values, and allowable organic load range from the biological treatment section. Instead of directly transmitting every instantaneous fluctuation from subsequent treatment sections back to the pretreatment controller, the module adjusts the pretreatment effluent target after the load status has been maintained for a specified duration. When subsequent treatment sections approach their load limits, the pretreatment effluent target is tightened; when subsequent treatment sections have capacity, the pretreatment effluent target can be relaxed within discharge or process safety constraints to reduce unnecessary chemical and electrical consumption.

[0092] For scenarios with an increasing proportion of saline wastewater, source proportion identification utilizes changes in conductivity to identify the contribution of salinity. The water quality change prediction model outputs both the salinity source proportion and the chemical oxygen demand (COD) trajectory, and the rolling optimization controller avoids increasing flocculant solely based on COD. For scenarios with an increasing proportion of oily wastewater, the oily wastewater source proportion sequence drives the oil skimming mechanism to operate in advance, while simultaneously transmitting the expected effluent load of the oil removal unit to the flocculation sedimentation and high-efficiency activated carbon filtration control. For scenarios with an increasing proportion of phenol and cyanide wastewater, when online specific detection is lacking, the control system uses validated source discharge plans, branch flow rates, and periodic analysis results to constitute a quality indicator; low-confidence data triggers a safe operating mode instead of being used as a definitive concentration.

[0093] The collaborative control records include source proportions, pollution load trajectories, setpoints for each pretreatment unit, actuator responses, pretreatment effluent, loads of the advanced oxidation treatment section, and loads of the biochemical treatment section. These records characterize the input basis and downstream results of each control action and are used to verify whether the replacement equipment still executes the same data dependencies and feedback relationships when a controller or actuator is replaced.

[0094] Example 4: Building upon Example 3, this example provides a method for physical state correction and cross-section control interlocking to address density stratification short-flow caused by high salt load, nonlinear biochemical inhibition caused by phenol-cyanide load, and slippage of the skimming mechanism caused by high oil load. The control system does not employ the fixed assumption of uniform mixing throughout the entire pool. Instead, it extracts the heterogeneous state of the fluid from the measurement data of the equalization tank and reverses the acceptable load of the biochemical treatment section into the effluent target constraint of the pretreatment unit.

[0095] The measuring points in the front and middle sections of the mixing zone are arranged vertically at the surface, middle, and bottom layers, respectively. In this embodiment, the surface measuring point is located at a distance from the liquid surface. The distance between the middle layer measuring point and the liquid surface The distance from the bottom measuring point to the bottom of the pool Each measuring point outputs water temperature and conductivity measurements with the acquisition time, horizontal position, vertical depth, and quality label. When the proportion of high-salt or low-temperature wastewater sources increases, the local water density increases, and the density difference may drive the influent to settle to the bottom and form a density current that propagates along the bottom of the equalization tank.

[0096] The water quality sensing module measures the surface, middle, and bottom layers of the same vertical cross-section. The degree of dispersion is calculated for each conductivity measurement.

[0097] Specifically, first obtain The arithmetic mean of each measurement is calculated, and then the squared average of the differences between each measurement and the arithmetic mean is calculated. When the squared average crosses the homogeneity boundary, the water quality sensing module forms a vertical stratification marker. The homogeneity boundary is determined based on the discrete distribution of vertical conductivity when the water quality is stable, the sensor measurement uncertainty, and the hydraulic tracer results. After the vertical stratification marker is formed, the edge calculation module extracts the measurement values ​​of the front and middle sections of the mixing zone at the same vertical depth and calculates the density stratification gradient along the horizontal water flow direction.

[0098] The formula for calculating the density stratification gradient is:

[0099] ;

[0100] In the formula, Represents density stratification gradient, subscript This is a density stratification identifier; This represents the spatial distance between the middle section and the front section of the mixing zone along the horizontal flow direction, in units of... ; This represents the difference operator; Represents the position coordinates along the horizontal water flow direction, in units of ; This represents the coefficient of thermal expansion, with units of 1000 ppm. ; This indicates the water temperature in the middle section of the mixing zone, in units of... ; This indicates the water temperature at the beginning of the mixing zone, in units of... ; This represents the salinity-density shrinkage coefficient, with units of... ; The conductivity of the middle section of the mixing region is expressed in units of... ; The conductivity of the front section of the mixing region is expressed in units of... ; Indicates the location marker in the middle section of the mixing zone; Indicates the location marker at the front of the mixing zone; This represents absolute value operations; the unit of density stratification gradient is... The temperature density expansion coefficient and salinity density contraction coefficient were obtained by measuring the density of the current wastewater matrix under multiple combinations of water temperature and conductivity and performing linear fitting; when the composition of the wastewater matrix crosses the calibration range, the coefficients are re-obtained, and the coefficients exceeding the calibration range are not used.

[0101] The absolute value calculation represents the contribution of temperature difference and conductivity difference to the density change amplitude, and does not represent the density flow direction alone. The edge computing module also compares the order of peak occurrence of bottom pollution indicators in the front and middle sections of the mixing zone; advection dispersion compensation is only enabled when a vertical stratification marker is formed, the density stratification gradient exceeds the stratification threshold, and the bottom pollution front moves along the direction from the front to the middle section of the mixing zone. The stratification threshold is determined based on hydraulic tracer records of normal mixing and short-flow conditions, sensor measurement errors, and the allowable response delay of the pretreatment equipment.

[0102] An exemplary set of calibrated thresholds: stratified thresholds can be set to... Examples of values ​​for slippage determination boundary The confidence boundary is set at a prediction interval width exceeding the range of the chemical oxygen demand (COD) measurement. The trigger and recovery boundaries are adjusted based on the on-site water quality conditions. The above are only exemplary parameters and should be recalibrated according to the actual wastewater substrate and equipment scale.

[0103] The advection dispersion compensation term uses the time dimension. During calibration, multiple known density stratification gradient intervals are formed within the equipment's safe range. The measured propagation time of the tracer from the front of the mixing zone to the pretreatment inlet is recorded, and the delay reduction amount corresponding to each gradient interval is obtained by subtracting the measured propagation time under uniform mixing conditions. The hydraulic tracer calibration relationship is a gradient-delay reduction mapping relationship calibrated and stored in advance through hydraulic tracer experiments under multiple density stratification gradient conditions, which can be implemented using a lookup table or interpolation function. During runtime, the edge computing module interpolates the advection dispersion compensation term in the calibration relationship based on the current density stratification gradient; the compensation term does not exceed the maximum delay reduction amount supported by the hydraulic tracer record, nor does it make the corrected predicted hydraulic delay less than the shortest time required for the actuator to complete the pre-action.

[0104] The water quality change prediction model uses an advection dispersion compensation term to correct the time axis of the pollution load trajectory. The edge computing module divides the advection dispersion compensation term by the current sampling interval to obtain the number of sampling steps that need to be shifted forward, and rounds down any non-integer results. The water quality change prediction model shifts the trajectory nodes corresponding to the bottom pollution front forward by the corresponding number of sampling steps, while trajectory nodes that have not entered the stratification state still use the basic hydraulic delay. The corrected pollution load trajectory is fed into the rolling optimization controller, which enables the coordinated setpoints of the oil removal unit, flocculation sedimentation unit, and high-efficiency activated carbon filtration unit to be formed in advance relative to the short-flow pollution front.

[0105] The source proportion of phenol and cyanide wastewater is used to form the baseline for the toxicity load of the biochemical treatment section. The feedback coordination module obtains the predicted value of the pretreated effluent's chemical oxygen demand (COD) and multiplies the dimensionless source proportion of phenol and cyanide wastewater with the predicted COD value to form a predicted toxicity load value expressed as an equivalent COD concentration. It should be noted that this predicted toxicity load value is an engineering equivalent substitution index used for the control logic. It is obtained by multiplying the source proportion of phenol and cyanide wastewater with the predicted COD value of the pretreated effluent and is not equivalent to the direct online measured concentrations of phenol and cyanide. The actual concentrations of phenol and cyanide are verified through periodic laboratory testing.

[0106] The feedback coordination module uses the predicted toxicity load to calculate the load that the biochemical treatment section can receive after dynamic shrinkage. The calculation formula is as follows:

[0107] ;

[0108] In the formula, This indicates the load that the biochemical treatment section can receive after dynamic shrinkage, in units of... ; Indicates dynamic adjustment of the identifier; This indicates the maximum acceptable load of the biochemical treatment section under uninhibited conditions, in units of... ; Indicates the maximum value identifier; This represents the predicted toxicity load, in units of... ; Indicates the current control cycle forecast value identifier; Represents the half-saturation constant, in units of . ; Indicates the half-saturation parameter identifier; Represents the suppression constant, in units of ; Indicates the suppression parameter identifier; and Using the same load unit, , and The same concentration units are used. The acceptable load of the biochemical treatment section after dynamic contraction and the maximum acceptable load of the biochemical treatment section under uninhibited conditions are both expressed as the permissible chemical oxygen demand (COD) concentration at the inlet of the biochemical treatment section, in units of... Runtime satisfies , and The fractional part is a dimensionless inhibitory factor, therefore and Same dimensions; predicted toxicity load value At that time, the load that the biochemical treatment section can receive after dynamic shrinkage is equal to the maximum load that the biochemical treatment section can receive under the uninhibited state. Under positive parameter constraints, the increase in the predicted value of toxicity load reduces the dimensionless inhibition factor.

[0109] The maximum acceptable load of the biochemical treatment section under uninhibited conditions is determined based on the design allowable load of the biochemical treatment section and the record of stable operation without inhibition. From historical operating data, the highest inlet chemical oxygen demand (COD) that still maintains the microbial activity characterization value within the allowable range of the normal baseline under different predicted toxicity loads is used as the dynamic acceptable load sample. This is obtained through nonlinear fitting between the predicted toxicity load value and the dynamic acceptable load sample. and The calibration results are updated once the periodic phenol and cyanide analysis data are available.

[0110] After dynamic shrinkage, the biochemical treatment section can receive load directly input into the rolling optimization controller, replacing the original fixed effluent target upper limit for the next control cycle. When the target upper limit decreases, the rolling optimization controller re-solves within the feasible region defined by equipment capacity, the magnitude of action changes, and process interlock constraints. The solution results can be used to increase the reagent dosage setpoint, adjust the stirring setpoint for rapid mixing and slow flocculation, extend the achievable reaction residence time, or advance the filter backwash setpoint; the specific action is determined by the rolling optimization target value, without fixing any single action as an inevitable result of an increase in toxicity load.

[0111] The execution control module performs spectrum analysis on the operating status of the skimming mechanism's drive motor. When the proportion of oily wastewater increases, a high-viscosity scum layer may accumulate in front of the skimming mechanism, causing unsteady fluctuations in the scraper's operating resistance. Observing only the drive speed feedback may mask the slippage between the mechanical components and the oil layer due to the inverter's speed regulation. The execution control module uses... The sampling frequency is used to collect the three-phase current of the drive motor, and each phase is sampled. There are [number] sampling points, and the duration of a single analysis window is [duration]. Each phase current is multiplied by a Hamming window after the DC component is removed, and then a Fast Fourier Transform is performed.

[0112] The execution control module normalizes the squared amplitude of each frequency point based on the sampling frequency and Hamming window energy, obtaining the result in units of... The power spectral density. After removing the fundamental frequency and its neighboring frequencies, extract... to The power spectral density within the frequency band is used, and the larger value among the power spectral densities of the three corresponding frequency bands is used as the slippage criterion. The Nyquist frequency corresponding to the sampling frequency is It can cover to Frequency band analysis. The slippage determination boundary is jointly calibrated by the frequency band power spectral density distribution under different skimming speeds and known normal loads, as well as the controlled slippage condition records, to avoid misjudging the spectral changes caused by normal speed variations as slippage.

[0113] When the power spectral density exceeds the slippage threshold and the collaborative setpoint requires a continued increase in the skimming speed, the execution control module generates a slippage status flag and freezes the target speed increment in the skimming setpoint to limit ineffective mechanical actions. The slippage status indicates a decrease in the skimming unit's ability to transfer surface oil load, and escaping oil load may enter the high-efficiency activated carbon filter unit. The execution control module checks the backwash water availability, downstream buffer capacity, minimum continuous filtration duration, and filter path switching status; if all interlocking conditions are met, the backwash start time is advanced within the current control cycle. If the interlocking conditions are not met, the execution control module maintains the filtration operation boundary and returns a load mismatch flag to the rolling optimization controller, which then reduces the influent load or calls up an available filtration branch.

[0114] This embodiment uses a pilot-scale continuous flow platform to record the operational results of physical compensation and control interlocking. The effective volume of the regulating tank is... The preprocessing unit is designed to process [amount]. The corresponding nominal hydraulic retention time of the entire pool is ,Right now The predicted hydraulic delay represents the local propagation delay from the measurement section upstream of the mixing zone to the pretreatment inlet, and is not equivalent to the nominal hydraulic residence time of the entire pool. The sensor sampling interval is... The control cycle is Run to At that time, the proportion of saline wastewater sources was... Step jump to Conductivity exceeds The proportion of oily wastewater and phenol-cyanide wastewater sources is increasing simultaneously.

[0115] The control group used a basic control method without density stratification correction, toxicity shrinkage constraint, and skimming / slippage interlock, while the experimental group used the complete control method described in this embodiment. The initial states of the equalization tank, influent disturbance, sensor arrangement, pretreatment equipment, and subsequent treatment sections were kept consistent for both groups. The recorded results are shown in Table 1 below.

[0116] Table 1:

[0117] Test parameters and operating indicators Results of the control group Results of the experimental group The moment when the peak conductivity of the underlying layer reaches the later part of the mixing region Predicted hydraulic delay from the mixing zone front section to the pretreatment inlet Pretreated effluent target upper limit Mean power spectral density of motor in oil skimming mechanism Skimming setpoint output status Continue to increase to the motion limit Identify slippage and freeze speed increments Pressure differential rise of high-efficiency activated carbon filter unit Peak chemical oxygen demand of pretreated effluent Recovery time of biochemical sludge activity characterization values

[0118] Peak conductivity of the underlying layer at the time of operation It reaches the latter part of the mixing zone. The basic control mode is maintained. Localized predicted hydraulic delay will run until The pollution load detected in time is arranged during operation. The sample arrived at the pretreatment inlet. After detecting the movement of vertical stratification and the bottom contamination front, the experimental group obtained the density stratification gradient. The advection dispersion compensation term shortens the local predicted hydraulic delay to And the predicted time when the pollution load reaches the pretreatment inlet will be moved forward to the point of operation. The rolling optimization controller reduces the predicted phase deviation caused by local short-circuiting by using the previous sequence of oil removal, flocculation sedimentation, and filtration actions.

[0119] After the predicted toxicity load was incorporated into the inhibition kinetics calculation, the target upper limit for the pretreated effluent in the experimental group was increased from... Shrink to The rolling optimization controller re-solves for the cooperative setpoint within the updated target upper limit. When the skimming mechanism encounters a high oil load, the experimental group freezes the target velocity increment based on the instantaneous frequency band power spectral density exceeding the slippage judgment boundary, and starts the high-efficiency activated carbon filter unit for backwashing in advance after the interlocking conditions are met. The average frequency band power spectral density is used to record the overall load state; the slippage judgment uses the judgment value of each analysis window, and does not use the average value in the table to replace the instantaneous judgment value.

[0120] The peak chemical oxygen demand (COD) of the pretreated effluent in the experimental group was: lower than The dynamic target upper limit; the corresponding peak value for the comparison group is The pressure difference increase of the high-efficiency activated carbon filter unit in the experimental group was... The pressure difference increase corresponding to the control group is After the load change entering the biological treatment section decreased, the activity characterization value of the biological sludge in the experimental group was... After returning to the normal baseline allowable range, the recovery time in the control group was [missing information]. The data in Table 1 represent the control results when density stratification compensation, toxicity load constraint, and skimming / slippage interlock are all activated simultaneously.

[0121] When a local sensor experiences a physical disconnection, the control system executes degraded safety logic. After the mid- or bottom-level conductivity sensor returns a missing identifier, the edge computing module stops calculating the density stratification gradient at the associated depth, clears the advection dispersion compensation term to zero, and reverts the water quality change prediction model to the basic hydraulic delay model. The fault identifier is synchronously written to the operating condition knowledge base, but the fault period is not considered valid control experience. After the sensor recovers a valid quality identifier, the control system enters a parallel verification window; when both the vertical dispersion and density stratification gradient are within usable ranges for two consecutive control cycles, density stratification compensation is restored. During the data loss period, the rolling optimization controller uses the most recent safety setpoint and field effluent feedback, and does not generate infinite control commands.

[0122] Comparative Example 1: Comparative Example 1 uses the same multi-stream influent sequence, sensor measurements, pretreatment equipment, effluent target, and equipment capacity as Example 1, only removing the source proportion identification. The water quality change prediction model only receives the time series of chemical oxygen demand, turbidity, and pH at the pretreatment inlet. The rolling optimization controller still performs reagent, stirring, residence time, oil skimming, and backwashing controls. The two mixed operating conditions have the same chemical oxygen demand but different proportions of saline and oily wastewater. Without the source proportion identification, the rolling optimization controller treats the two operating conditions as similar, failing to distinguish in advance between conductivity shocks and an increase in the oily wastewater source proportion.

[0123] The proportion of saline wastewater is set by Rise to And chemical oxygen demand maintained The input is set, and the proportion of oily wastewater is determined by... Rise to And the chemical oxygen demand is also maintained. The inputs were compared. Comparative Example 1 generated approximate reagent setpoints under two inputs, resulting in an increase in reagents under the first input while the conductivity could not be eliminated by the flocculation process, and a later start of the oil skimming action under the second input. Example 1 used the source ratio to change the equipment state constraints and the oil skimming setpoints respectively. Evaluation indicators included effluent deviation, ineffective reagent increment, and duration of oil content exceeding the limit in the pretreated effluent.

[0124] Comparative Example 2: Comparative Example 2 uses the same inputs, source ratio identification, and pollution load prediction as Example 1, except that the oil removal, flocculation sedimentation, and high-efficiency activated carbon filter controllers are changed to operate independently. The oil removal controller adjusts the skimming mechanism based on the current oil content measurement, the flocculation controller adjusts the reagents and stirring based on the current turbidity, and the high-efficiency activated carbon filter controller starts backwashing based on the current pressure difference. The three controllers do not share the pollution load trajectory, nor do they check the timing of their actions.

[0125] Setting up a pollution front caused by the increasing proportion of oily wastewater After reaching the oil removal unit, the turbidity of the effluent from the flocculation and sedimentation process is... After the pressure rises, the filtration differential pressure is at The backwash boundary is then reached. In Comparative Example 2, each unit operates separately after the current measurement crosses the boundary, which may result in simultaneous flocculation increase and backwashing, causing high-load effluent to enter the recovering filtration unit. Example 1, based on the same pollution load trajectory, first adjusts skimming and flocculation, and then arranges backwashing at the control step of reduced load at the filtration inlet. Evaluation indicators include peak effluent turbidity, load during backwash recovery, and number of conflicts between adjacent actions.

[0126] In a specific application scenario, two representative inflows are used to illustrate the calculation process of the source ratio.

[0127] Specifically as follows:

[0128] The conductivity of influent A is Chemical oxygen demand is The conductivity of influent B is Chemical oxygen demand is The conductivity of the pretreatment inlet is Chemical oxygen demand is .

[0129] Using the conductivity conservation relationship, the proportion of influent B is: reduce Divide by reduce The result, rounded to four decimal places, is The proportion of influent A is: Subtracting the unrounded proportion of influent B and rounding to four decimal places, the result is: Substituting the two unrounded ratios into the chemical oxygen demand conservation law, the calculation result is: The chemical oxygen demand at the pretreatment inlet is consistent with that at the inlet, and the material balance residual satisfies the convergence condition for this calculation.

[0130] The source proportion vector and multi-location measurements from the most recent sampling window are input into the water quality change prediction model. For example, the water quality change prediction model outputs the normalized effluent deviation prediction, control change demand, and energy consumption indicators for the next control time domain, and the rolling optimization controller compares... There are candidate control vectors that satisfy the equipment boundary conditions. The squared effluent deviation of candidate A is... The control change squared is Energy consumption index is The corresponding value for candidate B is , and The corresponding value for candidate C is , and .

[0131] The weight of the outflow deviation is set as follows: The control change weight is set to Energy consumption weight is set to The relaxation amount is set to The target value of candidate A is take add add take The calculation result is The target value of candidate B is take add add take The calculation result is The target value of candidate C is take add add take The calculation result is The rolling optimization controller selects candidate A with the smaller target value and only issues the setpoints for reagent, stirring, residence time, skimming, and backwashing corresponding to the current control cycle.

[0132] The execution control module records the target value and actuator response status corresponding to candidate A. For example, the target flow rate of the drug metering pump is... The actual traffic is The target speed of the stirring motor is The actual rotational speed is The target opening degree of the level valve is The actual opening is If all deviations fall within the set allowable range, the rolling optimization controller continues to use the current equipment state. If the actual flow rate of the metering pump remains at [value missing]... The execution control module generates a fault flag for the dosing link and prohibits the use of water deviation to further increase the target flow rate of the metering pump.

[0133] The pretreated effluent will be obtained in the next control cycle. For example, the predicted chemical oxygen demand (COD) value is... The measured value is The predicted residual is Turbidity prediction value The measured value is The predicted residual is The predicted residuals are used to update the water quality change prediction model, while the measured effluent values ​​are used for rolling optimization and state correction. When the load of the subsequent biological treatment section is within the acceptable range, the pretreated effluent target remains unchanged.

[0134] During a continuous control cycle, once the pretreated effluent deviation, actuator response deviation, and prediction residual enter their respective allowable ranges and remain within the recovery time, the current rapid correction phase ends, and the sampling interval and control cycle return to their normal settings. The source ratio, pollution load trajectory, candidate A, actuator response status, and effluent results are written to the operating condition knowledge base once they meet the valid recording conditions. If any deviation fails to enter its corresponding allowable range, the control system continues prediction and rolling solution, without writing any unclosed records to the operating condition knowledge base.

[0135] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0136] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. It should be noted that any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for intelligent control of pretreatment of mixed wastewater flows, characterized in that, include: Collect the influent flow rate of each stream, the influent water quality of each stream, and the mixed water quality at multiple locations in the equalization tank, and form a spatiotemporal sequence of mixed operating conditions according to the collection location and collection time; Based on the spatiotemporal sequence of mixed operating conditions, the source proportion of each influent stream is identified, and the pollution load trajectory of the pretreatment inlet is predicted by combining the source proportion and the spatiotemporal sequence of mixed operating conditions. The pollution load trajectory and the operating status of the multi-stage pretreatment equipment are input into the rolling optimization controller to generate coordinated setpoints for the oil removal, flocculation sedimentation and high-efficiency activated carbon filtration processes. The collaborative setpoints are converted into actuator control commands, and the actuator response status and pre-treated effluent indicators are collected. Based on the actuator response status, pre-treated effluent indicators, and subsequent treatment section load, the rolling optimization controller's status parameters and effluent target are adjusted until both the pre-treated effluent deviation and the actuator response deviation fall within the corresponding allowable range.

2. The intelligent control method for pretreatment of mixed wastewater as described in claim 1, characterized in that: Calculate the rate of change and cross-location gradient of each water quality index within adjacent sampling windows. When the rate of change or cross-location gradient crosses the corresponding trigger boundary, shorten the sampling interval at the corresponding location and generate an abnormal fluctuation indicator. When the rate of change and cross-location gradient return to the corresponding recovery boundary and continue to reach the recovery time, restore the normal sampling interval.

3. The intelligent control method for pretreatment of mixed wastewater as described in claim 1, characterized in that: The identification of source ratios includes forming initial source ratio values ​​based on the flow rates of each influent stream, establishing material balance residuals based on the conductivity and chemical oxygen demand of each influent stream and the pretreatment inlet, determining the source ratios that satisfy the convergence conditions of the material balance residuals, and verifying the consistency of source ratios using the direction of pH change and cross-location gradients.

4. The intelligent control method for pretreatment of mixed wastewater as described in claim 3, characterized in that: The water quality change prediction model receives the spatiotemporal sequence of mixed operating conditions, source ratio, historical status of actuators, and historical indicators of pretreated effluent. It outputs the pollution load trajectory of chemical oxygen demand, turbidity, and pH in the prediction time domain, as well as the corresponding confidence interval. The model uses the newly obtained measured values ​​of the pretreatment inlet and the corresponding predicted values ​​to form prediction residuals, and updates the water quality change prediction model based on the prediction residuals.

5. The intelligent control method for pretreatment of mixed wastewater as described in claim 4, characterized in that: When the predicted confidence interval width exceeds the confidence boundary, the predicted value exceeds the equipment safety boundary, or the abnormal fluctuation indicator formed by the water quality index change rate or cross-location gradient exceeding the corresponding trigger boundary persists, the safe operation mode is entered. The safe operation mode increases the weight of the effluent deviation in the rolling optimization target, limits the change range of the collaborative set value in adjacent control cycles, and exits the safe operation mode after the predicted residual, pre-treated effluent deviation and actuator response deviation all return to the corresponding allowable range.

6. The intelligent control method for pretreatment of mixed wastewater as described in claim 4, characterized in that: The rolling optimization controller uses the pollution load trajectory and source ratio as external disturbances, the actuator response status as the equipment status, and the pre-treated effluent target, actuator capacity, and the change range of adjacent control cycles as constraints to jointly obtain the setpoints for reagent dosing, mixing and stirring, reaction residence time, oil skimming, and filtration backwashing, and only executes the collaborative setpoints corresponding to the current control cycle.

7. The intelligent control method for pretreatment of mixed wastewater as described in claim 6, characterized in that: The response status of the actuator is obtained through the execution control module. The response status of the actuator includes the actual flow rate of the metering pump, the actual speed of the stirring motor, the actual opening degree of the liquid level valve, the actual liquid level in the reaction zone, the actual speed of the skimming mechanism, and the actual status of the backwashing mechanism. When the deviation between the collaborative set value and the response status of the actuator exceeds the execution allowable range, the continued increment of the associated execution quantity is frozen and the standby actuator or the preset safety set value is called.

8. The intelligent control method for pretreatment of mixed wastewater as described in claim 6, characterized in that: The feedback coordination module receives the oxidant consumption status of the advanced oxidation treatment section and the load status of the biochemical treatment section. Based on the acceptable load range of the advanced oxidation treatment section and the biochemical treatment section, it corrects the pretreated effluent target and uses the corrected pretreated effluent target for rolling optimization in the next control cycle.

9. The intelligent control method for pretreatment of mixed wastewater as described in claim 1, characterized in that: The incoming water includes oily wastewater, phenol and cyanide wastewater, saline wastewater and wastewater with high organic load generated during the petrochemical production process. The pretreated effluent is then sent to the advanced oxidation treatment section and the biochemical treatment section in sequence.

10. The intelligent control method for pretreatment of mixed wastewater as described in claim 4, characterized in that: Before outputting the pollution load trajectory, the water quality change prediction model generates vertical stratification markers based on conductivity measurements at different depths within the same vertical cross-section. During the generation of these markers, the density stratification gradient is calculated using water temperature and conductivity at the same depths in the front and middle sections of the mixing zone. The formula for calculating the density stratification gradient is as follows: ; In the formula, Represents density stratification gradient, subscript This is a density stratification identifier; This represents the spatial distance between the middle section and the front section of the mixing zone along the horizontal flow direction, in units of... ; This represents the difference operator; Represents the position coordinates along the horizontal water flow direction, in units of ; This represents the coefficient of thermal expansion, with units of 1000 ppm. ; This indicates the water temperature in the middle section of the mixing zone, in units of... ; This indicates the water temperature at the beginning of the mixing zone, in units of... ; This represents the salinity-density shrinkage coefficient, with units of... ; The conductivity of the middle section of the mixing region is expressed in units of... ; The conductivity of the front section of the mixing region is expressed in units of... ; Indicates the location marker in the middle section of the mixing zone; Indicates the location marker at the front of the mixing zone; This represents absolute value operations; the unit of density stratification gradient is... When the density stratification gradient exceeds the stratification threshold and the bottom pollution front moves toward the pretreatment inlet, the advection dispersion compensation term is obtained from the hydraulic tracer calibration relationship based on the density stratification gradient. The advection dispersion compensation term is used to shorten the predicted hydraulic delay of the pollution load trajectory, and the pollution load trajectory after shortening the predicted hydraulic delay is input into the rolling optimization controller.