A method for generating a control model for a chemical production wastewater treatment system
Through online monitoring and chemical engineering simulation, combined with high-definition industrial cameras and image processing technology, the control model of wastewater treatment system is automatically corrected and optimized, and the problem of relying on manual intervention and lack of adaptability in traditional methods is solved, achieving the accuracy of wastewater recycling control and the efficient stability of the system.
Patent Information
- Application Number
- CN202510127792.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-05
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-02-05
AI Technical Summary
The correction of the traditional wastewater treatment system control model relies on manual intervention and lacks adaptability, resulting in the failure to detect control defects in a timely manner or make mistakes in judgment, affecting the stability and efficiency of the system.
Chemical wastewater data is collected through online monitoring instruments, chemical engineering simulation software is used to build a wastewater control model, combined with high-definition industrial cameras and image processing technology, identify centrifugal pump leakage and pipeline locations, and perform automated control model correction and optimization.
It realizes accurate judgment and model optimization of wastewater recycling control, timely discovers control abnormalities, improves the stability and efficiency of the system, reduces the risk of manual misjudgment and misjudgment, and improves the system's adaptability and safety.
Smart Images

Figure CN119556575B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wastewater treatment, and particularly relates to a method for generating a control model for a chemical production wastewater treatment system. Background Art
[0002] In traditional methods, the correction of the wastewater control model is usually based on the identification result of centrifugal pump leakage. However, this correction process relies heavily on manual intervention and lacks adaptability. If control defects are not discovered in time or misjudged, it will lead to a lag in the correction of the control model, thereby affecting the stability and efficiency of the entire wastewater treatment system. In traditional methods, the identification and processing of wastewater sedimentation tank images mainly rely on preset parameters set manually. The image processing process is relatively single and lacks intelligent analysis means. This manual adjustment method not only increases labor costs but also leads to misjudgments and missed judgments, affecting the accuracy and efficiency of image recognition. Although traditional methods perform anomaly judgments on wastewater recovery control data, due to relatively simple monitoring means and early warning mechanisms, they cannot effectively cope with sudden abnormal situations. For example, problems such as centrifugal pump leakage and pipeline corrosion are often difficult to detect in the initial stage, resulting in abnormal data that cannot be quickly identified and processed, thus affecting the reliability and safety of the wastewater treatment system. Summary of the Invention
[0003] Based on this, it is necessary for the present invention to provide a method for generating a control model for a chemical production wastewater treatment system to solve at least one of the above technical problems.
[0004] To achieve the above object, a method for generating a control model for a chemical production wastewater treatment system includes the following steps:
[0005] Step S1: Use on-line monitoring instruments to collect chemical wastewater data, including stannous wastewater data and etching solution waste liquid data; determine the wastewater recovery control stage according to the chemical wastewater data; and construct a wastewater control model based on the wastewater recovery control stage and using chemical engineering simulation software.
[0006] Step S2: Input the chemical wastewater data into the wastewater control model, and use simulation software to simulate the wastewater recovery control process to obtain wastewater recovery control data, and perform control anomaly judgment on the wastewater recovery control data to obtain abnormal wastewater data.
[0007] Step S3: Use a high-definition industrial camera to collect wastewater sedimentation tank images, and identify and obtain centrifugal pump images from the wastewater sedimentation tank images; locate the pipeline position based on the centrifugal pump images to obtain pipeline position data; obtain pipeline liquid images according to the pipeline position data and perform color detection. If the color of the pipeline liquid does not conform to the preset color value, it is judged as centrifugal pump leakage.
[0008] Step S4: Identify the control defects of the centrifugal pump leakage, and modify the wastewater control model based on the control defects to generate an optimized wastewater control model.
[0009] In the present invention, by using on-line monitoring instruments to collect chemical wastewater data and constructing a wastewater control model through simulation software, it is possible to achieve accurate judgment of the wastewater recovery control stage and model optimization. Through the simulation of wastewater recovery control data and abnormal judgment, it is possible to timely detect control anomalies occurring in the wastewater recovery process, thereby identifying abnormal wastewater data and making corresponding treatments to ensure the stability and efficiency of the wastewater recovery process. During the image recognition process of the wastewater sedimentation tank, the use of a high-definition industrial camera improves the clarity and accuracy of the image, making the acquisition of the centrifugal pump and pipeline position data more accurate. By using image processing technology to detect the color of the pipeline liquid and compare it with the preset color value, it is possible to quickly identify changes in the pipeline liquid and timely detect centrifugal pump leakage problems, thereby avoiding the further development of leakage incidents and enhancing the safety and reliability of the system. Through the identification of control defects and model modification, the wastewater control model is optimized, avoiding the deficiencies of relying on manual intervention in traditional methods and reducing the risks of human misjudgment and missed judgment. The automation and intelligence of the entire process enhance the adaptive ability of the system, reduce the dependence on manual operations, and enable the wastewater treatment system to operate more efficiently and stably. Through this integrated system, it is possible to timely detect and respond to sudden abnormal situations, such as centrifugal pump leakage and pipeline corrosion, thereby improving the reaction speed and treatment capacity of the wastewater treatment process and ultimately ensuring the reliability, safety, and efficiency of the wastewater treatment system. Brief Description of the Drawings
[0010] Other features, objectives, and advantages of the present invention will become more apparent by reading the detailed description of the non-restrictive embodiments with reference to the following drawings:
[0011] Figure 1 It is a schematic diagram of the step flow for the method of generating a control model for a chemical production wastewater treatment system of the present invention;
[0012] Figure 2 It is a detailed schematic diagram of the step flow of step S1 in the present invention;
[0013] Figure 3 It is a detailed schematic diagram of the step flow of step S14 in the present invention;
[0014] The realization of the objectives, functional features, and advantages of the present invention will be further described with reference to the embodiments and the drawings. Detailed Embodiments
[0015] The technical method of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those skilled in the art within the scope of the present invention without creative work belong to the scope of protection of the present invention.
[0016] In addition, the accompanying drawings are only schematic diagrams of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor methods and / or microcontroller methods.
[0017] It should be understood that although the terms "first", "second", etc. may be used here to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used here includes any and all combinations of one or more of the listed related items.
[0018] To achieve the above object, please refer to Figures 1 to 3 , the present invention provides a method for generating a control model for a chemical production wastewater treatment system, and the method includes the following steps:
[0019] Step S1: Use on-line monitoring instruments to collect chemical wastewater data, including tin-containing wastewater data and etching solution waste liquid data; determine the wastewater recovery control stage according to the chemical wastewater data; and construct a wastewater control model based on the wastewater recovery control stage and using chemical engineering simulation software.
[0020] In this embodiment, online monitoring instruments are used to collect chemical wastewater data in real time. Basic water quality parameters such as pH value, temperature, chemical oxygen demand (COD), total suspended solids (TSS), and heavy metal ion concentration of tin-containing wastewater and etching solution waste liquid are collected through sensors. In the tin-containing wastewater, special attention is paid to the concentration of tin ions (usually setting the threshold value at 10 mg / L), while in the etching solution waste liquid, special attention is paid to the concentrations of fluoride and sulfate ions (setting the threshold values at 2 mg / L and 5 mg / L respectively). After the data is collected, it is transmitted to the central processing unit in real time through the chemical wastewater treatment system, and the data is classified according to the set wastewater recovery control stages (such as primary pretreatment, intermediate recovery, advanced purification, etc.). For example, when the COD concentration in the wastewater exceeds the set threshold value of 200 mg / L, it is determined that it needs to enter the advanced purification stage. Based on these control stages, a wastewater control model is established through chemical engineering simulation software (such as Aspen Plus or HYSYS) to simulate the wastewater flow and treatment processes in different stages, and corresponding control parameters such as reactor volume, flow rate setting, and mixing time are obtained. Using this model, the treatment plans and equipment configurations required for different control stages can be predicted.
[0021] Step S2: Input the chemical wastewater data into the wastewater control model, use the simulation software to simulate the wastewater recovery control process, obtain the wastewater recovery control data, and perform an abnormal judgment on the wastewater recovery control data to obtain abnormal wastewater data;
[0022] In this embodiment, data such as the pH value, COD, and TSS of the tin-containing wastewater and the etching solution waste liquid are input into the model. The model calculates the energy consumption, reaction time, and required chemical dosage in the wastewater recovery control process of each stage through these parameters. Subsequently, the simulation software is used to simulate the wastewater recovery process to obtain the recovery control data including wastewater flow rate, reactant consumption, etc. To ensure the effectiveness of the control data, a threshold range is set. The pH value should be maintained between 6.0 and 9.0, and the COD value should be controlled below 100 mg / L. When data anomalies occur in the simulation results, the system will automatically perform an abnormal judgment on the recovery control data. If the pH value of the wastewater fluctuates abnormally (for example, exceeding the set threshold range) or the COD concentration exceeds the standard (for example, exceeding 100 mg / L), then mark this data as abnormal wastewater data and enter the next processing stage.
[0023] Step S3: Use a high-definition industrial camera to collect an image of the wastewater sedimentation tank, identify and obtain the image of the centrifugal pump from the image of the wastewater sedimentation tank; locate the pipeline position based on the centrifugal pump image to obtain pipeline position data; obtain the pipeline liquid image according to the pipeline position data and perform color detection. If the color of the pipeline liquid does not conform to the preset color value, it is determined that the centrifugal pump is leaking;
[0024] In this embodiment, the camera is installed above the sedimentation tank to ensure that it can cover the entire sedimentation tank area and collect clear images in real time. Through image processing algorithms (such as edge detection and morphological processing techniques based on OpenCV), the structural features of the centrifugal pump are identified from the images. During the identification process, the feature matching algorithm in image processing is used to accurately locate the position of the centrifugal pump image by comparing the external features of the centrifugal pump (such as circular shape, blade shape). Then, according to the coordinate information of the centrifugal pump image, the machine vision algorithm is used to locate the position of the wastewater pipeline. At this time, the data of the key positions of the pipeline (such as the inlet and outlet ports) are extracted, and the pipeline position data are generated. Further, the color of the pipeline liquid is detected through image recognition technology. Color space conversion (such as RGB to HSV) is used and color threshold criteria are set. For example, the normal color range of the liquid in the pipeline is set as the HSV value from (0, 0, 80) to (30, 255, 255). If the liquid color deviates from this preset range (such as more than 30% change), it is determined that the centrifugal pump is leaking.
[0025] Step S4: Identify the control defects of the centrifugal pump leakage, and based on the control defects, modify the wastewater control model to generate an optimized wastewater control model.
[0026] In this embodiment, the pipeline position data and the liquid color detection results obtained from the image recognition process are input into the defect recognition module. If the color detection result shows that the pipeline liquid color deviates from the set threshold, it is marked as centrifugal pump leakage, and the specific leakage position and degree are further analyzed. After identifying the control defects, the wastewater control model is immediately modified by the model modification module. According to the positioning data of the leakage point, the corresponding flow control parameters and reactor operation modes in the wastewater treatment process are adjusted. If the leakage occurs at a key control point of the wastewater flow (such as the wastewater return pipeline), the flow rate of the return pipeline and the opening and closing states of the control valves are adjusted to reduce the impact of the leakage on the system stability. At the same time, the parameters in the model, such as flow velocity, pump speed, etc., are updated to maintain the treatment effect in case of leakage, and an optimized wastewater control model is generated. In the optimized control model, the flow rate set value and the pump speed will be automatically adjusted according to the new system state to ensure the stability and efficiency of the wastewater treatment process.
[0027] Optionally, step S1 is specifically:
[0028] Step S11: Measure the concentration of tin ions using an online heavy metal sensor, where the set acquisition frequency is once per minute and the measurement range is 0 - 100 mg / L to obtain the tin-containing wastewater data;
[0029] In this embodiment, an online heavy metal sensor is used to measure the concentration of tin ions. The online heavy metal sensor is installed at an appropriate position in the pipeline through which the tin-containing wastewater flows. The measurement range of the sensor is set to 0 - 100 mg / L, and the acquisition frequency is once per minute. The sensor determines the concentration of tin ions in the wastewater through the principle of electrochemical reaction, specifically calculating the concentration of tin ions based on the potential change of the electrode. In actual operation, the threshold of the sensor is set to 10 mg / L. When the concentration of tin ions exceeds this value, the sensor outputs a signal indicating that the wastewater needs further treatment. The sensor contains a solid-state electrode, and the concentration of tin ions is obtained in real time by comparing the current intensity of its reaction with tin ions in the wastewater. The collected data is automatically transmitted to the central control unit through a data acquisition system for processing.
[0030] Step S12: Use a pH sensor to monitor the pH value of the etching solution waste liquid in real time. Set the measurement range to 0 - 14 pH with an accuracy of ±0.01 pH to obtain the etching solution waste liquid data.
[0031] In this embodiment, a pH sensor is installed on the flow pipeline of the etching solution waste liquid. The measurement range of this sensor is set to 0 - 14 pH with an accuracy of ±0.01 pH. In the actual operation process, the pH sensor determines the pH value by measuring the hydrogen ion concentration in the waste liquid. A glass electrode is used inside the sensor, and the change in the electrode potential is proportional to the hydrogen ion concentration in the liquid. During installation, ensure that the sensor is in good contact with the waste liquid and calibrate it regularly to ensure the measurement accuracy. The pH sensor automatically collects data once per minute and transmits the real-time pH value to the central processing system through a data transmission system. During the entire wastewater treatment process, the normal range of the pH value is set to 4 - 12 pH. If the measured value exceeds this range, the system will automatically alarm and initiate corresponding control measures.
[0032] Step S13: Integrate the data of the tin-containing wastewater and the data of the etching solution waste liquid to obtain the chemical industrial wastewater data.
[0033] In this embodiment, the heavy metal sensor and the pH sensor are used to collect the tin ion concentration data of the tin-containing wastewater and the pH value data of the etching solution waste liquid respectively. The data acquisition system performs time series synchronization processing on the original data obtained from the two sensors to ensure that the data acquisition time and acquisition frequency are consistent. Then, the tin ion concentration data collected per minute and the pH value data collected per minute are combined into a comprehensive chemical industrial wastewater data set in chronological order. To ensure the accuracy of data integration, the data system verifies the wastewater data collected each time to ensure that the data is complete and not lost. If abnormal data is found (such as the sensor acquisition value exceeding the preset range), the abnormal data is marked and corrected. Finally, the integrated chemical industrial wastewater data can be used for judgment in the subsequent wastewater recovery control stage.
[0034] Step S14: Determine the wastewater recovery control stage based on the chemical industrial wastewater data to obtain the wastewater recovery control stage;
[0035] In this embodiment, based on the concentration of tin ions in the tin-containing wastewater and the pH value of the etching solution waste liquid, the stage of wastewater recovery is determined through preset thresholds and control rules. If the concentration of tin ions exceeds 10 mg / L and the pH value is between 4 and 12, the system determines that it enters the primary recovery stage; if the concentration of tin ions is between 0 and 10 mg / L and the pH value is greater than 12, the system enters the intermediate recovery stage; if both the concentration of tin ions and the pH value are normal (the concentration of tin ions is lower than 1 mg / L and the pH value is between 8 and 10), then it enters the advanced purification stage. This judgment process is completed using a preset rule engine to ensure that each wastewater sample can be assigned to the corresponding recovery stage according to the actual parameters. The control system automatically adjusts the wastewater treatment process through data analysis and parameter setting.
[0036] Step S15: Based on the wastewater recovery control stage, use chemical engineering simulation software to construct a wastewater control model.
[0037] In this embodiment, the model parameters of the wastewater treatment process are set according to the chemical industrial wastewater data (such as the concentration of tin ions, pH value, etc.) and the determined recovery control stage (such as primary recovery, intermediate recovery, advanced purification). In the primary recovery stage, the set chemical reaction time is 30 minutes and the reactor capacity is 1000 L; in the intermediate recovery stage, the set chemical agent dosage is 50 mg / L and the reaction temperature is 25 °C; in the advanced purification stage, the set flow rate of the filtration system is 2 m³ / h and the filtration material replacement period is once every 6 months. Using chemical engineering simulation software (such as Aspen Plus or HYSYS), after inputting these parameters, the software automatically constructs a wastewater control model to simulate data such as the reaction process, flow rate adjustment, and energy consumption in different control stages. Finally, the obtained wastewater control model can reflect the wastewater recovery process in different treatment stages in real time, providing accurate data support and optimization solutions for subsequent operations.
[0038] Optionally, step S14 is specifically:
[0039] Step S141: Perform concentration division on the tin-containing wastewater data. If the concentration of tin ions is below 50 mg / L, ion exchange recovery control is adopted; if the concentration of tin ions exceeds 50 mg / L, electrolytic deposition recovery control is adopted to obtain ion exchange recovery control stage data and electrolytic deposition recovery control stage data;
[0040] In this embodiment, real-time tin ion concentration data is obtained from an online heavy metal sensor. The collected tin ion concentration data is a continuous time series, and is collected once per minute. When performing statistical processing on the data, a threshold value of 50 mg / L is set. If the tin ion concentration is lower than 50 mg / L, it enters the ion exchange recovery control stage. The technology adopted in the ion exchange recovery control stage is to exchange the tin ions in the wastewater with other harmless ions through an ion exchange resin. During this process, the exchange capacity of the resin should be dynamically adjusted according to the tin ion concentration in the wastewater, and the usage amount of the resin is proportioned at 5 kg of resin per ton of wastewater. If the tin ion concentration exceeds 50 mg / L, it enters the electrolytic deposition recovery control stage. During the electrolytic deposition recovery process, the wastewater is treated through an electrolytic cell, the current density is set at 20 A / m², and the electrolysis time is set at 30 minutes to ensure that the tin ions in the wastewater can be effectively removed through the electrolytic deposition process. Finally, the data of the ion exchange recovery control stage and the electrolytic deposition recovery control stage are obtained, and the data includes parameters such as concentration change and treatment time.
[0041] Step S142: Adjust the pH value of the etched solution waste liquid data to obtain neutral pH value etched solution waste liquid data, and set the precipitation method recovery control for the neutral pH value etched solution waste liquid data to obtain the precipitation method recovery control stage data;
[0042] In this embodiment, the real-time pH value of the etched solution waste liquid is measured by a pH sensor. If the measured pH value is lower than the set threshold value of 4 or higher than the set threshold value of 12, acid-base adjustment is required. According to the data setting, the pH value is adjusted to the neutral range of 6 - 8 pH. In actual operation, it can be adjusted by adding an acidic substance (such as sulfuric acid) or a basic substance (such as sodium hydroxide solution), and the specific addition amount is calculated according to the acidity and amount of the waste liquid. For example, if the volume of the waste liquid is 100 L and the pH value is 2.5, then 10 L of concentrated sulfuric acid needs to be added to adjust to a pH value of 6. After adjustment, the obtained neutral pH value etched solution waste liquid data enters the precipitation method recovery control stage. The precipitation method recovery control uses chemical precipitation to remove heavy metal ions in the waste liquid. For example, the precipitation reaction is adjusted by adding calcium hydroxide, and the addition amount is set at 20 g of calcium hydroxide per 100 L of waste liquid. The precipitation reaction duration is 30 minutes to ensure that most of the heavy metals in the waste liquid form precipitates and are removed. The obtained precipitation method recovery control stage data includes parameters such as the metal removal rate after the precipitation reaction, the pH value of the wastewater, and the precipitation time.
[0043] Step S143: Perform stage integration according to the data of the ion exchange recovery control stage, the electrolytic deposition recovery control stage, and the precipitation method recovery control stage, so as to obtain the wastewater recovery control stage.
[0044] In this embodiment, the main data of each recovery stage are collected, including data such as the change in the heavy metal concentration in the wastewater, the adjustment of the pH value, and the treatment time. For the ion exchange recovery control stage, the data includes the removal efficiency of tin ions, the resin dosage, the recovery time, etc.; for the electrolytic deposition recovery control stage, the data includes the current density, the electrolysis time, the removal amount of tin ions, etc.; for the precipitation method recovery control stage, the data includes the dosage of the added medicine, the precipitation efficiency, the amount of heavy metals removed, etc. Through the data integration method, the data of the three recovery stages are uniformly processed to establish a comprehensive wastewater recovery control stage to ensure that the data of each stage can accurately reflect the wastewater recovery process. The weighted average method can be used to combine the control parameters of each stage, and the weights are determined by the treatment effects of each stage and the specific requirements of the wastewater. For example, if the data weight of the ion exchange recovery control stage is 0.4, the weight of the electrolytic deposition recovery control stage is 0.3, and the weight of the precipitation method recovery control stage is 0.3, then a comprehensive recovery control stage data can be obtained through weighted average, and finally the comprehensive data of the wastewater recovery control stage is formed.
[0045] Optionally, step S15 is specifically as follows:
[0046] Step S151: Input the chemical industrial wastewater data into the simulation software and perform a flow simulation to obtain the wastewater flow data;
[0047] In this embodiment, the chemical industrial wastewater data is first collected by the on-line monitoring equipment, including the relevant data of the tin-containing wastewater and the etching solution waste liquid, such as the concentration, the pH value, etc. These data are input into the simulation software for flow simulation. At the beginning of the simulation process, the initial conditions of the flow simulation are set, including the temperature, the pressure, the wastewater inflow velocity, etc. The wastewater flow simulation is set as a three-dimensional flow model, and the boundary conditions of the flow during the simulation are set that the inlet flow rate of the wastewater entering the flow channel is 10 m³ / h, and the outlet flow rate of the wastewater flowing out of the flow channel is set to 10 m³ / h. The simulation software calculates the flow conditions of the wastewater in the pipeline and the tank to obtain the wastewater flow data, including the flow rate and the flow velocity of the flow. The simulation results include the flow velocity, the pressure and the flow rate data of each flow region. The set time range of the simulation is 30 minutes, and the time step is 1 second.
[0048] Step S152: Extract the flow rate data and the flow velocity data of the wastewater flow data;
[0049] In this embodiment, flow rate data and flow velocity data are extracted from the wastewater flow data. The flow rate data is extracted according to the outlet and inlet settings in the simulation software, and the focus is mainly on the flow rate data when the wastewater enters the recovery tank. Assuming that the inlet flow rate is 10 m³ / h and the outlet flow rate is also 10 m³ / h during the simulation process, then this flow rate data represents the overall flow rate situation of the wastewater. The flow velocity data is obtained by analyzing the velocity field distribution in each flow region. Using the flow velocity extraction tool of the simulation software, the flow velocity values are extracted at each specific time point (for example, every 5 minutes during the simulation process), and the flow velocities in different regions of the recovery tank are recorded. The flow velocity data mainly focuses on the velocity changes in the bottom and surface regions of the recovery tank, and the set flow velocity range during the simulation process is 0.1 - 1.0 m / s.
[0050] Step S153: Use a laser scanner to scan the length and width of the wastewater recovery tank, where the scanning distance is set to 1 - 50 meters and the scanning density is set to 50 - 150 points per square meter to obtain the shape data of the wastewater recovery tank;
[0051] In this embodiment, a laser scanner is used to scan the length and width of the wastewater recovery tank. The scanning distance of the laser scanner is set to 1 - 50 meters, and the scanning density is set to 50 - 150 points per square meter. The laser scanner performs high-precision measurements on each region of the recovery tank to generate point cloud data. The scanning data covers parameters such as the length, width, and depth of the recovery tank. During the scanning process, the laser scanner scans according to a preset trajectory to ensure coverage of the entire geometric shape of the recovery tank. After each scan, the data is stored in the processing device in real time. The data contains geometric features such as the surface shape of the tank body and the curvature of the tank wall. The point cloud data is processed by computer software to obtain the detailed shape data of the wastewater recovery tank, and the length, width, depth, and surface curvature information of the tank body is output.
[0052] Step S154: Construct a fluid flow model based on the flow rate data, flow velocity data, and the shape data of the wastewater recovery tank body. Set the time step to 0.1 s, the spatial grid accuracy to 0.5 meters, and the diffusion coefficient to 0.1 cm² / s to simulate the flow behavior of the wastewater in the tank body and obtain the fluid flow model;
[0053] In this embodiment, based on the wastewater flow data and the shape data of the recovery pool, a three-dimensional grid model of the recovery pool is established, and the spatial grid accuracy is set to 0.5 m to ensure the refinement of the simulation. The fluid flow model is calculated using the finite element analysis method. During the simulation, the time step is set to 0.1 s to ensure an accurate description of the flow situation. The diffusion coefficient is set to 0.1 cm² / s to simulate the diffusion of chemical substances in the wastewater. According to the shape data of the pool body, the initial conditions of the fluid are set, including the inlet flow rate of the fluid being 10 m³ / h and the initial temperature of the fluid being 25 °C, to ensure that the model accurately reflects the flow behavior of the wastewater in the pool body. Through simulation calculations, the flow velocity, flow rate, and diffusion conditions in each region are obtained, and a fluid flow model is obtained.
[0054] Step S155: Import the data of the ion exchange recovery control stage, the electrolytic deposition recovery control stage, and the precipitation method recovery control stage into the fluid flow model, and conduct a division of the wastewater control area. The flow rate range for ion exchange treatment is set to 5 - 50 m³ / h, the current density range for electrolytic deposition is set to 5 - 20 A / m², and the dosing range for the precipitation method is set to 0.5 - 10 g / L to obtain a wastewater control model.
[0055] In this embodiment, the recovery control data, including the treatment flow rate, the added chemical dosage, etc., are input into the flow model through the data import function. In the flow model, the flow rate range for ion exchange treatment is set to 5 - 50 m³ / h, the current density range for electrolytic deposition is set to 5 - 20 A / m², and the dosing range for the precipitation method is set to 0.5 - 10 g / L. Then, based on the different regions in the wastewater recovery pool, a division of the wastewater control area is carried out. According to the shape data of the recovery pool, the fluid flow model conducts zoning delineation, and the treatment process in each control area is simulated according to the above-set ranges. The simulation software simulates each recovery control stage based on the imported control data and outputs a wastewater control model, and finally a complete wastewater recovery control model is obtained.
[0056] Optionally, step S2 is specifically as follows:
[0057] Step S21: Perform standardization processing on the chemical industrial wastewater data to obtain standardized chemical industrial wastewater data;
[0058] In this embodiment, the chemical industrial wastewater data includes parameters such as the concentration of tin ions, pH value, temperature, etc. When performing standardization processing, first, preprocessing for removing outliers is performed on all data to remove invalid or incorrect data. During this process, the z-score standardization method is used to convert each data item into dimensionless data, and the calculation formula is:
[0059] ;
[0060] Among them, X is the original data, μ is the mean of this data, and σ is the standard deviation. During this process, the standard deviation and mean of the tin ion concentration, pH value, and other chemical composition data in the wastewater are calculated respectively, and they are converted into standardized values to obtain standardized chemical industrial wastewater data. In this way, data with different units and magnitudes are standardized to the same magnitude, providing a unified basis for subsequent data input and analysis.
[0061] Step S22: Input the standardized chemical industrial wastewater data into the wastewater control model and upload the wastewater control model to the simulation software;
[0062] In this embodiment, after obtaining the standardized chemical industrial wastewater data, these data need to be input into the wastewater control model. The role of the wastewater control model is to combine the concentrations of various pollutants in the wastewater with the parameters of different recovery and treatment methods to provide guidance for the subsequent control process. When inputting data, the standardized chemical industrial wastewater data needs to be formatted according to the requirements of the model, and the correspondence of data items needs to be ensured. For example, the tin ion concentration needs to be input into the ion exchange recovery part of the model, and the pH value data is input into the precipitation method recovery control module. After inputting the data, the model is uploaded to the simulation software system, and the system will automatically identify and load the data and parameters of the model. At this time, the interface of the simulation software will detect the validity of the input data and confirm that the data upload is successful, ready for simulation calculation.
[0063] Step S23: Conduct an ion exchange recovery control simulation in the simulation software, and set the ion exchange resin amount to 5 - 50 g / L and the exchange rate to 0.1 - 10 L / min;
[0064] In this embodiment, the ion exchange resin amount is set according to the standardized chemical industrial wastewater data, and the resin amount is set between 5 - 50 g / L. The specific resin amount depends on the tin ion concentration in the wastewater. If the tin ion concentration is high, a higher resin amount needs to be selected. The selection of the resin amount will affect the exchange rate, and the exchange rate is set in the range of 0.1 - 10 L / min. The specific rate depends on factors such as flow rate and wastewater concentration. During the simulation process, after inputting these parameters, the simulation software starts to calculate how tin ions are removed through resin exchange reactions at different resin amounts and exchange rates. The simulation software will simulate the influence of flow rate, resin amount, etc. on the recovery process and output the specific recovery efficiency and the treatment effect of the wastewater.
[0065] Step S24: Conduct an electrolytic deposition recovery control simulation in the simulation software, and set the current density to 5 - 20 A / m² and the deposition time to 10 - 60 minutes;
[0066] In this embodiment, two key parameters, namely current density and deposition time, are set. In the simulation software, the current density is set to 5 - 20 A / m². The selection of the current density is based on the concentration of metal ions in the wastewater and the requirement for its recovery efficiency. Specifically, when the concentration of metal ions in the wastewater is high, a higher current density is needed to achieve rapid deposition because a high current density can accelerate the reduction and deposition process of metal ions and enhance the deposition rate of metals. If the metal concentration in the wastewater is low, a lower current density is set to avoid excessive power consumption and ensure the stability of the deposition reaction. When setting the current density, in actual operation, the appropriate current density range can be deduced through experiments or literature data. For example, if the concentration of tin ions is 50 mg / L, the current density can be set to 15 A / m². The deposition time is set to 10 - 60 minutes. The deposition time directly affects the deposition amount and deposition effect of metal ions. If the deposition time is too short, the deposition is incomplete, while if it is too long, it increases energy consumption and causes other side reactions during the deposition process. In the simulation software, the selection of the deposition time is set based on the flow rate of the wastewater, the concentration of metal ions, and the required recovery rate. For example, if the target is a metal recovery rate of over 90%, a longer deposition time can be set, usually between 40 minutes and 60 minutes. When setting, it is necessary to comprehensively consider the rate of the deposition reaction and the actual volume of the deposition tank. The setting of the deposition time can also be further adjusted by comparing with the actual operating conditions to ensure the best recovery effect. Then, after inputting these parameters, the simulation software will simulate the reduction and deposition behavior of metal ions during the electrolysis process. The simulation software will calculate the deposition rate based on the input current density and deposition time, taking into account influencing factors such as fluid flow, temperature, and pH value in the electrolytic cell, and simulate the migration and deposition process of metal ions in the wastewater under the action of an electric field. Through the simulation, the simulation software generates deposition data, specifically including the deposition amount of metal ions per unit time, the thickness change of the deposition layer, current efficiency, and other information. The data during the simulation process also takes into account the types and deposition characteristics of metal ions. For example, the deposition rates of different metal ions are different under the same current density, so the simulation software adjusts the corresponding deposition parameters according to the types of metal ions in the wastewater. The result data of this process includes the deposition time curve, current efficiency curve, and the final metal deposition amount. The simulation software will output these data as an important basis for judging the wastewater treatment effect. These data will be further used to optimize the wastewater recovery control model and provide guidance for actual operation.
[0067] Step S25: Conduct a simulation of the precipitation method recovery control in the simulation software, set the stirring speed to 50 - 300 rpm, the precipitation reaction time to 30 - 120 minutes, and the precipitant dosage to 0.5 - 10 g / L;
[0068] In this embodiment, in the simulation software, the stirring speed is set to 50 - 300 rpm. The selection of the stirring speed is based on the type of impurities in the wastewater, the size of the particulate matter, and the properties of the precipitant used. A lower stirring speed (such as 50 rpm) helps the particulate matter to settle slowly, avoiding the dispersion of the precipitant or the re - entry of suspended matter into the solution caused by excessive stirring. A higher stirring speed (such as 300 rpm), on the other hand, can accelerate the mixing of the particulate matter and the precipitant, improving the reaction efficiency. The simulation software will simulate the contact situation between the suspended matter and the precipitant in the wastewater according to the set stirring speed, so as to determine the optimal stirring intensity. In actual operation, the stirring speed is usually optimized through experiments to ensure that the stirring intensity can fully mix the reactants without causing secondary pollution. The precipitation reaction time is set to 30 - 120 minutes, and this time range is determined according to the concentration of dissolved substances in the wastewater and the reaction time requirements of the precipitant. A shorter reaction time results in incomplete precipitation, while an overly long reaction time increases energy consumption and the burden on equipment. Usually, the precipitation reaction time is set to 60 - 90 minutes to ensure that most of the dissolved impurities are removed without wasting energy. In the simulation software, the precipitation reaction time affects the simulation of the precipitation process. By gradually recording each time period during the reaction process, the distribution and accumulation of precipitates in the wastewater are analyzed. The setting of the precipitation reaction time needs to be adjusted in combination with the sedimentation rate of each component in the wastewater and the sedimentation efficiency of the precipitant. The dosage of the precipitant is set to 0.5 - 10 g / L, and the specific dosage is determined according to the composition of the wastewater and the reaction rate of the precipitation reaction. If the wastewater contains more precipitable substances, such as metal ions, suspended particles, etc., a higher dosage of the precipitant is required; if the impurity concentration in the wastewater is low, the dosage can be appropriately reduced. Usually, the dosage of the precipitant needs to be adjusted according to experimental data or the optimal ratio of chemical reactions. For example, if the concentration of metal ions in the wastewater is 10 mg / L, the dosage of the precipitant can be set to 2 g / L. In the simulation software, the dosage of the precipitant affects the reaction rate and the amount of precipitation. During the simulation process, the software will simulate the removal efficiency of the wastewater components according to the effect of the precipitation reaction under different dosages and output the corresponding precipitation data. The simulation software will simulate the reaction process between the particulate matter and the precipitant in the precipitation reaction according to the above - set parameters (stirring speed, reaction time, precipitant dosage). The simulation process takes into account the mixing intensity of the solution and the influence of the reaction time on the precipitation reaction, and records the mass of the precipitate, the sedimentation rate, and the removal of pollutants in the wastewater in real - time for each time period. The simulation results will show how the suspended particles and dissolved metal ions in the wastewater are gradually precipitated in different time periods and give the hourly data of the purification effect.
[0069] Step S26: Run the wastewater recovery control program in the simulation software to obtain wastewater recovery control data;
[0070] In this embodiment, check whether all control parameters have been correctly input, including the parameter settings for ion exchange, electrolytic deposition, and precipitation methods. Then, start the simulation program for full-process simulation. The simulation software automatically calculates the reaction conditions at each recovery stage according to the input control data. During the simulation process, the software continuously calculates the removal of pollutants in the wastewater at each stage according to the set time step and flow conditions. After the simulation is completed, the simulation software provides detailed wastewater recovery control data, including the recovery efficiency at each stage, the quality indicators of the treated wastewater, the residual pollutant concentration, etc.
[0071] Step S27: Judge whether there is a control anomaly in the wastewater recovery control data to obtain abnormal wastewater data.
[0072] In this embodiment, set the criteria for anomaly judgment: for example, if the concentration of tin ions exceeds 50 mg / L during the ion exchange process, it is considered abnormal; if the current density is too low or the deposition efficiency is not high during the electrolytic deposition process, it is considered abnormal; if the reaction time exceeds the set range or the dosing amount is too large during the precipitation method, it is regarded as abnormal. By comparing each item of the wastewater recovery control data item by item, judge using the preset anomaly criteria. If the data deviates from the predetermined standard, it is automatically marked as abnormal wastewater data and triggers an alarm or further treatment measures.
[0073] Optionally, step S27 is specifically:
[0074] Step S271: When any of the following situations occurs, it is determined that the ion exchange recovery control is abnormal and obtain the abnormal data of the ion exchange recovery control: the flow rate of the recovery liquid deviates from the optimal range by more than ±10%, the metal ion concentration in the wastewater is lower than 1000 mg / L or higher than 5000 mg / L, and the pH value deviates from the range of 4.5 - 7.0;
[0075] In this embodiment, monitor the flow rate of the recovery liquid, and set the optimal flow rate range to 20 - 100 L / min. If the flow rate of the recovery liquid deviates from the optimal range by more than ±10%, that is, the flow rate is lower than 18 L / min or higher than 110 L / min, it is determined that the flow rate is abnormal. Secondly, monitor the concentration of metal ions in the wastewater, and set the normal concentration range to 1000 mg / L to 5000 mg / L. If the metal ion concentration in the wastewater is lower than 1000 mg / L or higher than 5000 mg / L, it is immediately determined that the metal ion concentration is abnormal. In addition, the normal range of the pH value is set to 4.5 to 7.0. If the pH value deviates from this range, it is determined that the pH value is abnormal. The above three monitoring parameters need to be collected in real time and compared with the set thresholds. If any one exceeds the set allowable range, the system immediately records the abnormal data, including the deviation value, the time of abnormal occurrence, and the duration. By real-time monitoring and comparing the above key parameters, automatically determine and output the abnormal data of the ion exchange recovery control for subsequent analysis and processing.
[0076] Step S272: When the following conditions occur simultaneously, it is determined that the electrolytic deposition recovery control fails and the electrolytic deposition recovery control failure data is obtained: the electrolysis efficiency detection is lower than 85% for three consecutive times, the metal electrolysis product concentration in the effluent exceeds 30% of the influent concentration, the current density of the electrolytic cell fluctuates abnormally, and the above anomalies last for more than 40 minutes;
[0077] In this embodiment, the electrolysis efficiency is detected by comparing the metal concentration changes before and after electrolysis, and the electrolysis efficiency standard is set to be above 85%. If the electrolysis efficiency detection values are lower than 85% for three consecutive times, it is determined that the electrolysis efficiency is insufficient, and the electrolysis efficiency abnormal data is recorded. Secondly, the metal electrolysis product concentration in the effluent should be lower than 30% of the influent concentration. When the effluent metal concentration exceeds 30% of the influent concentration, it indicates that the electrolytic deposition process fails, and this abnormal data is recorded and a failure report is generated. Finally, the current density of the electrolytic cell should be maintained stable, and the current density range is set to 5 - 20 A / m². If the current density of the electrolytic cell fluctuates abnormally and this fluctuation lasts for more than 40 minutes, it is determined that the electrolytic deposition process fails. All detection data is collected through the real-time monitoring system. If any detection item is abnormal, the system immediately determines and outputs the electrolytic deposition recovery control failure data for subsequent analysis and adjustment.
[0078] Step S273: When the following conditions occur simultaneously, it is determined that the precipitation method recovery control fails and the precipitation method recovery control failure data is obtained: the dosage of the precipitant changes by more than 15% within 1 hour, the suspended solid concentration in the wastewater continuously rises by more than 20%, the temperature deviates from the normal range of 20 - 30 °C, the pH value deviates from the normal range of 5.0 - 8.5, and the sedimentation rate of the precipitate significantly slows down and cannot be restored in time;
[0079] In this embodiment, the dosage of the precipitant should be kept stable, and the change in the dosage per hour is set not to exceed 15%. If the dosage of the precipitant changes by more than 15% within 1 hour, it is determined that the dosage is abnormal, and the abnormal dosage data is recorded. Secondly, the suspended solid concentration in the wastewater should gradually decrease, and the normal decrease rate of the suspended solid concentration is set to 10 - 20% per hour. If the suspended solid concentration in the wastewater continuously rises by more than 20% within a certain period of time, it is determined that the precipitation effect fails, and the abnormal suspended solid concentration data is recorded. Furthermore, the wastewater temperature should be controlled within the range of 20 - 30 °C. If the temperature exceeds this range, it is determined that the temperature is abnormal, and the abnormal temperature data is recorded. Finally, the pH value should be maintained within the range of 5.0 - 8.5. If the pH value deviates from this range, and the sedimentation rate of the precipitate significantly slows down and cannot be restored in time, it is determined that the pH is abnormal and the data is recorded. The generation of the precipitation method recovery control failure data depends on the data collection and abnormal determination of the real-time monitoring system. If the above abnormal situations occur, the precipitation method recovery control failure data is immediately recorded and output.
[0080] Step S274: Integrate the abnormal data of ion exchange recovery control, the failure data of electrolytic deposition recovery control, and the fault data of precipitation method recovery control to obtain abnormal wastewater data.
[0081] In this embodiment, various types of abnormal data are automatically integrated by the system. First, based on the abnormal data of ion exchange recovery control, including abnormalities in flow rate, metal concentration, and pH value, the abnormal conditions in the ion exchange recovery process are integrated. Then, the failure data of electrolytic deposition recovery control is integrated, recording the abnormal conditions of electrolysis efficiency, metal product concentration, and current density fluctuation. Finally, the fault data of precipitation method recovery control is integrated, analyzing the abnormal conditions of precipitant dosage, suspended solid concentration, temperature, and pH value. All abnormal data is summarized according to information such as its timestamp, abnormal parameters, and occurrence duration to generate a complete abnormal wastewater data report. These abnormal wastewater data will serve as the basis for subsequent fault analysis and adjustment decisions, be stored and processed by the system, and provide a basis for optimizing the subsequent wastewater recovery process.
[0082] Optionally, step S3 is specifically as follows:
[0083] Step S31: Use a high-definition industrial camera to collect images of the wastewater sedimentation tank. The acquisition angle of the camera should be set to cover the entire sedimentation tank area. The camera should be kept 2 - 5 meters away from the sedimentation tank, and perform Gaussian blur on the wastewater sedimentation tank image. Select a 3x3 Gaussian convolution kernel, and set the standard deviation to 1.0 to 2.0 to obtain a Gaussian-blurred sedimentation tank image;
[0084] In this embodiment, a high-definition industrial camera is used for shooting. The position of the camera should be set in the area 2 to 5 meters away from the wastewater sedimentation tank to ensure that the entire panorama of the sedimentation tank can be covered. The installation angle of the camera should be adjusted according to the layout of the sedimentation tank to ensure that the captured images can include all key areas of the sedimentation tank and avoid dead corners. After image acquisition, Gaussian blur processing is performed on the wastewater sedimentation tank image. The operation of Gaussian blur is achieved by using a 3x3 Gaussian convolution kernel, where the standard deviation of the convolution kernel is set to 1.0 to 2.0. The choice of standard deviation determines the degree of blur. The larger the value, the stronger the blur effect of the image. By applying this convolution kernel and standard deviation value, the captured image is processed to reduce the noise in the image and smooth the image, obtaining a Gaussian-blurred sedimentation tank image. The core of this process is to control the standard deviation of Gaussian blur to ensure that the details of the image are retained while removing unnecessary interference information.
[0085] Step S32: Perform external edge detection on the Gaussian-blurred sedimentation tank image. The preset parameters of the edge detection algorithm include a low threshold and a high threshold. The low threshold range is set to 30 - 50, and the high threshold range is set to 100 - 150. The threshold controls the sensitivity of edge detection. By calculating the gradient of the Gaussian-blurred sedimentation tank image, the edge region is identified to obtain the external edge image of the centrifugal pump;
[0086] In this embodiment, the Canny edge detection method in the edge detection algorithm is used. The preset parameters of edge detection include a low threshold and a high threshold. The low threshold range is set to 30 - 50, and the high threshold range is set to 100 - 150. The low threshold controls the sensitivity of the detection algorithm to tiny edges. When the low threshold is relatively low, more edges can be detected to prevent missing details; the high threshold determines which edges are considered obvious feature boundaries. In specific operations, first, the gradient of the Gaussian-blurred image is calculated to identify the regions with large gray-scale changes in the image, and these regions are potential edges. By setting appropriate low and high thresholds, the system calculates the gradient of the image and filters out the significant edges in the image according to the set threshold conditions, finally obtaining the edge image outside the centrifugal pump. The key in this process is to accurately select the low and high threshold ranges and control the accuracy of edge detection by adjusting the thresholds.
[0087] Step S33: Identify the centrifugal pump region in the Gaussian-blurred sedimentation tank image based on the external edge image of the centrifugal pump. The area range of the contour is set to 2000 - 10000 pixels to obtain the centrifugal pump region image;
[0088] In this embodiment, the contours in the image are identified and extracted. Through the contour recognition algorithm (such as the findContours function in OpenCV), all the closed contours in the image are extracted. To accurately identify the centrifugal pump region, the extracted contours need to be filtered, and the area range of the contour is set to 2000 - 10000 pixels. The setting of this area range is to filter out the smaller or larger contours in the image that are irrelevant to the centrifugal pump and only retain the contours that match the centrifugal pump region. After identifying the contours that meet the area range, the system marks these regions as the centrifugal pump region. In this process, the screening of the area ensures the accuracy of the identified region, and by comparing the set area range, the misidentified regions are effectively excluded to obtain an accurate centrifugal pump region image.
[0089] Step S34: Perform a closing operation on the discontinuous contour edges in the centrifugal pump region image to obtain a complete contour image of the centrifugal pump;
[0090] In this embodiment, it is achieved through the closing operation in morphological operations. The closing operation is to perform dilation on the image and then erosion, which can effectively fill the small holes in the contour and connect the broken edges. In actual operation, a structuring element with a size of 3x3 or 5x5 is used to perform the closing operation on the image of the centrifugal pump area. The specific steps are as follows: First, perform the dilation operation to fill the small holes in the image and make the contour more coherent; then perform the erosion operation to eliminate the redundant noise and edges. Through this process, the originally discontinuous contour edges are closed, and thus a complete contour image of the centrifugal pump is obtained. The key to this operation lies in the selection and size setting of the structuring element. A suitable structuring element can effectively connect the discontinuous edges and avoid affecting the integrity of the area.
[0091] Step S35: Locate the position of the pipeline based on the complete contour image of the centrifugal pump, obtain the pipeline position data, and perform image acquisition according to the pipeline position data to obtain the pipeline image;
[0092] In this embodiment, image processing algorithms (such as detection and template matching in morphological operations) are used to locate the contact area between the centrifugal pump and the pipeline. By analyzing the relative position of the complete contour of the centrifugal pump, the starting point and ending point of the pipeline are determined. The specific operation is to match the contour features of the centrifugal pump with the geometric features of the pipeline (such as circular or elongated) to identify the contour of the pipeline. This process also needs to consider the relative position relationship between the pipeline and the centrifugal pump and the size range of the pipeline (such as diameter or width). After obtaining the exact position of the pipeline, image acquisition is performed to ensure that the complete image of the pipeline can be acquired and saved. By extracting the pipeline position data, the relative position and morphological features of the pipeline are accurately obtained, providing basic data for subsequent corrosion identification.
[0093] Step S36: Perform pipeline corrosion identification based on the pipeline image to obtain the pipeline corrosion image;
[0094] In this embodiment, the pipeline image is grayscale processed to convert it into a single-channel grayscale image. Then, an edge detection algorithm (such as the Sobel operator) is used to identify the corrosion area. In the image, the corrosion area usually appears to be relatively rough on the surface, with obvious holes or cracks. The system identifies the corrosion position by calculating the gray-scale change, texture features, and morphological features of the area in the image. For the identified corrosion area, by calculating the proportion of its area in the pipeline surface area, it is further verified whether it is an effective corrosion area. Through this method, finally, the pipeline corrosion image is obtained, which contains all the identified corrosion points and corrosion degrees.
[0095] Step S37: Perform impurity identification in the pump cavity based on the complete contour image of the centrifugal pump to obtain the pump cavity impurity image;
[0096] In this embodiment, the centrifugal pump area is subdivided, and the internal area of the pump chamber is analyzed emphatically. The impurity area in the pump chamber is separated from the background by using an image segmentation algorithm (such as threshold-based segmentation or region growing method). In the image, the impurities in the pump chamber usually appear as foreign particles or deposits, and their colors, shapes and sizes are quite different from other parts of the pump chamber. These impurity areas are identified by calculating the texture features of the image. The system marks and records these impurity areas, generates an impurity image of the pump chamber, and ensures that the positions of all impurities are accurately calibrated.
[0097] Step S38: Integrate the abnormal images according to the pipeline corrosion image and the pump chamber impurity image to obtain an abnormal image of the centrifugal pump;
[0098] In this embodiment, the two image data are combined. The combination operation is carried out according to the pixel information of the images to ensure that the abnormal areas in each image are marked synchronously. Through image fusion technology, the pipeline corrosion and pump chamber impurity areas are combined in one image to generate an abnormal image of the centrifugal pump. When combining, it is necessary to ensure the clear annotation of different types of abnormal data in the image for subsequent analysis and processing.
[0099] Step S39: Determine the abnormal position according to the abnormal image of the centrifugal pump, photograph the pipeline liquid according to the abnormal position of the centrifugal pump, and perform color detection. Convert the pipeline liquid image to the HSV color space and perform threshold detection on the liquid color in the image; the preset normal color range of the liquid is from [40, 60, 50] to [100, 255, 255], where the H value represents hue, the S value represents saturation, and the V value represents brightness; if the pipeline liquid color does not conform to this range, it is determined that the liquid color is abnormal and it is judged that the centrifugal pump leaks.
[0100] In this embodiment, image processing techniques (such as contour analysis) are used to determine the specific positions of the abnormal areas of the centrifugal pump. These positions are marked as abnormal points or abnormal areas for subsequent inspection. Then, a pipeline liquid image is taken for the abnormal position and its color is detected. The pipeline liquid image is analyzed by converting it to the HSV color space. The preset normal color range of the liquid is from [40, 60, 50] to [100, 255, 255], where the H value represents hue, the S value represents saturation, and the V value represents brightness. Through threshold detection, it is judged whether the liquid color in the image is within this range. If the liquid color does not conform to the set range, it is determined that the liquid color is abnormal and it is determined that the centrifugal pump leaks. In this process, the key to color detection is to select a suitable HSV range and accurately judge whether the color exceeds the normal range.
[0101] Optionally, step S36 is specifically:
[0102] Step S361: Convert the pipeline image to grayscale to obtain a grayscale pipeline image;
[0103] In this embodiment, when converting the pipeline image to grayscale, first convert the original pipeline image (usually a color image) into a grayscale image. The operation of grayscale conversion uses the standard RGB-to-grayscale conversion formula:
[0104] Gray = 0.2989 R + 0.5870 G + 0.1140 B;
[0105] where R, G, and B are the pixel values of the red, green, and blue channels of the image respectively. This formula converts the three color channels into grayscale values through a weighted average method. After this conversion, each pixel point in the original image will be converted into a grayscale value between 0 and 255, where 0 represents black and 255 represents white. After the conversion is completed, the obtained pipeline grayscale image will be a single-channel image, and the grayscale value of each pixel determines the brightness intensity at that position.
[0106] Step S362: Calculate the horizontal pixel values in the pipeline grayscale image, construct a gray-level co-occurrence matrix based on the horizontal pixel values, and extract low-energy values less than 0.1 and low-contrast values between 0.2 and 0.8. Perform an intersection region operation on the pipeline grayscale image according to the low-energy values and low-contrast values to obtain a binary image of the pipeline corrosion region;
[0107] In this embodiment, calculate the horizontal pixel values of the pipeline grayscale image. By traversing each row of pixel values, obtain the grayscale value of each row and calculate its average value as the horizontal pixel value of that row. Next, construct a gray-level co-occurrence matrix based on these horizontal pixel values. The gray-level co-occurrence matrix is used to describe the spatial relationship between different grayscale values in the image and mainly calculates the joint probability distribution between gray levels. During this process, select appropriate distances and angles (such as 0 degrees, 45 degrees, 90 degrees, and 135 degrees) to calculate the co-occurrence matrix. Extract the energy and contrast features in the co-occurrence matrix, with low-energy values less than 0.1 and low-contrast values in the range of 0.2 to 0.8 as the key points for feature extraction. Use these features to perform an intersection region operation to screen the pipeline grayscale image and extract the corrosion region. The intersection region operation is achieved through threshold operations, screening out regions that meet the energy and contrast requirements, and finally obtaining a binary image of the pipeline corrosion region, where the corrosion region is marked as white (1) and the non-corrosion region is marked as black (0).
[0108] Step S363: Select a 5x5 circular kernel structural element, slide the circular kernel structural element over each pixel of the binary image of the pipeline corrosion region, and update according to the pixel values in the area covered by the circular kernel structural element to obtain a dilated region image;
[0109] In this embodiment, a 5x5 circular kernel structural element is selected and applied to each pixel of the binary image of the pipeline corrosion area. The circular kernel structural element is applied to the image in the form of a sliding window, with a working range of 5x5 pixels. At each sliding position, the central pixel of the circular kernel structural element is compared with all pixel values within its covered area, and the update of the current pixel is determined according to the pixel values in the covered area. The specific operation is as follows: if there are a certain number of white pixels (i.e., the corrosion area) in the covered area, then this area is updated to white (i.e., dilation); if there are fewer white pixels in the covered area, the black value of this area is maintained. Through this method, the boundary of the pipeline corrosion area is expanded, and the originally smaller or thinner corrosion areas become more obvious, obtaining the dilated area image. During this process, the size and shape of the structural element determine the degree of dilation, and the 5x5 circular kernel can effectively expand the corrosion area.
[0110] Step S364: Denoise the dilated area image to obtain the denoised dilated area image;
[0111] In this embodiment, when denoising the dilated area image, the median filtering method is used to remove the noise in the image. Median filtering is a non-linear filtering technique. By selecting a fixed-size window (such as 3x3 or 5x5) around each pixel point and replacing the value of the central pixel with the median of all pixel values within this window. This method can effectively remove salt-and-pepper noise (i.e., randomly distributed black and white dots) and other high-frequency noises. In the specific operation, a 5x5 window size is used to filter the dilated area image. Each time the window slides, the median is calculated according to the pixel values within the window, and the pixel value at the center of the window is updated with the median. Through this process, the noise in the dilated area image is smoothed out, and finally the denoised dilated area image is obtained, with only the real corrosion area remaining in the image.
[0112] Step S365: Locate the pipeline corrosion area on the pipeline grayscale image based on the denoised dilated area image, where the pipeline area location criteria are as follows: the cross-sectional area is 500 - 5000 px², the circularity threshold is greater than 0.8, and the aspect ratio is set to 1:2, obtaining the pipeline corrosion image.
[0113] In this embodiment, when locating the pipeline corrosion area based on the denoised expansion area image, all contours in the denoised expansion area image are first extracted. Through the contour detection algorithm (such as the findContours function in OpenCV), all closed areas in the image are identified. Then, these contours are screened and the pipeline area positioning standards are set: the cross-sectional area is between 500-5000px², the circularity is greater than 0.8, and the aspect ratio is set to 1:2. The cross-sectional area requires that a sufficiently large corrosion area be screened out, and the noise area less than 500px² be excluded; the circularity threshold is greater than 0.8 to ensure that the selected area is a relatively circular corrosion area to avoid misidentification as an area of other shapes; the aspect ratio requires that the aspect ratio of the corrosion area is close to the actual shape of the pipeline, and excludes areas whose shapes do not meet the requirements. After screening by these standards, qualified pipeline corrosion images are obtained, and the specific location and shape of the corrosion are marked in these images, which is convenient for subsequent further analysis.
[0114] Optionally, step S37 is specifically:
[0115] Step S371: Position the complete outline image of the centrifugal pump, and capture the temperature change in the pump cavity at that position through a thermal imaging camera to obtain a temperature image of the centrifugal pump;
[0116] In this embodiment, a thermal imaging camera is used to locate the position of the centrifugal pump and capture the temperature changes in the pump cavity. The thermal imaging camera should be set parallel to the direction of the pump cavity and be able to cover the entire pump cavity area. The camera should be selected with a higher resolution (such as 640×480 pixels or higher) and a wider temperature measurement range (for example, -20°C to 200°C). The device uses the principle of infrared thermal sensing to capture the temperature distribution in the pump cavity in real time. The temperature data is converted into a thermal image by the camera, and each pixel value in the thermal image represents the temperature of that point. After the acquired centrifugal pump temperature image is processed by thermal imaging, it clearly shows the temperature changes in various areas of the pump cavity, especially the areas with abnormal high temperatures.
[0117] Step S372: performing grayscale conversion on the centrifugal pump temperature image to obtain a temperature grayscale image, and performing Gaussian blur processing on the temperature grayscale image to obtain a Gaussian blurred temperature grayscale image;
[0118] In this embodiment, the centrifugal pump temperature image is gray-scale converted, and the infrared signal value in the thermal imaging image is converted into a standard gray-scale image. The gray-scale conversion formula is:
[0119] Gray=0.299×R+0.587×G+0.114×B;
[0120] Among them, R, G, and B are the numerical values of the red, green, and blue channels in the image. The converted temperature grayscale image is represented by grayscale values, where regions with lower values represent lower temperatures and regions with higher values represent higher temperatures. Then, Gaussian blur processing is used to smooth the temperature grayscale image. At this time, a 3x3 Gaussian convolution kernel is selected, and the standard deviation is set to 1.5. Gaussian blur can effectively reduce the noise and details in the image, making the trend of temperature change more obvious. By applying this blurring operation, the details and local variations in the temperature image become smoother and more uniform, which helps improve the accuracy of subsequent temperature threshold segmentation.
[0121] Step S373: Perform threshold segmentation on the Gaussian-blurred temperature grayscale image, set the temperature threshold range to 35 - 45 °C, to screen out the high-temperature regions inside the pump chamber and obtain a high-temperature region image;
[0122] In this embodiment, by setting the temperature threshold range from 35 °C to 45 °C, the high-temperature regions inside the pump chamber are screened out. The setting of the temperature threshold range is based on the actual working conditions and the operating standards of the centrifugal pump to ensure that only regions with abnormally high temperatures are extracted. The specific method of threshold segmentation is to traverse each pixel in the image. If the temperature corresponding to the pixel value is between 35 °C and 45 °C, the pixel is marked as white (1), indicating that it is a high-temperature region; if the pixel value is not within this range, it is marked as black (0), indicating that it does not belong to the high-temperature region. Through this segmentation operation, the obtained high-temperature region image shows all the regions inside the pump chamber that meet the temperature range and does not contain other regions with non-compliant temperatures.
[0123] Step S374: Select a 3×3 rectangular kernel structural element and apply a dilation operation to expand the edges of the high-temperature region image to enhance the thermal anomaly signal of potential high-temperature regions and obtain a dilated high-temperature region image;
[0124] In this embodiment, a 3×3 rectangular kernel structural element is selected and applied to the dilation operation of the high-temperature region image. The rectangular kernel structural element slides over each pixel of the image and determines the update of the current pixel based on the pixel values within its covered area. If the covered area of the rectangular kernel structural element contains at least one white pixel, the central pixel will be updated to white, thus achieving the dilation of this region. This dilation operation can expand the boundaries of the high-temperature region, making potential high-temperature regions more prominent and contributing to subsequent anomaly detection. By applying the 3×3 rectangular kernel, the dilation operation can effectively expand the original high-temperature region to better identify thermal anomaly regions.
[0125] Step S375: Perform denoising processing on the dilated high-temperature region image, use a 3×3 filtering window to remove stray noise, and obtain a denoised high-temperature region image;
[0126] In this embodiment, to remove the stray noise in the image, a median filtering operation is performed using a 3×3 filtering window. Each time the window slides, the median value of the pixel values within the window is taken, and the pixel value at the center of the window is replaced with this median value. Through this operation, the noise in the original image (such as isolated single noise points or over-expanded edges) is effectively smoothed out, and the denoised high-temperature region image only contains the real high-temperature regions. The denoised image is clearer, facilitating subsequent region positioning and impurity region detection.
[0127] Step S376: Perform impurity region positioning based on the denoised high-temperature region image, identify the boundaries of the high-temperature regions, and obtain the contour data of the impurity regions;
[0128] In this embodiment, a contour detection algorithm is applied to identify the boundaries of each high-temperature region in the denoised image. Through the findContours function in OpenCV, the contours of each high-temperature region are identified, and the geometric features of its region are calculated, such as area, circularity, aspect ratio, etc. Through these geometric features, the regions belonging to the impurities inside the pump cavity are identified. Impurity regions usually have relatively obvious thermal anomaly signals, and their positions usually have certain differences from other structures inside the pump cavity. The goal of this step is to accurately locate the impurity regions that have nothing to do with the actual pump cavity structure and obtain the contour data of the impurity regions.
[0129] Step S377: Perform region screening and calibration on the contour data of the impurity regions, set the minimum temperature deviation of the impurity regions to 5°C, set the minimum area threshold to 100 px², the circularity to be greater than 0.7, and the aspect ratio to be greater than 0.5 and less than 2 to obtain the pump cavity impurity image.
[0130] In this embodiment, the minimum temperature deviation of the impurity regions is set to 5°C, requiring that the temperature of the identified impurity regions must have at least a 5°C difference compared to the surrounding normal regions. Then, the minimum area threshold is set to 100 px² to exclude invalid impurity regions with too small areas. By calculating the circularity, regions with a circularity greater than 0.7 are screened out to ensure that relatively regular impurity regions are identified. The aspect ratio threshold also needs to be set, specifying that the aspect ratio is greater than 0.5 and less than 2 to exclude impurity regions with overly irregular shapes. Finally, through these criteria for screening and calibration, the impurity region images inside the pump cavity are obtained, and the specific positions and shapes of the impurities are marked in these images.
[0131] Optionally, step S4 is specifically as follows:
[0132] Step S41: Collect the leakage flow rate of the centrifugal pump to obtain the leakage flow rate data of the centrifugal pump, and perform flow control defect detection to obtain the flow control defect data;
[0133] In this embodiment, the leakage flow rate of the centrifugal pump is collected by a flow meter. The flow meter should be installed on the outlet pipeline of the centrifugal pump, and a high-precision turbine flow meter or electromagnetic flow meter is used to accurately measure the change of fluid flow rate. The data collected by the flow meter should be transmitted to the data processing system in real time for storage and analysis. The obtained leakage flow rate data of the centrifugal pump includes the instantaneous value and cumulative value of the flow rate. Next, flow control defect detection is carried out, using the set flow control standard (for example, the normal flow rate should be between 50 L / min and 100 L / min). When the actual flow rate deviates greatly from the set range, the detection system will generate flow control defect data. The flow control defect data will reflect the existing pump body leakage or pipeline failure conditions, thus providing a basis for further diagnosis.
[0134] Particularly importantly, step S41 includes the following steps:
[0135] Step S411: Collect the leakage flow rate of the centrifugal pump to obtain the leakage flow rate data of the centrifugal pump;
[0136] In this embodiment, a flow meter (such as a turbine flow meter or an ultrasonic flow meter) installed on the flow pipeline of the centrifugal pump is used to monitor the leakage flow rate of the centrifugal pump in real time. The working principle of the flow meter is to calculate the flow rate by measuring the rate at which the fluid flows through the pipeline, and the obtained data includes the flow rate value per second. The flow sensor should be calibrated within the specified working pressure and temperature range to ensure the accuracy of the data. By continuously collecting the flow rate data and recording the change of the leakage flow rate, the leakage flow rate data set of the centrifugal pump is finally obtained, and this data set contains the time stamp and the corresponding flow rate value. Step S412: Conduct time statistics on the leakage flow rate data of the centrifugal pump to obtain the leakage flow rate time data of the centrifugal pump;
[0137] Step S413: Based on the leakage flow rate time data of the centrifugal pump, identify the leakage mode of the leakage flow rate data of the centrifugal pump to obtain the leakage mode data;
[0138] In this embodiment, time statistical processing is carried out on the leakage flow rate data of the centrifugal pump obtained by the flow sensor, and statistical indicators such as the time interval, peak value, and average value of the data are calculated. By setting thresholds and conducting outlier detection, the change trends of the leakage flow rate in different time periods are screened out. Time statistical analysis can be realized through data processing tools (such as the Pandas library in Python). By calculating the change of the flow rate value at each moment, the regularity of the flow rate data in the time dimension can be identified, and the persistence and periodic characteristics of the leakage flow rate of the centrifugal pump can be obtained, and then the leakage flow rate time data of the centrifugal pump can be obtained.
[0139] Step S414: Divide the leakage mode data to obtain the persistent leakage mode data and the intermittent leakage mode data
[0140] In this embodiment, the leakage mode data is classified according to the duration. A time threshold is set. Among all the leakage mode data, those exceeding the threshold are persistent leakage mode data, and those below the threshold are intermittent leakage mode data. In specific implementation, the leakage mode data can be divided according to time intervals. Persistent leakage usually shows long-term and stable flow fluctuations, while intermittent leakage shows irregular flow fluctuations, usually with relatively long non-leakage time periods. By comparing the time characteristics of the leakage modes, persistent and intermittent leakage data can be accurately distinguished.
[0141] Step S415: Conduct time statistics on the persistent leakage mode data and identify pipeline connection looseness based on this time, so as to obtain pipeline connection looseness data;
[0142] In this embodiment, by conducting time statistics on the persistent leakage mode data and combining with the standard flow data of pipeline operation, pipeline connection looseness is identified. First, calculate the persistence of the leakage flow in different time periods. If it is found that the leakage flow shows persistent growth and exceeds the set standard flow range, further judge whether the increase in the leakage flow is caused by pipeline connection looseness. According to the preset pipeline looseness standard (such as the flow threshold change rate at the pipeline interface), when the flow continuously rises within a period of time, it is determined that the pipeline is loose, and the pipeline connection looseness data is recorded.
[0143] Step S416: Conduct time statistics on the intermittent leakage mode data and identify the breakage of the centrifugal pump seal based on this time, so as to obtain centrifugal pump seal breakage data;
[0144] In this embodiment, time statistics are conducted on the intermittent leakage mode data, and parameters such as the frequency and duration of intermittent leakage are analyzed. When it is found that the centrifugal pump has frequent short-term leakage phenomena, combined with the equipment operation history, identify whether there is a problem with the centrifugal pump seal breakage. By comparing the normal operation data of the equipment with the change of the leakage flow, the time point of seal breakage can be determined. Through the standardized judgment of the breakage type, such as the amplitude and interval of flow fluctuations, the centrifugal pump seal breakage data is finally obtained.
[0145] Step S417: Integrate the centrifugal pump seal breakage data and the pipeline connection looseness data to obtain flow control defect data.
[0146] In this embodiment, the pipeline connection looseness data and the centrifugal pump seal damage data are integrated, and the flow control defect data is generated through methods such as weighted average and data merging. During specific operation, the pipeline looseness and the pump seal damage are regarded as two different control defects, and their different impacts on flow control are analyzed, thereby obtaining a comprehensive flow control defect data set. Finally, the flow control defect data will provide key diagnostic information for further optimizing the operation of the wastewater control system.
[0147] Step S42: Collect the leakage pressure of the centrifugal pump to obtain the centrifugal pump leakage pressure data, and perform pressure control defect detection to obtain the pressure control defect data;
[0148] In this embodiment, when collecting the centrifugal pump leakage pressure data, the pressure sensor should be installed on the pipeline at the outlet of the centrifugal pump, and the pressure sensor should have high sensitivity (for example, an accuracy of 0.1 bar) and fast response characteristics (the response time should be less than 1 second). This sensor monitors the pressure change in the pipeline and records the pressure value in case of leakage in real time. The centrifugal pump leakage pressure data includes the instantaneous value and peak value of the pressure. Next, pressure control defect detection is performed. Set the normal pressure range, for example, the normal pressure should be 2 bar to 4 bar. If the leakage pressure exceeds this range, it will trigger the pressure control defect detection and generate the pressure control defect data. This data can indicate the pressure abnormality or control system failure of the centrifugal pump and provide a basis for subsequent correction.
[0149] Step S44: Perform liquid leakage correction based on the flow control defect data to obtain the liquid leakage control correction data;
[0150] In this embodiment, by analyzing the flow control defect data, the liquid leakage area in the system is identified and liquid leakage compensation is performed. The liquid leakage compensation can be achieved by adjusting the flow set value of the pump, so that the flow reaches the design requirements and avoids system failures caused by insufficient flow. For example, by controlling the pump speed or valve opening in real time, the flow output is adjusted. The data of the liquid leakage correction can include parameters such as the adjusted flow rate, pump speed, and valve opening. These data will be fed back through the closed-loop control system to ensure that the flow control defect is effectively corrected, thereby restoring the normal operation of the pump system.
[0151] Especially importantly, step S44 includes the following steps:
[0152] Step S441: Perform flow deviation analysis based on the flow control defect data to obtain the flow deviation data;
[0153] In this embodiment, the flow rate data of the centrifugal pump is collected in real time by a flow sensor. These flow rate data need to be compared and analyzed with a preset target flow rate to identify the flow rate deviation. Specifically, when implementing, the target flow rate value is set as the standard flow rate of the system. For example, the target flow rate is set to 500 L / min. By comparing the real-time flow rate data with the target flow rate, the flow rate deviation is calculated. The calculation formula for the flow rate deviation is:
[0154] Flow rate deviation = Real-time flow rate - Target flow rate;
[0155] For example, if the real-time flow rate is 480 L / min, the flow rate deviation is -20 L / min. Through this analysis, the flow rate deviation data can be obtained, which reflects the difference between the actual flow rate and the expected target flow rate and provides a basis for subsequent correction steps.
[0156] Step S442: Calculate the difference based on the flow rate deviation data to obtain the flow rate difference data;
[0157] In this embodiment, the flow rate difference refers to the difference between two adjacent flow rate deviations, which reflects the change trend of the flow rate deviation. Specifically, when implementing, the differential processing can be performed on the flow rate deviation data within a continuous time window. For example, assuming that the flow rate deviations obtained at two moments are -20 L / min and -18 L / min respectively, the flow rate difference can be calculated as:
[0158] Flow rate difference = Current flow rate deviation - Flow rate deviation at the previous moment;
[0159] That is, the flow rate difference = (-18 L / min) - (-20 L / min) = 2 L / min. Through this calculation, the change amplitude between consecutive flow rate deviations can be obtained, and further the fluctuation trend of the flow rate system can be reflected, which helps to more accurately grasp the adjustment amount when adjusting the pump speed or valve opening in the subsequent process.
[0160] Step S443: Adjust the pump speed range according to the flow rate difference data to obtain the pump speed adjustment data;
[0161] In this embodiment, according to the magnitude and direction (positive or negative value) of the calculated flow difference, the direction and amplitude of the pump speed adjustment are determined. If the flow difference is positive (such as 2 L / min), it indicates that the current flow rate is slightly too high, and the pump speed needs to be reduced; if the flow difference is negative (such as -3 L / min), it means that the flow rate is insufficient and the pump speed needs to be increased. During specific operation, the PID control algorithm is used to adjust the pump speed to ensure that the output flow rate of the pump is closer to the target value more precisely. Assume that the current pump speed of the system is 1500 RPM (revolutions per minute). If the calculated flow difference is a positive value of 2 L / min, it means that the pump flow rate exceeds the target value by 2 L / min. Therefore, the pump speed needs to be reduced. At this time, according to the proportional term (P), integral term (I), and derivative term (D) in the PID control algorithm, the adjustment amount is calculated, and the control step size is set to 1% of the pump speed change. That is, the adjustment step size of 1% is 1500 RPM × 1% = 15 RPM. Therefore, the pump speed should be adjusted from 1500 RPM to 1485 RPM. If the flow difference is a negative value of -3 L / min, it means that the current flow rate is insufficient and the pump speed needs to be increased. According to the PID algorithm, the corresponding adjustment amount is calculated, and the adjustment step size is still set to 1%. At this time, the adjustment step size of 1% is 1500 RPM × 1% = 15 RPM. Therefore, the pump speed should be increased from 1500 RPM to 1520 RPM. The specific adjustment process uses a PID controller for real-time feedback adjustment. The PID controller continuously monitors the flow rate change, compares the flow difference with the set target, and adjusts the pump speed in real time to keep it within a suitable range at all times. The PID algorithm directly corrects the flow difference through the proportional term, the integral term considers the cumulative error of the system, and the derivative term predicts the future flow rate trend. Through PID control, the system can quickly respond to the flow rate change and adjust the pump speed in real time to ensure that the pump flow rate remains near the predetermined target value. When adjusting the pump speed, the control system also needs to consider the mechanical characteristics of the pump and the equipment load conditions to avoid over-adjustment affecting the mechanical life of the pump and the system stability. For example, the pump speed cannot be adjusted frequently and rapidly. The system can set the maximum adjustment range to ±10% RPM to avoid excessive adjustment causing pump loss or unstable operation.
[0162] Step S444: Adjust the valve opening according to the flow difference data, so as to obtain the valve opening adjustment data;
[0163] In this embodiment, the valve opening adjustment is based on the flow difference data. The main purpose is to precisely adjust the flow velocity of the fluid in the pipeline by controlling the valve opening to ensure the target flow rate is achieved. First, based on the calculated flow difference data, determine the adjustment direction and amplitude of the valve opening. If the flow difference is large (e.g., exceeding 5 L / min), it indicates that the flow deviates significantly from the target value, and a large adjustment is required at this time. The adjustment step is generally set to 2% - 5% of the valve opening. For example, when the flow difference is positive (such as +6 L / min), it means the flow is too large, and the valve opening needs to be reduced. The current opening of 80% is reduced to 75%. If the flow difference is negative (such as -7 L / min), it means the flow is insufficient, and the valve opening needs to be increased. The current opening of 60% is increased to 64%. If the flow difference is small (e.g., between 1 L / min and 5 L / min), it indicates that the flow is close to the target flow rate, and the adjustment amplitude at this time is small. The adjustment step is usually set to 1% - 2%. For example, if the flow difference is negative (such as -2 L / min), the valve opening can be increased from 55% to 57%. If the difference is positive (such as +3 L / min), the valve opening can be reduced from 70% to 68.5%. When the flow difference is close to zero, it means the flow is close to the target value. At this time, the adjustment amplitude can be set to the minimum value, usually a fine-tuning step of 0.5% - 1%. If the current valve opening is 50% and the flow difference is zero, only a 0.5% fine-tuning is required to adjust the opening to 50.5%. The adjustment of the valve opening is usually achieved through an electric control valve or a pneumatic control valve. The electric control valve is driven by a stepper motor or a servo motor, and the valve opening is adjusted by precisely controlling the rotation angle of the motor. The control signal is output by a PID controller or a flow control system. The pneumatic control valve drives the valve opening through air pressure changes. The pneumatic valve controller changes the valve opening by increasing or decreasing the gas pressure according to the adjustment amount calculated from the flow difference data. The size of the adjustment step is set according to the system response speed and accuracy requirements. The step of a fast response system can be set larger (such as 2% - 5%), while for a system with higher accuracy requirements, it can be set smaller (such as 0.5% - 1%).
[0164] Step S445: Perform leakage control correction integration according to the pump speed adjustment data and the valve opening adjustment data to obtain leakage control correction data.
[0165] In this embodiment, first, the pump speed adjustment data and the valve opening adjustment data are synchronized according to the time series and weighted and fused through a control algorithm. The weighting ratio can be set according to the relative influence of the pump and the valve on the flow control. For example, if the adjustment of the pump has a greater impact on the flow, a higher weight (such as 70%) can be given to the pump speed adjustment, while the weight of the valve opening adjustment is 30%. Through this integration, a liquid leakage control correction data is obtained, which can be directly used for subsequent system control. This data contains accurate correction values for the flow deviation, enabling the system to stably maintain the required flow level during operation and effectively prevent liquid leakage problems.
[0166] Step S45: Perform dynamic control based on the pressure control defect data to obtain pressure dynamic control data;
[0167] In this embodiment, dynamic control is performed based on the pressure control defect data. The pressure control defect data provides specific information about the abnormal system pressure. For example, too high or too low pressure values. Through these data, the PID (Proportional-Integral-Derivative) control algorithm is used to dynamically adjust the pressure. This algorithm can adjust the operating state of the pump (such as adjusting the speed, regulating the valve, etc.) according to the real-time change of the pressure to maintain the pressure within the set range. For example, if the detected pressure is too low, the control system will increase the pump speed or adjust the opening of the inlet valve to increase the pressure. The pressure dynamic control data includes the real-time pressure value, control parameters (such as the PID adjustment coefficient), and the dynamically adjusted pressure set value. These data will provide precise pressure control and stable operation for the system.
[0168] Especially importantly, step S45 includes the following steps:
[0169] Step S451: Draw a pressure diagram based on the pressure control defect data to obtain a pressure diagram;
[0170] In this embodiment, it is necessary to collect the pressure control defect data, which comes from the pressure sensors of the equipment or the real-time monitoring system. The pressure control defect data includes the pressure values at different time points, involving the fluctuations of the pressure values within the standard working range. Using a dedicated drawing software or data processing tool (such as MATLAB or the Matplotlib library in Python), according to the collected pressure data points, draw a pressure diagram in chronological order. The abscissa of the chart is time, and the ordinate is the pressure value. Each pressure data point corresponds to the pressure value at a certain moment, and the drawn pressure diagram should present the trend of pressure change and clearly show the abnormal pressure fluctuations during operation.
[0171] Step S452: Perform pressure fluctuation statistics on the pressure diagram to obtain high-fluctuation pressure data;
[0172] In this embodiment, statistical methods are required to analyze the degree of fluctuations in the pressure diagram. By setting a threshold (for example, a fluctuation amplitude exceeding 5% is considered high fluctuation), data points in the diagram that meet the high-fluctuation criteria are screened out. The specific operations include calculating the standard deviation of the pressure values, determining the severity of the pressure fluctuations, and usually setting a standard deviation threshold (for example, a pressure fluctuation standard deviation exceeding 5 Pa is considered high fluctuation), and marking the points in the diagram that exceed this threshold. Through these high-fluctuation data points, the regions with large pressure fluctuations during the entire monitoring period can be located, and finally, high-fluctuation pressure data can be obtained.
[0173] Step S453: Conduct a statistical analysis of the fluctuation time of the pressure diagram to obtain long-term pressure fluctuation data;
[0174] In this embodiment, a statistical analysis of the duration of fluctuations existing in the pressure diagram is required. First, define the criteria for the fluctuation time. For example, when the pressure fluctuates within a set range for more than 5 seconds, it is considered "long-term fluctuation". By writing an algorithm to traverse the pressure diagram, the continuous fluctuation periods are marked, and the durations of these periods are calculated. For example, if a period with a fluctuation duration exceeding 10 seconds is marked as a long-term fluctuation, and it is determined whether the fluctuation continues according to the set fluctuation range (such as ±5 Pa). Based on this data, a statistical report can be generated, marking the data segments with long-term fluctuations, and finally, long-term pressure fluctuation data can be obtained.
[0175] Step S454: Perform an intersection operation based on the high-fluctuation pressure data and the long-term pressure fluctuation data to obtain pressure control defect data;
[0176] In this embodiment, the high-fluctuation pressure data refers to the data points with large pressure fluctuations in a short period of time, while the long-term fluctuation data refers to the fluctuation data with a long pressure duration. The intersection operation is to screen out the pressure data that belongs to both the high-fluctuation region and the long-term fluctuation. For example, if the pressure fluctuation amplitude in a certain period is greater than 5 Pa and the duration exceeds 10 seconds, the data in this period will be classified as pressure control defect data. In this step, by setting the intersection conditions, specific pressure anomaly data is screened out, and based on this, dynamic control is further carried out.
[0177] Step S455: Construct a dynamic control model based on the pressure control defect data to obtain a dynamic control model;
[0178] In this embodiment, through appropriate data modeling techniques, pressure fluctuations and other process parameters (such as pump speed, valve opening, etc.) are combined to form a mathematical model that can be used for pressure dynamic control. First, process the pressure control defect data obtained in step S454. This data includes high-fluctuation pressure data and long-time fluctuation data, which need to be preprocessed, such as denoising, normalization, etc., to ensure the quality and usability of the data. Common denoising methods include using low-pass filters, mean filtering, or other smoothing algorithms suitable for pressure data. The normalization operation can unify the range of the data to a standard range, such as 0 to 1, to avoid unnecessary biases caused by data with large values during model training. Then, according to the processed data, select appropriate modeling techniques. A physics-based control model can be adopted. Such models usually rely on physical principles in fields such as fluid mechanics and describe the relationships between variables such as pressure, flow rate, and pump speed in the system through mathematical formulas. Another method is modeling based on empirical data. By means of regression analysis, time series analysis, etc., extract the laws from historical process data and construct an empirical model. Machine learning models are also a feasible option. Through algorithms such as support vector machine (SVM), decision tree, deep learning, etc., learn the complex patterns of pressure control from a large amount of historical data. The data input into these models includes process parameters such as pressure fluctuation data, pump speed, and valve opening to ensure that the models can fully consider the relationships between multi-dimensional data. During the model construction process, use appropriate modeling tools such as Simulink, MATLAB, and the Scikit-learn library of Python to implement. These tools provide rich modeling, training, and simulation functions to help construct a control model suitable for specific applications. The training process uses the historical data set to adjust the parameters of the model to ensure that the model can accurately predict the pressure fluctuations of the system and can output corresponding control instructions, such as adjusting the pump speed or valve opening. Through these control instructions, the system can achieve precise dynamic pressure control, maintain the pressure within a predetermined range, and thus improve the stability and operating efficiency of the system.
[0179] Step S456: Perform dynamic control on the pressure control defect data according to the dynamic control model to obtain pressure dynamic control data.
[0180] In this embodiment, compare the output of the dynamic control model with the real-time pressure sensor data, and dynamically adjust the control parameters such as pump speed and valve opening according to the control instructions of the model. For example, if the model calculates that the valve needs to be opened by 10%, then adjust the valve to this opening in real time to ensure pressure stability. Through continuous monitoring and adjustment, continuously optimize the system performance, and finally obtain the pressure dynamic control data, which records the control parameters and their change trends during the entire adjustment process.
[0181] Step S46: Optimize the control of the wastewater control model based on the liquid leakage control correction data and the pressure dynamic control data to generate an optimized wastewater control model.
[0182] In this embodiment, the wastewater control model constructed based on parameters such as the flow rate and pressure of the pump system is a mathematical model used to optimize the control of the flow rate and pressure during the wastewater treatment process. The core objective of this model is to improve the efficiency of wastewater treatment by adjusting these key parameters, and to ensure the safety and stability of the system. During implementation, the model is first updated according to the liquid leakage control correction data and the pressure dynamic control data. These data provide information on control defects that occur during the wastewater control process, such as liquid leakage problems in the pump system and abnormal pressure fluctuations. By analyzing the liquid leakage control correction data, leakage problems that occur during the wastewater control process can be identified, and the pressure fluctuation situation in the system can be identified based on the pressure dynamic control data. Based on these data, relevant parameters in the wastewater control model, such as the flow rate setting value, the pressure setting value, and the pump speed, are adjusted accordingly. For example, if the liquid leakage problem affects the wastewater flow rate, the flow rate setting value is adjusted to meet the new flow rate requirements; if fluctuations occur in the pressure control, the pressure setting value is adjusted according to the pressure dynamic control data to reduce the fluctuation amplitude. To achieve the dynamic adjustment of these parameters, optimization algorithms can be used, such as the PID control algorithm, to precisely adjust the flow rate and pressure, so that the wastewater treatment process can respond to environmental changes in real time. Through the real-time adjustment of these parameters, the wastewater control model can maintain the high efficiency of wastewater treatment in a dynamic environment, ensuring that the system can quickly respond to different operating conditions and avoid control errors caused by abnormal data or environmental changes. Through the optimized wastewater control model, new control strategies, adjusted model parameters, and new operating standards are obtained. These adjustments ensure that the wastewater treatment system can operate stably and efficiently during actual operation, thereby improving the overall performance and safety of wastewater treatment. The optimized model provides an adaptive control mechanism that can not only adjust the control strategy in real time but also handle various complex process requirements, thus achieving the optimization of the wastewater treatment process.
[0183] Therefore, from any perspective, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the application documents are intended to be encompassed within the present invention.
[0184] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating a control model for a chemical production wastewater treatment system, characterized in that: The following steps are involved: Step S1: using online monitoring instruments to collect chemical wastewater data, including tin-containing wastewater data and etching liquid wastewater data; determining the wastewater recovery control stage according to the chemical wastewater data; and constructing a wastewater control model based on the wastewater recovery control stage and using chemical engineering simulation software; Step S2: inputting chemical wastewater data into the wastewater control model, and using simulation software to simulate the wastewater recovery control process to obtain wastewater recovery control data, and performing control abnormality judgment on the wastewater recovery control data to obtain abnormal wastewater data; Step S3: using a high-definition industrial camera to collect an image of the wastewater sedimentation tank, and identifying and obtaining an image of the centrifugal pump from the image of the wastewater sedimentation tank; locating the pipeline position based on the centrifugal pump image to obtain pipeline position data; obtaining a pipeline liquid image based on the pipeline position data, and performing color detection. If the color of the pipeline liquid does not meet the preset color value, it is determined that the centrifugal pump is leaking; Step S4: Identify the control defects of the centrifugal pump leakage, perform model correction on the wastewater control model based on the control defects, and generate a wastewater optimization control model.
2. The method for generating a control model for a chemical production wastewater treatment system according to claim 1, characterized in that: Step S1 is specifically as follows: Step S11: using an online heavy metal sensor to measure the tin ion concentration, wherein the acquisition frequency is set to once per minute and the measurement range is 0-100 mg / L, to obtain tin-containing wastewater data; Step S12: using a pH sensor to monitor the pH value of the waste etching liquid in real time, setting the measurement range to 0-14 pH and the accuracy to ±0.01 pH, to obtain the waste etching liquid data; Step S13: Integrate tin-containing wastewater data and etching liquid wastewater data to obtain chemical wastewater data; Step S14: determining the wastewater recovery control stage according to the chemical wastewater data to obtain the wastewater recovery control stage; Step S15: constructing a wastewater control model based on the wastewater recovery control stage and using chemical engineering simulation software.
3. The method for generating a control model for a chemical production wastewater treatment system according to claim 2, characterized in that: Step S14 is specifically as follows: Step S141: dividing the tin-containing wastewater data by concentration, adopting ion exchange recovery control when the tin ion concentration is below 50 mg / L, and adopting electrolytic deposition recovery control when the tin ion concentration exceeds 50 mg / L, and obtaining ion exchange recovery control stage data and electrolytic deposition recovery control stage data; Step S142: pH value acid-base adjustment is performed on the etching liquid waste liquid data to obtain neutral pH value etching liquid waste liquid data, and precipitation method recovery control setting is performed on the neutral pH value etching liquid waste liquid data to obtain precipitation method recovery control stage data; Step S143: Perform stage integration according to the ion exchange recovery control stage data, the electrolytic deposition recovery control stage data and the precipitation recovery control stage data, so as to obtain the wastewater recovery control stage.
4. The method for generating a control model for a chemical production wastewater treatment system according to claim 2, characterized in that: Step S15 is specifically as follows: Step S151: inputting chemical wastewater data into simulation software and performing flow simulation to obtain wastewater flow data; Step S152: extracting flow data and flow velocity data of wastewater flow data; Step S153: Scan the length and width of the wastewater recovery pool using a laser scanner, wherein the scanning distance is set to 1-50 meters and the scanning density is set to 50-150 points / square meter to obtain shape data of the wastewater recovery pool; Step S154: construct a fluid flow model based on the flow data, flow velocity data and wastewater recovery tank shape data, set the time step to 0.1s, the spatial grid accuracy to 0.5m, and the diffusion coefficient to 0.1cm² / s, simulate the flow behavior of wastewater in the tank, and obtain a fluid flow model; Step S155: Import the ion exchange recovery control stage data, the electrolytic deposition recovery control stage data and the precipitation method recovery control stage data into the fluid flow model, and divide the wastewater control area, wherein the ion exchange treatment flow range is set to 5-50m³ / h, the electrolytic deposition current density range is set to 5-20A / m², and the precipitation method dosage range is set to 0.5-10g / L to obtain a wastewater control model.
5. The method for generating a control model for a chemical production wastewater treatment system according to claim 1, characterized in that: Step S2 is specifically as follows: Step S21: performing standardization processing on the chemical wastewater data to obtain standardized chemical wastewater data; Step S22: inputting the standardized chemical wastewater data into the wastewater control model, and uploading the wastewater control model to the simulation software; Step S23: performing ion exchange recovery control simulation in the simulation software, setting the ion exchange resin amount to 5-50 g / L and the exchange rate to 0.1-10 L / min; Step S24: Perform electrolytic deposition recovery control simulation in the simulation software, setting the current density to 5-20A / m² and the deposition time to 10-60 minutes; Step S25: performing a precipitation recovery control simulation in the simulation software, setting the stirring speed to 50-300 rpm, the precipitation reaction time to 30-120 minutes, and the precipitant dosage to 0.5-10 g / L; Step S26: running the wastewater recovery control program in the simulation software to obtain wastewater recovery control data; Step S27: Perform control abnormality judgment on the wastewater recovery control data to obtain abnormal wastewater data.
6. The method for generating a control model for a chemical production wastewater treatment system according to claim 5, characterized in that: Step S27 is specifically as follows: Step S271: When any of the following situations occurs, it is determined that the ion exchange recovery control is abnormal, and the ion exchange recovery control abnormal data is obtained: the recovery liquid flow rate deviates from the optimal range by more than ±10%, the metal ion concentration in the wastewater is lower than 1000 mg / L or higher than 5000 mg / L, and the pH value deviates from the range of 4.5-7.0; Step S272: When the following conditions occur at the same time, it is determined that the electrolytic deposition recovery control fails and the electrolytic deposition recovery control failure data is obtained: the electrolysis efficiency is detected to be lower than 85% for three consecutive times, the concentration of metal electrolysis products in the effluent water exceeds 30% of the influent water concentration, and the current density of the electrolytic cell fluctuates abnormally and the above abnormalities last for more than 40 minutes; Step S273: When the following conditions occur at the same time, it is determined to be a sedimentation recovery control failure and sedimentation recovery control failure data is obtained: the amount of precipitant added changes by more than 15% within 1 hour, the concentration of suspended solids in the wastewater continues to rise by more than 20%, the temperature deviates from the normal range of 20-30°C, the pH value deviates from the normal range of 5.0-8.5, and the sedimentation rate of the precipitate is significantly slowed down and cannot be recovered in time; Step S274: Integrate the ion exchange recovery control abnormal data, the electrolytic deposition recovery control failure data and the precipitation recovery control failure data to obtain abnormal wastewater data.
7. The method for generating a control model for a chemical production wastewater treatment system according to claim 1, characterized in that: Step S3 is specifically as follows: Step S31: Use a high-definition industrial camera to collect an image of the wastewater sedimentation tank. The camera's collection angle should be set to cover the entire sedimentation tank area. The camera is kept 2-5 meters away from the sedimentation tank. The wastewater sedimentation tank image is Gaussian blurred, a 3x3 Gaussian convolution kernel is selected, and the standard deviation is set to 1.0 to 2.0 to obtain a Gaussian blurred sedimentation tank image. Step S32: Performing centrifugal pump outer edge detection on the Gaussian blurred sedimentation tank image. The preset parameters of the edge detection algorithm include a low threshold and a high threshold. The low threshold range is set to 30-50, and the high threshold range is set to 100-150. The threshold controls the sensitivity of edge detection. By performing gradient calculation on the Gaussian blurred sedimentation tank image, the edge area is identified to obtain the centrifugal pump outer edge image. Step S33: performing centrifugal pump region recognition on the Gaussian blurred sedimentation tank image according to the centrifugal pump outer edge image, wherein the contour area range is set to 2000-10000 pixels, to obtain a centrifugal pump region image; Step S34: performing a closing operation on the discontinuous contour edges in the centrifugal pump area image, thereby obtaining a complete contour image of the centrifugal pump; Step S35: locating the pipeline position based on the complete contour image of the centrifugal pump to obtain pipeline position data, and performing image acquisition based on the pipeline position data to obtain a pipeline image; Step S36: performing pipeline corrosion identification based on the pipeline image to obtain a pipeline corrosion image; Step S37: Identify impurities in the pump cavity based on the complete contour image of the centrifugal pump to obtain an impurity image of the pump cavity; Step S38: integrating abnormal images according to the pipeline corrosion image and the pump cavity impurity image to obtain an abnormal image of the centrifugal pump; Step S39: Determine the abnormal position according to the abnormal image of the centrifugal pump, photograph the pipeline liquid according to the abnormal position of the centrifugal pump, and perform color detection, convert the pipeline liquid image into HSV color space, and perform threshold detection on the liquid color in the image; the normal color range of the preset liquid is [40,60,50] to [100,255,255], where the H value represents the hue, the S value represents the saturation, and the V value represents the brightness; if the pipeline liquid color does not meet this range, it is determined that the liquid color is abnormal and it is judged to be a centrifugal pump leakage.
8. The method for generating a control model for a chemical production wastewater treatment system according to claim 7, characterized in that: Step S36 is specifically as follows: Step S361: performing grayscale conversion on the pipeline image to obtain a pipeline grayscale image; Step S362: Calculate the horizontal pixel values in the pipeline grayscale image, construct a grayscale co-occurrence matrix based on the horizontal pixel values, extract low energy values with energy less than 0.1 and low contrast values of 0.2-0.8, perform intersection area operation on the pipeline grayscale image according to the low energy values and low contrast values, and obtain a binary image of the pipeline corrosion area; Step S363: select a 5x5 circular core structure element, apply the circular core structure element to each pixel of the binary image of the pipeline corrosion area by sliding, and update it according to the pixel value of the area covered by the circular core structure element to obtain the expansion area image; Step S364: denoising the dilated region image to obtain a denoised dilated region image; Step S365: Based on the denoised dilated area image, the pipeline grayscale image is used to locate the pipeline corrosion area, wherein the pipeline area positioning standard is: cross-sectional area 500-5000px², circularity threshold greater than 0.8, aspect ratio set to 1:2, and the pipeline corrosion image is obtained.
9. The method for generating a control model for a chemical production wastewater treatment system according to claim 7, characterized in that: Step S37 is specifically as follows: Step S371: Position the complete outline image of the centrifugal pump, and capture the temperature change in the pump cavity at that position through a thermal imaging camera to obtain a temperature image of the centrifugal pump; Step S372: performing grayscale conversion on the centrifugal pump temperature image to obtain a temperature grayscale image, and performing Gaussian blur processing on the temperature grayscale image to obtain a Gaussian blurred temperature grayscale image; Step S373: performing threshold segmentation on the Gaussian blurred temperature grayscale image, setting the temperature threshold range to 35-45° C., so as to screen out the high temperature area inside the pump cavity and obtain a high temperature area image; Step S374: select a 3×3 rectangular core structure element, apply an expansion operation to expand the edge of the high-temperature area image, enhance the thermal anomaly signal of the potential high-temperature area, and obtain an expanded high-temperature area image; Step S375: De-noising the expanded high-temperature region image, using a 3×3 filter window to remove stray noise, to obtain a de-noised high-temperature region image; Step S376: locating the impurity region according to the denoised high temperature region image, identifying the boundary of the high temperature region, and obtaining the impurity region contour data; Step S377: Perform regional screening and calibration on the impurity area contour data, set the minimum temperature deviation of the impurity area to 5°C, set the minimum area threshold to 100px², the circularity to be greater than 0.7, and the aspect ratio to be greater than 0.5 and less than 2, to obtain the pump cavity impurity image.
10. The method for generating a control model for a chemical production wastewater treatment system according to claim 1, characterized in that: Step S4 is specifically as follows: Step S41: collecting the leakage flow of the centrifugal pump to obtain leakage flow data of the centrifugal pump, and performing flow control defect detection to obtain flow control defect data; Step S42: collecting leakage pressure of the centrifugal pump to obtain leakage pressure data of the centrifugal pump, and performing pressure control defect detection to obtain pressure control defect data; Step S44: performing leakage correction based on the flow control defect data to obtain leakage control correction data; Step S45: Perform dynamic control based on the pressure control defect data to obtain pressure dynamic control data; Step S46: Optimizing the wastewater control model according to the leakage control correction data and the pressure dynamic control data to generate a wastewater optimization control model.
Citation Information
Patent Citations
Pipeline liquid leakage point position automatic monitoring method based on image monitoring system
CN116838958A
Wastewater treatment system numerical simulation system based on digital twinning
CN118551586A