Water Quality Modeling of the River Ganga in the Northern Region of India Using the Artificial Neural Network Technique
Abstract
Water quality modeling with dynamic parameters, especially of rivers, is important in terms of proactive pollution management strategies. Techniques such as artificial neural networks (ANNs) have become popular for such applications. In the present study, an ANN is used to construct a multilayer perceptron and radial basis function neural network model to simulate and predict dissolved oxygen in the River Ganga in selected regions of Uttar Pradesh, and to demonstrate its application in identifying complex nonlinear relationships between input and output variables. The results of the model analysis demonstrate that the multi-layer perceptron model provides greater correlation coefficients (R = 0.993) and a lower mean square error (RMSE = 0.1984) than the radial basis function model (R = 0.789; RMSE = 1.0011). The results of the analysis suggest the suitability of the proposed MLP-ANN model to predict water quality parameters such as dissolved oxygen using limiting data sets for the River Ganga, in particular, and other rivers in general.
1 Introduction
Water quality management, in terms of pollutant discharge into a river or water body as municipal or industrial waste being within permissible limits, is an important aspect of water pollution control. Dissolved oxygen (DO), biological oxygen demand (BOD), chemical oxygen demand (COD) and temperature are the significant indicators of water quality and have received lot of attention in water quality monitoring. DO indicates the quality of water in that it is required for aerobic oxidation of the waste, especially at waste discharge points (Mukherjee et al. 1993). The DO concentration at any location in a river is the result of many processes occurring upstream, including deoxygenation, reaeration, photosynthesis, respiration, sediment oxygen demand, water temperature, and discharge (Kalff 2002). Low and near zero values of DO indicate a constant pollution load due to organic wastes and anthropogenic activities in the river water system. BOD specifies the amount of organic pollutants and nitrates in the water (Mandal et al. 2010). BOD is measured as the volume of oxygen required by biological organisms in the water body to decompose the biodegradable organic matter pollutants introduced by sewage or industrial effluents, whereas COD outside the permissible limits indicates both organic and inorganic pollutants in the water body (Misra 2010). High values of BOD and COD in river water are indicative of low dissolved oxygen values due to increased pollution load as well as the mixing of wastewater runoffs carrying human and animal excreta, organic waste, and discharges of effluents from city and industries (Kisi et al. 2013). Temperature affects important parameters of water chemistry such as dissolved oxygen, total dissolved solids, and electrical conductivity. Seasonal differences in the temperature of the river water are mainly due to change in the weather and ambient air temperature.
Water quality modeling for dynamic parameters such as DO, temperature, BOD, and COD, especially in rivers, is important in optimizing control measures. However, most of the traditional models, especially deterministic models, require several input parameters that are not easily determinable, thereby making modeling a very expensive and time-consuming process (Suen et al. 2003). Also, due to the complexity of natural systems, the statistical accuracy of such models is usually low. In recent times, techniques such as artificial neural networks (ANNs) have become increasingly popular for various water related parameters (Icaga 2007; Dahiya et al. 2007; Lermontov et al. 2009). One important advantage of ANNs is their ability to handle both large amounts and small amounts of parametric and nonparametric data, with or without restrictive assumptions about the relationship between the dependent and independent variables (Nourani et al. 2011; Al-Maqaleh et al. 2016). ANNs can also accurately approximate complicated nonlinear input–output relationships. Various studies have been conducted in India and worldwide of applications of different ANN algorithms for aspects of water quality modeling, especially DO. Schmid and Koskiaho (2006) investigated various multilayer perceptron (MLP) algorithms to forecast DO concentration in Finland. Singh et al. (2009) modeled DO concentration and BOD in the Gomti River in India using three-layer feed forward neural networks (FNN) with back propagation learning. An FNN algorithm was used by Rankovic et al. (2010) to predict DO in Gruza Reservoir, Serbia. Ay and Kisi (2012) compared the efficiency of two different ANN algorithms in DO prediction in Foundation Creek, Colorado. Antanasijević et al. (2013) developed three different ANN architectures to improve the performance of an ANN that modeled DO concentrations in the Danube River. More recently, a back propagation neural network (BPNN) and an adaptive neural fuzzy inference system (ANFIS) were used by Chen and Liu (2014) to predict DO concentrations in the Feitsui Reservoir in northern Taiwan. All of the above-mentioned studies demonstrated that different ANN algorithms are satisfactory for use in DO modeling.
We used ANNs to construct a multilayer perceptron neural network (MLPNN) model and a radial basis function neural network (RBFNN) model to simulate and predict DO from BOD, COD, and temperature in the River Ganga in selected regions of Uttar Pradesh and to demonstrate their application to the identification of complex nonlinear relationships between input and output variables. Using weighting analysis, we also investigated the (non)linearity of the relationship between the variables and DO as it represents the overall contribution of input variables. The Ganga River receives a tremendous quantity of industrial wastes (especially from tanneries and textile factories), together with outflows from various drains along the length of the river, in these regions. The proposed model may contribute to more efficient pollution management as well as to preventive activities.
2 Materials and methods
2.1 Study area and sampling period
The dataset used in this study was produced by monitoring of the water quality of the River Ganga in the Kanpur, Unnao and Fathepur regions of Uttar Pradesh. Weekly sampling was carried out starting in April 2019 until the first week of March 2020. Eight sampling sites were identified as shown in Figure 1.
Figure 1 Map showing details of sampling locations in regions of Uttar Pradesh, India.
2.2 Analysis of water quality parameters
The water quality parameters measured were temperature, DO, BOD, and COD. Standard methodologies prescribed in APHA (2012) were followed in physicochemical analysis of the water samples. Temperature in °C was measured onsite using a glass thermometer. DO was determined onsite using Winkler’s method (ppm). BOD (ppm) was determined by the 5 d BOD test given in APHA (2012). The procedure involves measuring the difference in oxygen concentration between the samples before and after incubation for 5 d at 20°C. COD (ppm) was determined by the dichromate reflux method. This involves refluxing of the sample with potassium dichromate and sulphuric acid in the presence of mercuric sulphate at 150 °C for 2 h and then titrating it with ferrous ammonium sulphate.
2.3 Prediction of DO using ANNs
We attempted to predict DO using temperature, BOD, and COD. An ANN deterministic modeling technique was used to estimate DO; the technique has the advantage of accommodating additional constraints that may arise during its use. Two types of feed-forward ANN (in which information is propagated only from the input layer to the output layer), the multilayer perceptron (MLP) and radial basis function (RBF) neural network, were used for a comparative assessment.
The MLP procedure produces a predictive model for one or more dependent (target) variables based on the values of the predictor variables. Each input is conveyed to all neurons in the first hidden layer. Each neuron in the first hidden layer converts its input signal into an output signal that is sent to the next layer in the ANN architecture. In this way, the original input vector travels forward through the ANN. The last hidden layer sends its output signal to the output layer. The final output layer decodes the signal into a final response to the original stimulus (the input) (Chen et al. 2019). RBF is also known as a localized receptive field network because the basic functions in the hidden layer produce a significant nonzero response to input stimulus only when the input falls within a small, localized region of the input space (Lee and Chang 2003). The number of radial basis functions inside the hidden layer depends on the complexity of the mapping to be modeled and not on the size of the data set. For the output layer, the activation function is the identity function; thus, the output units are simply weighted sums of the hidden units (Rankovic et al. 2010). The architectures of the MLP and the RBF are shown in Figures 2 and 3.
Model performance was evaluated using statistical measures to compare the goodness or adequacy in terms of root mean square error (RMSE), the coefficient of correlation (R) and the coefficient of determination (R2). Root mean square error (RMSE) measures the differences between predicted (modeled) and observed (actual) values, with smaller values indicating better performance (Chai and Draxler 2014). The coefficient of correlation (R) is defined as the degree of correlation between observed and predicted values (Rankovic et al. 2012). The coefficient of determination (R2) indicates the proportion of variance explained by predictors used in the model and signifies the quality of the model (Cameron and Windmeijer 1997). These indicators were determined using the following equations (Neural Networks 2003):
(1) |
(2) |
(3) |
where:
Q | = | observed value, |
= | mean of observed values, | |
q | = | calculated value, |
= | mean of calculated values, and | |
i | = | range of values. |
All statistical analysis was performed using SPSS 20.0.
3 Results
The averaged water quality properties of the water samples collected from the sampling sites are given in Table 1. High variability was observed in temperature and in COD. Table 2 shows the number of sample values that were selected for training and testing for both kinds of model.
Table 1 Water quality properties in the ANN model domain measured during the sampling period in the Ganga River (n = 301).
Parameter | DO | Temperature | BOD | COD |
Mean ±SD | 8.18 ±1.63 | 25.09 ±6.02 | 3.49 ±2.05 | 13.97 ±5.82 |
Range | 4.50–12.60 | 9.00–35.00 | 1.07–19.20 | 5.06–39.90 |
Variation | 2.66 | 36.27 | 4.20 | 33.93 |
Table 2 Number of samples selected to build the models.
MLP-ANN | RBF-ANN | ||||
Number | Percent | Number | Percent | ||
Sample | Training | 198 | 67.3 | 201 | 68.4 |
Testing | 96 | 32.7 | 93 | 31.6 | |
Valid samples | 294 | 100.0 | 294 | 100.0 | |
Excluded | 7 | 7 | |||
Total (n) | 301 | 301 |
Predicted and observed values of DO for both models are shown in Figure 4. Although the horizontal axis represents time, it does not necessarily indicate equal time intervals, and is thus referred to as the time series. The scatter plot of observed vs predicted values of dissolved oxygen concentration for the MLP and RBF neural networks are shown in Figure 5.
Figure 4 Predicted and observed values of dissolved oxygen using (a) MLP and (b) RBF.
Figure 5 Scatter plots of predicted and observed values of DO using (a) MLP and (b) RBF with the equations.
ANN model performance statistics are shown in Tables 3 and 4. According to Legates and McCabe (1999) and Moriasi et al. (2007), values of R >0.70 are considered acceptable. The results of the model analysis demonstrate that the MLP model produces a greater correlation coefficient (R = 0.993) and a lower root mean square error (RMSE = 0.1984) than the RBF model (R =0.789; RMSE = 1.0011). In the weighting sensitivity analysis, temperature accounted for almost 58.0% (MLP) and 55.1% (RBF) of the variability in DO (Figure 6). Three major input variables, temperature, BOD, and COD, contributed to 98.54% of the variation in DO in MLP but only 62.33% in RBF (Table 3).
Table 3 ANN model performance statistics RMSE and R2 between predicted and observed values.
RMSE | R2 | |
Predicted DO, MLP | 0.1984 | 0.9854 |
Predicted DO, RBF | 1.0011 | 0.6233 |
Table 4 ANN model performance statistics: Pearson coefficient of correlation R between observed and predicted DO for validation of models (n = 301).
Dissolved oxygen | Predicted DO, MLP | Predicted DO, RBF | |
Dissolved oxygen | 1 | .993** | .789** |
Predicted DO-MLP | 1 | .787** | |
Predicted DO-RBF | 1 |
Figure 6 Weighted contribution of each variable for MLP and RBF models.
4 Discussion
Two different ANN models were evaluated for their DO predictions. Using weighting analysis, the (non)linearity of the relationships between the variables and DO as representing the overall contribution of input variables was investigated (Gevrey et al. 2003). We found that temperature (highest variability due to seasonal changes) was selected as the major variable in the prediction of DO followed by BOD, and COD in both the ANN models, as indicated by their weighted contribution to the ANN output. The shape of the contributions of these variables in the MLR and RBF models was non-differentiated. However, there was a significant difference in model performance. Overall, the estimates indicated immanence, nonlinearity, and generalization of ANNs during the learning and training. MLP is closely related to statistical models and is the type of ANN most suited to forecasting applications (Singh et al. 2009). MLP shows good agreement between predicted and observed values, and shows that the training of the ANN was correct. The RBF model was not as successful as expected. There are a number of reasons for the differences. To develop a robust ANN, the selection of the number of layers, the number of neurons in the hidden layer, the learning rates, and the number of epochs for model training have to be considered carefully. For example, if there is an insufficient number of neurons in the hidden layer, then the ANN cannot identify nonlinearity within the training data. Conversely, if there are too many neurons, then the ANN has an overfitting problem, and this leads to a lack of generalizability. In this study, a dropout method was used to avoid underfitting (Hill and Minsker 2010) and an early stopping technique was used to constrain overfitting. Given this scenario, MLP produced more promising results.
Weight analysis shows the overall contribution of input variables (Gevrey et al. 2003). Using weight analysis, one can investigate the (non)linearity of the relationships between the variables and DO. For example, the coefficient of temperature in both models was ~0.6, with the value for MLP being closer to 0.6 than the value for RBF. This value signifies that the contribution of temperature, based on weight analysis, was close to 60%. This indicates that the relationship between DO and temperature was nonlinear. A similar pattern was shown by BOD. However, in the case of COD, the value of the coefficient was slightly higher for the RBF model than for the MLP model.
The results we obtained can be compared with the results of other studies. Sengorur et al. (2006) used an MLP ANN to compute monthly values of DO with R = 0.918, which was reasonable for a model DO prediction. Ahmed (2013) used BOD and COD to predict DO for the Surma River in Bangladesh using ANNs and concluded that an ANN model could be used to estimate DO. Unlike our study, which also used temperature, their study produced convincing results with acceptable accuracy using only BOD and COD as variables for the MLP (R = 0.936) and RBF (R = 0.944) models. There was no significant difference between the models in terms of performance. Another study, conducted by Sarkar and Pandey (2015), predicted DO from BOD and other parameters for the River Yamuna in Mathura, Uttar Pradesh using MLP. They combined datasets obtained from three different monitoring stations for input to the ANN model. The values of DO predicted in the study showed good accuracy by producing high correlations (up to 0.9) between measured and predicted values. Olyaie et al. (2017) used many models including MLP and RBF to predict DO in the Delaware River, United States and found that the prediction performance of MLP (R = 0.957) was higher than that of RBF (R = 0.902). Another study (related to air rather than water) to estimate wind speed (Marugan et al. 2018) produced very similar results to ours, showing far better prediction by MLP (R = 0.988) than RBF (R = 0.725). A very recent study (Zhu and Heddam 2020) carried out in urban rivers at the Three Gorges Reservoir in China showed successful use of MLP for the prediction of dissolved oxygen. The MLP ANN model gave R = 0.936 for the Wubu River and R = 0.823 for the Yipin River for predicted vs. observed values. However, for the Huaxi River (R = 0.687), the model was only moderately successful in predicting DO. These results imply that MLP model can be used for DO prediction in low-impacted rivers but may not be appropriate for modeling highly polluted rivers since it is difficult for ANN models to consider the effects of anthropogenic processes. The results of the study, together with those of the studies just described, suggest that it is possible to predict dissolved oxygen concentrations in the River Ganga from a small number of input parameters using MLP.
5 Conclusion
Prediction of any particular water quality parameter of a river at any location is a tedious work due to the nonlinear behaviour of such different parameters. This is the first study of its kind to predict DO using an ANN in this stretch of the River Ganga. We compared various computational intelligence techniques (e.g., MLP, RBF) to estimate DO concentration. The MLP ANN model performed statistically significantly better than the RBF ANN model. The results obtained suggest that the proposed MLP ANN model was capable of predicting water quality parameters such as DO using limiting datasets. Even more accurate predictions of DO could be obtained with more input parameters as well as a shorter time series increment for input data such as daily data. Also, much more work needs to be performed to assess what underlying constructs are responsible for meaningful variations in DO and their effect on the predictability of DO using the parameters mentioned in the study.
The results do not necessarily mean that the MLP or RBF model will always perform better than other conventional models; however, in this particular case, the proposed model, the MPL-ANN, is suitable for DO forecasting and performs reasonably well.
References
- Ahmed, A.A.M., M.I. Hossain, M.T. Rahman and M.A.I Chowdhury. 2013. “Application of artificial neural network models for predicting dissolved oxygen concentration for Surma River, Bangladesh.” Journal of Applied Technology in Environmental Sanitation 3: 135–140.
- Al-Maqaleh, B.M., A.A. Al-Mansoub, and F.N. Al-Badani. 2016. “Forecasting using artificial neural network and statistics models.” International Journal of Education and Management Engineering 3:20–32.
- Antanasijević, D., V. Pocajt, D. Povrenović, A. Perilc-Grujic, and M. Ristic. 2013. “Modeling of dissolved oxygen content using artificial neural networks: Danube River, North Serbia, case study.” Environmental Science and Pollution Research 20: 9006–13.
- APHA. 2012. Standard methods for examination of water and wastewater, 22nd ed.Washington, DC: American Public Health Association, American Water Works Association (AWWA) and Water Environment Federation (WEF).
- Ay, M., and O. Kisi. 2012. “Modeling of dissolved oxygen concentration using different neural network techniques in Foundation Creek, El Paso County, Colorado, USA.” Journal of Environmental Engineering 138: 654–62.
- Cameron, A.C., and F.A.G. Windmeijer. 1997. “An R-squared measure of goodness of fit for some common nonlinear regression models.” Journal of Econometrics 7 (2): 329–42.
- Chai, T., and R.R. Draxler. 2014. “Root mean square error (RMSE) or mean absolute error (MAE)?—Arguments against avoiding RMSE in the literature.” Geoscientific Model Development 7 (3): 1247–50.
- Chen, W.B., and W.C. Liu. 2014. “Artificial neural network modeling of dissolved oxygen in reservoir.” Environmental Monitoring and Assessment 186: 1203-1217.
- Chen, Y., X. Fang, L. Yang, Y. Liu, C. Gong, and Y. Di. 2019. “Artificial neural networks in the prediction and assessment for water quality: A review”. Journal of Physics: Conference Series 1237: 042051.
- Dahiya, S., B. Singh, S. Gaur, V.K. Garg and H.S. Kushwaha. 2007. “Analysis of groundwater quality using fuzzy synthetic evaluation.” Journal of Hazardous Materials 147: 938–46.
- Gevrey, M., I. Dimopoulos, and S. Lek. 2003. “Review and comparison of methods to study the contribution of variables in artificial neural network models.” Ecological Modeling 160 (3): 249–64.
- Hill, D.J., and B.S. Minsker. 2010. “Anomaly detection in streaming environmental sensor data: A data-driven modeling approach.” Environmental Modeling and Software 25 (9): 1014–22.
- Icaga, Y. 2007. “Fuzzy evaluation of water quality classification.” Ecological Indicators 7: 710–8.
- Kalff, J. 2002. Limnology: Inland water ecosystems. Upper Saddle River, NJ: Prentice Hall.
- Kisi, O., N. Akbari, M. Sanatipour, A. Hashemi, K. Teimourzadeh, and J. Shiri. 2013. “Modeling of dissolved oxygen in river water using artificial intelligence techniques.” Journal of Environmental Informatics 22: 92–101.
- Lee, G.C., and S.H. Chang. 2003. “Radial basis function networks applied to DNBR calculation in digital core protection systems”. Annals of Nuclear Energy 30: 1516–72.
- Legates, D.R., and G.J. McCabe. 1999. “Evaluating the use of “goodness‐of‐fit” measures in hydrologic and hydroclimatic model validation.” Water Resources Research 35 (1): 233–41.
- Lermontov, A., L. Yokoyama, M. Lermontov, and M.A.S. Machado. 2009. “River quality analysis using fuzzy water quality index: Ribeira do Iguape river watershed, Brazil.” Ecological Indicators 9: 1188–97.
- Mandal, P., R. Upadhyay, and A. Hasan. 2010. “Seasonal and spatial variation of Yamuna River water quality in Delhi, India.” Environment Monitoring and Assessment 170 (1): 661–70.
- Marugan, A.P., F.P.G. Marquez, J.M.P. Perez, and D. Ruiz-Hernandez. 2018. “A survey of artificial neural network in wind energy systems.” Applied Energy 228: 1822–36.
- Misra, A. 2010. “A River about to die: Yamuna.” Journal of Water Resource and Protection 2 (5): 489–500.
- Moriasi, D.N, M. Gitau, N. Pai, and P. Daggupati. 2007. “Model evaluation guidelines for systematic quantification of accuracy in watershed simulations.” Transactions of the ASABE 50: 885–900.
- Mukherjee, D., M. Chattopadhyay, and S.C. Lahiri. 1993. “Water quality of the River Ganga (The Ganges) and some of its physico-chemical properties.” Environmentalist 13: 199–210.
- Neural Networks. 2003. Neural networks professional version 2.0. CPC-X Software, Copyright: 1997–2003. A demo version downloaded from the internet.
- Nourani, V., O. Kisi, and M. Komasi. 2011. “Two hybrid artificial intelligence approaches for modeling rainfall–runoff process.” Journal of Hydrology 402: 41–59.
- Olyaie, E., H.Z. Abyaneh, and A. Danandeh Mehr. 2017. “Comparative analysis among computational intelligence techniques for dissolved oxygen prediction in Delaware River.” Geoscience Frontiers 8: 517–27.
- Rankovic, V., J. Radulovc, I. Radojevic, A. Ostojic, and L. Comic. 2010. “Neural network modeling of dissolved oxygen in the Gruza reservoir, Serbia.” Ecological Modeling 221: 1239–44.
- Rankovic, V., J. Radulovic, I. Radojevic, A. Ostojic, and L. Comic. 2012. “Prediction of dissolved oxygen in reservoirs using adaptive network-based fuzzy inference system.” Journal of Hydroinformatics 14 (1): 167–79.
- Sarkar, A. and P. Pandey. 2015. Aquatic Procedia 4, 1070-1077.
- Schmid, B.H.J., and Koskiaho. 2006. “Artificial neural network modeling of dissolved oxygen in a wetland pond: The case of Hovi, Finland.” Journal of Hydrologic Engineering 11: 188–92.
- Sengorur, B., E. Dogan, R. Koklu, and A. Samandar. 2006. “Dissolved oxygen estimation using artificial neural network for water quality control.” Fresenius Environmental Bulletin 15 (9a): 1064–7.
- Singh, K.P., A. Basant, A. Malik, and G. Jain. 2009. “Artificial neural network modeling of the river water quality—A case study.” Ecological Modeling 220: 888–95.
- Suen, J.P., J.W. Eheart, and M. Asce. 2003. “Evaluation of neural networks for modeling nitrate concentration in rivers.” Journal of Water Resource Planning and Management 129: 505–10.
- Zhu, S., and S. Heddam. 2020. “Prediction of dissolved oxygen in urban rivers at the Three Gorges Reservoir, China: Extreme learning machines (ELM) versus artificial neural network (ANN).” Water Quality Research Journal 55 (1): 106–18.