OURNAL

Alexandria Engineering Journal (2012) 51, 37-43

FACULTY OF ENGINEERING ALEXANDRIA UNIVERSITY

Alexandria University Alexandria Engineering Journal

www.elsevier.com/locate/aej www.sciencedirect.com

Application of Artificial Neural Network (ANN)

for the prediction of EL-AGAMY wastewater treatment

plant performance-EGYPT

Mahmoud S. Nasr *, Medhat A.E. Moustafa, Hamdy A.E. Seif, Galal El Kobrosy

Sanitary Engineering Department, Faculty of Engineering, Alexandria University, P.O. Box 21544, Alexandria, Egypt

Received 23 October 2010; accepted 21 March 2011 Available online 29 August 2012

KEYWORDS

Artificial neural networks;

MATLAB;

Modeling;

Statistical analysis;

Wastewater plant

Abstract A reliable model for any Wastewater Treatment Plant WWTP is essential in order to provide a tool for predicting its performance and to form a basis for controlling the operation of the process. This would minimize the operation costs and assess the stability of environmental balance. This paper focuses on applying an Artificial Neural Network (ANN) approach with a FeedForward Back-Propagation to predict the performance of EL-AGAMY WWTP-Alexandria in terms of Chemical Oxygen Demand (COD), Biochemical Oxygen Demand (BOD) and Total Suspended Solids (TSSs) data gathered during a research over a 1-year period. The study signifies that the ANN can predict the plant performance with correlation coefficient (R) between the observed and predicted output variables reached up to 0.90. Moreover, ANN provides an effective analyzing and diagnosing tool to understand and simulate the non-linear behavior of the plant, and is used as a valuable performance assessment tool for plant operators and decision makers.

© 2012 Faculty of Engineering, Alexandria University. Production and hosting by Elsevier B.V.

All rights reserved.

1. Introduction

In recent years, computer-based methods have been applied to many areas of environmental issues. Operational control of a biological Wastewater Treatment Plant (WWTP) is often

complicated because of variations in raw wastewater compositions, strengths and flow rates owing to the changing and complex nature of the treatment process [9]. Moreover, a lack of suitable process variables limits the effective control of effluent quality [10]. The characteristics of influent to the WWTPs are varied from one plant to another depending on the type of community lifestyle. Therefore, the performance of any WWTP depends mainly on local experience of a process engineer who identifies certain states of the plant [11].

Traditional modeling techniques used in bioprocesses are based on balance equations together with rate equations for microbial growth, substratum consumption and formation of products. And since microbial reactions coupled with environmental interactions are non-linear, time variable and of a complex nature [12], traditional deterministic and empirical

1110-0168 © 2012 Faculty of Engineering, Alexandria University. Production and hosting by Elsevier B.V. All rights reserved. http://dx.doi.org/10.1016/j.aej.2012.07.005

Corresponding author. E-mail addresses: mahmmoudsaid@gmail.com (M.S. Nasr), medhat002000@yahoo.com (M.A.E. Moustafa), hamdy.seif@link.net (H.A.E. Seif), elkobrosy@yahoo.com (G. El Kobrosy). Peer review under responsibility of Faculty of Engineering, Alexandria University.

Figure 1 Neural networks training structure.

modeling has shown some limitations [3]. Also predicting the plant operational parameters using conventional experimental techniques is a time consuming step and is an obstacle in the way of efficient control of such processes [8].

Artificial Neural Network ANN technique can be used for modeling such WWTP processes. It can be used for better prediction of the process performance owing to their high accuracy, adequacy and quite promising applications in engineering [6,13,15]. It normally relies on representative historical data of the process. In a WWTP, there are certain key explanatory variables which can be used to assess the plant performance. These variables include Biological Oxygen Demand (BOD), Chemical Oxygen Demand (COD), and Total Suspended Solids (TSSs). Most of the available literature on the application of ANNs for modeling WWTPs utilized these variables and found that the ANN-based models provide an efficient and robust tool in predicting WWTP performance. It was found a correlation index equal to 0.8 for a coke furnace [2] and 0.82 for an acetic anhydride production plant [14]. For modeling WWTPs using ANN, Hamoda et al. [9] found a correlation index of 0.74 for BOD prediction, Belanche et al. [1] found 0.504 for COD prediction and Hack and Kohne [7] found 0.92 and 0.82 for COD and nitrate prediction, respectively.

This paper addresses the problem of how to capture the complex relationships that exist between process variables and to diagnose the dynamic behavior of EL-AGAMY WWTP by applying an ANN model. Safer operation and control of the plant can be achieved by developing an ANN model

for predicting the plant performance based on past observations of certain key product quality parameters.

2. Methods

2.1. Artificial Neural Network (ANN) theory

Artificial Neural Network (ANN) is an information processing system that is inspired by the way such as biological nervous systems e.g. brain. The objective of a neural network is to compute output values from input values by some internal calculations [4].

Neural network is trained to perform a particular function by adjusting the values of the connections (weights) between elements (based on a comparison of the output and the target) until the network output matches the target, so that the network can predict the correct outputs for a given set of inputs. Fig. 1 illustrates such a situation.

Neural networks is trained to perform complex functions in various fields, including pattern recognition, identification, classification, speech, vision, and control systems. It is also trained to solve problems that are difficult for conventional computers or human beings.

There are many different types of training algorithms. One of the most common classes of training algorithms for Feed Forward Neural Networks FFNNs is called Back Propagation BP [5].

The basic component of a neural network is the neuron, also called "node". Fig. 2 illustrates a single node of a neural network. Inputs are represented by a1, a2 and an, and the output by Oj.

There can be many input signals to a node. The node manipulates these inputs to give a single output signal. The values W1j, W2j, and Wnj, are weight factors associated with the inputs to the node. Weights are adaptive coefficients within the network that determine the intensity of the input signal. Every input (ax,a2,...,an) is multiplied by its corresponding weight factor (Wy, W2j,..., Wnj), and the node uses summation of these weighted inputs (Wy \ ax, W2j \ a2,..., Wnj \ an) to estimate an output signal using a transfer function.

The other input to the node, bj, is the node's internal threshold, also called bias. This is a randomly chosen value that governs the node's net input through the following equation:

Figure 2 Single node anatomy.

12 3 4

Figure 3 Analysis of influent COD, BOD, and TSS/ EL-AGAMY WWTP using ANOVA1.

12 3 4

Figure 4 Analysis of effluent COD, BOD, and TSS/ EL-AGAMY WWTP using ANOVA1.

Table 1 Properties of each layer in the neural network modeling.

Number of Transfer function neurons

Layer 1 10 Tangent sigmoid transfer function TANSIG

Layer 2 30 Tangent sigmoid transfer function TANSIG

Layer 3 - Linear transfer function PURELIN

< = £(W-

Node's output is determined using a mathematical operation on the node's net input. This operation is called a transfer function. The transfer function can transform the node's net input in a linear or non-linear manner. Three types of commonly used transfer functions are as follows:

f(x) =

Sigmoid transfer function 1

1 + e-

0 < f(x) 6 1

Hyperbolic tangent transfer function

ex —

f(x) = tanh(x) = -

1 6 f(x) < 1

ex + e—x • Linear transfer function

f(x) — x — 1 < f(x) < +1

The neuron's output Oj is found by performing one of these functions on the neuron's net input Uj.

2.2. Data collection

Artificial Neural Network ANN model was developed to simulate EL-AGAMY WWTP. This plant is a sequencing batch reactor SBR system located in Alexandria/EGYPT that serves EL AGAMY zone with a design capacity of 50,000 m3/d and achieves a secondary treatment to meet the Egyptian effluent-standards for the treated domestic sewage.

Measurements of the COD, BOD, and TSS were collected over a 1-year period. This period was satisfactory as it covers all probable seasonal variations in the studied variables.

Figure 5 The network during training.

Figure 6 Network regression.

Since creating an ANN model relies on the historical data, therefore the input and output data gathered during the research were analyzed statistically by means of one-way analysis of variance ANOVA1 function in MATLAB software. Moreover, ANOVA1 function is applied before ANN in order to reject the inaccurate measured raw data.

The preprocessed data set was classified into four groups in a matrix and analyzed statistically by generating a box and whiskers [16] plot for each variable, each group is a column in the matrix where the 1st group represents January, February, and March months' data, the 2nd group represents April, May, and June months' data, the 3rd group represents July, August, and September months' data and the 4th group represents October, November and December months' data.

These plots summarize each variable by four components as follows: a central line in each box is the sample median to indicate central tendency or location; a box to indicate variability around this central tendency (the edges of the box are the 25th and 75th percentiles); whiskers around the box to indicate the range of the variable; and observations beyond the whisker length are marked as outliers displayed with a +ve sign where its value is more than 1.5 times the interquartile range away from the top or bottom of the box.

Influent and effluent parameters (COD, BOD, and TSS) are shown in Figs. 3 and 4 respectively.

2.3. Network properties

After achieving the statistical analysis step, the neural network model was created in MATLAB software that offers a platform for the simulation application. MATLAB Toolbox opens the Network/Data Manager window, which allows the user to import, create, use, and export neural networks and data. The Network properties are as follows:

• Network inputs: COD, BOD, and TSS.

• Network outputs: COD, BOD, and TSS.

• Network type: Feed-Forward Back-Propagation.

• Training function: TRAINLM.

• Adaption learning function: LEARNGDM.

• Performance function: MSE.

• Number of hidden layers: 3.

Table 1 represents the properties of each layer. 3. Results and discussion

The network uses the default Levenberg-Marquardt algorithm for training. The application randomly divides input vectors and target vectors into three sets as follows: 60% are used for training; 20% are used to validate that the network is generalizing and to stop training before over-fitting; the last 20%

Figure 7 Simulation results.

are used as a completely independent test of network generalization.

Fig. 5 shows an opened window of the network during training. This window displays training progress and allows the user to interrupt training at any point by clicking stop training.

The regression button in the training window performs a linear regression between the network outputs and the corresponding targets. Fig. 6 shows the results.

It is observed that the output tracks the targets very well for training (R-value = 0.93004), validation (R-value = 0.86323), and testing (R-value = 0.86289). These values can be equivalent to a total response of R-value = 0.90317. In this case, the network response is satisfactory, and simulation can be used for entering new inputs.

The simulation results of effluent COD, BOD and TSS are presented in Fig. 7 by plotting the measured and predicted output variables.

4. Conclusion

The results of this study indicated high correlation coefficient (R-value) between the measured and predicted output vari-

ables, reaching up to 0.9. Therefore, the model developed in this work has an acceptable generalization capability and accuracy. As a result, the neural network modeling could effectively simulate and predict the performance of EL-AGAMY WWTP.

It is concluded that, ANN provides an effective analyzing and diagnosing tool to understand and simulate the non-linear behavior of the plant, and is used as a valuable performance assessment tool for plant operators and decision makers.

References

[1] L.A. Belanche, J.J. Valdes, J. Comas, I.R. Roda, M. Poch, Towards a model of input-output behavior of wastewater treatment plants using soft computing techniques, Environmental Modelling and Software 14 (1999) 409.

[2] J. Blaesi, B. Jensen, Can neural networks compete with process calculations?, Intech Applying Technology 39 (12) (1992) 34-37

[3] M. Cote, B.P. Grandijean, P. Lessard, J. Yhibault, Dynamic modeling of the activated sludge process: improving prediction using neural networks, Water Research 29 (1995) 995-1004.

[4] V.N. Delgrange, N. Cabassud, M. Cabassud, L. Durand-Bourlier, J.M. Laine, Neural networks for prediction of ultrafiltration transmembrane pressure: application to drinking

water production, Journal of Membrane Science 150 (1998) 111— 123.

[5] H. Demuth, M. Beale, M. Hagan, Neural Network Toolbox 5: Users Guide. Natick, MA, The MathWorks Inc., 2007.

[6] R.S. Govindaraju, Artificial neural network in hydrology. II: hydrologic application, ASCE task committee application of artificial neural networks in hydrology, Journal of Hydrologic Engineering 5 (2000) 124—137.

[7] M. Hack, M. Kohne, Estimation of wastewater process parameters using neural networks, Water Science and Technology 33 (1) (1996) 101—115.

[8] M. Hamed, M.G. Khalafallah, E.A. Hassanein, Prediction of wastewater treatment plant performance using artificial neural network, Environmental Modeling and Software 19 (2004) 919— 928.

[9] M.F. Hamoda, I.A. Al-Gusain, A.H. Hassan, Integrated wastewater treatment plant performance evaluation using artificial neural network, Water Science and Technology 40 (1999) 55—69.

[10] P. Harremoes, A.G. Capodaglio, B.G. Hellstrom, M. Henze, K.N. Jensen, A. Lynggaaard-Jensen, R. Otterpohl, H. Soeborg, Wastewater treatment plants under transient loading

performance, modeling and control, Water Science and Technology 27 (12) (1993) 71—115.

[11] Y.-S.T. Hong, M.R. Rosen, R. Bhamidimarri, Analysis of a municipal wastewater treatment plant using a neural network-based pattern analysis, Water Research 37 (7) (2003) 1608—1618.

[12] D.S. Lee, J.M. Park, Neural network modeling for on-line estimation of nutrient dynamics in a sequentially-operated batch reactor, Journal of Biotechnology 75 (1999) 229—239.

[13] H.R. Maier, G.C. Dandy, Neural networks for prediction and forecasting of water resources variables: a review of modeling issues and applications, Water Resources Research 15 (2000) 101—124.

[14] C.A.O. Nascimento, R. Giudici, R. Guardani, Neural network based approach for optimization of industrial chemical process, Computers and Chemical Engineering 24 (10) (2000) 2303—2314.

[15] T.R. Neelakantan, T.R. Brion, S. Lingireddy, Neural network modeling of cryptoposporidium and giardia concentrations in Delware River, USA, Water Science and Technology 43 (2001) 125—132.

[16] J.W. Tukey, Explanatory Data Analysis, Addison-Wesley, Reading, MA, 1977.