A soft sensing method for total nitrogen concentration in sewage treatment effluent based on KPLSR model
Through the KPLSR model and differential evolution algorithm, the auxiliary variables are optimized and selected, and the soft measurement method of total nitrogen concentration of sewage treatment effluent is established using different nuclear functions, which solves the real-time and accuracy of the total nitrogen concentration of sewage treatment plant effluent, and realizes efficient automation Regulation.
Patent Information
- Application Number
- CN202110300719.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-13
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-03-13
AI Technical Summary
It is difficult for existing sewage treatment plants to accurately measure the total nitrogen concentration of the effluent in real time, which leads to difficulty in regulating the feed volume of the aeration tank. It relies on manual measurement accuracy and low degree of automation, and cannot effectively meet the requirements of laws and regulations.
The soft measurement method based on the KPLSR model is adopted, and auxiliary variables are selected through differential evolution algorithms, and the KPLSR model is established using different kernel functions to realize real-time soft measurement of the total nitrogen concentration of the effluent, avoiding parameter selection and empirical dependence.
It improves the accuracy and real-time measurement of total nitrogen concentration in the effluent water, reduces the dependence on high-priced instruments, realizes data-driven variable selection and model prediction, and improves the level of wastewater treatment automation.
Smart Images

Figure CN113065242B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a soft measurement method for total nitrogen concentration of sewage effluent, and in particular to a soft measurement method for total nitrogen concentration of sewage treatment effluent based on a KPLSR model. Background Art
[0002] In recent years, with the development of the economy, the arbitrary discharge of more and more nitrogen-containing pollutants has caused great harm to the environment. Nitrogen exists in sewage in various forms such as organic nitrogen, ammonia nitrogen (NH4+-N), nitrate nitrogen (NO3--N) and nitrite nitrogen (NO2--N), and ammonia nitrogen is one of the most important forms. The total nitrogen concentration in sewage is the sum of the concentrations of these nitrogen-containing organic compounds. Ammonia nitrogen in sewage refers to nitrogen in the form of free ammonia and ionic ammonium, which mainly comes from the decomposition of nitrogen-containing organic matter in domestic sewage, coking, synthetic ammonia and other industrial wastewater. Ammonia nitrogen has many sources of pollution and also emits a foul odor, which will directly affect people's work and life. With the increasing attention paid to environmental issues, corresponding regulations have stipulated the upper limit of the total nitrogen concentration of effluent after sewage treatment.
[0003] In order to reduce the total nitrogen content at the sewage outlet, sewage treatment plants or sewage treatment systems usually feed in the oxidation ditch of the aeration tank, and convert the nitrogen-containing components in the sewage into other usable substances through biological and chemical reactions, such as fertilizers for crops. Due to the many sources of sewage and the large fluctuations in the total nitrogen concentration, it is necessary to measure the total nitrogen content at the outlet in real time, so as to timely adjust the amount of feed in the aeration tank, so that the total nitrogen concentration in the discharged sewage meets the requirements of relevant laws and regulations. However, at this stage, the purchase price of instruments and meters that can directly and quickly measure the total nitrogen concentration in sewage is high, and the subsequent use and maintenance components are also a considerable expense. In the current sewage treatment plants with generally low automation levels, high-priced instrumentation equipment is usually not purchased. Instead, the total nitrogen concentration is measured by manual sampling. Although this technical means has high accuracy, it mainly relies on manual operation and has poor real-time performance.
[0004] In this context, the soft measurement of effluent total nitrogen concentration using historical data has been put on the agenda. The basic idea of soft measurement of effluent total nitrogen concentration is to use other measurement data, including: inlet flow, sewage temperature, suspended solids concentration, feed amount, etc., to predict the total nitrogen concentration at the outlet in real time. However, the key to the successful implementation of soft measurement technology lies in how to select auxiliary variables for predicting effluent total nitrogen concentration. Although sewage treatment plants need to measure a lot of data every day, only some variables can play a key role in establishing soft measurement models. Considering the complexity of biochemical reactions in the sewage treatment process, it is usually unreliable to select auxiliary variables based on experience. If experience is not available or the experience is wrong, the measurement accuracy of effluent total nitrogen concentration will not meet the requirements. Summary of the invention
[0005] The main technical problem to be solved by the present invention is: how to select beneficial auxiliary variables and how to determine the parameters of the kernel partial least squares regression (KPLSR) model, so as to improve the accuracy of the soft measurement model of the total nitrogen concentration in the effluent. Specifically, the method of the present invention firstly optimizes and solves the objective function of the nearest component analysis by the differential evolution algorithm, so as to implement the auxiliary variable selection that does not rely on experience; secondly, the method of the present invention avoids the problem of selecting the parameters of the KPLSR model by fusing the KPLSR model with different kernel functions; finally, the selected auxiliary variables are used to implement the real-time soft measurement of the total nitrogen concentration in the effluent based on the KPLSR model.
[0006] The technical solution adopted by the method of the present invention to solve the above problem is: a soft measurement method for total nitrogen concentration in sewage treatment effluent based on the KPLSR model, comprising the following steps:
[0007] Step (1): Determine the variables that can be measured every day in the sewage treatment plant; wherein, the variables that can be measured at the inlet of the sewage treatment plant include: inlet flow rate, inlet temperature, inlet chromaticity, inlet chloride ion concentration, inlet suspended solids concentration, inlet pH value; the variables that can be measured in the aeration tank include: feed amount, sewage chromaticity, sewage suspended solids concentration, sewage pH value, sewage chloride ion concentration, biochemical oxygen demand; the variables that can be measured in the sedimentation tank include: sewage chromaticity, sewage suspended solids concentration, sewage pH value, sewage chloride ion concentration, sludge amount; the variables that can be measured at the outlet of the sewage treatment plant specifically include: effluent chromaticity, effluent pH value, effluent suspended solids concentration, and effluent total nitrogen concentration.
[0008] Step (2): Collect data for n consecutive days and store each day’s data as an m×1-dimensional data vector x i ; Among them, the data vector x of the i-th day i The elements in are arranged in the order of the variables described in step (1), and m is equal to the total number of measurable variables in step (1), i∈{1, 2, …, n}.
[0009] Step (3): Transform the data vector x of days n into 1 , x 2 , …, x n Form a data matrix X = [x 1 , x 2 , …, x n ] T After that, for X∈R n×m Each column vector in is standardized to obtain the standardized data matrix The mean and standard deviation of the column vector of the mth column in X are recorded as μ and σ respectively; where the superscript T represents the transpose of the matrix or vector, R n ×m represents an n×m-dimensional real matrix, and R represents a real number set.
[0010] Step (4): The column vectors from the 1st column to the m-1th column form the input matrix Will The column vector of the mth column in is recorded as the output vector Then, according to the following steps (4.1) to (4.6), the selection vector v∈R of the auxiliary variables is determined: 1×(m-1) .
[0011] Step (4.1): Initialize the number of iterations g = 1 and determine the parameters of the differential evolution optimization algorithm, including: population number N, scaling factor zf, crossover probability cp, and maximum number of iterations G.
[0012] Step (4.2): Randomly generate N (m-1)×1-dimensional population vectors w 1 , w 2 ,…,w N , each element in the population vector is randomly selected in the interval [-1, 1] according to a uniform distribution.
[0013] Step (4.3): Calculate the population vector w 1 , w 2 ,…,w N The corresponding objective function values F 1 , F 2 , …, F N ; Among them, calculate the cth population vector w c The corresponding objective function value F c The specific implementation process is shown in steps (4.3-1) to (4.3-4).
[0014] Step (4.3-1): Calculate the matrix according to the following formula The i-th row vector and the j-th row vector The weighted distance between
[0015]
[0016] where i∈{1, 2, ..., n}, j∈{1, 2, ..., n}, diag{w c} represents the population vector w cTransformed into a diagonal matrix, the symbol |||| represents the length of the calculation vector, c∈{1, 2,…, N}.
[0017] Step (4.3-2): Calculate according to the following formula and The probability p of being close to each other ij :
[0018]
[0019] In the above formula, exp() represents an exponential function with the natural constant e as the base.
[0020] Step (4.3-3): Calculate the output probability error f according to the following formula: 1 , f 2 , …, f n :
[0021]
[0022] In the above formula, and Represent the output vectors The i-th element and the j-th element in .
[0023] Step (4.3-4): Calculate the cth population vector w c The corresponding objective function value F c =f 1 +f 2 +…+f n .
[0024] Step (4.4): F 1 , F 2 , …, F N The maximum value and its corresponding population vector are recorded as F best and w best After that, the population update operation of the differential evolution algorithm is performed to obtain the updated N population vectors w 1 , w 2 ,…,w N The specific implementation process is shown in steps (4.4-1) to (4.4-4).
[0025] Step (4.4-1): Generate a corresponding mutation vector v for each population vector according to the following formula: c :
[0026] v c =w c +zf×(w best -w c )+zf×(wa -w b ) ④
[0027] In the above formula, the subscripts a and b are two unequal integers randomly generated from the interval [1, N].
[0028] Step (4.4-2): According to the following formula, the mutation vector v c To make corrections:
[0029]
[0030] In the above formula, v c (k) represents the mutation vector v c The k-th element in , k∈{1, 2,…, m-1}.
[0031] Step (4.4-3): Generate N trial vectors u according to the formula shown below 1 ,u 2 ,…,u N :
[0032]
[0033] Among them, u c (k) and w c (k) are u c With w c The kth element in represents a random number between 0 and 1.
[0034] Step (4.4-4): Update the population vector w according to the following formula: 1 , w 2 ,…,w N :
[0035]
[0036] In the above formula, Indicates that u c After the population vector is formed, the objective function value is calculated according to the above steps (4.3-1) to (4.3-4).
[0037] Step (4.5): Determine whether the condition g>G is satisfied; if not, set g=g+1 and return to step (4.3); if so, obtain the optimal population vector w best .
[0038] Step (4.6): Determine the selection vector v∈R according to the following formula: 1×(m-1) The elements in:
[0039]
[0040] In the above formula, v(k) and w best (k) represents v and w respectively best The kth element in , η is the threshold, and its recommended value range is 0.01≤η≤0.1.
[0041] Step (5): According to the column where the element equal to 1 in the selection vector v is located, the corresponding The input matrix Z is formed by the column vectors of the same columns in .
[0042] Step (6): According to the three kernel functions G shown below: 1 (ε 1 , ε 2 ), G 2 (ε 1 , ε 2 ), and G 3 (ε 1 , ε 2 ), after establishing three different KPLSR models, the output estimation vector is calculated The specific implementation process is shown in steps (6.1) to (6.6).
[0043]
[0044]
[0045]
[0046] Among them, ε 1 and ε 2 Represents the two input row vectors of the kernel function, and α and β are the parameters of the kernel function.
[0047] Step (6.1): According to formula K d (i, j) = G d (z i , z j ) Calculate the kernel matrix K d ∈R n×n The element K in the i-th row and j-th column d (i, j); where d∈{1, 2, 3}, z i and z j Represent the row vectors of the i-th and j-th rows in the input matrix Z respectively.
[0048] Step (6.2): According to the following formula, the kernel matrix K 1 , K 2 , K 3 Perform centralization processing, and obtain the corresponding core matrix after centralization processing
[0049]
[0050] Among them, the square matrix Θ∈R n×n All elements in are equal to 1.
[0051] Step (6.3): Set d = 1, 2 and 3 in sequence, and perform steps (6.3-1) to (6.3-4) as shown below to obtain the kernel regression coefficient vector θ of the KPLSR model 1 ,θ 2 ,θ 3 .
[0052] Step (6.3-1): Initialize γ = 1, and Then, update q according to the formula q=q / ||q||.
[0053] Step (6.3-2): According to formula s γ =K 0 q and Calculate the γth core score vector s in sequence γ With coefficient
[0054] Step (6.3-3): Determine whether the conditions are met: If so, the obtained γ score vectors s 1 ,s 2 ,…,s γ Composition kernel score matrix S d =[s 1 ,s 2 ,…,s γ ]; if not, then according to the formula Update K 0 , then set γ=γ+1, and return to step (6.3-2); wherein δ represents a threshold value, and its recommended value range is: 0.0001≤δ≤0.01.
[0055] Step (6.3-4): According to the formula Calculate the regression coefficient vector θ d ; Among them, the matrix Q∈R n×γ It is composed of γ identical q.
[0056] Step (6.4): According to the formula Calculate the output estimate vector of the KPLSR model Then, they are combined into an output estimation matrix
[0057] Step (7): According to the formula Calculate the regression coefficient vector θo After that, the offline modeling stage of the effluent total nitrogen soft sensor model is completed.
[0058] Step (8): Collect the measurement data of the sewage treatment plant for a new day and store it as a 1×(m-1)-dimensional data vector x t ; where the data vector x t The elements in are arranged in the order of the first m-1 variables described in step (1), and the subscript t represents the latest day.
[0059] Step (9): For the data vector x t The elements of each column in are subjected to the same standardization process as in step (3) to obtain the standardized data vector
[0060] Step (10): Call the selection vector v∈R of the auxiliary variables in step (4) 1×(m-1) , and according to the column where the element equal to 1 in v is located, the corresponding x t The elements in the same column in the input vector z t .
[0061] Step (11): According to formula k d (i) = G d (z t , z i ) Calculate the kernel vector k d ∈R 1×n The i-th element k in d (i) Repeat this step until three kernel vectors k are obtained. 1 , k 2 , k 3 .
[0062] Step (12): Calculate the soft measurement value y of the total nitrogen concentration in the effluent according to steps (12.1) to (12.3) as shown below: t .
[0063] Step (12.1): According to the following formula, k 1 , k 2 , k 3 Implementing centralized processing, corresponding to
[0064]
[0065] Among them, φ∈R 1×n All elements in are equal to 1.
[0066] Step (12.2): According to the formula Calculate the estimated value Then, according to Calculate output estimates in,
[0067] Step (12.3): According to the formula Calculate the soft measurement value y of the total nitrogen concentration in the effluent t , and then return to step (7) to continue the soft measurement of the total nitrogen concentration in the effluent of the new day.
[0068] Through the above-described implementation steps, the advantages of the method of the present invention are introduced as follows.
[0069] The biggest advantage of the method of the present invention is that it does not rely on the knowledge of the mechanism of the sewage treatment process and the subjective experience of technicians, and directly realizes the optimization of characteristic variables from a data-driven perspective. In addition, three types of classic kernel functions are fully utilized to establish three different KPLSR models respectively, avoiding the problem of kernel function selection. Finally, the outputs of the three different KPLSR models are further merged through least squares regression, which can fully guarantee the accuracy of the prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a schematic diagram of the implementation process of the method of the present invention.
[0071] Figure 2 Schematic diagram of the sewage treatment plant process.
[0072] Figure 3 This is a comparison chart of the errors between the soft measurement and the measured value of the total nitrogen concentration in the effluent. DETAILED DESCRIPTION
[0073] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0074] like Figure 1 As shown, the present invention discloses a soft measurement method for total nitrogen concentration in sewage treatment effluent based on the KPLSR model. The specific implementation mode of the method of the present invention is described below in conjunction with a specific application example.
[0075] The process of the sewage treatment plant in this implementation case is as follows Figure 2 As shown. In this implementation case, a total of 212 days of data were collected continuously; the data vectors of the first 112 days were used in the offline modeling stage of the soft measurement model, and the data vectors of the last 100 days were used as the data vectors of the new day's sampling to verify the soft measurement accuracy of the effluent total nitrogen. First, the steps (1) to (7) shown below were implemented to establish a soft measurement model for the effluent total nitrogen.
[0076] Step (1): Determine the variables that can be measured every day at the sewage treatment plant: The variables that can be measured at the inlet of the sewage treatment plant include: Inlet flow rate Q in , water inlet temperature T in , water chromaticity C in , the chloride ion concentration in water is Cl in , the concentration of suspended solids in water D in , pH value of water inlet in ; The measurable variables in the aeration tank include: feed amount Q a , sewage chromaticity C a , sewage suspended solid concentration D a , sewage pH value P a , sewage chloride ion concentration Cl a , biochemical oxygen demand O a ; The measurable variables in the sedimentation tank include: sewage chromaticity C s , sewage suspended solid concentration D s , sewage pH value P s , sewage chloride ion concentration Cl s , sludge volume V s ; The measurable variables at the effluent of the sewage treatment plant include: effluent chromaticity C o , effluent pH value P o , effluent suspended solid concentration D o , and effluent total nitrogen concentration TN.
[0077] Step (2): Collect data for n consecutive days and store each day’s data as an m×1-dimensional data vector x i ; where m represents the total number of measurable variables in step (1).
[0078] Step (3): Transform the data vector x of days n into 1 , x 2 , …, x n Form a data matrix X = [x 1 , x 2 , …, x n ] T After that, for X∈R n×m Each column vector in is standardized to obtain the standardized data matrix And record the mean and standard deviation of the last column vector in X as μ and σ respectively.
[0079] Step (4): The column vectors from the 1st column to the m-1th column form the input matrix Will The column vector of the mth column in is recorded as the output vector Then, according to the above steps (4.1) to (4.6), the selection vector v∈R of the auxiliary variables is determined. 1×(m-1) .
[0080] Step (5): According to the column where the element equal to 1 in the selection vector v is located, the corresponding The input matrix Z is formed by the column vectors of the same columns in .
[0081] Step (6): According to the three kernel functions G shown below: 1 (ε 1 , ε 2 ), G 2 (ε 1 , ε 2 ), and G 3 (ε 1 , ε 2 ), after establishing three different KPLSR models, the output estimation vector is calculated The specific implementation process is shown in the above steps (6.1) to (6.6).
[0082] Step (7): According to the formula Calculate the regression coefficient vector θ o After that, the offline modeling stage of the effluent total nitrogen soft sensor model is completed.
[0083] After completing the above steps (1) to (7), soft measurement of the total nitrogen concentration in the effluent can be implemented, that is, implementing steps (8) to (12) as shown below.
[0084] Step (8): Collect m-1 measurement data of the sewage treatment plant for a new day and store them as a 1×(m-1)-dimensional data vector x t ; where the subscript t represents the latest day, and the data vector x t The order of the elements in is: water inflow rate Q in , water inlet temperature T in , water chromaticity C in , the chloride ion concentration in water is Cl in , the concentration of suspended solids in water D in , pH value of water inlet in ; The measurable variables in the aeration tank include: feed amount Q a , sewage chromaticity C a , sewage suspended solid concentration D a , sewage pH value P a , sewage chloride ion concentration Cl a , biochemical oxygen demand O a ; The measurable variables in the sedimentation tank include: sewage chromaticity C s, sewage suspended solid concentration D s , sewage pH value P s , sewage chloride ion concentration Cl s , sludge volume V s ; The measurable variables at the effluent of the sewage treatment plant include: effluent chromaticity C o , effluent pH value P o , effluent suspended solid concentration D o .
[0085] Step (9): For the data vector x t The same standardization process as in step (3) is performed on each column element to obtain the standardized data vector
[0086] Step (10): According to the selection vector v∈R 1×(m-1) The column where the element equal to 1 is located, the corresponding x t The elements of the same column in form the input vector z t .
[0087] Step (11): According to formula k d (i) = G d (z t , z i ) Calculate the kernel vector k d ∈R 1×n The i-th element k in d (i) Repeat this step until three kernel vectors k are obtained. 1 , k 2 , k 3 .
[0088] Step (12): Through the three KPLSR models in step (6) and the regression coefficient vector θ in step (7) o , calculate the soft measurement value y of the total nitrogen concentration in the effluent t The specific implementation process is shown in steps (12.1) to (12.3).
[0089] The soft measurement value of the effluent total nitrogen concentration in step (12) is compared with the actual effluent total nitrogen concentration measured by chemical means, and the corresponding comparison results are shown in Figure 3 In. From Figure 3 It can be seen from the figure that the method of the present invention has strong soft measurement accuracy and the error change is within the acceptable range.
Claims
1. A soft measurement method for total nitrogen concentration in sewage treatment effluent based on KPLSR model. It is characterized in that The following steps are involved: Step (1): Determine the variables measured daily in the sewage treatment plant; wherein the variables measured at the sewage treatment plant inlet include: inlet flow, inlet temperature, inlet chromaticity, inlet chloride ion concentration, inlet suspended solids concentration, and inlet pH value; the variables measured in the aeration tank include: feed amount, sewage chromaticity, sewage suspended solids concentration, sewage pH value, sewage chloride ion concentration, and biochemical oxygen demand; the variables measured in the sedimentation tank include: sewage chromaticity, sewage suspended solids concentration, sewage pH value, sewage chloride ion concentration, and sludge volume; the variables measured at the sewage treatment plant outlet specifically include: effluent chromaticity, effluent pH value, effluent suspended solids concentration, and effluent total nitrogen concentration; Step (2): Collect data for n consecutive days and store each day’s data as an m×1-dimensional data vector x i ; Among them, the data vector x of the i-th day i The elements in are arranged in the order of the variables described in step (1), m is equal to the total number of variables measured in step (1), i∈{1,2,...,n}; Step (3): Transform the data vector x of n days into 1 ,x 2 ,…,x n Form a data matrix X = [x 1 ,x 2 ,…,x n ] T After that, for X∈R n×m Each column vector in is standardized to obtain the standardized data matrix The mean and standard deviation of the column vector of the mth column in X are recorded as μ and σ respectively; where the superscript T represents the transpose of the matrix or vector, R n×m represents a real matrix of dimension n×m, and R represents a real number set; Step (4): The column vectors from the 1st column to the m-1th column form the input matrix Will The column vector of the mth column in is recorded as the output vector Then, according to the following steps (4.1) to (4.6), the selection vector v∈R of the auxiliary variables is determined: 1×(m-1) ; Step (4.1): Initialize the number of iterations g = 1, determine the parameters of the differential evolution optimization algorithm, including: population number N, scaling factor zf, crossover probability cp, maximum number of iterations G; Step (4.2): Randomly generate N (m-1)×1-dimensional population vectors w 1 ,w 2 ,…,w N , each element in the population vector is randomly selected in the interval [-1,1] according to a uniform distribution; Step (4.3): Calculate the population vector w 1 ,w 2 ,...,w N The corresponding objective function values F 1 ,F 2 ,...,F N ; Step (4.4): F 1 ,F 2 ,…,F N The maximum value and its corresponding population vector are recorded as F best and w best After that, the population update operation of the differential evolution algorithm is performed to obtain the updated N population vectors w 1 ,w 2 ,…,w N ; Step (4.5): Determine whether the condition g>G is satisfied; if not, set g=g+1 and return to step (4.3); if so, obtain the optimal population vector w best ; Step (4.6): Determine the selection vector v∈R according to the following formula: 1×(m-1) The elements in: In the above formula, v(k) and w best (k) represents v and w respectively best The kth element in , η is the threshold; Step (5): According to the column where the element equal to 1 in the selection vector v is located, the corresponding The column vectors of the same columns in form the input matrix Z; Step (6): According to the three kernel functions G shown below: 1 (ε 1 ,ε 2 ), G 2 (ε 1 ,ε 2 ), and G 3 (ε 1 ,ε 2 ), after establishing three different KPLSR models, the output estimation vector is calculated The specific implementation process is shown in steps (6.1) to (6.6); Among them, ε 1 and ε 2 Represents the two input row vectors of the kernel function, α and β are the parameters of the kernel function; Step (6.1): According to formula K d (i,j)=G d (z i ,z j ) Calculate the kernel matrix K d ∈R n×n The element K in the i-th row and j-th column d (i,j); where d∈{1,2,3}, z i and z j Respectively represent the row vectors of the i-th and j-th rows in the input matrix Z; Step (6.2): According to the following formula, the kernel matrix K 1 ,K 2 ,K 3 Perform centralization processing, and obtain the corresponding core matrix after centralization processing Among them, the square matrix Θ∈R n×n All elements in are equal to 1; Step (6.3): Set d = 1, 2 and 3 in sequence, and perform steps (6.3-1) to (6.3-4) as shown below to obtain the kernel regression coefficient vector θ of the KPLSR model 1 ,θ 2 ,θ 3 ; Step (6.4): According to the formula Calculate the output estimate vector of the KPLSR model Then, they are combined into an output estimation matrix Step (7): According to the formula Calculate the regression coefficient vector θ o After that, the offline modeling stage of the effluent total nitrogen soft sensor model is completed; Step (8): Collect m-1 measurement data of the sewage treatment plant for a new day and store them as a 1×(m-1)-dimensional data vector x t ; where the data vector x t The elements in are arranged in the order of the first m-1 variables described in step (1), and the subscript t represents the latest day; Step (9): For the data vector x t The elements of each column in are subjected to the same standardization process as in step (3) to obtain the standardized data vector Step (10): Use the selection vector v∈R of the auxiliary variables in step (4) 1×(m-1) , according to the column where the element equal to 1 in v is located, the corresponding x t The elements in the same column in the input vector z t ; Step (11): According to formula k d (i) = G d (z t ,z i ) Calculate the kernel vector k d ∈R 1×n The i-th element k in d (i) Repeat this step until three kernel vectors k are obtained. 1 ,k 2 ,k 3 ; Step (12): Calculate the soft measurement value y of the total nitrogen concentration in the effluent according to steps (12.1) to (12.3) as shown below: t ; Step (12.1): According to the following formula, k 1 ,k 2 ,k 3 Implementing centralized processing, corresponding to Among them, φ∈R 1×n All elements in are equal to 1; Step (12.2): According to the formula Calculate the estimated value Then, according to Calculate output estimates in, θ o represents the regression coefficient vector calculated in step (7); Step (12.3): According to the formula Calculate the soft measurement value y of the total nitrogen concentration in the effluent t , and then return to step (7) to continue to implement soft measurement of the total nitrogen concentration in the effluent of the new day.
2. According to claim 1, a soft measurement method for total nitrogen concentration in sewage treatment effluent based on KPLSR model, It is characterized in that The cth population vector w is calculated in step (4.3) c The corresponding objective function value F c The specific implementation process is as follows: Step (4.3-1): Calculate the matrix according to the following formula The i-th row vector and the j-th row vector The weighted distance between In the above formula, i∈{1,2,…,n}, j∈{1,2,…,n}, diag{w c } represents the population vector w c Transformed into a diagonal matrix, the symbol || || represents the length of the calculation vector, c∈{1,2,…,N}; Step (4.3.-2): Calculate according to the following formula and The probability p of being close to each other ij : In the above formula, exp() represents the exponential function with the natural constant e as the base; Step (4.3-3): Calculate the output probability error f according to the following formula: 1 ,f 2 ,…,f n : In the above formula, and Represent the output vectors The i-th element and the j-th element in ; Step (4.3-4): Calculate the cth population vector w c The corresponding objective function value F c =f 1 +f 2 +…+f n .
3. According to claim 2, a soft measurement method for total nitrogen concentration in sewage treatment effluent based on KPLSR model, It is characterized in that The specific implementation process of the population update operation of the differential evolution optimization algorithm in step (4.4) is as follows: Step (4.4-1): Generate a corresponding mutation vector v for each population vector according to the following formula: c : v c =w c +zf×(w best -w c )+zf×(w a -w b ) ⑩ In the above formula, subscripts a and b are two unequal integers randomly generated from the interval [1, N]; Step (4.4-2): According to the following formula, the mutation vector v c To make corrections: In the above formula, v c (k) represents the mutation vector v c The kth element in , k∈{1,2,…,m-1}; Step (4.4-3): Generate N trial vectors u according to the formula shown below 1 ,u 2 ,…,u N : Among them, u c (k) and w c (k) are u c With w c The kth element in r k Represents a random number between 0 and 1; Step (4.4-4): Update the population vector w according to the following formula: 1 ,w 2 ,…,w N : In the above formula, Indicates that u c After the population vector is created, the objective function value is calculated according to the above steps (4.3-1) to (4.3-4).
4. According to claim 1, a soft measurement method for total nitrogen concentration in sewage treatment effluent based on KPLSR model, It is characterized in that The specific implementation process of establishing the KPLSR model in step (6.3) is as follows: Step (6.3-1): Initialize γ = 1, and Then, update q according to the formula q=q / ||q||; Step (6.3-2): According to formula s γ =K 0 q and Calculate the γth kernel score vector s in sequence γ With coefficient Step (6.3-3): Determine whether the conditions are met: If so, the obtained γ score vectors s 1 ,s 2 ,…,s γ Composition kernel score matrix S d =[s 1 ,s 2 ,…,s γ ]; if not, then according to the formula Update K 0 , and set γ = γ + 1, and then return to step (6.3-2); where δ represents the threshold; Step (6.3-4): According to the formula Calculate the regression coefficient vector θ d ; Among them, the matrix Q∈R n×γ It is composed of γ identical q.
Citation Information
Patent Citations
Multi-gaussian kernel self-optimization relevance vector machine based wastewater quality soft-measurement method
CN104914227A
Sewage energy saving processing optimization control method based on improved firefly algorithm and least squares support vector machine
CN107085372A
Soft measurement method based on integrated multi-core partial least squares regression model
CN110033175A
Sewage key water quality index soft measurement method of feature self-enhanced recurrent neural network
CN110929809A
