Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 2, No. 1, 2022 26 Research of BP Neural Network Based on GA-WOA Algorithm Optimization in MBR Membrane Pollution Simulation Mengyuan Wang, Chunqing Li School of Software, Tiangong University, Tianjin 300387, China Abstract: For the membrane fouling problem faced by the MBR (Membrane Bio-Reactor) system, an intelligent model is constructed to predict the membrane fouling. The BP neural network has strong self-learning, self-adaptive and generalization capabilities and is widely used in the prediction of MBR membrane pollution, but membrane fouling is a complex dynamic process, which is difficult to simulate accurately by classical mathematical models. Aiming at this problem, the GA-WOA hybrid algorithm was introduced to optimize the BP neural network, and the MBR membrane fouling prediction model was constructed. The simulation results show that the BP neural network model optimized by GA-WOA hybrid algorithm is more suitable and accurate than that optimized by whale optimization algorithm in predicting MBR membrane fouling. Keywords: BP neural network; GA-WOA hybrid algorithm; MBR system. 1. Introduction With the increase of urban population and social economic development, the social problem of water scarcity has become increasingly prominent. Based on the traditional biological treatment system, combined with membrane separation technology, membrane bio-reactor has the advantages of small floor area and good effluent quality [1]. The MBR system is also widely used in daily sewage treatment process and the sewage industrial production and treatment process. The MBR system is mainly composed of membrane biological system and membrane modules [2]. When the MBR system is running, the wastewater flows to each membrane module, and the membrane modules will filter out macro molecular particles to achieve the purpose of filtering sewage [3]. But in this process, membrane fouling causes membrane filtration. Due to the serious attenuation of membrane flux, the main obstacle to the application of membrane bio-reactor is membrane pollution, which seriously affects the sewage treatment efficiency of membrane bio-reactor system [4]. The BP neural network is used as the main body of the algorithm, and genetic and whale optimization algorithms are introduced to optimize the initial weights and thresholds of BP neural network [5]. The results show that the training efficiency and accuracy of the model are significantly improved. 2. Algorithm 2.1. Genetic algorithm The Genetic Algorithm (GA) is a computational model of the biological evolution process imitating the natural selection theory and genetic principles in Darwin's theory of biological evolution. The algorithm has excellent global optimization ability and adaptive search direction selection ability, and finds the way to ask the optimal prediction solution by imitating the natural evolution process. The basic operation process is: (1) Using random methods or other methods to generate an initial population; (2) Construct the fitness function according to the objective function of the problem. The fitness function is used to characterize the adaptability of each individual of the population to its living environment; (3) According to the fitness value, it continuously selects and reproduces, and genes are updated through crossover and mutation; (4) The individual with the best fitness value after several generations is the optimal solution. The algorithm flow is shown in Figure 1. Figure 1. GA optimizes the flow of BP neural network 2.2. Optimization algorithm Whale Optimization Algorithm (WOA) is proposed based on the behavior of whales to hunt prey. During the hunting period, whales use mutual cooperation to drive and round up their prey. The whale optimization algorithm divides the algorithm into three stages: the surrounding predation stage, the spiral renewal stage, and the hunting stage. The algorithm 27 has the advantages of less adjustment parameters and simple operation [6]. 2.2.1. Surrounding predation stage During the search for prey, whales constantly approach the next prey through continuous communication of the whole group and then try to approach the closer prey by random selection. The mathematical model surrounding the predation stage is: D=|C·XP(t)-X(t)| (1) X(t+1)=XP(t)-A·D (2) We measure the size of the fish population as N, d- dimension is the search space, Xi=(xi 1, xi 2 , …, xi d), i-1, 2,…, N , is the position of the whale in d-dimension space, and the global optimal solution to the problem is the position of the corresponding prey. Where, t is the current number of iterations; X(t) is ta single position vector; Xp(t) is the position vector of prey (current optimal solution); A and D are coefficient vectors respectively, and: A=2a·r1-a (3) C=2·r2 (4) Where r1 and r2 are random numbers of [0,1] respectively; a is the control parameter, which decreases linearly from 2 to 0 with the increase of iteration times, that is: a(t)=2- 2t Max_iter (5) 2.2.2. Spiral renewal stage At this stage, the whale uses a spiral approach to approach the prey, in order to achieve the purpose of capturing the prey. Before the individual whale approaches the prey in a spiral manner, it first estimates the distance to the prey. The mathematical model is: X(t+1)=D·ebl·cos(2πl)+Xp(t) (6) b is the constant that specifies the shape of the logarithmic helix; 1 is a random number of [-1, 1]. Among them, p is used to determine the probability of which position update method the whale individual performs. The purpose is to realize the synchronization of contraction enclosure and spiral update. Its model is as follows: X(t+1)=Xp(t)-A·D(p<0.5) (7) X(t+1)=D·ebl·cos(2πl)+Xp(t)(p≥0.5) (8) 2.2.3. Hunting stage Whales use the value of |A| to control whether to hunt for prey or surround prey. The model is as follows: D=|C·Xrand(t)-X(t)| (9) X(t+1)=Xrand(t)-A·D (10) 2.3. GA-WOA hybrid algorithm to optimize BP neural network As a feed-forward neural network, BP neural network is mainly characterized by forward transmission of signals while reverse transmission of error information. BP neural network has the ability of self-learning and generalization, so it is widely used, but it also has disadvantages such as slow self-learning speed and high possibility of training failure. The basic idea of GA-WOA hybrid algorithm to optimize the BP neural network is to optimize the initial weights and thresholds of the BP neural network through the GA and the WOA, thereby reducing the training error, improve the training rate and accuracy, and finally improve the network detection rate and network recognition rate, so as to achieve the ultimate goal of optimizing the network [7]. The process is: (1) The neural BP network is initialized to determine the input-output structure, initial connection weight and threshold of the network; (2) Initialize the GA-WOA hybrid algorithm and encode the initial value of GA according to the initial value and threshold; (3) Taking the training error of the neural BP network as fitness value, selection and other operations are performed until the conditions are met; (4) Obtain the optimal weights and thresholds; (5) Calculate the error update weight and threshold; (6) Output the error result. The algorithm flow chart is shown in Figure 2. Figure 2. GA-WOA hybrid algorithm to optimize BP neural network flow chart 3. Simulation experiment results and analysis This experiment selects the actual MBR system operating data of Shijiazhuang sewage treatment plant. The filtration membrane is a polyvinylidene fluoride micro filtration membrane with a pore size of 0.2μm. 35 sets of experimental data are used as training samples, and 12 sets of experimental data are used as verification samples. Figure 3. Comparison between predicted value and real value of neural network 28 The comparison line between the prediction result of the model and the real value is shown in Figure 3. The comparison of the two models from the broken line diagram shows that the change trend and accuracy of the BP neural networks model optimized by the GA-WOA hybrid algorithm are significantly better than those of BP neural networks optimized by the WOA. Figure 4. Comparison of model prediction errorst Figure 4 shows the prediction error of WOA-BP neural network model and GA-WOA hybrid algorithm to optimize BP neural network model. Comparing the prediction errors of the two groups of models, it can be seen that the neural network model optimized by GA-WOA hybrid algorithm and the prediction data accuracy are more than 0.95. The broken line diagram shows that the model has high accuracy and achieves the expected goal of accurately predicting membrane flow. As shown in Figure 5, the adaptive convergence curve results of WOA and GA-WOA hybrid algorithm. Compared with WOA, GA-WOA hybrid algorithm can be the optimal solution with the least number of iterations. Compared with GA-WOA hybrid algorithm, WOA has higher convergence speed, but it has the defect of exiting the local optimal resolution. The results show that GA-WOA hybrid algorithm is more suitable for thin film flow prediction. Figure 5. Comparison of model fitness values The experimental results show that the BP neural network model, optimized by the GA-WOA hybrid algorithm, is significantly improved in terms of predictive value and error value compared to the original method. 4. Conclusion MBR treatment of sewage is a complex dynamic process with multi-process, time-varying, uncertain and other characteristics, and it is difficult to model directly with mathematical models. The genetic algorithm and the whale algorithm have the advantages of stronger search ability and the ability to jump out of the local optimal solution. Therefore, this paper proposes to use the GA-WOA hybrid algorithm to optimize the BP neural network, and builds a membrane fouling prediction model. The network has a positive effect on improving the accuracy and fitness, and is obviously effective for model optimization. The research of this work has a certain theoretical value and practical significance and provides a certain basis for the related research in the field of membrane fouling in the MBR in the future. References [1] Xue Wanze. Application of membrane bio-reactor in wastewater treatment[J]. Theoretical Research in Urban Construction, 2015, 5(34). [2] Zhang Y, Chen Z, An W, et al. Membrane integrity risk assessment of fully installed MBR sewage treatment plant[J]. Journal of Environmental Sciences, 2015. [3] Tang Chaochun, DuanXianyue, Ye Xin , et al. Research progress on the mechanism and influencing factors of MBR membrane fouling[J]. INDUSTRIAL WATER TREATMENT, 2017, 37(4):4. [4] Han Yongping, Xiao Yan, Song Lei, et al. Research progress on the formation of MBR membrane fouling and its influencing factors[J]. Membrane Science and Technology, 2013(1):9. [5] Kaneko H, Funatsu K. Physical and statistical model for predicting a transmembrane pressure jump for a membrane bio- reactor[J]. Chemometrics & Intelligent Laboratory Systems, 2013, 121(Complete):66-74. [6] Ma Chuang, Zhou Daiqi, Zhang Ye. BP neural network water resource demand forecasting method based on improved whale algorithm[J]. Computer Science, 2020, 47(S02):5. [7] Chen Zhiwei. Soil parameter prediction based on genetic algorithm-whale algorithm optimizing backpropagation neural network[J]. Zhejiang Agricultural Science, 2019, 60(1):5.