Performance Simulation of H-TDS Unit of Fajr Industrial Wastewater Treatment Plant Using a Combination of Neural Network and Principal Component Analysis

Nowadays, with regard to environmental issues, proper operation of wastewater treatment plants is of particular importance that in the case of inappropriate utilization, they will cause serious problems. Processes that exist in environmental systems and environmental engineers are dealing with them mostly have two major characteristics: they are dependent on many variables; and there are complex relationships between its components which make them very difficult to analyze. Being familiar with characteristics of industrial town effluents from various wastewater treatment units, which have high qualitative and quantitative variations and more uncertainties compared to urban wastewaters, plays very effective role in governing them. In order to achieve a better and efficient control over the operation of an industrial wastewater treatment plant, powerful mathematical tool can be used that is based on recorded data from some basic parameters of wastewater during a period of treatment plant operation. In this study, the multilayer perceptron (MLP) feed forward neural network with a hidden layer and stop training method was used to predict quality parameters of the industrial effluent. Data of this study are related to the Fajr Industrial Wastewater Treatment Plant located in Mahshahr—Iran that qualitative and quantitative characteristics of its units were used for training, calibration and evaluation of the neural model. Also, Principal Component Analysis technique was applied to modify and improve performance of generated models of neural networks. The results of this model showed good accuracy of the model in estimating qualitative profile of wastewater. This model facilitates evaluating the performance of each treatment plant units through comparing the results of prediction model with the standard amount of output.


Introduction
Improper operation of a Waste Water Treatment Plant (WWTP) may bring about serious environmental and public health problems, as its effluent to a receiving water body can cause or spread various diseases to human beings.Operation of a WWTP is often affected by a variety of physical, chemical, and biological factors.In order to follow the treatment plant performance during the operation, effluent measurements would not be sufficient.Predicting any of these parameters, depending upon the influent water quality, will help the operator to control the system and to take necessary precautions before any problem arisen.
In the industry, the use of modern control strategies is a must due to increasingly stringent regulation of effluent quality [1].Operational control of a biological WWTP is often a complicated task that is because of variation in raw wastewater compositions, strengths and flow rates of wastewater owing to the changing and complex nature of the treatment process.
Modeling a WWTP is considered a difficult task due to complexity of the treatment processes.A better control of a WWTP can be achieved through developing a robust mathematical tool for predicting plant performance based on past observations of certain parameters.The complex physical, biological and chemical processes involved in wastewater treatment may exhibit non-linear behaviors which are difficult to describe by linear mathematical models.
The modeling process that is traditionally used in bioprocesses is 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 nonlinear, time-variable and of a complex nature, traditional deterministic and empirical modeling has shown some limitations [2].Recently, computer-based methods have been applied to many areas of environmental chemistry.Nowadays, many studies based on intelligent methods were conducted in wastewater treatment, which are about predictions of WWTP output parameters.Among these, Artificial Neural Networks (ANNs) are complex, nonlinear analysis mathematical systems adapted to recognize patterns with regard to the structures and parameters of the networks chosen for each application.They comprise elements corresponding to some biological neuron characteristics, which are linked to each other through weighted connections, called "synaptic weights" [3,4].The ANN modeling approach does not require a description of how the processes occur in either the micro or macro environments and requires only the knowledge of important factors that govern the process.Due to the complexity of the processes, they are difficult to be modeled and simulated using conventional mathematical modeling.However, ANN is used in many areas of science and engineering as a promising tool because of its simplicity in simulation, prediction and modeling of process performance [5].
Recent studies indicated that consideration of statisticcal principles in the ANN modeling process will improve its performance [6].For example, Principal Components Analysis (PCA), which is a technique that shows an orthogonal variable transformation, can be used for pruning ANNs and improving nonlinear mapping.PCA is a useful statistical technique and is a common technique for finding patterns in data of high dimension.Most of the studies aimed to predict overall treatment plant performance or performance of a particular process, but none of them have considered the consecutive subsections (primary and secondary treatment units) in the whole WWTP.The Models for considering the main treatment units separately and estimating multiple parameters have not yet been sufficiently developed.It is clearly mentioned by Mingzhi et al. (2009) that in spite of some successful practical applications, there is still not an all-inclusive procedure or method to design such intelligent controllers by far because of its semi-empirical nature [7].Studies are generally based on two or three parameters input and single output.
In this study, high-TDS unit of Fajr industrial wastewater treatment plant was modeled to estimate pH, Chemical Oxygen Demand (COD), Total Dissolve Solids (TDS), total nitrogen (Total N) and total phosphorous (Total P).This study aimed to develop estimation models that can provide accurate prediction of the Fajr Petrochemical Treatment Plant operation.The best prediction performance was achieved when the data were preprocessed using PCA before feeding into back propagation [8].Three layers of neural network composed of 9 neurons in hidden layers and the Levenberg-Marquardt (LM) learning algorithm.

Brief Description of Fajr Petrochemical Effluent Treatment Plant
The Effluent Treatment Plant (ETP) receives effluents from different petrochemical companies located in the petrochemical zone of Bandar-e Imam-Southern Iran.The plant serves for treatment of wastewater before discharging into the sea or using for irrigation.
The ETP receives three types of wastewater streams: 1) Low salinity wastewater from the Amirkabir, Booali Sina, and Fajr Petrochemical Companies.The flow of this stream is in the range of 144 -421 m 3 /h.
2) High salinity wastewater from the Khuzestan petrochemical company.This wastewater stream has a high solid content.The flow of this stream is in the range of 17 -69 m 3 /h.
3) The low salinity wastewater will be pretreated in an oil-water separation area mainly consisting of a surge basin, an API separator, an equalization basin and a dissolved air flotation unit.
In a second step, the oil-free wastewater will be treated in an activated sludge stage together with the supernatant from offsite septic tanks.The activated sludge stage consists of an aeration basin and two clarifiers.After biological treatment, the flow passes a chlorination tank before discharging into the sea.A filtration unit is also foreseen, which will be additionally employed, when the treated water will be used for irrigation purposes.The high salinity effluent of Khuzestan Petrochemical Company (TDS = 127 g/l) will be treated in aerated lagoons separate from the treatment of low salinity wastewater.In order to facilitate biological treatment, high salinity effluent is mixed with treated effluent from the oily and sanitary water treatment facilities (Q max = 229 m 3 /h, TDS = 1.7 g/l).Additional treatment units are foreseen for oil water separation and sludge treatment, finally treated wastewater discharged into Moosa estuary (Figure 1).
Chemical dosing facilities provide the possibility of pH-adjustment, addition of polyelectrolyte for flotation unit and sludge dewatering, addition of emulsion breaking polymer, nutrients for biological systems, and chlorination.

Principal Component Analysis (PCA)
PCA is a projection-based statistical tool that is traditionally used for reduction of dimensionality [9].The purpose of PCA is to identify linear correlations between random variables aiming at data dimensionality reduction.The distribution of the variables is explained by a few linear features called principal components or factors, which describe major trends in the data.Consider a p-dimensional data set X that consists of zero-mean elements, X 1 , X 2 , •••, X p .Then, the maximum number of PCs is p and the j th principal component is: where h ij is the weight value that reflects the contribution of X i to a PC Y j .These equations can be described as: The application field of PCA is so wide that it includes process monitoring and fault diagnosis, the development of soft sensors and process optimization.As tried in this study, PCs that were extracted from data reduction through PCA can be used as inputs to the next step analysis.Recently, many studies have applied PCA to describe nonlinear processes by integrating PCA with other nonlinear modeling approaches such as ANNs [10].In this research SPSS software (version 15 th ) was used to perform PCA.The general steps of Principle Component Analysis are shown in Figure 2.

ANN Model Development
The parameters involved in this study were selected from the most critical operational parameters in wastewater treatment in environmental engineering (Table 1).They are also critical wastewater quality parameters.
In the model structure, the treatment plant composed of: mixing tank, completely mixed lagoon and facultative lagoon that finally discharged into the estuary.The procedure used to develop the ANN models is outlined in Figure 3.

Model Design
Neural Network Toolbox Neuro Solution 6 mathematical software was used to predict the effluent characteristics of Fajr ETP.The appropriate architecture of the neural network models was determined through several steps of training, testing and validating of the models.The nomenclature and Schematic ANN model for Fajr ETP are presented in Table 2 and Figure 4.
A three-layered feed-forward NN was used and trained with the error back propagation (Figure 5).The back     propagation training with generalized delta learning rule is an iterative gradient algorithm designed to minimize the mean square error between the actual output of a multilayered feed-forward NN and a desired outputs.Each layer is fully connected to the previous layer, and has no other connection [11].After completing the training procedure of the neural network, the weights of MLP are frozen and ready for use in the testing mode.
To achieve proper models configuration, functions with relatively low error level, hyperbolic tansig, logarithmic sigmoid (logsig) and purelin were selected and compared with the same training, testing and validating data.Finally, tangent sigmoid (tansig) activation function and linear transfer function (purelin) were used in hidden layer and in output layer, respectively.For a total of 151 series of data, 90 series (60% of total data) were used in training, 31 (20% of total data) in testing and 30 (20% of  The purpose of the training is to capture the relations between historical data of model inputs and corresp ing outputs.The back propagation is commenced by presenting the training data to the network at the input layer.The input signal flows through the network, producing an output signal, which is a function of the values of the connection weights, the transfer function and the network geometry.The learning process enables the network to find a set of weights that will produce the best possible input/output mapping.The output signal produced is then compared with the desired output signal with the aid of an error (mean squared error) function [12].

Model Execution
Once the training, testing can run the models and ob

Results and Discussions
Results obtained from neural models 3. The R value and RMSE error in data series is to another.In our case, the data series are the Target (actual) output values and the corresponding predicted output values generated by the model.R values range from -1.0 to +1.0.A larger (absolute value) R value indicates a higher correlation.The R values for the model on the training and test sets are close to each other, which means the model generalizes well and is likely to make accurate predictions.
Mean Absolute Error (MAE), determination coefficients (R 2 ) and RMS error a 2 e proportion of the total variation in predicted values that can be accounted for by the linear relationship with measured values.R 2 near to 0 indicate that the data points do not fall in a well-defined straight-line shape, and the slope near to 1 in the regression equation represent the equivalence of measured and predicted values.
Using a random selection method, 60% of all data records were assigned to the training set and 20% for tes g, while the remaining 20% were relegated to the validation set.
As described above, network training is done using the standard b nction is used as the transfer function in hidden layer and purelin transfer function in output layer due to its suitable application.
The best results were obtained for the ANN composed of nine (9) neurons i odels performance, the PCA technique was applied for data preprocessing.PCA seeks relevant directions for the input data that maximize variance.The combined use of PCA and ANN has been shown to provide prediction results that have statistical parameters significantly superior to  Given the profile of industrial wastewater has greater variations comparing to municipal sewage lues lower than urban wastewater is not unexpected.Considering the R 2 values obtained from the developed models that are presented in Table 3, their range riation which is between 0.59 and 0.84, and taking the complexity of treatment process into account, results of the model are satisfactory.If the number of data used in the model at various stages of training, testing and validation increases, we can expect to have significant increase in the value of R 2 parameter.
Comparing the results of modeling using both neural networks and PCA and neural mod served that using the combination PCA-ANN method provides better result and it is preferable to use that for

Conclusions
With regards to the fact that recorded data during plant operation a models, more data c and to increase the m with more data.To improve model accuracy, PCA technique was used that increased PCA-ANN hybrid structure of every 5 models.
Considering that effluents of 14 industrial units located in Special Economic Zone of Mahshahr are treated in Fajr Industrial Wastewater Treatment Plant, and there is lots of changes in quali ve an acceptable performance, but if more data are fed to models, the performance will be improved and we have more accurate outputs that facilitates evaluating the performance of each treatment plant units through comparing the results of prediction model with the standard amount of outputs.

Figure 1 .
Figure 1.Flow diagram of H-TDS unit of Fajr ETP.

Figure 2 .
Figure 2. Steps of Principle Component Analysis.

Figure 5 .
Figure 5.The general structure of a back propagation ANN used in this work.

2. 4 .
Model Training, Testing an total data) in validating procedure.d Validating hip ondand validating completed, we tain the predicted values.are indicated in ETP pH Effluent pH of ETP pH' Influent COD of H.TDS unit (mg/l) COD Effluent COD of H.TDS unit (mg/l) COD' Influent TDS of H.TDS (mg/l) TDS Effluent TDS of H.TDS (mg/l) TDS' Influent nitrogen (mg/l) N Effluent nitrogen (mg/l) N' Influent phosphor (mg/l) P Effluent phosphor (mg/l)

Figure 6 .
Figure 6.Comparison of the ETP data with PCA-ANN structure and ANN model.