Intelligent dosing control method based on water quality on-line monitoring
The intelligent dosing control method, which combines full-spectrum scanning and convolutional neural networks, solves the interference problem of traditional water quality monitoring, realizes real-time monitoring of multiple parameters and preventive dosing, and improves the stability and economy of water treatment systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INNER MONGOLIA DONGYUAN ENVIRONMENTAL PROTECTION TECH CO LTD
- Filing Date
- 2026-04-07
- Publication Date
- 2026-05-05
AI Technical Summary
Traditional water quality monitoring sensors are susceptible to interference from water turbidity and color, resulting in decreased accuracy of the sensing data. Furthermore, the dosing control logic lacks predictability, making it difficult to perform preventative dosing before water quality indicators reach thresholds. Conventional analytical methods also struggle to decouple multiple chemical indicators and potential toxic substances.
A full-spectrum scanning module is used to capture spectral fingerprints. Combined with cheminformatics and convolutional neural networks, multiple water quality parameters are identified through multidimensional feature extraction and quantification. Intelligent decision-making algorithms are used to achieve precise dosing control, including feedback and feedforward compensation control.
It achieves high-precision real-time monitoring of multiple parameters, has anti-interference capabilities, has preventive control advantages, reduces reagent waste, improves the intelligence and economy of the dosing process, and adapts to complex and ever-changing industrial application scenarios.
Smart Images

Figure CN121978045A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wastewater treatment and industrial automatic control, specifically relating to an intelligent dosing control method based on online water quality monitoring. Background Technology
[0002] With the continuous advancement of water treatment technology, intelligent dosing control systems for industrial wastewater and municipal sewage treatment have become crucial for ensuring effluent quality meets standards and reducing operating costs. Traditional water quality monitoring systems are typically a core component of the water treatment process, guiding the dosing frequency of chemical dosing equipment through real-time capture of key water quality parameters. Especially in complex and variable water quality environments, real-time and accurate water quality data feedback directly impacts the stability of biological treatment units and the economic efficiency of chemical dosing, placing high demands on the system's monitoring accuracy, anti-interference capabilities, and response speed.
[0003] Automated dosing technology based on online sensors integrates electrochemical or conventional optical sampling modules to achieve dynamic tracking and feedback control of specific water quality indicators. This type of technology aims to automatically adjust the dosage of chemicals based on fluctuations in the influent load, replacing the traditional manual, experience-based dosing method. By establishing a mapping model between water quality parameters and dosage, the system attempts to minimize chemical waste and reduce negative impacts on subsequent processes while ensuring treatment efficiency.
[0004] Traditional sensors often monitor only a few indicators and are highly susceptible to interference from the cross-interference of physical properties such as turbidity and color in water, leading to a significant decrease in the accuracy of the sensing data. Furthermore, existing chemical dosing control logic is mostly reactive and compensatory, lacking the ability to anticipate potential pollution risks and failing to implement preventative dosing by capturing changes in spectral characteristics before water quality indicators reach concentration thresholds. In addition, conventional analytical methods struggle to efficiently decouple multiple chemical indicators and potentially toxic substances from complex water signals, resulting in a lack of holistic approach to dosing decisions and an inability to cope with nonlinear and sudden water quality deterioration scenarios. Summary of the Invention
[0005] The purpose of this invention is to provide an intelligent dosing control method based on online water quality monitoring, which can effectively solve the problems mentioned in the background. Traditional water quality monitoring sensors are highly susceptible to cross-interference from physical characteristics such as turbidity and color in complex water treatment environments, leading to a significant decrease in the accuracy of the sensing data. Furthermore, monitoring indicators are often limited to single parameters, failing to achieve comprehensive coverage of complex pollutants. Simultaneously, existing dosing control logic is mostly reactive, lacking the ability to anticipate potential pollution risks and failing to implement preventative dosing by capturing changes in spectral characteristics before water quality indicators reach concentration thresholds. In addition, conventional analytical methods struggle to efficiently decouple multiple chemical indicators and potentially toxic substances from complex water signals, resulting in a lack of globalization in dosing decisions. This invention aims to achieve precise water quality sensing and intelligent dosing control by fusing spectral fingerprinting with multi-parameter inversion from cheminformatics.
[0006] To achieve the above objectives, the technical solution adopted by this invention is: an intelligent dosing control method based on online water quality monitoring, comprising the following specific steps: Step 1: Use a full-spectrum scanning module to capture the spectral fingerprint of the water body to be treated. By frequently collecting transmission spectral data of the water body within a preset band range, obtain the original spectral feature signal sequence containing information on the composition of the water body. Step 2: Introduce molecular algorithms from cheminformatics to preprocess and enhance the original spectral feature signal sequence, establish the correlation mapping between spectral features and molecular structural characteristics, and identify molecular fingerprint information in water bodies through multidimensional feature extraction. Step 3: Using a constructed convolutional neural network model, chemical oxygen demand, ammonia nitrogen, total phosphorus, and three categories of potential water toxicity indicators (comprehensive biological toxicity, heavy metal toxicity, and recalcitrant toxic organic matter toxicity) are simultaneously decoupled from complex spectral signals. The convolutional neural network model identifies potential toxic substances by analyzing the residual distribution between real-time spectral fingerprints and a preset standard spectral library, and quantifies the three categories of potential water toxicity indicators using the relative toxicity equivalent method, thereby achieving parallel inversion and real-time quantification of multiple water quality parameters. Step 4: Based on the dynamic change trends of the multi-parameter water quality indicators and spectral fingerprint obtained by inversion, the target dosage is calculated through intelligent decision-making algorithm, and the actuator is driven to complete the precise dosing of the agent.
[0007] Preferably, in step 1, the full-spectrum scanning module consists of a high-power broadband light source, a high-resolution grating beam splitter, and a high-sensitivity photodetector array. The light beam emitted by the broadband light source passes through a collimating optical system and then through a water sample measurement cell of a predetermined thickness. Organic and inorganic substances in the water sample selectively absorb light energy of specific wavelengths. The beam splitter decomposes the transmitted light into a continuous spatial spectrum, which is then converted into digital electrical signals by the photodetector array. The sampling frequency of the full-spectrum scanning module is set to a preset high-frequency value to ensure that instantaneous fluctuations in water quality can be captured in real time.
[0008] Preferably, in step 1, before acquiring the original spectral feature signal sequence, the system automatically performs optical path calibration and background subtraction operations. A reference spectral signal is obtained by measuring a preset standard reference solution. The real-time measured water sample spectral signal and the reference spectral signal are then logarithmically transformed to calculate the absorbance spectrum. This absorbance spectrum covers the complete range from the ultraviolet band to the visible light band, providing a comprehensive information foundation for subsequent molecular characteristic analysis.
[0009] Preferably, in step 2, the preprocessing of the original spectral feature signal sequence includes multivariate scattering correction, baseline shift compensation, and smoothing and denoising. Multivariate scattering correction eliminates baseline shifts and offsets caused by scattering from suspended particles in the water by establishing a linear regression relationship between the sample spectrum and the average spectrum. Smoothing and denoising employs a sliding window algorithm based on polynomial fitting, effectively suppressing high-frequency random noise while preserving the shape of spectral feature peaks.
[0010] Preferably, in step 2, the molecular algorithm involves derivative transformation and frequency domain decomposition of the spectral signal. By calculating the order derivative of the absorbance spectrum, severely overlapping characteristic absorption peaks are amplified, improving the spectral resolution. Frequency domain decomposition utilizes wavelet transform technology to decompose the spectral signal into subspaces of different frequency scales, extracting characteristic components related to molecular vibrational and rotational energy level transitions to form a highly recognizable molecular fingerprint.
[0011] Preferably, in step 3, the convolutional neural network model includes an input layer, multiple alternating convolutional and pooling layers, a fully connected layer, and an output layer. The input layer receives a preprocessed molecular fingerprint feature vector. The convolutional layers extract local features from the input vector using a preset number of convolutional kernels, capturing local morphological features in the spectral curve, such as peak position, peak width, and peak intensity. The pooling layers reduce the feature dimension through downsampling operations, enhancing the model's robustness to spectral translation and scaling.
[0012] Preferably, in step 3, the training process of the convolutional neural network model uses a large-scale standard water sample dataset with known concentrations. During the training phase, the network weights are dynamically adjusted using the backpropagation algorithm by minimizing the mean squared error loss function between the predicted water quality parameters and the standard measured values. A dropout layer is introduced into the model to prevent overfitting and ensure that the model has good generalization ability when facing unknown water quality fluctuations.
[0013] Preferably, in step 3, the convolutional neural network model is equipped with an anomaly detection module for identifying water toxicity indicators. This module analyzes the residual distribution of real-time spectral fingerprints deviating from a preset standard spectral library. When the residual value exceeds a preset safety threshold and exhibits specific abnormal absorption characteristics, the system automatically determines that a potentially toxic substance is present. The anomaly detection module works in parallel with the multi-parameter inversion module, providing additional safety constraints for dosing decisions.
[0014] Preferably, in step 4, the intelligent decision-making algorithm combines feedback control and feedforward compensation control. The feedforward compensation part calculates the basic dosage based on the influent loads of chemical oxygen demand, ammonia nitrogen, and total phosphorus obtained in step 3, according to a preset stoichiometric ratio. The feedback control part monitors the effluent indicators after the reaction tank in real time, and performs proportional-integral-derivative adjustments based on the deviation between the effluent value and the target setpoint to correct the basic dosage.
[0015] Preferably, in step 4, the process of calculating the target dosage further includes real-time monitoring of the rate of change of the spectral fingerprint. When the slope of the spectral signal change within a preset time window exceeds a preset warning value, the system determines it as a sudden pollution shock and automatically activates the emergency dosing mode. In the emergency dosing mode, the dosing ratio is increased by a preset proportion based on the basic dosage to achieve preventative intervention and prevent effluent indicators from exceeding standards.
[0016] Preferably, the intelligent dosing control method based on online water quality monitoring further includes status monitoring and adaptive adjustment of the actuator. The actuator includes a metering pump and a frequency converter. The system collects the speed signal of the metering pump and the pressure sensor signal in real time, and ensures that the actual dosing flow rate is highly consistent with the commanded dosing amount through a closed-loop control circuit. When abnormal pipeline pressure or flow deviation exceeding a preset range is detected, the system automatically switches to the standby pump and triggers an alarm.
[0017] Preferably, the intelligent dosing control method based on online water quality monitoring further includes automatic cleaning circulation. After the preset operating cycle is reached, the system stops sampling and switches to the cleaning fluid flow path. A preset concentration of cleaning agent is used to chemically clean the inner wall of the measuring tank, and the cavitation effect generated by the ultrasonic generator removes the attached biofilm and inorganic scale. After cleaning, the system is rinsed multiple times with ultrapure water and the reference spectrum is recalibrated.
[0018] Preferably, in step 3, the multi-parameter decoupling process employs a collaborative regression strategy. Since different water quality indicators overlap in certain spectral bands, the convolutional neural network model obtains global spectral features through a shared feature extraction layer and sets independent regression branches for different indicators in the fully connected layer. This architecture can leverage the physicochemical correlations between different parameters to improve the inversion accuracy of a single indicator through joint optimization.
[0019] Preferably, in step 4, the target dosage is calculated by fully considering reaction kinetic parameters. The system dynamically adjusts the contact reaction time between the reagent and the pollutants based on the current water temperature, pH, and effective volume of the reaction tank. When the water temperature decreases, causing the reaction rate to slow down, the system automatically extends the preset reaction cycle and adjusts the dosage appropriately to compensate for the impact of environmental factors on treatment efficiency.
[0020] Preferably, the intelligent dosing control method based on online water quality monitoring has remote data transmission and cloud learning capabilities. The spectral data and inversion results collected on-site are encrypted and transmitted to a cloud database via an industrial IoT gateway. The cloud server periodically performs in-depth mining of massive historical data, optimizes the parameters of the convolutional neural network, and transmits the updated model weights back to the on-site terminal via a remote network, enabling continuous evolution of the control algorithm.
[0021] Preferably, the molecular algorithm further includes cluster analysis of complex organic categories in the water body. By calculating the similarity between the real-time spectral fingerprint and pre-stored spectral templates of wastewater from different industries, the pollution source characteristics of the current water sample are identified, such as whether it belongs to papermaking wastewater, chemical wastewater, or domestic sewage. Based on the identified pollution source category, the system automatically calls the matching dosing control strategy parameter set to achieve targeted control.
[0022] Preferably, the full-spectrum scanning module in step 1 has a corrosion-resistant housing and integrates an environmental monitoring sensor. The environmental monitoring sensor senses the temperature and humidity inside the module in real time. When the internal environment exceeds the preset operating range, the system automatically activates the constant temperature and humidity components to prevent thermal drift or water vapor condensation from affecting the measurement accuracy of the optical elements.
[0023] Preferably, the convolutional neural network model includes data validation logic after the output layer. This logic verifies the validity of the inversion results by establishing logical constraints between water quality parameters, such as total phosphorus concentration typically not being lower than orthophosphate concentration. If the output results violate preset physicochemical logical constraints, the system automatically marks the data set as invalid and calls upon valid features from the previous sampling period for inference and filling.
[0024] Preferably, the intelligent decision-making algorithm also integrates a chemical inventory management function. It accumulates and calculates the total amount of chemical actually added, and monitors the remaining storage in the chemical tank using a level sensor. When the remaining storage falls below a preset alarm level, the system automatically generates a chemical requisition instruction and calculates the predetermined operating time that the remaining chemical can sustain under the current influent load.
[0025] Preferably, the measurement cell of the full-spectrum scanning module has a self-cleaning structure. This structure includes a mechanical scraping device installed inside the measurement cell. After each measurement cycle, the mechanical scraping device, driven by a drive motor, performs bidirectional reciprocating scraping of the measurement window to remove any potentially deposited particles or sticky substances, ensuring that the optical path always maintains high transmittance.
[0026] Preferably, in step 3, for the inversion process of chemical oxygen demand, the model focuses on extracting the characteristic absorption components in the ultraviolet band; for the inversion process of ammonia nitrogen, the model focuses on capturing the molecular vibrational frequency harmonics characteristics in the near-infrared region. By nonlinearly weighting the characteristics of different bands, the model achieves parallel decoupling of multiple parameters while taking into account the characteristic sensitivity of each index.
[0027] Preferably, in step 4, the control frequency of the dosing pump is smoothed using a fuzzy logic controller. The fuzzy logic controller takes the dosing deviation and the rate of change of deviation as input, and generates a stable control voltage through fuzzification, inference, and defuzzification processes. This method avoids frequent start-ups and large-scale fluctuations in the actuator when water quality fluctuates drastically, thus extending the service life of the metering pump.
[0028] Preferably, the intelligent dosing control method based on online water quality monitoring, in application, establishes a long-term correlation model between the influent spectral fingerprint and the quality of the process effluent to evaluate the health of the process system. If, under normal dosing logic, the effluent spectral characteristics show abnormal drift, the system determines that the biochemical treatment unit is damaged or the reagent efficiency is reduced, and automatically prompts technicians to intervene manually.
[0029] Preferably, the parameter updates of the convolutional neural network model follow an incremental learning mechanism. During operation, the system continuously collects special samples with large inversion errors and uses these samples to locally fine-tune the model during preset offline time periods. This incremental learning approach enables the system to quickly adapt to new production processes or changes in the discharge characteristics of upstream drainage enterprises, maintaining the continuous accuracy of its sensing capabilities.
[0030] Preferably, the feature enhancement process in step 2 utilizes the local extremum properties of second-order differential spectroscopy. By identifying zero-crossing points and extrema points in the differential spectrum, the center wavelength position of the molecular absorption peak is precisely located. This positional information is added as a strong feature constraint to the input layer of the convolutional neural network, enabling the model to accurately extract key chemical information even in environments with extremely low signal-to-noise ratios.
[0031] Preferably, the intelligent decision-making algorithm also has a load forecasting function. It utilizes a long short-term memory network to perform sequence modeling on historical influent flow and concentration data, predicting pollutant load changes within a preset time period. Feedforward compensation control, combined with this prediction result, adjusts the pre-emptive output of the dosing pump in advance, further reducing the system's response delay to sudden load shocks.
[0032] Preferably, the optical path system of the full-spectrum scanning module is equipped with an automatic filter wheel. The filter wheel automatically switches between narrowband filters or attenuators of different specifications according to the turbidity level of the water sample to be tested. When the turbidity of the influent is too high, resulting in an extremely weak optical signal, the system automatically increases the power of the light source and switches to a specific long-wavelength band with higher penetration capability for supplementary measurement.
[0033] Preferably, in step 3, the quantification of potential water toxicity indicators adopts the relative toxicity equivalent method. By comparing the degree of inhibition or alteration of the water sample spectrum on the reference biological activity characteristic spectrum, the toxicity level is converted into a preset normalized value. The dosing control system automatically adjusts the dosage of oxidant or special adsorbent based on this value to eliminate the impact of water toxicity on subsequent biological treatment units.
[0034] Preferably, the intelligent dosing control system is equipped with redundant communication interfaces. The main controller and actuators exchange data in real time via an industrial fieldbus, while retaining analog backup signals. When bus communication is interrupted, the system can automatically switch to analog control mode and maintain system operation at a preset safe dosing value, ensuring the continuity and safety of the production process.
[0035] Compared with the prior art, the present invention has the following beneficial effects: 1. It achieves high-precision real-time monitoring of multiple parameters. By integrating full-spectrum scanning and convolutional neural networks, it breaks through the limitations of traditional sensors with single response and single index. It can decouple chemical oxygen demand, ammonia nitrogen, total phosphorus and unknown toxicity from complex spectral signals, thus improving the comprehensiveness of perception.
[0036] 2. It has strong anti-interference capabilities. By utilizing molecular algorithms and preprocessing techniques from cheminformatics, it effectively eliminates the influence of water turbidity, color, and background noise on the measurement results, ensuring the certainty and reliability of monitoring data in harsh water quality environments.
[0037] 3. It has significant advantages in preventive control. By capturing subtle trends in spectral fingerprints, the system can identify potential risks that have not yet reached the concentration threshold, enabling proactive preventive dosing and avoiding passive compensation after an accident occurs.
[0038] 4. It improves the intelligence and economy of the dosing process. By combining feedforward compensation, feedback control and prediction algorithms, it can accurately adjust the dosage of chemicals according to the real-time load, reduce chemical waste, lower the operating cost of sewage treatment plants, and prevent secondary pollution to the environment caused by excessive dosing.
[0039] 5. The system has strong self-adaptation and self-evolution capabilities. Through automatic calibration, automatic cleaning, and cloud-based incremental learning, it can maintain measurement accuracy over a long period of time and continuously optimize control strategies to adapt to complex and ever-changing industrial application scenarios. Attached Figure Description
[0040] Figure 1 This is a schematic diagram of the overall technical solution architecture according to the present invention; Figure 2 This is a schematic diagram illustrating the core principle framework of establishing a correlation mapping between spectral features and molecular structure using cheminformatics algorithms according to the present invention. Figure 3 This is a flowchart illustrating the logical process framework for achieving multi-parameter parallel decoupling and real-time water quality quantification based on a convolutional neural network model according to the present invention. Figure 4 This is a flowchart illustrating the intelligent decision-making logic of the present invention, which integrates feedforward compensation, feedback control, and spectral change rate monitoring. Detailed Implementation
[0041] Example 1: Please refer to the appendix Figure 1 To be continued Figure 4 To make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments.
[0042] In this embodiment, the specific implementation process of the intelligent dosing control method based on online water quality monitoring is described in detail below. This method deeply integrates physical optics, cheminformatics, and deep learning technologies, aiming to construct a closed-loop control system from perception to decision-making and execution.
[0043] Step 1: Use a full-spectrum scanning module to capture the spectral fingerprint of the water body to be treated. By frequently collecting transmission spectral data of the water body within a preset band range, obtain the original spectral feature signal sequence containing information on the composition of the water body.
[0044] In step 1, the hardware configuration and physical operation mechanism of the full-spectrum scanning module are fundamental to data acquisition. The full-spectrum scanning module consists of a high-power broadband light source, a high-resolution grating beam splitter, and a high-sensitivity photodetector array. The high-power broadband light source uses a combination of deuterium and tungsten lamps to achieve continuous spectral coverage from 200 nm to 800 nm wavelengths. The composite beam emitted by the light source first passes through a collimating optical system, where a convex lens group adjusts the diverging beam into a parallel collimator. The collimated beam then passes through a water sample measurement cell of a preset thickness. The path length of this measurement cell is preset to 10 mm to 50 mm based on the typical turbidity range of the water sample. When the beam passes through the measurement cell, dissolved organic molecules, inorganic ions, and suspended colloids in the water sample selectively absorb light energy at specific wavelengths. This absorption behavior follows the physical essence of Beer-Lambert's law, which states that the attenuation of light intensity is exponentially related to the concentration of the absorbing substance and the optical path length.
[0045] The spectrometer receives the transmitted light after it penetrates the water sample and uses a holographic blazed grating to decompose the composite transmitted light into a spatially continuous monochromatic light spectrum. A high-sensitivity photodetector array, such as a complementary metal-oxide-semiconductor detector or a photodiode array, is deployed on the exit focal plane of the spectrometer. The photodetector array converts the received photon signals into corresponding analog electrical signals. The sampling frequency of the full-spectrum scanning module is set to a preset high-frequency value, typically 2 to 10 times per second, to ensure real-time capture of instantaneous changes in water quality caused by fluctuations in the incoming water.
[0046] In the specific operation of acquiring the original spectral feature signal sequence, the system first automatically performs optical path calibration and background subtraction. The specific process is as follows: the system controls the switching of multiple valves to allow a preset standard reference solution, such as ultrapure water, to be filled into the measurement cell. The reference spectral signal intensity is obtained by measuring this standard reference solution. Subsequently, the spectral signal intensity of the actual water sample flowing through the measurement cell is acquired in real time. The system then performs a logarithmic transformation between the actual water sample spectral signal intensity and the reference spectral signal intensity. The formula is expressed as: ; For wavelength, As the reference spectral signal intensity, The actual spectral signal intensity of the water sample. For the corresponding wavelength absorbance at the following levels The base-10 logarithm is a commonly used logarithm. The resulting absorbance spectrum covers the entire spectrum from the ultraviolet to the visible light range, providing a comprehensive information basis for subsequent molecular characterization analysis.
[0047] The full-spectrum scanning module's housing is made of corrosion-resistant 316L stainless steel or polytetrafluoroethylene (PTFE) material, and integrates environmental monitoring sensors. These sensors include digital temperature and humidity sensors, which monitor the module's internal operating environment in real time. When the internal temperature exceeds 40 degrees Celsius or the humidity is greater than 80%, the system automatically activates the thermoelectric cooling component or the drying and purging component to prevent a decrease in measurement accuracy due to thermal drift of optical elements or water vapor condensation. The measurement cell is also equipped with a self-cleaning structure, including a mechanical scraper driven by a stepper motor. After each measurement cycle, the mechanical scraper reciprocates by scraping the measurement window, and, in conjunction with the cavitation effect generated by the ultrasonic generator, removes biofilm adhering to the surface.
[0048] Next, step 2 is performed: molecular algorithms from cheminformatics are introduced to preprocess and enhance the original spectral feature signal sequence, establish the correlation mapping between spectral features and molecular structural characteristics, and identify molecular fingerprint information in water bodies through multidimensional feature extraction.
[0049] In step 2, the preprocessing includes multivariate scattering correction, baseline offset compensation, and smoothing / denoising. The implementation logic of multivariate scattering correction is as follows: First, the average spectrum of all sample spectra in the current batch is calculated. Then, for each sample spectrum, a linear regression model is established between the sample spectrum and the average spectrum, and the linear regression coefficients, including the slope term and the intercept term, are calculated. These regression coefficients are used to correct the sample spectrum, i.e., the intercept term is subtracted from the sample spectrum and the slope term is divided, eliminating the baseline shift and offset caused by scattering from suspended particulate matter in the water.
[0050] The smoothing and denoising process employs a sliding window algorithm based on polynomial fitting, namely Savitzky-Gauley smoothing filtering. The system sets a fixed-length sliding window on the spectral curve, performs low-order polynomial least-squares fitting on the spectral data points within the window, and replaces the original value at the window's center point with the fitted value. This processing method can effectively suppress high-frequency random noise while completely preserving the full width at half maximum (FWHM) and peak positions of spectral characteristic peaks.
[0051] The molecular algorithm further involves derivative transformation and frequency domain decomposition of the spectral signal. By calculating the first and second derivatives of the absorbance spectrum, heavily overlapping characteristic absorption peaks in the spectral curve can be effectively amplified. In the second-order differential spectrum, the center wavelength position of the molecular absorption peak is precisely located by identifying zero-crossing points and local extrema. This positional information corresponds to the vibrational energy levels of specific chemical bonds. For example, absorption peaks near 254 nm are often associated with conjugated double bonds in aromatic compounds.
[0052] Frequency domain decomposition utilizes discrete wavelet transform technology. The system decomposes the one-dimensional spectral signal into a series of subspace components with different frequency scales, including approximate components and detail components. The detail components contain subtle energy transition information related to the rotation and vibration of specific molecules. By extracting the characteristic energy values of these specific frequency bands, a highly recognizable molecular fingerprint vector is formed. In addition, the molecular algorithm also includes cluster analysis of complex organic categories in water bodies. The system compares the real-time extracted molecular fingerprint vector with a pre-stored industry wastewater spectral template library for similarity. The calculation logic uses cosine similarity; when the similarity value exceeds 0.95, the system automatically identifies the pollution source category of the current water sample, such as pharmaceutical wastewater or dyeing wastewater, and retrieves the corresponding feature weight set accordingly.
[0053] Subsequently, step 3 is executed: using the constructed convolutional neural network model, chemical oxygen demand, ammonia nitrogen, total phosphorus, and potential water toxicity indicators are simultaneously decoupled from the complex spectral signals, thereby achieving parallel inversion and real-time quantification of multiple water quality parameters.
[0054] In step 3, the convolutional neural network model employs a multi-task parallel learning architecture. This model structure includes an input layer, three alternating convolutional and pooling layers, a shared fully connected layer, and four independent output branches. The input layer receives the molecular fingerprint vector processed in step 2. The first convolutional layer uses 32 1×5 kernels and extracts local features through a sliding window with a stride of 1, capturing the initial geometric features of the spectral curve. The output after convolution is processed by a non-linear activation function.
[0055] The pooling layer employs max pooling, using the maximum value within a local window as the output to downsample the data dimension. This operation enhances the model's robustness to small wavelength shifts in the spectral signal. During multi-parameter decoupling, the model uses a collaborative regression strategy. Since chemical oxygen demand (COD), ammonia nitrogen (MN), and total phosphorus (TP) have overlapping absorption bands in their spectral ranges, the model obtains global spectral common features by sharing the preceding convolutional feature extraction layer. After sharing the fully connected layer, independent regression branches are set up for different water quality indicators.
[0056] For the chemical oxygen demand (COD) inversion branch, the model assigns higher nonlinear weights to ultraviolet (UV) band features; for the ammonia nitrogen (AM) inversion branch, the model focuses on capturing molecular vibrational frequency harmonics in the near-infrared region; and for the total phosphorus (TP) inversion branch, the model focuses on extracting phosphorus characteristic absorption signals in the UV-Vis transition band. The convolutional neural network model is trained using a large-scale dataset of standard water samples with known concentrations. During training, a total loss function is defined, which is equal to the weighted sum of the prediction errors for COD, AM, T, and unknown toxicity. By minimizing the total loss function, the backpropagation algorithm dynamically adjusts tens of thousands of weight parameters in the network. A dropout layer is introduced into the model, randomly disabling 20% of neurons during training to prevent the model from overfitting to specific samples.
[0057] For identifying water toxicity indicators, the convolutional neural network model is equipped with an anomaly detection module. This module analyzes the residual distribution of real-time spectral fingerprints deviating from a preset standard spectral library. Specifically, the system calculates the Euclidean distance between the real-time spectral vector and the model-reconstructed spectral vector. When this distance exceeds a preset safety threshold and exhibits abnormal absorption characteristics in a specific biotoxicity-sensitive band, the system automatically determines the presence of a potentially toxic substance. The quantification process uses the relative toxicity equivalent method to convert the degree of spectral anomaly into a normalized toxicity value between 0 and 1.
[0058] Following the output layer, the system is connected to data verification logic. This logic verifies the validity of the inversion results based on physicochemical constraints. For example, the system has a preset logic: the measured inversion value of total phosphorus concentration must be greater than or equal to the inversion value of orthophosphate concentration. If the output results violate such constraints, the system automatically marks the data set as invalid and initiates a linear interpolation algorithm to fill in the gaps using valid feature data from the previous sampling period, ensuring the continuity of control commands.
[0059] Finally, step 4 is executed: based on the dynamic change trends of the multi-parameter water quality indicators and spectral fingerprint obtained by inversion, the target dosage is calculated through intelligent decision-making algorithm, and the actuator is driven to complete the precise dosing of the agent.
[0060] In step 4, the intelligent decision-making algorithm combines feedback control and feedforward compensation control. The logic of the feedforward compensation part is as follows: based on the chemical oxygen demand (COD), ammonia nitrogen (AM), and total phosphorus (TP) influent loads obtained in step 3, and combined with a preset chemical reaction stoichiometric coefficient, the basic dosage is calculated. For example, the basic dosage of phosphorus removal agent is equal to the total phosphorus influent mass flow rate multiplied by a preset phosphorus removal coefficient.
[0061] The feedback control section acquires real-time water quality monitoring data at the outlet of the reaction tank.
[0062] The basic dosage is The correction amount is The dosage will be adjusted accordingly. for: ; Among them, PID correction amount From the proportional term Integral terms Differential term The sum is composed of: ; For deviation From the initial moment to the current moment Time integral, For deviation Rate of change over time.
[0063] The process of calculating the target dosage also includes real-time monitoring of the rate of change in the spectral fingerprint. The system continuously calculates the slope of change in the total spectral absorbance value within a preset sliding time window (e.g., 5 minutes). When the absolute value of this slope exceeds a preset sudden pollution warning threshold, the system determines that the water quality is suffering a severe external shock. At this time, the system automatically switches from the normal mode to the emergency dosing mode. In the emergency dosing mode, the dosage is increased based on the calculated value according to a preset enhancement ratio (e.g., 1.5 times), achieving preventative intervention.
[0064] The intelligent decision-making algorithm also integrates load forecasting capabilities, utilizing a Long Short-Term Memory (LSTM) network to perform sequence modeling on historical flow and concentration data. Based on the trends observed over the past 24 hours, the system predicts the peak pollutant load for the next 30 minutes. Feedforward compensation control, incorporating this prediction, adjusts the frequency converter of the dosing pump in advance, reducing physical response delay.
[0065] The actuator includes a high-precision metering pump and its matching variable frequency drive. The system acquires the metering pump's speed signal and pipeline pressure sensor signal in real time. By establishing a closed-loop control circuit, it ensures a high degree of consistency between the actual dosing flow rate and the commanded dosing amount. When the metering pump outlet pressure exceeds the safety set value, or the deviation between the actual speed and the commanded speed exceeds 10%, the system automatically switches to the standby pump set.
[0066] Furthermore, this method includes dynamic correction of reaction kinetic parameters. The system queries pre-stored reaction rate correction curves based on the currently collected real-time water temperature and pH values. When the water temperature is below 15 degrees Celsius, due to the slowdown in biological or chemical reaction rates, the system automatically extends the preset reaction contact time parameter and appropriately increases the dosage to compensate for efficiency loss.
[0067] The method in this embodiment also features remote data transmission and cloud-based learning capabilities. Massive amounts of spectral fingerprint data collected on-site are transmitted to a cloud database via an industrial IoT gateway using an encrypted protocol. The cloud server periodically fine-tunes the model parameters of the convolutional neural network using an incremental learning mechanism to adapt to changes in upstream emission characteristics. The updated weight parameters are then distributed to the on-site control terminal via a remote network.
[0068] Example 2: In Example 2, the present invention provides specialized parameter configuration and process optimization for dosing control in the context of high-concentration industrial wastewater treatment. In this application scenario, the background matrix of the water quality is extremely complex, and conventional monitoring methods are at high risk of failure.
[0069] Following step 1, the full-spectrum scanning module activates the automatic filter wheel mechanism when processing water with high color and turbidity. Based on the intensity of the light signal fed back from the detector, the automatic filter wheel automatically switches to a specific long-wavelength filter with higher penetration capability, and simultaneously increases the driving power of the broadband light source to 1.2 times its rated power to ensure the beam can effectively penetrate the turbid water sample. An automatic attenuator is also configured in the optical path system to prevent signal saturation of the photodetector during periods of low turbidity.
[0070] In the molecular algorithm of step 2, the system enhances the feature identification of second-order differential spectroscopy for characteristic organic compounds commonly found in industrial wastewater. The algorithm identifies multiple small absorption peaks located in the 300-400 nm wavelength range, which correspond to specific complexing agents or surfactants. The system then separates these weak signals from background noise through wavelet multi-scale decomposition.
[0071] In step 3, the convolutional neural network model for industrial wastewater incorporates a heavy metal toxicity identification module. This module indirectly quantifies the potential impact of heavy metals by establishing a perturbation model of the spectral characteristics of heavy metal ions on specific organic ligands. During multi-parameter decoupling, a self-attention mechanism is introduced. When extracting features, the convolutional neural network automatically calculates the contribution weights of different spectral bands to the final prediction target. For water quality with high organic loads, the system automatically increases the weights of the convolutional kernels in the ultraviolet band to improve the accuracy of chemical oxygen demand (COD) retrieval.
[0072] In step 4, the dosing decision logic addresses the drastic fluctuations in industrial wastewater by introducing a fuzzy logic controller to smooth the PID control results. The fuzzy logic controller uses the dosing deviation and the rate of change of deviation as input variables. The system pre-sets multiple fuzzy rules; for example, when the deviation is large and the rate of change is positive, the increment of the output control quantity is maximized. Through fuzzification, inference, and defuzzification processes, a stable inverter control voltage is generated. This approach avoids frequent pulsations in the actuator under complex water quality environments, reducing mechanical wear.
[0073] In addition, regarding monitoring of the implementing agency, the system has added pharmaceutical inventory management and consumption forecasting. Based on the average inflow load and real-time dosing rate over seven consecutive days, the system calculates the remaining usable days of the current pharmaceutical inventory. When the inventory falls below three days' worth of usage, the system automatically sends a replenishment request to the material procurement system via a communication interface.
[0074] Example 3: Example 3 describes in detail the implementation of the present invention in the large-scale group application of urban wastewater treatment plants, with particular emphasis on the system's self-evolution capability and process health assessment function.
[0075] As per step 1, the full-spectrum scanning module exhibits high device consistency in a distributed deployment environment. The system periodically performs optical calibration on field devices by calling standard absorbance curves stored in the cloud via a remote benchmark calibration protocol. Each monitoring point's equipment runs an automatic cleaning cycle. When the light path transmittance remains below a preset 70% after cleaning, the system determines that the window has permanent wear or heavy scaling and triggers a manual maintenance task.
[0076] In step 2, the molecular algorithm leverages the advantages of cloud-based big data to achieve cluster analysis based on regional characteristics. The system collaboratively compares the spectral characteristics of the current wastewater treatment plant with those of other water plants of the same type and industry in the same city. By identifying the group characteristics of the influent fingerprint, the system can predict whether illegal discharge is occurring.
[0077] In step 3, the parameters of the convolutional neural network model are updated using an incremental learning mechanism. Every so often (e.g., every 24 hours), the on-site control terminal packages and uploads the samples with the largest inversion errors—samples where the predicted value deviates from the laboratory test value by more than 20%—to the cloud. The cloud server uses these special samples to fine-tune the model locally, correcting the bias terms of the feature extraction layer. The fine-tuned model weights are then updated across the entire network via remote push. This approach enables the system to quickly adapt to the periodic changes in the discharge characteristics of upstream drainage companies.
[0078] In step 4, the system further established a long-term correlation model between the influent spectral fingerprint and the effluent quality. This logic is used to evaluate the biochemical health of the wastewater treatment system. The system continuously monitors the mapping relationship between the influent spectral fingerprint of the biological treatment tank and the effluent spectral fingerprint of the secondary sedimentation tank. If, under the same dosing logic and load conditions, the peak intensity representing recalcitrant organic matter in the effluent spectral characteristics shows an abnormal increase, the system determines that the activity of the internal biological treatment unit is impaired and automatically provides process adjustment suggestions, such as increasing the reflux ratio or extending the aeration time.
[0079] The intelligent dosing system is equipped with redundant communication interfaces. The main controller and actuators communicate in real-time bidirectionally via an industrial fieldbus (such as Profinet), transmitting multi-dimensional data frames including dosing commands, pump status, and pipeline pressure. Simultaneously, the system retains a traditional 4-20 mA analog backup loop. When a fieldbus communication interruption is detected, the system seamlessly switches to analog mode and maintains operation at a preset average safe dosing value until the communication link is restored.
[0080] In the automated cleaning process of this embodiment, the system strictly follows the following atomic operation steps: a. Stop the current sampling pump and close the inlet valve; b. Open the cleaning fluid solenoid valve and start the cleaning pump to inject the preset concentration of citric acid or sodium hypochlorite solution into the measuring cell; c. Start the ultrasonic generator, set the working frequency to 40 kHz, and the duration to 3 minutes to use the cavitation effect to remove dirt. d. Start the mechanical scraper and run it back and forth 10 times; e. Open the drain valve to drain the cleaning waste liquid; f. Start the ultrapure water rinsing pump and perform 3 rinsing cycles; g. Re-scan the reference spectrum and calibrate the system zero point.
[0081] In the multi-parameter inversion step 3, the textual calculation logic for chemical oxygen demand (COD) is described as follows: First, the system linearly maps the input molecular fingerprint vector through the first set of convolutional weight matrices and superimposes bias terms. The result is then processed by a nonlinear activation function. Subsequently, in the fully connected layer, the extracted feature values are multiplied by the corresponding COD sensitivity coefficients, and the weighted results of each dimension are summed. Finally, the specific offset of the COD branch is added to obtain the final predicted mass concentration value. The inversion of ammonia nitrogen and total phosphorus follows the same logical framework but uses completely different weight matrices and offset parameters.
[0082] In step 4, the emergency dosing mode is triggered as follows: the system records the integral value of the spectral absorbance at the current moment and calculates the difference between it and the integral value from one minute ago. If the rate of change obtained by dividing this difference by the time interval is greater than a preset rate of change threshold, and the duration of this state exceeds 30 seconds, then a pollution shock is confirmed. The emergency dosing amount is equal to the basic calculated dosing amount multiplied by an enhancement coefficient greater than 1.
[0083] All numerical comparisons, logical judgments, and arithmetic operations involved in this invention have been translated into the detailed textual description above. For example, in inventory management, the remaining volume of the current medicine tank is divided by the average dosing flow rate over the past hour; the quotient is the remaining available time. When this time value is less than the alarm time setting, an early warning is triggered.
[0084] Through the detailed description of the three embodiments above, it is evident that this invention, through the deep integration of full-spectrum scanning with cheminformatics and deep learning, achieves precise decoupling of multi-dimensional water quality parameters and intelligent predictive control of the dosing process. The system possesses extremely strong anti-interference capabilities, can automatically eliminate the physical effects of turbidity and color, and can proactively adjust the system in advance when abnormal water quality trends are detected.
[0085] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A smart dosing control method based on online water quality monitoring, characterized in that, Includes the following steps: The full-spectrum scanning module is used to capture the spectral fingerprint of the water body to be treated. By acquiring the transmission spectrum data of the water body in the preset band range at high frequency, the original spectral feature signal sequence containing the material composition information of the water body is obtained. Molecular algorithms from cheminformatics are introduced to preprocess and enhance the original spectral feature signal sequence, establish a correlation mapping between spectral features and molecular structural properties, and identify molecular fingerprint information in water bodies through multidimensional feature extraction. The constructed convolutional neural network model simultaneously decouples chemical oxygen demand, ammonia nitrogen, total phosphorus, and three categories of potential water toxicity indicators—comprehensive biological toxicity, heavy metal toxicity, and recalcitrant toxic organic matter toxicity—from complex spectral signals. The convolutional neural network model identifies potential toxic substances by analyzing the residual distribution between real-time spectral fingerprints and a preset standard spectral library, and quantifies the three categories of potential water toxicity indicators using the relative toxicity equivalent method, thereby achieving parallel inversion and real-time quantification of multiple water quality parameters. Based on the dynamic trends of multi-parameter water quality indicators and spectral fingerprints obtained from the inversion, the target dosage is calculated through an intelligent decision-making algorithm, and the actuator is driven to complete the dosing of the agent.
2. The intelligent dosing control method based on online water quality monitoring according to claim 1, characterized in that, In the step of capturing the spectral fingerprint of the water body to be treated using the full-spectrum scanning module, before acquiring the original spectral feature signal sequence, optical path calibration and background subtraction operations are performed: by controlling the switching of multiple valves, the preset standard reference liquid is filled into the measurement cell, and the reference spectral signal intensity is obtained by measuring the standard reference liquid; Real-time acquisition of the spectral signal intensity of actual water samples flowing through the measuring pool; The actual water sample spectral signal intensity and the reference spectral signal intensity are logarithmically transformed. Specifically, the common logarithmic value of the quotient obtained by dividing the reference spectral signal intensity by the actual water sample spectral signal intensity is calculated to obtain the corresponding absorbance value, thereby generating an absorbance spectrum covering the ultraviolet and visible light bands.
3. The intelligent dosing control method based on online water quality monitoring according to claim 1, characterized in that, The step of preprocessing the original spectral feature signal sequence includes multivariate scattering correction processing: firstly, the average spectrum of all sample spectra in the current batch is calculated; For each sample spectrum, a linear regression model is established between the sample spectrum and the average spectrum, and the linear regression coefficients containing the slope term and the intercept term are calculated. The sample spectrum is corrected using the linear regression coefficients by subtracting the intercept term from the sample spectrum and dividing by the slope term, thereby eliminating baseline shifts and offsets caused by scattering from suspended particulate matter in the water.
4. The intelligent dosing control method based on online water quality monitoring according to claim 1, characterized in that, The preprocessing steps for the original spectral feature signal sequence also include smoothing and denoising: setting a sliding window of fixed length on the spectral curve, performing low-order polynomial least squares fitting on the spectral data points within the sliding window, and replacing the original value of the center point of the sliding window with the fitted value, thereby suppressing high-frequency random noise while preserving the morphological characteristics of the spectral feature peaks.
5. The intelligent dosing control method based on online water quality monitoring according to claim 1, characterized in that, The feature enhancement process includes derivative transformation and frequency domain decomposition of the spectral signal: by calculating the first and second derivatives of the absorbance spectrum, the overlapping characteristic absorption peaks in the spectral curve are amplified; Identify zero-crossing points and local extrema in second-order differential spectroscopy to pinpoint the center wavelength position of molecular absorption peaks; The discrete wavelet transform technique is used to decompose a one-dimensional spectral signal into multiple frequency scale subspace components, including approximate components and detail components, and the characteristic energy values of the frequency bands are extracted to form a molecular fingerprint vector. By calculating the cosine similarity between the extracted molecular fingerprint vector and the pre-stored industry wastewater spectral template library, when the cosine similarity exceeds a preset threshold, the pollution source category of the current water sample is identified and the corresponding feature weight set is called.
6. The intelligent dosing control method based on online water quality monitoring according to claim 1, characterized in that, The convolutional neural network model includes an input layer, multiple alternating convolutional and pooling layers, a shared fully connected layer, and multiple independent output branches; The input layer receives the molecular fingerprint information; The convolutional layer extracts local features from the input vector using a preset number of convolutional kernels, capturing the peak position, peak width, and peak intensity features in the spectral curve. The pooling layer reduces the feature dimension by performing a maximum value downsampling operation; After the shared fully connected layer, independent regression branches are set for different water quality indicators. The inversion branch for chemical oxygen demand is configured to assign the first weight to the ultraviolet band features, and the inversion branch for ammonia nitrogen is configured to assign the second weight to the molecular vibrational frequency harmonic features in the near-infrared region.
7. The intelligent dosing control method based on online water quality monitoring according to claim 1, characterized in that, The training and validation process of the convolutional neural network model includes: training using a large-scale standard water sample dataset with known concentrations; defining the total loss function as the weighted sum of prediction errors for chemical oxygen demand, ammonia nitrogen, total phosphorus, and unknown toxicity; and adjusting the network weights by minimizing the total loss function and using the backpropagation algorithm. After the output layer, data verification logic is connected to establish logical constraints between water quality parameters. When the multi-parameter water quality indicators obtained by inversion violate the logical constraints, the current data is marked as invalid, and the valid feature data of the previous sampling period is used for inference and filling.
8. The intelligent dosing control method based on online water quality monitoring according to claim 1, characterized in that, The intelligent decision-making algorithm combines feedback control and feedforward compensation control: the feedforward compensation control calculates the basic dosage based on the inverted chemical oxygen demand influent load, ammonia nitrogen influent load, and total phosphorus influent load, combined with the preset chemical reaction stoichiometric coefficient. The feedback control acquires water quality monitoring data at the outlet of the reaction tank in real time, calculates the deviation between the measured value of the outlet water quality and the set target value, and uses a proportional-integral-derivative adjustment algorithm to correct the basic dosage. The correction amount is equal to the sum of the product of the proportional gain and the deviation, the product of the integral gain and the cumulative time integral of the deviation, and the product of the derivative gain and the rate of change of the deviation.
9. The intelligent dosing control method based on online water quality monitoring according to claim 8, characterized in that, The process of calculating the target dosage also includes real-time monitoring of the rate of change of the spectral fingerprint and load prediction: continuously calculate the slope of the change of the integral value of spectral absorbance within a preset time window. When the absolute value of the slope exceeds the preset sudden pollution warning threshold and the duration exceeds the preset duration, the system switches from the normal mode to the emergency dosing mode and increases the dosage according to the preset enhancement ratio based on the basic dosage. By using a long short-term memory network to perform sequence modeling on historical flow and concentration data, the peak pollutant load within a preset time period can be predicted, and the output frequency of the actuator can be adjusted in advance accordingly.
10. The intelligent dosing control method based on online water quality monitoring according to claim 1, characterized in that, The method also includes maintenance and status monitoring of the full-spectrum scanning module: after the preset operating cycle is reached, an automatic cleaning cycle is executed, the steps of which include stopping sampling and closing the water inlet valve, injecting a cleaning agent of preset concentration into the measuring cell, starting the ultrasonic generator to generate cavitation effect, driving the mechanical scraper to scrape the measuring window back and forth, removing cleaning waste liquid, rinsing multiple times with ultrapure water and recalibrating the reference spectrum. The speed signal and pressure sensor signal of the actuator are collected in real time. When an abnormal pipeline pressure or a speed deviation exceeding the preset range is detected, the system automatically switches to the standby pump group. The collected spectral data and inversion results are transmitted to the cloud via an IoT gateway. The parameters of the convolutional neural network model are periodically optimized using an incremental learning mechanism, and the updated model weights are sent back to the site.
Citation Information
Patent Citations
Water quality multi-index detection method on basis of ultraviolet-visible absorption spectrum
CN104034684A
Construction method for incident parameter inversion model of grating coupler
CN111695295A
Waterfowl breeding water quality prediction method
CN117171624A
Loaded coal rock stress field inversion method and device based on probing-monitoring information
CN118153416A
Analysis method of water quality fingerprint database based on feature recognition
CN120108576A
Cited By
A brine tank water addition automatic control system and method
CN122219708A