Modeling of submerged membrane filtration processes using recurrent artificial neural networks

Received Nov 25, 2019 Revised Feb 15, 2020 Accepted Feb 22, 2020 The modeling of membrane filtration processes is a challenging task because it involves many interactions from both biological and physical operational behavior. Membrane fouling behaviour in filtration processes is complex and hard to understand, and to derive a robust model is almost not possible. Therefore, it is the aim of this paper to study the potential of time series neural network based dynamic model for a submerged membrane filtration process. The developed model that represent the dynamic behavior of filtration process is later used in control design of the membrane filtration processes. In order to obtain the dynamic behaviour of permeate flux and transmembrane pressure (TMP), a random step was applied to the suction pump. A recurrent neural network (RNN) structure was employed to perform as the dynamic models of a filtration process, based on nonlinear autoregressive with exogenous input (NARX) model structure. These models are compared with the linear auto-regressive with exogenous input (ARX) model. The performance of the models were evaluated in terms of %R, mean square error (MSE,) and a mean absolute deviation (MAD). For filtration control performance, a proportional integral derivative (PID) controller was implemented. The results showed that the RNN-NARX structure able to model the dynamic behavior of the filtration process under normal conditions in short range of the filtration process. The developed model can also be a reliable assistant for two different control strategies development in filtration processes.


INTRODUCTION
A membrane bioreactor (MBR) is well-known as the best alternative to the conventional activated sludge (CAS) system for wastewater treatment. The application of an MBR has seen its rapid development globally in providing a better treatment of influent, either from industrial or domestic wastewater. The most significant part in any MBR system is the membrane filtration technology from which MBR has benefitted tremendously. A membrane filtration system, however, can still stumble upon various issues such as fouling and energy efficiency [1][2][3][4]. The factors that govern fouling in membrane filtration system are many and varied. Of such factors are accumulated from colloidal, particulate, solute material, microorganisms, membrane material, cell debris and etc [5][6]. Fouling can lead to a membrane clogging, resulting in that the membrane pore will be blocked by solid material. When this phenomenon occurs, the transmembrane pressure (TMP) rises or the permeate flux declines. As a result, uncontrollable pressure rises and the permeate flux declines, which will lead to membrane damage.
Currently, various physical cleaning techniques are performed globally in many pilot and full scale membrane filtration processes. From an operational point of view, fouling can be minimized by using techniques such as air bubble (aeration) control, relaxation, backwashing, and chemical cleaning [5][6][7]. Another way to reduce fouling is by running below critical flux condition [8][9]. By a proper control and good operating conditions to ensure stability and optimal flux of the filtration process, membrane and scaling can also be minimized [10][11].
Mathematical model of membrane filtration process plays an important role in the understanding of membrane fouling. The model can be utilized in the development of control system design and optimization [12][13]. In the literature, several form of mathematical models have been proposed in order to understand fouling mechanisms in the filtration systems [14][15][16][17][18]. Some models were derived to predict the behavior of a membrane filtration process. For example, [19] applied the Darcy and Stoke laws to model a submerged hollow fiber MBR system. TMP model was developed using Stoke law, while the Darcy provided series of resistance in order to model fouling for hollow fiber membrane filtration systems. Several modifications of Darcy's law have been performed by many researchers to further improve the filtration model.
Artificial neural network (ANN) is one of the most promising techniques in modelling of MBR filtration process [20][21][22]. One in particular, [23] developed two MBR models using semi-empirical model and ANN based model for permeate flux modeling within a submerged capillary MBR. Another modeling of submerged membrane bioreactor (SMBR) using an ANN model was demonstrated by [24] for a flat sheet membrane filtration application of wastewater treatment. This model represented a backwash effect for permeate flux. In [25] developed ANN models for the effluent quality of SMBR that treating cheese whey wastewater.
Most of the ANN models developed for SMBR filtration process are not suitable for control applications. MBR filtration requires more simpler and reliable models to be utilized in the controller development. In [26] proposed time series system identification modeling technique using two inputs and one output of the membrane filtration parameter. The filtration models are developed using linear autoregressive with exogenous input (ARX), ARMAX, subspace and state space techniques. The data are obtained from the flux stepping experiment. The results showed that only the subspace has the potential to model the filtration process with multiple input one output (MISO) system. The important of time series modeling also presented by [27] where the time series analysis can reveal the characteristic of the phenomenon as well as the future prediction of the membrane filtration process. The authors successfully developed the time series ANN model for short term forecasting cross-flow membrane filtration process. However, the non-linear time series modeling for the SMBR filtration process have not yet been established. Due to the complexity of membrane fouling behaviour, this non-linear series of model is of priority to discover to enhance the understanding of the dynamic behavior of membrane filtration process.
Therefore, this paper focuses on the development of SMBR filtration process using ANN-ARX time series modelling technique which known as nonlinear NARX model. The models are then compared with the linear ARX filtration models, which later used in the designing of control strategies for the membrane filtration system. The proportional integral derivative (PID) control is designed to control the flux to ensure that operation of the process is as simple as possible for industrial membrane bioreactor. Two single input single output (SISO) PID controllers were developed for two control strategies. The first strategy aims for permeate flux control while observing the TMP behaviour. The second strategy is where TMP is controlled and the while permeate flux is observed. Both simulation and real experimental tests have been performed for these control strategies.

EXPERIMENT SETUP
The experiments were carried out in a single tank aerobic submerged membrane bioreactor, with a working volume of 20 L palm oil mill effluent (POME) supplied by Sedenak Palm Oil Mill Sdn. Bhd. in Johor, Malaysia. The working temperature for the bioreactor was 28 ± 1 °C. The plant was operated with a 120 second permeate and a 30 second relaxation period. The airflow rate was maintained around 5-7 SLPM with a DO level of more than 2 PPM. Figure 1 shows the pilot plant setup for the experiment. The sequential operation of the plant was controlled and monitored by using National Instruments LabVIEW 2009 software with an NI USB 6009 interfacing hardware.  In this work, a Polyethersulfone (PES) material with an approximate 80-100kda pore size and with an effective membrane surface area of about 0.35 m 2 was used in the filtration system. In Figure 2, the graph from the experiment data is shown. This data is divided into two sets of data which are 50% for training and another 50% for testing data set.

NARX Modeling
Nonlinear autoregressive with exogenous input (NARX) developed using past input-output data are employed to predict the current output. This time series prediction method is given as a general equation of NARX as below (1).
Where = 1,2, … , ̂( ), 1 ( − 1 ) and 1 ( − 1 ) is the predicted output and are the past input and the past output lags, respectively, is the number of the output and is the number of the input, ( ) is the residual and represents the nonlinear function of the structure. In this paper, the nonlinear function of the algorithm is estimated using the feed-forward neural network (FFNN) with a recurrent structure. Unlike ( ) and ( ) is the output and input of the system, respectively. nd are of respectively the output and input lags used in the modeling. The adjustable parameters in the (2) is defined as: The is estimated by minimizing the lost function given by (5).
In this work, a Lavenberg Marquardt (LM) back propagation algorithm (BP) was utilized to train the network with six hidden neurons. The performance of the permeate flux prediction for all of the methods was based on three criteria which are the correlation coefficient (R 2 ), the mean square error (MSE), and the mean absolute deviation (MAD). The equations of the MSE and the MAD are given in (7) and (8)  Where ̂ is the predicted value and is the actual value from the measurement data and is the number of the data point.  (8) Where is the predicted value and ̅ is the mean of the predicted value.

RESULTS AND DISCUSSION
Figures 4 to 7 present the TMP and flux modelling results. As can be seen from figures, the results obtained with the proposed NARX are significantly better than those obtained with the linear ARX models (both for training and testing). The performance evaluation for TMP model training shown in Figure 4 indicates more than 98% for R 2 , with MSE and MAD values of 0.0011 and 0.0248, respectively. This performance is much better compared with the linear ARX model (%R 2 at 68.86, MSE at 0.0144 and MAD 0.0508). For flux training model as shown in Figure 5, the R 2 , MSE and MAD give 97.3%, 0.0049, and 0.0338, respectively, while the linear ARX model gives 68.42 for %R 2 , 0.0082 and 0.0510 for MSE and MAD, respectively.   For control strategy, using the models obtained in the previous section, a PID controller was considered to control the permeate flux at desired set point. The results of the implementation of this controller, both for simulation and from the real experimental setup are presented. Using PID controller, the filtration can be performed without any significant decline in flux shown in Figure 8. However, TMP shows slightly increment from cycle to cycle, which indicates the occuring of fouling phenomena in membrane filtration process. With the assistance of this model, further action such as scheduling of the back wash cleaning can be performed accordingly by operators. The simulation results in Figure 8 and Figure 9 were verified with the real time experiment, both for flux and TMP control strategies. For flux (real time control), it can be seen that shown in Figure 10, the flux can track the setpoint well till the end of the cycle using PID controller. The TMP is however indicated small increment shown in Figure 11, although this is slightly lower than the increment presented in the simulation result (approximately by 20 mbar).  Figure 9. TMP effect (by simulation) Figure 10. PID flux control (real time) Figure 11. TMP effect of PID controller (real time) As shown in Figure 12, PID was able to control the TMP at a desired set point. In this control strategy, fouling caused the flux to decline as the filtration cycle increased shown in Figure 13. These phenomena are as expected, however through control design strategies, fouling can be properly delayed and minimized.  Figure 14. Also, the last four cycles in Figure 14 illustrates rapid decrement of permeate flux compared with the actual. These may caused by an external disturbance during the experiment or unmeasured variables during the modeling procedures. Figure 15 shows the effect of the TMP control to the permeate flux as observed in the experiment. In general, the range of values for permeate flux are still acceptable and within the actual and real time experiments. Figure 14. PID for the TMP control (real time) Figure 15. Effect of the TMP control to flux (real time) From both control (flux and TMP control strategies), it was found that the flux control of the membrane filtration is preferable to TMP control. This is due to the flux declination in TMP control was faster than that the TMP rises in permeate flux control. The cleaning process can be a further process to maintain efficient filtration at an appropriate TMP value.

CONCLUSION
In this paper, the comparison between two time series modeling that are linear ARX and the NARX modeling techniques for the control strategies of a membrane filtration process was realized. The developed models are to be used for process below a critical flux condition. The training and testing results have proven the NARX model is preferable to linear ARX model in terms of an accuracy that measured using MSE, MAD and R 2 criteria. The structure of the NARX model implemented in this paper allows the simulation to be done without the need to retrain the model. The developed models can be used to facilitate plant operators for the designing of membrane filtration control systems. In this work, a basic PID controller was applied to demonstrate the application of the models in control system development. Two strategies were implemented; (1) a permeate flux control and (2) a TMP control. The first (1) strategy able to control the flux at a desired set point, although with the increment in the TMP due to fouling development. A similar result was found in the second (2) strategy, whereby the controller was able to maintain the TMP, while the flux itself was observed to decline. These two strategies were also verified in a real time experiment with the aerobic SMBR. The results showed a similar trend with one by simulation. The different was only in magnitude of the outputs (either flux or TMP). From the two strategies considered in this work, it can be seen that the first strategy is preferable to the second strategy for this type of filtration system. This is due to the tradeoff between the flux declination in TMP control and the increment of the TMP in flux control. Finally, the future works of this study will utilize the model for a neural network based model predictive control development in controlling the SMBR filtration process.