Estimation of Ammonia-Nitrogen ( NH 3-N ) Using an Artificial Neural Networks Under Bacterial Technology

An Artificial Neural Network (ANN) was developed to estimate the NH3-N under the bacterial technology in Xuxi River, China. Eight water quality variables such as Dissolved Oxygen (DO), Chemical Oxygen Demand (COD), Total Nitrogen (TN), Total Phosphorus (TP), Suspended Sediment (SS), Temperature, Transparency, and Ammonia Nitrogen (NH3-N) were used as inputs for the network. The observed and the predicted NH3-N of the trained networks showed a good fit after the training with a coefficient of correlation (r) and a root mean square error (RMSE) of 0.91 and 2.61 respectively. Sensitivity analysis was used to determine the influence of input variables on the dependent variable; TN, Transparency, DO, and TP have proven to be the most effective inputs. Their training’s results showed a coefficient of correlation (r = 0.9295) and a (RMSE = 1.2081) which is more accurate than the prediction with eight inputs variables.


INTRODUCTION
The damage to the environment has given rise for concern in recent years.Water resources are under pressure due to intensive industrialization and migration from rural to large urban areas.Huge amounts of domestic and industrial waste are dumped every day into rivers.China, one of the fastest growing industrialized regions in the world is no stranger to environmental problems, especially river pollution which usually lead to eutrophication of the concerned water bodies.Eutrophication is one of the most important water environmental problems in China, which would lead to abundant development of aquatic plants, growth of algae, and disturb the balance of organisms in the water 1 .This situation impairs the aquatic life and reduce the water body to a source of many health problems for the population living around the polluted River.In order to solve this problem, various River restoration campaigns using different techniques as the re-aeration using a series of weir, shifting effluent discharge locations, pumping air into the water body using a local oxygenator and introducing a constructed wetland 2 , have been taken in China.According to some studies, wetlands and their modifications are able to remove more than 70% of pollutants and cost much less in construction, operation and maintenance than the conventional wastewater treatment plants 3 .However, the inability of constructed wetlands to efficiently remove phosphorus has been a major setback 4 that is why the bacterial technology is currently receiving more attention as an efficient, cost-effective and sustainable approach towards river restoration 5 .This method is simple, affordable, adaptable, scalable, and eco-friendly in river and wastewater treatment 6 .The Bacterial Technology Method (BTM), system employs bacteria to degrade pollutants into simple harmless substances and produce standard effluents 7 , provides a promising advantage compared to the wetlands as mentioned earlier.It has been successfully implemented in the recovery of polluted lakes and various polluted systems such as wastewater treatment plants and septic tanks 8 .For instance, the method has been used in urban streams in Shenzen, Rui'an and Wuxi of China.This method has been known to rapidly reduce the concentrations of effluent biological oxygen demand (BOD) and chemical oxygen demand (COD) 5 .It offers an easy solution to purify polluted rivers and streams, and meets the standards of wastewater effluents without building massive structures as is the case of traditional methods.
The measurement of contaminants in rivers is important for monitoring water quality.One of the contaminants that contribute most towards eutrophication is the ammonia nitrogen (NH 3 -N).Mostly it is introduced through sewage and fertilizers, it is essential for plant and animal growth and nourishment.Its overabundance in water can cause a number of adverse health and ecological effects.In wastewater, nitrogen exist in different forms (ammonia, organic, nitrate, and nitrite).One of these forms of nitrogen, the ammonia nitrogen in excess in water bodies can cause overstimulation of growth of aquatic plants and algae.Excessive growth of these organisms, in turn, use up dissolved oxygen as they decompose, and block light to penetrate deeply into the waters leading to suffocation of fish and others depended organisms 9 .Ammonia nitrogen then contribute towards eutrophication and need an effective eco-friendly method to be reduced to an acceptable level.The bacterial technology has proven to be the most effective for reducing the ammonia nitrogen in water bodies due to its simplicity, affordability, adaptability, and scalability 6 .
During the BTM, contaminants including the ammonia nitrogen (NH 3 -N) need to be measured regularly several times a day which require both time and labor 10 .To tackle these challenges many models have been used.For instance, in the same Xuxi River, Amos T. Kabo-Bah developed a mathematical expressions to estimate the fate of ammonia nitrogen (NH 3 -N) 5 .Unfortunately, most of these models require large amounts of data that are not easily accessible, making it a very expensive and time consuming process 11 .
In the last decade, artificial neural networks (ANNs) have been widely applied in many fields of researches, from chemistry [12][13][14] to various water resource problems, such as hydrological processes 15- 16 , water resource management [17][18] , and water quality modelling and forecasting with successful results [19][20][21][22] .Xiaohu Wen developed an artificial neural network (ANN) to simulate the DO concentrations in the Heihe River, Northwestern China, where the correlation coefficient (r) and root mean square error (RMSE) values for the test sets (0.9680 and 0.4570 respectively) indicated the effectiveness of neural network model to simulate DO 23 .Another work was done by Yasunobu Kato showing the efficacy of an artificial neural network to predict the Chemical Oxygen Demand (COD) with high accuracy 24 .
Xuxi River, which can be likened to a general case of grade V of river pollution in China, its restoration is of utmost importance that the use of bacterial technology for its restoration to an acceptable ecologically level.This study will be a great asset regarding the restoration of rivers by bacterial technology in the sense that it will use the neural networks to predict the fate of ammonia nitrogen (NH 3 -N) with solid and reliable results, this, without needing a huge amount of field data.The aim of this paper is to analyze the performances of neural networks models in estimating the fate of ammonia nitrogen under bacterial technology in the Xuxi River.This study will be an innovation in the field of bacterial technology which so far has been evaluated and predicted only by numerical and statistical models.
The remainder of the study is outlined as follows; Section II describes the methods and dataset employed in the study, while the results and discussions are presented in Section III.The conclusions drawn from the study are also given in Section IV.

Sites and datasets
Xuxi River (XXR) is located in the Chang Nan District of Wuxi city of China.The total length of the river is 1.36km with an upstream surface width of 4.5m and a depth of about 1.4m.The river is characterized by muddy sediments sometimes up to 1.6m.This river is located in a north sub-tropical humid zone 25 .The water quality of the river is very poor.The daily sewage discharged into the River was estimated to 10000m 36 .That makes the surface water quality standard, to be ranked in class V.According to the Chinese National Standard (CNS) for Surface Water Quality (GB2828-2002), the Class V is the poorest water quality standard 5 .The Xuxi River, which has been classified in Class V (poorest water quality standard) and all the research carried on it can serve as a representative case for most of the polluted rivers in China.This alarming situation implies that the Xuxi River is highly polluted and needs to be restored to its natural condition for the benefit of the aquatic life and domestic uses.
The data used for this ANN were obtained during the treatment using the bacterial technology in October 2009.The samples were collected at 8:30 AM to 4:30 PM during the experimental period and the physiochemical parameters of Temperature, dissolved oxygen (DO), chemical oxygen demand (COD), total nitrogen (TN), total phosphorus (TP), suspended sediment (SS), Transparency, and ammonia nitrogen (NH 3 -N) were collected on the five specific monitoring points of the Xuxi River (Figure 1).
To determine the water quality, the samples were preserved in polyethylene bottles and stored in an insulated ice cooler delivered to the laboratory on the same day.All the samples were saved at 4°C until the analysis and processing (ISO 5667-6, 1990; ISO 5667-2, 1991; ISO 5667-3, 1994).Then each parameter was tested in laboratory 25 .

Bacterial technology method
Bacterial technology is a way by which useful bacteria are applied to restore polluted rivers system or wastewater into their natural quality forms.The technology is simply an in-situ remediation procedure that puts micro-organisms to enhance the breakdown of pollutants in rivers into non-toxic and harmless H 2 O and COD inorganic.The detailed procedure for its implantation is presented by Song Y. 26 .After the treatment by the Bacterial Technology Method, Xuxi River was restored.The water quality parameters have been significantly improved, this can be seen in Figure 2. Table 1 displays the results of before and after the treatment are presented.These results demonstrated the efficacy of the Bacterial Technology for river restoration.

Artificial neural networks
Artificial Neural Networks are non-linear mapping structures, which was initially inspired by the observed process of natural networks of biological neurons in brain.It consists of simple computational units called neurons which are highly inter connected.In its most general form, a neural network is a machine that is designed to model the way in which the brain performs a particular task or function of interest; the network is usually implemented by using electronic components or is simulated in a software on a computer 27 .ANNs have become very popular in recent times due to their wide range of applicability and the ease with which it can treat complicated problems and small size data 28 .The ANN is a modeling tool capable of handling a large number of inputs (independent variables) to determine one or more outputs (dependent variables).The basic structure of an ANN usually contains three distinctive layers, the input layer, where the data are introduced to the ANN, the hidden layer or layers, where data are processed, and the output layer, where the results of ANN are output.The ANN is designed by putting weights between neurons, by using a transfer function that controls the generation of the output, and using adjustable laws that define the relative importance of weights for input.In the training, the ANN defines the importance of the weights and adjusts them through iterative procedures 29 .The process is showed in Figure 3.

Multilayer perceptron neural network
There are different kinds of neural networks for different uses.The Multilayer Perceptron (MLP) is the simplest, and therefore, most commonly used neural network structure.The MLP consists of three layers of neurons: (1) an input layer; (2) an output layer, and (3) intermediate (hidden) layer or layers.Each neuron has a number of inputs (from outside the network or the previous layer) and a number of outputs (leading to the subsequent layer or out of the network).A neuron computes its output response based on the weighted sum of all its inputs according to an activation function 23 .The mathematical expression of the MLP is as follows: ... (1)   .

..(2)
Where X i is the output of node i located in any one of the previous layers, W ij the weight associated with the link connecting nodes i and j, and W j the bias of node j.
The MLP used in this study is made by eight input variables, a hidden layer with five to a fifteen processing neurons and one single output which is NH 3 -N (Figure 4).Mohammed S. Jami et al. used a feedforward multilayer neural networks to simulate the NH 3 -N in a wastewater treatment plant which showed a satisfactory result with the mean square error and correlation coefficients of 0.1591 and 0.7980, respectively 30 .The Multilayer Perceptron (MLP) will be used in this study.Determining the best learning algorithm, the right activation function and the suitable architecture of the network (the number of neurons in hidden layers) when designing an ANN is very crucial, special attention should therefore be given to it.In this study, by a trial and error procedure, the architecture of the network selection was carried out by gradually varying the number of nodes in the hidden layer.The activation function used is the tan-sigmoid function in the hidden layer and a linear function (purelin function) in the output layer.The MLP is trained using the Levenberg-Marquardt technique as this technique is more powerful than the conventional gradient descent techniques 31 .

Measurement of performance
There are several statistical tests for evaluating an ANN.The ones used in this paper are the Coefficient of Correlation (r), the Root Mean Square Error (RMSE) and the Mean Square Error (MSE).The RMSE and the MSE provide an indication of goodness of fit between the measured and modeled values.The Correlation of Coefficient (r) is a common criterion for the 4 goodness of fit for regression models 32 .These criteria are as follow: ... (5)   ... (6)   Where X i and Y i are the ith observed and estimated values, respectively; and; are average of X i and Y i , and n is the total numbers of data.B

Data processing
Generally, to build an ANN, the data are divided into training, validation and testing.The training set is used to estimate the unknown connection weights; the validation set is used to decide when to stop training in order to avoid overfitting and/or which network structure is optimal; and the test set is used to assess the generalization ability of the trained model 33 .The water quality data set collected from Xuxi River were divided into two groups.The first set made of 80% of the data was divided into a training set (80% of the 1 st set), validation set (10% of the 1 st set) and test set (10% of the 1 st set); the second set of data (the remaining 20% of the data set) was the validation data set, completely separated from the first one in order to test the predictability of the network.The test data have been separated from the training set and the validation set, in order to evaluate the optimized model against unknown data set.

RESULTS AND DISCUSSION NH 3 -N model results
The Mean Square Error (MSE) can be used to determine how well the network input fits the desired output.With MSE, the smaller values ensure a better performance.The best number of neurons were determined by the minimum value of MSE of the training data set.Many iterations of the MLP were performed with the change of the number of neurons from 5 to 15.The best number of neurons selected was 5 neurons, which gives an architecture of 8-5-1 with 8 inputs parameters, 5 hidden neurons, and 1 output representing NH 3 -N.Observed NH 3 -N removals are depicted against the corresponding measured NH 3 -N removals in Figure 5.The related coefficient of correlation (r = 0.91) shows that the

Sensitivity analysis
It is important to analyze the effects of different variables on the end result, if they were to change, in other words, it is important to determine how sensitive the resultant is when alterations are made to input values.Xiaohu Wen had shown the effectiveness of the sensitivity analysis by evaluating the effect of nine input variables on DO model 23 .Similar work was done by Garson 34 and Emolla 35 in order to assess the relative importance of the inputs variables.In this paper we evaluate the effects of the 8 input variables on the NH3-N model.This was done by making various combinations of those parameters.The coefficient of correlation (r) and the RMSE of different combinations were used for determining the most influential parameters on the output.The combination of the parameters with the minimum MSE were selected as the optimal network architecture.In table 2, nine networks have been compared according to the test data.By eliminating the Suspended Sediments (SS) from the inputs variables in the model, the coefficient of correlation and the RMSE improved significantly to 0.96 and 1.66 respectively; this implies that SS could be removed from the inputs variables for better prediction results.Contrarily, some of the variables have more influence to the NH 3 -N model.By removing them, the coefficient of correlation decreases whilst the RMSE increases which is the case of TN, Transparency, DO, and TP.Therefore, NH 3 -N was found to be more sensitive to these variables, they can stand alone for an accurate NH 3 -N estimation.
By using only the four most important variables and the NH 3 -N as inputs variables for estimating NH 3 -N under the bacterial technology with the following network structure 5-5-1, the coefficient of correlation and the RMSE results in 0.9295 and 1.2081 respectively (Table 3), which is an improvement from the previous model that used 8 input variables (Figure 6).Therefore, in order to obtain better ANN results for the bacterial technology in the estimation of NH 3 -N, TN, Transparency, DO, and TP should be measured with the utmost care.

CONCLUSION
An artificial neural networks (ANN) was developed in this research to estimate the Ammonia Nitrogen (NH 3 -N) under the bacterial technology.A multilayer perceptron made of one input layer, one hidden layer and one output layer trained with the Levenberg-Marquard algorithm was used.The best structure of the networks were selected after many training by changing the numbers of neurons from 5 to 15 neurons in the hidden layer.The final structure 8 -5 -1, was made up of eight water quality variables as the inputs (DO, COD, TN, TP, SS, Temperature, Transparency, and NH 3 -N) in order to obtain the NH 3 -N as the output.Based on the minimum value of MSE of the training data set, the best network after training showed a coefficient of correlation (r) and a root mean square error (RMSE) of 0.91 and 2.61 respectively, with a good fit between the observed and the predicted NH 3 -N.A sensitivity analysis was carried out in order to evaluate the effects of the eight inputs variables on the NH 3 -N model.The results showed that by eliminating the Suspended sediment (SS), the Temperature, and

Fig. 1 :Fig. 2 :
Fig. 1: Schematic diagram of the Xuxi River and sampling points during bacterial technology method (Not drawn to scale)

Fig. 3 : 4 :
Fig. 3: Artificial Neural Network Fig. 4: The architecture of the neural network used in this study

Fig. 6 :
Fig. 6: Comparison of observed NH 3 -N value and predicted NH3-N value (left); correlation between observed and predicted NH 3 -N (right) for selected parameters