CN113918873B - Method for estimating dissolved oxygen concentration in sewage, storage medium, electronic device, and system - Google Patents

Method for estimating dissolved oxygen concentration in sewage, storage medium, electronic device, and system Download PDF

Info

Publication number
CN113918873B
CN113918873B CN202111263423.9A CN202111263423A CN113918873B CN 113918873 B CN113918873 B CN 113918873B CN 202111263423 A CN202111263423 A CN 202111263423A CN 113918873 B CN113918873 B CN 113918873B
Authority
CN
China
Prior art keywords
dissolved oxygen
oxygen concentration
sewage
concentration sensor
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111263423.9A
Other languages
Chinese (zh)
Other versions
CN113918873A (en
Inventor
赵顺毅
曾强
刘伟哲
栾小丽
刘飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangnan University
Original Assignee
Jiangnan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangnan University filed Critical Jiangnan University
Priority to CN202111263423.9A priority Critical patent/CN113918873B/en
Publication of CN113918873A publication Critical patent/CN113918873A/en
Application granted granted Critical
Publication of CN113918873B publication Critical patent/CN113918873B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/18Water
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis

Abstract

The invention discloses a method for estimating the dissolved oxygen concentration of sewage, which comprises the following steps: s1, establishing a state space equation of the dissolved oxygen concentration of the sewage; s2, establishing an observation equation of the first sewage dissolved oxygen concentration sensor and an observation equation of the second sewage dissolved oxygen concentration sensor; s3, estimating the state value of the system by using the first sewage dissolved oxygen concentration sensor and the second sewage dissolved oxygen concentration sensor respectively; s4, establishing a probability density function by using a sewage dissolved oxygen concentration state space equation and an observation equation of the first sewage dissolved oxygen concentration sensor, predicting the probability density function of the observation value distribution of the first sewage dissolved oxygen concentration sensor by using the second sewage dissolved oxygen concentration sensor, and estimating a state value of the system; s5, replacing the state value of the system estimated by the first sewage dissolved oxygen concentration sensor in the step S3 by the state value of the system estimated in the step S4, and obtaining the sewage dissolved oxygen concentration value at each moment. The invention improves the accuracy while ensuring the real-time performance.

Description

Method for estimating dissolved oxygen concentration in sewage, storage medium, electronic device, and system
Technical Field
The invention relates to the technical field of sewage treatment, in particular to a method, a storage medium, electronic equipment and a system for estimating the dissolved oxygen concentration of sewage.
Background
The sewage treatment means that: the sewage is purified according to the water quality requirement of being discharged into a certain water body or being reused. At present, sewage treatment has been widely applied to various fields. In particular, sewage treatment is very important in the aspects of life, industrial production and biomedicine.
By 3 months in 2020, 10000 sewage treatment plants are taken to the pollution discharge license in the whole country, and 97.6% of the sewage treatment plants publish the restriction information of the total pollutant discharge amount or the discharge concentration. According to the sewage treatment capacity, 1-5 ten thousand tons/day of sewage treatment plants account for 34.2 percent of the sewage treatment plants at most; the proportion of 5000-10000 ton/day sewage treatment plants is 10.7 percent; the sewage treatment plant of 1000-5000 tons/day accounts for 24.8 percent; the sewage treatment plant accounts for 17.4% below 1000 tons/day; the proportion of sewage treatment plants with the weight of less than 1 ten thousand tons per day is up to 52.9 percent in total.
The sewage treatment process has the characteristics of nonlinearity, time variation, randomness and large time lag, the modeling and null value process of the sewage treatment process is still not easy at present, and in a specific sewage treatment field environment, the sensor can cause errors between an obtained state value and a true value due to the interference effect. High performance sensors, while measuring more accurately, are significantly less fast in sampling and also do not facilitate estimating the state of the system because the acquisition of the samples takes a fraction of the time (also known as the delay). The quality of the water quality is directly determined by the quality of the control of the concentration of the dissolved oxygen in the sewage treatment process. The dissolved oxygen concentration in the activated sludge pool is too low or excessive, which can cause the deterioration of the living environment of the sludge: if the concentration of the dissolved oxygen is insufficient, the growth rate of aerobic bacteria is reduced, so that the quality of the effluent is reduced; on the other hand, if the dissolved oxygen concentration is too high, the flocculant is destroyed, and the suspended solids settleability is deteriorated, and energy is wasted.
The present invention relates to a method for learning a plurality of machine learning tasks, and more particularly to a method for learning a plurality of machine learning tasks, which comprises the steps of learning a plurality of machine learning tasks by using a plurality of machine learning tasks, and applying the machine learning tasks to the plurality of machine learning tasks.
Therefore, how to combine the transfer learning and provide a more accurate estimation method for the concentration of the dissolved oxygen in the sewage by using the common sensor and the high-performance sensor together is a problem worthy of solving.
Disclosure of Invention
The invention aims to provide a method for estimating the dissolved oxygen concentration of sewage, which has good real-time performance and high accuracy.
In order to solve the above problems, the present invention provides a method for estimating a dissolved oxygen concentration in wastewater, comprising the steps of:
s1, establishing a state space equation of the dissolved oxygen concentration of the sewage according to the treatment mechanism of the sewage treatment system by the activated sludge process;
s2, respectively establishing an observation equation of the first sewage dissolved oxygen concentration sensor and an observation equation of the second sewage dissolved oxygen concentration sensor according to the sewage dissolved oxygen concentration state space equation; the sampling rate of the first sewage dissolved oxygen concentration sensor is greater than that of a second sewage dissolved oxygen concentration sensor, and the sampling precision of the second sewage dissolved oxygen concentration sensor is greater than that of the first sewage dissolved oxygen concentration sensor;
s3, estimating the state value of the system by using the first sewage dissolved oxygen concentration sensor and the second sewage dissolved oxygen concentration sensor respectively; the state values comprise a state mean and a covariance;
s4, establishing a probability density function by using the state space equation of the dissolved oxygen concentration of the sewage and the observation equation of the dissolved oxygen concentration sensor of the first sewage, predicting the probability density function of the observation value distribution of the dissolved oxygen concentration sensor of the first sewage by using the dissolved oxygen concentration sensor of the second sewage, and estimating the state value of the system;
s5, replacing the system state value estimated by the first sewage dissolved oxygen concentration sensor in the step S3 with the system state value estimated in the step S4, and obtaining the sewage dissolved oxygen concentration value at each moment.
As a further improvement of the invention, the sewage dissolved oxygen concentration state space equation is as follows:
xk=Axk-1+wk
in the formula (I), the compound is shown in the specification,
xk=[x1,k,x2,k,x3,k]T
Figure BDA0003326293020000031
wherein k is a time index; x is a radical of a fluorine atomkIs the state value of the system: x is the number of1,kIs the mass concentration of the microorganism, x2,kIs the mass concentration of the substrate, x3,kIs the mass concentration of dissolved oxygen; a is a state transition matrix of the system; w is akIs a noise term of the system, and wkObeying a Gaussian distribution with mean value of zero, i.e. wkN (0, Q), where Q is the covariance matrix of the system noise term; u. uHIs the maximum growth rate of the microorganism; k is a radical ofdAn endogenous hysteresis parameter; c is a concentration factor of the secondary sedimentation tank; qwIs the flux of the soil; qinIs the inflow; v is the volume of the reactor; f is a factor linking the organic matter to the oxygen demand; f. ofxIs a water pump factor; y isNHIs the observed growth coefficient; δ is an impulse coefficient set to dissolved oxygen.
As a further improvement of the present invention, the observation equation of the first sewage dissolved oxygen concentration sensor is:
yk=Cxk+vk
in the formula (I), the compound is shown in the specification,
C=[0,0,1]
wherein, ykIs the observed value of the dissolved oxygen in the sewage measured by the first dissolved oxygen concentration sensor, C is the observation matrix of the system, xkIs the state value, v, of the system observed by the first sewage dissolved oxygen concentration sensorkIs a noise term of the observed value, and vkSubject to a Gaussian distribution with mean value of zero, i.e. vkN (0, R), where R is the covariance matrix of the observed noise term.
As a further improvement of the invention, the observation equation of the second sewage dissolved oxygen concentration sensor is as follows:
ys,k=δk(Hxs,i+vs,i)
in the formula (I), the compound is shown in the specification,
H=[0,0,1]
wherein, ys,kIs the observed value of the second sewage dissolved oxygen concentration sensor, H is the observation matrix of the system, xs,iFor the state values of the system observed by the second sewage dissolved oxygen sensor, the subscript s is used to distinguish from the first sewage dissolved oxygen sensor, vs,iIs a noise term of the observed value, and vs,iSubject to a Gaussian distribution with a mean value of zero, i.e. vs,i~N(0,Rs) Wherein R issIs the covariance matrix of the observed noise; the sampling rate of the first sewage dissolved oxygen concentration sensor is alpha times of that of the second sewage dissolved oxygen concentration sensor, and the second sewage dissolved oxygen concentration sensor can be obtained after beta sampling moments are carried out, wherein delta isk0,1 is a decision function, and at time k, if (k- β) \ α is 0, δ isk1 and the second sewage dissolved oxygen concentration sensor observes the system state value at the time i, whereas if (k- β \ α ≠ 0, δkAnd the second sewage dissolved oxygen concentration sensor can not observe the system state value, wherein i is k-beta, and the remainder is obtained after the division.
As a further improvement of the present invention, the state value of the system is estimated using the first sewage dissolved oxygen concentration sensor as follows:
the state mean value and the covariance estimated by the first sewage dissolved oxygen concentration sensor at the moment k-1 are respectively assumed to be xk-1、Pk-1Then, time k:
Figure BDA0003326293020000041
Figure BDA0003326293020000042
wherein the content of the first and second substances,
Figure BDA0003326293020000043
is the average of the states that are predicted,
Figure BDA0003326293020000044
is the predicted state covariance matrix, T is the transpose of the matrix;
assuming that the observed value of the first sewage dissolved oxygen concentration sensor is not delayed, the observed value y at the time kkThe predicted state mean and covariance can be updated using the following equations:
Figure BDA0003326293020000045
Figure BDA0003326293020000046
Figure BDA0003326293020000047
wherein K is an intermediate variable, also called Kalman gain, xkAnd PkThen I is the identity matrix for the mean and covariance matrices of the state after update.
As a further improvement of the present invention, the state value of the system is estimated by using the second sewage dissolved oxygen concentration sensor as follows:
the state mean value and the covariance estimated by the second sewage dissolved oxygen concentration sensor at the moment i-alpha are respectively assumed to be xs,i-αAnd Ps,i-αAnd then i time:
Figure BDA0003326293020000048
Figure BDA0003326293020000049
updating the predicted state mean value and covariance by using the observed value of the second sewage dissolved oxygen concentration sensor at the time k, and then
Figure BDA0003326293020000051
Figure BDA0003326293020000052
Figure BDA0003326293020000053
Wherein, KsIs an intermediate variable, also known as Kalman gain, xs,iAnd Ps,iThe mean and covariance matrices for the state after update.
As a further improvement of the present invention, step S4 includes:
establishing a probability density function by using the state space equation of the dissolved oxygen concentration of the sewage and the observation equation of the first dissolved oxygen concentration sensor of the sewage, and enabling the probability density function to be in a Bayesian formula
Figure BDA0003326293020000054
Wherein p (·) is a probability density function, x ≡ N (x; μ, σ) represents a Gaussian distribution with x obeying mean μ and covariance σ, and p (x ≡ N (x; μ, σ) represents a Gaussian distribution with x obeying mean μ and covariance σi|y1:i-1)≡N(xi;Axi-1,APi-1AT+Q),ps(yi) The second sewage dissolved oxygen concentration sensor predicts the observed value y of the fast rate sampling sensoriThe probability density function of the distribution, namely:
ps(yi)≡N(yi;Hxs,i,HPs,iHT+Rs)
Figure BDA0003326293020000055
is a probability density function of the system state at the time i predicted by the approximate first sewage dissolved oxygen concentration sensor,
Figure BDA0003326293020000056
determined by the KL divergence, the formula is:
Figure BDA0003326293020000057
at this point, the problem translates to finding the minimum distribution that makes the above equation true
Figure BDA0003326293020000058
Defined as p ° (x)i|y1:i-1) And deducing by using variational Bayes theorem:
p°(xi|y1:i-1)∝p(xi|y1:i-1)exp{∫[logp(yi|xi)ps(yi)]dyi}
further, the following results are obtained:
Figure BDA0003326293020000059
wherein:
Figure BDA00033262930200000510
Figure BDA0003326293020000061
Figure BDA0003326293020000062
finally, the following steps are obtained:
p(xi|y1:i)≡N(xi;xt,i,Pt,i)
wherein:
Figure BDA0003326293020000063
Figure BDA0003326293020000064
Figure BDA0003326293020000065
the present invention also discloses a computer-readable storage medium including a stored program, wherein the program executes the method for estimating a dissolved oxygen concentration in wastewater according to any one of the above.
The invention also discloses an electronic device, comprising: one or more processors, memory, and one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the method of estimating dissolved oxygen concentration in wastewater of any of the above.
The invention also discloses a system for estimating the dissolved oxygen concentration of the sewage, which comprises the following components:
the system comprises a dissolved oxygen concentration state space equation establishing module, a control module and a control module, wherein the dissolved oxygen concentration state space equation establishing module is used for establishing a sewage dissolved oxygen concentration state space equation according to a treatment mechanism of an activated sludge process sewage treatment system;
the system comprises an observation equation establishing module, a first monitoring module, a second monitoring module and a control module, wherein the observation equation establishing module is used for respectively establishing an observation equation of a first sewage dissolved oxygen concentration sensor and an observation equation of a second sewage dissolved oxygen concentration sensor according to a sewage dissolved oxygen concentration state space equation; the sampling rate of the first sewage dissolved oxygen concentration sensor is greater than that of a second sewage dissolved oxygen concentration sensor, and the sampling precision of the second sewage dissolved oxygen concentration sensor is greater than that of the first sewage dissolved oxygen concentration sensor;
the state value estimation module is used for estimating the state values of the system by using the first sewage dissolved oxygen concentration sensor and the second sewage dissolved oxygen concentration sensor respectively; the state values comprise a state mean and a covariance;
the probability density function prediction module is used for establishing a probability density function by utilizing the state space equation of the dissolved oxygen concentration of the sewage and the observation equation of the first dissolved oxygen concentration sensor, predicting the probability density function of the observation value distribution of the first dissolved oxygen concentration sensor by utilizing the second dissolved oxygen concentration sensor of the sewage and estimating the state value of the system;
and the sewage dissolved oxygen concentration value acquisition module is used for replacing the state value of the system estimated by the first sewage dissolved oxygen concentration sensor by using the state value of the system estimated by the probability density function prediction module to obtain the sewage dissolved oxygen concentration value at each moment.
The invention has the beneficial effects that:
the method for estimating the dissolved oxygen concentration of the sewage introduces the idea of transfer learning, considers a sensor (high-performance sensor) with low-speed sampling as a model of a source domain, considers a sensor (common sensor) with high-speed sampling as a model of a target domain, and applies the priori knowledge obtained by the source domain to the task of estimating the sewage flow of the target domain, thereby improving the estimation result of the target domain, namely improving the accuracy of the estimated value of the dissolved oxygen concentration of the sewage.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical means of the present invention more clearly understood, the present invention may be implemented in accordance with the content of the description, and in order to make the above and other objects, features, and advantages of the present invention more clearly understood, the following preferred embodiments are specifically described below with reference to the accompanying drawings.
Drawings
FIG. 1 is a flow chart of a method for estimating dissolved oxygen concentration in wastewater according to a preferred embodiment of the present invention;
FIG. 2 is a graph showing the effect of tracking the state of dissolved oxygen concentration in wastewater obtained by the method for estimating dissolved oxygen concentration in wastewater according to the preferred embodiment of the present invention;
FIG. 3 is a graph comparing the Root Mean Square Error (RMSE) of the state of dissolved oxygen concentration in wastewater estimated by the method for estimating dissolved oxygen concentration in wastewater according to the preferred embodiment of the present invention and the Kalman method;
FIG. 4 is a box plot diagram comparing the absolute error (MAE) of the method for estimating the dissolved oxygen concentration in wastewater with that of the Kalman method in the preferred embodiment of the present invention.
Detailed Description
The present invention is further described below in conjunction with the drawings and the embodiments so that those skilled in the art can better understand the present invention and can carry out the present invention, but the embodiments are not to be construed as limiting the present invention.
As shown in fig. 1, the method for estimating the dissolved oxygen concentration in wastewater according to the preferred embodiment of the present invention includes the following steps:
s1, establishing a state space equation of the dissolved oxygen concentration of the sewage according to the treatment mechanism of the sewage treatment system by the activated sludge process;
the state space equation of the dissolved oxygen concentration of the sewage is as follows:
xk=Axk-1+wk
in the formula (I), the compound is shown in the specification,
xk=[x1,k,x2,k,x3,k]T
Figure BDA0003326293020000081
wherein k is a time index; x is the number ofkIs the state value of the system: x is the number of1,kIs the mass concentration of the microorganism, x2,kIs the mass concentration of the substrate, x3,kIs the mass concentration of dissolved oxygen; a is a state transition matrix of the system; w is akIs the noise term of the system, and wkObeying a Gaussian distribution with mean value of zero, i.e. wkN (0, Q), where Q is the covariance matrix of the system noise term; u. ofHIs the maximum growth rate of the microorganism; k is a radical ofdAn endogenous hysteresis parameter; c is a concentration factor of the secondary sedimentation tank; qwThe flow rate of the pollutants; qinIs the inflow; v is the volume of the reactor; f is a factor linking the organic matter to the oxygen demand; f. ofxIs a water pump factor; y isNHIs the observed growth factor; δ is an impulse coefficient set to dissolved oxygen.
S2, respectively establishing an observation equation of the first sewage dissolved oxygen concentration sensor and an observation equation of the second sewage dissolved oxygen concentration sensor according to the state space equation of the sewage dissolved oxygen concentration; the sampling rate of the first sewage dissolved oxygen concentration sensor is greater than that of a second sewage dissolved oxygen concentration sensor, and the sampling precision of the second sewage dissolved oxygen concentration sensor is greater than that of the first sewage dissolved oxygen concentration sensor;
the observation equation of the first sewage dissolved oxygen concentration sensor is as follows:
yk=Cxk+vk
in the formula (I), the compound is shown in the specification,
C=[0,0,1]
wherein, ykIs the observed value of the dissolved oxygen in the sewage measured by the first dissolved oxygen concentration sensor, C is the observation matrix of the system, xkIs the state value, v, of the system observed by the first sewage dissolved oxygen concentration sensorkIs a noise term of the observed value, and vkSubject to a Gaussian distribution with mean value of zero, i.e. vkN (0, R), where R is the covariance matrix of the observed noise term.
The observation equation of the second sewage dissolved oxygen concentration sensor is as follows:
ys,k=δk(Hxs,i+vs,i)
in the formula (I), the compound is shown in the specification,
H=[0,0,1]
wherein, ys,kIs the observed value of the second sewage dissolved oxygen concentration sensor, H is the system's observation matrix, xs,iFor the state values of the system observed by the second sewage dissolved oxygen concentration sensor, the subscript s is used to distinguish from the first sewage dissolved oxygen concentration sensor, vs,iIs a noise term of the observed value, and vs,iSubject to a Gaussian distribution with mean value of zero, i.e. vs,i~N(0,Rs) Wherein R issIs a covariance matrix of observed noise; the sampling rate of the first sewage dissolved oxygen concentration sensor is alpha times of that of the second sewage dissolved oxygen concentration sensor, and the second sewage dissolved oxygen concentration sensor can be obtained after beta sampling moments are carried out, wherein delta iskWhere 0,1 is a decision function, at time k, if (k- β) \ α is 0, δ isk1 and the second sewage dissolved oxygen concentration sensor observes the system state value at the time i, whereas if (k- β \ α ≠ 0, δkAnd the second sewage dissolved oxygen concentration sensor can not observe the system state value, wherein i is k-beta, and the remainder is obtained after the division.
S3, estimating the state value of the system by using the first sewage dissolved oxygen concentration sensor and the second sewage dissolved oxygen concentration sensor respectively; the state values include a state mean and a covariance;
the state value of the system is estimated using the first sewage dissolved oxygen concentration sensor as follows:
the state mean value and the covariance estimated by the first sewage dissolved oxygen concentration sensor at the moment k-1 are respectively assumed to be xk-1、Pk-1Then, time k:
Figure BDA0003326293020000091
Figure BDA0003326293020000092
wherein the content of the first and second substances,
Figure BDA0003326293020000093
is the average of the predicted states and is,
Figure BDA0003326293020000094
is the predicted state covariance matrix, T is the transpose of the matrix;
assuming that the observed value of the first sewage dissolved oxygen concentration sensor is not delayed, the observed value y at the time kkThe predicted state mean and covariance can be updated using the following equations:
Figure BDA0003326293020000095
Figure BDA0003326293020000096
Figure BDA0003326293020000101
wherein K is an intermediate variable, andcalled Kalman gain, xkAnd PkThen I is the identity matrix for the mean and covariance matrices of the state after update.
The state value of the system is estimated by using the second sewage dissolved oxygen concentration sensor as follows:
the state mean value and covariance estimated by the second sewage dissolved oxygen concentration sensor at the moment i-alpha are respectively xs,i-αAnd Ps,i-αAnd then i time:
Figure BDA0003326293020000102
Figure BDA0003326293020000103
updating the predicted state mean value and covariance by using the observed value of the second sewage dissolved oxygen concentration sensor at the time k, and then
Figure BDA0003326293020000104
Figure BDA0003326293020000105
Figure BDA0003326293020000106
Wherein, KsIs an intermediate variable, also known as Kalman gain, xs,iAnd Ps,iThe mean and covariance matrices for the state after update.
S4, establishing a probability density function by using the sewage dissolved oxygen concentration state space equation and the observation equation of the first sewage dissolved oxygen concentration sensor, predicting the probability density function of the observation value distribution of the first sewage dissolved oxygen concentration sensor by using the second sewage dissolved oxygen concentration sensor, and estimating the state value of the system;
specifically, a probability density function is established by using the state space equation of the dissolved oxygen concentration of the sewage and the observation equation of the first dissolved oxygen concentration sensor of the sewage, and a Bayesian formula is used for enabling the probability density function to be obtained
Figure BDA0003326293020000107
Wherein p (·) is a probability density function, x ≡ N (x; μ, σ) represents a Gaussian distribution with x obeying mean μ and covariance σ, and p (x ≡ N (x; μ, σ) represents a Gaussian distribution with x obeying mean μ and covariance σi|y1:i-1)≡N(xi;Axi-1,APi-1AT+Q),ps(yi) Is the second sewage dissolved oxygen concentration sensor to predict the observed value y of the fast rate sampling sensoriThe probability density function of the distribution, namely:
ps(yi)≡N(yi;Hxs,i,HPs,iHT+Rs)
Figure BDA0003326293020000111
is a probability density function of the system state at the time i predicted by the approximate first sewage dissolved oxygen concentration sensor,
Figure BDA0003326293020000112
determined by the KL divergence, the formula is:
Figure BDA0003326293020000113
at this point, the problem translates to finding the minimum distribution that makes the above equation true
Figure BDA0003326293020000114
Defined as p ° (x)i|y1:i-1) Using variational bayes theorem, one can deduce:
p°(xi|y1:i-1)∝p(xi|y1:i-1)exp{∫[logp(yi|xi)ps(yi)]dyi}
further, the following is obtained:
Figure BDA0003326293020000115
wherein:
Figure BDA0003326293020000116
Figure BDA0003326293020000117
Figure BDA0003326293020000118
finally, the following is obtained:
p(xi|y1:i)≡N(xi;xt,i,Pt,i)
wherein:
Figure BDA0003326293020000119
Figure BDA00033262930200001110
Figure BDA00033262930200001111
s5, replacing the state value of the system estimated by the first sewage dissolved oxygen concentration sensor in the step S3 by the state value of the system estimated in the step S4, and obtaining the sewage dissolved oxygen concentration value at each moment.
Specifically, the state value (x) estimated in step S4t,i,Pt,i) Replacing the first wastewater dissolution in step S3State value (x) estimated by oxygen concentration sensori,Pi) And reuse the observed value (y) of the first sewage dissolved oxygen concentration sensori+1,…,yk) And updating the mean value and the variance of the beta states from the moment i +1 to the moment k by using a formula to obtain the dissolved oxygen concentration value of the sewage at each moment.
In one embodiment, the parameters of the selected equation and the sensor are:
Figure BDA0003326293020000121
C=[0 0 1],H=[0 0 1],
Q=10-2I3×3,R=10,Rs=10-6,
α=5,β=5
the number of the system states is 3, and the system states are respectively the first state, namely the mass concentration mg/L of the microorganism, the mass concentration mg/L of the substrate in the second state and the dissolved oxygen concentration mg/L of the sewage in the third state. Initial values for all 3 states were set to 0mg/L, and values for both alpha and beta were selected to be 5.
FIG. 2 is a graph showing the effect of tracking the dissolved oxygen concentration state of wastewater obtained by the method for estimating the dissolved oxygen concentration of wastewater according to the preferred embodiment of the present invention; FIG. 3 is a graph showing a comparison of Root Mean Square Error (RMSE) between the method for estimating the dissolved oxygen concentration in wastewater and the Kalman method for estimating the state of the dissolved oxygen concentration in wastewater according to the preferred embodiment of the present invention; FIG. 4 is a box plot diagram comparing the absolute error (MAE) of the method for estimating the dissolved oxygen concentration in wastewater with that of the Kalman method in the preferred embodiment of the present invention. The matlab simulation software is used for running 100 times, and 100 sampling times in each time are found that the method adopted by the invention is higher in precision and smaller in error, wherein the obtained average root mean square error is 0.1413, and compared with the error 0.1647 obtained by a Kalman method, the error is reduced by about 0.02.
Compared with a Kalman method, the method disclosed by the invention has the advantages that the dissolved oxygen concentration state in the sewage treatment activated sludge treatment process is estimated by combining the transfer learning and utilizing the observed values of two sensors with different precisions, so that the error between the estimated value and the true value is reduced, and the method has very important significance for accurately estimating the dissolved oxygen concentration.
The preferred embodiment of the invention also discloses a computer readable storage medium, which comprises a stored program, wherein the program executes the method for estimating the dissolved oxygen concentration in sewage according to any one of the embodiments.
The preferred embodiment of the present invention also discloses an electronic device, which includes: one or more processors, memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the method of estimating dissolved oxygen concentration in wastewater of any of the embodiments described above.
The preferred embodiment of the invention also discloses a system for estimating the dissolved oxygen concentration of the sewage, which comprises the following modules:
the system comprises a dissolved oxygen concentration state space equation establishing module, a control module and a control module, wherein the dissolved oxygen concentration state space equation establishing module is used for establishing a sewage dissolved oxygen concentration state space equation according to a treatment mechanism of an activated sludge process sewage treatment system;
the system comprises an observation equation establishing module, a first monitoring module, a second monitoring module and a control module, wherein the observation equation establishing module is used for respectively establishing an observation equation of a first sewage dissolved oxygen concentration sensor and an observation equation of a second sewage dissolved oxygen concentration sensor according to a sewage dissolved oxygen concentration state space equation; the sampling rate of the first sewage dissolved oxygen concentration sensor is greater than that of a second sewage dissolved oxygen concentration sensor, and the sampling precision of the second sewage dissolved oxygen concentration sensor is greater than that of the first sewage dissolved oxygen concentration sensor;
the state value estimation module is used for estimating the state values of the system by using the first sewage dissolved oxygen concentration sensor and the second sewage dissolved oxygen concentration sensor respectively; the state values comprise a state mean and a covariance;
the probability density function prediction module is used for establishing a probability density function by utilizing the state space equation of the dissolved oxygen concentration of the sewage and the observation equation of the first dissolved oxygen concentration sensor, predicting the probability density function of the observation value distribution of the first dissolved oxygen concentration sensor by utilizing the second dissolved oxygen concentration sensor of the sewage and estimating the state value of the system;
and the sewage dissolved oxygen concentration value acquisition module is used for replacing the state value of the system estimated by the first sewage dissolved oxygen concentration sensor by using the state value of the system estimated by the probability density function prediction module to obtain the sewage dissolved oxygen concentration value at each moment.
The calculation steps involved in the system module are the same as those in the above method embodiments, and are not described herein again.
The above embodiments are merely preferred embodiments for fully illustrating the present invention, and the scope of the present invention is not limited thereto. The equivalent substitutions or changes made by the person skilled in the art on the basis of the present invention are all within the protection scope of the present invention. The protection scope of the invention is subject to the claims.

Claims (6)

1. A method for estimating the dissolved oxygen concentration of sewage is characterized by comprising the following steps:
s1, establishing a state space equation of the dissolved oxygen concentration of the sewage according to the treatment mechanism of the sewage treatment system by the activated sludge process;
s2, respectively establishing an observation equation of the first sewage dissolved oxygen concentration sensor and an observation equation of the second sewage dissolved oxygen concentration sensor according to the state space equation of the sewage dissolved oxygen concentration; the sampling rate of the first sewage dissolved oxygen concentration sensor is greater than that of a second sewage dissolved oxygen concentration sensor, and the sampling precision of the second sewage dissolved oxygen concentration sensor is greater than that of the first sewage dissolved oxygen concentration sensor;
s3, estimating the state value of the activated sludge process sewage treatment system by using the first sewage dissolved oxygen concentration sensor and the second sewage dissolved oxygen concentration sensor respectively; the state values include a state mean and a covariance;
s4, establishing a probability density function by using the state space equation of the dissolved oxygen concentration of the sewage and the observation equation of the first dissolved oxygen concentration sensor of the sewage, predicting the probability density function of the observation value distribution of the first dissolved oxygen concentration sensor of the sewage by using the second dissolved oxygen concentration sensor of the sewage, and estimating the state value of the sewage treatment system by the activated sludge process;
s5, replacing the state value of the system estimated by the first sewage dissolved oxygen concentration sensor in the step S3 with the state value of the system estimated in the step S4 to obtain a sewage dissolved oxygen concentration value at each moment;
the state space equation of the dissolved oxygen concentration of the sewage is as follows:
xk=Axk-1+wk
in the formula (I), the compound is shown in the specification,
xk=[x1,k,x2,k,x3,k]T
Figure FDA0003647500630000011
wherein k is a time index; x is the number ofkIs the state value of the system: x is the number of1,kIs the mass concentration of the microorganism, x2,kIs the mass concentration of the substrate, x3,kIs the mass concentration of dissolved oxygen; a is a state transition matrix of the system; w is akIs the noise term of the system, and wkObeying a Gaussian distribution with mean value of zero, i.e. wkN (0, Q), where Q is the covariance matrix of the system noise term; u. ofHIs the maximum growth rate of the microorganism; k is a radical ofdAn endogenous hysteresis parameter; ctIs a concentration factor of the secondary sedimentation tank; qwIs the flux of the soil; qinIs the inflow; v is the volume of the reactor; f is a factor linking the organic matter to the oxygen demand; f. ofxIs a water pump factor; y isNHIs the observed growth coefficient; delta is the impulse coefficient set for dissolved oxygen;
the observation equation of the first sewage dissolved oxygen concentration sensor is as follows:
yk=Cxn,k+vk
in the formula (I), the compound is shown in the specification,
C=[0,0,1]
wherein, ykIs the observed value of the dissolved oxygen in the sewage measured by the first dissolved oxygen concentration sensor, C is the observation of the systemMatrix, xn,kIs the state value, v, of the system observed by the first sewage dissolved oxygen concentration sensorkIs a noise term of the observed value, and vkSubject to a Gaussian distribution with mean value of zero, i.e. vkN (0, R), where R is the covariance matrix of the observed noise term;
the observation equation of the second sewage dissolved oxygen concentration sensor is as follows:
ys,k=δk(Hxs,i+vs,i)
in the formula (I), the compound is shown in the specification,
H=[0,0,1]
wherein, ys,kIs the observed value of the second sewage dissolved oxygen concentration sensor, H is the observation matrix of the system, xs,iFor the state values of the system observed by the second sewage dissolved oxygen concentration sensor, the subscript s is used to distinguish from the first sewage dissolved oxygen concentration sensor, vs,iIs a noise term of the observed value, and vs,iSubject to a Gaussian distribution with a mean value of zero, i.e. vs,i~N(0,Rs) Wherein R issIs a covariance matrix of observed noise terms; the sampling rate of the first sewage dissolved oxygen concentration sensor is alpha times of that of the second sewage dissolved oxygen concentration sensor, and the second sewage dissolved oxygen concentration sensor can be obtained after sampling at beta sampling moments, deltakWhere 0,1 is a decision function, at time k, if (k- β) \ α is 0, δ isk1 and the second sewage dissolved oxygen concentration sensor observes the system state value at the time i, whereas if (k- β \ α ≠ 0, δkAnd the second sewage dissolved oxygen concentration sensor can not observe a system state value, wherein i is k-beta, and the remainder is obtained after division.
2. The method for estimating a dissolved oxygen concentration in wastewater according to claim 1, wherein the state value of the system is estimated using the first wastewater dissolved oxygen concentration sensor as follows:
the state mean value and the covariance estimated by the first sewage dissolved oxygen concentration sensor at the k-1 moment are respectively assumed to be
Figure FDA0003647500630000021
Pn,k-1Then, time k:
Figure FDA0003647500630000031
Figure FDA0003647500630000032
wherein the content of the first and second substances,
Figure FDA0003647500630000033
is the average of the predicted states and is,
Figure FDA0003647500630000034
is a predicted state covariance matrix, T is the transpose of the matrix;
assuming that the observed value of the first sewage dissolved oxygen concentration sensor is not delayed, the observed value y at the time kkThe state means and covariance used to update the predictions are the following equations:
Figure FDA0003647500630000035
Figure FDA0003647500630000036
Figure FDA0003647500630000037
wherein K is an intermediate variable, also called Kalman gain,
Figure FDA0003647500630000038
and Pn,kIs the state after update is allValue and covariance matrix, I is the identity matrix.
3. The method for estimating a dissolved oxygen concentration in wastewater according to claim 1, wherein the estimation of the state value of the system using the second wastewater dissolved oxygen concentration sensor is as follows:
the state mean value and covariance estimated by the second sewage dissolved oxygen concentration sensor at the moment i-alpha are assumed to be
Figure FDA0003647500630000039
And Ps,i-αAnd then i time:
Figure FDA00036475006300000310
Figure FDA00036475006300000311
updating the predicted state mean value and covariance by using the observed value of the second sewage dissolved oxygen concentration sensor at the moment k, and obtaining the result
Figure FDA00036475006300000312
Figure FDA00036475006300000313
Figure FDA00036475006300000314
Wherein, KsIs an intermediate variable, also known as kalman gain,
Figure FDA00036475006300000315
and Ps,iThen isThe state mean and covariance matrix after the update.
4. A computer-readable storage medium characterized in that the storage medium includes a stored program, wherein the program executes the method for estimating a dissolved oxygen concentration of wastewater according to any one of claims 1 to 3.
5. An electronic device, comprising: one or more processors, memory, and one or more programs stored in the memory and configured for execution by the one or more processors, the one or more programs comprising instructions for performing the method of estimating dissolved oxygen concentration in wastewater of any of claims 1 to 3.
6. The system for estimating the dissolved oxygen concentration in sewage is characterized by comprising:
the system comprises a dissolved oxygen concentration state space equation establishing module, a control module and a control module, wherein the dissolved oxygen concentration state space equation establishing module is used for establishing a sewage dissolved oxygen concentration state space equation according to a treatment mechanism of an activated sludge process sewage treatment system;
the system comprises an observation equation establishing module, a first monitoring module, a second monitoring module and a second monitoring module, wherein the observation equation establishing module is used for respectively establishing an observation equation of a first sewage dissolved oxygen concentration sensor and an observation equation of a second sewage dissolved oxygen concentration sensor according to a sewage dissolved oxygen concentration state space equation; the sampling rate of the first sewage dissolved oxygen concentration sensor is greater than that of a second sewage dissolved oxygen concentration sensor, and the sampling precision of the second sewage dissolved oxygen concentration sensor is greater than that of the first sewage dissolved oxygen concentration sensor;
the state value estimation module is used for estimating the state value of the activated sludge process sewage treatment system by using the first sewage dissolved oxygen concentration sensor and the second sewage dissolved oxygen concentration sensor respectively; the state values include a state mean and a covariance;
the probability density function prediction module is used for establishing a probability density function by utilizing the state space equation of the dissolved oxygen concentration of the sewage and the observation equation of the first dissolved oxygen concentration sensor of the sewage, predicting the probability density function of the observation value distribution of the first dissolved oxygen concentration sensor of the sewage by utilizing the second dissolved oxygen concentration sensor of the sewage and estimating the state value of the sewage treatment system by the activated sludge process;
the sewage dissolved oxygen concentration value acquisition module is used for replacing the state value of the system estimated by the first sewage dissolved oxygen concentration sensor with the state value of the system estimated by the probability density function prediction module to obtain a sewage dissolved oxygen concentration value at each moment;
the state space equation of the dissolved oxygen concentration of the sewage is as follows:
xk=Axk-1+wk
in the formula (I), the compound is shown in the specification,
xk=[x1,k,x2,k,x3,k]T
Figure FDA0003647500630000051
wherein k is a time index; x is a radical of a fluorine atomkIs the state value of the system: x is a radical of a fluorine atom1,kIs the mass concentration of the microorganism, x2,kIs the mass concentration of the substrate, x3,kIs the mass concentration of dissolved oxygen; a is a state transition matrix of the system; w is akIs the noise term of the system, and wkSubject to a Gaussian distribution with mean value of zero, i.e. wkN (0, Q), where Q is the covariance matrix of the system noise term; u. ofHIs the maximum growth rate of the microorganism; k is a radical of formuladAn endogenous hysteresis parameter; ctIs a concentration factor of the secondary sedimentation tank; qwThe flow rate of the pollutants; qinIs the inflow; v is the volume of the reactor; f is a factor linking the organic matter to the oxygen demand; f. ofxIs a water pump factor; y isNHIs the observed growth factor; delta is the impulse coefficient set for dissolved oxygen;
the observation equation of the first sewage dissolved oxygen concentration sensor is as follows:
yk=Cxn,k+vk
in the formula (I), the compound is shown in the specification,
C=[0,0,1]
wherein, ykIs the observed value of the dissolved oxygen in the sewage measured by the first dissolved oxygen concentration sensor, C is the observation matrix of the system, xn,kIs the state value, v, of the system observed by the first sewage dissolved oxygen concentration sensorkIs a noise term of the observed value, and vkSubject to a Gaussian distribution with mean value of zero, i.e. vkN (0, R), where R is the covariance matrix of the observed noise term;
the observation equation of the second sewage dissolved oxygen concentration sensor is as follows:
ys,k=δk(Hxs,i+vs,i)
in the formula (I), the compound is shown in the specification,
H=[0,0,1]
wherein, ys,kIs the observed value of the second sewage dissolved oxygen concentration sensor, H is the system's observation matrix, xs,iFor the state values of the system observed by the second sewage dissolved oxygen sensor, the subscript s is used to distinguish from the first sewage dissolved oxygen sensor, vs,iIs a noise term of the observed value, and vs,iSubject to a Gaussian distribution with mean value of zero, i.e. vs,i~N(0,Rs) Wherein R issIs a covariance matrix of observed noise terms; the sampling rate of the first sewage dissolved oxygen concentration sensor is alpha times of that of the second sewage dissolved oxygen concentration sensor, and the second sewage dissolved oxygen concentration sensor can be obtained after beta sampling moments are carried out, wherein delta isk0,1 is a decision function, and at time k, if (k- β) \ α is 0, δ isk1 and the second sewage dissolved oxygen concentration sensor observes the system state value at the time i, whereas if (k-beta \ alpha ≠ 0), deltakAnd the second sewage dissolved oxygen concentration sensor can not observe the system state value, wherein i is k-beta, and the remainder is obtained after the division.
CN202111263423.9A 2021-10-28 2021-10-28 Method for estimating dissolved oxygen concentration in sewage, storage medium, electronic device, and system Active CN113918873B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111263423.9A CN113918873B (en) 2021-10-28 2021-10-28 Method for estimating dissolved oxygen concentration in sewage, storage medium, electronic device, and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111263423.9A CN113918873B (en) 2021-10-28 2021-10-28 Method for estimating dissolved oxygen concentration in sewage, storage medium, electronic device, and system

Publications (2)

Publication Number Publication Date
CN113918873A CN113918873A (en) 2022-01-11
CN113918873B true CN113918873B (en) 2022-07-15

Family

ID=79243344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111263423.9A Active CN113918873B (en) 2021-10-28 2021-10-28 Method for estimating dissolved oxygen concentration in sewage, storage medium, electronic device, and system

Country Status (1)

Country Link
CN (1) CN113918873B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115331415B (en) * 2022-10-14 2023-01-13 河北省科学院应用数学研究所 Oxygen concentration early warning method and device, electronic equipment and readable storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104345636A (en) * 2013-08-05 2015-02-11 江南大学 Dissolved-oxygen control method based on improved differential algorithm
CN103969412B (en) * 2014-04-13 2015-11-11 北京工业大学 A kind of dissolved oxygen concentration flexible measurement method based on group decision reasoning by cases
CN104155928A (en) * 2014-06-24 2014-11-19 北京沃洋洲环保装备有限公司 Operation control method for sewage treatment
CN104865979A (en) * 2015-03-02 2015-08-26 华南理工大学 Wastewater treatment process adaptive generalized predictive control method and system
FR3064774B1 (en) * 2017-03-29 2020-03-13 Elichens METHOD FOR ESTABLISHING A MAP OF THE CONCENTRATION OF AN ANALYTE IN AN ENVIRONMENT
CN108536106B (en) * 2018-04-25 2021-07-30 重庆工商大学 Aeration system dissolved oxygen online regulation and control method based on Kalman filtering-extreme learning machine
JP7024675B2 (en) * 2018-09-18 2022-02-24 株式会社デンソーウェーブ Moisture content estimation method, estimation device

Also Published As

Publication number Publication date
CN113918873A (en) 2022-01-11

Similar Documents

Publication Publication Date Title
US10570024B2 (en) Method for effluent total nitrogen-based on a recurrent self-organizing RBF neural network
Kiss et al. Observers design for uncertain Takagi–Sugeno systems with unmeasurable premise variables and unknown inputs. Application to a wastewater treatment plant
US20160123949A1 (en) Measuring Phosphorus in Wastewater Using a Self-Organizing RBF Neural Network
CN106698642A (en) Multi-objective real-time optimization control method for sewage treatment process
US10539546B2 (en) Measuring phosphorus in wastewater using a self-organizing RBF neural network
Zhang et al. Optimizing municipal wastewater treatment plants using an improved multi-objective optimization method
CN113918873B (en) Method for estimating dissolved oxygen concentration in sewage, storage medium, electronic device, and system
Hansen et al. Modeling phosphorous dynamics in a wastewater treatment process using Bayesian optimized LSTM
Chandran et al. Optimizing experimental design to estimate ammonia and nitrite oxidation biokinetic parameters from batch respirograms
Vargas et al. Observer-based time-optimal control of an aerobic SBR for chemical and petrochemical wastewater treatment
Zhong et al. Water quality prediction of MBR based on machine learning: A novel dataset contribution analysis method
CN116679026A (en) Self-adaptive unbiased finite impulse response filtering sewage dissolved oxygen concentration estimation method
CN112381221A (en) Multi-output soft measurement method for sewage monitoring based on semi-supervised learning
CN111399558B (en) Knowledge selection-based multi-objective optimization control method for sewage treatment process
Julien et al. Theoretical and practical identifiability of a reduced order model in an activated sludge process doing nitrification and denitrification
Iratni et al. On-line robust nonlinear state estimators for nonlinear bioprocess systems
Qiao et al. Recurrent neural network-based control for wastewater treatment process
Cadet Simplifications of Activated Sludge Model with preservation of its dynamic accuracy
Zeng et al. State estimation of wastewater treatment processes using distributed extended Kalman filters
Alikhani et al. Inverse Modeling of Nitrification-Denitrification Processes: A Case Study on the Blue Plains Wastewater Treatment Plant in Washington, DC.
Stîngă et al. Estimation based control strategies for an aerobic bioprocess
Zhao et al. Nonlinear optimal control of an alternating activated sludge process in a pilot plant
Khoja et al. Unknown-input observer for disturbance and state estimation of an activated sludge waste water treatment process
Iratni et al. Non-linear state dependent differential Riccati states filter for wastewater treatment process
Hodasz et al. Modeling and parameter estimation for an activated sludge wastewater treatment process

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant