Available online at www.sciencedirect.com
ScienceDirect Procedia Engineering 186 (2017) 210 – 217
XVIII International Conference on Water Distribution Systems Analysis, WDSA2016
Pump operation optimization using rule-based controls Angela Marchi a,b*, Angus R. Simpson a,b, Martin F. Lambert a,b a
School of Civil, Environmental and Mining Engineering, University of Adelaide, Adelaide, South Australia, 5005, Australia b Cooperative Research Centre for Water Sensitive Cities, PO Box 8000, Clayton, Victoria, 3800, Australia
Abstract The optimization of pump operations has been widely studied, as it can decrease operational and maintenance costs and can reduce greenhouse gas emissions caused by the energy consumption from fossil fueled electricity sources. However, only the optimization of pump scheduling (where pumps are controlled based on times) and the optimization of simple controls (where pumps are controlled based on one condition only, e.g. the level of one tank) were previously able to be used in the EPANET2 toolkit. This paper uses a modified version of the hydraulic solver EPANET2 that enables rule-based controls (i.e. controls based on more than one condition) to be automatically changed by an optimization algorithm. This modification is particularly useful in cases where the pump operations need to be decided based on multiple conditions: typical examples are the cases where the pumps are controlled according to the water levels of multiple tanks or when both tank levels and time of day are taken into account to reduce the pumping in the peak tariff period. The new toolkit, called ETTAR (EPANET2 Toolkit to Alter Rules), is applied to a large case study, where different types of pump operations will be tested. Results show that the optimization of rule-based controls can decrease operational costs while guaranteeing robust pump controls. © 2016 2016The TheAuthors. Authors. Published by Elsevier Ltd. is an open access article under the CC BY-NC-ND license © Published by Elsevier Ltd. This Peer-review under responsibility of the organizing committee of the XVIII International Conference on Water Distribution (http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-review Systems. under responsibility of the organizing committee of the XVIII International Conference on Water Distribution Systems Keywords: Pump Operation; EPANET; Rule-Based Controls; Optimization; Evolutionary Algorithms; Water Distribution Systems
* Corresponding author. Tel.: +61 8 8313 1113; fax: +61 8 8303 4359. E-mail address:
[email protected]
1877-7058 © 2016 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license
(http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-review under responsibility of the organizing committee of the XVIII International Conference on Water Distribution Systems
doi:10.1016/j.proeng.2017.03.229
Angela Marchi et al. / Procedia Engineering 186 (2017) 210 – 217
1. Introduction The energy required to operate pumps in water distribution systems (WDSs) is responsible for a large part of the total operating costs of a water utility [1]. For this reason, the optimization of pump operation has been widely studied in the literature: from the early works where only the minimization of energy costs was considered (e.g. [2]; [3]; [4]; [5]; [6]; [7]), research has expanded to consider the trade-offs between operational costs and greenhouse gas emissions (e.g. [8]; [9]; [10]; [11]). Often the optimization of problems related to water distribution systems has been carried out using evolutionary algorithms (e.g. [4]; [5]) because of their advantages in formulating the problem: in particular, they do not require continuity and differentiability of the equations and they can be easily linked to external software to simulate a particular solution [12]. For WDSs problems, the simulation software used is often EPANET2 [13] because of it easy of use and because of the freely available source code. In EPANET2, as well as in other hydraulic solvers, pumps can be controlled using (i) a pattern (i.e. the pump status is specified for each time step); (ii) simple controls (i.e. the pump status is controlled based on only one condition, such as the tank level); (iii) rule-based controls, where the pump status is updated based on multiple conditions. [4] shows that scheduling (i.e. defining the pump operations based on times corresponding to the use of a pattern in EPANET) is more cost effective than using tank trigger levels. However, given the uncertainty in the demands, water utilities usually prefer the use of tank trigger levels, where in case of demands larger than expected, the pump would be switched on in an automatic way. Rule based controls can be advantageous compared to scheduling and simple controls as the pump controls can take into account the time of operation and can also take into account the tank levels, so as to ensure an automatic response to the hydraulics of the network. In particular, the optimization of rule-based controls can define multiple sets of tank trigger levels for the different electricity tariff periods in order to pump as much as possible during the less expensive period of the day. Despite these advantages, the optimization of rule-based controls was not performed until recently [14] as the EPANET2 toolkit did not allow any modification to this type of control. The modification of the EPANET2 toolkit by [15] allowed only tank trigger levels to be changed. In this paper, the additional functions to modify rule-based controls developed by [14] will be tested on a larger case study to show that rule-based controls can be optimized effectively for controlling the pump operations in water distribution systems. The rest of this paper is organized as follows: firstly, an explanation of the new ETTAR toolkit (EPANET2 Toolkit to Alter Rules) is given in the methodology section. Secondly the case study and the different types of optimizations are introduced. Results and discussions are then presented. Conclusions and future directions are summarized at the end. 2. Methodology The algorithm used in the following to optimize the rule-based controls is a single-objective genetic algorithm (GA). Other heuristic algorithms could have been chosen for the optimization (e.g. Ant Colony Optimization algorithm (ACO) as shown in [6]), but the GA has been chosen as it is a well-known algorithm that has been extensively applied to water distribution problems. This work focuses only on the minimization of costs in order to simplify the presentation of the results. In a GA, an initial set of solutions (i.e. a population) is randomly created and then iteratively modified through crossover and mutation processes. Best solutions have more chances to be selected as parents in a mating pool and will pass some of their good characteristics to the new solutions through a process called crossover. While crossover exploit the information contained in the parent solutions, mutation adds diversity and forces the algorithm to explore new regions of the search space. The search for the best solution in a genetic algorithm is controlled by few parameters: population size, number of generations and probability of crossover and mutation (see [16] for a review on GAs). Each time a new possible solution is created, it needs to be simulated in order to evaluate costs and the violation of constraints. With the ETTAR toolkit, this can be done in an automatic way, as explained in the next sub-section. If a solution is infeasible (i.e. does not comply with the constraints), the constraint violation is scaled by a multiplier factor and added to the operating cost, so as to penalize the infeasible solutions in proportion to the amount of violation of the constraint compared to other feasible solutions.
211
212
Angela Marchi et al. / Procedia Engineering 186 (2017) 210 – 217
2.1. How to use the ETTAR toolkit Rule based controls in EPANET2 are coded as shown in Fig. 1a, where an example of rule-based control is shown in black capital letters. Each rule is composed by three main sections (conditions or premises, actions to be performed when the conditions are met and actions to be performed when the conditions are not met). It is also possible to specify the priority of a rule compared to other rules. In Fig. 1a the sentences in black capital letters form the following rule 1: between midnight and 7 AM, pumps 1A and 2A will be switched on if the level of tank A is below 2.5m or if pump 3A is switched off. If these conditions are not met, the relative speed of pump 4B will be set equal to 0.9. Note that this is just an example to show the different options in a rule and it is not meant to be a typical pump control. a)
b)
RULE 1
1 IF
SYSTEM
CLOCKTIME >
0:00:00 AM
CLOCKTIME 0); x If the object TANK is selected, the algorithm will then select which tank and which trigger level to use and the relationship operator (“=”, “”), while if a time condition is selected, the algorithm will choose the time (discretized in 10 minutes interval) and the relationship operator. The results presented in the following section are the best results obtained in five optimization trials initialised with five different seeds for the random number generator. For the “Triggers” problems, the population size and number of generations have been fixed to 500 and 1000, respectively, while the probability of mutation has been set equal to 0.04. Given its larger number of variables, the population size and number of generations of the “Whole” problem have been set equal to 2000 and 4000, respectively; the probability of mutation has been set equal to 0.01. The same probability of crossover (0.8) and penalty (10,000) have been used in both cases. Comparing the results with previous work is difficult because many authors optimized the non-skeletonized version of the network (e.g. [5]; [6]). The pump operations of the skeletonized version of the network were optimized by [17]: their least expensive solution had a cost equal to 116.73 £/day, however, it is not clear if the pump penalty switches of the original problem were included and which initial tank levels were used. Given the possible differences in the case study and the fact that the removal of the three non-return valves influences the convergence (and the costs) of the simulation, the results from [17] will not be compared directly, but only considered to assess the convergence of the algorithm towards a good solution. In the following the best results of the four optimization cases (i.e. the combination of the “CV” and “Mod” networks with the “Triggers” or “Whole” problems) will be presented and compared with each other. 4. Results and Discussion The best results obtained for each case are reported in Table 1. As shown in Table 1, the “Mod” network can achieve slightly less expensive solutions. This could seem a surprising result, given that, in the “CV” network, it is cheaper to pump when demands are large and that pump 5C does not have the cost pattern with multipliers larger than one associated to it. However, this result is justified because the tanks are almost full at the start of the simulation when the off-peak tariff period starts. Therefore, the off-peak tariff period cannot be fully exploited as the tanks need to be emptied before they can be refilled. Moreover, one of the constraints of the problem forces the final tank levels to be equal or higher than the initial tank levels: hence pumps are forced to pump in the peak tariff period. For the case “CV”, lowering the initial tank level decreases the operational costs to about £110.04/day. Table 1. Daily costs of the least expensive solutions obtained. Problem Case
“CV” Network Cost (£/day)
“Mod” Network Cost (£/day)
“Triggers”
119.51
119.13
“Whole”
119.55
116.54
Fig. 3 shows the pump operation and the tank trigger levels for the best solutions found for the “CV” and the “Mod” networks when only the tank trigger levels are optimized. It can be noted that most pumps try to exploit the off-peak tariff period (the grey area shown in the figures) as much as possible, especially for the supply pumps 1A, 2A and 3A.
215
Angela Marchi et al. / Procedia Engineering 186 (2017) 210 – 217
Pump operation occurs also in the peak tariff period: while for some pumps (e.g. pump 3A in the “CV” and “Mod” cases) this is caused by the fact that the pump cannot refill the tank without operating in the most expensive period of the day, for other pumps (e.g. pump 5C in the “Mod” case), this is caused by the presence of the minimum tank level: as the minimum tank level is reached during the peak tariff period, the pump is forced to be switched on. “CV” model
a)
Off-Peak
“Mod” model
b)
Peak
Peak
Off-Peak
2 1 0 7am
1pm
7pm Time
1am
40 20 0 7am
Tank A level (m)
3
7pm Time
1am
3 2 1 0 7am
4
1pm
7pm Time
1am
40 20 0 7am
0 7am
1pm
7pm Time
1am
2
1
0 7am
1pm
7pm Time
1am
10 5 0 7am
2
1
0 7am
1pm
7pm Time
1am
10 5 0 7am
1pm
7pm Time
1am
10 5 0 7am
1am
2 1 0 7am
2
1
0 7am
Pump 5C Flow (L/s)
10 5 0 7am
Tank C level (m)
1
Pump 5C Flow (L/s)
Tank C level (m)
40 20 0 7am
2
Pump 6D Flow (L/s)
1pm
4
Pump 2A Flow (L/s)
7pm Time
1am
3 2 1 0 7am
1pm
7pm Time
1pm
1am
40 20 0 7am
7pm Time
2 1 0 7am
1pm
7pm Time
0 7am
1pm
7pm Time
1am
2 1 0 7am
2
1
0 7am
1pm
7pm Time
Pump 7F Flow (L/s)
1
Tank F level (m)
1am
40 20 0 7am
3
2
Pump 7F Flow (L/s)
1am
40 20 0 7am
Tank F level (m)
1
4
Tank B level (m)
1pm
4
2
0 7am
Pump 4B Flow (L/s)
0 7am
40 20 0 7am
3
Pump 3A Flow (L/s)
1
Tank A level (m)
2
Pump 3A Flow (L/s)
4
3
Pump 4B Flow (L/s)
Tank A level (m)
Peak
Tank D level (m)
1am
0 7am
4
Tank A level (m)
“Mod” model
b)
Peak
Pump 6D Flow (L/s)
7pm
1
Tank D level (m)
1pm
40 20 0 7am
2
Pump 1A Flow (L/s)
1
3
Pump 2A Flow (L/s)
2
Tank A level (m)
3
0 7am
Tank B level (m)
Off-Peak
4
Pump 1A Flow (L/s)
Tank A level (m)
4
“CV” model
a)
Off-Peak
Fig. 3. Example of rule-based controls for pump 1A for the peak and off-peak tariff period for the (a) “CV” and (b) “Mod” case study.
In general, the tank trigger levels of the peak tariff period are lower than the tank trigger levels of the off-peak tariff period. The exception of case “CV” are mostly caused by the constraint on the high final water levels, which forces the upper trigger level in the peak-tariff period to be above or equal to the initial tank level. Note also that, in the “CV” case, the tank levels are generally higher than the corresponding levels of the “Mod” network. This is because, in the “CV” network, the large demands correspond to the off-peak period (at the beginning of the simulation). As the pumps can be switched on during this time without increasing significantly the costs, the tank level is maintained high during the high demand period. It is important to note that Pumps 1A, 2A and 3A influence each other: when only pump A1 or A2 is switched on, a flow of about 30 L/s can be delivered to tank A; when the booster pump A3 is also switched on, the flow delivered increases to about 40-45 L/s. In this case, the operating efficiency of pump 2A is about 3% higher than the efficiency of pump 1A: as shown in Fig. 3, the optimization algorithm exploits this characteristic and pump 2A is used for longer periods of times than pump 1A. When all the three pumps (1A, 2A and 3A) are operated simultaneously, about 58 L/s can be delivered to the rest of the network: in this case, the operating efficiency of pump 3A increases from about 60% (for a flow of 45 L/s) to above 70% (for a flow of 58 L/s). While it would be more efficient to always operate the three pumps simultaneously, the constraints of the problems (e.g. the maximum number of pump switches) and the objective of the problem (minimum cost) limit the algorithm’s options. In particular, the fact that the time interval in the rulebased controls have been pre-defined seems to have a large impact on the possibility of the algorithm operating the three pumps simultaneously. A test where the algorithm was able to decide both times and tank trigger levels in each
216
Angela Marchi et al. / Procedia Engineering 186 (2017) 210 – 217
rule has been carried out for the “Mod” network: in this case, pump 3A is operated simultaneously to pumps 1A and 2A and the operating cost of the network decreases to £115.11/day. When the entire rule is optimized (“Whole” problem), the solutions obtained have similar characteristics: the tank levels are maintained higher in the “CV” version, pump 3A is operated only if either pump 1A or 2A are switched on and pumps are mostly operated in the off-peak tariff period. Fig. 4 shows the pump operations and tank levels for the “Mod” network. Results for the “CV” network are not shown due to space limitations. Note that, for the “Mod” network, optimizing the entire set of rule-based controls has found pump controls that produce a less expensive operational strategy for the day considered compared to the case “Trigger”, in which only tank trigger levels are optimized (Table 1). However, this cost is still higher than the case where only times and tank trigger levels are optimized. For the “CV” network, the cost obtained by optimizing the entire set of rules is slightly more expensive than the case “Trigger”. The fact that optimizing the entire set of rules has not achieved lower costs is likely due to the large search space of the “Whole” problem, which impacted the algorithm ability of escaping local optima. The possibility of using larger population sizes and larger number of generations is limited by the optimization times required, which are about one week for this problem. Future research will focus on decreasing the optimization times: here it is important to note that the algorithm has been able to find good solutions even the entire set of rules has been optimized.
Peak
Peak
Off-Peak
Off-Peak
Peak
Off-Peak
2 1 1pm
7pm Time
1am
40 20 0 7am
0 7am
1pm
7pm Time
1am
0 7am
1pm
7pm Time
1am
10 5 0 7am
1pm
7pm Time
1am
10 5 0 7am
2
1
0 7am
1pm
7pm Time
1am
2 1 0 7am
Pump 7F Flow (L/s)
1
Tank F level (m)
2
Pump 5C Flow (L/s)
40 20 0 7am
Tank C level (m)
1
Pump 3A Flow (L/s)
Tank A level (m)
2
4 3 2 1 0 7am
1pm
7pm Time
1am
40 20 0 7am
2
1
0 7am
Pump 6D Flow (L/s)
1am
3
Tank D level (m)
Tank A level (m)
7pm Time
3
0 7am
Peak
Pump 4B Flow (L/s)
1pm
4
40 20 0 7am
Pump 1A Flow (L/s)
1
Tank B level (m)
2
Pump 2A Flow (L/s)
Tank A level (m)
3
0 7am
Off-Peak
4
4
Fig. 4. Pump operation for the “Mod” case study when the entire set of rules is optimized.
The controls of the best solution found for the “Mod” case (not shown because of space limitations) can be classified in three categories: (i) controls that could have been written using a pattern, if an adequate time step was chosen, (ii) controls that could have been written as simple controls based on the tank level only and (iii) controls that incorporate multiple conditions and therefore require the use of rule-based controls. For example, pump 2A is switched off according to the level of tank A and the time of the day. It is also interesting to note that, in some cases, the algorithm has been able to identify the correct tank to control the pumps: for example, pump 2A is controlled based on the level of tank A and pump 4B is controlled based on the level of tank B. Other rules take into account the level of the relative tank and the level of additional tanks, e.g. the operation of pump 7F is controlled by the level of tank F, but also by the level of tanks C and D. Contrary to what could be expected, tank D is not mentioned in any of the rules that control pump 6D, which is instead controlled by the levels of tanks A and C. This is likely caused by the limited duration of the simulation and the use of a predefined demand pattern: the algorithm is using other tanks’ levels as a surrogate for the time of the day. 5. Summary and Conclusions This paper has shown that the pump operations in water distribution systems could be optimized using rule-based controls. In particular, it has shown that, by using the ETTAR toolkit (EPANET2 Toolkit to Alter Rules), it is possible to optimize the rule-based controls of relatively large systems. Two case studies based on the skeletonized Richmond
Angela Marchi et al. / Procedia Engineering 186 (2017) 210 – 217
network have been analyzed by considering different optimization cases: (i) the case in which only tank trigger levels are optimized (while other conditions on times and tanks are fixed) and (ii) the case in which the entire set of rules is optimized by the algorithm. Results of optimizing tank trigger levels and times have also been presented. Results have shown that the optimization of rule-based controls allows the algorithm to exploit the hydraulic and electricity tariff characteristics of the network. In particular, using different tank trigger levels for the peak and offpeak tariff period allows the pumps to operate preferably in the off-peak tariff period, but it also guarantees that the pumps will be switched on when the tank level reaches the lower trigger. While the applicability of the results is limited to the 24 hours considered, this research has shown that the optimization of pump operations using rule-based controls can offer insight to the network characteristics. It also opens the possibility of testing the optimization of pump operations for periods longer than 24 hours with different profiles, so as to assess the capacity of producing more reliable and robust pump controls. Acknowledgements This research is part of Project C5.1 Intelligent Urban Water Systems funded by the Cooperative Research Centre for Water Sensitive Cities. References [1] D.F Moreira, H.M. Ramos, Energy Cost Optimization in a Water Supply System Case Study, Journal of Energy, 2013. doi:10.1155/2013/620698 [2] L. E.Ormsbee, and K. E. Lansey, Optimal control of water supply pumping systems, J. Water Resour. Plann. Manage., vol. 120, no. 2, March, 1994, pp. 237-252. [3] G. Mackle, D.A. Savic, G.A. Walters, Application of genetic algorithms to pump scheduling for water supply, in: 1st International Conference on Genetic Algorithms in Engineering Systems: Innovations and Applications (GALESIA), IET., 1995, 400-405. [4] M.D. Kazantzis, A.R. Simpson, D. Kwong, S.M. Tan, S. M., A new methodology for optimizing the daily operations of a pumping plant, Proc., Conf. on Water Resources Planning and Management, ASCE, Roanoke, VA, 2002. [5] J.E. van Zyl, D.A. Savic, and G.A. Walters, Operational optimization of water distribution systems using a hybrid genetic algorithm, J. Water Resour. Plann. Manage., vol. 130, no. 2, March, 2004, pp. 160-170. [6] M. López-Ibáñez, T. Devi Prasad, and B. Paechter, Ant colony optimization for optimal control of pumps in water distribution networks, J. Water Resour. Plann. Manage., vol. 134, no. 4, July, 2008, pp. 337-346. [7] M. Behandisha, Z.Y. Wu, Z.Y., Concurrent pump scheduling and storage level optimization using meta-models and evolutionary algorithms, Procedia Engineering, 70, 2014, 103–112. [8] W. Wu, H.R. Maier, A.R. Simpson, Sensitivity of optimal tradeoffs between cost and greenhouse gas emissions for water distribution systems to electricity tariff and generation, J. Water Resour. Plann. Manage. 2012, 10.1061/(ASCE)WR.1943-5452.0000169, 182–186. [9] W. Wu, A.R. Simpson, H.R. Maier, A. Marchi, Incorporation of variable-speed pumping in multiobjective genetic algorithm optimization of the design of water transmission systems, J. Water Resour. Plann. Manage., 138(5), 2012, 543–552. [10] S.M. Sadatiyan Abkenar, S.D. Stanley, C.J. Miller, D.V. Chase, S.P. McElmurry, Evaluation of genetic algorithms using discrete and continuous methods for pump optimization of water distribution systems, Sustain. Comput.: Inform. Syst., 2014, http://dx.doi.org/10.1016/j.suscom.2014.09.003 [11] C. Stokes, H.R. Maier, A.R. Simpson, Water distribution system pumping operational greenhouse gas emissions minimization by considering time-dependent emissions factors, Journal of Water Resources Planning and Management, 2014, 10.1061/(ASCE)WR.19435452.0000484, 04014088. [12] A.R. Simpson, G.C. Dandy, L. Murphy, Genetic algorithms compared to other techniques for pipe optimization, J. Water Resour. Plann. Manage., 10.1061/(ASCE)0733-9496(1994)120:4(423), 423-443. [13] L.A. Rossman, EPANET2 user’s manual, National Risk Management Research Laboratory, United States Environmental Protection Agency, Cincinnati, OH, 2000. [14] A. Marchi, A.R. Simpson, M.F. Lambert, optimization of pump operation using rule-based controls in EPANET2: new ETTAR toolkit and correction of energy computation, J. Water Resour. Plann. Manage., 2016, 10.1061/(ASCE)WR.1943-5452.0000637 , 04016012. [15] M. López-Ibáñez, Operational optimisation of water distribution networks, Ph.D. thesis, School of Engineering and the Built Environment, Edinburgh Napier Univ., U.K., 2009. [16] J. Nicklow, et al., State of the art for genetic algorithms and beyond in water resources planning and management, J. Water Resour. Plann. Manage., 10.1061/(ASCE)WR.1943-5452.0000053, 2010, 412–432. [17] C. Giacomello, Z. Kapelan, M. Nicolini, Fast hybrid optimization method for effective pump scheduling, J. Water Resour. Plann. Manage., 10.1061/(ASCE)WR.1943-5452.0000239, 2013, 175–183.
217