Membrane permeability dynamic multi-step prediction method with imbalanced samples
By using the AR-FNN model and the adaptive learning rate gradient descent algorithm, the problem of error accumulation in multi-step membrane permeability prediction in MBR wastewater treatment was solved, and high-precision long-term membrane fouling prediction was achieved.
Patent Information
- Application Number
- CN202211738472.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-31
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-12-31
AI Technical Summary
In existing technologies for MBR wastewater treatment, the multi-step prediction of membrane permeability suffers from error accumulation and increased uncertainty, leading to reduced prediction accuracy and making it difficult to achieve long-term accurate prediction.
An attractive recurrent fuzzy neural network (AR-FNN) model is adopted, combined with a speed gradient descent algorithm with an adaptive learning rate, to divide the input data and update the parameters. The attractiveness between predicted values is calculated by using the angle and distance between individuals in the time series, thereby reducing the cumulative prediction error.
It improves the accuracy of multi-step prediction of membrane permeability in MBR wastewater treatment, reduces dynamic errors, and achieves long-term accurate prediction of membrane fouling.
Smart Images

Figure CN116312848B_ABST
Abstract
Description
Technical Field
[0001] This invention designs a dynamic multi-step prediction method for membrane permeability using unbalanced samples, enabling long-term prediction of membrane permeability during wastewater treatment in membrane bioreactors (MBRs). Membrane permeability measures the degree of membrane fouling; therefore, predicting membrane permeability provides crucial information for understanding the extent of membrane fouling. Membrane permeability prediction in wastewater treatment, as a critical step in predicting membrane fouling, is an important branch of advanced manufacturing technology and falls under the field of wastewater treatment and resource utilization. Background Technology
[0002] With the growth of the national economy and the increasing public awareness of environmental protection, wastewater treatment automation technology has ushered in unprecedented development opportunities. The National Medium- and Long-Term Science and Technology Development Plan proposes to research and promote new, efficient, and low-energy-consumption wastewater treatment technologies. This is of great significance for research on MBR wastewater treatment processes. Accurate long-term prediction of membrane fouling can significantly improve the treatment efficiency of wastewater treatment plants, and has important impacts on economic, environmental, and social benefits. Therefore, research on membrane permeability is of great significance and has broad application prospects.
[0003] MBR (Membrane Bioreactor) is a novel wastewater treatment technology combining membrane separation and biological treatment. It boasts advantages such as high effluent quality, small footprint, low sludge production, and good compatibility with existing processes. These unique advantages have led to its widespread application in wastewater treatment. However, membrane fouling has become a major obstacle to the further development of MBR, imposing additional financial and maintenance costs on wastewater treatment plants. Therefore, preventing MBR membrane fouling is crucial for the safe operation of wastewater treatment plants. In recent years, measuring the degree of membrane fouling by predicting membrane permeability has become a research hotspot. Furthermore, applying multi-step prediction strategies to membrane permeability prediction can yield predicted values of membrane fouling over a long period, which is significant for improving the technological level of the membrane wastewater treatment industry. However, due to various complex additional factors, such as error accumulation, reduced accuracy, and increased uncertainty, multi-step prediction is more difficult than single-step prediction.
[0004] This invention designs a dynamic multi-step prediction method for membrane permeability with imbalanced samples. It mainly involves dividing the input dataset for predicting membrane permeability and constructing an Attraction Recurrent-Fuzzy Neural Network (AR-FNN) model. The recursive multi-step prediction method is used to achieve long-term prediction of membrane permeability in MBR wastewater treatment. Summary of the Invention
[0005] This invention provides a dynamic multi-step prediction method for membrane permeability with unbalanced samples. This method continuously divides the input data related to the predicted membrane permeability to improve the dynamic prediction error caused by the separation of operating conditions. At the same time, it constructs an AR-FNN and uses the angle and distance between individuals in the time series to calculate the attraction between the predicted values to determine the feedback degree, thereby reducing the cumulative prediction error. Furthermore, it designs a speed gradient descent algorithm with an adaptive learning rate to update the neural network parameters, which further accelerates the network parameter learning process and improves the prediction accuracy of membrane fouling.
[0006] The present invention adopts the following technical solution and implementation steps:
[0007] 1. A dynamic multi-step forward prediction method for membrane permeability based on imbalanced samples, comprising the following steps:
[0008] (1) Determine the input variables and output variables to be predicted: This invention mainly focuses on the intelligent prediction of membrane permeability in the wastewater treatment process of membrane bioreactor. Five variables are determined as the relevant variables for predicting membrane permeability: product water pressure, product water flow rate, nitrate in the aerobic zone, ORP in the anoxic zone and aeration rate. The membrane permeability value in the future period is used as the output variable.
[0009] (2) Design a condition classification method for partitioning the input dataset for predicting membrane permeability, which performs continuous partitioning of imbalanced samples in the dataset, specifically as follows:
[0010] ① Obtain the product water pressure data as a vector x1 = [x 11 ,…,x 1n The water production flow data is a vector x2 = [x 21 ,…,x 2n ], the nitrate data in the aerobic zone is a vector x3 = [x 31 ,…,x 3n The ORP data for the hypoxic region is a vector x4 = [x 41 ,…,x 4n The aeration volume data is represented by the vector x5 = [x 51 ,…,x 5n Construct the training sample matrix as X = [x1, ..., x2]. i ,…,x m ] T x i =[x i1 ,…,x ig ,…,x in ], i = 1, ..., m, g = 1, ..., n, where m and n are the number of relevant variables and the number of samples, respectively, and T represents the transpose of the matrix;
[0011] ② Design and reconstruct the training samples X, each training sample vector xg The goal is to minimize the distance between the reconstructed sample XW and the original sample X, obtaining the least squares loss function as follows:
[0012]
[0013] Where, min represents the minimum distance between the reconstructed sample XW and the original sample X, and ||X||2 is the 2-norm of matrix X, denoted as:
[0014]
[0015] Where Σ is the summation symbol, and |·| is the absolute value;
[0016] The solution to obtain the optimal reconstruction coefficient matrix W is:
[0017] W * =(X T X+ρI)X T X (3)
[0018] Where ρ∈[0.0001,0.01] is an adjustment parameter used to adjust the sparsity of matrix W, and matrix I is an n×n identity matrix, that is, the diagonal elements of the matrix are 1 and the other elements are 0;
[0019] ③ During the reconstruction process, two features x p and x q There may be a relatively high correlation between them, then their corresponding predictions y p and y q There should also be a similar relationship; calculate y. p =x p W * and y q =x q W * The similarity relationship between them, where p = 1, 2, ..., m, q = 1, 2, ..., m, and y is defined. p and y q The similarity penalty loss function between them is
[0020]
[0021] Among them, s p,q It is a vector x p sum vector x q The similarity measure between them is calculated using radial basis function kernels.
[0022]
[0023] Where exp represents an exponential function with the natural constant e as the base, and σ represents the width of the center;
[0024] ④ To obtain the optimal similarity working condition, if Q2≤Q max Then X belongs to the dataset matrix of the current working condition, Q max The maximum similarity threshold is set to a fixed value Q. max =0.004; if Q2>Q max The X dataset matrix contains several working conditions, therefore the number of samples n needs to be reduced further, and the sample set X needs to be reconstructed until Q2 ≤ Q. max until;
[0025] (3) Design a dynamic multi-step look-ahead prediction model based on an attraction recurrent-fuzzy neural network (AR-FNN). The neural network topology consists of four layers: an input layer, a radial basis function (RBF) layer, a regularization layer, and an output layer. Determine the mRR-1 connection method of the neural network, i.e., the input layer has m neurons, the RBF layer has R neurons, the regularization layer has R neurons, and the output layer has 1 neuron. Add self-feedback connections to the regularization layer of the fuzzy neural network to form a recurrent fuzzy neural network. The network center value, width, feedback weight, and weight are C(t) = [c1(t), c2(t), ..., c i (t),…,c m (t)] T B(t) = [b1(t), b2(t), ..., b i (t),…,b m (t)] T , λ(t)=[λ1(t),λ2(t),…,λ j (t),…,λ R (t)] T andω(t)=[ω1(t),ω2(t),…,ω j (t),…,ω R (t)] T Where i = 1, 2, ..., m, j = 1, 2, ..., R, c i (t)=[c i1 (t),c i2 (t),…,c ij (t),…,c iR (t)],b i (t)=[b i1 (t),b i2 (t),…,b ij (t),…,b iR (t)],c ij (t) and b ij(t) represents the central value and width between the ith output of the input layer and the jth input of the RBF layer at time t, λ j (t) represents the weight of the self-feedback of the jth neuron in the rule layer, and the weight ω j (t) represents the weight between the jth neuron in the rule layer and the output layer neurons at time t. During the initialization process of C(t), B(t), λ(t), and ω(t), all internal elements are 1; according to steps (1) and (2), the reconstructed sample matrix X is obtained as the network input sample matrix X(t) at time t, and X(t) = [x1(t), x2(t), …, x h (t)], x p (t) = [x 1p (t), x 2p (t), …, x ip (t), …, x mp (t)] T , x ip (t) represents the input of the ith neuron in the input layer at time t. p = 1, 2, …, h, where h is the prediction time domain length, and 0 < h < t. t is the time value corresponding to all samples. The corresponding network training output is the membrane permeability y(t), and y(t) = [y(1 + h), y(2 + h), …, y(t)]. The predicted outputs of the network from t to t + h - 1 are respectively Use the network to obtain the predicted value at time t + h The topological structure and calculation method of the network are
[0026] ① Input layer: The input-output relationship of each node i in this layer can be expressed as
[0027] a i (t) = x ip (t) (6)
[0028] Among them, a i (t) represents the output of the ith neuron in the input layer at time t;
[0029] ② RBF layer: Each node j in this layer represents a membership function. The Gaussian function is selected as the membership function. The input-output relationship of the jth node can be expressed as
[0030]
[0031] Among them, u ij (t) represents the output of the jth neuron in the RBF layer at time t;
[0032] ③ Rule layer: The attraction coefficient f j (t) between the predicted value individuals is introduced for feedback connection in the rule layer. The input-output relationship of the jth node can be expressed as
[0033]
[0034] in, Let f represent the output of the j-th neuron at time t in the rule layer, ∏ represent the product of the input signals, and f j (t)∈(0,1) represents the attraction coefficient between predicted values, and its calculation formula is:
[0035]
[0036] Among them, f j ′(t) represents the feedback quantity calculated by the j-th neuron in the rule layer, specifically:
[0037]
[0038] Among them, h j d(t) is the feedback output value of the j-th neuron in the rule layer at time t, d(t) is the distance between the predicted future values t+h-1 and t+hi at time t, and θ represents the angle between the predicted values. These are expressed as follows:
[0039]
[0040]
[0041]
[0042] in, λ represents the output of the j-th neuron in the regular layer at time t-1. j (t) represents the feedback weight of the recursive loop of the j-th neuron at time t, |·| is the absolute value, and arctan represents the arctangent function;
[0043] ④ Output layer: The input-output relationship of this layer is as follows
[0044]
[0045] Where y(t) represents the output of the output neuron at time t;
[0046] ⑤ Define the error function as
[0047]
[0048] Where e(t) is the error between the expected output and the actual output of the neural network at time t, e(t) = y d (t)-y(t), where y d y(t) and y(t) are the expected output and actual output of the neural network at time t, respectively;
[0049] (4) Train the neural network, specifically by designing a speed gradient descent algorithm with an adaptive learning rate to update the parameters of the AR-FNN;
[0050] ① The model input is X(t)=[x1(t),x2(t),…,x h (t)], perform training and design computation steps L1=1;
[0051] ②t=L1, calculate the output error E(t) of the model according to formulas (6), (7), (8), (9), (10), (11), (12), (13), (14), (15), adjust the parameters of the model at time t+1 using the gradient descent method, and update the connection weights of the output layer, the weights of the feedback value, and the mean and standard deviation of the RBF layer as follows:
[0052]
[0053]
[0054]
[0055]
[0056] Where, ω j (t+1), λ j (t+1), c ij (t+1) and b ij (t+1) represents the weights between the regular layer neurons and the output neuron, the feedback weights of the recursive loop, the center value and width of the RBF layer at time t+1, respectively; ζ is the learning rate of the gradient descent algorithm, set to a fixed value for updating the network weights; and η is the adaptive learning rate. The sign of the partial derivative. These are the correction amounts for the weights between neurons in the regularization layer and the output neurons, the correction amounts for the feedback weights in the recursive loop, and the correction amounts for the mean and standard deviation of the RBF layer, respectively. Their calculation formulas are as follows:
[0057]
[0058]
[0059]
[0060]
[0061] ③ To improve network convergence, the update formula for the adaptive learning rate η is as follows:
[0062] η = η max -(ηmax -η min )t / L (24)
[0063] Where, η max and η min These are the maximum and minimum learning rates, respectively, and L is the total number of samples;
[0064] ④ Increase the number of learning steps L1 by L. If the number of steps is less than the maximum number of iterations, go back to step ② to continue training. If the number of steps reaches the total number of samples, stop the calculation.
[0065] (5) Based on recursive fuzzy neural network, the prediction input sample matrix is selected as follows: Z(t)=[z(t-h+1),z(t-h+2),…,z(t-h+p),…,z(t)], z(t-h+p)=[z1(t-h+p),z2(t-h+p),…,z… m (t-h+p)] T p = 1, 2, ..., h, according to formulas (6), (7), (8), (9), (10), (11), (12), (13), (14), the predicted output of the model at time t+h is calculated as follows:
[0066] The inventiveness of this invention is mainly reflected in:
[0067] (1) In view of the problem that the prediction accuracy is reduced due to the imbalance of the input dataset for predicting membrane permeability, this invention proposes an adaptive classification method to divide the input variables, thereby improving the dynamic error problem caused by the imbalance of data and improving the prediction accuracy.
[0068] (2) This invention addresses the fact that the MBR wastewater treatment process is a complex and dynamic biological reaction process, which is characterized by nonlinearity and large time variation. Moreover, there are strong coupling relationships between various factors, making it difficult to describe the wastewater treatment process with an accurate mathematical model. Based on the characteristic that neural networks can approximate nonlinear functions, an attractive force-based recursive fuzzy neural network is adopted. According to the angle and distance between individuals in the time series, a gravity-attractive force strategy is designed to recursively adjust the predicted values to different degrees, thereby improving the cumulative prediction error. At the same time, a velocity gradient descent algorithm with an adaptive learning rate is used to update the network parameters, thereby realizing the long-term prediction of MBR membrane permeability.
[0069] Special note: This invention uses a multi-step prediction of MBR membrane permeability. Similarly, this invention can also be applied to the prediction of ammonia nitrogen, total phosphorus, etc. in wastewater treatment processes. As long as the principle of this invention is used for multi-step prediction, it should fall within the scope of this invention. Attached Figure Description
[0070] Figure 1 This is a diagram of the attractive force recursive fuzzy neural network structure of the present invention;
[0071] Figure 2 These are the results of the 1-step, 5-step, and 7-step advanced prediction of membrane permeability in this invention;
[0072] Figure 3 This is an error graph of the 1-step, 5-step, and 7-step advanced prediction of membrane permeability in this invention; Detailed Implementation
[0073] This invention designs a dynamic multi-step advance prediction method for membrane permeability with unbalanced samples; five variables are selected as input variables for predicting membrane permeability: permeate pressure, permeate flow rate, nitrate in the aerobic zone, ORP in the anoxic zone, and aeration rate; and the membrane permeability value in the future period is used as the output variable.
[0074] The experimental data came from the daily water quality analysis report of a wastewater treatment plant; the sampling time for the input variables was 5 minutes. After data preprocessing, the experimental samples had 400 sets of data remaining. All 400 sets of data were divided into two parts: 200 sets of data were used as training samples and the remaining 200 sets of data were used as test samples.
[0075] The present invention adopts the following technical solution and implementation steps:
[0076] 1. A dynamic multi-step forward prediction method for membrane permeability based on imbalanced samples, comprising the following steps:
[0077] (1) Determine the input variables and output variables to be predicted: This invention mainly focuses on the intelligent prediction of membrane permeability in the wastewater treatment process of membrane bioreactor. Five variables are determined as the relevant variables for predicting membrane permeability: product water pressure, product water flow rate, nitrate in the aerobic zone, ORP in the anoxic zone and aeration rate. The membrane permeability value in the future period is used as the output variable.
[0078] (2) Design a condition classification method for partitioning the input dataset for predicting membrane permeability, which performs continuous partitioning of imbalanced samples in the dataset, specifically as follows:
[0079] ① Obtain the product water pressure data as a vector x1 = [x 11 ,…,x 1n The water production flow data is a vector x2 = [x 21 ,…,x 2n ], the nitrate data in the aerobic zone is a vector x3 = [x 31 ,…,x 3n The ORP data for the hypoxic region is a vector x4 = [x 41 ,…,x 4n The aeration volume data is represented by the vector x5 = [x51 ,…,x 5n Construct the training sample matrix as X = [x1, ..., x2]. i ,…,x m ] T x i =[x i1 ,…,x ig ,…,x in ], i = 1, ..., m, g = 1, ..., n, where m and n are the number of relevant variables and the number of samples, respectively, m = 5, n = 200, and T represents the transpose of the matrix;
[0080] ② Design and reconstruct the training samples X, each training sample vector x g The goal is to minimize the distance between the reconstructed sample XW and the original sample X, obtaining the least squares loss function as follows:
[0081]
[0082] Where, min represents the minimum distance between the reconstructed sample XW and the original sample X, and ||X||2 is the 2-norm of matrix X, denoted as:
[0083]
[0084] Where Σ is the summation symbol, and |·| is the absolute value;
[0085] The solution to obtain the optimal reconstruction coefficient matrix W is:
[0086] W * =(X T X+ρI)X T X (27)
[0087] Where ρ = 0.0001 is an adjustment parameter used to adjust the sparsity of matrix W. Matrix I is a 200×200 identity matrix, that is, the diagonal elements of the matrix are 1 and the other elements are 0.
[0088] ③ During the reconstruction process, two features x p and x q There may be a relatively high correlation between them, then their corresponding predictions y p and y q There should also be a similar relationship; calculate y. p =x p W * and y q =x q W * The similarity relationship between them, where p = 1, 2, ..., 5, q = 1, 2, ..., 5, and y is defined. p and y qThe similarity penalty loss function between them is
[0089]
[0090] Among them, s p,q It is a vector x p sum vector x q The similarity measure between them is calculated using radial basis function kernels.
[0091]
[0092] Where exp represents an exponential function with the natural constant e as the base, and σ represents the width of the center;
[0093] ④ To obtain the optimal similarity working condition, if Q2≤Q max Then X belongs to the dataset matrix of the current working condition, Q max =0.004; if Q2>Q max The X dataset matrix contains several working conditions, therefore the number of samples n needs to be reduced further, and the sample set X needs to be reconstructed until Q2 ≤ Q. max until;
[0094] (4) Design a dynamic multi-step look-ahead prediction model based on an attraction recurrent-fuzzy neural network (AR-FNN). The neural network topology consists of four layers: an input layer, a radial basis function (RBF) layer, a regularization layer, and an output layer. The neural network is configured with a 5-12-12-1 connection scheme, meaning the input layer has 5 neurons, the RBF layer has 12 neurons, the regularization layer has 12 neurons, and the output layer has 1 neuron. Self-feedback connections are added to the regularization layer of the fuzzy neural network to form a recurrent fuzzy neural network. The network center value, width, and weights are C(t) = [c1(t), c2(t), ..., c...]. i (t),…,c m (t)] T B(t) = [b1(t), b2(t), ..., b i (t),…,b m (t)] T , λ(t)=[λ1(t),λ2(t),…,λ j (t),…,λ R (t)] T andω(t)=[ω1(t),ω2(t),…,ω j (t),…,ω R (t)] T Where i = 1, 2, ..., 5, j = 1, 2, ..., 12, ci f(t) = [c i1 (t), c i2 (t), …, c ij (t), …, c iR (t)], b i g(t) = [b i1 (t), b i2 (t), …, b ij (t), …, b iR (t)], c ij (t) and b ij (t) represents the center value and width between the i-th output of the input layer and the j-th input of the RBF layer at time t, λ j (t) represents the weight of the self-feedback of the j-th neuron in the rule layer, ω j (t) represents the weight between the j-th neuron in the rule layer and the output layer neuron at time t. During the initialization process of C(t), B(t), λ(t) and ω(t), the internal elements are all 1; according to steps (1) and (2), the reconstructed sample matrix X is obtained as the network input sample matrix X(t) at time t, X(t) = [x1(t), x2(t), …, x h (t)], x p (t) = [x 1p (t), x 2p (t), …, x ip (t), …, x mp (t)] T , x ip (t) represents the input of the i-th neuron in the input layer at time t, p = 1, 2, …, h, h is the prediction time domain length, and 0 < h < t, t = 200. The corresponding network training output is the membrane permeability y(t), y(t) = [y(1 + h), y(2 + h), …, y(t)]. The predicted outputs of the network from t to t + h - 1 are respectively Use the network to obtain the predicted value at time t + h The topological structure and calculation method of the network are
[0095] ① Input layer: The input-output relationship of each node i in this layer can be expressed as
[0096] a i (t) = x ip (t) (30)
[0097] where a i (t) represents the output of the i-th neuron in the input layer at time t;
[0098] ②RBF Layer: Each node j in this layer represents a membership function. A Gaussian function is chosen as the membership function. The input-output relationship of the j-th node can be represented as follows:
[0099]
[0100] Among them, u ij (t) represents the output of the j-th neuron in the RBF layer at time t;
[0101] ③ Rule layer: An attraction coefficient f between predicted individuals is introduced within the rule layer. j (t) performs a feedback connection, and the input-output relationship of the j-th node can be represented as:
[0102]
[0103] in, Let f represent the output of the j-th neuron at time t in the rule layer, ∏ represent the product of the input signals, and f j (t)∈(0,1) represents the attraction coefficient between predicted values, and its calculation formula is:
[0104]
[0105] Among them, f j ′(t) represents the feedback quantity calculated by the j-th neuron in the rule layer, specifically:
[0106]
[0107] Among them, h j d(t) is the feedback output value of the j-th neuron in the rule layer at time t, d(t) is the distance between the predicted future values t+h-1 and t+hi at time t, and θ represents the angle between the predicted values. These are expressed as follows:
[0108]
[0109]
[0110]
[0111] in, λ represents the output of the j-th neuron in the regular layer at time t-1. j (t) represents the feedback weight of the recursive loop of the j-th neuron at time t, |·| is the absolute value, and arctan represents the arctangent function;
[0112] ④ Output layer: The input-output relationship of this layer is as follows
[0113]
[0114] Where y(t) represents the output of the output neuron at time t;
[0115] ⑤ Define the error function as
[0116]
[0117] Where e(t) is the error between the expected output and the actual output of the neural network at time t, e(t) = y d (t)-y(t), where y d y(t) and y(t) are the expected output and actual output of the neural network at time t, respectively;
[0118] (5) Train the neural network, specifically by designing a speed gradient descent algorithm with an adaptive learning rate to update the parameters of the AR-FNN;
[0119] ① The model input is X(t)=[x1(t),x2(t),…,x h (t)], perform training and design computation steps L1=1;
[0120] ②t=L1, calculate the output error E(t) of the model according to formulas (6), (7), (8), (9), (10), (11), (12), (13), (14), (15), adjust the parameters of the model at time t+1 using the gradient descent method, and update the connection weights of the output layer, the weights of the feedback value, and the mean and standard deviation of the RBF layer as follows:
[0121]
[0122]
[0123]
[0124]
[0125] Where, ω j (t+1), λ j (t+1), c ij (t+1) and b ij (t+1) represents the weights between the regular layer neurons and the output neuron at time t+1, the feedback weights of the recursive loop, the center value and width of the RBF layer, respectively; ζ is the learning rate of the gradient descent algorithm, used for updating the network weights, ζ = 0.15; and η is the adaptive learning rate. The sign of the partial derivative. These are the correction amounts for the weights between neurons in the regularization layer and the output neurons, the correction amounts for the feedback weights in the recursive loop, and the correction amounts for the mean and standard deviation of the RBF layer, respectively. Their calculation formulas are as follows:
[0126]
[0127]
[0128]
[0129]
[0130] ③ To improve network convergence, the update formula for the adaptive learning rate η is as follows:
[0131] η = η max -(η max -η min )t / L (48)
[0132] Where, η max and η min These are the maximum learning rate and the minimum learning rate, η. max =0.2, η min =0.1, L is the total number of samples, L = 200;
[0133] ④ Increase the number of learning steps L1 by L. If the number of steps is less than the maximum number of iterations, go back to step ② to continue training. If the number of steps reaches the total number of samples, stop the calculation.
[0134] (5) Based on recursive fuzzy neural network, the prediction input sample matrix is selected as follows: Z(t)=[z(t-h+1),z(t-h+2),…,z(t-h+p),…,z(t)], z(t-h+p)=[z1(t-h+p),z2(t-h+p),…,z… m (t-h+p)] T p = 1, 2, ..., h, according to formulas (6), (7), (8), (9), (10), (11), (12), (13), (14), the predicted output of the model at time t+h is calculated as follows:
[0135] (6) Predict the values at times t+1, t+5, and t+7 using a neural network. Figure 2 This graph represents the fit between the actual output membrane permeability value and the expected output membrane permeability value. X-axis: Sample; Y-axis: Predicted membrane permeability value. Figure 3 The graph shows the error between the actual output membrane permeability value and the expected output membrane permeability value. The X-axis represents the sample, and the Y-axis represents the prediction error. The results demonstrate the effectiveness of the method.
Claims
1. A method for dynamic multi-step forecasting of membrane permeability with unbalanced samples, characterized in that, Comprise the following steps: (1) determine the input variables required for prediction and the output variables to be predicted: for intelligent prediction of membrane permeability in membrane bioreactor wastewater treatment process, determine the water production pressure, water production flow, nitrate in aerobic zone, ORP in anoxic zone and aeration quantity as 5 variables related to prediction of membrane permeability, and take the membrane permeability value in the future period as the output variable; (2) design a working condition classification method for dividing the input data set of predicted membrane permeability, continuously divide the unbalanced samples in the data set, specifically 11 1n 21 2n 31 3n 41 4n 51 5n i m T i i1 ig in , i = 1, …, m, g = 1, …, n, where m and n are the number of related variables and the number of samples, respectively, and T represents the transpose of the matrix. ② Design reconstruction training sample X, each training sample vector x g The target is to minimize the distance between the reconstructed sample XW and the original sample X, and the least square loss function is Wherein, min represents the minimum distance between the reconstructed sample XW and the original sample X, ||X||2 is the 2-norm of matrix X, and is represented as Wherein, Σ is the summation symbol, and |·| is the absolute value; The solution of the optimal reconstruction coefficient matrix W is W * = (X T X+ρI)X T X (3) Wherein, ρ∈[0.0001, 0.01] is an adjustment parameter used to adjust the sparsity of the matrix W, and I matrix is an n×n identity matrix, that is, the diagonal elements of the matrix are 1, and other elements are 0; ③In the process of reconstruction, there may be a higher correlation between two features x p and x q , so their corresponding predictions y p and y q should also have similar relationships. The similarity relationship between y p = x p W * and y q = x q W * is calculated, where p = 1, 2, …, m, q = 1, 2, …, m, and the similarity penalty loss function between y p and y q is defined as where s p,q is a similarity measure between vectors x p and x q is computed using a radial basis function kernel as Wherein, exp represents the exponential function with natural constant e as the base, and σ represents the width of the center; ④ Obtain the best similarity condition, if Q2≤Q max , then X belongs to the data set matrix of the current condition, Q max is the maximum similarity threshold, and the value is set as a fixed value Q max = 0.004; if Q2>Q max , then the X data set matrix contains several conditions, so the sample number n needs to be reduced again, and the sample set X is reconstructed until Q2≤Q max ; (3) Design dynamic multi-step ahead prediction model based on attraction recursive fuzzy neural network, the neural network topology structure is divided into four layers, input layer, radial basis function RBF layer, rule layer, output layer; Determine the connection mode of neural network m-R-R-1, that is, the input layer neurons are m, the RBF layer neurons are R, the rule layer neurons are R, and the output layer neurons are 1, add self-feedback connection in the rule layer of fuzzy neural network to form recursive fuzzy neural network; The network center value, width, feedback weight and weight are respectively C(t)=[c1(t),c2(t),…,c i (t),…,c m (t)] T , B(t)=[b1(t),b2(t),…,b i (t),…,b m (t)] T , λ(t)=[λ1(t),λ2(t),…,λ j (t),…,λ R (t)] T And ω(t)=[ω1(t),ω2(t),…,ω j (t),…,ω R (t)] T , Wherein i=1,2,…,m, j=1,2,…,R, c i (t)=[c i1 (t),c i2 (t),…,c ij (t),…,c iR (t)], b i (t)=[b i1 (t),b i2 (t),…,b ij (t),…,b iR (t)], c ij (t) and b ij (t) represent the center value and width between the i-th output of the input layer and the j-th input of the RBF layer at t time, λ j (t) represents the weight of the self-feedback of the j-th neuron of the rule layer, and the weight ω j (t) represents the weight between the j-th neuron of the rule layer and the output layer neuron at t time, The initialization process of C(t), B(t), λ(t) and ω(t) is that the internal elements are all 1; According to steps (1) and (2), the reconstructed sample matrix X is obtained as the network input sample matrix X(t) at t time, X(t)=[x1(t),x2(t),…,x h (t)], x p (t)=[x 1p (t),x 2p (t),…,x ip (t),…,x mp (t)] T , x ip (t) represents the input of the i-th neuron at time t, p = 1, 2, …, h, h is the prediction time domain length, and 0 < h < t, t is the time value corresponding to all samples, and the output corresponding to network training is membrane permeability y(t), y(t) = [y(1+h), y(2+h), …, y(t)], the prediction output of the network from t to t+h-1 is respectively The prediction value at t+h is obtained by using the network The topological structure and calculation method of the network are ① Input layer: the input and output relationship of each node i in this layer is represented as a i (t) = x ip (t) (6) wherein a i (t) denotes the output of the i-th neuron at time t in the input layer; ② RBF layer: each node j in this layer represents a membership function, and the Gaussian function is selected as the membership function, and the input and output relationship of the jth node is represented as where u ij (t) denotes the output of the jth neuron at time t of the RBF layer. ③ Rule layer: The attraction coefficient f between the predicted value individuals is introduced in the rule layer j (t) Feedback connection is made, and the input-output relationship of the jth node is represented as wherein, represents the output of the jth neuron at the tth rule layer, ∏ represents the multiplication of input signals, f j (t)∈(0,1) represents the attraction coefficient between the predicted values, and the calculation formula is where f j fj(t) represents the feedback quantity calculated by the jth neuron of the regular layer, specifically where h j (t) is the feedback output value of the jth neuron of the rule layer at time t, d(t) is the distance between the predicted future t+h-1 and t+h-i at time t, and θ represents the angle between the predicted values, respectively θ(t)=arctan[(i-1) / d(t)] (13) wherein, represents the output of the jth neuron of the regular layer at time t - 1, λ j (t) represents the recurrent feedback value of the jth neuron at time t, | · | is the absolute value, and arctan represents the inverse tangent function. ④ Output layer: the input and output relationship of this layer is Wherein, y(t) represents the output of the output neuron at time t; ⑤ Define the error function as where e(t) is the error between the expected output and the actual output of the neural network at time t, e(t) = y d (t) - y(t), where y d (t) and y(t) are the expected output and the actual output of the neural network at time t, respectively. (4) train the neural network, specifically design a velocity gradient descent algorithm with adaptive learning rate to update the parameters of AR-FNN; h (t)], training and designing the calculation step L1 = 1; ② t=L1, calculate the output error E(t) of the model according to formulas (6), (7), (8), (9), (10), (11), (12), (13), (14), (15), adjust the parameters of the model at time t+1 using gradient descent method, and the update rules of the connection weights, feedback value weights and mean and standard deviation of RBF layer of the output layer are where ω j (t+1), λ j (t+1), c ij (t+1) and b ij (t+1) are the weights between the regular layer neurons and the output neurons, the feedback weights of the recurrent connections, the center values and the widths of the RBF layer at time t+1, respectively, ζ is the parameter learning rate of the gradient descent algorithm, which is set as a fixed value for the update of the network weights, and η is the adaptive learning rate, is the partial derivative symbol, are the correction amounts of the weights between the regular layer neurons and the output neurons, the feedback weights of the recurrent connections, the mean value and the standard deviation of the RBF layer, respectively, and their calculation formulas are ③ In order to improve the convergence of the network, the update formula of the adaptive learning rate η is η = η max - (η max - η min ) t / L (24) where η max and η min are the maximum and minimum learning rates, respectively, and L is the total number of samples. ④ Increase L of the learning step number L1, if the step number is less than the maximum iteration step number, turn to step ② for continuous training, if the step number reaches the total sample number, stop calculation; (5) Membrane permeability prediction based on recursive fuzzy neural network, the prediction input sample matrix is selected, Z(t) = [z(t-h+1), z(t-h+2), …, z(t-h+p), …, z(t)], z(t-h+p) = [z1(t-h+p), z2(t-h+p), …, z m (t-h+p)] T , p = 1, 2, …, h, the prediction output of the model at t+h time is calculated according to formulas (6), (7), (8), (9), (10), (11), (12), (13), (14)
Citation Information
Patent Citations
Machine learning model-oriented member reasoning privacy attack method and system
CN113988312A
Intelligent early warning method of membrane fouling
US20200071209A1