Water Resour Manage (2013) 27:927–941 DOI 10.1007/s11269-012-0226-7
Application of Artificial Neural Networks and Particle Swarm Optimization for the Management of Groundwater Resources Shishir Gaur & Sudheer Ch & Didier Graillot & B. R. Chahar & D. Nagesh Kumar Received: 14 March 2011 / Accepted: 26 November 2012 / Published online: 12 December 2012 # Springer Science+Business Media Dordrecht 2012
Abstract Ground management problems are typically solved by the simulation-optimization approach where complex numerical models are used to simulate the groundwater flow and/or contamination transport. These numerical models take a lot of time to solve the management problems and hence become computationally expensive. In this study, Artificial Neural Network (ANN) and Particle Swarm Optimization (PSO) models were developed and coupled for the management of groundwater of Dore river basin in France. The Analytic Element Method (AEM) based flow model was developed and used to generate the dataset for the training and testing of the ANN model. This developed ANN-PSO model was applied to minimize the pumping cost of the wells, including cost of the pipe line. The discharge and location of the pumping wells were taken as the decision variable and the ANN-PSO model was applied to find out the optimal location of the wells. The results of the ANN-PSO model are found similar to the results obtained by AEM-PSO model. The results show that the ANN model can reduce the computational burden significantly as it is able to analyze different scenarios, and the ANNPSO model is capable of identifying the optimal location of wells efficiently. Keywords Groundwater modeling . Groundwater management . Artificial neural network . Analytic element method . Particle swarm optimization Notations The following symbols have been used in this paper: Cwi Cpn
Well installation cost (euros) Capitalized cost of pipelines (euros)
S. Gaur (*) : D. Graillot UMR CNRS5600 EVS, Département of Géosciences and Environnent, SPIN, Ecole Nationale Supérieure des Mines, 158-Cours Fauriel, Saint-Etienne 42023, France e-mail:
[email protected] S. Ch : B. R. Chahar Department of Civil Engineering, Indian Institute of Technology Delhi, New Delhi 110016, India D. N. Kumar Department of Civil Engineering, Indian Institute of Science, Bangalore 560012, India
928
Cp CpE Cpu Gt hi b K Li Nw Pt Q Qi r RE Vmax W Ψ Ω h Ф ω γ η
S. Gaur et al.
Total cost of pumping (euros) Capitalized electricity cost (pumping cost) Cost of pump units (euros) Global best value among all particles, gbest Minimum water head on the periphery of the ith well (m) Aquifer thickness (m) Hydraulic conductivity (m/s) Pipe length for each well (m) Total number of wells Previous best value for each particle, pbest Discharge from well (m3/s) Discharge from ith well (m3/s) The rate of interest (euros/euros/year) The cost of the electricity per kilowatt-hour (euros/kwh) Maximum velocity (m/s) Complex discharge function Stream function (m3/s) Rate of groundwater flow (m3/s) Groundwater head (m) Discharge potential (m3/s) Inertia weight Density of the fluid (N/m3) Combined efficiency of the pump and the prime mover
1 Introduction The initial idea about ANN was introduced by McCulloch and Pitts (1943) by proposing the model of a neuron. Later, the ANN got high recognition due to Rumelhart and McClelland (1986). They discovered the mathematically rigorous theoretical framework for the ANN by presenting the generalized delta rule, or back-propagation algorithm (BPA) and demonstrated its capability, in training a multilayer ANN. ANN have been applied in different areas of hydrology such as rainfall-runoff modeling, groundwater management, stream flow forecasting, precipitation forecasting, hydrologic time series and reservoir operations. It was found that ANN based optimization model needs much less computational time and is more flexible in comparison to mathematical programming methods. The Groundwater management problems are typically solved by researchers through simulation-optimization approach. In the simulation-optimization process, optimization model employs simulation for getting the values of the groundwater head, velocity, concentration etc. This repeated use of the flow model increases the computational burden extensively and takes several hours to get the final solution. Different researchers (Rogers and Dowla 1992; Johnson and Rogers 1995; Coppola et al. 2003; Singh et al. 2004) used ANN to substitute the computational by expensive numerical models. They solved the different hydrological management problems using ANN and optimization algorithm and found this combination to be faster and more robust. Rogers and Dowla (1992) provided one of the first published approaches for optimal groundwater remediation using artificial neural networks and a genetic algorithm. Ranjithan et al. (1993) used ANN to simulate pumping index for a hydraulic conductivity realization, to remediate groundwater at a contaminated site. Two subsets of 100 and 200 patterns
Application of ANN-PSO in Ground Water
929
(input–output vectors) were used respectively for training and testing a feed-forward ANN. This problem was later expanded to a 3D multi-phase model by Rogers et al. (1995). Rogers and Dowla (1994) used the approach of combining the Genetic Algorithm (GA) with ANN which predicted the fitness measures of the generated pumping pattern of 20 wells. GAANN optimization results were compared with other approaches of combining the groundwater flow model with a nonlinear programming with a quasi-Newton search method. Johnson and Rogers (1995) used combined ANN and GA to select the optimal location of pumping well for groundwater remediation. The networks were trained to predict massextraction and contaminant information 2-D model SUTRA. Singh et al. (2004) performed study for identification of unknown pollution sources, using an artificial neural network. This study produced promising results even with large measurement errors. Coppola et al. (2003) applied the ANN model for three types of groundwater prediction and management problems. The study affirms that ANN is efficient to solve the variety of complex groundwater management problems and overcome many of the problems and limitation associated with other conventional physically based flow models. Rao et al. (2003) developed a subsurface water management model by replacing the existing sharp interface flow model by ANN model. The study concluded that the computational burden was significantly reduced by replacing the simulator model with an ANN. Arndt et al. (2005) compared the results of a computationally expensive finite-element simulation model with ANN-computed predictions. The study concluded that 60 % of time reduction can be obtained using the ANN, compared to the simulation-based solution. The study also concluded that the value of the objective function obtained by the simulation based optimal solution was only 1 % better than that by the ANN. Nikolos et al. (2008) combined the ANN with a differential evolution algorithm to replace the finite-element numerical model to determine the optimal operational strategy for the pumping wells to meet the water demand and maintain the water table at certain levels. They concluded that ANN could significantly reduce the computational burden compared to the numerical models. Artigue et al. (2012) use ANN for flash flood forecasting on ungauged basins in southern France. Study demonstrates that efficient forecasting can be derived from a feedforward model using the available measured discharges. ANN applications have also been observed in groundwater hydrology problems (Sreekanth and Datta 2011; Trichakis et al. 2011; Karthikeyan et al. 2012; Chang et al. 2012). The Analytic Element Method (AEM) is a computational method based upon the superposition of analytical expression to represent two dimensional vector fields. The AEMs can superimpose hundreds of exact analytic solutions to solve groundwater flow problems and are capable of simulating streams, lakes and complex boundary conditions (Strack 1989). Particle Swarm Optimization (PSO) is also an evolutionary computation technique developed by Eberhart and Kennedy (1995). It has been applied to various fields of engineering research and proved itself as an effective and efficient method. The application of AEM-PSO has been found limited in the field of water resources and particularly groundwater management. Matott et al. (2006) solved groundwater management problems using the AEM based flow model. To solve pump and treat optimization (PATO) problems, the AEM based flow model was used and the results generated with different optimization techniques i.e. GA, SA, CG (Conjugate Gradient) and PSO were compared. This paper examines the capability of the ANN-PSO based simulation-optimization model where the training dataset for the ANN model were generated by the AEM based flow model. The paper also examines the applicability of the ANN-PSO model to identify the minimum pumping cost for the wells. The discharges as well as location of the wells are taken as the decision variables in the optimization function. The piping cost is also considered in the cost function and its influence on the optimal solution is assessed. Both
930
S. Gaur et al.
ANN-PSO and AEM-PSO models are applied for the Dore river basin in France and the results of the ANN-PSO model are compared with the AEM-PSO model.
2 The Study Area The Dore River catchment, situated in the eastern part of the Massif-Central in France (Fig. 1), was considered to set up the pumping wells. The average annual rainfall recorded at the rain gauge station of the basin in 780 mm. The Dore River is an important tributary of the Allier River. The average annual flow of the Dore River is 20.2 m3/s which can vary from 50 m3/s, at high flow conditions, to 5 m3/s in dry periods whereas the river stage fluctuates less than 1 m. A major part of the area is covered by fluvial quaternary sediments underlain by marl and clay. Depending on the rate of clay deposits, the hydraulic conductivity varies from 1×10−3 to 3×10−3 m/s. The location of different hydrological features and other required data were extracted from the geological maps to the scale 1/50,000 provided by the BRGM (National Service for Geological Survey). A total of 12 piezometric measurements are available in the study area which shows the hydraulic gradient in the North direction. The water levels in the two rivers were observed at 7 and 4 different locations and those were used to develop the AEM based groundwater flow model.
3 Objective Function and Constraints In this study, the objective function is defined to identify the minimum pumping and piping cost for installation of new pumping wells. The total cost for new system of pumping wells consists of the cost of well installation, piping cost and cost of pumping. The different parts of the total cost are as follows, Well Installation Cost: In this study all the wells were considered as of the same depth of 12 m and diameter of 3 m. Therefore the cost of each well was taken as constant and the total cost was calculated by multiplying the installation cost of one well by the number of wells. Piping Cost: The piping cost depends on the location of new wells along with many other factors. In this study, the piping length was considered from the wells to a single storage tank and all the pipes were considered as of the same diameter and material. The water from all the wells will be stored in the storage tank and transported to the city. The piping cost can be given as Cpp ¼ A2
Nw X
Li
ð1Þ
i¼1
where Li (m) 0 pipe length from ith well to the storage tank and A2 0 total charges for per meter piping including cost laying and fixing at site. In Eq. (1) assumed that each well is individually connected to the storage tank. Pumping Cost: The major factors that influence the pumping cost depend on the volume of water to be pumped, density of the water, hydraulic head, efficiency of the pump and energy cost (Sharma and Swamee 2006; Moradi et al. 2003). The total cost of pumping (Cp in euros) consists of the cost of pump units (Cpu in euros) and the capitalized electricity cost (pumping cost) (CpE in euros) including the annual repair and maintenance cost and hence can be expressed (Swamee and Sharma 1990) for a single well as
Application of ANN-PSO in Ground Water
931
685000.000000
687000.000000
∗#
!.
OW-1
2112000 .000000
2112000 .000000
∗#
∗# ∗# OW-2
!.
2110000 .000000
!.
OW-4
Legend
!.
∗#
Observation well River Head
!.
River 0.5
1
1.5 Kilometers
OW-7
OW-8
OW-9
∗#
!.
∗#
OW-10
!.
#∗
!.
2108000.000000
0.25
2108000.000000
0
!.
∗#
!.
OW-6
!.
!.
OW-5
∗#
2110000 .000000
OW-3
∗#
OW-11
685000.000000
!.
OW-12
# ∗
687000.000000
Fig. 1 Location map of the study area
Cpi ¼ Cpu þ CpE ¼ kP
gQH 8:76RE gQHrT þ η η
ð2Þ
932
S. Gaur et al.
where rT ¼
ð1 þ rÞT 1
ð3Þ
rð1 þ rÞT
H 0 pumping head (m), which is equal to the head from water table in aquifer to the height of storage tank including head losses in pipes; η 0 combined efficiency of the pump and the prime mover; RE 0 the cost of the electricity per kilowatt-hour (euros/kwh); r 0 the rate of interest expressed as euros for euros per year (euros/euros/year), T 0 total life of the project (years) and kP 0cost of a pump unit per kwh (euros), which can be obtained by interpolating values from a curve between cost and pump capacity. For long life of project (T→∞) Eq. (3) gives rT 01/r. The pump parameters have been ascertained from market surveys of branded pumps of various heads and capacities. Thus, the total pumping cost can be expressed as Cp ¼
Nw X i¼1
Cpi ¼
Nw X i¼1
kP
gQi Hi 8:76RE gQi Hi rT þ η η
ð4Þ
Total Cost: Thus the total cost can be calculated by adding the above explained three components. As the well cost is constant, it is not required in the optimization function. Also, the problem constraints were finalized with the help of water authority officials and stakeholders. The First constraint prescribes the maximum and minimum discharge limit of a single well. The second constraint prescribes the minimum discharge limits by all wells. The third constraint was taken to limit the drawdown of groundwater under permissible limit defined by stakeholders. The fourth constraint accounts for the minimum distance of the wells from the river to ensure the minimum retention time for the groundwater in the aquifer and to avoid the influence of pumping on the water level in the river. The fifth constraint incorporates the minimum distance between the wells in order to provide a protective zone around the wells. The final form of the objective function is, ( ) Nw X gQi Hi 8:76RE gQi Hi rT þ þ b1 PðhÞ þ b 2 PðQÞ A2 Li þ kP ð5Þ Minimize η η i¼1 Subject to Qi;min < Qi < Qi;max Nw X
Qi > Qtotal
ð5aÞ
ð5bÞ
i¼1
hi > hi;min
ð5cÞ
ðxi ; yi Þ 6¼ Ai
ð5dÞ
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 2 2ffi xi xj þ yi yj Sw;min
ð5eÞ
Application of ANN-PSO in Ground Water
PðhÞ ¼
PðQÞ ¼
933
hi;min hi 0
Qtot 0
P
Qi
hi < hi;min hi hi;min
if if
if if
P P Qi < Qtot Qi Qtot
ð5f Þ
ð5gÞ
where P(h) & P(Q) are penalty terms which vary linearly with the magnitude of constraint violation and β1 and β2, weighting factors which can be selected according to the problem. xi and yi are the coordinates of the well and xj & yj are coordinating of remaining wells. S is the distance between any two wells and Ai is the protective zone around the river in which location of new well should not exist.
4 Methodology The present methodology incorporates the strength of both artificial neural networks and particle swarm algorithms to search an optimal pumping pattern for the Dore river basin in France. The developed ANN-PSO model was applied in two stages. In the first stage, the groundwater flow model was developed using analytic element method for the whole study area. The developed AEM model is used for generating the data sets to be used for training and testing of ANN. The coordinates and the discharge of the wells were taken as input and groundwater head, computed by AEM model, at periphery of the wells was taken as output for the training and testing of the ANN model. The developed ANN models were integrated with PSO for evaluation of the cost function. A penalty function method was used to handle the constraints in the optimization function. The result given by ANN-PSO model, in the first stage, was compared with AEM-PSO model. Further, the ANN-PSO model was applied in second stage where a fine grid search is performed by training the ANN for a smaller region instead of whole study area. Finally, the recommended solution given by ANN-PSO model was validated using the AEM-PSO model. Description of the AEM and PSO method including the major steps involved in the above procedure are explained in the following sections. 4.1 Analytic Element Method AEM is a computational method based upon the superposition of analytical expressions to represent the two dimensional vector fields. Each type of analytic element can simulate different types of geohydrological features. The River is simulated by line-sink, the well by point-sink, the inhomogeneity by the line-doublet and recharge by the area-sink. In the AEM, the rate of groundwater flow is often expressed in terms of a complex potential Ω (L3T−1) as Ω ¼ Φ þ iΨ
ð6Þ
where discharge potential Ф [L3T−1] and the stream function Ψ [L3T−1] fulfill the CauchyRiemann condition, therefore Ф and Ψ may be represented as real and imaginary parts of an analytical function Ω0Ω (z) of the complex variable z0x+iy, defined in the flow domain. The discharge potential Ф (x, y) for a given aquifer is determined by superimposing the contribution from individual elements that correspond to the particular hydraulic feature (e.g. river, pumping
934
S. Gaur et al.
wells and zones of different hydraulic conductivity). The detailed description of the analytic element method can be found in Strack (1989). In this study, ground water flow model based on analytic element theory was developed by MATLAB 7.0 (Math Works 2001) and applied to the case study. The details regarding the development of AEM model for the study area are explained in Gaur et al. (2011). 4.2 Particle Swarm Optimization The PSO (Eberhart and Kennedy 1995) is a stochastic, swarm-based evolutionary computer algorithm for the solution of optimization problems. In PSO, the system is initialized with a population of particles which represent the potential solution. In simple terms, each particle is moves through a multidimensional search space, where the position of each particle is adjusted according to its own experience and that of its neighbors. In this process, each particle keeps a track of its coordinates in the problem space which are associated with the best solution (fitness) that it has achieved so far (the fitness value is also stored). Another “best” value that is tracked by the global version of the particle swarm optimizer is the overall best value, and its location, obtained so far by any particle in the population. To find the new position of each particle at each iteration (time step), a velocity term is computed on the basis of experience of particles. The velocity term and corresponding new location are defined as, h i t1 t1 t1 t1 þ c r P x r G x þ c ð7Þ vtij ¼ c wvt1 1 1 2 2 ij ij ij j ij
t xtij ¼ xt1 ij þ vij
ð8Þ
where c1 and c2 are the acceleration constants, r1 and r2 are random real numbers between 0 to 1. Pt and Gt denote the individual and global best values of particles. In this study, a PSO model has been developed on MATLAB platform. Different parameters of PSO have been taken on the basis of literature review and performing the sensitivity analysis. 4.3 ANN Parameters A typical ANN structure is defined by three types of layers which consisting the different types of neurons (Hsu et al. 1995) i.e. input neurons, output neurons and hidden neurons. The hidden neurons connect the input layer neurons to output layer. The hidden neurons can be arranged in one or more hidden layers. The choice for the number of hidden neurons/ layers and the selection of ANN parameters play a key role in the ANN performance. Very less number of neurons in the hidden layer does not allow the network to produce accurate maps from the input to the desired output, whereas too many neurons can result in over fitting (ASCE Task Committee on Application of Artificial Neural Networks in Hydrology 2000). As there are no specific rules for the design the architecture of an ANN (Anmala et al. 2000), a trial-and-error procedure has been adopted in this study by following the guidelines suggested by various researchers (Atiya and Ji 1997; Morshed and Kaluarachchi 1998). The back propagation technique with Levenberg-Marquardt (L-M) method was used to train the ANN. A multilayer network with one hidden layer can be used to approximate almost any function if enough neurons are provided in the hidden layer, and hence, only one hidden layer has been adopted in this study. The performance of the developed ANN model is measured on the basis of coefficient of correlation (R2), RMSE and Nash Sutcliffe efficiency. The stopping criteria for the training were defined on the basis of (1) the specific maximum
Application of ANN-PSO in Ground Water
935
number of epochs (2) if the performance gradient falls below the minimum gradient. The termination of the training process of the network is justified when the minimum performance gradient falls below 10−10, because the BPNN performance does not improve even if further training continues (Hagan et al. 1996).
5 Application of AEM, ANN and PSO In this study ANN’s have been created for each scenario. Number of ANN’s in each scenario is equal to number of wells in that scenario. Three scenarios were considered in this study by choosing the set of four, five and six wells. (a) AEM: Initially the AEM model was used to compute the groundwater head with the given random discharges and coordinates for those sets of wells. The random discharges for the pumping wells, for each scenario, were generated using a random number generator, within the range of 80 m3/hr to 300 m3/hr. The coordinates for the pumping wells were also generated using randomly within the limits of the study area by using the random number generator. The AEM model thus computes the groundwater head at the periphery of the wells. (b) ANN: The dataset generated from AEM model was used for the training of ANN. The coordinates and the discharge of the wells were taken as input and groundwater head at the periphery of the well was taken as output for the testing of the ANN model. (c) PSO: The developed AEM and ANN models were integrated with PSO for evaluation of the cost function. Particle Swarm Optimization Algorithm first generates the random coordinates and discharge values of the wells with in the given range. Further, the objective function is evaluated. The cost obtained by the each particle is compared with all the other particles and it keeps track of the best solution of all particles this is known as gbest. Further the particle keeps track of solution obtained by each particle which is known as pbest, thus the optimal solution is obtained by PSO. The constraints of the problem were handled by penalty function approach, where the specific penalty is incorporated for violation of constraints (Han and Mangasarian 1979) At each scenario a two stage optimization search is performed. In the first stage, ANN is developed for the entire area with coarser grid. Then the ANN is integrated with PSO to find the optimal well location and optimal discharge values. In the second stage, a fine grid search is performed by training the ANN for a smaller region which is obtained on the basis of results of the coarse grid search. Then the ANN is again integrated with PSO to find the optimal well location and optimal discharge values. Results obtained by ANN-PSO model are then compared with those from AEM-PSO. The set of optimal solutions generated by ANN-PSO search is actually based on simulation that introduces a certain degree of error, the final step of the methodology is therefor to present the optimal set of solutions to AEM for verification. The simulation results along with the fitness value of the optimal solution can then be used to decide the relative ranking amongst the final set of solutions.
6 Model Application Initially the ANN model was trained with the training dataset generated for the whole study area, ANN-PSO has been applied to minimize the cost for the set of four wells. The results of the ANN-PSO model were found very inferior in comparison to the results obtained by the AEM-PSO model. The number of iterations for the convergence of the PSO model was also found very high. To overcome this problem and to increase the accuracy and efficiency of the model, two modifications were done.
936
S. Gaur et al.
First modification was made in the velocity term of the PSO model to deal with the decision variable of the well coordinates. Normally, the velocity term produces the value in decimal number which increases the iteration of PSO model exponentially, particularly in identifying the optimal location of wells. To overcome this problem, velocity term was restricted to the integer number and ‘units position’ was rounded up to 5 or 10 accordingly. It means that every new search location will be at least 5 m away from the previous location. This modification helped to reduce the number of iterations significantly. A scenario for the set of 4 wells has shown that normal AEM-PSO takes more than 2,500 iterations to converge, whereas the modified model gets converged in less than 1,000 iterations. In the second modification, the ANN-PSO model was applied in two stages to find the optimal solution. In the first stage, the training data set was generated for the whole study area and ANN model was trained for the same. Further, the result of ANN-PSO model was compared with AEM-PSO model. The ANN-PSO was found unable to converge early to the best solution, as compared to the AEM-PSO, as ANN model for the larger part was found inferior to handle the decision variable based on the well coordinates. The failure occurred due to the limited availability of dataset for training of ANN model near the storage tank. To overcome this problem, the second stage was applied in which a new dataset was generated for the smaller part and the ANN model was trained again. The area for the smaller part was defined based on the results from the ANN-PSO in the first stage. A circle of 100 m radius was considered around the each well location obtained in the first stage. A new dataset for these locations was developed and the ANN model was trained into the same. The results generated by both ANN-PSO and AEM-PSO were compared. The training dataset for the ANN model was also generated by considering “first modifications” in PSO. The AEM model has also been run to generate the dataset from the same values. The following values of different parameters, in the cost function, were considered in simulation-optimization process. A1 was assumed as 4,000 €, which adopts steel casing and 12 m as depth of well. Based on the experience of field experts A2 was adopted as 140 €/meter. The cost of pump unit was obtained from the table between cost and pump power. Due to availability of pumps for specific pump power, the pump power for each well was computed and the appropriate pump was selected from the available pumps in market which has the same or higher pump power than the required pump power. The values of other parameters selected were RE 00.08 euros/kwh; γ09,810 N/m3; η080 %; r06 % euros/euros/year and T025 years. The reference location of the storage tank was fixed after consulting with local authority having coordinates as X0687,000 and Y0218,000 for computing the pipe length. In the first constraint, on the basis of aquifer properties and availability of pumps, the discharge limit was selected at 100 m3/hr