Analyzer deviation-resistant effluent orthophosphorus concentration monitoring method and monitoring equipment

By constructing a state space vector and dynamic Markov random field model and a Kalman filter algorithm, the problem of distortion in monitoring by the online analyzer at low concentrations was solved, and accurate calibration and stable monitoring of the effluent phosphorus concentration were achieved to adapt to changes in complex working conditions.

CN120741366AActive Publication Date: 2025-10-03SHANGHAI ENVIRONMENT PROTECTION GROUP +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511262822.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-10-03
Estimated Expiration
2045-09-05

AI Technical Summary

Technical Problem

When existing online analyzers monitor the orthophosphate concentration in effluent water at low concentrations, they are affected by noise and background noise, resulting in measurement distortion and inability to accurately monitor the orthophosphate concentration in effluent water.

Method used

By constructing a state space vector, combining a dynamic Markov random field model and a Kalman filter algorithm, the prior probability distribution of effluent orthophosphorus concentration is predicted, and when the precision is low, the observed values ​​are fused and the concentration values ​​are calibrated to improve monitoring accuracy.

Benefits of technology

Without adding hardware, the impact of analyzer measurement deviation at low concentrations is reduced, the accuracy and stability of effluent phosphorus concentration monitoring are improved, analyzer drift is detected and calibrated in a timely manner, process changes are adapted, and long-term effectiveness is maintained.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120741366A_ABST
    Figure CN120741366A_ABST
Patent Text Reader

Abstract

The invention discloses an analyzer deviation-resistant effluent orthophosphorus concentration monitoring method and monitoring equipment, and relates to the technical field of sewage treatment. In the method, monitoring equipment firstly constructs a state space vector by using operating parameters in a sewage phosphorus removal process, and then constructs a dynamic Markov random field model by using an effluent positive phosphorus concentration true value as a hidden state variable and the state space vector as an observation variable. After prior probability distribution is predicted based on the model and a historical sequence, when a measured value of an analyzer is lower than a precision threshold value, prior and observed values are fused through a Kalman filtering algorithm, and a calibration concentration value is obtained and output to a control system to guide medicament adjustment. Therefore, when the orthophosphate concentration in the effluent water sample is extremely low, the accuracy and reliability of the detection of the orthophosphate concentration in the effluent water sample are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of sewage treatment, and in particular to a method and a monitoring device for effluent orthophosphorus concentration that are resistant to analyzer deviation. Background Art

[0002] Modern sewage treatment plants are rapidly transitioning to a smart water plant model. This model leverages automation and information technology to achieve precise sensing and intelligent control of the entire sewage treatment process. Accurate monitoring of effluent phosphorus concentration is crucial for accurately dosing phosphorus removal agents, ensuring consistent effluent quality and optimizing operating costs.

[0003] In related technologies, an online orthophosphate analyzer is commonly installed at the end of the wastewater treatment process to monitor the orthophosphate concentration in the effluent. This type of online analyzer is typically based on chemical colorimetry. A built-in micropump automatically extracts the effluent sample and injects a colorimetric reagent (such as ammonium molybdate) and a reducing agent (such as ascorbic acid) into it. The injected reagent reacts chemically with the orthophosphate in the effluent sample to form a colored complex (such as molybdenum blue). The online analyzer uses a light source and a photodetector to measure the absorbance of the effluent sample at a specific wavelength of light after the reagent injection. The absorbance is then converted into a concentration value based on a preset calibration curve. This concentration value is ultimately output to a central control system as a standard electrical signal, which serves as a feedback signal and is used directly by the central control system to guide and regulate the dosage of upstream phosphorus removal agents.

[0004] However, when the orthophosphate concentration in the effluent water sample is extremely low, the amount of colored complex formed by the reaction with the injected reagent in the effluent water sample is also extremely small. At this point, background noise, which is caused by factors such as inherent electronic noise in the instrument's optoelectronic components, light scattering caused by residual turbidity or bubbles in the water sample, and the blank value of the reagent itself, can be as strong as or even exceed the true signal intensity, distorting the effluent orthophosphate concentration measured by the online analyzer. Summary of the Invention

[0005] The present application provides an effluent orthophosphate concentration monitoring method and monitoring equipment that are resistant to analyzer bias, which are used to improve the accuracy of effluent orthophosphate concentration detection when the orthophosphate concentration in the effluent water sample is extremely low.

[0006] In the first aspect, a method for monitoring effluent orthophosphorus concentration that is resistant to analyzer deviation is provided, which is applied to a monitoring device. The method comprises: the monitoring device constructs a state space vector using operating parameters in a wastewater phosphorus removal process, wherein the operating parameters include at least influent orthophosphorus concentration, phosphorus removal agent dosage, influent flow rate, dissolved oxygen concentration in a reaction tank, and pH; the monitoring device constructs a dynamic Markov random field model using the true value of the effluent orthophosphorus concentration as a hidden state variable and the state space vector as an observed variable; the monitoring device predicts a priori probability distribution of the true value of the effluent orthophosphorus concentration based on the dynamic Markov random field model and a historical state space vector sequence; When the effluent orthophosphorus concentration value measured by the analyzer is less than the preset analyzer accuracy threshold, the monitoring equipment calculates the optimal posterior estimate of the effluent orthophosphorus concentration at the current moment through the Kalman filter algorithm as the calibration concentration value of the effluent orthophosphorus concentration. The Kalman filter algorithm uses the mean and variance of the prior probability distribution as the prior estimation parameters of the Kalman filter algorithm, and the effluent orthophosphorus concentration value measured by the analyzer as the observation input of the Kalman filter algorithm. The optimal posterior estimate is the weighted fusion result of the mean of the prior probability distribution and the analyzer measurement value; the monitoring equipment outputs the calibration concentration value to the water plant sewage treatment control system to guide the adjustment of the dosage of the phosphorus removal agent.

[0007] By adopting the above technical solution, the monitoring equipment constructs a state space vector based on key operating parameters such as the influent orthophosphate concentration and the dosage of the reagent, providing multi-dimensional input for the model. A dynamic Markov random field model is then constructed with the true value of the effluent orthophosphate as the hidden state variable to capture the dynamic correlation between variables. Combined with the historical sequence prediction prior distribution, the Kalman filter is used to fuse the prior and observed values ​​when the analyzer has low precision to obtain the calibrated concentration value. These technical features work together to improve the accuracy of effluent orthophosphate concentration detection when the orthophosphate concentration in the effluent water sample is extremely low, provide a reliable basis for reagent adjustment, and improve the accuracy and stability of effluent orthophosphate concentration monitoring.

[0008] In combination with some embodiments of the first aspect, in some embodiments, the monitoring equipment constructs a state space vector based on the operating parameters during the wastewater phosphorus removal process, specifically including: the monitoring equipment obtains the operating parameters during the wastewater phosphorus removal process, the operating parameters including at least the influent orthophosphate concentration, the dosage of the phosphorus removal agent, the influent flow rate, the dissolved oxygen concentration in the reaction tank, and the pH; the monitoring equipment marks the operating parameters that exceed the preset normal range as abnormal data, and the preset normal range is determined by adding or subtracting three times the standard deviation of the mean of the historical data of the corresponding operating parameters at the preset time of the water plant sewage treatment control system; the monitoring equipment replaces the abnormal data using a weighted sliding average method based on five adjacent valid data points, wherein the weights of adjacent data points decay exponentially with the distance from the abnormal data; the monitoring equipment maps the operating parameters after abnormal data processing to the interval [0, 1] to obtain standardized operating parameters; the monitoring equipment weightedly combines the standardized operating parameters according to the preset parameter weight matrix to construct a state space vector, and the weights of the influent orthophosphate concentration and the phosphorus removal agent dosage in the preset parameter weight matrix are higher than the weights of other operating parameters.

[0009] By implementing this technical solution, the monitoring equipment first flags abnormal operating parameters that exceed the 3σ range. It then replaces outliers with a weighted moving average (weights decay exponentially with distance) to reduce data noise. A state-space vector is constructed through normalization and weighted combination (with higher weights given to influent phosphorus and reagent dosage). These steps ensure that abnormal data is properly corrected, parameter dimensions are standardized, and the influence of core parameters is highlighted. This allows the state-space vector to more accurately represent the state of the phosphorus removal process, improving the reliability and effectiveness of the model input data.

[0010] In combination with some embodiments of the first aspect, in some embodiments, the monitoring device uses the true value of the effluent orthophosphorus concentration as the hidden state variable and the state space vector as the observation variable to construct a dynamic Markov random field model, specifically including: the monitoring device uses the true value of the effluent orthophosphorus concentration as the hidden state variable; the monitoring device describes the dependency relationship between the hidden state variables at adjacent moments through the transfer potential function; the monitoring device establishes an observation potential function between the hidden state variable and the state space vector; when the fluctuation of the influent orthophosphorus concentration in the state space vector of the observation potential function is greater than a preset fluctuation threshold, the observation potential function reduces the dependency weight of the influent orthophosphorus concentration parameter; based on the historical state space vector sequence of preset time and the corresponding historical measured values ​​of the effluent orthophosphorus concentration, the monitoring device uses the maximum pseudo-likelihood estimation method to estimate the initial parameters of the dynamic Markov random field model; the monitoring device divides the historical data into a training set and a validation set in chronological order through the cross-validation method; the monitoring device adjusts the model parameters with the goal of minimizing the prediction error on the validation set to construct a dynamic Markov random field model.

[0011] By employing this technical solution, the monitoring equipment uses the actual value of outlet phosphorus as a hidden state variable, describing its temporal dependence using a transfer potential function. The observation potential function links the hidden state to the state space vector, and reduces its weight when influent phosphorus fluctuates significantly. Parameters are estimated using maximum pseudo-likelihood based on historical data and optimized through cross-validation. These design features enable the model to dynamically adapt to influent fluctuations, resulting in more accurate parameter estimation, enhanced adaptability to complex operating conditions, and improved accuracy of hidden state predictions.

[0012] In combination with some embodiments of the first aspect, in some embodiments, the monitoring device predicts the prior probability distribution of the true value of the orthophosphorus concentration in the effluent water based on the dynamic Markov random field model and the historical state space vector sequence, specifically including: the monitoring device extracts the state space vector sequence of the most recent preset time window from the historical state space vector sequence; the monitoring device calculates the probability of the hidden state variable under each possible value based on the extracted state space vector sequence and the dynamic Markov random field model; the monitoring device determines the prior probability distribution of the true value of the orthophosphorus concentration in the effluent water based on the calculated probability; the monitoring device uses a Gaussian kernel function to perform a convolution operation on the probability distribution curve formed by the prior probability distribution to eliminate jagged fluctuations in the probability distribution.

[0013] By employing this technical solution, the monitoring device extracts the historical state space vector sequence for the most recent time window, calculates the probability of each value of the hidden state variable based on a dynamic Markov random field model, determines the prior distribution, and then smoothes it using a Gaussian kernel function. Time window extraction ensures data timeliness, probability calculation combines model characteristics to ensure distribution rationality, and smoothing eliminates jagged fluctuations. These steps work together to ensure that the prior probability distribution more closely matches the actual state distribution, improving the accuracy of the subsequent optimal posterior estimate.

[0014] In combination with some embodiments of the first aspect, in some embodiments, when the effluent orthophosphorus concentration value measured by the analyzer is less than the preset analyzer accuracy threshold, the monitoring device calculates the optimal posterior estimate of the effluent orthophosphorus concentration at the current moment through the Kalman filter algorithm as the calibration concentration value of the effluent orthophosphorus concentration, specifically including: the monitoring device uses the mean and variance of the prior probability distribution predicted by the dynamic Markov random field model as the prior estimate mean and prior estimate covariance of the Kalman filter algorithm; the monitoring device uses the analyzer measurement value after removing high-frequency noise as the observation input value; when the fluctuation degree of the observation input value is greater than the preset fluctuation degree threshold, the monitoring device increases the value of the observation noise variance parameter, and the observation noise variance parameter is used to characterize the credibility of the observation input value; the monitoring device uses ... Based on the prior estimate covariance and the observation noise variance parameters, the Kalman gain at the current moment is calculated, and the Kalman gain is the weight of the observation input value; the monitoring equipment performs weighted fusion of the prior estimate mean and the observation input value according to the Kalman gain, calculates the initial optimal posterior estimate of the effluent orthophosphorus concentration at the current moment, and updates the posterior estimate covariance corresponding to the initial optimal posterior estimate; when the posterior estimate covariance is greater than the preset covariance threshold, the monitoring equipment uses the initial optimal posterior estimate and the posterior estimate covariance as new prior inputs, and combines the observation input value at the same moment to start the secondary filtering iteration of the optimal posterior estimate; when the posterior estimate covariance is less than or equal to the preset covariance threshold, the monitoring equipment uses the optimal posterior estimate as the calibration concentration value of the effluent orthophosphorus concentration.

[0015] By employing this technical solution, the monitoring device uses the mean and variance of the prior distribution as Kalman filter prior parameters. After denoising the observations, the observation noise variance is increased when fluctuations are large. The Kalman gain is calculated and weighted fused to obtain the initial posterior estimate. A second iteration is performed when the posterior covariance exceeds a threshold. These steps dynamically adjust the observation weights, reducing uncertainty through iterative optimization. This makes the optimal posterior estimate at low concentrations more robust, mitigates the impact of analyzer measurement bias, and improves the reliability of the calibrated concentration value.

[0016] In combination with some embodiments of the first aspect, in some embodiments, when the covariance is less than or equal to a preset covariance threshold, after the step of the monitoring device using the optimal posterior estimate as the calibration concentration value of the effluent orthophosphorus concentration, the method further includes: the monitoring device calculates the deviation value between the calibration concentration value and the effluent orthophosphorus concentration value measured by the analyzer; the monitoring device counts the deviation mean and deviation standard deviation of the deviation value within a preset time; the monitoring device determines the deviation warning threshold based on the deviation mean and deviation standard deviation; when the deviation value exceeds the deviation warning threshold, the monitoring device marks the deviation value as suspicious data; when the suspicious data appears for a preset number of consecutive times, the monitoring device calculates the deviation change rate of the suspicious data for a preset number of consecutive times; when the deviation change rate is greater than the preset change rate threshold, the monitoring device determines that the analyzer has drift; when the analyzer has drift, the monitoring device sends an analyzer calibration prompt signal to the water plant sewage treatment control system.

[0017] By employing this technical solution, the monitoring device calculates the deviation between the calibration value and the analyzer's measurement, calculates its mean and standard deviation to determine the warning threshold, and flags suspicious data that exceeds the threshold. When these deviations occur continuously, the rate of change is calculated. If they exceed the threshold, the analyzer is deemed to be drifting and a calibration prompt is issued. These steps form a complete logic of deviation monitoring, suspicious data identification, and drift determination. This enables the detection of analyzer performance degradation, provides a basis for equipment maintenance, avoids long-term reliance on deviation data that may lead to monitoring failure, and ensures the long-term stability of the monitoring system.

[0018] In combination with some embodiments of the first aspect, in some embodiments, after the monitoring device outputs the calibration concentration value to the water plant sewage treatment control system for guiding the adjustment of the phosphorus removal agent dosage, the method also includes: the monitoring device receives in real time the actual phosphorus removal agent dosage fed back by the water plant sewage treatment control system and the effluent orthophosphorus concentration measured by the analyzer after adjustment; the monitoring device uses the difference between the actual dosage and the set dosage and the difference between the effluent orthophosphorus concentration measured by the analyzer after adjustment and the calibration concentration value as evaluation indicators of the dynamic Markov random field model; the monitoring device evaluates the performance evaluation value of the dynamic Markov random field model according to the evaluation indicator; when the performance evaluation value is less than the preset evaluation threshold, the monitoring device updates the parameters of the dynamic Markov random field model based on the newly added monitoring data using an incremental learning algorithm; the monitoring device performs a performance test on the updated dynamic Markov random field model; when the prediction error of the dynamic Markov random field model after the updated parameters on the same test data set is less than the prediction error of the original dynamic Markov random field model on the same test data set, the monitoring device replaces the original model parameters with the updated model parameters.

[0019] By adopting this technical solution, the monitoring equipment receives feedback from the control system regarding the actual dosage and adjusted concentration. The difference between the dosage and concentration is used as an evaluation metric. When performance falls short of expectations, incremental learning is used to update the model parameters. Once testing confirms improved performance, the original parameters are replaced. Feedback data provides a practical basis for evaluation, incremental learning enables dynamic parameter optimization, and testing and verification enhance the effectiveness of the updates. These steps form a closed loop of model performance evaluation, update, and verification, enabling the model to adapt to process changes, maintain high accuracy over time, and enhance the continued applicability of the monitoring method.

[0020] In a second aspect, an embodiment of the present application provides a monitoring device, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the monitoring device to execute the method described in the first aspect and any possible implementation of the first aspect.

[0021] In a third aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a monitoring device, enables the monitoring device to execute the method described in the first aspect and any possible implementation of the first aspect.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions. When the instructions are executed on a monitoring device, the monitoring device executes the method described in the first aspect and any possible implementation of the first aspect.

[0023] It is understandable that the monitoring device provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of the present application. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods and will not be repeated here.

[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. Since the monitoring equipment constructs the state space vector based on key operating parameters, combines the dynamic Markov random field model to predict the prior distribution, and fuses the prior and observation values ​​through Kalman filtering when the analyzer has low precision, it reduces the impact of the analyzer measurement deviation at low concentrations without adding additional high-precision detection hardware, making the calibrated concentration value closer to the true value, thereby improving the accuracy of effluent phosphorus concentration monitoring in the wastewater phosphorus removal process.

[0025] 2. Since the monitoring equipment identifies suspicious data through deviation value analysis, calculates the deviation change rate of continuous suspicious data to determine analyzer drift and sends calibration prompts, it can timely detect analyzer performance degradation without the need for continuous manual monitoring, avoiding monitoring failure caused by long-term reliance on deviation data, thereby improving the long-term stability of the monitoring equipment in monitoring the phosphorus concentration in the effluent.

[0026] 3. Since the monitoring equipment evaluates model performance based on feedback data, it updates the dynamic Markov random field model parameters through incremental learning and verifies the replacement when the performance does not meet the standards. This allows the model to be adaptively adjusted when the sewage treatment process conditions change, thereby improving adaptability to complex working conditions and further enhancing the continued effectiveness of the effluent phosphorus concentration prediction model. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a flow chart of a method for monitoring the orthophosphorus concentration in effluent that is resistant to analyzer deviation in an embodiment of the present application.

[0028] Figure 2 This is another flow chart of a method for monitoring effluent orthophosphorus concentration that is resistant to analyzer deviation in an embodiment of the present application.

[0029] Figure 3 It is a schematic diagram of the physical device structure of the monitoring equipment in the embodiment of the present application. DETAILED DESCRIPTION

[0030] The terms used in the following examples of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to and encompasses any or all possible combinations of one or more of the listed items.

[0031] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0032] Since the embodiments of the present application involve the application of sewage treatment technology, in order to facilitate understanding, the relevant terms and concepts involved in the embodiments of the present application are first introduced below.

[0033] Dynamic Markov Random Field Model The Dynamic Markov Random Field (DMRF) is a probabilistic graphical model used for modeling and state estimation of multivariable systems with time-series characteristics. This model combines the time-evolutionary properties of Markov chains with the inter-variable dependency modeling capabilities of Markov random fields. Its core principle is its ability to simultaneously describe, within a unified probabilistic framework, the dynamic transitions of a system's internal state over time and the complex dependencies between that internal state and a set of related observable variables at any given moment.

[0034] The structure of the dynamic Markov random field model mainly consists of two parts: The transition model describes the evolution of the system's hidden state over time. It is based on the Markov assumption that the system's hidden state at the next moment is determined solely by the current hidden state and is independent of earlier historical states. This relationship is typically quantified using a transition potential function, which defines the probability of a state transition from time t to time t+1.

[0035] Observation Model: This component describes the relationship between the system's hidden state and a set of observable variables at a given moment. It is defined using an observation potential function, which describes the conditional probability of observing a specific set of observation variables given a specific hidden state. This allows the model to infer internal, unobservable hidden states based on multiple externally measurable indicators.

[0036] By combining the transfer model and the observation model, DMRF can use a series of chronological observation data to perform probabilistic inference on the hidden state sequence and predict its most likely value.

[0037] Kalman filter algorithm The Kalman filter is a recursive algorithm for achieving optimal state estimation under the assumption of linear dynamic systems and Gaussian noise. Through a two-step cycle consisting of prediction and update, the algorithm effectively integrates the system's dynamic model prediction information with external measurement information to minimize the mean square error between the estimated state and the true state.

[0038] The operating mechanism of the Kalman filter algorithm can be decomposed into two core steps: Step 1: Prediction. In this step, the algorithm uses the posterior optimal state estimate at the previous time (t-1) and the system's dynamic model to predict the state at the current time (t). This prediction is called a priori state estimate. The algorithm also predicts the error covariance of this prior estimate, quantifying the uncertainty inherent in predictions based solely on the model.

[0039] Step 2: Update: In this step, the algorithm incorporates the actual measurement value at the current time (t). First, a key parameter called the Kalman gain is calculated. The Kalman gain is a weighting factor whose magnitude depends on the relative relationship between the prediction error covariance and the measurement noise covariance. The algorithm then uses the Kalman gain to modify the prior state estimate, incorporating the new information contained in the measurement value. This results in a corrected, less uncertain posterior optimal state estimate. This posterior estimate becomes the optimal output at the current time and serves as the input for the next iteration (time t+1).

[0040] The present application provides an effluent orthophosphate concentration monitoring method and monitoring equipment that are resistant to analyzer bias, which are used to improve the accuracy of effluent orthophosphate concentration detection when the orthophosphate concentration in the effluent water sample is extremely low.

[0041] See also Figure 1 , which is a flow chart of a method for monitoring effluent orthophosphorus concentration that is resistant to analyzer deviation in an embodiment of the present application.

[0042] S101. The monitoring equipment constructs a state space vector using the operating parameters during the wastewater phosphorus removal process.

[0043] The wastewater phosphorus removal process refers to the step in the wastewater treatment process where orthophosphate is removed from water through chemical precipitation (such as the addition of iron salts) or biological metabolism. Operating parameters are measurable indicators that reflect the operating conditions of this process, including the amount of phosphorus removal agent added and the influent orthophosphate concentration. A state space vector is a multidimensional array formed by combining multiple standardized operating parameters according to preset rules. It is used to quantitatively represent the overall state of the phosphorus removal process.

[0044] Specifically, this step provides the input basis for the subsequent model by integrating key parameters. The monitoring equipment first collects the influent phosphorus concentration (such as 0.7 mg / L), phosphorus removal agent dosage (such as 4.5 mg / L), influent flow rate (such as 1000 m³ / h) and other parameters in real time through sensors to ensure data timestamp synchronization. Then, the parameters are processed for abnormal values ​​(such as using 3 The data outside the normal range are marked by the criterion) and normalized (mapped to the interval [0,1]); finally, a weighted combination is performed according to the preset weight matrix (the weight of the influent positive phosphorus concentration is 0.3, the agent dosage is 0.3, and the other parameters are 0.4 in total) to form a state space vector (such as [0.5, 0.6, 0.8, 0.4, 0.7]), which contains the change in the amount of phosphorus removal agent required for subsequent calculations. and the change in influent orthophosphate concentration .

[0045] In some embodiments, the state space vector can be constructed in a variety of ways: Optionally, the monitoring device adopts a weighted combination method based on parameter sensitivity analysis. First, the influence weight of each operating parameter on the effluent orthophosphorus concentration is calculated by random forest algorithm (e.g. Weight 0.4, The standardized parameters are then weighted and summed to form a one-dimensional state space vector, highlighting the impact of the core parameters. Optionally, the monitoring device can also use a dimensionality reduction method called principal component analysis (PCA). Specifically, after standardizing the collected operating parameters, PCA is used to extract principal components (such as the first two principal components) with a cumulative variance contribution rate of ≥ 95%. The principal components are then weighted and combined according to their contribution rate to form a state space vector, reducing the dimensionality while retaining key information. It is understandable that the time-frequency features of the parameters may also be extracted by wavelet transform and then combined to construct the state space vector, which is not limited here.

[0046] S102. The monitoring equipment uses the true value of the effluent phosphorus concentration as the hidden state variable and the state space vector as the observed variable to construct a dynamic Markov random field model.

[0047] The true value of the effluent orthophosphate concentration refers to the actual orthophosphate concentration in the water sample, which cannot be measured directly and needs to be estimated through the dynamic Markov random field model. The hidden state variable refers to the variable that cannot be directly observed but needs to be estimated in the dynamic Markov random field model, which is denoted as (Hidden state variables, which cannot be measured directly). Observed variables refer to variables that can be measured directly, which are state space vectors, denoted as The dynamic Markov random field model is a probabilistic model that integrates the temporal dependency of hidden states with the association of observations. Its joint probability distribution is:

[0048] Among them, the state transfer equation can be rewritten as an energy function form as the transfer potential function The components of , achieve state prediction by minimizing energy:

[0049] Its significance lies in measuring the deviation between the predicted value of the state transition and the actual observed value, where : State autoregressive coefficient (characterizing the impact of historical concentration on the current); : Coefficient of variation of agent dosage (reflecting the effect of dephosphorization agent dosage on effluent orthophosphorus); : coefficient of variation of influent phosphorus concentration (reflecting the dynamic impact of influent load); : process noise (obeying Gaussian distribution); : Change in the amount of phosphorus removal agent added; : Change in influent orthophosphate concentration.

[0050] Then transform the associated latent variables and measurable input features as observation potential functions:

[0051] in Based on the input features (such as influent pH, flow rate) phosphorus removal efficiency estimation function, is the observation weight coefficient (balancing the influence of latent variables and measured features).

[0052] Specifically, this step constructs the DMRF model by defining the potential function: first, based on historical data (such as the past three months Reference value, 、 etc.), using the maximum likelihood estimation method to determine =0.7, =0.2, =0.1 and other parameters. Then quantify it through the transfer potential function and The deviation of The higher the value, the greater the probability of the corresponding state), quantified by the observation potential function and The difference between The higher the value, the more complete the model will be. In some embodiments, a dynamic Markov random field model can be constructed in a variety of ways: Optionally, the monitoring device can use the Bayesian estimation method to determine the model parameters. 、 、 Set a normal prior distribution (such as ~N(0.7,0.1²)), the posterior distribution of the parameters is estimated through Markov chain Monte Carlo sampling, and the parameters of the transfer potential function and the observation potential function are determined based on the posterior mean to enhance the robustness of the model. Optionally, the monitoring device can also use a piecewise potential function to construct the model. When the concentration is less than 0.05 mg / L (low concentration area), adjust the transfer potential function. 0.5 (reduces the impact of historical status), is 0.3 (enhanced potion effect); When ≥0.05mg / L, recovery =0.7, =0.2, so that the model adapts to the particularity of low-concentration scenarios. It is understandable that the weights of the parameters in the potential function can also be dynamically adjusted by introducing an attention mechanism, which is not limited here.

[0053] S103. The monitoring equipment predicts the prior probability distribution of the true value of the effluent orthophosphorus concentration based on the dynamic Markov random field model and the historical state space vector sequence.

[0054] The historical state space vector sequence refers to the time-ordered set of state space vectors within a preset time window (e.g., 1 hour) in the past. The prior probability distribution refers to the probability distribution of the hidden state variables when the current analyzer measurement value is not introduced. The probability distribution of possible values ​​and uncertainties.

[0055] Specifically, this step is based on the transfer potential function of the DMRF model and the prior distribution of historical sequence prediction: first extract 、 And other parameters. Then according to the state evolution equation Combined with the t-1 moment Estimated value, calculated The predicted mean and the prediction variance Finally, the prior probability distribution is determined to be the normal distribution N( , ),For example =0.06mg / L, =0.002, reflecting The most likely value and fluctuation range.

[0056] In some embodiments, the prior probability distribution can be predicted in a variety of ways: Optionally, the monitoring device can use a particle filter prediction method. Generate 1000 samples that obey N( , ) particles (representing The possible values ​​of ), based on the state evolution equation, calculate the corresponding The probability distribution of the predicted value is used as the prior probability distribution, which is applicable to non-Gaussian scenarios. Optionally, the monitoring device can also use a sliding window weighted prediction method to divide the historical state space vector sequence into multiple windows (such as 3 windows) according to time, assign a weight that decreases over time to each window (such as 0.5, 0.3, 0.2), and predict the value based on the sequence of each window and the DMRF model. The distribution of the data is then fused according to the weights to obtain the final prior probability distribution, thereby enhancing the influence of recent data.

[0057] It is understandable that prediction can also be performed by combining a long short-term memory network (LSTM) with a DMRF model, which is not limited here.

[0058] S104. When the effluent orthophosphorus concentration value measured by the analyzer is less than the preset analyzer accuracy threshold, the monitoring device calculates the optimal posterior estimate of the effluent orthophosphorus concentration at the current moment through the Kalman filter algorithm as the calibration concentration value of the effluent orthophosphorus concentration.

[0059] An analyzer refers to an instrument used for online monitoring of orthophosphate concentration in water, such as a molybdate spectrophotometer. The preset analyzer accuracy threshold is the critical concentration (e.g., 0.05 mg / L) at which the analyzer's measurement error begins to increase significantly. The Kalman filter algorithm is a recursive estimation method that fuses a prior distribution with observations to obtain a posterior distribution. The optimal posterior estimate is the mean (or mode) of the posterior distribution, i.e., the most likely latent state value. The calibration concentration is the estimated value, corrected by the algorithm, used in place of the analyzer's measured value.

[0060] Specifically, the Kalman filter algorithm is a recursive estimation algorithm that integrates prior distribution and observation values. The calculation process of its optimal posterior estimate is as follows: 1. Prediction step: the mean of the prior probability distribution and variance As a priori estimate of the mean and the prior estimated covariance ; 2. Update step: When the analyzer measures the value When the noise is less than 0.05 mg / L, a larger observation noise variance is used. (such as 0.1), the formula for calculating the Kalman gain is: ; 3. Best posterior estimation: , which is the calibration concentration value.

[0061] For example, if the prior estimate of the mean is 0.06 mg / L, =0.002, the analyzer measured value is 0.04mg / L, then =0.002 / (0.002 + 0.1) = 0.0196, the best posterior estimate = 0.06 + 0.0196×(0.04-0.06) = 0.0596 mg / L, which relies more on prior predictions and reduces the impact of low-precision measurements.

[0062] In some embodiments, the best a posteriori estimate can be calculated in a variety of ways: Optionally, the monitoring device can use a Kalman filter with adaptive noise adjustment. <0.05mg / L, Press 0.1+0.5 / Dynamic increase (such as =0.02mg / L, =0.1+25=25.1), further reducing the weight of the observation value and increasing the reliance on the prior. Optionally, the monitoring device can also use an iterative Kalman filter. After the first calculation of the posterior estimate, if the posterior covariance >0.01, use this estimate as a new prior input and recalculate K t ' and posterior estimates, until ≤0.01, improving the estimation accuracy in low concentration scenarios.

[0063] It is understandable that the weighted average of historical posterior estimation values ​​may also be introduced to correct the current estimation, which is not limited here.

[0064] S105. The monitoring equipment outputs the calibration concentration value to the water plant sewage treatment control system for guiding the adjustment of the dosage of the phosphorus removal agent.

[0065] The calibration concentration value refers to the optimal posterior estimate obtained by Kalman filtering. (e.g. 0.0596 mg / L). The water plant sewage treatment control system refers to the automatic control system used to control the phosphorus removal agent dosing pump, agitator and other equipment. The regulation of phosphorus removal agent dosage refers to the control system dynamically adjusting the agent dosage based on the deviation between the calibration concentration value and the preset target value (e.g. 0.5 mg / L). .

[0066] Specifically, the monitoring equipment will calibrate the concentration value and the corresponding posterior covariance (e.g. 0.00196) is output to the control system: the control system calculates the deviation value = target value - calibration concentration value (e.g. 0.5-0.0596=0.4404mg / L). If the deviation value is > 0 (calibration value is lower than target), press =k × deviation value (k is the proportional coefficient, such as 0.1) to reduce the dosage of the agent (for example, 0.4404 × 0.1 = 0.044 mg / L). If the deviation value is less than 0 (the calibration value is higher than the target), increase the dosage to achieve closed-loop control of measurement-estimation-adjustment.

[0067] In some embodiments, output and adjustment guidance can be achieved in a variety of ways: Optionally, the monitoring device outputs the calibration concentration value and confidence interval (such as [0.056, 0.063] mg / L). The control system determines the reliability of the estimate based on the width of the confidence interval: if the width is <0.01 mg / L (high reliability), adjust according to the normal proportional coefficient k. If the width is ≥0.01 mg / L (low reliability), k is halved to avoid over-adjustment. Optionally, the monitoring device can also output the calibration concentration value and trend forecast (such as it is expected to drop to 0.055 mg / L in the next 5 minutes). The control system adjusts the dosage of the agent in advance based on the trend forecast (such as pre-reducing 0.005 mg / L) to reduce the effect of hysteresis and improve control accuracy. It is understandable that the adjustment of the dosage of the phosphorus removal agent can also be guided by establishing a nonlinear mapping model (such as a BP neural network) between the calibration concentration value and the dosage of the agent, which is not limited here.

[0068] In the above embodiment, the monitoring equipment constructs a state space vector based on key operating parameters, combines the dynamic Markov random field model to predict the prior distribution, and fuses the prior and the observed value through Kalman filtering when the analyzer has low precision. This reduces the impact of the analyzer's measurement deviation at low concentrations without adding additional high-precision detection hardware, making the calibration concentration value closer to the true value, and thus improving the accuracy of the effluent phosphorus concentration monitoring during the wastewater phosphorus removal process. However, the above embodiment does not quantitatively analyze the deviation of the measurement system, making it difficult to identify the drift of the analyzer, and the model parameters are fixed, making it difficult to adapt to long-term changes in the process. The long-term stability and applicability under complex working conditions need to be improved.

[0069] See below Figure 2 , is another flow chart of a method for monitoring effluent orthophosphorus concentration that is resistant to analyzer deviation in an embodiment of the present application.

[0070] S201. The monitoring equipment constructs a state space vector using the operating parameters during the wastewater phosphorus removal process.

[0071] S202. The monitoring equipment uses the true value of the effluent phosphorus concentration as the hidden state variable and the state space vector as the observed variable to construct a dynamic Markov random field model.

[0072] S203. The monitoring equipment predicts the prior probability distribution of the true value of the effluent orthophosphorus concentration based on the dynamic Markov random field model and the historical state space vector sequence.

[0073] S204. When the effluent orthophosphorus concentration value measured by the analyzer is less than the preset analyzer accuracy threshold, the monitoring device calculates the optimal posterior estimate of the effluent orthophosphorus concentration at the current moment through the Kalman filter algorithm as the calibration concentration value of the effluent orthophosphorus concentration.

[0074] Step S201 is similar to step S101 , step S202 is similar to step S102 , step S203 is similar to step S103 , and step S204 is similar to step S104 , which will not be repeated here.

[0075] S205. The monitoring device calculates the deviation between the calibration concentration value and the effluent orthophosphorus concentration value measured by the analyzer.

[0076] The deviation value refers to the calibration concentration value ( ) and the analyzer measurement value (Semeasured), which is used to quantify the degree of deviation of the measurement system (a positive deviation indicates that the measurement value is too low, and a negative deviation indicates that the measurement value is too high).

[0077] Specifically, this step is based on Example 1 and realizes real-time monitoring of the stability of the measurement system by calculating the deviation value. For example, Example 1 only obtains the calibration value through Kalman filtering, while this step further calculates =0.0596−0.04=0.0196 mg / L, which not only reflects the magnitude of the current measurement deviation but also provides a data basis for subsequent anomaly detection.

[0078] In some embodiments, the deviation value calculation can be implemented in a variety of ways: Optionally, the monitoring device calculates a combined indicator of absolute deviation and relative deviation. Absolute deviation =∣ −Semeasured| is used for low concentration scenarios (to avoid the denominator being too small), relative deviation ′= / ×100% is used for medium and high concentration scenarios (reflecting the deviation ratio), taking into account the deviation characteristics under different concentrations. Optionally, the monitoring device can also use a sliding window to smooth the deviation value. The weighted average is calculated according to the weights [0.05, 0.08, 0.1, 0.12, 0.15, 0.15, 0.12, 0.1, 0.08, 0.05] (the middle data has a higher weight) to eliminate instantaneous noise interference and highlight the system deviation trend.

[0079] It is understandable that the trend component and the noise component in the deviation value can also be separated by wavelet transform, which is not limited here.

[0080] S206. The monitoring device determines whether the deviation value is suspicious data.

[0081] Among them, suspicious data refers to deviation values ​​that exceed the normal fluctuation range, indicating that there may be temporary interference (such as sensor contamination) or potential failure in the measurement system, which requires further analysis.

[0082] Specifically, the monitoring device calculates the normal range (mean ± 3 σ d, σ d is the standard deviation). If the current =0.0196 mg / L exceeds the range (such as the normal range is [-0.01, 0.015] mg / L), it is marked as suspicious data.

[0083] In some embodiments, suspicious data determination can be achieved in a variety of ways: Optionally, the monitoring device can use a dynamic threshold method, first, the monitoring device updates the mean d and d according to a time window (such as 1 hour) in a rolling manner. σ d. Adapt the normal range to changing operating conditions (e.g., relaxing the threshold when influent water fluctuates during rainy days) to reduce misjudgments. Optionally, monitoring equipment can also incorporate auxiliary water quality parameters into its judgment. If the deviation value is abnormal but there are no significant fluctuations in influent pH, turbidity, or other parameters during the same period (excluding water sample interference), the data is considered suspicious. If the water quality parameters fluctuate dramatically, they are temporarily not flagged (possibly due to normal process fluctuations), improving judgment accuracy.

[0084] It is understandable that machine learning algorithms such as isolation forests can also be used for anomaly detection, which is not limited here.

[0085] After the monitoring device determines that the deviation value is suspicious data in step S206, steps S207 to S209 are executed. After the monitoring device determines that the deviation value is not suspicious data in step S206, steps S210 to S213 are executed.

[0086] S207: When the suspicious data appears for a preset number of consecutive times, the monitoring device calculates the deviation change rate of the suspicious data for the preset number of consecutive times.

[0087] The number of consecutive preset times refers to the critical number of times that triggers drift analysis (such as 3 times). The deviation change rate refers to the change trend of consecutive suspicious data (r=( − ) / 2, reflecting the rate of increase or decrease of the deviation over time), is used to distinguish random fluctuations from systematic drift.

[0088] Specifically, this step targets the continuous appearance of suspicious data (such as =0.016, =0.018, =0.0196 mg / L) and calculate the rate of change r = (0.0196 − 0.016) / 2 = 0.0018 mg / L / time, quantifying the trend of continued deterioration of the deviation.

[0089] In some embodiments, the deviation change rate calculation can be implemented in a variety of ways: Optionally, the monitoring device uses linear fitting to calculate the change rate. Linear regression is performed on n consecutive suspicious data, and the regression coefficient is used as the change rate (e.g., slope = 0.002, indicating that the deviation increases by 0.002 mg / L per step), to enhance the robustness of trend characterization. Optionally, the monitoring device can also calculate the relative change rate. r′=( − ) / −2×100% (to avoid the absolute change rate being too small when the deviation value is low), such as r′=(0.0196−0.016) / 0.016×100%=22.5%, which can more intuitively reflect the degree of deterioration.

[0090] It is understandable that the deviation acceleration change rate can also be calculated by exponential fitting, which is not limited here.

[0091] S208. When the deviation change rate is greater than a preset change rate threshold, the monitoring device determines that the analyzer has drift.

[0092] Drift in an analyzer means that the measured value systematically deviates from the true value over time (not random fluctuations), requiring calibration and maintenance.

[0093] S209. When the analyzer drifts, the monitoring device sends an analyzer calibration prompt signal to the water plant sewage treatment control system.

[0094] S210. The monitoring equipment outputs the calibration concentration value to the water plant sewage treatment control system for guiding the adjustment of the phosphorus removal agent dosage.

[0095] Step S210 is similar to step S105 and will not be described again here.

[0096] S211. The monitoring equipment receives in real time the actual dosage of the dephosphorization agent fed back by the sewage treatment control system of the water plant and the effluent positive phosphorus concentration measured by the analyzer after adjustment.

[0097] The actual dosage of phosphorus removal agent refers to the actual flow rate of the agent delivered by the dosing pump after the control system adjusts the concentration according to the calibration value (e.g., 5.2 mg / L). The adjusted effluent phosphorus concentration measured by the analyzer refers to the effluent phosphorus concentration measured by the analyzer in real time after the new dosage of agent is added (e.g., 0.06 mg / L).

[0098] Specifically, the monitoring device receives actual dosage data from the control system via an industrial bus (such as Modbus / TCP) and simultaneously collects the latest measurement values ​​from the analyzer. For example, while Example 1 only outputs calibration values ​​to guide adjustments, this step further captures the actual effect data after adjustments, providing a true value reference for model evaluation. If the calibration value is 0.0596 mg / L, the control system adjusts the set dosage from 5 mg / L to 5.1 mg / L accordingly, and the actual dosage is 5.2 mg / L, the analyzer measures 0.06 mg / L after the adjustment. In this case, the feedback data collected in this step is (5.2 mg / L, 0.06 mg / L).

[0099] In some embodiments, feedback data can be received in a variety of ways: Optionally, the monitoring device can employ a timestamp alignment mechanism. To ensure that dosage and concentration data match, precise timestamps (e.g., millisecond level) are added to the two received data sets. Data pairs with time differences exceeding a preset threshold (e.g., 30 seconds) are eliminated to avoid evaluation errors caused by asynchronous sampling. Optionally, the monitoring device can also perform quality filtering on the feedback data. When the analyzer measurement value falls below 0.05 mg / L (a low-precision scenario that triggers the Kalman filter), the data is automatically marked as pending confirmation and temporarily excluded from model evaluation until the measurement value returns to a reliable range, thereby improving the quality of the evaluation data.

[0100] It is understandable that feedback data reception may also be achieved through other methods, which are not limited here.

[0101] S212. The monitoring equipment performs a performance evaluation on the dynamic Markov random field model based on the difference between the actual dosage and the set dosage, and the difference between the effluent orthophosphorus concentration measured by the analyzer after adjustment and the calibration concentration value.

[0102] Among them, the difference between the actual dosage and the set dosage (denoted as Δu= − ) reflects the execution deviation of the control system. The difference between the effluent phosphorus concentration measured by the analyzer after adjustment and the calibration concentration value (denoted as Δ = − ) reflects the model's prediction bias. The performance evaluation value is a quantitative indicator that combines the two differences and is used to measure the effectiveness of the model's guidance and regulation.

[0103] Specifically, this step evaluates the performance of the dynamic Markov random field model through the following steps: 1. Calculate the dosage deviation: If the dosage is set =5.1mg / L, actual dosage =5.2mg / L, then Δu=5.2−5.1=0.1mg / L; 2. Calculate the concentration prediction deviation: If the calibration concentration value =0.0596mg / L, measured value after adjustment =0.06mg / L, then Δ =0.06−0.0596=0.0004mg / L; 3. Comprehensive evaluation value: Using the weighted combination Score=w1×∣Δu∣+w2×∣ΔSe∣ (e.g. w1=0.6, w2=0.4), we get Score=0.6×0.1+0.4×0.0004=0.06016.

[0104] In some embodiments, performance evaluation can be achieved in a variety of ways: Optionally, the monitoring device uses a dynamic weight evaluation method. When || > 0.01 mg / L (high concentration deviation scenario), w2 is automatically increased to 0.8 (to highlight concentration prediction accuracy). When |ΔSe| ≤ 0.01 mg / L, the default weights are restored to better align the evaluation with actual needs. Optionally, the monitoring device can also calculate a cumulative evaluation value. This cumulative evaluation value is calculated by taking an exponentially weighted average of the scores of the last 100 sets of feedback data (with more recent data given a higher weight). This smooths out short-term fluctuations and reflects the long-term performance trend of the model.

[0105] It is understandable that the evaluation can also be performed by comparing the similarity between the model prediction and the ideal response curve, which is not limited here.

[0106] S213. When the performance evaluation value is less than a preset evaluation threshold, the monitoring device updates the parameters of the dynamic Markov random field model using an incremental learning algorithm based on the newly added monitoring data.

[0107] The preset evaluation threshold refers to the critical value (such as 0.05) for determining whether the model performance meets the standard. Incremental learning algorithm refers to updating the model parameters (such as 、 、 ) online learning method to avoid retraining the entire model.

[0108] Specifically, this step triggers parameter update through the following steps when the evaluation value is lower than the threshold (for example, Score=0.06016>0.05): 1. Collect new monitoring data: including the latest state space vector (including , ), calibration concentration value , feedback of actual dosage and concentration after adjustment; 2. Update parameters using incremental EM algorithm: 2.1. Step E: Calculate latent variables based on new data ( )’s posterior distribution; 2.2.M-step: Maximizing the likelihood function update 、 、 (like α Fine-tuned from 0.7 to 0.72); 3. Save the updated parameters for subsequent predictions.

[0109] In some embodiments, parameter updates can be implemented in a variety of ways: Optionally, the monitoring device uses incremental learning with a forgetting factor. This assigns exponentially decaying weights (e.g., λ = 0.99) to historical data, causing the model to gradually forget outdated information and focus more on recent changes. For example: Where θ is the model parameter, η is the learning rate, and Lnew is the log-likelihood of the new data. Optionally, the monitoring device can also set constraints on parameter updates. When the update amplitude exceeds 20%, it is automatically limited to 15% to prevent parameter mutations due to data fluctuations and ensure model stability.

[0110] It is understandable that the posterior distribution of parameters can also be estimated through Bayesian incremental learning, which is not limited here.

[0111] The monitoring equipment in this embodiment of the application improves the long-term stability of the monitoring system through dynamic monitoring of deviations and timely diagnosis of analyzer status, based on steps such as deviation value calculation, suspicious data determination, analyzer drift diagnosis, and model performance evaluation and parameter update. Furthermore, the closed-loop optimization mechanism of the dynamic Markov random field model enables adaptive process changes and maintains high accuracy over the long term, further enhancing the reliability and continued applicability of the effluent orthophosphorus concentration monitoring method in complex wastewater treatment scenarios.

[0112] A method for monitoring the orthophosphorus concentration in effluent that is resistant to analyzer deviation in an embodiment of the present application is described above. The following introduces an exemplary monitoring device 300 provided in an embodiment of the present application.

[0113] Figure 3: This is an exemplary hardware structure diagram of the monitoring device 300 provided in an embodiment of the present application. In some embodiments, the monitoring device 300 is a computer device, which includes a processor, a memory and a network interface connected via a monitoring device bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operation monitoring device, a computer program and a database. The internal memory provides an environment for the operation of the operation monitoring device and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with other external terminals or servers through a network connection. In some embodiments, the network interface can be a wired network interface, and in some embodiments, the network interface can also be a wireless network interface. When the computer program is executed by the processor, a method for monitoring the effluent orthophosphorus concentration that is resistant to analyzer deviation in an embodiment of the present application is implemented.

[0114] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0115] In some embodiments of the present application, a computer-readable storage medium is also provided, comprising instructions. When the instructions are executed on the monitoring device 300, the monitoring device 300 can execute a method for monitoring the effluent orthophosphorus concentration that is resistant to analyzer deviation in an embodiment of the present application.

[0116] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0117] As used in the above embodiments, the term “when” may be interpreted to mean “if” or “after” or “in response to determining that” or “in response to detecting that”, depending on the context. Similarly, the phrases “upon determining that” or “if (stated condition or event) is detected” may be interpreted to mean “if determining that” or “in response to determining that” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.

[0118] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state drive).

[0119] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for monitoring effluent phosphorus concentration that is resistant to analyzer deviation, characterized in that: Applied to monitoring equipment, the method comprises: The monitoring device constructs a state space vector based on the operating parameters of the wastewater phosphorus removal process, wherein the operating parameters include at least the influent phosphorus concentration, the amount of phosphorus removal agent added, the influent flow rate, the dissolved oxygen concentration in the reaction tank, and the pH value; The monitoring device uses the true value of the effluent orthophosphorus concentration as a hidden state variable and the state space vector as an observed variable to construct a dynamic Markov random field model; The monitoring device predicts the prior probability distribution of the true value of the effluent orthophosphorus concentration based on the dynamic Markov random field model and the historical state space vector sequence; When the effluent orthophosphorus concentration value measured by the analyzer is less than a preset analyzer accuracy threshold, the monitoring device calculates the optimal posterior estimate of the effluent orthophosphorus concentration at the current moment through a Kalman filter algorithm as a calibration concentration value of the effluent orthophosphorus concentration. The Kalman filter algorithm uses the mean and variance of the prior probability distribution as prior estimation parameters of the Kalman filter algorithm, and uses the effluent orthophosphorus concentration value measured by the analyzer as an observation input of the Kalman filter algorithm. The optimal posterior estimate is a weighted fusion result of the mean of the prior probability distribution and the analyzer measurement value. The monitoring device outputs the calibration concentration value to the water plant sewage treatment control system for guiding the adjustment of the dosage of the phosphorus removal agent.

2. The method according to claim 1, characterized in that The monitoring device constructs a state space vector based on the operating parameters of the wastewater phosphorus removal process, specifically including: The monitoring device obtains operating parameters during the wastewater phosphorus removal process, wherein the operating parameters include at least the influent phosphorus concentration, the amount of phosphorus removal agent added, the influent flow rate, the dissolved oxygen concentration in the reaction tank, and the pH value; The monitoring device marks the operating parameters that exceed a preset normal range as abnormal data, wherein the preset normal range is determined by adding or subtracting three times the standard deviation of the mean of the historical data of the corresponding operating parameters of the water plant sewage treatment control system at a preset time; The monitoring device replaces the abnormal data using a weighted sliding average method based on five adjacent valid data points, wherein the weights of adjacent data points decay exponentially with the distance from the abnormal data; The monitoring device maps the operating parameters after abnormal data processing to the interval [0, 1] to obtain standardized operating parameters; The monitoring device performs a weighted combination of the standardized operating parameters according to a preset parameter weight matrix to construct a state space vector, wherein the weights of the influent positive phosphorus concentration and the amount of phosphorus removal agent added in the preset parameter weight matrix are higher than the weights of other operating parameters.

3. The method according to claim 1, characterized in that The monitoring device uses the true value of the effluent phosphorus concentration as a hidden state variable and the state space vector as an observed variable to construct a dynamic Markov random field model, specifically including: The monitoring device uses the true value of the effluent orthophosphorus concentration as a hidden state variable; The monitoring device describes the dependency relationship between the hidden state variables at adjacent moments by using a transfer potential function; The monitoring device establishes an observation potential function between the hidden state variable and the state space vector; When the fluctuation of the influent orthophosphorus concentration of the observation potential function in the state space vector is greater than a preset fluctuation threshold, the observation potential function reduces the dependency weight of the influent orthophosphorus concentration parameter; Based on the historical state space vector sequence of the preset time and the corresponding historical measured value of the effluent orthophosphorus concentration, the monitoring device estimates the initial parameters of the dynamic Markov random field model using the maximum pseudo-likelihood estimation method; The monitoring device divides the historical data into a training set and a validation set in chronological order by a cross-validation method; The monitoring device adjusts model parameters with the goal of minimizing the prediction error on the validation set and constructs a dynamic Markov random field model.

4. The method according to claim 1, wherein The monitoring device predicts the prior probability distribution of the true value of the effluent orthophosphorus concentration based on the dynamic Markov random field model and the historical state space vector sequence, specifically including: The monitoring device extracts the state space vector sequence of the most recent preset time window from the historical state space vector sequence; The monitoring device calculates the probability of each possible value of the hidden state variable based on the extracted state space vector sequence and the dynamic Markov random field model; The monitoring device determines the prior probability distribution of the true value of the effluent orthophosphorus concentration based on the calculated probability; The monitoring device uses a Gaussian kernel function to perform a convolution operation on the probability distribution curve formed by the prior probability distribution to eliminate jagged fluctuations in the probability distribution.

5. The method according to claim 1, wherein When the effluent orthophosphorus concentration value measured by the analyzer is less than a preset analyzer accuracy threshold, the monitoring device calculates the optimal posterior estimate of the effluent orthophosphorus concentration at the current moment as the calibration concentration value of the effluent orthophosphorus concentration by using a Kalman filter algorithm, specifically including: The monitoring device uses the mean and variance of the prior probability distribution predicted by the dynamic Markov random field model as the prior estimated mean and prior estimated covariance of the Kalman filter algorithm; The monitoring device uses the analyzer measurement value after high-frequency noise removal as the observation input value; When the fluctuation degree of the observed input value is greater than a preset fluctuation degree threshold, the monitoring device increases the value of the observation noise variance parameter, where the observation noise variance parameter is used to characterize the credibility of the observed input value; The monitoring device calculates the Kalman gain at the current moment based on the prior estimated covariance and the observation noise variance parameter, where the Kalman gain is the weight of the observation input value; The monitoring device performs a weighted fusion of the prior estimation mean and the observed input value according to the Kalman gain, calculates an initial optimal a posteriori estimation value of the effluent orthophosphorus concentration at the current moment, and updates a posteriori estimation covariance corresponding to the initial optimal a posteriori estimation value; When the posterior estimated covariance is greater than a preset covariance threshold, the monitoring device uses the initial optimal posterior estimated value and the posterior estimated covariance as new priori inputs, and combines the observed input value at the same time to start secondary filtering to iterate the optimal posterior estimated value; When the posterior estimated covariance is less than or equal to a preset covariance threshold, the monitoring device uses the optimal posterior estimated value as a calibration concentration value of the effluent orthophosphorus concentration.

6. The method according to claim 5, characterized in that After the step of the monitoring device using the optimal a posteriori estimate as a calibration concentration value of the effluent orthophosphorus concentration when the covariance is less than or equal to a preset covariance threshold, the method further comprises: The monitoring device calculates the deviation between the calibration concentration value and the effluent orthophosphorus concentration value measured by the analyzer; The monitoring device calculates the deviation mean and the deviation standard deviation of the deviation value within a preset time; The monitoring device determines a deviation warning threshold value according to the deviation mean and the deviation standard deviation; When the deviation value exceeds the deviation warning threshold, the monitoring device marks the deviation value as suspicious data; When the suspicious data appears for a preset number of consecutive times, the monitoring device calculates the deviation change rate of the suspicious data for the preset number of consecutive times; When the deviation change rate is greater than a preset change rate threshold, the monitoring device determines that the analyzer has drift; When the analyzer drifts, the monitoring device sends an analyzer calibration prompt signal to the water plant sewage treatment control system.

7. The method according to claim 1, characterized in that After the step of the monitoring device outputting the calibration concentration value to the water plant sewage treatment control system for guiding the adjustment of the phosphorus removal agent dosage, the method further comprises: The monitoring device receives in real time the actual dosage of the dephosphorization agent fed back by the water plant sewage treatment control system and the effluent orthophosphorus concentration measured by the adjusted analyzer; The monitoring device uses the difference between the actual dosage and the set dosage and the difference between the effluent orthophosphorus concentration measured by the analyzer after adjustment and the calibration concentration value as evaluation indicators of the dynamic Markov random field model; The monitoring device evaluates a performance evaluation value of the dynamic Markov random field model according to the evaluation index; When the performance evaluation value is less than a preset evaluation threshold, the monitoring device updates the parameters of the dynamic Markov random field model using an incremental learning algorithm based on the newly added monitoring data; The monitoring device performs a performance test on the updated dynamic Markov random field model; When the prediction error of the dynamic Markov random field model after parameter update on the same test data set is less than the prediction error of the original dynamic Markov random field model on the same test data set, the monitoring device replaces the original model parameters with the updated model parameters.

8. A monitoring device, characterized in that: The monitoring device includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the monitoring device to perform the method according to any one of claims 1 to 7.

9. A computer program product comprising instructions, characterized in that When the computer program product is run on a monitoring device, the monitoring device is caused to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a monitoring device, the monitoring device is caused to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Chemical phosphorus-removal accurate dosing system and chemical phosphorus-removal accurate dosing control method

    CN110862188A

  • Short-distance intelligent phosphorus removal and dosing control method, equipment and system for sewage treatment

    CN114230110A

  • Intelligent dosing model modeling method, intelligent dosing system creating method and dosing method

    CN115329661A

  • Intelligent chemical phosphorus removal system for urban sewage treatment plant

    CN117037926A

  • Intelligent dosing control method, device and system for softening and removing hardness

    US20250223203A1