It is one of the important issues in the field of today's sewage treatment of researching the MBR membrane flux prediction for membrane fouling. Firstly this paper used the principal component analysis method to achieve dimensionality and correlation of input variables and obtained the three major factors affecting membrane fouling most obvious: MLSS, total resistance, and operating pressure. Then it used the BP neural network to establish the system model of the MBR intelligent simulation, the relationship between three parameters, and membrane flux characterization of the degree of membrane fouling, because the BP neural network has slow training speed, is sensitive to the initial weights and the threshold, is easy to fall into local minimum points, and so on. So this paper used genetic algorithm to optimize the initial weights and the threshold of BP neural network and established the membrane fouling prediction model based on GABP network. As this research had shown, under the same conditions, the BP network model optimized by GA of MBR membrane fouling is better than that not optimized for prediction effect of membrane flux. It demonstrates that the GABP network model of MBR membrane fouling is more suitable for simulation of MBR membrane fouling process, comparing with the BP network.
As a new wastewater treatment technology, the membrane bioreactor has attracted much concern by its high quality of the effluent water quality and was considered as a watersaving technology with better economic, social, and environmental benefits. But it has been proved by practice that membrane fouling is a major bottleneck restricting its development. Then, by the study of the mechanism of membrane fouling, it is imminent to slow the membrane fouling rate and reduce the membrane pollution.
With the emergence of the computer simulation technology, it greatly reduces the time, space, and cost of the MBR experiment. Therefore, the MBR computer simulation technology has become a powerful tool for the research of the MBR, and its development will have a positive reference and guiding role for the practical engineering applications of the MBR.
Based on this idea, according to the real data of the experiment and industrial production of a MBR sewage treatment plant in Shijiazhuang, this paper focused on membrane fouling problem in the process of membrane bioreactor sewage wastewater. And it established intelligent prediction model with the correlation and the relationship between operation parameters and flux, by means of smart algorithm. Through the constant optimization of the algorithms and models, it achieved more accurate prediction of unknown membrane fluxes and thus predicted the degree of the membrane fouling. And seeking the optimum operating conditions of controlling membrane pollution trend, it improved the membrane fouling problem of the MBR process. The research of this topic had a certain reference value for membrane fouling prediction, parameters selection, and operation of the MBR practical engineering. It also had a positive guiding significance for stable operation and further application of the membrane bioreactor in the field of wastewater treatment and thus further expressed technological advantages of this process.
Membrane flux is an important indicator of the degree of membrane fouling, so this paper used intelligent simulation of MBR membrane flux to feed back membrane fouling. And membrane fouling index can be expressed as
According to filtering model based on Darcy’s law, the setting of the initial membrane flux
It is shown that
Finally, the setting of the membrane flux is determined by many factors, which is what this paper discussed and researched questions.
Mathematical simulation models are built on the basis of certain assumptions. This paper assumed that the entire membrane bioreactor system had been running in a stable state, activated sludge was completely trapped in the MBR, and materials in the MBR were fully mixed.
On this basis, for the historical data, a total of 80 groups, industrial production, and test of a MBR sewage treatment plant in Shijiazhuang city, after treating them by collecting, statistical analysis, and principal component analysis, we determine the MLSS of inlet, operating pressure, and the total resistance as three main factors affecting the MBR membrane flux. It is shown in Table
Data of membrane flux, pressure, and so forth collected.
Time (h)  Temperature (°C)  Pressure (MPa)  MLSS of inflow (mg/L)  Total resistance ( 
Fluxes (L/m^{2} h) 

1  24  0.016  343.38  2.05  46.4 
2  24  0.0168  378.15  2.403  45.5 
3  24  0.0175  392.42  2.989  45.3 
4  24  0.0243  472.43  3.796  42.2 
5  24  0.0268  483.73  3.957  45.1 
6  24  0.0291  583.16  4.41  42.2 
7  24  0.0325  556.43  5.119  39.7 
8  24  0.0362  503.56  6.075  37.3 
9  24  0.0351  591.41  7.143  31.4 
10  24  0.0385  561.85  8.421  28.9 
11  24  0.0269  612.42  7.623  21.7 
12  24  0.0226  655.47  9.737  14.5 
13  24  0.0198  712.43  11.659  11.2 
14  24  0.0193  615.12  12.911  10.5 
15  24  0.0187  715.89  12.54  9.4 
16  24  0.0157  331.28  1.793  51.8 
17  24  0.0164  380.15  2.4175  46.5 
18  24  0.0197  391.41  3.197  42.3 
19  24  0.0239  442.44  3.673  41.2 
20  24  0.0264  493.72  3.961  43.4 
21  24  0.0283  587.23  4.438  39.2 
22  24  0.0319  568.43  5.233  37.8 
23  24  0.0355  583.56  6.019  36.7 
24  24  0.0369  585.41  7.013  32.5 
25  24  0.0384  571.67  8.025  28.9 
26  24  0.0268  601.32  9.043  21.6 
27  24  0.0234  654.15  9.941  15.9 
28  24  0.0196  698.23  10.892  11.3 
29  24  0.0191  695.72  12.136  10.1 
30  24  0.0185  709.46  12.759  8.4 
In the experiment, we recorded that the BP network needs the evolution generations to meet preset accuracy requirements 3% in the different numbers of units in hidden layer. And after the evolution of each network was completed, we input test data to verify its accuracy and calculated the respective prediction error of average. After the network structure was determined, we input training data for network training, saved network structure after training, and input forecasting data validation. And we analyzed the prediction error between the actual output data and the desired one, thus evaluating the performance of BP network prediction of the MBR membrane flux.
The setting of BP algorithm parameters was as follows: the rate of the initial learning was 0.08; the initial space of the weights was
By the simulation of training samples and testing samples, we get the following chart (Figures
Relative errors of membrane flux prediction of BP network.
Desired values (L/m^{2} h)  11.2000  45.3000  42.3000  9.4000  21.7000  28.9000 
Actual values (L/m^{2} h)  10.2366  47.8755  41.6611  8.9128  23.2551  24.1967 
Relative error  0.0860  0.0569  0.0151  0.0518  0.0717  0.1627 


Average relative error  0.0740 
The error curve of membrane flux in BP network training process.
Measured values of membrane flux and predicted values of BP network.
As shown in Figure
However, it is shown from the relative prediction error values in Table
In the artificial neural network, although BP neural network is the most widely used and has many remarkable advantages, some limitations still exist [
slow convergence speed in the learning process;
easy to fall into local minima;
difficult to determine network structure;
lack of effective selection method about the learning step.
So, in order to make the BP neural network play a greater role in the field of forecasting, we need to make appropriate improvements in the actual modeling.
In response to these problems, researchers have proposed many effective improvements; for example, consider the following.
Known by the last section, the BP neural network can achieve the detection of the MBR membrane flux, but the accuracy and speed need to further improve. BP algorithm only adjusted connection weights of neural network from the local angle but did not examine the whole learning process form the global perspective. So it is easy to converge to local minimum. The first two methods for improving BP algorithm, proposed in the last section, are essentially to adjust network weights in the local area and cannot overcome the local searching feature of BP algorithm.
To avoid this, we need to consider it from the global angle. One of the ways to improve them is using the third method proposed in the last section. It is introducing the searching method of global intelligent optimization in the learning process of the neural network genetic algorithm. So this section considered adopting genetic algorithm to search for the initial weights and the threshold suitable to BP neural network, so as to realize the optimization of the network and achieve the purpose improving MBR membrane fouling prediction.
Genetic algorithm (GA) is a kind of random searching algorithm, referencing natural selection, and genetic mechanism of biological evolution. The algorithm is a new class of general optimization algorithm, for solving the optimization problem of general nonlinear searching. It is not required for linear, continuous, and micro of the model and also less affected by the number of variables and constraints. And it can be adaptive to learn and accumulate the information of search space, so as to find the optimal solution. GA has been applied for function optimization, combinatorial optimization, automatic control, robotics, parameter optimization of neural network, structure design, image processing systems, and other fields.
Compared with other optimization algorithms, GA optimization is a kind of robust and global searching algorithm, and it mainly has the following features:
adopting the encoding of the decision variables as operands;
directly taking values of the objective function as searching information;
using multiple searching points to search for information at the same time;
using probabilistic search technology.
BP algorithm is a kind of local searching method based on gradient descent. After the initial weight vector is determined, its searching direction is also determined. So the algorithm can only start from the initial value and gradually goes for the direction, until it meets the stopping criteria of algorithm. Its advantage is the better ability of local optimization, but the drawback is easy to fall into local minimum and slow convergence rate. This is because the initial weight vector of the BP network is selected randomly, which makes the direction of the process optimization without certainty. So the effect of the solution is sometimes good and sometimes bad. As a kind of probabilistic optimization algorithm based on the law of biological evolution, genetic algorithm has a strong adaptive searching and global optimization ability and can avoid local minimum points with great probability. Meanwhile, it does not need gradient information for solving problems, and its operation is more convenient. This shows that the genetic algorithm is suitable to be used to enhance the learning ability of BP algorithm. Therefore, we introduced GA ideas in the theory of BP network. The two can well complement each other and achieve the purpose of global optimization fast and efficiently. In fact, the combination of genetic algorithm and neural network has become one of the focuses of the research and application of artificial intelligence algorithms [
Optimizing weights and the threshold of the BP neural network by GA is divided into two parts. The first part used genetic algorithm embedding neural network and searched the best individual in the probable scope of the weights of BP network. The second part continued to use BP algorithm. On the basis of GA optimization, we used the optimal individuals searched by GA as initial weights and the threshold of BP network and then directly used BP algorithm to train the network. So this section mainly described achieved method, under the premise of fixed structure of BP network; that is, we first used GA to optimize initially connected weights and the threshold of BP network and then used BP algorithm to search accurately the optimal solution of the weight and the threshold.
GA optimizes weights and the threshold of neural network of BP algorithm, whose steps of implementation are as follows.
It ensured that the bigger the fitness value of individual is, the greater it is selected, and the lower the fitness value of individual is, the lower it is selected. But there is a small fitness value of the individual that may also be selected. Therefore, while choosing, we joined the best choice strategy and retained the optimal individual of each generation to the offspring.
The first part of the genetic BP algorithm was that we embedded neural network by genetic algorithm and searched out the optimal individual within the approximate range of the neural network weights. If the error sum of squares achieved
Genetic algorithm basically does not use external information in the process of the evolutionary search and is only based on the fitness function. So it is crucial for choosing fitness function, which directly affects the convergence rate of genetic algorithm and the ability to find the optimal solution. Since the objective function is error sum of squares of the neural network, and for getting its minimum value, so the fitness function adapts the inverse of error function.
The selecting operation used fitness proportion, which is the most common way, the cross used the method of arithmetic crossover, and variation method used the operation of nonuniform mutation. It was implemented with MATLAB statements as follows:
If the value of the fitness function, the optimal individual corresponding to, met accuracy requirements or reached iterations (
In summary, that used MATLAB7.10.0 (R2010) with installing the genetic algorithm toolbox gaot to compile file M, which achieved the optimization of weights and thresholds; the core code is as follows.
% Train the weight and the threshold of BP by GA.
% Decode the weight and the threshold form code
% Use the new weight and thresholds for training.
% Simulation test
To illustrate the performance of genetic algorithm for designing and optimizing weights and the threshold of neural networks, this paper used the same sample data. That is, we randomly selected 74 groups as the training sample and the rest were selected as test data to observe the training and testing performance of MBR membrane flux by the GABP network.
In the experiment, the error sum of square and the fitness curve of genetic algorithm are shown in Figure
The error sum of square and the fitness curve.
In the experiment, the BP network, optimized by genetic algorithm, only needs to go through 106 iterations to achieve the same predetermined error, which significantly accelerates the training speed of the network.
To detect the remaining 6 groups of data, the experimental result is shown in Figure
Relative error of the prediction of GABP network.
Desired values (L/m^{2} h)  39.2000  11.3000  43.4000  41.2000  46.5000  11.2000 
Actual values (L/m^{2} h)  36.7028  10.7743  44.6790  41.5090  45.3245  10.9101 
Relative error  0.0637  0.0465  0.0295  0.0075  0.0253  0.0259 


Average relative error  0.0331 
Predicted and measured values of the GABP membrane flux.
For MBR membrane fouling factor, the traditional mathematical model of MBR membrane fouling has some defects in different degrees, which cannot accurately explain the phenomenon of membrane fouling; this paper introduced some intelligent algorithms by consulting relevant references, such as neural network and genetic algorithm, to build the model of MBR membrane fouling and implement relevant optimization. First, we established the system model of MBR intelligent simulation based on BP neural network, about the relationship between the membrane fouling factors and membrane fouling that expresses the degree of membrane flux. The experiment found that it can be basically consistent between predicted value and desired value and only the error of a few points was larger. It indicated that the prediction model of BP neural network for membrane fouling was more successful. Referencing the characteristics of genetic algorithm, followed by optimizing the weight and the threshold of the BP neural network by using genetic algorithm, this paper established the prediction model of MBR membrane fouling that was based on GABP neural network. It was shown from experimental study that GABP network optimized was better than BP network model nonoptimized on the rate of convergence and prediction precision. It shows that, comparing to the relatively simple BP network, the GABP network was more suitable for the prediction of MBR membrane fouling.
The authors declare that there is no conflict of interests regarding the publication of this paper.