CN115541837A - Effluent total nitrogen intelligent detection method based on dynamic fuzzy neural network - Google Patents
Effluent total nitrogen intelligent detection method based on dynamic fuzzy neural network Download PDFInfo
- Publication number
- CN115541837A CN115541837A CN202211125035.9A CN202211125035A CN115541837A CN 115541837 A CN115541837 A CN 115541837A CN 202211125035 A CN202211125035 A CN 202211125035A CN 115541837 A CN115541837 A CN 115541837A
- Authority
- CN
- China
- Prior art keywords
- output
- total nitrogen
- effluent
- neural network
- network
- 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.)
- Pending
Links
- IJGRMHOSHXDMSA-UHFFFAOYSA-N Atomic nitrogen Chemical compound N#N IJGRMHOSHXDMSA-UHFFFAOYSA-N 0.000 title claims abstract description 128
- 229910052757 nitrogen Inorganic materials 0.000 title claims abstract description 64
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 55
- 238000001514 detection method Methods 0.000 title claims abstract description 50
- 239000010865 sewage Substances 0.000 claims abstract description 17
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 12
- 238000004088 simulation Methods 0.000 claims abstract description 8
- 230000007246 mechanism Effects 0.000 claims abstract description 6
- 210000002569 neuron Anatomy 0.000 claims description 54
- 239000013598 vector Substances 0.000 claims description 34
- 230000004913 activation Effects 0.000 claims description 32
- 239000000126 substance Substances 0.000 claims description 24
- 238000000034 method Methods 0.000 claims description 20
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 18
- 239000011159 matrix material Substances 0.000 claims description 14
- QVGXLLKOCUKJST-UHFFFAOYSA-N atomic oxygen Chemical compound [O] QVGXLLKOCUKJST-UHFFFAOYSA-N 0.000 claims description 12
- 239000001301 oxygen Substances 0.000 claims description 12
- 229910052760 oxygen Inorganic materials 0.000 claims description 12
- 239000007787 solid Substances 0.000 claims description 9
- 238000012360 testing method Methods 0.000 claims description 9
- 230000008569 process Effects 0.000 claims description 7
- 238000013138 pruning Methods 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000012217 deletion Methods 0.000 claims description 4
- 230000037430 deletion Effects 0.000 claims description 4
- 238000012549 training Methods 0.000 claims description 4
- 238000010276 construction Methods 0.000 claims description 3
- 230000006870 function Effects 0.000 claims description 3
- 239000007788 liquid Substances 0.000 claims description 3
- 239000011259 mixed solution Substances 0.000 claims description 3
- 238000010187 selection method Methods 0.000 claims description 3
- 230000005484 gravity Effects 0.000 claims 1
- 238000005259 measurement Methods 0.000 abstract description 6
- 238000004458 analytical method Methods 0.000 abstract description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007418 data mining Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012851 eutrophication Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000000691 measurement method Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 235000015097 nutrients Nutrition 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N33/00—Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
- G01N33/18—Water
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- Computational Linguistics (AREA)
- Molecular Biology (AREA)
- Biophysics (AREA)
- General Engineering & Computer Science (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Chemical & Material Sciences (AREA)
- Food Science & Technology (AREA)
- Medicinal Chemistry (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Feedback Control In General (AREA)
Abstract
An intelligent detection method for total nitrogen in effluent based on a dynamic fuzzy neural network belongs to the field of urban sewage treatment and the field of intelligent modeling. The invention establishes the intelligent detection model of the total nitrogen of the effluent based on the dynamic fuzzy neural network, thereby realizing the real-time accurate detection of the total nitrogen of the effluent. Firstly, combining expert knowledge and mutual information analysis to determine input variables of the effluent total nitrogen intelligent detection model. Then, a self-organizing add-delete mechanism and an improved second-order learning algorithm are combined, a dynamic fuzzy neural network is designed, and an intelligent detection model for total nitrogen of the effluent of the urban sewage treatment is established; and the dynamic fuzzy neural network can be updated in real time according to the online data, so that the accurate measurement of the total nitrogen of the effluent in the non-stable environment is ensured. The effectiveness of the effluent total nitrogen intelligent detection method based on the dynamic fuzzy neural network is evaluated through data on a sewage treatment reference simulation model platform. The invention solves the problem that the total nitrogen of the effluent of the urban sewage treatment is difficult to accurately detect in real time.
Description
Technical Field
The invention relates to an intelligent detection method for total nitrogen in effluent of urban sewage treatment; an effluent total nitrogen intelligent detection model based on a dynamic fuzzy neural network is established, and thus the real-time accurate detection of the effluent total nitrogen is realized. Not only belongs to the field of urban sewage treatment, but also belongs to the field of intelligent modeling.
Background
Along with the continuous acceleration of the urbanization process and the continuous increase of population in China, the urban water consumption is greatly increased, and the sewage discharge amount is also sharply increased. In order to fully recycle water resources and protect the ecological environment, sewage treatment has become a hot topic in academia and industry in recent years. Nitrogen is a main nutrient substance causing water eutrophication, and the real-time accurate detection of the total nitrogen in the effluent is very important for improving the denitrification efficiency of a sewage treatment plant and ensuring the normal and stable operation of the sewage treatment plant. However, it is still difficult to obtain reliable measurements of total nitrogen in the effluent due to the environment of the test, the cost of instrumentation, and the like.
With the rapid development of methods and technologies such as data mining and artificial intelligence, a data-driven soft measurement method has become a research hotspot in the field of real-time detection of key parameters of urban sewage treatment, wherein an artificial neural network becomes a mainstream method for establishing a data-driven model by virtue of strong self-learning capability and nonlinear approximation capability of the artificial neural network. The invention provides an effluent total nitrogen intelligent detection method based on a dynamic fuzzy neural network. On one hand, a fuzzy neural network is constructed by combining a self-organizing add-delete mechanism and a rapid second-order gradient algorithm so as to rapidly obtain an intelligent detection model with a simplified structure. On the other hand, a fuzzy neural network updating strategy is designed, and the model is ensured to have good performance in a non-stationary environment. The method can realize real-time and accurate detection of the total nitrogen of the effluent, effectively improves the measurement precision of the total nitrogen of the effluent in a non-stable environment, and has important theoretical significance and application value.
Disclosure of Invention
The invention aims to provide an intelligent detection method for total nitrogen in effluent of urban sewage treatment based on a dynamic fuzzy neural network.
The invention adopts the following technical scheme and implementation steps:
(1) Determining input variables and output variables of an effluent total nitrogen intelligent detection model: according to data on a sewage treatment reference simulation model platform, determining the input of an effluent total nitrogen intelligent detection model by adopting an auxiliary variable selection method based on mutual information, wherein the method comprises the following steps: the mixed liquid suspended solid, the effluent solid suspended matter, the effluent chemical oxygen demand, the inlet total nitrogen, the inlet chemical oxygen demand and the inlet water flow, and the output variable of the model is the outlet total nitrogen detection value;
(2) Constructing an effluent total nitrogen intelligent detection model;
the method comprises the following steps of establishing an effluent total nitrogen intelligent detection model by utilizing a dynamic fuzzy neural network, wherein the dynamic fuzzy neural network structure comprises the following steps: the system comprises an input layer, an RBF layer, a regularization layer and an output layer; at the initial moment, the structure of the neural network is 6-0-0-1, the input layer has 6 neurons, and the input vector of the network is x = (x) 1 ,x 2 ,...,x 6 ) T ,x 1 ,x 2 ,x 3 ,x 4 ,x 5 ,x 6 Respectively is mixed solution suspended solid, water outlet chemical oxygen demand, water inlet total nitrogen, water inlet chemical oxygen demand and water inlet flow; the RBF layer and the regularization layer have no neurons; the output layer is provided with 1 neuron, and the output value is the detection value of the total nitrogen of the effluent; defining the output of the dynamic fuzzy neural network as y, and calculating as follows:
(1) an input layer: this layer consists of 6 neurons, the output of each neuron being:
u i =x i ,i=1,2,...,6 (1)
wherein u is i Is the output of the ith input layer neuron at time k;
(2) RBF layer: this layer consists of K neurons, the output of each neuron being:
wherein the content of the first and second substances,representing the corresponding output of the jth RBF layer neuron, c ij And σ ij Are respectively provided withThe center and width of the Gaussian membership function;
(3) and (3) a regularization layer: this layer consists of K neurons, the output of each neuron being:
wherein h is j Representing the output of the jth neuron of the layer;
(4) an output layer: the output of the output layer is:
wherein, w j The connection weight value from the jth regularization layer neuron to the output layer neuron;
(3) A dynamic fuzzy neural network is constructed based on a self-organizing add-delete mechanism and a second-order gradient algorithm, and the method specifically comprises the following steps:
(1) at the initial moment, no rule is contained in the network;
(2) the sample with the largest absolute expected output value is found, a first rule is added according to the sample,
at the initial moment, the number of rules is 0, first the sample p with the largest absolute expected output is found 1 :
p 1 =argmax[||y d1 ||,||y d2 ||,...,||y dp ||,...||y dP ||] (5)
Wherein, y dp Desired output for the p-th sample, y p For the actual output of the P-th sample by the dynamic fuzzy neural network, P is the number of training samples, and accordingly, the initial parameters of the first rule are respectively set as follows:
σ 1 =d 1 (7)
wherein x is p1 ,y dp1 Is the p th 1 Input and output of individual samples, d 1 =[d 1 ,...,d 1 ]∈i M Is the value of an element d 1 Vectors that are all 1;
(3) and adjusting the current network parameters by adopting a second-order gradient algorithm, wherein the calculation formula is as follows:
ψ t+1 =ψ t -(Q t +μI) -1 g t (9)
wherein psi is a parameter vector including all network parameters (i.e. center, width, weight) to be adjusted, Q is a hessian-like matrix, μ is a learning rate, I is an identity matrix, and g is a gradient vector. To improve computational efficiency, the computation of the hessian-like matrix may be converted to a summation of the P hessian-like sub-matrices. Similarly, the computation of the gradient vector g may be converted to a summation of the P gradient sub-vectors, as shown in the following equation:
wherein the Hessian-like submatrix and the gradient subvector can be calculated by:
wherein the Jacobian vector j p Is calculated as follows:
wherein K is the number of rules, M is the dimension of the input vector, and the elements in the Jacobian vector in the above formula can be calculated by the following formula by using the differential chain rule:
(4) calculating the current error vector of the network, finding out the sample where the error peak point is located, adding a new rule at the sample, then adjusting the network parameters according to the formulas (9) - (17),
at time k, the error vector is calculated as follows:
e(k)=[e 1 (k),e 2 (k)...,e p (k),...,e P (k)] (18)
wherein e is p (k) Error for the p sample at time k:
e p (k)=y dp -y p (k) (19)
wherein, y dp And y p (k) Respectively obtaining the expected output of the p-th sample and the actual output at the k moment; searching a sample position p where a current error peak point is located k :
p k =argmax||e(k)|| (20)
Based on the sample, a rule is added, and the initial parameters of the added rule are respectively set as follows:
σ k =d k (22)
wherein x is pk ,y dpk Are respectively the p-th k Input and output of individual samples, d k =[d k ,...,d k ]∈ M Is a value of an elementThe vector of (a) is determined,and the minimum Euclidean distance between the current newly-added RBF layer neuron and the existing RBF layer neuron is represented. And (4) adjusting the network parameters according to the step (3) after the new rule is increased.
(5) In the rule growth process, the network learning precision is measured by Root Mean Square Error (RMSE):
if the number of the rules reaches K max Or the network learning precision reaches E d Storing the current mean square error RMSE1 and entering the step (6), otherwise continuing the regular growth according to the step (4).
(6) Calculating the activation intensity of all rules in the network, deleting the rule with the minimum activation intensity (corresponding RBF layer neuron and regularization layer neuron), adjusting the network parameters according to the step (3), calculating the learning precision RMSE2 of the pruned network,
the activation strength of the jth rule in the network is defined as follows:
wherein the content of the first and second substances,an ith dimension input representing a p sample;
(7) comparing the learning accuracy RMSE1 and RMSE2 of the network before and after the deletion of the rule, and if the current RMSE2 is less than or equal to the RMSE1, turning to the step (4) to continue the pruning process; otherwise, the structure before regular pruning is recovered, and the construction of the dynamic fuzzy neural network structure is completed.
(4) Taking a test sample as the input of the trained dynamic fuzzy neural network, and updating the fuzzy neural network by adopting a grading updating strategy, wherein the output of the network is the measured value of the total nitrogen concentration of the effluent, and the method specifically comprises the following steps:
(1) for the online samples at time t { x (t), y d (t), updating the data within the sliding window and calculating the current accumulated error:
wherein, E t For the accumulated error calculated at time t, λ is the forgetting factor, e i (t) is the error of the ith online sample at the time t, lambda epsilon (0, 1) is a forgetting factor, and lambda =0.5 is taken in order to balance the proportion of the new sample and the historical sample in the accumulated error;
(2) according to the current accumulated error E t Calculating an activation intensity threshold:
wherein eta max Setting eta for maximum value of activation intensity according to current actual value of activation intensity max =0.3;
(3) Calculating the activation intensity of all rules in the current network, if the activation intensity of all the rules is greater than eta t Updating the rule back-part parameters with the activation strength larger than the threshold value by adopting the following recursive least square algorithm, and turning to the step (5):
w * (t)=w * (t-1)+h(t)P(t-1)(y d (t)-y(t)) (29)
wherein the content of the first and second substances,K * h (t) is a regularization layer output matrix, P is a covariance matrix, P (0) = α I, α =10, for the number of rules for which the activation strength is greater than the threshold value 5 ;
(4) If all the rule activation strengths are smaller than the threshold, updating all the rule front and back piece parameters in the network according to the formulas (9) - (17), and firstly, calculating the model differences corresponding to all the samples in the sliding window at the time t:
wherein the content of the first and second substances,representing the model at the time t-1,representing the updated model based on the samples at time t. When the whole updating is needed each time, the model updating differences corresponding to all samples in the window are calculated, and the sample with the maximum difference is foundBased onUpdating all the parameters of the front and back pieces of the rule according to the formulas (9) - (17);
(5) and (4) continuously updating the model according to the steps (1) to (4), and calculating to obtain the output of the dynamic fuzzy neural network, namely the detection value of the total nitrogen concentration of the effluent after the model is updated based on all online data.
Compared with the prior art, the invention has the following obvious advantages and beneficial effects:
1. aiming at the problems existing in the current urban sewage treatment effluent total nitrogen measurement, the invention adopts a self-organizing addition and deletion mechanism and a second-order learning algorithm to construct a dynamic fuzzy neural network according to the characteristic that the fuzzy neural network has good learning ability and reasoning ability, establishes an effluent total nitrogen intelligent detection model with a simplified structure, and realizes the high-precision real-time measurement of the effluent total nitrogen.
2. The dynamic fuzzy neural network adopted by the method for establishing the intelligent detection model can be updated in a self-adaptive manner according to the change of the current environment, so that the self-adaptability of the model is improved, and the intelligent detection model for the total nitrogen of the effluent has higher measurement precision all the time in a non-stable environment.
Drawings
FIG. 1 is a dynamic fuzzy neural network topology of the present invention;
FIG. 2 is a flow chart of the method of the present invention;
FIG. 3 is a graph of the dynamic fuzzy neural network test results of the present invention;
FIG. 4 is a graph of the dynamic fuzzy neural network test error of the present invention;
Detailed Description
According to the invention, by utilizing data on a sewage treatment reference simulation model platform, 6 variables with large correlation with total effluent nitrogen are selected as the input of an intelligent detection model through mutual information analysis, and the total effluent nitrogen is output as the model. All variables in the data before the experiment need to be normalized, and simultaneously, the network output result is subjected to inverse normalization. 672 groups of simulation data are selected as a training data set and used for establishing an intelligent detection model of the total nitrogen of the effluent, and the rest 672 groups of simulation data are selected as a test data set and used for updating the model and evaluating the model, and simulation is carried out under the environment of Microsoft Windows 11 and MATLAB 2020 b.
(1) Determining input variables and output variables of an effluent total nitrogen intelligent detection model: according to data on a sewage treatment reference simulation model platform, determining the input of an effluent total nitrogen intelligent detection model by adopting an auxiliary variable selection method based on mutual information, wherein the method comprises the following steps: the mixed liquid suspended solid, the effluent solid suspended matter, the effluent chemical oxygen demand, the inlet total nitrogen, the inlet chemical oxygen demand and the inlet water flow, and the output variable of the model is the outlet total nitrogen detection value;
(2) Constructing an effluent total nitrogen intelligent detection model;
the method comprises the following steps of establishing an effluent total nitrogen intelligent detection model by utilizing a dynamic fuzzy neural network, wherein the dynamic fuzzy neural network structure comprises the following steps: the system comprises an input layer, an RBF layer, a regularization layer and an output layer; at the initial moment, the structure of the neural network is 6-0-0-1, the input layer has 6 neurons, and the input vector of the network is x = (x is the number of the neurons in the input layer 1 ,x 2 ,...,x 6 ) T ,x 1 ,x 2 ,x 3 ,x 4 ,x 5 ,x 6 Respectively is mixed solution suspended solid, water outlet chemical oxygen demand, water inlet total nitrogen, water inlet chemical oxygen demand and water inlet flow; the RBF layer and the regularization layer have no neurons; the output layer is provided with 1 neuron, and the output value is the detection value of the total nitrogen of the effluent; defining the output of the dynamic fuzzy neural network as y, and calculating as follows:
(1) an input layer: this layer consists of 6 neurons, the output of each neuron being:
u i =x i ,i=1,2,...,6 (32)
wherein u is i Is the output of the ith input layer neuron at time k;
(2) RBF layer: this layer consists of K neurons, the output of each neuron being:
wherein, the first and the second end of the pipe are connected with each other,corresponding output representing the jth RBF layer neuron, c ij And σ ij Respectively the center and the width of the Gaussian membership function;
(3) a regularization layer: this layer consists of K neurons, the output of each neuron being:
wherein h is j Representing the output of the jth neuron of the layer;
(4) an output layer: the output of the output layer is:
wherein, w j The connection weight value from the jth regularization layer neuron to the output layer neuron;
(3) A dynamic fuzzy neural network is constructed based on a self-organizing add-delete mechanism and a second-order gradient algorithm, and the method specifically comprises the following steps:
(1) at the initial moment, no rule is contained in the network;
(2) the sample with the largest absolute expected output value is found, a first rule is added according to the sample,
at the initial moment, the number of rules is 0, first the sample p with the largest absolute expected output is found 1 :
p 1 =argmax[||y d1 ||,||y d2 ||,...,||y dp ||,...||y dP ||] (36)
Wherein, y dp Desired output for the p-th sample, y p For the actual output of the P-th sample by the dynamic fuzzy neural network, P is the number of training samples, and accordingly, the initial parameters of the first rule are respectively set as follows:
σ 1 =d 1 (38)
wherein x is p1 ,y dp1 Is the p th 1 Input and output of individual samples, d 1 =[d 1 ,...,d 1 ]∈ M Is an element value d 1 Vectors that are all 1;
(3) and adjusting the current network parameters by adopting a second-order gradient algorithm, wherein the calculation formula is as follows:
ψ t+1 =ψ t -(Q t +μI) -1 g t (40)
wherein psi is a parameter vector including all network parameters (i.e. center, width, weight) to be adjusted, Q is a hessian-like matrix, μ is a learning rate, I is an identity matrix, and g is a gradient vector. To improve the computational efficiency, the computation of the hessian-like matrices can be converted into a summation of the P hessian-like submatrices. Similarly, the computation of the gradient vector g may be translated into a summation of the P gradient subvectors as shown in the following equation:
wherein the Hessian-like submatrix and the gradient subvector can be calculated by:
wherein the Jacobian vector j p Is calculated as follows:
wherein K is the number of rules, M is the dimension of the input vector, and the elements in the Jacobian vector in the above formula can be calculated by the following formula by using the differential chain rule:
(4) calculating the current error vector of the network, finding out the sample where the error peak point is located, adding a new rule at the sample, then adjusting the network parameters according to the formulas (40) - (48),
at time k, the error vector is calculated as follows:
e(k)=[e 1 (k),e 2 (k)...,e p (k),...,e P (k)] (49)
wherein e is p (k) Error for the p sample at time k:
e p (k)=y dp -y p (k) (50)
wherein, y dp And y p (k) Respectively obtaining the expected output of the p-th sample and the actual output at the k moment; searching the sample position p where the current error peak point is located k :
p k =arg max||e(k)|| (51)
Based on the sample, a rule is added, and the initial parameters of the added rule are respectively set as follows:
σ k =d k (53)
wherein, the first and the second end of the pipe are connected with each other,are respectively the p-th k Input and output of samples, d k =[d k ,...,d k ]∈ M Is a value of an elementThe vector of (a) is calculated,and the minimum Euclidean distance between the current newly-added RBF layer neuron and the existing RBF layer neuron is represented. And (4) adjusting the network parameters according to the step (3) after the new rule is increased.
(5) In the rule growth process, the network learning precision is measured by Root Mean Square Error (RMSE):
if the number of rules reaches K max Or the network learning precision reaches E d Storing the current mean square error RMSE1 and entering the step (6), otherwise continuing the regular growth according to the step (4).
(6) Calculating the activation intensity of all the rules in the network, deleting the rule with the minimum activation intensity (corresponding RBF layer neuron and regularization layer neuron), adjusting the network parameters according to the step (3), calculating the learning precision RMSE2 of the pruned network,
the activation strength of the jth rule in the network is defined as follows:
wherein the content of the first and second substances,an ith dimension input representing a p sample;
(7) comparing the learning precision RMSE1 and RMSE2 of the network before and after the deletion of the rule, and if the current RMSE2 is less than or equal to RMSE1, turning to the step (4) to continue the pruning process; otherwise, the structure before regular pruning is recovered, and the construction of the dynamic fuzzy neural network structure is completed.
(4) Taking a test sample as the input of the trained dynamic fuzzy neural network, and updating the fuzzy neural network by adopting a graded updating strategy, wherein the output of the network is the detection value of the total nitrogen concentration of the effluent, and the method specifically comprises the following steps:
(1) for the online samples at time t { x (t), y d (t), updating the data within the sliding window and calculating the current accumulated error:
wherein E is t For the accumulated error calculated at time t, λ is the forgetting factor, e i (t) is the error of the ith online sample at the time t, lambda epsilon (0, 1) is a forgetting factor, and lambda =0.5 is taken in order to balance the proportion of the new sample and the historical sample in the accumulated error;
(2) according to the current accumulated error E t Calculating an activation intensity threshold:
wherein eta is max To activateIntensity maximum value, setting eta according to current activation intensity actual value max =0.3;
(3) Calculating the activation intensity of all rules in the current network, and if the activation intensity of all rules is greater than eta t Updating the rule back-part parameters with the activation intensity larger than the threshold value by adopting the following recursive least square algorithm, and turning to the step (5):
w * (t)=w * (t-1)+h(t)P(t-1)(y d (t)-y(t)) (60)
wherein, w * (t)=[w 1 (t),...,w j* (t),...,w K* (t)],K * H (t) is a regularization layer output matrix, P is a covariance matrix, P (0) = α I, α =10, for the number of rules for which the activation strength is greater than the threshold value 5 ;
(4) If all the rule activation strengths are smaller than the threshold, updating all the rule front-and-back piece parameters in the network according to formulas (40) - (48), and firstly, calculating the model differences corresponding to all samples in a sliding window at the time t:
wherein, the first and the second end of the pipe are connected with each other,representing the model at the time t-1,representing the updated model based on the time t samples. When the whole updating is needed each time, the model updating differences corresponding to all samples in the window are calculated, and the sample with the maximum difference is foundBased onUpdating all rule front and back piece parameters according to formulas (40) - (48);
(5) continuously updating the model according to the steps (1) to (4), and calculating to obtain the output of the neural network, namely the detection result of the total nitrogen concentration of effluent after the model is updated based on all online data, wherein as shown in fig. 3, an X axis is the number of test samples, a Y axis is the measured value of the total nitrogen concentration of effluent, the unit is milligram/liter, a solid line is an actual output value, and a dotted line with a ". Multidot." identifier is a dynamic fuzzy neural network output value; the detection error of the total nitrogen concentration of the effluent is shown in fig. 4, the X axis is the number of the test samples, and the Y axis is the detection error of the total nitrogen concentration of the effluent, and the unit is milligram/liter.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the invention. It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that modifications and variations can be made without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (4)
1. An effluent total nitrogen intelligent detection method based on a dynamic fuzzy neural network is characterized by comprising the following steps:
step 1: determining an input variable and an output variable of an effluent total nitrogen intelligent detection model;
according to data on a sewage treatment benchmark simulation model platform, an auxiliary variable selection method based on mutual information is adopted to determine input variables of an effluent total nitrogen intelligent detection model, wherein the input variables are respectively as follows: the mixed liquid suspended solid, the effluent solid suspended matter, the effluent chemical oxygen demand, the inlet total nitrogen, the inlet chemical oxygen demand and the inlet water flow, and the output variable of the model is the outlet total nitrogen detection value;
step 2: constructing an effluent total nitrogen intelligent detection model;
an intelligent detection model of the total nitrogen of effluent is established by utilizing a dynamic fuzzy neural network, and the structure of the dynamic fuzzy neural network comprises the following steps: the system comprises an input layer, an RBF layer, a regularization layer and an output layer;at the initial moment, the structure of the neural network is 6-0-0-1, the input layer has 6 neurons, and the input vector of the network is x = (x) 1 ,x 2 ,...,x 6 ) T ,x 1 ,x 2 ,x 3 ,x 4 ,x 5 ,x 6 Respectively is mixed solution suspended solid, water outlet chemical oxygen demand, water inlet total nitrogen, water inlet chemical oxygen demand and water inlet flow; the RBF layer and the regularization layer have no neurons; the output layer is provided with 1 neuron, and the output value is the detection value of the total nitrogen of the effluent;
and step 3: constructing a dynamic fuzzy neural network based on a self-organizing add-delete mechanism and a second-order gradient algorithm;
and 4, step 4: and taking the test sample as the input of the trained fuzzy neural network, and updating the fuzzy neural network by adopting a grading updating strategy, wherein the output of the network is the detection result of the total nitrogen concentration of the effluent.
2. The intelligent detection method for total nitrogen in effluent based on the dynamic fuzzy neural network as claimed in claim 1, wherein the output y of the dynamic fuzzy neural network in step 2 is calculated as follows:
(1) an input layer: this layer consists of 6 neurons, each with an output of:
u i =x i ,i=1,2,...,6 (1)
wherein u is i Is the output of the ith input layer neuron at time k;
(2) RBF layer: this layer consists of K neurons, the output of each neuron being:
wherein the content of the first and second substances,representing the corresponding output of the jth RBF layer neuron, c ij And σ ij Respectively the center and the width of the Gaussian membership function;
(3) a regularization layer: this layer consists of K neurons, the output of each neuron being:
wherein h is j Represents the output of the jth neuron of the layer;
(4) an output layer: the output of the output layer is:
wherein, w j The connection weight for the jth regularization layer neuron to the output layer neuron.
3. The intelligent detection method for total nitrogen in effluent based on the dynamic fuzzy neural network as claimed in claim 1, wherein step 3 specifically comprises:
(1) at the initial moment, no rule is contained in the network;
(2) the sample with the largest absolute expected output value is found, a first rule is added according to the sample,
at the initial moment, the number of rules is 0, and first the sample p with the maximum absolute expected output is found 1 :
p 1 =arg max[||y d1 ||,||y d2 ||,...,||y dp ||,...||y dP ||] (5)
Wherein, y dp Desired output for the p-th sample, y p For the actual output of the P-th sample by the dynamical fuzzy neural network, P is the number of training samples, and accordingly, the initial parameters of the first rule are respectively set as follows:
σ 1 =d 1 (7)
wherein the content of the first and second substances,is the p th 1 Input and output of samples, d 1 =[d 1 ,...,d 1 ]∈ M Is the value of an element d 1 Vectors that are all 1;
(3) and adjusting the current network parameters by adopting a second-order gradient algorithm, and calculating as follows:
ψ t+1 =ψ t -(Q t +μI) -1 g t (9)
wherein psi is a parameter vector and comprises all network parameters needing to be adjusted, namely center, width and weight, Q is a Hessian-like matrix, mu is a learning rate, I is a unit matrix, and g is a gradient vector;
converting the calculation of the Hessian-like matrix into summation of P Hessian-like submatrices; the calculation of the gradient vector g translates into a summation of the P gradient subvectors as shown in the following equation:
wherein the Hessian-like submatrix and the gradient subvector are calculated by the following formulas:
wherein the Jacobian vector j p Is calculated as follows:
wherein K is the number of rules, M is the dimension of the input vector, and the elements in the Jacobian vector in the above formula are calculated by the following formula by using the differential chain rule:
(4) calculating the current error vector of the network, finding out the sample where the error peak point is located, adding a new rule at the sample, then adjusting the network parameters according to the formulas (9) - (17),
at time k, the error vector is calculated as follows:
e(k)=[e 1 (k),e 2 (k)...,e p (k),...,e P (k)] (18)
wherein e is p (k) Error for the p sample at time k: e.g. of the type p (k)=y dp -y p (k) (19)
Wherein, y dp And y p (k) The expected output and the actual output at the k moment of the p sample are respectively; searching the sample position p where the current error peak point is located k :
p k =arg max||e(k)|| (20)
Based on the sample, a new rule is added, and the initial parameters of the new rule are respectively set as follows:
σ k =d k (22)
wherein the content of the first and second substances,are respectively the p-th k Input and output of individual samples, d 1 =[d 1 ,...,d 1 ]∈ M Is a value of an elementThe vector of (a) is determined,representing the minimum Euclidean distance between the current newly-added RBF layer neuron and the existing RBF layer neuron; after the new rule is increased, adjusting the network parameters according to the step (3);
(5) in the rule growth process, the network learning precision is measured by Root Mean Square Error (RMSE):
if the number of the rules reaches K max Or the network learning precision reaches E d If yes, storing the current mean square error RMSE1, and entering the step (6), otherwise, continuing to increase the rule according to the step (4);
(6) calculating the activation intensity of all the rules in the network, deleting the rule with the minimum activation intensity (corresponding RBF layer neuron and regularization layer neuron), adjusting the network parameters according to the step (3), calculating the learning precision RMSE2 of the pruned network,
the activation strength of the jth rule in the network is defined as follows:
wherein the content of the first and second substances,an ith dimension input representing a p sample;
(7) comparing the learning precision RMSE1 and RMSE2 of the network before and after the deletion of the rule, and if the current RMSE2 is less than or equal to RMSE1, turning to the step (4) to continue the pruning process; otherwise, the structure before regular pruning is recovered, and the construction of the dynamic fuzzy neural network structure is completed.
4. The intelligent detection method for total nitrogen in effluent based on the dynamic fuzzy neural network as claimed in claim 1, wherein the step 4 is specifically as follows:
(1) for the online samples at time t { x (t), y d (t), updating the data within the sliding window and calculating the current accumulated error:
wherein E is t For the accumulated error calculated at time t, λ is the forgetting factor, e i (t) is the error of the ith online sample at the time t, λ e (0, 1) is a forgetting factor, and λ =0.5 in order to balance the specific gravity of the new sample and the historical sample in the accumulated error;
(2) according to the current accumulated error E t Calculating an activation intensity threshold:
wherein eta is max Setting eta for maximum value of activation intensity according to current actual value of activation intensity max =0.3;
(3) Calculating the activation intensity of all rules in the current network, and if the activation intensity of all rules is greater than eta t Updating the rule back-part parameters with the activation intensity larger than the threshold value by adopting the following recursive least square algorithm and transferring to the step (5):
w * (t)=w * (t-1)+h(t)P(t-1)(y d (t)-y(t)) (29)
wherein the content of the first and second substances,K * h (t) is a regularization layer output matrix, P is a covariance matrix, P (0) = α I, α =10, for the number of rules for which the activation strength is greater than the threshold value 5 ;
(4) If all the rule activation strengths are smaller than the threshold, updating all the rule front and back piece parameters in the network according to the formulas (9) - (17), and firstly, calculating the model differences corresponding to all the samples in the sliding window at the time t:
wherein the content of the first and second substances,representing the model at the time t-1,representing the updated model based on the samples at the time t; when the whole updating is needed each time, the model updating differences corresponding to all the samples in the window are calculated, and the sample with the maximum difference is foundBased onUpdating all the parameters of the front and back pieces of the rule according to the formulas (9) - (17);
(5) and (5) continuously updating the model according to the steps (1) to (4), and calculating to obtain the output of the dynamic fuzzy neural network, namely the detection result of the total nitrogen concentration of the effluent after the model is updated based on all on-line data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211125035.9A CN115541837A (en) | 2022-09-16 | 2022-09-16 | Effluent total nitrogen intelligent detection method based on dynamic fuzzy neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211125035.9A CN115541837A (en) | 2022-09-16 | 2022-09-16 | Effluent total nitrogen intelligent detection method based on dynamic fuzzy neural network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115541837A true CN115541837A (en) | 2022-12-30 |
Family
ID=84728590
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211125035.9A Pending CN115541837A (en) | 2022-09-16 | 2022-09-16 | Effluent total nitrogen intelligent detection method based on dynamic fuzzy neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115541837A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106295800A (en) * | 2016-07-28 | 2017-01-04 | 北京工业大学 | A kind of water outlet total nitrogen TN intelligent detecting method based on recurrence Self organizing RBF Neural Network |
CN113077039A (en) * | 2021-03-22 | 2021-07-06 | 北京工业大学 | Task-driven RBF neural network-based water outlet total nitrogen TN soft measurement method |
CN114814130A (en) * | 2022-03-04 | 2022-07-29 | 北京工业大学 | Intelligent detection method for total nitrogen in effluent of interval type two fuzzy neural network based on nonsingular gradient descent algorithm |
-
2022
- 2022-09-16 CN CN202211125035.9A patent/CN115541837A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106295800A (en) * | 2016-07-28 | 2017-01-04 | 北京工业大学 | A kind of water outlet total nitrogen TN intelligent detecting method based on recurrence Self organizing RBF Neural Network |
CN113077039A (en) * | 2021-03-22 | 2021-07-06 | 北京工业大学 | Task-driven RBF neural network-based water outlet total nitrogen TN soft measurement method |
CN114814130A (en) * | 2022-03-04 | 2022-07-29 | 北京工业大学 | Intelligent detection method for total nitrogen in effluent of interval type two fuzzy neural network based on nonsingular gradient descent algorithm |
Non-Patent Citations (2)
Title |
---|
H. CHAN等: "A pretreatment method of wastewater based on artificial intelligence and fuzzy neural network system", JOURNAL OF INTELLIGENT & FUZZY SYSTEMS, vol. 39, no. 2, 31 January 2020 (2020-01-31), pages 1711 * |
韩红桂 等: "基于模型输出敏感度分析的动态神经网络结构设计", 电子学报, vol. 38, no. 3, 31 December 2010 (2010-12-31), pages 731 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10570024B2 (en) | Method for effluent total nitrogen-based on a recurrent self-organizing RBF neural network | |
CN108469507B (en) | Effluent BOD soft measurement method based on self-organizing RBF neural network | |
CN111291937A (en) | Method for predicting quality of treated sewage based on combination of support vector classification and GRU neural network | |
CN108898215B (en) | Intelligent sludge bulking identification method based on two-type fuzzy neural network | |
CN111354423B (en) | Method for predicting ammonia nitrogen concentration of effluent of self-organizing recursive fuzzy neural network based on multivariate time series analysis | |
CN109828089B (en) | DBN-BP-based water quality parameter nitrous acid nitrogen online prediction method | |
CN106022954B (en) | Multiple BP neural network load prediction method based on grey correlation degree | |
CN109344971B (en) | Effluent ammonia nitrogen concentration prediction method based on adaptive recursive fuzzy neural network | |
CN112418491B (en) | Dynamic configuration method for residual sediment storage capacity of reservoir | |
CN111260117B (en) | CA-NARX water quality prediction method based on meteorological factors | |
CN114037163A (en) | Sewage treatment effluent quality early warning method based on dynamic weight PSO (particle swarm optimization) optimization BP (Back propagation) neural network | |
CN103606006A (en) | Sludge volume index (SVI) soft measuring method based on self-organized T-S fuzzy nerve network | |
CN110824915A (en) | GA-DBN network-based intelligent monitoring method and system for wastewater treatment | |
CN108595892A (en) | Soft-measuring modeling method based on time difference model | |
CN112765902A (en) | RBF neural network soft measurement modeling method based on TentFWA-GD and application thereof | |
CN110309609A (en) | A kind of architecture indoor air quality evaluation method based on rough set and wavelet neural network | |
CN111693667A (en) | Water quality detection system and method based on gated recursive array | |
CN114417740B (en) | Deep sea breeding situation sensing method | |
CN115687995A (en) | Big data environmental pollution monitoring method and system | |
CN109408896B (en) | Multi-element intelligent real-time monitoring method for anaerobic sewage treatment gas production | |
CN115640744A (en) | Method for predicting corrosion rate outside oil field gathering and transportation pipeline | |
CN112819087B (en) | Method for detecting abnormality of BOD sensor of outlet water based on modularized neural network | |
CN113111576A (en) | Mixed coding particle swarm-long and short term memory neural network based soft measurement method for ammonia nitrogen in effluent | |
CN113255739A (en) | Fish feed detection and formula system | |
Miao et al. | A hybrid neural network and genetic algorithm model for predicting dissolved oxygen in an aquaculture pond |
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 |