Automatic control method and system for wastewater desalination treatment based on Internet of Things
By combining salt gradient attention mechanism and membrane fouling temporal memory network with multimodal data fusion, the problems of inaccurate membrane fouling state assessment and insufficient intelligence of control algorithm are solved, and efficient automated control of wastewater desalination system is realized.
Patent Information
- Application Number
- CN202511972287.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-12-25
AI Technical Summary
Existing IoT-based automatic control methods for wastewater desalination suffer from problems such as inaccurate membrane fouling identification, low intelligence level of control algorithms, and insufficient multi-objective collaborative optimization capabilities, resulting in low system operating efficiency.
By introducing a salt gradient attention mechanism and a membrane fouling time-series memory network, combined with visual image recognition and multimodal data fusion, we collect reverse osmosis membrane surface images, interfacial potential time-series data, infrared spectral data, transmembrane pressure difference, and feed flow rate. We then perform multi-objective collaborative optimization to construct an objective function to solve for feed flow rate, flocculant dosage, and membrane cleaning trigger signal.
It improves the accuracy and precision of membrane fouling identification and control, realizes membrane fouling control, energy consumption optimization and stable reagent dosing, and enhances the automation level and treatment efficiency of wastewater desalination systems.
Smart Images

Figure CN121426243A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to an automatic control method and system for wastewater desalination treatment based on the Internet of Things. Background Technology
[0002] Wastewater desalination is a crucial step in industrial wastewater treatment. Reverse osmosis technology, due to its high desalination efficiency, is widely used in the treatment of high-salinity wastewater in industries such as chemical and petrochemical. Traditional automatic control methods for wastewater desalination mainly rely on threshold control or PID control of conventional process parameters such as pH, conductivity, turbidity, flow rate, temperature, and pressure. Operations such as chemical dosing and cleaning are triggered by setting upper and lower limits for these parameters. While this control method is simple and intuitive, its rigid control logic makes it difficult to adapt to complex changes in wastewater quality. In recent years, the development of Internet of Things (IoT) technology has provided technical support for the intelligent upgrading of wastewater treatment systems. By deploying multiple types of sensors to collect process parameters in real time and utilizing cloud platforms for data storage and analysis, remote monitoring and data visualization of the wastewater treatment process have been achieved.
[0003] However, existing IoT-based automatic control methods for wastewater desalination still have significant shortcomings. First, current methods primarily rely on indirect parameters (such as transmembrane pressure difference and conductivity) to infer membrane fouling status, lacking direct means of observing the fouling morphology and chemical composition of the membrane surface. This leads to inaccurate identification of membrane fouling types and weak predictive maintenance capabilities. Second, existing control algorithms mostly employ single-parameter independent control strategies, failing to fully consider the coupling effects of multiple factors such as concentration polarization, membrane fouling, and flocculation during wastewater desalination, resulting in insufficient control accuracy and adaptability. Third, existing systems lack intelligent multi-objective collaborative optimization mechanisms, making it difficult to achieve a balance among multiple objectives such as membrane fouling rate control, energy consumption reduction, and reagent consumption optimization, leading to low system operating efficiency. Summary of the Invention
[0004] This application provides an automatic control method and system for wastewater desalination based on the Internet of Things. By introducing a salt gradient attention mechanism and a membrane fouling time sequence memory network, combined with visual image recognition and multimodal data fusion, it solves the problems of inaccurate membrane fouling status assessment, low intelligence level of control algorithm and insufficient multi-objective collaborative optimization capability in the prior art, thereby improving the automation level and treatment efficiency of wastewater desalination.
[0005] In a first aspect, this application provides an automatic control method for wastewater desalination treatment based on the Internet of Things (IoT), the automatic control method for wastewater desalination treatment based on the IoT includes: Step S1: Collect images of the reverse osmosis membrane surface, interfacial potential time series data, infrared spectral data, transmembrane pressure difference, feed flow rate, and images of the flocculation reaction tank; Step S2: Divide the membrane surface image into grid regions, calculate the salt gradient attention weights based on the concentration difference between the membrane surface salt concentration and the permeate side salt concentration and the local Bekele number, and obtain the salt gradient attention feature vector; Step S3: The salt gradient attention feature vector is concatenated with the infrared spectral data and the interface potential time series data, and combined with the transmembrane pressure difference and the feed flow rate to input the membrane fouling time series memory network to obtain the membrane fouling development rate and the optimal flocculant dosage ratio; Step S4: Extract the particle size parameters of the flocs in the image of the flocculation reaction tank, perform weighted calculation on the particle size parameters, and obtain the flocculation effect score; Step S5: The objective function is constructed by weighted summing of the squared deviation term of the membrane fouling development rate, the energy consumption term, the squared rate of change of the optimal flocculant dosage ratio, and the squared deviation term of the flocculation effect score. The objective function is then solved under constraints to obtain the feed flow rate setpoint, the flocculant dosage setpoint, and the membrane cleaning trigger signal.
[0006] Secondly, this application provides an IoT-based automatic control system for wastewater desalination, the IoT-based automatic control system for wastewater desalination comprising: The acquisition module is used to acquire images of the reverse osmosis membrane surface, interfacial potential time series data, infrared spectral data, transmembrane pressure difference, feed flow rate, and images of the flocculation reaction tank. The calculation module is used to divide the membrane surface image into grid regions, calculate the salt gradient attention weights based on the concentration difference between the membrane surface salt concentration and the permeate side salt concentration and the local Bekele number, and obtain the salt gradient attention feature vector. The input module is used to concatenate the salt gradient attention feature vector with the infrared spectral data and the interface potential time series data, and combine the transmembrane pressure difference and the feed flow rate to input the membrane fouling time series memory network to obtain the membrane fouling development rate and the optimal flocculant dosage ratio. The extraction module is used to extract the particle size parameters of the flocs in the image of the flocculation reaction tank, perform weighted calculation on the particle size parameters, and obtain a flocculation effect score. The solution module is used to construct an objective function by weighted summing of the squared term of the deviation of the membrane fouling development rate, the energy consumption term, the squared term of the rate of change of the optimal flocculant dosage ratio, and the squared term of the deviation of the flocculation effect score. Under constraints, the objective function is solved to obtain the feed flow rate setpoint, the flocculant dosage setpoint, and the membrane cleaning trigger signal.
[0007] Thirdly, an IoT-based automatic control device for wastewater desalination is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the IoT-based automatic control device for wastewater desalination to execute the aforementioned IoT-based automatic control method for wastewater desalination.
[0008] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the above-described automatic control method for wastewater desalination treatment based on the Internet of Things.
[0009] The technical solution provided in this application deploys a multimodal sensor network in the wastewater desalination system to collect images of the reverse osmosis membrane surface, interfacial potential time-series data, infrared spectral data, transmembrane pressure difference, feed flow rate, and images of the flocculation reaction tank. This achieves comprehensive perception of the membrane fouling state, overcoming the limitations of existing technologies that rely solely on indirect parameters to infer the membrane fouling state, and laying a data foundation for subsequent intelligent control decisions. In particular, by dividing the membrane surface image into grid regions and calculating the salt gradient attention weight based on the concentration difference between the membrane surface salt concentration and the permeate side salt concentration and the local Bekeleton number, this application creatively solves the problem of inconsistent reliability of fouling information in different regions of the membrane surface caused by concentration polarization. This allows regions with good flow patterns and less concentration polarization to contribute more to the fouling state assessment, significantly improving the accuracy of membrane fouling identification. By concatenating salt gradient attention feature vectors with infrared spectral data and interfacial potential time-series data, and then inputting these data along with transmembrane pressure difference and feed flow rate into a membrane fouling time-series memory network, this approach fully integrates visual morphology features, chemical composition information, and electrochemical dynamic characteristics. This overcomes the information limitations of single-modal data and enables precise identification of different fouling modes, such as organic fouling, inorganic scaling, and biofilm fouling, providing a basis for developing differentiated control strategies. Furthermore, by extracting the particle size parameters of flocs from images of the flocculation reactor and performing weighted calculations to obtain a flocculation effect score, this application achieves a quantitative assessment of the flocculation pretreatment effect. This changes the traditional reliance on manual visual judgment, making the adjustment of flocculant dosage more precise and timely, effectively reducing reagent waste and membrane fouling risks.
[0010] The objective function is constructed by weighting and summing the deviation terms of membrane fouling development rate, energy consumption, optimal flocculant dosage change rate, and flocculation effect score deviation. Solving this function under constraints yields the feed flow rate setpoint, flocculant dosage setpoint, and membrane cleaning trigger signal. This achieves multi-objective collaborative optimization of membrane fouling control, energy consumption optimization, stable reagent dosage, and pretreatment effect assurance, overcoming the low system operating efficiency problem caused by single-objective control in existing technologies. The salt gradient attention mechanism differentiates the fouling characteristics of different regions on the membrane surface by varying the degree of concentration polarization. This allows the model to focus on the most reliable areas of fouling information, avoiding the negative impact of interference from severely polarized areas on the overall evaluation. This attention mechanism, designed specifically for the concentration polarization phenomenon unique to wastewater desalination processes, exhibits stronger domain adaptability and higher fouling identification accuracy compared to general attention mechanisms. The membrane fouling temporal memory network identifies fouling pattern probability vectors based on the absorption peak intensity in infrared spectral data and adjusts the forget gate weights accordingly. This allows the network to adaptively adjust its memory behavior based on the dynamic characteristics of different fouling types. The slow accumulation of organic fouling, the sudden occurrence of inorganic fouling, and the periodic fluctuations of biofilm fouling are fully learned and utilized, significantly improving the accuracy of predicting the membrane fouling development rate and the optimal flocculant dosage ratio, providing reliable predictive information for model predictive control. By solving the optimal control sequence with multiple time steps using a sequential quadratic programming algorithm and employing a rolling time-domain optimization strategy to execute the control command for the current time step, this application achieves forward-looking prediction of future system state changes and dynamic response to real-time disturbances. Compared with traditional feedback control, it exhibits stronger robustness and better control performance, effectively reducing the membrane fouling rate, extending membrane lifespan, reducing energy and reagent consumption, and improving the overall automation level of the wastewater desalination system. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic diagram of an embodiment of the automatic control method for wastewater desalination based on the Internet of Things in this application. Figure 2 This is a schematic diagram of an embodiment of the IoT-based automatic control system for wastewater desalination in this application. Figure 3 This is a schematic block diagram of the structure of an automatic control device for wastewater desalination based on the Internet of Things in an embodiment of the present invention. Detailed Implementation
[0013] This application provides an automatic control method and system for wastewater desalination treatment based on the Internet of Things. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0014] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the automatic control method for wastewater desalination based on the Internet of Things in this application includes: Step S1: Collect images of the reverse osmosis membrane surface, interfacial potential time series data, infrared spectral data, transmembrane pressure difference, feed flow rate, and images of the flocculation reaction tank; Step S2: Divide the membrane surface image into grid regions, calculate the salt gradient attention weights based on the concentration difference between the membrane surface salt concentration and the permeate side salt concentration and the local Bekele number, and obtain the salt gradient attention feature vector; Step S3: The salt gradient attention feature vector is concatenated with infrared spectral data and interfacial potential time series data, and combined with transmembrane pressure difference and feed flow rate, and input into the membrane fouling time series memory network to obtain the membrane fouling development rate and the optimal flocculant dosage ratio. Step S4: Extract the particle size parameters of the flocs in the flocculation reaction tank image, perform weighted calculation on the particle size parameters, and obtain the flocculation effect score; Step S5: The objective function is constructed by weighted summing of the squared deviation term of the membrane fouling development rate, the energy consumption term, the squared rate of change of the optimal flocculant dosage ratio, and the squared deviation term of the flocculation effect score. Under the constraints, the feed flow rate setpoint, the flocculant dosage setpoint, and the membrane cleaning trigger signal are obtained.
[0015] It is understood that the executing entity of this application can be an IoT-based automatic control system for wastewater desalination, or it can be a terminal or a server; the specific implementation is not limited here. This application's embodiments use a server as an example for illustration.
[0016] Specifically, pH, conductivity, turbidity, flow, temperature, and pressure sensors are deployed at the inlet of the reverse osmosis membrane module. These sensors constitute the basic sensing layer of the wastewater desalination system. The pH sensor measures the pH of the influent using the glass electrode method; the pH value affects the charge distribution on the membrane surface and the dissolved state of pollutants. The conductivity sensor reflects the total concentration of dissolved salts by measuring the conductivity of ions in the water; a higher conductivity value indicates a higher salt concentration, which directly relates to the membrane's desalination load. The turbidity sensor measures the content of suspended particulate matter in the water using the scattered light method; the turbidity value reflects the concentration of colloids and particulate matter in the influent, which are one of the main sources of membrane fouling. The flow sensor is installed on the influent pipe and measures the volume of water passing through the pipe per unit time using electromagnetic induction or ultrasonic principles; the flow data is used to calculate membrane flux and optimize chemical dosing ratios. The temperature sensor measures the influent temperature; temperature affects the viscosity of the water and the diffusion coefficient of solutes, thus affecting the membrane's permeability and fouling rate. A pressure sensor measures the feed water pressure, and combined with the product water pressure, the transmembrane pressure difference can be calculated. This transmembrane pressure difference is the core driving parameter for the reverse osmosis process. An industrial camera equipped with a macro lens and a ring light source is positioned on the reverse osmosis membrane surface, capturing images at a resolution of 1920×1080 pixels at a frame rate of 15 frames per second. The industrial camera focuses on the membrane surface through its lens, and the light source evenly illuminates the membrane surface to eliminate shadows. An image sensor converts the optical signal into a digital image. The membrane surface image can visually display the distribution characteristics of the fouling layer. Clean membrane surfaces exhibit uniform light-colored textures, while fouled areas appear as dark patches or streaks. Organic fouling typically forms a viscous brown or yellow fouling layer, inorganic scaling forms white or grayish-white crystalline deposits, and biofilm forms a green or grayish-green adhesion layer. An online interface potential analyzer is installed on the concentrate side of the membrane module. The interface potential, also known as the zeta potential, reflects the potential difference between the membrane surface and the solution. The measurement principle involves applying an electric field near the membrane surface. Charged particles migrate under the influence of the electric field, and the migration velocity is measured using a laser Doppler velocimeter. The interface potential is calculated based on the velocity and the electric field strength. When negatively charged organic pollutants are adsorbed onto the membrane surface, the interfacial potential becomes more negative; conversely, when positively charged metal ions or calcium and magnesium salts are deposited on the membrane surface, the interfacial potential shifts towards the positive direction. The time-series curve of the interfacial potential can reveal the accumulation process of pollutants and the transformation of pollution types. A Fourier transform infrared spectroscopy probe emits broadband infrared light to illuminate the membrane surface. The chemical bonds on the membrane surface absorb infrared light at specific wavenumbers, while the unabsorbed light is received by the detector. The time-domain signal is converted into a frequency-domain spectrum through Fourier transform. Infrared spectral data is a vector, with each element corresponding to the absorption intensity at a specific wavenumber point. Amide bonds in proteins show absorption intensities at 1650 cm⁻¹. -1 A strong absorption peak is generated at 1100 cm⁻¹, indicating that the silicon-oxygen bonds in silicates exhibit a strong absorption peak at this point. -1 An absorption peak is generated at 2920 cm⁻¹, and the carbon-hydrogen bonds in lipids exhibit an absorption peak at 2920 cm⁻¹.-1 Absorption peaks are generated at the membrane surface. By analyzing the intensity changes of these characteristic absorption peaks, the degree of organic fouling, inorganic scaling, and biofilm fouling on the membrane surface can be quantitatively identified. A flocculation image acquisition device is installed in the flocculation pretreatment unit to capture images of the liquid surface in the flocculation reaction tank from a vertical top-down angle. The image resolution is 1280×720 pixels, and the frame rate is 10 frames per second. After the flocculant is added to the flocculation reaction tank, the fine suspended particles in the wastewater aggregate into larger flocs through mechanisms such as charge neutralization, adsorption bridging, and netting and sweeping. The flocs then settle and separate under gravity. The images captured by the flocculation image acquisition device show the morphology and distribution of the flocs. Good flocculation is characterized by larger floc size, uniform distribution, and dense structure. The flocs appear as dark areas with clear boundaries in the image, while the water between the flocs appears light-colored and transparent. When the flocculation effect is poor, the image shows a large number of fine, dispersed particles, high water turbidity, and blurred floc boundaries. By acquiring images of the flocculation reaction tank in real time and combining them with image processing algorithms to extract the particle size parameters and morphological characteristics of the flocs, a visual basis is provided for optimizing the flocculant dosage and evaluating the pretreatment effect.
[0017] In one specific embodiment, step S1 includes: A pH sensor, conductivity sensor, turbidity sensor, flow sensor, temperature sensor, and pressure sensor are installed at the inlet of the reverse osmosis membrane module to collect the pH, conductivity, turbidity, feed flow rate, inlet temperature, and inlet pressure of the inlet water. An industrial camera is placed on the surface of the reverse osmosis membrane to capture images of the membrane surface. An online interface potential analyzer and a Fourier transform infrared spectroscopy probe are installed on the concentrate side of the membrane module to collect interface potential time-series data and infrared spectral data. A flocculation image acquisition device is installed in the flocculation pretreatment unit to capture images of the flocculation reaction tank from a vertical top-down angle, thus obtaining images of the flocculation reaction tank.
[0018] Specifically, pH, conductivity, turbidity, flow, temperature, and pressure sensors are deployed at the inlet of the reverse osmosis membrane module. These sensors constitute the basic sensing layer of the wastewater desalination system. The pH sensor measures the pH of the influent using the glass electrode method; the pH value affects the charge distribution on the membrane surface and the dissolved state of pollutants. The conductivity sensor reflects the total concentration of dissolved salts by measuring the conductivity of ions in the water; a higher conductivity value indicates a higher salt concentration, which directly relates to the membrane's desalination load. The turbidity sensor measures the content of suspended particulate matter in the water using the scattered light method; the turbidity value reflects the concentration of colloids and particulate matter in the influent, which are one of the main sources of membrane fouling. The flow sensor is installed on the influent pipe and measures the volume of water passing through the pipe per unit time using electromagnetic induction or ultrasonic principles; the flow data is used to calculate membrane flux and optimize chemical dosing ratios. The temperature sensor measures the influent temperature; temperature affects the viscosity of the water and the diffusion coefficient of solutes, thus affecting the membrane's permeability and fouling rate. A pressure sensor measures the feed water pressure, and combined with the product water pressure, the transmembrane pressure difference can be calculated. This transmembrane pressure difference is the core driving parameter for the reverse osmosis process. An industrial camera equipped with a macro lens and a ring light source is positioned on the reverse osmosis membrane surface, capturing images at a resolution of 1920×1080 pixels at a frame rate of 15 frames per second. The industrial camera focuses on the membrane surface through its lens, and the light source evenly illuminates the membrane surface to eliminate shadows. An image sensor converts the optical signal into a digital image. The membrane surface image can visually display the distribution characteristics of the fouling layer. Clean membrane surfaces exhibit uniform light-colored textures, while fouled areas appear as dark patches or streaks. Organic fouling typically forms a viscous brown or yellow fouling layer, inorganic scaling forms white or grayish-white crystalline deposits, and biofilm forms a green or grayish-green adhesion layer. An online interface potential analyzer is installed on the concentrate side of the membrane module. The interface potential, also known as the zeta potential, reflects the potential difference between the membrane surface and the solution. The measurement principle involves applying an electric field near the membrane surface. Charged particles migrate under the influence of the electric field, and the migration velocity is measured using a laser Doppler velocimeter. The interface potential is calculated based on the velocity and the electric field strength. When negatively charged organic pollutants are adsorbed onto the membrane surface, the interfacial potential becomes more negative; conversely, when positively charged metal ions or calcium and magnesium salts are deposited on the membrane surface, the interfacial potential shifts towards the positive direction. The time-series curve of the interfacial potential can reveal the accumulation process of pollutants and the transformation of pollution types. A Fourier transform infrared spectroscopy probe emits broadband infrared light to illuminate the membrane surface. The chemical bonds on the membrane surface absorb infrared light at specific wavenumbers, while the unabsorbed light is received by the detector. The time-domain signal is converted into a frequency-domain spectrum through Fourier transform. Infrared spectral data is a vector, with each element corresponding to the absorption intensity at a specific wavenumber point. Amide bonds in proteins show absorption intensities at 1650 cm⁻¹. -1 A strong absorption peak is generated at 1100 cm⁻¹, indicating that the silicon-oxygen bonds in silicates exhibit a strong absorption peak at this point. -1 An absorption peak is generated at 2920 cm⁻¹, and the carbon-hydrogen bonds in lipids exhibit an absorption peak at 2920 cm⁻¹.-1 Absorption peaks are generated at the membrane surface. By analyzing the intensity changes of these characteristic absorption peaks, the degree of organic fouling, inorganic scaling, and biofilm fouling on the membrane surface can be quantitatively identified. A flocculation image acquisition device is installed in the flocculation pretreatment unit to capture images of the liquid surface in the flocculation reaction tank from a vertical top-down angle. The image resolution is 1280×720 pixels, and the frame rate is 10 frames per second. After the flocculant is added to the flocculation reaction tank, the fine suspended particles in the wastewater aggregate into larger flocs through mechanisms such as charge neutralization, adsorption bridging, and netting and sweeping. The flocs then settle and separate under gravity. The images captured by the flocculation image acquisition device show the morphology and distribution of the flocs. Good flocculation is characterized by larger floc size, uniform distribution, and dense structure. The flocs appear as dark areas with clear boundaries in the image, while the water between the flocs appears light-colored and transparent. When the flocculation effect is poor, the image shows a large number of fine, dispersed particles, high water turbidity, and blurred floc boundaries.
[0019] In one specific embodiment, step S2 includes: Contrast-limited adaptive histogram equalization and edge detection are performed on the membrane surface image, and the processed membrane surface image is divided into multiple grid regions. Based on the conductivity sensor measurements corresponding to each grid region, the membrane surface salt concentration of each grid region is calculated by back-calculating the Nernst-Planck diffusion equation, and the permeate side salt concentration and feed salt concentration are obtained. The local Bekele number of each grid region is calculated based on the local permeation flux and mass transfer coefficient of each grid region. The ratio of the concentration difference between the membrane surface salt concentration and the permeate side salt concentration to the feed salt concentration, and the ratio of the local Bekele number to the critical Reynolds number are substituted into the exponential function and the normalization function to calculate the salt gradient attention weight of each grid region. The salt gradient attention feature vector is obtained by summing the convolutional feature maps of each grid region and their corresponding salt gradient attention weights after performing element-wise multiplication.
[0020] Specifically, the membrane surface image undergoes contrast-limited adaptive histogram equalization. This method divides the image into several small regions and performs histogram equalization on each region separately. By limiting the contrast enhancement, it avoids excessive noise amplification. The processed image enhances local detail contrast while maintaining the overall brightness distribution, making the pollution texture and deposit boundaries on the membrane surface clearer. Next, edge detection is performed on the enhanced image using the Canny operator. This operator first smooths the image with a Gaussian filter to remove noise, then calculates the magnitude and direction of the image gradient, retains local maxima of the gradient magnitude through non-maximum suppression, and finally uses a double thresholding method to determine strong and weak edges. Strong edges are directly retained, while weak edges are only retained if they connect to strong edges. The result of edge detection is a binary image, with edge pixels marked in white and non-edge pixels marked in black. These edges correspond to the contours and boundaries of pollutants on the membrane surface. The processed membrane surface image is then divided into multiple grid regions. The division method divides the image into 8 equal segments horizontally and vertically, forming 64 grid regions, each with a size of 240×135 pixels. The salt concentration on the membrane surface is calculated based on the conductivity sensor measurements for each grid region. The conductivity sensor measures the overall conductivity of the feed solution, while the salt concentration on the membrane surface varies spatially due to concentration polarization. Concentration polarization refers to the phenomenon where the solute concentration near the membrane surface is higher than the bulk solution concentration during membrane separation. The membrane surface salt concentration for each grid region is then calculated using the Nyrnst-Planck diffusion equation, which describes the mass transfer process of ions under the influence of a concentration gradient and an electric field. In reverse osmosis membrane separation, the solute is carried to the membrane surface by convection and then diffuses back from the membrane surface to the bulk solution. At steady state, the convective flux equals the diffusion flux. The membrane surface salt concentration equals the feed salt concentration multiplied by the concentration polarization coefficient. The concentration polarization coefficient equals 1 plus the ratio of permeate flux to mass transfer coefficient. The permeate flux is calculated from data from pressure and flow sensors. The mass transfer coefficient is calculated based on the empirical correlation of the Sherwood number. The Sherwood number is a dimensionless mass transfer coefficient, proportional to the product of the Reynolds number and the Schmidt number. The Reynolds number represents the ratio of inertial force to viscous force in fluid flow, while the Schmidt number represents the ratio of momentum diffusion rate to mass diffusion rate. Through this series of calculations, the membrane surface salt concentration in each grid region is obtained, along with the permeate-side salt concentration and the feed salt concentration. The permeate-side salt concentration is calculated from measurements taken by the product water conductivity sensor, and the feed salt concentration is calculated from measurements taken by the feed water conductivity sensor. The local Bekele number is calculated based on the local permeation flux and mass transfer coefficient of each grid region. The Bekele number is a dimensionless number that characterizes the relative intensity of convective mass transfer and diffusion mass transfer. It is defined as permeation flux multiplied by the thickness of the concentration polarization boundary layer and then divided by the solute diffusion coefficient. The larger the Bekele number, the stronger the convection and the more severe the concentration polarization.The thickness of the concentration polarization boundary layer is estimated using the interfacial potential gradient at the membrane surface. The interfacial potential exhibits a gradient distribution within the concentration polarization boundary layer, and the boundary layer thickness is inversely proportional to the rate of change of the interfacial potential. The ratio of the concentration difference between the membrane surface salt concentration and the permeate side salt concentration to the feed salt concentration, and the ratio of the local Bekeleton number to the critical Reynolds number, are substituted into an exponential function and a normalization function to calculate the salt gradient attention weight for each grid region. The input to the exponential function is the negative ratio of the Bekeleton number to the critical Reynolds number. The exponential function value decreases as the ratio increases, indicating that regions with more severe concentration polarization have lower weights because the image features of these regions are more significantly affected by concentration polarization, resulting in lower reliability. The ratio of the concentration difference to the feed salt concentration reflects the relative increase in the membrane surface salt concentration. This ratio is multiplied by the exponential function value to obtain the original weight for each grid region. The original weights are then processed by a normalization function so that the sum of the weights of all grid regions equals 1. The normalization method divides the original weight of each grid region by the sum of the original weights of all grid regions. The convolutional feature maps of each grid region are multiplied element-wise with their corresponding salt gradient attention weights. The convolutional feature maps are high-dimensional feature representations obtained by extracting features from the membrane surface image using a convolutional neural network. Each grid region corresponds to a feature vector, and each dimension of the feature vector represents a certain abstract feature of that region. The element-wise multiplication operation multiplies each dimension value of the feature vector by its corresponding salt gradient attention weight. Regions with larger weights have their features enhanced, while regions with smaller weights have their features suppressed. The weighted feature vectors of each grid region are then summed. This summation operation adds the feature vectors of all 64 grid regions along their corresponding dimensions to obtain a comprehensive feature vector, called the salt gradient attention feature vector, with a dimension of 512. This feature vector integrates membrane surface contamination information from all grid regions and differentiates the contribution of different regions based on the degree of concentration polarization, ensuring that regions with good flow patterns and less concentration polarization contribute more to the final feature.
[0021] In one specific embodiment, step S3 includes: Infrared spectral data is mapped and processed through a fully connected layer to obtain an infrared spectral embedding vector. Interface potential time series data is input into a single-layer long short-term memory network for encoding and processing to obtain an interface potential time series encoding vector. The salt gradient attention feature vector, infrared spectral embedding vector, and interface potential temporal coding vector are concatenated to obtain a multimodal fusion feature vector. The multimodal fusion feature vector is normalized and spliced with the transmembrane pressure difference, feed flow rate, flocculant dosage and membrane flux at the historical time step to obtain the time-series input vector; The temporal input vector is fed into the membrane fouling temporal memory network. Based on the absorption peak intensity in the infrared spectral data, the probability vectors of fouling patterns such as organic fouling, inorganic scaling, and biofilm formation are identified. The forget gate weights of the membrane fouling temporal memory network are adjusted based on the fouling pattern probability vectors. After processing by a double-layer long short-term memory network, the membrane fouling development rate and the optimal flocculant dosage ratio are output.
[0022] Specifically, the infrared spectral data is mapped and processed through a fully connected layer. The infrared spectral data is a vector containing absorption intensity values at multiple wavenumber points. The vector dimension depends on the scanning resolution of the infrared spectrometer, ranging from 400 cm⁻¹. -1 Up to 4000cm -1 Within a range of 4cm -1A high-resolution scan yields 900 data points, forming a 900-dimensional infrared spectral vector. A fully connected layer is a fundamental structure in neural networks, where each neuron in the input layer connects to each neuron in the output layer via weights. The mapping process in a fully connected layer involves multiplying the 900-dimensional infrared spectral vector by the weight matrix, adding a bias vector, and then performing a nonlinear transformation using an activation function to output a 128-dimensional infrared spectral embedding vector. The weight matrix has a size of 900×128, and the bias vector has a size of 128. The ReLU activation function maps negative values to 0 while keeping positive values unchanged. This mapping compresses and abstracts the raw absorption intensity information of the infrared spectrum into a more compact feature representation. Interface potential time-series data is then input into a single-layer Long Short-Term Memory (LSTM) network for encoding and processing. The interface potential time-series data contains interface potential measurements from the past 10 time points, spaced 1 minute apart, forming a time-series sequence of length 10. The LTM network is a recurrent neural network specifically designed for processing time-series data. A single-layer Long Short-Term Memory (LSTM) network comprises an input gate, a forget gate, an output gate, and memory cells. The input gate controls the degree to which new information enters the memory cells. The forget gate controls the degree to which old information in the memory cells is forgotten. The output gate controls the degree to which information in the memory cells is output to the hidden state. The interface potential time series is input into the LSM network sequentially. At each input time point, the LSM network updates its internal memory cells and hidden states. The input gate calculates the activation value based on the current input value and the hidden state at the previous time point. The forget gate calculates the forgetting ratio based on the same input. The update of a memory cell is the old memory multiplied by the forgetting ratio, plus the new input multiplied by the input gate activation value. The output gate calculates the output activation value based on the memory cells and the current input. The hidden state is equal to the memory cell activated by the hyperbolic tangent function multiplied by the output gate activation value. After processing 10 time points, the final hidden state serves as the interface potential time series encoding vector, with a dimension of 64. This encoding vector contains the trend information and dynamic characteristics of the interface potential changes over time. The salt gradient attention feature vector, infrared spectral embedding vector, and interface potential time-series encoding vector are concatenated. The concatenation operation involves linking the three vectors end-to-end along their dimensional direction. The salt gradient attention feature vector has a dimension of 512. The infrared spectral embedding vector has a dimension of 128. The interface potential time-series encoding vector has a dimension of 64. The concatenated vector yields a 704-dimensional multimodal fusion feature vector. This multimodal fusion feature vector simultaneously contains spatial contamination distribution information from the membrane surface image, chemical composition information from the infrared spectrum, and electrochemical dynamic information from the interface potential. These three modalities complement each other. The multimodal fusion feature vector is then normalized and concatenated with historical time-step values for transmembrane pressure difference, feed flow rate, flocculant dosage, and membrane flux. The historical time step is taken from the past 10 time points. Each time point contains 4 operating parameters, resulting in 40 historical operating parameter values.Normalization involves subtracting the historical minimum value from each parameter value and then dividing by the difference between the historical maximum and minimum values. The normalized parameter values range from 0 to 1. Normalization eliminates the influence of differences in the dimensions and numerical ranges of different parameters. The 40 normalized historical operating parameter values are concatenated with a 704-dimensional multimodal fusion feature vector to obtain a 744-dimensional time-series input vector. This time-series input vector is then fed into a membrane fouling time-series memory network. Based on the absorption peak intensity in the infrared spectral data, probability vectors for fouling patterns such as organic fouling, inorganic scaling, and biofilm formation are identified. The identification method involves extracting infrared spectral data at 1650 cm⁻¹. -1 1100cm -1 and 2920cm -1 The absorption peak intensities at three characteristic wavenumbers are normalized to a sum of 1. These normalized intensities are used as the probabilities of organic fouling, inorganic fouling, and biofilm formation, respectively, forming a fouling pattern probability vector. The forgetting gate weights of the membrane fouling temporal memory network are adjusted based on this probability vector. The adjustment method involves multiplying the fouling pattern probability vector by a modulation coefficient and adding it to the bias term of the forgetting gate. The modulation coefficient is set to 0.3. When the probability of a certain fouling pattern is high, the activation value of the forgetting gate increases accordingly. This enhances the retention of historical information by the memory units, allowing the network to adjust its memory behavior according to the characteristics of different fouling patterns. After processing by the bilayer long short-term memory network, the membrane fouling development rate and the optimal flocculant dosage are output. The first layer of the bilayer long short-term memory network contains 256 hidden units, and the second layer contains 128 hidden units. The output of the first layer serves as the input of the second layer. The cascading of the two layers allows the network to learn more complex temporal patterns. The network's output layer contains two parallel branches. The first branch outputs the membrane fouling development rate through a fully connected layer. The membrane fouling development rate represents the rate at which the transmembrane pressure difference increases over time. The second branch outputs the optimal flocculant dosage through the fully connected layer. The optimal flocculant dosage represents the mass of flocculant required per unit suspended solids concentration.
[0023] In one specific embodiment, step S4 includes: Image enhancement and edge detection processing are performed on the images of the flocculation reaction tank to identify the floc outline and fill the internal voids; The equivalent diameter, roundness, and fractal dimension of each floc are calculated based on the geometric parameters of the floc profile. The particle size distribution of flocs in the flocculation reaction tank image was statistically analyzed, and the volume-weighted average particle size and particle size uniformity index were calculated. The volume-weighted average particle size, particle size uniformity index, and roundness are normalized and then summed according to the weighting coefficients to obtain the flocculation effect score.
[0024] Specifically, image enhancement processing is performed on the flocculation reaction tank image using a contrast-limited adaptive histogram equalization method. This method divides the image into several small regions and performs histogram equalization on each region separately. By limiting the enhancement of contrast, excessive noise amplification is avoided. The enhanced image shows improved contrast between the flocs and the water background, and clearer edges and texture details of the flocs. Edge detection processing is then performed on the enhanced image using the Canny operator. This operator first smooths the image using a Gaussian filter to reduce noise, then calculates the gradients in the horizontal and vertical directions. Pixels with larger gradient magnitudes correspond to edge positions. Non-maximum suppression is used to preserve local maxima of the gradient. Finally, a double thresholding method is used to distinguish between strong and weak edges. Strong edges are directly marked as floc boundaries, while weak edges are only preserved when connected to strong edges. The result of edge detection is the floc contour line. After identifying the floc contour, morphological closing operations are performed to fill the internal voids of the floc. The closing operation includes two steps: dilation and erosion. The dilation operation uses a structuring element to slide across the image, marking all foreground pixels within the structuring element's coverage area as foreground. Dilation causes the floc contour to expand outward, filling the small voids inside. The erosion operation is the opposite of dilation, using a structuring element to slide across the dilated image. Only pixels within the structuring element's coverage area that are entirely foreground pixels are retained as foreground. Erosion restores the expanded boundaries from the dilation process to their original positions. After the closing operation, a completely filled floc region is obtained. The equivalent diameter, circularity, and fractal dimension of each floc are calculated based on the geometric parameters of the floc contour. These geometric parameters are extracted from the pixel coordinates of the floc contour. The projected area of the floc is equal to the number of pixels contained within the contour multiplied by the actual area of a single pixel. The actual area of a single pixel is calibrated based on the camera resolution and shooting distance. The perimeter of the floc is equal to the total length of the contour line, which is composed of a series of adjacent pixels. The perimeter is obtained by summing the distances between adjacent pixels. The equivalent diameter is defined as the diameter of a circle with the same projected area as the floc. It is calculated by multiplying the projected area by 4, dividing by pi, and then taking the square root. Circularity reflects how close the floc shape is to a circle. It is calculated by multiplying the projected area by 4 times pi and then dividing by the square of the circumference. Circularity ranges from 0 to 1; a circularity of 1 indicates a perfectly circular floc, while a smaller circularity indicates a more irregular shape. Fractal dimension reflects the looseness of the floc structure. It is calculated using box counting, which involves covering the floc image with square grids of different sizes and counting the number of grids required to cover the floc boundaries. The grid size and number of grids have a linear relationship in a log-log coordinate system; the slope of this linear relationship is the fractal dimension. A larger fractal dimension indicates a denser floc structure, while a smaller fractal dimension indicates a looser and more porous structure.The particle size distribution of flocs in the flocculation reaction tank image was statistically analyzed. The method involved sorting all flocs in the image according to their equivalent diameter from smallest to largest, calculating the volume of each floc, which was obtained by multiplying the cube of the equivalent diameter by pi and then dividing by 6. This calculation assumed the flocs were spherical. The total volume was obtained by summing the volumes of all flocs. The equivalent diameter corresponding to 50% of the cumulative volume was calculated as the volume-weighted average particle size. 50% of the cumulative volume indicates that flocs smaller than this diameter account for half of the total volume. The particle size uniformity index reflects the dispersion of the particle size distribution. It was calculated by subtracting the particle size corresponding to 10% of the cumulative volume from the particle size corresponding to 90% of the cumulative volume, and then dividing the difference by the volume-weighted average particle size. A smaller particle size uniformity index indicates a more concentrated and uniform particle size distribution, while a larger index indicates a more dispersed particle size distribution. The volume-weighted average particle size, particle size uniformity index, and roundness were normalized. The normalization method was to subtract the minimum expected value of each parameter from the value of the parameter and then divide by the difference between the maximum and minimum expected values. The expected range of the volume-weighted average particle size was set to 1 mm to 5 mm, the expected range of the particle size uniformity index was set to 0.2 to 1.2, and the expected range of roundness was set to 0.5 to 1.0. After normalization, the values of the three parameters were all in the range of 0 to 1. The flocculation effect score is calculated by weighting and summing the weights. The weights are: volume weighted average particle size (0.5), particle size uniformity index (0.3), and roundness (0.2). The particle size uniformity index is taken as 1 minus the normalized value before weighting and summing, because the smaller the particle size uniformity index, the better the flocculation effect. The result of the weighted summation is the flocculation effect score. The flocculation effect score ranges from 0 to 1. The higher the score, the better the flocculation effect. When the score is greater than or equal to 0.75, it is judged as a good flocculation effect, and the corresponding flocs have the characteristics of large particle size, uniform distribution, and dense structure.
[0025] In one specific embodiment, step S5 includes: Calculate the squared deviation of the membrane fouling development rate from the target membrane fouling rate, calculate the pumping energy consumption based on the transmembrane pressure difference and feed flow rate, and calculate the membrane cleaning energy consumption when the membrane cleaning trigger condition is met, thus obtaining the energy consumption term; Calculate the squared term of the rate of change of the optimal flocculant dosage ratio between adjacent time steps, and calculate the squared term of the deviation between the flocculation effect score and the target flocculation effect score; The objective function is constructed by weighting and summing the squared terms of the deviation of membrane fouling development rate, energy consumption, the squared terms of the rate of change of optimal flocculant dosage ratio, and the squared terms of the deviation of flocculation effect score according to preset weight coefficients. Under the constraints of upper limit of transmembrane pressure difference, range of feed flow rate, range of flocculant dosage, and lower limit of salt rejection rate, the objective function is optimized and solved by sequential quadratic programming algorithm to obtain the feed flow rate setpoint, flocculant dosage setpoint, and membrane cleaning trigger signal.
[0026] Specifically, the squared deviation term between the membrane fouling development rate and the target membrane fouling rate is calculated. The membrane fouling development rate represents the rate at which the transmembrane pressure difference increases over time, in bars per hour. This value is predicted and output by the membrane fouling time-series memory network. The target membrane fouling rate is set to 0.05 bars per hour, indicating the expectation of controlling the membrane fouling rate at a low level. The squared deviation term is calculated by subtracting the target membrane fouling rate from the actual predicted membrane fouling development rate and then squaring the result. The squaring operation results in a positive penalty value when the deviation is positive or negative, with a larger absolute value of the deviation resulting in a larger penalty value. Pumping energy consumption is calculated based on the transmembrane pressure difference and feed flow rate. The transmembrane pressure difference is measured by a pressure sensor in bar, and the feed flow rate is measured by a flow sensor in cubic meters per hour. Pumping energy consumption equals the transmembrane pressure difference multiplied by the feed flow rate, divided by 3600, and then divided by the pump efficiency. 3600 is the coefficient for converting hours to seconds, and the pump efficiency is taken as 0.75. The unit of pumping energy consumption is kilowatt-hours. This calculation reflects the energy consumption required to maintain the operation of the reverse osmosis membrane. The higher the transmembrane pressure difference or the larger the feed flow rate, the higher the pumping energy consumption. Membrane cleaning energy consumption is calculated when the membrane cleaning trigger conditions are met. Membrane cleaning trigger conditions include the transmembrane pressure difference exceeding a set threshold or the membrane flux decreasing by more than a set proportion. When cleaning is triggered, the membrane cleaning energy consumption is taken as 15 kilowatt-hours. This value includes the power consumption of the cleaning fluid circulation pump, the heat energy consumption of heating the cleaning fluid, and the energy consumption of auxiliary equipment during the cleaning process. When cleaning is not triggered, the membrane cleaning energy consumption is 0. The energy consumption item is obtained by adding the pumping energy consumption and the membrane cleaning energy consumption. The squared term of the rate of change of the optimal flocculant dosage between adjacent time steps is calculated. The optimal flocculant dosage is predicted and output by the membrane fouling temporal memory network, with units of milligrams of flocculant per milligram of suspended solids. The time interval between adjacent time steps is 1 minute. The rate of change is equal to the optimal flocculant dosage at the current time step minus the optimal flocculant dosage at the previous time step, with units of milligrams of flocculant per milligram of suspended solids per minute. The squared term of the rate of change is the square of the rate of change. This term is used to penalize drastic fluctuations in the flocculant dosage. Frequent and large changes in the flocculant dosage can lead to unstable flocculation effects, increased reagent waste, and operational complexity. The squared term of the deviation between the flocculation effect score and the target flocculation effect score is calculated. The flocculation effect score is output by the flocculation image processing module, with a value ranging from 0 to 1. The target flocculation effect score is set to 0.75, indicating that the expected flocculation effect is at a good level. The squared term of the deviation is calculated by subtracting the target flocculation effect score from the actual flocculation effect score and then taking the square.The squared terms of the deviation of membrane fouling development rate, energy consumption, the squared terms of the rate of change of optimal flocculant dosage, and the squared terms of the deviation of flocculation effect score are weighted and summed according to preset weight coefficients. The weight coefficients are 100 for the deviation of membrane fouling development rate, 50 for energy consumption, 200 for the rate of change of optimal flocculant dosage, and 80 for the deviation of flocculation effect score. These weight coefficients reflect the relative importance of different optimization objectives. The membrane fouling rate control and flocculant dosage stability have higher weights, indicating that more emphasis is placed on the prevention of membrane fouling and operational stability. The objective function is constructed by adding the four weighted values. The smaller the value of the objective function, the closer the system operation state is to the ideal state. The optimization solution is performed under the constraints of upper limit of transmembrane pressure difference, range of feed flow rate, range of flocculant dosage, and lower limit of salt rejection rate. The upper limit of transmembrane pressure difference is set to no more than 4.5 bar, as exceeding this pressure will increase the risk of membrane damage. The range of feed flow rate is set to be between 20 cubic meters per hour and 50 cubic meters per hour. Too low a flow rate will lead to a decrease in production efficiency, while too high a flow rate will lead to excessive membrane scouring. The range of flocculant dosage is set to be between 0 mg / L and 80 mg / L. A dosage of 0 mg / L means no flocculant is added. The upper limit of dosage avoids excessive addition, which will cause waste of reagents and secondary pollution. The lower limit of salt rejection rate is set to be no less than 98.5%. The salt rejection rate is calculated by the conductivity of the product water side and the feed side. The salt rejection rate is equal to 1 minus the salt concentration of the product water side divided by the salt concentration of the feed side and multiplied by 100%. This constraint ensures that the product water quality meets the desalination requirements. A sequential quadratic programming algorithm is used to optimize the objective function. Sequential quadratic programming is a numerical method for handling nonlinear constrained optimization problems. The algorithm first performs a Taylor expansion at the current iteration point to linearize the nonlinear objective function and constraints, transforming the nonlinear optimization problem into a quadratic programming subproblem. The objective function of the quadratic programming subproblem is a quadratic approximation of the original objective function, and the constraints are linear approximations of the original constraints. Solving the quadratic programming subproblem yields the search direction. A one-dimensional search is performed along the search direction to determine the step size, and the control variables are updated. The above process is repeated until the change in the objective function is lower than the convergence threshold or the number of iterations reaches the upper limit. The convergence threshold is set to the change in the objective function being less than 0.01%, and the maximum number of iterations is set to 50. The optimal control sequence, which includes feed flow rate, flocculant dosage, crossflow velocity, and membrane cleaning trigger signal, is obtained through optimization. This control sequence contains control decisions for multiple future time steps. A rolling time-domain optimization strategy is adopted to execute only the control instructions for the current time step. The feed flow rate setpoint, flocculant dosage setpoint, and membrane cleaning trigger signal corresponding to the first time step in the optimal control sequence are extracted. These control instructions are then sent to the field actuators via an Internet of Things (IoT) communication protocol.
[0027] In one specific embodiment, under constraints of upper limit of transmembrane pressure difference, range of feed flow rate, range of flocculant dosage, and lower limit of salt rejection rate, a sequential quadratic programming algorithm is used to optimize and solve the objective function to obtain the feed flow rate setpoint, the flocculant dosage setpoint, and the membrane cleaning trigger signal, including: The trend of transmembrane pressure difference is corrected based on the membrane fouling development rate. A state-space model is constructed by combining historical operating data. The state variables of the state-space model include transmembrane pressure difference, membrane flux, membrane surface salt concentration and flocculation effect score. The control variables include feed flow rate, flocculant dosage, cross-flow velocity and cleaning trigger signal. The state-space model, objective function, and constraints are input into the sequential quadratic programming algorithm. The objective function is linearized and quadratic approximated to construct a quadratic programming subproblem. The quadratic programming subproblem is solved iteratively. The iteration is terminated when the change in the objective function is lower than the convergence threshold or the number of iterations reaches the upper limit, so as to obtain the optimal control sequence with multiple time steps. A rolling time-domain optimization strategy is used to extract the control command at the current time step in the optimal control sequence, and obtain the feed flow rate setpoint, flocculant dosage setpoint, crossflow velocity setpoint, and membrane cleaning trigger signal.
[0028] Specifically, the transmembrane pressure gradient trend is corrected based on the membrane fouling development rate. The membrane fouling development rate represents the rate at which the transmembrane pressure gradient increases over time, and this value is predicted by the membrane fouling time-series memory network. The future trend of the transmembrane pressure gradient is calculated by adding the current transmembrane pressure gradient value to the membrane fouling development rate multiplied by the prediction time step. The purpose of this correction is to incorporate the dynamic impact of membrane fouling on the transmembrane pressure gradient into the state-space model, enabling the model to more accurately describe the evolution of the system state. A state-space model is constructed using historical operating data, including transmembrane pressure gradient, membrane flux, membrane surface salt concentration, flocculation effect score, and corresponding control inputs over a past period. The state-space model is a mathematical model describing a dynamic system, containing state equations and output equations. The state equations describe the evolution of the system state over time, while the output equations describe the relationship between the observed quantities and the state variables. The state variables in the state-space model include transmembrane pressure difference, membrane flux, membrane surface salt concentration, and flocculation effect score. These four variables describe the operating state of the wastewater desalination system. Transmembrane pressure difference reflects the degree of membrane fouling, membrane flux reflects the membrane's permeability, membrane surface salt concentration reflects the degree of concentration polarization, and flocculation effect score reflects the pretreatment effect. Control variables include feed flow rate, flocculant dosage, crossflow velocity, and cleaning trigger signal. Feed flow rate affects the membrane's hydraulic load and permeate flux; flocculant dosage affects the influent suspended solids concentration and membrane fouling rate; crossflow velocity affects the shear force on the membrane surface and the flushing effect of pollutants; and the cleaning trigger signal determines whether to initiate the membrane cleaning procedure. The state-space model is obtained offline from historical operating data using a subspace identification method. This method extracts the system's state sequence from the input-output data by constructing a Hankel matrix, and then estimates the parameters of the system matrix and control matrix using the least squares method. The system matrix describes the coupling relationship between state variables and its own dynamic characteristics, while the control matrix describes the degree of influence of the control input on the state variables. The state-space model, objective function, and constraints are input into a sequential quadratic programming algorithm. The objective function is a weighted sum of the deviation terms of membrane fouling development rate, energy consumption, flocculant dosage variation rate, and flocculation effect score deviation. Constraints include upper limits for transmembrane pressure difference, feed flow rate, flocculant dosage, and salt rejection rate. The sequential quadratic programming algorithm linearizes and approximates the objective function. Linearization involves performing a first-order Taylor expansion of the objective function at the current operating point, approximating the original objective function with a linear function. Quadratic approximation adds second-order terms to the linearized function, approximating the original objective function with a quadratic function. The second-order coefficient matrix of the quadratic function is iteratively updated using a quasi-Newton method, which gradually approximates the true Hessian matrix using the gradient information of the objective function. Constraints are also linearized; nonlinear constraints are linearized by performing a first-order Taylor expansion at the current operating point. The linearized objective function and constraints constitute a quadratic programming subproblem.The quadratic programming subproblem is solved iteratively using either the effective set method or the interior-point method. The effective set method starts from a vertex of the feasible region and searches for the optimal solution along its boundary. The interior-point method starts from within the feasible region and incorporates constraints into the objective function through obstacle functions, gradually approaching the optimal solution. Each iteration yields a search direction and step size. Control variables are updated along the search direction, and the objective function value and constraint violation degree are recalculated. Iteration terminates when the change in the objective function falls below the convergence threshold or the maximum number of iterations is reached. The convergence threshold indicates that the improvement in the objective function is already very small, and further iterations will have limited improvement. The maximum number of iterations limits the computation time of the algorithm to avoid infinite loops. After iteration terminates, an optimal control sequence containing multiple future time steps is obtained. The optimal control sequence is a vector sequence, with each vector corresponding to a control decision for a time step, including the feed flow rate, flocculant dosage, crossflow velocity, and cleaning trigger signal for that time step. A rolling time-domain optimization strategy is employed to extract the control command for the current time step from the optimal control sequence. The core idea of this strategy is to replan the future control sequence at each sampling time, executing only the control command for the first time step, and then re-optimizing at the next sampling time. This strategy continuously corrects control decisions based on real-time feedback from the system state, enhancing the system's robustness to disturbances and uncertainties. The feed flow rate setpoint, flocculant dosage setpoint, crossflow velocity setpoint, and membrane cleaning trigger signal corresponding to the first time step in the optimal control sequence are extracted. These control commands are then transmitted to the field actuators for execution via an IoT communication protocol.
[0029] The above describes the IoT-based automatic control method for wastewater desalination in the embodiments of this application. The following describes the IoT-based automatic control system for wastewater desalination in the embodiments of this application. Please refer to [link / reference]. Figure 2 One embodiment of the IoT-based automatic control system for wastewater desalination in this application includes: The acquisition module is used to acquire images of the reverse osmosis membrane surface, interfacial potential time series data, infrared spectral data, transmembrane pressure difference, feed flow rate, and images of the flocculation reaction tank. The calculation module is used to divide the membrane surface image into grid regions, calculate the salt gradient attention weights based on the concentration difference between the membrane surface salt concentration and the permeate side salt concentration and the local Bekele number, and obtain the salt gradient attention feature vector. The input module is used to concatenate the salt gradient attention feature vector with the infrared spectral data and the interface potential time series data, and combine the transmembrane pressure difference and the feed flow rate to input the membrane fouling time series memory network to obtain the membrane fouling development rate and the optimal flocculant dosage ratio. The extraction module is used to extract the particle size parameters of the flocs in the image of the flocculation reaction tank, perform weighted calculation on the particle size parameters, and obtain a flocculation effect score. The solution module is used to construct an objective function by weighted summing of the squared deviation term of the membrane fouling development rate, the energy consumption term, the squared rate of change of the optimal flocculant dosage ratio, and the squared deviation term of the flocculation effect score. Under constraints, the objective function is solved to obtain the feed flow rate setpoint, the flocculant dosage setpoint, and the membrane cleaning trigger signal.
[0030] above Figure 2 The automatic control system for wastewater desalination based on the Internet of Things (IoT) in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The automatic control equipment for wastewater desalination based on the IoT in this embodiment of the invention will be described in detail from the perspective of hardware processing.
[0031] Reference Figure 3 This invention also provides an IoT-based automatic control device for wastewater desalination treatment. This IoT-based automatic control device can be a server, and its internal structure can be as follows: Figure 3 As shown, the IoT-based automatic control device for wastewater desalination includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor, designed as a computer, provides computing and control capabilities. The memory of the IoT-based automatic control device for wastewater desalination includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the IoT-based automatic control device for wastewater desalination is used to store the data corresponding to this embodiment. The network interface of the IoT-based automatic control device for wastewater desalination is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the above-described method.
[0032] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the IoT-based automatic control device for wastewater desalination applied thereto.
[0033] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the Internet of Things-based automatic control method for wastewater desalination.
[0034] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0035] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an IoT-based wastewater desalination automatic control device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0036] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An automatic control method for wastewater desalination treatment based on the Internet of Things, characterized by, The method comprises: Step S1: collecting membrane surface images, interfacial potential time series data, infrared spectrum data, transmembrane pressure difference, feed flow and flocculation reaction tank images of the reverse osmosis membrane; Step S2: dividing the membrane surface images into grid regions, calculating salt gradient attention weights according to the concentration difference between the membrane surface salt concentration and the salt concentration on the permeation side and the local Bekley number, and obtaining a salt gradient attention feature vector; Step S3: splicing the salt gradient attention feature vector with the infrared spectrum data and the interfacial potential time series data, inputting the transmembrane pressure difference and the feed flow into a membrane pollution time series memory network, and obtaining a membrane pollution development rate and an optimal flocculant dosage ratio; Step S4: extracting the particle size parameters of the flocs in the flocculation reaction tank images, performing weighted calculation on the particle size parameters, and obtaining a flocculation effect score; Step S5: constructing a target function by weighted sum of the square deviation term of the membrane pollution development rate, the energy consumption term, the square deviation term of the change rate of the optimal flocculant dosage ratio and the square deviation term of the flocculation effect score, and solving the feed flow setting value, the flocculant dosage setting value and the membrane cleaning trigger signal under the constraint condition. 2.The IoT-based automatic control method for wastewater desalination treatment according to claim 1, wherein, The step S1 comprises: installing pH sensors, conductivity sensors, turbidity sensors, flow sensors, temperature sensors and pressure sensors at the water inlet end of the reverse osmosis membrane module to collect the water inlet pH value, conductivity value, turbidity value, feed flow, water inlet temperature and water inlet pressure; arranging an industrial camera on the surface of the reverse osmosis membrane to shoot the membrane surface images of the reverse osmosis membrane; installing an interfacial potential online analyzer and a Fourier transform infrared spectrum probe on the concentrated water side of the membrane module to collect interfacial potential time series data and infrared spectrum data; installing a flocculation image acquisition device in the flocculation pretreatment unit to shoot the floc formation process in the flocculation reaction tank at a vertical overhead angle to obtain the flocculation reaction tank images. 3.The IoT-based automatic control method for wastewater desalination treatment according to claim 1, wherein, The step S2 comprises: performing contrast limited adaptive histogram equalization processing and edge detection processing on the membrane surface images, and dividing the processed membrane surface images into a plurality of grid regions; calculating the membrane surface salt concentration of each grid region by inversely calculating according to the conductivity sensor measurement value corresponding to each grid region combined with the Nernst-Planck diffusion equation, and obtaining the permeation side salt concentration and the feed salt concentration; calculating the local Bekley number of each grid region according to the local permeation flux and the mass transfer coefficient of each grid region, and calculating the salt gradient attention weight of each grid region by substituting the ratio of the concentration difference between the membrane surface salt concentration and the permeation side salt concentration to the feed salt concentration and the ratio of the local Bekley number to the critical Reynolds number into the exponential function and the normalization function; performing element-wise multiplication operation and summation on the convolution feature map of each grid region and the corresponding salt gradient attention weight to obtain a salt gradient attention feature vector. 4.The IoT-based automatic control method for wastewater desalination treatment according to claim 1, wherein, The step S3 comprises: mapping the infrared spectrum data through a fully connected layer to obtain an infrared spectrum embedding vector, and inputting the interfacial potential time series data into a single-layer long short-term memory network for coding processing to obtain an interfacial potential time series coding vector; The salt gradient attention feature vector, the infrared spectrum embedding vector and the interface potential time sequence coding vector are spliced to obtain a multi-modal fusion feature vector; The multi-modal fusion feature vector is normalized and spliced with the transmembrane pressure difference, the feed flow rate, the flocculant dosage and the membrane flux of the historical time step to obtain a time sequence input vector; The time sequence input vector is input into a membrane fouling time sequence memory network, a pollution mode probability vector of organic pollution, inorganic scaling and biofilm formation is identified according to the absorption peak intensity in the infrared spectrum data, the forgetting gate weight of the membrane fouling time sequence memory network is adjusted based on the pollution mode probability vector, and the membrane fouling development rate and the optimal flocculant dosage ratio are output after being processed by a double-layer long short-term memory network. 5.The IoT-based automatic control method for wastewater desalination treatment according to claim 1, wherein, The step S4 comprises: The image of the flocculation reaction tank is subjected to image enhancement processing and edge detection processing, the floc contour is identified and the internal cavity is filled; The equivalent diameter, circularity and fractal dimension of each floc are calculated according to the geometric parameters of the floc contour; The particle size distribution of the flocs in the flocculation reaction tank image is counted, and the volume-weighted average particle size and the particle size uniformity index are calculated; The volume-weighted average particle size, the particle size uniformity index and the circularity are normalized and then weighted and summed according to the weight coefficients to obtain a flocculation effect score. 6.The IoT-based automatic control method of wastewater desalination treatment according to claim 1, wherein, The step S5 comprises: The deviation square term of the membrane fouling development rate and the target membrane fouling rate is calculated, the pumping energy consumption is calculated according to the transmembrane pressure difference and the feed flow rate, the membrane cleaning energy consumption is calculated when the membrane cleaning trigger condition is met, and an energy consumption term is obtained; The change rate square term of the optimal flocculant dosage ratio between adjacent time steps is calculated, and the deviation square term of the flocculation effect score and the target flocculation effect score is calculated; The deviation square term of the membrane fouling development rate, the energy consumption term, the change rate square term of the optimal flocculant dosage ratio and the deviation square term of the flocculation effect score are weighted and summed according to the preset weight coefficients to construct an objective function; Under the constraints of the upper limit of the transmembrane pressure difference, the range of the feed flow rate, the range of the flocculant dosage and the lower limit of the salt rejection rate, the objective function is optimized and solved by using a sequential quadratic programming algorithm to obtain a feed flow rate set value, a flocculant dosage set value and a membrane cleaning trigger signal. 7.The IoT-based automatic control method of wastewater desalination treatment according to claim 6, wherein, Under the constraints of the upper limit of the transmembrane pressure difference, the range of the feed flow rate, the range of the flocculant dosage and the lower limit of the salt rejection rate, the objective function is optimized and solved by using a sequential quadratic programming algorithm to obtain a feed flow rate set value, a flocculant dosage set value and a membrane cleaning trigger signal, comprising: The transmembrane pressure difference change trend is corrected based on the membrane fouling development rate, and a state space model is constructed in combination with historical operation data, wherein the state variables of the state space model include the transmembrane pressure difference, the membrane flux, the membrane surface salt concentration and the flocculation effect score, and the control variables include the feed flow rate, the flocculant dosage, the cross-flow speed and the cleaning trigger signal; Input the state space model, the target function and the input sequence of the constraint condition into a sequence quadratic programming algorithm, perform linearization and quadratic approximation processing on the target function, and construct a quadratic programming subproblem; Iteratively solve the quadratic programming subproblem, terminate the iteration when the variation of the target function is lower than a convergence threshold or the iteration number reaches an upper limit, and obtain an optimal control sequence including multiple time steps; Extract the control instruction of the current time step in the optimal control sequence using a rolling horizon optimization strategy, and obtain the feed flow rate set value, the flocculant dosage set value, the cross-flow speed set value and the membrane cleaning trigger signal.
8. An automatic control system for wastewater desalination treatment based on the Internet of Things, characterized by, The Internet of Things-based automatic control system for wastewater desalination treatment comprises: The acquisition module is configured to acquire a membrane surface image, interfacial potential time series data, infrared spectrum data, a transmembrane pressure difference, a feed flow rate and a flocculation reaction tank image of the reverse osmosis membrane. The calculation module is configured to divide the membrane surface image into grid regions, calculate salt gradient attention weights according to a concentration difference between a membrane surface salt concentration and a permeation side salt concentration and a local Berkeley number, and obtain a salt gradient attention feature vector. The input module is configured to splice the salt gradient attention feature vector with the infrared spectrum data and the interfacial potential time series data, input a membrane pollution time series memory network in combination with the transmembrane pressure difference and the feed flow rate, and obtain a membrane pollution development rate and an optimal flocculant dosage proportion. The extraction module is configured to extract a particle size parameter of flocs in the flocculation reaction tank image, perform weighted calculation on the particle size parameter, and obtain a flocculation effect score. The solution module is configured to construct a target function by weighted summation of a deviation square term of the membrane pollution development rate, an energy consumption term, a variation rate square term of the optimal flocculant dosage proportion and a deviation square term of the flocculation effect score, and solve the target function under a constraint condition to obtain a feed flow rate set value, a flocculant dosage set value and a membrane cleaning trigger signal.
9. A wastewater desalination treatment automatic control device based on Internet of Things, characterized in that, The computer program causes the processor to execute the Internet of Things-based automatic control method for wastewater desalination treatment when the computer program is run on the processor.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program causes the processor to execute the Internet of Things-based automatic control method for wastewater desalination treatment when the computer program is run on the processor.
Citation Information
Patent Citations
Intelligent coagulant adding control method and system based on image recognition and multi-parameter modeling
CN120535101A
Intelligent sewage treatment process optimization method and system
CN120553860A
Water-treatment apparatus using membrane unit and Method thereof
KR101692789B1
Cited By
High salinity wastewater purification method coupling advanced oxidation with membrane filtration
CN122324972A
High-salinity wastewater purification method that couples advanced oxidation and membrane filtration
CN122324972B
