A sewage treatment method and reactor based on multi-modal intelligent regulation and control
By constructing a predictive model based on images and water quality parameters, intelligent control of the wastewater treatment reactor is achieved, which solves the shortcomings of fixed parameters and manual adjustment, improves the treatment effect and operational stability, and reduces costs and energy consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TONGJI UNIV
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-19
AI Technical Summary
During operation, existing wastewater treatment reactors rely on fixed parameter control, which is difficult to adapt to changes in water quality and flow rate, resulting in substandard treatment or waste of energy and reagents. Manual adjustment based on experience is subject to adjustment lag and operational complexity, and real-time monitoring equipment has high maintenance costs.
By collecting images of the wastewater surface and measuring water quality parameters, a water quality parameter prediction model is constructed. The number of UV lamps turned on and the amount of PAA added are automatically adjusted. Combined with a multimodal intelligent control system, the parameters are accurately matched and dynamically adapted.
It improves the stability and efficiency of wastewater treatment, reduces energy and chemical consumption, simplifies the operation and maintenance process, and enhances the robustness and adaptability of the system.
Smart Images

Figure CN121564662B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wastewater treatment and automation control technology, specifically a wastewater treatment method and reactor based on multimodal intelligent regulation. Background Technology
[0002] Advanced oxidation processes (AOPs) are highly efficient wastewater treatment technologies widely used in environmental engineering. Their working principle involves generating highly oxidizing hydroxyl radicals (·OH) to degrade pollutants, offering advantages such as high efficiency, speed, and environmental friendliness. Furthermore, AOPs combine strong oxidizing power with the absence of secondary pollution. The effectiveness of AOPs in treating wastewater is highly correlated with reactor operating parameters.
[0003] Currently, wastewater treatment reactors are mostly controlled using fixed parameters or manual experience-based adjustments. Fixed parameter control struggles to adapt to dynamic changes in wastewater quality and flow rate. When water quality deteriorates or flow increases, treatment may fail to meet standards; conversely, when water quality is good or flow decreases, energy and reagents are wasted. Manual experience-based adjustments rely heavily on operator expertise, resulting in significant adjustment lags and difficulty in achieving precise parameter matching, leading to poor stability in wastewater treatment performance. Using real-time water quality monitoring equipment presents challenges due to high maintenance costs and complex operation. Summary of the Invention
[0004] The purpose of this invention is to provide a wastewater treatment method and reactor based on multimodal intelligent control. This intelligent control reactor predicts water quality by acquiring images and automatically adjusts operating parameters based on real-time water quality data. This is beneficial for dynamically adapting to water quality and wastewater flow, saving energy and reagents, preventing lag adjustment, facilitating precise parameter matching, improving the stability of wastewater treatment effect, and reducing operating costs.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] In a first aspect, the present invention provides a wastewater treatment method based on multimodal intelligent control, comprising:
[0007] A water quality parameter prediction model is constructed by collecting images of the wastewater surface as input variables and measuring water quality parameters as output variables.
[0008] Based on the water quality parameter values output by the water quality parameter prediction model, the actual water quality parameter values are obtained by inversion.
[0009] Based on the actual water quality parameters, the number of UV lamps to be turned on and the amount of PAA to be added were calculated.
[0010] Set optimization objectives and construct objective functions to obtain the target number of UV lamps to be turned on and the target PAA dosage.
[0011] The number of target UV lamps turned on and the target PAA dosage are iteratively evaluated based on the coding structure constraints to obtain the number of UV lamps turned on and the PAA dosage that meet the iteration termination condition, and a parameter optimization model is obtained.
[0012] Send a control signal to the UV ballast to turn on the corresponding number of UV (ultraviolet) lamps, and send a pulse signal to the diaphragm metering pump to draw PAA (peracetic acid) from the PAA (peracetic acid) storage tank and add it to the wastewater;
[0013] Regularly test the effluent to obtain water quality parameters and verify whether the water quality parameters meet the discharge standards. If they do not meet the standards, adjust the number of UV lamps turned on and the PAA dosage based on the deviation data between the effluent water quality parameters and the discharge standards.
[0014] Regularly maintain wastewater treatment equipment.
[0015] As a further aspect of the present invention: A water quality parameter prediction model is constructed by collecting images of the wastewater surface as input variables and measured water quality parameters as output variables, including:
[0016] Based on a water quality sensor and an image acquisition device, at least six measured water quality parameters and corresponding RGB images are acquired. The pixel values of the RGB images are standardized to obtain a standard image composed of standard pixel values, wherein the resolution of the RGB image is 1920×1080.
[0017] The 3σ criterion is used to remove outliers from the measured water quality parameters. The measured water quality parameters after removing outliers are then subjected to feature reshaping to obtain normalized water quality parameters that eliminate parameter evaluation differences.
[0018] Image features are extracted from the standard image based on the ResNet-50 network to obtain a feature image. Normalized water quality parameters are then encoded to obtain encoding parameters. The feature image and encoding parameters are then concatenated using a weighted concatenation method to obtain fused data.
[0019] A layered structure for the prediction model is established, and a weighted mean square error (WMSE) algorithm is constructed to balance the predictive importance of each normalized water quality parameter.
[0020] Based on historical water quality parameters collected over a certain period, an optimizer and cross-validation method are used to iteratively train the training set to obtain a water quality parameter prediction model.
[0021] The water quality parameter prediction model is used to output normalized water quality parameter values, and an inverse normalization algorithm is constructed to obtain the actual water quality parameter values.
[0022] As a further aspect of the present invention: the image acquisition device is a camera.
[0023] As a further aspect of the present invention: the pixel values of the RGB image are standardized, including:
[0024] The RGB image is cropped to 512×512 pixels, and a pixel value normalization formula is constructed:
[0025] Eliminating the impact of lighting differences on pixels, among which... These are the original image pixel values. The average pixel value of the image. The standard deviation of the image pixels. Standard pixel values;
[0026] The measured water quality parameters after outlier removal are characterized and remodeled to eliminate parameter evaluation differences, including:
[0027] Construct the parameter adjustment formula:
[0028] Eliminating differences in parameter evaluation, among which, This represents the historical minimum value of the measured water quality parameters. These are the historical maximum values of the measured water quality parameters. Water quality parameters after eliminating differences in parameter evaluation.
[0029] As a further aspect of the present invention: image features are extracted from the standard image based on a ResNet-50 network to obtain a feature image; normalized water quality parameters are feature-encoded to obtain encoding parameters; and the feature image and encoding parameters are concatenated using a weighted concatenation method to obtain fused data, including:
[0030] Remove the last two fully connected layers in the ResNet-50 network and retain the 2048-dimensional feature vector output from the third-to-last layer. The 2048-dimensional feature vector includes information on water turbidity and color gradient.
[0031] Set the weight matrix for water quality parameters, convert the normalized water quality parameters into water quality feature vectors, and construct the encoding formula based on a fully connected layer:
[0032] The water quality feature vector is encoded as a 256-dimensional vector, where, This is the weight matrix. For offset top, For activation function, This represents the water quality feature vector.
[0033] Construct a weighted concatenation algorithm:
[0034] The feature image and water quality feature vector are fused together, where, θ and θ are both weighting coefficients of the measured water quality parameters corresponding to the water quality feature vector. For vector concatenation, To integrate data.
[0035] As a further aspect of the present invention: the establishment of the layer structure of the prediction model and the construction of a weighted mean square error (WMSE) algorithm to balance the predictive importance of each normalized water quality parameter include:
[0036] The model consists of an input layer, a feature fusion layer, a first fully connected layer, a first dropout layer, a second fully connected layer, a second dropout layer, and an output layer.
[0037] The weighted mean square error algorithm is constructed as follows:
[0038] ,in, For the i-th measured value, the k-th water quality parameter is... These are the model's predicted values. The weights are those of the measured water quality parameters.
[0039] The method for constructing the inverse normalization algorithm to obtain actual water quality parameter values includes:
[0040] Constructing an inverse normalization algorithm:
[0041] The actual water quality parameter values were obtained, among which, These are actual water quality parameter values. This is the normalized value output by the model.
[0042] As a further aspect of the present invention: the first fully connected layer reduces the 2304-dimensional fused data to 1024 dimensions, the second fully connected layer reduces the 1024-dimensional fused data to 512 dimensions, and the output layer reduces the 512-dimensional fused data to 6 dimensions.
[0043] As a further aspect of the present invention: the dropout probability of the first dropout layer is 0.3, and the dropout probability of the second dropout layer is 0.2.
[0044] As a further embodiment of the present invention: COD and SS are set to 0.3, and the remaining water quality parameters are set to 0.1, with a total of 1.
[0045] As a further aspect of the present invention: the optimizer is the Adam optimizer, and the initial learning rate is set to 10. -4 The value decreases to 0.5 of its original value every 10 training epochs.
[0046] As a further aspect of the present invention: setting an optimization objective and constructing a parameter optimization model to obtain the target number of UV lamps to be turned on and the target PAA dosage, including:
[0047] The optimization targets are set as follows: effluent COD ≤ 50 mg / L, SS ≤ 10 mg / L, ammonia nitrogen ≤ 5 mg / L, total nitrogen ≤ 15 mg / L, total phosphorus ≤ 0.5 mg / L, and fecal coliform count ≤ 10. 3 Units / L;
[0048] The objective function for determining the target number of activations and the target PAA dosage is as follows:
[0049] ,
[0050]
[0051] ,in, Total operating cost (yuan / hour). This is the UV energy consumption unit price coefficient. Real-time UV energy consumption (kWh). For a single UV lamp tube, This is the unit price coefficient for PAA drugs. This represents the real-time consumption of PAA (g). = 0 -3 , The wastewater flow rate is (m³ / h). Runtime (h) The number of UV lamps turned on. For PAA dosage, COD out Chemical oxygen demand (COD) concentration in effluent; SS out The concentration of suspended solids in the effluent; NH3-N out Total ammonia nitrogen (TN) concentration in the effluent; out Total nitrogen concentration in effluent; TP out Total phosphorus concentration in effluent; Coli out The concentration of E. coli in the effluent.
[0052] As a further aspect of the present invention: the number of target UV lamps turned on and the target PAA dosage are iteratively calculated based on coding structure constraints to obtain the number of UV lamps turned on and the PAA dosage that meet the iteration termination condition, including:
[0053] The number of UV lamps turned on and the amount of PAA added are encoded using a binary-real number hybrid encoding method.
[0054] The initial population for generating the number of UV lamps turned on and the amount of PAA added;
[0055] The roulette wheel selection method was used to select the UV lamp and PAA dosage.
[0056] Based on selection, crossover, and mutation operations, the selection fitness and PAA dosage range of a single UV lamp are obtained.
[0057] The iteration termination condition is set as follows: when the number of iterations reaches 100 generations, or the change rate of the selection fitness value of UV lamps is less than 0.01 for 10 consecutive generations, the iteration stops, and the number of UV lamps turned on and the corresponding PAA dosage that meet the iteration termination condition are obtained.
[0058] Based on the effluent water quality testing data, a parameter optimization model is constructed:
[0059] ,
[0060] ,
[0061] in, This is the adjustment value for the number of UV lamps turned on (rounded down). Adjusted value for PAA dosage (mg / L) To adjust the weights (COD and SS are set to 0.3, and the rest to 0.1), This represents the measured value of the effluent water quality for the kth item. This is the k-th water quality standard value; after adjustment, it must be ensured that... Within the range of groups 1-12, Within the range of 1-50 mg / L.
[0062] As a further aspect of the present invention: regular maintenance of wastewater treatment equipment includes:
[0063] Regularly monitor the response status of the UV ballast and / or diaphragm metering pump. When the UV ballast and / or diaphragm metering pump fails to respond within a preset time, send an audible and visual alarm signal to the cloud.
[0064] A liquid level sensor is used to monitor the liquid level in the PAA storage tank to obtain the remaining amount of the drug. When the liquid level is lower than the preset value, a drug replenishment signal is sent to the cloud.
[0065] Secondly, the present invention provides a wastewater treatment reactor based on multimodal intelligent control, applied to the wastewater treatment method based on multimodal intelligent control as described above, wherein the wastewater treatment reactor comprises:
[0066] The system comprises a multimodal control system and an oxidation system. The multimodal control system includes a multimodal data acquisition module, a water quality parameter prediction module, an operating parameter optimization module, and a control execution module. The multimodal data acquisition module is signal-connected to the operating parameter optimization module, and the operating parameter optimization module is signal-connected to the control execution module. The multimodal data acquisition module is used to acquire measured water quality parameters and water surface images of wastewater in real time, providing a two-dimensional data source for precise control. The operating parameter optimization module constructs a multi-objective optimization model, taking water quality parameters as input, and outputs operating parameter signals for the advanced oxidation system. The control execution module integrates PLC closed-loop control logic and includes a UV lamp control unit and a PAA dosing control unit. The control execution module is used to adjust the number of UV lamps turned on and the amount of PAA added. The oxidation system receives and degrades wastewater based on the operating parameter signals. The advanced oxidation system includes a UV photocatalysis module and a PAA dosing module.
[0067] As a further aspect of the present invention: the multimodal data acquisition module includes a water quality parameter sensor and a water surface status monitoring module;
[0068] The water quality sensors include COD, SS, ammonia nitrogen, total nitrogen, total phosphorus, and E. coli sensors. The probes of each sensor are fixed in the inlet area of the reactor. The output of the water quality sensors is connected to the data acquisition gateway, which transmits the collected data to the cloud.
[0069] The UV lamp control unit includes a PLC controller and a UV ballast. The PLC controller receives the lamp activation number signal output by the operating parameter optimization module and controls the on / off state of the UV ballast to realize the activation and deactivation of the corresponding number of UV lamps. The UV lamps are activated sequentially in the reverse order of the water flow direction and deactivated in the opposite order. The PAA dosing control unit consists of a PLC controller and a metering pump. The PLC controller receives the PAA dosing amount signal output by the model.
[0070] As a further aspect of the present invention: the wastewater treatment reactor is a UV-PAA reactor.
[0071] Thirdly, the present invention provides a method of using a wastewater treatment reactor, comprising:
[0072] Wastewater surface images and measured water quality parameters from the past three months were collected to train a water quality parameter prediction model and a parameter optimization model. A multimodal control system was embedded into the water quality parameter prediction model. Wastewater to be treated was introduced into the influent zone of the reactor body, with the influent flow rate controlled at 20 m³ / h. The water surface status monitoring module collected RGB images of the water surface every 5 minutes and uploaded them to the cloud. The water quality parameter prediction model was called, and after preprocessing, feature extraction, and feature fusion of the uploaded water surface images, it output 6 normalized water quality parameters. Then, the actual water quality parameter values were obtained through inverse normalization. The prediction process took ≤2 seconds. The parameter optimization model was run, using the predicted actual water quality parameters as input, and through calculation, it output the optimal number of UV lamps to be turned on. The optimal PAA dosage is determined, with the optimization process taking ≤5s. The control execution module receives the optimal parameters output by the operating parameter optimization module, and the PLC controller sends control signals to the UV ballast, completing the on / off control of the corresponding number of UV lamps within 0.5s. The on-off sequence follows the reverse flow order. Simultaneously, the PLC controller calculates the metering pump operating frequency based on the wastewater flow data and adjusts the metering pump through pulse signals to extract 40% concentration PAA from the PAA storage tank and add it to the wastewater through the atomizing dosing port at the top of the inlet area, with a dosing response time ≤1s, achieving UV-PAA synergistic oxidation treatment. Effluent water quality is tested daily, and the reactor effluent water quality parameters are measured to verify whether it meets Class A standards. Emission standards; if all test results meet the standards, maintain the current operating parameters; if there are parameters that do not meet the standards, calculate the water quality deviation value, calculate the adjustment amount according to the above dynamic feedback adjustment formula, re-optimize the number of UV lamps to be turned on and the PAA dosage, forming a closed-loop optimization, and test the effluent water quality again within 1 hour after adjustment until it meets the standards; monitor the remaining amount of the agent in real time through the liquid level sensor of the PAA storage tank. When the liquid level is lower than 5L, the background monitoring terminal issues a agent replenishment prompt. The operator needs to replenish 40% concentration PAA to the full liquid level (50L) of the storage tank within 1 hour; regularly clean and maintain the reactor body, UV lamps, and sensors to ensure the long-term efficient operation of the reactor.
[0073] Compared with the prior art, the beneficial effects of the present invention are:
[0074] 1. This invention uses a camera in conjunction with a water quality sensor to collect water surface images and multiple water quality parameters, enabling rapid and continuous acquisition of water quality parameters. This effectively addresses situations of water quality deterioration or increased flow. By constructing a water quality parameter prediction model to inversely calculate actual water quality parameters, it reduces reliance on experience-based operations, facilitates accurate matching of UV lamp and PAA dosage, improves wastewater treatment efficiency, and simultaneously reduces sensor maintenance costs and operational complexity.
[0075] 2. This invention presets optimization targets and constructs objective functions to obtain the target number of UV lamps to be turned on and the target PAA dosage. This can further solve the problem of poor adaptability of traditional fixed parameters or manual adjustments, effectively reduce reactor response time, reduce the fluctuation range of treatment effect, maintain the continuous stability of effluent, and effectively reduce UV energy consumption and PAA chemical consumption, thus achieving the dual goals of high-efficiency treatment and energy saving.
[0076] 3. This invention improves the convenience of operation and maintenance and the robustness of the system through multimodal full-process intelligent management and control. At the same time, by regularly monitoring the response status of the UV ballast and / or diaphragm metering pump, when the UV ballast and / or diaphragm metering pump fails to respond within a preset time, it sends an audible and visual alarm signal to the cloud, providing a complete data chain for model iteration, fault diagnosis and operation analysis. This helps to improve the efficiency of fault handling and avoid excessive emissions caused by faults. Through multimodal data cross-validation, it can enhance the system's adaptability to complex working conditions and operational stability.
[0077] 4. This invention can flexibly adapt to different types of sewage, such as urban domestic sewage and industrial wastewater. Differentiated treatment needs can be achieved by adjusting the model parameters. When stainless steel is used as the main structure of sewage treatment, it can adapt to the needs of small and medium-sized sewage treatment scenarios, which is conducive to the intelligent promotion of advanced oxidation technology. Attached Figure Description
[0078] Figure 1 This is a flowchart illustrating the wastewater treatment method of the present invention.
[0079] Figure 2 This is a structural diagram of the reactor of the present invention;
[0080] Figure 3 This is a flowchart illustrating the construction process of the multimodal water quality prediction model of the present invention.
[0081] Figure 4 This is a performance diagram of the multimodal water quality prediction model of the present invention;
[0082] Figure 5 Flowchart for constructing the operating parameter optimization model of this invention;
[0083] Figure 6 This is a performance diagram of the operating parameter optimization model of the present invention.
[0084] In the diagram: 1. Water inlet pipe; 2. Chemical dosing port; 3. First water outlet zone; 4. Water outlet; 5. Second water outlet zone; 6. Reaction zone; 7. Water inlet zone. Detailed Implementation
[0085] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0086] Example:
[0087] Please see Figures 1-6 This embodiment provides a wastewater treatment method based on multimodal intelligent control, applied to the treatment of domestic wastewater in a certain area. The wastewater treatment method includes the following steps:
[0088] S1: Collect images of the wastewater surface as input variables and measured water quality parameters as output variables to construct a water quality parameter prediction model;
[0089] S2: Based on the water quality parameter values output by the water quality parameter prediction model, the actual water quality parameter values are obtained by inversion;
[0090] S3: Based on the actual water quality parameters, calculate the number of UV lamps to be turned on and the amount of PAA to be added;
[0091] S4: Set optimization objectives and construct objective functions to obtain the target number of UV lamps to be turned on and the target PAA dosage;
[0092] S5: Iterate on the target number of UV lamps turned on and the target PAA dosage based on the coding structure constraints to obtain the number of UV lamps turned on and the PAA dosage that meet the iteration termination condition, and obtain the parameter optimization model;
[0093] S6: Send a control signal to the UV ballast to turn on the corresponding number of UV lamps, and send a pulse signal to the diaphragm metering pump to extract PAA from the PAA storage tank and add it to the wastewater.
[0094] S7: Regularly conduct effluent testing to obtain water quality parameters and verify whether the water quality parameters meet the discharge standards. If they do not meet the standards, adjust the number of UV lamps turned on and the PAA dosage based on the deviation data between the effluent water quality parameters and the discharge standards.
[0095] S8: Regularly maintain wastewater treatment equipment.
[0096] In this embodiment, the average daily discharge of domestic sewage in a certain area is approximately 500 tons, with the following water quality characteristics: COD (Chemical Oxygen Demand) content 180-350 mg / L, SS (Suspended Solids) content 80-150 mg / L, ammonia nitrogen content 25-40 mg / L, total nitrogen content 30-50 mg / L, total phosphorus content 3-8 mg / L, and fecal coliform count 10.5 -10 6 Units / L. The reactor is installed at the wastewater treatment plant, with the influent zone connected to the wastewater network and the effluent zone connected to the municipal wastewater network.
[0097] Preferably, based on a water quality sensor and an image acquisition device, at least six measured water quality parameters and corresponding RGB images are acquired. The pixel values of the RGB images are standardized to obtain a standard image composed of standard pixel values, wherein the resolution of the RGB image is 1920×1080. Outliers in the measured water quality parameters are removed using the 3σ criterion. The measured water quality parameters after outlier removal are then subjected to feature reshaping to obtain normalized water quality parameters that eliminate parameter evaluation differences. Image features are extracted from the standard image based on a ResNet-50 network. The feature image is obtained, and the normalized water quality parameters are feature-encoded to obtain the encoded parameters. The feature image and encoded parameters are then concatenated using a weighted concatenation method to obtain fused data. A layered structure for the prediction model is established, and a weighted mean square error (WMSE) algorithm is constructed to balance the predictive importance of each normalized water quality parameter. Based on historical water quality parameters collected over a certain period, an optimizer and cross-validation method are used to iteratively train the training set to obtain the water quality parameter prediction model. The normalized water quality parameter values are output from the water quality parameter prediction model, and an inverse normalization algorithm is constructed to obtain the actual water quality parameter values.
[0098] In this embodiment, the image acquisition device is a camera.
[0099] like Figure 2 As shown, this embodiment provides a wastewater treatment reactor based on multimodal intelligent control, applied to the wastewater treatment method based on multimodal intelligent control as described above. The wastewater treatment reactor includes:
[0100] The system comprises a multimodal control system and an oxidation system. The multimodal control system includes a multimodal data acquisition module, a water quality parameter prediction module, an operational parameter optimization module, and a control execution module. The multimodal data acquisition module is signal-connected to the operational parameter optimization module, and the operational parameter optimization module is signal-connected to the control execution module. The multimodal data acquisition module is used to collect measured water quality parameters and water surface images of wastewater in real time, providing a two-dimensional data source for precise control. The operational parameter optimization module constructs a multi-objective optimization model, using water quality parameters as input, and outputs operational parameter signals for the advanced oxidation system. The control execution module integrates PLC closed-loop control logic and includes a UV lamp control unit and a PAA dosing control unit, used to adjust the number of UV lamps turned on and the amount of PAA added. The oxidation system receives and degrades wastewater based on the operational parameter signals. The advanced oxidation system includes a UV photocatalysis module and a PAA dosing module. The reactor dimensions are 4.8m long × 1m wide × 1.2m high, and the main body of the reactor is made of 304 stainless steel. Made of stainless steel, the interior is divided into 16 independent cavities, each 1m wide and 0.3m long. One side of the main body is connected to the inlet pipe 1, and the top of the main body has a dosing port 2 and a first water outlet zone 3. The other side of the main body has a water outlet 4. One end of the main body has a second water outlet zone 5, and one side of the second water outlet zone 5 forms a reaction zone 6 and an inlet zone 7. A set of UV lamps is installed on the inner wall of each of the second water outlet zone 5, reaction zone 6, and inlet zone 7. The spacing between the UV lamps is 15cm-35cm. The dosing port 2 is connected to the PAA storage tank and the diaphragm metering pump through a corrosion-resistant pipe. The storage tank is placed in a 4℃ light-proof and insulated box and filled with 50L of 40% concentration PAA agent. After the connection is completed, a pressure test is performed to ensure that there is no leakage in the pipeline. Figure 2 The first effluent zone is equipped with monitoring modules, COD sensors, SS sensors, ammonia nitrogen sensors, total nitrogen sensors, total phosphorus sensors, and E. coli sensors at three locations. The sensor probes are fixed to the outside of a hollow cylindrical float, completely submerged in the wastewater and perpendicular to the water flow direction. The probe surfaces are coated with an antifouling coating to reduce biofouling. The water surface monitoring module uses a Raspberry Pi 5 motherboard paired with a Camera Module 3 camera, mounted on the top cover of the float, to capture vertical images of the water surface. The camera lens is equipped with a waterproof and dustproof cover.
[0101] The Siemens S7-1200 series PLC controller, UV ballast, diaphragm metering pump, and fault alarm module are connected to the industrial control bus, completing signal connections with the multimodal data acquisition module and operating parameter optimization module. A data transmission channel between the equipment and the cloud is established through the acquisition gateway, configured with a data upload frequency of once every 30 seconds for water quality sensor data and once every 5 minutes for water surface images. An equipment control cabinet is installed next to the reactor, integrating the PLC controller, power module, and data acquisition gateway. The cabinet is equipped with a cooling fan and dust filter. A liquid level sensor is installed in the PAA storage tank, with a low liquid level threshold set to 10L. When the reagent level falls below the threshold, a replenishment prompt signal is automatically sent. Online water quality monitoring probes are installed at three locations in the first effluent zone for real-time verification of the treatment effect. Data and the control system are linked to achieve closed-loop feedback.
[0102] like Figure 3 As shown, the pixel values of the RGB image are standardized, including cropping the RGB image to 512×512 pixels and constructing a pixel value standardization formula: Eliminating the impact of lighting differences on pixels, among which... These are the original image pixel values. The average pixel value of the image. The standard deviation of the image pixels. Standard pixel values; construct parameter adjustment formula:
[0103] Eliminating differences in parameter evaluation, among which, This represents the historical minimum value of the measured water quality parameters. These are the historical maximum values of the measured water quality parameters. Water quality parameters after eliminating differences in parameter evaluation.
[0104] Preferably, a modified ResNet-50 network is used to extract deep features from the water surface image. The last two fully connected layers in the ResNet-50 network are removed, and the 2048-dimensional feature vector output from the third-to-last layer is retained. This vector contains key information related to water quality, such as water surface turbidity and color gradient.
[0105] Set a weight matrix for the water quality parameters, and convert the six normalized water quality parameters into a water quality feature vector. The encoding formula is constructed based on a fully connected layer:
[0106] The water quality feature vector is encoded as a 256-dimensional vector, where, This is the weight matrix. For offset top, For activation function, This represents the water quality feature vector.
[0107] Construct a weighted concatenation algorithm:
[0108] The feature image and water quality feature vector are fused together, where, θ and θ are both weighting coefficients of the measured water quality parameters corresponding to the water quality feature vector. For vector concatenation, To integrate data.
[0109] In this embodiment, α=0.8, θ=0.3, θ is determined through cross-validation optimization and is used to balance the contributions of image features and measured parameters.
[0110] In this embodiment, the dimensions of the fused data are 2304.
[0111] Preferably, a layered structure for the prediction model is established, and a weighted mean square error (WMSE) algorithm is constructed to balance the predictive importance of each normalized water quality parameter, including:
[0112] The model consists of an input layer, a feature fusion layer, a first fully connected layer, a first dropout layer, a second fully connected layer, a second dropout layer, and an output layer.
[0113] The weighted mean square error algorithm is constructed as follows:
[0114] ,in, For the i-th measured value, the k-th water quality parameter is... These are the model's predicted values. The weights are those of the measured water quality parameters.
[0115] An inverse normalization algorithm is constructed to obtain actual water quality parameter values, including:
[0116] Constructing an inverse normalization algorithm:
[0117] The actual water quality parameter values were obtained, among which, These are actual water quality parameter values. To obtain the normalized values from the model output, historical data on parameter tuning was imported, including six water quality parameters (COD, SS, ammonia nitrogen, total nitrogen, total phosphorus, and E. coli) of the influent and effluent, as well as the corresponding number of UV lamps turned on and PAA dosage. At least 1,000 valid samples were collected in total, and a differentiated evolution optimization method with parameter range correction function was adopted.
[0118] Preferably, the first fully connected layer reduces the 2304-dimensional fused data to 1024-dimensional data, the second fully connected layer reduces the 1024-dimensional fused data to 512-dimensional data, the output layer reduces the 512-dimensional fused data to 6-dimensional data, the dropout probability of the first dropout layer is 0.3, the dropout probability of the second dropout layer is 0.2, COD and SS are set to 0.3, and the remaining water quality parameters are set to 0.1, with a total of 1.
[0119] Preferably, the optimizer is the Adam optimizer, with an initial learning rate set to 10. -4 It decays to 0.5 of its original value every 10 epochs.
[0120] In this embodiment, the optimization targets are set as follows: COD ≤ 50 mg / L, SS ≤ 10 mg / L, ammonia nitrogen ≤ 5 mg / L, total nitrogen ≤ 15 mg / L, total phosphorus ≤ 0.5 mg / L, and fecal coliform count ≤ 10 mg / L after wastewater treatment. 3 With the objective of "minimizing the total UV energy consumption and PAA reagent consumption" and "meeting the Class A discharge standard of the 'Discharge Standard of Pollutants for Municipal Wastewater Treatment Plants' (GB 18918-2002)", the objective function for the target number of activated units / L and the target PAA dosage is constructed as follows:
[0121] ,
[0122]
[0123] ,in, Total operating cost (yuan / hour). This is the UV energy consumption unit price coefficient. Real-time UV energy consumption (kWh). For a single UV lamp tube, This is the unit price coefficient for PAA drugs. This represents the real-time consumption of PAA (g). = 0 -3 , The wastewater flow rate is (m³ / h). Runtime (h) The number of UV lamps turned on. For PAA dosage, COD out Chemical oxygen demand (COD) concentration in effluent; SS out The concentration of suspended solids in the effluent; NH3-N out Total ammonia nitrogen (TN) concentration in the effluent; out Total nitrogen concentration in effluent; TP out Total phosphorus concentration in effluent; Coli out The concentration of E. coli in the effluent.
[0124] In this embodiment, Yuan / (kWh), (k·Wh), , Yuan / g .
[0125] In this embodiment, a binary-real number hybrid encoding is used, wherein the number of UV lamps turned on... PAA dosage is determined using a 4-bit binary code (corresponding to a value range of 1-12). A 16-bit real number encoding (corresponding to a value range of 5-50 mg / L) is used; 100 initial individuals are randomly generated to form the initial population, and the population individual format is [N UV’ D PAA The objective function is transformed into a fitness function. A higher fitness value indicates a better individual. The fitness function is as follows:
[0126]
[0127] in, Let be the compliance coefficient for the k-th water quality parameter. If the parameter meets the standard, then... If the standard is not met, then The roulette wheel selection method is used, where the probability of an individual being selected is directly proportional to its fitness value. The selection probability formula is as follows:
[0128]
[0129] in, Let be the selection probability of the i-th individual. Let be the fitness value of the i-th individual;
[0130] Cross-operation: The number of UV lamps turned on is coded using single-point cross-operation, with a cross-operation probability set to 0.7; the PAA dosage is coded using arithmetic cross-operation, with the cross-operation formula as follows:
[0131]
[0132]
[0133] in, A random number between 0 and 1 , PAA dosage for parent individuals , PAA dosage for offspring individuals;
[0134] The number of UV lamps turned on is encoded using bit-flip mutation, with a mutation probability set to 0.05; the PAA dosage is encoded using Gaussian mutation, with the mutation formula as follows:
[0135] D PAA’ =D PAA +N(0,σ 2 )
[0136] Where N(0,σ) 2 () is a mean of 0 and a variance of Gaussian random numbers, after mutation, must ensure Within the range of 5-50 mg / L;
[0137] In this embodiment, effluent testing is performed periodically to obtain water quality parameters and verify whether the water quality parameters meet the discharge standards, including:
[0138] Dynamic adjustments are made based on effluent water quality testing data, and the adjustment coefficients are calculated as follows:
[0139]
[0140]
[0141] in, This is the adjustment value for the number of UV lamps turned on (rounded down). Adjusted value for PAA dosage (mg / L) To adjust the weights (COD and SS are set to 0.3, and the rest to 0.1), This represents the measured value of the effluent water quality for the kth item. This is the k-th water quality standard value; after adjustment, it must be ensured that... Within the range of groups 1-12, Within the range of 1-50 mg / L.
[0142] Preferably, regular maintenance of wastewater treatment equipment includes:
[0143] Regularly monitor the response status of the UV ballast and / or diaphragm metering pump. When the UV ballast and / or diaphragm metering pump fails to respond within a preset time, send an audible and visual alarm signal to the cloud.
[0144] A liquid level sensor is used to monitor the liquid level in the PAA storage tank to obtain the remaining amount of the drug. When the liquid level is lower than the preset value, a drug replenishment signal is sent to the cloud.
[0145] In this embodiment, by setting up an oxidation system in conjunction with turning on the UV lamp and adding PAA, the pollutants in the wastewater can be efficiently degraded, ensuring that the water quality parameters meet the Class A discharge standard of the "Discharge Standard of Pollutants for Municipal Wastewater Treatment Plants" (GB 18918-2002).
[0146] In this embodiment, the UV photocatalytic module includes 14 sets (2 sets as backup) of ultraviolet lamps, with 3 lamps in each set. It uses 254nm ultraviolet light to irradiate the water, with a single set of lamps having an irradiation intensity ≥30mW / cm². 2 Each group of lamps is arranged in an alternating pattern with intervals of 15cm-35cm-35cm-15cm to ensure uniform ultraviolet irradiation in the reaction zone and an irradiation coverage rate of ≥95%.
[0147] The PAA dosing module includes a PAA storage tank and a metering pump. A dosing port (20mm in diameter) is located at the top of the reactor inlet area, and the dosing port is equipped with an atomizing nozzle to ensure that the PAA agent is fully mixed with the wastewater. The storage tank has a capacity of 50L and stores 40% concentration PAA at 4℃ in the dark. The outer layer of the storage tank is equipped with a heat insulation layer, and the temperature fluctuation range is controlled within ±2℃. The metering pump has an adjustment range of 0.01-10L / h.
[0148] Preferably, the multimodal data acquisition module includes a water quality parameter sensor and a water surface status monitoring module;
[0149] The water quality sensors include COD, SS, ammonia nitrogen, total nitrogen, total phosphorus, and E. coli sensors. The probes of each sensor are fixed in the inlet area of the reactor. The output of the water quality sensors is connected to the data acquisition gateway, which transmits the collected data to the cloud.
[0150] The UV lamp control unit includes a PLC controller and a UV ballast. The PLC controller receives the lamp activation number signal output by the operating parameter optimization module and controls the on / off state of the UV ballast to realize the activation and deactivation of the corresponding number of UV lamps. The UV lamps are activated sequentially in the reverse order of the water flow direction and deactivated in the opposite order. The PAA dosing control unit consists of a PLC controller and a metering pump. The PLC controller receives the PAA dosing amount signal output by the model.
[0151] In this embodiment, the water surface status monitoring module adopts Raspberry Pi series products, including a motherboard (Raspberry Pi 5), a camera module (Raspberry Pi Camera Module 3), and a data acquisition gateway. The camera acquires water surface images every five minutes and uploads them to the cloud. The camera is installed on the cover plate above the float and captures images of the water surface vertically.
[0152] In this embodiment, the formula for calculating the operating frequency of the metering pump is:
[0153] ,in, The operating frequency (Hz) of the metering pump. The wastewater flow rate is (m³ / h). PAA dosage (mg / L) This refers to the concentration of the drug in the PAA storage tank (mg / L, default 400000mg / L). The volume of a single stroke of the metering pump (L / stroke, set to 0.01L). The correction factor is 1.05, calibrated based on actual dosing error. The PLC controller adjusts the operating frequency of the metering pump via pulse signals to control the PAA dosing rate, with a dosing accuracy of ±2%. The metering pump is connected to the PAA storage tank, which is equipped with a liquid level sensor (measuring range 0-50L, accuracy ±0.5L). When the liquid level is below 5L, a signal is sent to the PLC controller to prompt for replenishment of the drug.
[0154] Preferably, the wastewater treatment reactor is a UV-PAA reactor.
[0155] This embodiment also provides a method for using a UV-PAA reactor, including:
[0156] Wastewater surface images and measured water quality parameters from the past three months were collected to train a water quality parameter prediction model and a parameter optimization model. A multimodal control system was embedded into the water quality parameter prediction model. Wastewater to be treated was introduced into the influent zone of the reactor body, with the influent flow rate controlled at 20 m³ / h. The water surface status monitoring module collected RGB images of the water surface every 5 minutes and uploaded them to the cloud. The water quality parameter prediction model was called, and after preprocessing, feature extraction, and feature fusion of the uploaded water surface images, it output 6 normalized water quality parameters. Then, the actual water quality parameter values were obtained through inverse normalization. The prediction process took ≤2 seconds. The parameter optimization model was run, using the predicted actual water quality parameters as input, and through calculation, it output the optimal number of UV lamps to be turned on. The optimal PAA dosage is determined, with the optimization process taking ≤5s. The control execution module receives the optimal parameters output by the operating parameter optimization module, and the PLC controller sends control signals to the UV ballast, completing the on / off control of the corresponding number of UV lamps within 0.5s. The on-off sequence follows the reverse flow order. Simultaneously, the PLC controller calculates the metering pump operating frequency based on the wastewater flow data and adjusts the metering pump through pulse signals to extract 40% concentration PAA from the PAA storage tank and add it to the wastewater through the atomizing dosing port at the top of the inlet area, with a dosing response time ≤1s, achieving UV-PAA synergistic oxidation treatment. Effluent water quality is tested daily, and the reactor effluent water quality parameters are measured to verify whether it meets Class A standards. Emission standards; if all test results meet the standards, maintain the current operating parameters; if there are parameters that do not meet the standards, calculate the water quality deviation value, calculate the adjustment amount according to the above dynamic feedback adjustment formula, re-optimize the number of UV lamps to be turned on and the PAA dosage, forming a closed-loop optimization, and test the effluent water quality again within 1 hour after adjustment until it meets the standards; monitor the remaining amount of the agent in real time through the liquid level sensor of the PAA storage tank. When the liquid level is lower than 5L, the background monitoring terminal issues a agent replenishment prompt. The operator needs to replenish 40% concentration PAA to the full liquid level (50L) of the storage tank within 1 hour; regularly clean and maintain the reactor body, UV lamps, and sensors to ensure the long-term efficient operation of the reactor.
[0157] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A wastewater treatment method based on multimodal intelligent control, characterized in that, include: A water quality parameter prediction model is constructed by collecting images of the wastewater surface as input variables and measuring water quality parameters as output variables. Based on the water quality parameter values output by the water quality parameter prediction model, the actual water quality parameter values are obtained by inversion. Based on the actual water quality parameters, the number of UV lamps to be turned on and the amount of PAA to be added were calculated. Set optimization objectives and construct objective functions to obtain the target number of UV lamps to be turned on and the target PAA dosage: The optimization targets are set as follows: effluent COD ≤ 50 mg / L, SS ≤ 10 mg / L, ammonia nitrogen ≤ 5 mg / L, total nitrogen ≤ 15 mg / L, total phosphorus ≤ 0.5 mg / L, and fecal coliform count ≤ 10. 3 Units / L; The objective function for determining the target number of activations and the target PAA dosage is as follows: , , in, Total operating cost (yuan / hour). This is the UV energy consumption unit price coefficient. Real-time UV energy consumption (kWh). For a single UV lamp tube, This is the unit price coefficient for PAA drugs. This represents the real-time consumption of PAA (g). = 0 -3 , The wastewater flow rate is (m³ / h). Runtime (h) The number of UV lamps turned on. For PAA dosage, COD out Chemical oxygen demand (COD) concentration in effluent; SS out The concentration of suspended solids in the effluent; NH3-N out Total ammonia nitrogen (TN) concentration in the effluent; out Total nitrogen concentration in effluent; TP out Total phosphorus concentration in effluent; Coli out The concentration of E. coli in the effluent; Based on the coding structure constraints, the number of target UV lamps turned on and the target PAA dosage are iteratively evaluated to obtain the number of UV lamps turned on and the PAA dosage that meet the iteration termination condition, thus obtaining a parameter optimization model: A binary-real number hybrid coding method is used to encode the number of UV lamps turned on and the PAA dosage; an initial population for the number of UV lamps turned on and the PAA dosage is generated; the objective function is transformed into a fitness function; a roulette wheel selection method is used to select UV lamps and PAA dosage; based on selection, crossover, and mutation operations, the selection fitness and PAA dosage range for a single UV lamp are obtained; the iteration termination condition is set as follows: when the number of iterations reaches 100 generations, or the change rate of the selection fitness value of UV lamps is less than 0.01 for 10 consecutive generations, the iteration stops, obtaining the number of UV lamps turned on and the corresponding PAA dosage that meet the iteration termination condition; based on the effluent water quality detection data, a parameter optimization model is constructed: , ,in, This is the adjustment value for the number of UV lamps turned on, rounded down. Adjusted value for PAA dosage (mg / L) To adjust the weights, COD and SS are set to 0.3, and the rest to 0.
1. This represents the measured value of the effluent water quality for the kth item. This is the k-th water quality standard value; after adjustment, it must be ensured that... Within the range of groups 1-12, Within the range of 1-50 mg / L; Send a control signal to the UV ballast to turn on the corresponding number of UV lamps, and send a pulse signal to the diaphragm metering pump to draw PAA from the PAA storage tank and add it to the wastewater. Regularly test the effluent to obtain water quality parameters and verify whether the water quality parameters meet the discharge standards. If they do not meet the standards, adjust the number of UV lamps turned on and the PAA dosage based on the deviation data between the effluent water quality parameters and the discharge standards. Regularly maintain wastewater treatment equipment.
2. The wastewater treatment method based on multimodal intelligent control according to claim 1, characterized in that, Using images of the wastewater surface as input variables and measured water quality parameters as output variables, a water quality parameter prediction model is constructed, including: Based on a water quality sensor and an image acquisition device, at least six measured water quality parameters and corresponding RGB images are acquired. The pixel values of the RGB images are standardized to obtain a standard image composed of standard pixel values, wherein the resolution of the RGB image is 1920×1080. The 3σ criterion is used to remove outliers from the measured water quality parameters. The measured water quality parameters after removing outliers are then subjected to feature reshaping to obtain normalized water quality parameters that eliminate parameter evaluation differences. Image features are extracted from the standard image based on the ResNet-50 network to obtain a feature image. Normalized water quality parameters are then encoded to obtain encoding parameters. The feature image and encoding parameters are then concatenated using a weighted concatenation method to obtain fused data. A layered structure for the prediction model is established, and a weighted mean square error algorithm is constructed to balance the prediction importance of each normalized water quality parameter. Based on historical water quality parameters collected over a certain period, an optimizer and cross-validation method are used to iteratively train the training set to obtain a water quality parameter prediction model. The water quality parameter prediction model outputs normalized water quality parameter values, and an inverse normalization algorithm is constructed to obtain the actual water quality parameter values.
3. The wastewater treatment method based on multimodal intelligent control according to claim 2, characterized in that, The pixel values of the RGB image are standardized, including: The RGB image is cropped to 512×512 pixels, and a pixel value normalization formula is constructed: Eliminating the impact of lighting differences on pixels, among which... These are the original image pixel values. The average pixel value of the image. The standard deviation of the image pixels. Standard pixel values; The measured water quality parameters after outlier removal are characterized and remodeled to eliminate parameter evaluation discrepancies, including: Construct the parameter adjustment formula: Eliminating differences in parameter evaluation, among which, This represents the historical minimum value of the measured water quality parameters. These are the historical maximum values of the measured water quality parameters. Water quality parameters after eliminating differences in parameter evaluation.
4. The wastewater treatment method based on multimodal intelligent control according to claim 3, characterized in that, Image features are extracted from the standard image using a ResNet-50 network to obtain a feature image. Normalized water quality parameters are then encoded to obtain encoded parameters. The feature image and encoded parameters are then concatenated using a weighted concatenation method to obtain fused data, including: Remove the last two fully connected layers in the ResNet-50 network and retain the 2048-dimensional feature vector output from the third-to-last layer. The 2048-dimensional feature vector includes information on water turbidity and color gradient. Set the weight matrix for water quality parameters, convert the normalized water quality parameters into water quality feature vectors, and construct the encoding formula based on a fully connected layer: The water quality feature vector is encoded as a 256-dimensional vector, where, This is the weight matrix. For offset top, For activation function, This represents the water quality feature vector. Construct a weighted concatenation algorithm: The feature image and water quality feature vector are fused together, where, θ and θ are both weighting coefficients of the measured water quality parameters corresponding to the water quality feature vector. For vector concatenation, To integrate data.
5. The wastewater treatment method based on multimodal intelligent control according to claim 4, characterized in that, The establishment of the layer structure of the prediction model and the construction of a weighted mean square error algorithm to balance the predictive importance of each normalized water quality parameter include: The model consists of an input layer, a feature fusion layer, a first fully connected layer, a first dropout layer, a second fully connected layer, a second dropout layer, and an output layer. The weighted mean square error algorithm is constructed as follows: ,in, For the i-th measured value, the k-th water quality parameter is... These are the model's predicted values. The weights of the measured water quality parameters; The method for constructing the inverse normalization algorithm to obtain actual water quality parameter values includes: Constructing an inverse normalization algorithm: The actual water quality parameter values were obtained, among which, These are actual water quality parameter values. This is the normalized value output by the model.
6. The wastewater treatment method based on multimodal intelligent control according to claim 5, characterized in that, Regular maintenance of wastewater treatment equipment includes: Regularly monitor the response status of the UV ballast and / or diaphragm metering pump. When the UV ballast and / or diaphragm metering pump fails to respond within a preset time, send an audible and visual alarm signal to the cloud. A liquid level sensor is used to monitor the liquid level in the PAA storage tank to obtain the remaining amount of the drug. When the liquid level is lower than the preset value, a drug replenishment signal is sent to the cloud.
7. A wastewater treatment reactor based on multimodal intelligent control, characterized in that, The wastewater treatment reactor, applied to the wastewater treatment method based on multimodal intelligent control as described in any one of claims 1-6, comprises: The system comprises a multimodal control system and an oxidation system. The multimodal control system includes a multimodal data acquisition module, a water quality parameter prediction module, an operating parameter optimization module, and a control execution module. The multimodal data acquisition module is signal-connected to the operating parameter optimization module, and the operating parameter optimization module is signal-connected to the control execution module. The multimodal data acquisition module is used to acquire measured water quality parameters and water surface images of wastewater in real time, providing a two-dimensional data source for precise control. The operating parameter optimization module constructs a multi-objective optimization model, taking water quality parameters as input, and outputs operating parameter signals for the advanced oxidation system. The control execution module integrates PLC closed-loop control logic and includes a UV lamp control unit and a PAA dosing control unit. The control execution module is used to adjust the number of UV lamps turned on and the amount of PAA added. The oxidation system receives and degrades wastewater based on the operating parameter signals. The advanced oxidation system includes a UV photocatalysis module and a PAA dosing module.
8. The wastewater treatment reactor based on multimodal intelligent control according to claim 7, characterized in that: The multimodal data acquisition module includes a water quality parameter sensor and a water surface condition monitoring module; The water quality sensors include COD, SS, ammonia nitrogen, total nitrogen, total phosphorus, and E. coli sensors. The probes of each sensor are fixed in the inlet area of the reactor. The output of the water quality sensors is connected to the data acquisition gateway, which transmits the collected data to the cloud. The UV lamp control unit includes a PLC controller and a UV ballast. The PLC controller receives the lamp activation quantity signal output by the operating parameter optimization module and controls the on / off state of the UV ballast to realize the activation and deactivation of the corresponding number of UV lamps. The UV lamps are activated sequentially in the reverse order of the water flow direction and deactivated in the opposite order. The PAA dosing control unit consists of a PLC controller and a metering pump. The PLC controller receives the PAA dosage signal output by the model.