InTechOpen uses cookies to offer you the best online experience. By continuing to use our site, you agree to our Privacy Policy.

Engineering » Civil Engineering » "Water Supply System Analysis - Selected Topics", book edited by Avi Ostfeld, ISBN 978-953-51-0889-4, Published: December 12, 2012 under CC BY 3.0 license. © The Author(s).

Chapter 4

Energy Efficiency in Water Supply Systems: GA for Pump Schedule Optimization and ANN for Hybrid Energy Prediction

By H. M. Ramos, L. H. M. Costa and F. V. Gonçalves
DOI: 10.5772/50458

Article top


Stages of the optimization model
Figure 1. Stages of the optimization model
Flowchart for the developed ANN model.
Figure 2. Flowchart for the developed ANN model.
Flowcharts: SGA and HGA
Figure 3. Flowcharts: SGA and HGA
Type of corrections
Figure 4. Type of corrections
Example of correction – Actuation as start-up of the pumps
Figure 5. Example of correction – Actuation as start-up of the pumps
Wind energy: Wind Turbine Power Curve for an Enercon E33 and Wind source for one year at Lisbon region
Figure 6. Wind energy: Wind Turbine Power Curve for an Enercon E33 and Wind source for one year at Lisbon region
Drinking system of Cascalheira’s tank
Figure 7. Drinking system of Cascalheira’s tank
Pattern demand of Fátima system
Figure 8. Pattern demand of Fátima system
Control pump strategy
Figure 9. Control pump strategy
Convergence of the fitness functions
Figure 10. Convergence of the fitness functions
Control pump strategy (HGA).
Figure 11. Control pump strategy (HGA).
Water level of Fazarga tank
Figure 12. Water level of Fazarga tank
Scheme of Espite water distribution system
Figure 13. Scheme of Espite water distribution system
Elevation and length profile of Espite pipeline
Figure 14. Elevation and length profile of Espite pipeline
System behaviour with reservoir level control and pump operation optimization: water level variation in Couções tank, electricity tariff and pump and turbine operation time.
Figure 15. System behaviour with reservoir level control and pump operation optimization: water level variation in Couções tank, electricity tariff and pump and turbine operation time.
NPV results by ANN and CES models for the case study.
Figure 16. NPV results by ANN and CES models for the case study.

Energy Efficiency in Water Supply Systems: GA for Pump Schedule Optimization and ANN for Hybrid Energy Prediction

H. M. Ramos1, L. H. M. Costa2 and F. V. Gonçalves3

1. Introduction

In the last decades, the managers of water distribution systems have been concerned with the reduction of energy consumption and the strong influence of climate changes on water patterns. The subsequent increase in oil prices has increased the search for alternatives to generate energy using renewable sources and creating hybrid energy solutions, in particular associated to the water consumption.

According to Watergy (2009), about two or three percent of the energy consumption in the world is used for pumping and water treatment for urban and industrial purposes. The consumption of energy, in most of water systems all over the world, could be reduced at least 25%, through performance improvements in the energy efficiency. Hence, it is noticeable the importance of development of models which define operational strategies in pumping stations, aiming at their best energy efficiency solution.

The consumption of electric energy, due to the water pumping, represents the biggest part of the energy expenses in the water industry sector. Among several practical solutions, which can enable the reduction of energy consumption, the change in the pumping operational procedures shows to be very effective, since it does not need any additional investment but it is able to induce a significant energy cost reduction in a short term. As well known, the tasks of operators from the drinking network systems are very complex because several distinct goals are involved in this process. To determine, among an extensive set of possibilities, the best operational rules that watch out for the quality of the public service and also provide energy savings, through the utilization of optimization model tools which take into consideration all the system parameters and components, is undoubtedly a priority.

The technological advances in the computational area enabled, in the last years, the intensification of the quality of scientific works related to the optimization tools, as well as aiming at the reduction of the energy costs in the operation of drinking systems. Nevertheless, most of the optimization models developed was applied to specific cases.

The first studies to optimize the energy costs of pumping have been used for operational research techniques, such as linear programming (Jowitt and Germanopoulos, 1992), integer linear programming (Little and Mccrodden, 1989), non-linear programming (Ormsbee et al., 1989) and dynamic programming (Lansey and Awumah, 1994). The limitation of using these models to real cases is mainly due to the complexity of the equations’ resolution to ensure the hydraulic balance and the difficulty of generalizing such optimization models in any water supply system (WSS).

Brion and Mays (1991), in the attempt to reduce the operational costs in a drinking pipeline in Austin, Texas (USA), had tested a model of optimization and simulation, achieving a reduction of 17.3 % in the operational costs. Ormsbee and Reddy (1995) applied an optimization algorithm in Washington - DC and obtained significant results with the management implementation provided by the model, observing a reduction of 6.9% in the costs with electric energy. During this period, the use of evolutionary algorithms was quite limited. Wood and Reddy (1994) were the pioneers in the use of such algorithms.

The remarkable use of evolutionary algorithms in this research topic in recent years is mainly due to Genetic Algorithm (GA) provides a great flexibility in exploring the search space and allows an easy link to other simulation models. However, in contrast the GA does not solve problems with constraints. Once the operation in WSS is considered a complex procedure, with many constraints, there remains the doubt about the speed of the modelling and the convergence for optimal solutions between the GA and hydraulic simulators.

Additionally the concern with the reduction of the computational time is due to the applicability of energy optimization models in real time (Martinez, et al., 2007; Jamieson, et al., 2007, Salomons et al., 2007; Rao and Alvarruiz, 2007; Rao and Salomons, 2007; Alvis et al., 2007). To reduce the computational time for seeking solutions with reduced energy costs, these authors used the technique of Artificial Neural Networks (ANN) to reproduce the results by the hydraulic simulator obtained by the EPANET (Rossman, 2000). Then, this new tool based on ANN for the hydraulic simulation was connected with a GA model. After several analyses done in a hypothetical system and in two real case studies, the authors concluded the model GA-ANN found optimal solutions in a period 20 times lower when compared to GA-EPANET. Shamir and Salomons (2008) have searched for reducing the computational simulation time based on a scale model of a real case system for different operating conditions.

At the present research a different resolution was adopted. In order to reduce the computational simulation time in the search for optimal solutions, a change in the GA algorithm type was made, instead of replacing the hydraulic simulator model (EPANET) as former references. Thus, new algorithms were created which work directly with the infeasible solutions generated by a GA to make them feasible, through the development of a hybrid genetic algorithm (HGA) (i.e. genetic algorithm plus repair algorithms).

This new model determines, in discrete intervals (every hours) the best programming to be followed by the pumps switch on / off, in a daily perspective of operation. In this way, the decisions start to be orientated from the research of thousands of possible combinations, being chosen, through an iterative process, the best energy management strategy that presents the best energy savings.

The world’s economy is directly connected to energy and it is the straight way to produce life quality for society. China is nowadays one of the biggest consumers of energy in the world (Wu, 2009). In order to have enough energy to make its economy grow the prediction of new solutions to produce sustainable energy in a most feasible way is imperative, not only depending on conventional sources (i.e. fossil fuel) but using renewable sources. The increase of energy consumption and the desired reduction of the use of fossil fuels and the raise of the harmful effects of pollution produced by non-renewable sources is one of the most important reasons for conducting research in renewable and sustainable solutions. In Koroneos (2003) analysis, renewable sources are used to produce energy with high efficiencies, social and environmental significant benefits.

Renewable energy includes hydro, wind, solar and many others resources. To avoid problems caused by weather and environment uncertainties that hinder the reliability of a continuous production of energy from renewable sources, when only one source production system model is considered, the possibility of integrating various sources, creating hybrid energy solutions, can greatly reduce the intermittences and uncertainties of energy production bringing a new perspective for the future. These hybrid solutions are feasible applications for water distribution systems that need to decrease their costs with the electrical component. These solutions, when installed in water systems, take the advantage of power production based on its own available flow energy, as well as on local available renewable sources, saving on the purchase of energy produced by fossil sources and contributing for the reduction of the greenhouse effect. In recent studies (Moura and Almeida, 2009; Ramos and Ramos, 2009a; Ramos and Ramos, 2009b; Vieira and Ramos, 2008, 2009), the option to mix complementary energy sources like hydropower, wind or solar seems to be a solution to mitigate the energy intermittency when comparing with only one source. So, the idea of a hybrid solution has the advantage of compensating the fluctuations between available sources with decentralized renewable generation technologies.

In literature review, a sustainable energy system has been commonly defined in terms of its energy efficiency, its reliability, and its environmental impacts. The basic requirements for an efficient energy system is its ability to generate enough power for world needs at an affordable price, clean supply, in safe and reliable conditions. On the other hand, the typical characteristics of a sustainable energy system can be derived from policy definitions and objectives since they are quite similar in industrialized countries. The improvement of the efficiency in the energy production and the guarantee of reliable energy supply seem to be nowadays common interests of the developed and developing countries (Alanne and Saari, 2006).

This work aims to present an artificial neural network model by the optimization of the best economical hybrid solution configuration applied to a typical water distribution system.

2. Models formulation

2.1. Objective function

The search for the optimal control settings of pumps in a real drinking network system is seen as a problem of high complexity, due to the fact that it involves a high number of decision variables and several constraints, particular to each system. The decision variables are the operational states of the pumps xt (x 1t, x 2t, …, x Nt), where N represents the number of pumps and t is the time-step throughout the operational time.

To represent the states of the decision variables in each time-step, the binary notation was used. The configuration of each pump is represented by a bit where 0 and 1 stated switched on and off, respectively. The main goal of the model is to find the configuration of the pumps’ status which proceeds to the lowest energy cost scenario for the operational time duration. To calculate this cost, several variables must be considered, in each time-step, such as the variation of consumption, energy tariff pattern and the operational status of each pump.

The objective function is the sum of energy consumed by the pumps, in every operational time, due to the water consumption and tanks’ storage capacity. It can be expressed according to the following equation:


where E and C stated the consumed energy (kWh) and the energy costs by pumps’ operation in the time-step t.

2.2. Constraints

The main constraint of the model is the hydraulic balance verification for the network. To establish such balance, the equations of the conservation of mass at each junction node and the conservation of energy around each loop in the network are satisfied. In order to these conditions be attended it is necessary to accomplish the hydraulic verifications to each system configuration. The hydraulic simulator EPANET (ROSSMAN, 2000) was used to perform this purpose.

The constraints are implicit in the calculation of the objective function. These are equations that need to be solved in order to obtain the total energy cost of the solution to be analyzed. After accomplishing this stage, some variables are verified, from the hydraulic simulation, aiming for obtaining the hydraulic performance of the system that it is evaluated by means of explicit constraints, showed as follows:

Pressure: for each time-step of operational time, the pressures in all the junction nodes must be between the minimum and maximum limits.


where Pit represents the pressure on node i in time-step t, Pmin i and Pmax i are the minimum and maximum pressures required for node i.

Levels of storage tanks: The levels of storage tanks must be between the minimum and maximum limits for each time-step. Besides at the end of the operational time duration, they must be superior to the levels at the beginning of the time duration. This last constraint assures the levels of the tanks do not lessen with the repetitions of the operational cycles.


where Sjt: level of tank j in time-step t; Smin j e Smax j: minimum and maximum levels of storage tank j.


Pumping power capacity: the power used by each pump during the operational time must be inferior to its maximum capacity.


where PPkt : used power by pump k in time-step t; PPmaxk: maximum capacity of the pump k.

Actuation of the pumps: The number of pumping start-ups in the operational strategy must be inferior to a pre-established limit. This constraint, presented by Lansey and Awumah (1994), influences in the maintenance of each pump, since the more it is put into action in a same operational cycle, the bigger will be its wear. Lansey and Awumah (1994) suggest the maximum pump start-ups 3 in 24 hours. A greater value can cause problems on the pumps inducing the need of maintenance and repair and consequently the interruption of the system operation.

where: NAk represents the number of start-ups for pump k and NAmaxk the maximum allowable pump start-ups for the pump k.

2.3. Optimization algorithm

The definition of optimal control strategies in water distribution systems, where the rules evaluate the behaviour of the system and make decisions at each time-step, requiring a great computational demand. Among several available optimization methods, the Genetic Algorithm (GA) was the tool chosen for offering a great flexibility in search space, allied to the possibility of use discrete variables. Besides these advantages, the technique has an easy manipulation, which makes its connectivity with simulation models easier.

The model developed is composed by two modules that will work as a whole in a way the hydraulic simulation routine is called to simulate each operational alternative scenarios given by the GA, in the search of alternatives with better performance.

Figure 1.

Stages of the optimization model

Further a Simple Genetic Algorithm (SGA), a Hybrid Genetic Algorithm (HGA) was also developed. This algorithm was built from a combination of a conventional GA with a method of correction of solutions and a specialized local search procedure. The goal is to find, in a faster way, feasible solutions, which are difficult to be found by traditional genetic algorithms due to the tendency that the situation has to generate a high number of impracticable hydraulic solutions.

The flowchart containing the steps of the optimization model is shown in the Figure 1.

2.4. Prediction algorithm

The conception of an ANN in order to capture the best energy model domain from a configuration model and economical simulator (CES) in a much more efficient way is based on the following remarks: first of all, a robust data base has to be developed to create the input and output data set that will be used in ANN conception and training; the data has to be analysed to determine a structure that fits the problem and then to train and validate the ANN.

Figure 2.

Flowchart for the developed ANN model.

A flowchart describing the procedures of the designed ANN is shown on Figure 2.

The data used on this study is calculated by means of a CES model that gives an optimized ranking of the best hybrid solution for each particular case, based on an economy analyses for the production and consumption of energy (Figure 2). This data set is organized with the subject that the study is concerned to evaluate the use of hybrid energy solutions in water distribution systems based on micro-hydro, wind turbine and national electric grid. Hence, the range of data is defined in order to adequate the installation of such energy converters. The data range for flow, power head and water levels variation in reservoirs are used in a hydraulic and power simulator (HPS) to determine the power consumed by the pump and the power produced in a micro-hydro turbine installed in a gravity pipe branch whenever there is energy available in the system.

3. Methodology

3.1. Simple Genetic Algorithm (SGA)

GA is a stochastic method of global search that develop such search through the evolution of a population, where each element (or individual) is the representation of a possible solution for the problem. The principle is based on the theory of natural selection and it was firstly presented by Goldberg (1989).

At drinking systems’ operation, GA stands out for being very efficient when binary and discrete variables are used. They represent a set of optimal solutions and not only one. At each new computational step, solutions containing the status of the pumps are evaluated and later classified according to its fitness. The tendency is as the running proceeds, the elements with less fitness disappear and the more adapted to the impositions (or constraints) of the problem will arise.

GAs do not deal directly with the optimization problems that contain constraints. This impediment in the minimization procedure can be overcome employing the Penalty Methods, on which pre-defined constraints are added to the objective function in terms of penalties, turning the solution less apt as much as its violations occur. The Multiplicative Penalty Method (MPM), presented by Hilton & Culver (2000), is then implemented in this model. The penalty function is presented as follows:


where TR: type of constraint; NTR: amount of hydraulic elements (nodes, reservoirs or pumps) which have violated certain constraints; k: coefficient which varies with the hydraulic element and the type of violated constraint.

Table 1 shows the values of k depending on the type of violated constraint.

TRHydraulic ElementViolated Constraintk
N1NodesPressure between the limits (min. and max.) 1.05
N2Positive pressure (continuity of supply)1.80
R1TanksWater level between the limits (min. and max.)1.20
R2Water level at 24h greater than the initial level1.50
B1PumpsMaximum capacity of pump1.20
B2Number of actuations 1.50

Table 1.

Values of k

The values of k represent how the energy cost is increased for a particular type of violated restriction (TR). These values were determined from the amount and importance of constraints in the model. Analyzing the extreme values (1.05 and 1.80), for each node that exceed their limits, increases 5% to the value of the objective function. It was adopted the lower value for this violation because, commonly, the number of nodes in a WSS is higher the amount of tanks and pumps. However, as the discontinuity of the supply occurs in the system, it has great importance in the feasibility of the solution consequently a maximum value was adopted for this type of violation, increasing by 80% the cost of energy. Following this logic, the remaining violations have intermediate k values. When the constraint is not violated the coefficient k has the unit value.

The first stage of the SGA (Figure 1) process is characterized by the generation of operational rules (randomly), the demand definition and the tariff costs. Next, these variables are used by the hydraulic simulator (i.e. EPANET), which calculates the pressures in the pipe system nodes, the energy consumed and the levels of the tanks, all of them being necessary for the evaluation of the solution. The following stage is characterized by the calculation of the objective function, which is obtained from the total energy cost and from the penalty function, in case of infeasible solution. The process is repeated until the parameters of the operational control meets the hydraulic requirements with the lowest cost possible.

3.2. Hybrid Genetic Algorithm

SGA makes use of the penalty method becoming the infeasible solutions into solutions with reduced ability. The genetic operators only diversify the solutions, but do not become them feasible. In this case, it can be confirmed the search process for solutions hydraulically feasible, with minimum energy costs, is strongly stochastic. During the process of evaluation of the objective function, the explicit restrictive variables can be evaluated every hour. Thus, at this time interval, it is possible to verify the type of constraints that were violated. Because of this, repair algorithms were created, and every hour they try to correct the solutions generated by GA, becoming them hydraulically feasible. The HGA layout of the model is also presented at Figure 3. Hence, each solution generated by GA is passed on to the repair algorithms. After this stage two solutions are stored: the original, generated by GA, and the modified solution, generated after the attempts of correction. If the penalty function of the modified solution is zero, so it will be sent to a data bank, otherwise, this solution will be discarded. Independent on the destiny of the modified solution, the original solution will be conserved and sent to the next generations of the GA, avoiding a premature convergence of the solutions.

The repair algorithms are only a set of rules that modify the decision variables trying to become solutions hydraulically feasible all hours (Figure 4).

Among the type of corrections presented in Figure 4, the one related to the maximum number of pump start-ups is the only one that does not use the EPANET routines. This is the first type of repair that occurs in infeasible solutions and aims mainly the reduction of the pump start-ups, changing as little as possible the original configuration of the solution.

Figure 3.

Flowcharts: SGA and HGA

Figure 5 illustrates this type of repair to a solution of a pump with six start-ups.

In Figure 5, with only four changes, it was reduced from six to two the number of start-ups. Besides the considerable reduction, in the repaired solution is visible a greater uniformity of pumps’ switch-on schedules. The changed solution has presented only two periods with the pump switched-on. The use of long operation periods is a characteristic of commonly strategies in real pump systems due to a lesser intervention in the operation and a wear reduction of the pumps.

Figure 4.

Type of corrections

Figure 5.

Example of correction – Actuation as start-up of the pumps

Finishing the iterations of the HGA, the solutions stored at the data bank (feasible solutions) are sent to a process of specialized local search. This search algorithm is an iterative process in which, every hour, the pumps are switched-off one by one, verifying if the constraints remain inviolate. If the solution becomes hydraulically unfeasible, the initial solution is restored. The selected hour is the one that has the highest energy cost. The process is repeated until there are no alterations that result in feasible solutions.

With the utilization of the specialized local search algorithm it is possible to evolve good solutions in local optimal solutions. These solutions would probably require great computational efforts to be found by the conventional GA.

3.3. Artificial Neural Network

The data of renewable sources performance characteristics is included in the CES model to determine the best hybrid energy solution to be selected. One of the resources data is the wind turbine power curve of a selected wind turbine, which corresponds to the local wind source along an average year for the region under analysis (Figure 6) and the wind annual average speed applied to the wind turbine. In Table 2 is presented an example of data set range to be used in the CES model to determine the inputs and outputs of the developed ANN. Those data is used to calculate all energy and economic parameters to be included in the CES model to complete the data needed to train the ANN.

Figure 6.

Wind energy: Wind Turbine Power Curve for an Enercon E33 and Wind source for one year at Lisbon region

Based on a basic data range, depending on the system characteristics (Table 2), to be used in the CES model and from auxiliary hydraulic and energy formulations, the complete input data is then obtained (Table 3) being: (1) Pump power (kW); (2) Pump energy consumption (kWh); (3) Turbine power (kW) - average output; (4) Flow (m3/s) - annual average flow; (5) Gross head (m); (6) Pumping head (m); (7) Head losses (m); (8) Power net head (m); (9) Design pumping flow rate (l/s); (10) Wind speed (m/s) - annual average; and (11) Wind turbine power (kW) - annual average output.

In the end of the modelling process the input data set is built in a matrix of [11 x 19,602] (Table 3), which by the interaction of the wind velocity data and the water flow yields in the output matrix of [5 x 19,602] (Table 4), representing the Net Present Value (NPV) of each hybrid solution configuration, as well as the number of wind turbines to be installed.

Wind speed annual average (m/s)Flow (l/s)Power net head (m)Gross Head (m)

Table 2.

Basic data set range used in CES.

The ANN data set created to be used in water distribution systems is then ready to determine the NPV of each hybrid system evaluated for each type of configuration (e.g. grid, grid + hydro, grid + wind, grid + hydro + wind).

Pump power kW/h (1)Pump primary load kW/d (2)Turbine mean output power kW (3)Annual average flow m3/s (4) Z m (5)Pumping head m (6)Head loss m (7)Power head m (8)Design flow rate L/s (9)Wind speed m/s (10)Wind turbine mean output power kW (11)

Table 3.

Input data set for the system characteristics used in ANN.

Matlab® is used for the ANN development. The creation of an ANN should comprise the following steps: (i) patterns definition; (ii) network implementation; (iii) identification of the learning parameters; (iv) training, testing and validation processes. A new neural network model of hybrid energy must be compared with an energy configuration model and economical simulator (CES) using the following procedures: CES is used to obtain data applied in the training process and in reliable neural network tests, together with an hydraulic and power simulator model (HPS) for a large range of flow rates, gross heads, pumping and power heads and wind velocities. That data, available on Ramos and Ramos (2009b) research, uses the HPS to hydraulically balance the water distribution system, in a village of Portugal, determining the hydraulic behaviour of the all system including the most suitable pump and turbine operation for each flow condition.

NPV€ GridNPV€ Grid+HydroNPV€ Grid+WindNPV€ Grid+Hydro+WindWind Turbine Installed

Table 4.

Input data set for the best economic configuration used in ANN.

In the ANN code running, the process of training and simulation for each system characteristic is analysed. In the training mode is introduced the configuration parameters. Those parameters are standard limits (max and min), number of neurons on the hidden layer, limit number of epochs, final error desired, validation rate and activation function used in the hidden layer. With the best ANN configuration for each possible hybrid system and new data set for inputs, a validation process is made and the results are verified in terms of correlation and relative error among the values of CES base model and the ANN.

4. Case studies

4.1. Optimization of the pumps’ schedule in the Fátima system

The drinking system of Fátima is composed of 22 water sources, 10 treatment plants, 36 pump-stations and 64 tanks. The water is distributed to the consumers through 1111 km by a supply and distribution network system. Nowadays, the system is managed by the company Veolia – Águas de Ourém, which is responsible for the catchment, water treatment and distribution (Figure 7).

Figure 7.

Drinking system of Cascalheira’s tank

The supply system chosen for this case study supplies the tank Fazarga with an elevation of 402 m. This tank is responsible for the service to the demands of the region of Fátima and other close locations. This supply system has a pump station (PS) located in the proximities of the tank Cascalheira (elevation: 375 m). This last one is supplied by EPAL (Portuguese Lisbon Water Company) and provides water, by gravity, to the locations of Aljustrel and Fontainhas.

According to former description, the water storage of the tank Cascalheira is done by EPAL. The cost attributed to Veolia by this supply is related only to the effluent volume from this tank and it is not dependent of any alteration in the operation of the pump-station between tanks of Cascalheira and Fazarga. The reduction of this cost would only be possible with the implementation of water loss control by leakage. The level of the tank Cascalheira is always maintained close to the maximum limit in a way that it increases the reliability of the system. Thus, in the optimization model, it was chosen to consider only the variation of the level of the tank Fazarga at downstream of the pump-station.

The tank of Cascalheira has the storage capacity of 4000 m³ of water, whereas Fazarga has a total volume of 347 m³ and operates with the initial, minimum and maximum levels of 2.0 m, 0.3 m and 2.3 m, respectively. The pump-station comprises two pumps of Grundfos NK65-250 type which work for an average flow of 42 1/s with an efficiency of 65%.

The average time variation of the consumption in the region of Fátima during the day was obtained from the sensors located at the exit of the tank Fazarga. The period analyzed was from March to September, 2007. The water consumption in this year is more noticeable for comprising spring and summer. Figure 8 presents the average time variation calculated.

The hours with the pump working are considered as regular and discrete intervals by the optimization algorithm. Thus, for this case study, a day in which the pumps remained switched-on, in intervals similar to the format considered in the optimization model, were chosen. The hydraulic model of the system was built, in which the tanks Cascalheira and Fazarga were considered as reservoir and storage tank, respectively.

The variation in the level of the tank of Fazarga during the day calculated by the hydraulic simulator was similar to the real values. The maximum number of pump start-ups (Na max) used by Veolia was three (pump 1) and the level of the tank at the end of the operational time is very close to the initial one (Figure 9). The variation of the energy rate is presented in Table 5.

Hour 1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00 9:00 10:00 11:00 12:00
Tariff 0,0465 0,0465 0,0465 0,0465 0,0465 0,0465 0,0465 0,0465 0,0465 0,0761 0,1299 0,1299
Hour 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 23:00 24:00
Tariff 0,1299 0,0761 0,0761 0,0761 0,0761 0,0761 0,0761 0,0761 0,1299 0,1299 0,0761 0,0465

Table 5.

Hour vs Energy Tariff (€/kWh) for Fátima system

Figure 8.

Pattern demand of Fátima system

Figure 9.

Control pump strategy

Both GA models presented in this analysis were implemented to determine the best operational strategy with a reduced energy cost in the system Cascalheira/Fazarga. Figure 10 presents the evolution of the objective function with the computational time, in minutes.

Figure 10.

Convergence of the fitness functions

It is possible to evaluate the efficiency of the HGA model. Only with the feasible solutions obtained with 20 generations, from the repair algorithms and from the specialized local search system, it is possible to find a local optimal solution in about 5 minutes, whereas the SGA took a little more than 33 minutes to find a good solution, with also a bit higher energy cost when compared to the solution found by the HGA. The difficulty for GA to find a good feasible solution can quickly be confirmed. Such behaviour occurs due to the high level of randomness existent in GA models. The alterations of the solutions provided by the genetic operators diversify the type of answer without a guarantee of the evolution in each generation. Among all possible solutions, the probability of extracting, for each pump, a solution with at most three start-ups is 0.0173. Now, it is possible to confirm the difficulty of obtaining a feasible solution, because besides the determination of a solution it is necessary the other constraints (pressure limits, water levels in tanks and power pumps start-ups) be satisfied. These constraints are dependent on the complexity of the drinking system to be evaluated.

The energy cost due to the operation was 22.22 euros (date: 07 (day)/12 (month)/07 (year)). The pumps remained switched-on during 12 hours. A period of two hours (13h and 22h) belongs to the period with the most expensive energy tariff (Figure 11). The variation in the reservoir level is the main factor in the decision making the operation and the variation of the energy tariff is the second reason.

The best solution obtained by HGA, in each iteration step, is selected from a set of solutions containing only individuals hydraulically feasible. The objective function for this case is the total energy cost. For SGA while the model does not find a feasible solution, the objective function starts to be the sum between the energy cost and the penalty function. The operational strategy found by the HGA and the variations of the water level in the Fazarga tank for the real situation and the solution with reduced energy cost are shown at Figures 11 and 12. From Figures 9, 11 and 12 it is possible to make a comparison between the operational strategies presently adopted by the water manager company and the one obtained by HGA optimization model. The variation of the energy tariff was well explored in the solution with an important reduction of the energy cost (HGA). It is possible to observe a significant difference from the strategies, being noticeable that the pumps do not work in hours with energy tariff more expensive. With the implementation of the optimization model an economy of 31% was achieved for the period chosen for the analysis.

Figure 11.

Control pump strategy (HGA).

In operational terms, the strategy obtained from the HGA can be considered more daring. In the critical time (1:00 p.m.) the level of the tank in the present operation by the water company achieved values superior to 1m. However based on former mentioned, the minimum water level in the Fazarga tank is 0.30m. In case of desirable an economic solution with higher levels in the tanks, it is easy to increase the minimum limit of the water level in the constraints of the HGA developed model. The importance between the minimum water level attained in the tank and the energy costs to be paid by the water company will depend on the water company priorities, economic and social impacts, and performance or feasibility factors.

Figure 12.

Water level of Fazarga tank

4.2. Prediction of hybrid energy solutions in Espite system

Espite is located in Ourém and it is a small system that distributes water to Couções and Arneiros do Carvalhal villages and the average flow in this pipe system is approximately 7 l/s. This system is hydraulically analysed to determine the best hydro solution. Then ANN is applied to establish the best economical hybrid solution, employing the same data set used to developed ANN model. A simplified scheme of Espite water drinking system is presented in Figure 13.

Figure 13.

Scheme of Espite water distribution system

Figure 14.

Elevation and length profile of Espite pipeline

The pump station considered in the analysis is Pump Carvalhal 1 and 2 and the micro hydro power plant will be installed in the gravity pipe system between node 5 and Tank Carvalhal. The population consumption (i.e. demand points) must be guaranteed and the tanks water level variation should vary between recommended limits. The elevation profile of Espite system is established in Figure 14, where (1) Reservoir 01; (2) Pump R01; (3) Node 1; (4) Tank ASJ; (5) Node 2; (6) Node 3; (7) Node 4; (8) Node 5; (9) Turbine, Tank Carvalhal, Pumps Carvalhal 1 & 2,; (10) Node 6; (11) Tank Couções and (12) Demand point Couções.

The HPS model is used to verify all hydraulic parameters and the system behaviour when a hydropower is installed. Rule-based controls are defined in the optimisation process to guarantee that the limit tank levels are always respected. In order to determine the most adequate hydro turbine in this water pipe system, regarding the importance to always maintain a good system operation management and the satisfactory demand flows, the evaluation of the available energy and the characteristic turbine curve compatible with the all operating and hydraulic constrains must be developed. According to Araujo (2005) and Ramos et al. (2010), a characteristic curve for the turbine is evaluated to define the most adequate turbine selection a key for the successful of this solution. The system is then analysed using the electricity tariff for the worst conditions. The energy report of the original situation is shown in Table 6.

Energy Report
Pump StationUse*(%)Consumption
Max. Power kW
Carvalhal 1100,000,784,51
Carvalhal 2100,000,784,51

Table 6.

Pump cost with original situation. *basis reference

To reduce the pump consumption, the optimization of the time pumping is considered, turning it on in the low electricity tariff period and turning it off in the higher tariff period, always imposing tank levels’ restriction to satisfy the minimum and maximum advisable values for its good operation. Figure 15 shows the system behaviour regarding the water level variation and the optimized pump operation time. Table 7 shows the savings achieved with the water level control and pump operation optimization for the energy tariff pattern adopted.

Figure 15.

System behaviour with reservoir level control and pump operation optimization: water level variation in Couções tank, electricity tariff and pump and turbine operation time.

Energy Report
Pump StationUse*(%)Consumption
Max. Power kWSaving (%)
Carvalhal 165.090,553.2458.19
Carvalhal 265.090,553.2458.19

Table 7.

Pump benefits with optimization of water level control and pump operation

The energy production in the hydro power is calculated using the hydraulic turbine selected considering a sell rate of 0.10€/kWh for 24 hour production as shown in Table 8 as well as the saving achieved with this energy configuration. The operating point of the turbine corresponds to a power net head of 40 m and an average flow of 6.6 l/s determined by the HPS model based on extended period simulations of 24h.

Energy Report
TurbineProduction kWh/m3 Max. Power kWPower/day kWSaving (%)

Table 8.

Energy production in the hydropower solution.

Figure 16.

NPV results by ANN and CES models for the case study.

After the calculation of the pump consumption and the turbine production, the values are inserted in the ANN model developed and compared with the results obtained with the CES model. For the analysis of the best hybrid energy solution it takes into account that the wind speed in the region of this case study has an average value of 5 m/s. It was considered the wind turbine model SW Skystream 3.7 with a rated power of 1.8 kW and a market price of € 15,000 and a micro hydro turbine (or a pump as turbine – PAT) with a market price estimated in € 2,500 with a nominal power of 3.14 kW. For a lifetime analysis of 25 years, the ANN results show that the best hybrid solution for this case study is a grid + hydro with an NPV of €18,966, and the CES results point out for the same solution a NPV of €18,950, with a relative error of 0.08% and a correlation coefficient of 0.999996. Figure 16 presents the results for all configurations calculated by ANN and CES models showing clearly the best solution.

The negative value of NPV in Grid+Wind and Grid+Hydro+Wind is derived from initial installation costs of the wind turbine and its small energy production. For the case study a bigger wind turbine with a higher installed power capacity wasn’t chosen because the wind speed in the case study area is very low and wind turbines that have a satisfactory energy production for these wind speeds are extremely expensive, being inadequate to the case study that is a small system and without many resources to be invested.

5. Conclusions

5.1. Optimization of the pumps’ schedule in the Fátima system

The feasibility of the developed HGA model in the search of the best operational strategy for a lowest energy cost in the real Fátima system was analysed. Two algorithms were developed and linked to the GA. The first one, a repair algorithm from an analysis done in the unfeasible solutions generated by the GA, alters the decision variables in the attempt of making these solutions feasible. After finishing the generations of the GA, the second algorithm acts in these solutions, making a local search in the attempt of finding optimal locals.

The efficiency of the algorithm developed HGA in the search of the solution with lowest operational cost is confirmed, whereas the convergence occurred six times faster. One of the biggest limitations of the GA is the treatment of problems with high quantity of constraints. The application of penalties only allows the identification of unfeasible solutions. In problems of this kind it is probable that along the candidates’ generation, the quantity of unfeasible candidates does not decrease, making the search of good solutions very difficult. With the implementation of repair algorithms, the appearance of super-candidates occurs in less time, since the alterations in the individuals are done directly in its problematic genes.

An evaluation analysis about the necessity of use genetic operators, when these algorithms are applied directly in a large set of solutions generated randomly, also shows final good results. To determine the best strategy among thousands of possible solutions it must also be taken into consideration the hydraulic reliability of the system.

The HGA model presented can be implemented in any network. Furthermore, its application is practical and useful, being able to be used by water supply companies, making easier the best decision aiming at the energy efficiency in pumping systems.

5.2. Prediction of hybrid energy solutions in Espite system

The current research work aims at the prediction analysis about the best energy system configuration, depending on the renewable available sources of the region, and the optimization of operating strategies for the water distribution systems (WDS), which have about 80% of their costs associated to the energy consumption. Hence an integrated methodology based on economical, technical and hydraulic performances has been developed using the following steps: (i) Artificial Neural Network (ANN) to determine the best hybrid energy system configuration; (ii) for the ANN training process, a configuration and economical base simulator model (CES) is used; (iii) as well a hydraulic and power simulator model (HPS) to describe the hydraulic behaviour; (iv) an optimization based-model to minimize pumping costs and maximize hydraulic reliability and energy efficiency is then applied.

The objective is to capture the knowledge domain in much more efficient way than a CES, ensuring a good reliability and best economical hybrid energy solution in the improvement of energy efficiency and sustainability of WDS. In this case study the installation of a micro hydro using water level controls and pump operation optimization shows the improvement of the energy efficiency in 63.35%. In this methodology to determine the best hybrid energy solution, the ANN has demonstrated significant reduction in time modelling, with a good a correlation and mean relative error.


1 - A. Al-Alawi, S. M Al-Alawi, S.. M Islam, 2007 Predictive control of an integrated PV-diesel water and power supply system using an artificial neural network. Renewable Energy, 32 8 1426 1439
2 - K. Alanne, A. Saari, 2006 Distributed energy generation and sustainable development. Renewable and Sustainable Energy Reviews, 10 6 539 558
3 - S. Alvisi, M. Franchini, A. Marinelli, 2007 A short-term, pattern-based water demand-forecasting model. Journal of Hydroinformatics, 9 1 39 50
4 - L. d. S. Araujo, 2005 Controlo de perdas na gestão sustentável dos sistemas de abastecimento de água. Lisbon: Instituto Superior Técnico, (Tese de Doutoramento) 338
5 - N. N. Barsoum, P. Vacent, 2007 Balancing Cost, Operation and Performance in Integrated Hydrogen Hybrid Energy System. First Asia International Conference on Modelling & Simulation- AMS’07 14 18
6 - L. M. Brion, L. W. Mays, 1991 Methodology for Optimal Operation of Pumping Stations in Water Distribution Systems. Journal of Hydraulic Engineering, ASCE. 117 11 1551 1569
7 - E. D. Castronuovo, J. A. P. Lopes, 2004 On the optimization of the daily operation of a wind-hydro power plant. IEEE Transactions on Power Systems., 19 3 1599 1606
8 - P. Chaves, T. Tsukatani, T. Kojiri, 2004 Operation of storage reservoir for water quality by using optimization and artificial intelligence techniques Mathematics and Computers in Simulation 67 4-5 419 432
9 - S. Christodoulou, A. Deligianni, 2010 A Neurofuzzy Decision Framework for the Management of Water Distribution Networks. Water Resources Management, 24 1 139 156
10 - S. S. Dihrab, K. Sopian, 2010 Electricity generation of hybrid PV/wind systems in Iraq. Renewable Energy, 35 6 1303 1307
11 - European Commission 2001 Directive for the promotion of electricity from renewable energy sources in the internal electricity market. In: Department of Energy of the European Commission, ed. 2001/77/EC Official Journal of the European Communities, 33 40
12 - E. Fabrizio, V. Corrado, M. Filippi, 2010 A model to design and optimize multi-energy systems in buildings at the design concept stage. Renewable Energy 35 3 644 655
13 - P. Fattahi, S. Fayyaz, 2010 A Compromise Programming Model to Integrated Urban Water Management. Water Resources Management, 24 6 1211 1227
14 - A. L. Francato, P. S. F. Barbosa, 1999 Operação Ótima de Sistemas Urbanos de Abastecimento de Água. XV Congresso Brasileiro de Engenharia Mecânica. Águas de Lindóia, SP
15 - K. Gabrovska, A. Wagner, N. Mihailov, 2004 Software system for simulation of electric power processes in photovoltaic-hybrid system. Proceedings of the 5th international conference on Computer systems and technologies: ACM, 1 7
16 - D. E. Goldberg, 1989 Genetic Algorithm is Search Optimization and Machine Learning. Addision-Wesley-Longman, Reading.MA.
17 - A. Gupta, R. P. Saini, M. P. Sharma, 2006 Modelling of Hybrid Energy System for Off Grid Electrification of Clusters of Villages. Power Electronics, Drives and Energy Systems, 2006- PEDES’06., 5
18 - A. B. C. Hilton, T. B. Culver, 2000 Constraint Handling for genetic algorithms in optimal remediation design. J.Wat. Res. Plann. Mngmnt. ASCE 126 3 128 137
19 - R. Jafar, I. Shahrour, 2007 Modelling the structural degradation in water distribution systems using the artificial neural networks (ANN). Water Asset Management International, 3 3 14 18
20 - D. G. Jamieson, U. Shamir, F. Martinez, M. Franchini, 2007 Conceptual design of a generic, real-time, near-optimal control system for water-distribution networks. Journal of Hydroinformatics, 9 1 3 14
21 - D. G. Jamieson, 2007 Conceptual design of a generic, real-time, near-optimal control system for water-distribution networks. Journal of Hydroinformatics, 9 1 3 14
22 - P. W. Jowitt, G. Germanopoulos, 1992 Optimal Pump Scheduling in Water Supply Networks. Journal of Water Resources Planning and Management, ASCE, 118 4 406 422
23 - J. Kenfack, F. P. Neirac, T. T. Tatietse, D. Mayer, M. Fogue, A. Lejeune, 2009 Microhydro-PV-hybrid system: Sizing a small hydro-PV-hybrid system for rural electrification in developing countries. Renewable Energy, 34 10 2259 2263
24 - C. Koroneos, T. Spachos, N. Moussiopoulos, 2003 Exergy analysis of renewable energy sources. Renewable Energy, 28 2 295 310
25 - K. E. Lansey, K. Awumah, 1994 Optimal Pump Operations Considering Pump Switches. Journal of Water Resources Planning and Management, ASCE, 120 1 17 35.
26 - K. W. Little, B. J. Mc Crodden, 1989 Minimization of Raw Water Pumping Cost Using MILP. Journal of Water Resources Planning and Management, ASCE, 115 4 511 522
27 - F. Martinez, V. Hernandez, J. M. Alonso, Z. . Rao, S. Alvisi, 2007 Optimizing of the operation of the Valencia water-distribution network. J. Hydroinformatics 9 1 65 78.2
28 - A. Menegaki, 2008 Valuation for renewable energy: A comparative review. Renewable and Sustainable Energy Reviews, 12 9 2422 2437
29 - P. Moura, A. d. Almeida, 2009 Methodologies and Technologies for the Integrations of Renewable Resources in Portugal. Renewable Energy World Europe 2009. Cologne, Germany, 20
30 - L. E. Ormsbee, T. M. Waski, D. V. Chase, W. W. Sharp, 1989 Methodology for Improving Pump Operation Efficiency. Journal of Water Resources Planning and Management, ASCE, 115 2 148 164
31 - L. E. Ormsbee, S. L. Reddy, 1995 Nonlinear Heuristic for Pump Operations. Journal of Water Resources Planning and Management, ASCE. 302 309
32 - H. M. Ramos, M. Mello, P. K. De , 2010 Clean power in water supply systems as a sustainable solution: from planning to practical implementation. Water Science & Technology: Water Supply-WSTWS, 10 1 39 49
33 - J. S. Ramos, H. M. Ramos, 2009a Solar powered pumps to supply water for rural or isolated zones: A case study. Energy for Sustainable Development 13 3 151 158
34 - J. S. Ramos, H. M. Ramos, 2009b Sustainable application of renewable sources in water pumping systems: optimised energy system configuration. Energy Policy, 37 2 633 643
35 - Z. Rao, F. Alvarruiz, 2007 Use of an artificial neural network to capture the domain knowledge of a conventional hydraulic simulation model. Journal of Hydroinformatics, 9 1 15 24
36 - Z. Rao, F. Alvarruiz, 2007 Use of an artificial neural network to capture the domain knowledge of a conventional hydraulic simulation model. Journal of Hydroinformatics, 9 1 15 24
37 - Z. Rao, E. Salomons, 2007 Development of a real-time, near-optimal control system for water-distribution networks. Journal of Hydroinformatics, 9 1 25 38
38 - L. A. Rossman, 2000 EPANET User’s Manual. US EPA. Cincinnati,OH.
39 - A. B. A. Sakarya, L. W. Mays, 2000 Optimal Operation of Water Distribution Pumps Considering Water Quality. Journal of Water Resources Planning and Management, 126 4 210 220
40 - E. Salomons, A. Goryashko, U. Shamir, Z. Rao, S. Alvisi, 2007 Optimizing the operation of the Haifa-A water-distribution network, J. Hydroinformatics 9 1 51 64
41 - A. A. Setiawan, Y. Zhao, C. V. Nayar, 2009 Design, economic analysis and environmental considerations of mini-grid hybrid power system with reverse osmosis desalination plant for remote areas. Renewable Energy, 34 2 374 383
42 - U. Shamir, E. Salomons, 2008 Optimal Real-Time Operation of Urban Water Distribution Systems Using Reduced Models. ASCE 181 185
43 - A. Turgeon, 2005 Daily Operation of Reservoir Subject to Yearly Probabilistic Constraints. Journal of Water Resources Planning and Management, 131 5 342 350
44 - F. Vieira, H. M. Ramos, 2008 Hybrid solution and pump-storage optimization in water supply system efficiency: A case study. Energy Policy, 36 11 4142 4148
45 - F. Vieira, H. M. Ramos, 2009 Optimization of operational planning for wind/hydro hybrid water supply systems. Renewable Energy,


3 928 936
46 - Watergy 2009 why.php. Acessed in: 09/28/2009.
47 - D. J. Wood, L. S. Reddy, 1994 Control de Bombas de Velocidad Variable y Modelos en Tiempo Real para Minimizar Fugas y Costes Energéticos, In: Mejora del Rendimiento y de La Fiabilidad en Sistemas de Distribucion de Agua. Valência, Espanha: Editores E. Cabrera, U. D. Mecánica de Fluidos, Universidad Politécnica de Valencia, A. F. Vela e Universitat Jaume I de Castellón, 173 207