Full text
IFAC PapersOnLine 50-1 (2017) 6588–6593 ScienceDirect Available online at www.sciencedirect.com 2405-8963 © 2017, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Peer review under responsibility of International Federation of Automatic Control. 10.1016/j.ifacol.2017.08.617 © 2017, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. 10.1016/j.ifacol.2017.08.617 2405-8963 Periodic Nonlinear Economic Model Predictive Control with Changing Horizon for Water Distribution Networks Ye Wang ∗Jos´e Ram´on Salvador ∗∗ David Mu˜noz de la Pe˜na ∗∗ Vicen¸c Puig ∗ Gabriela Cembrano ∗,∗∗∗ ∗Institut de Rob`otica i Inform`atica Industrial (IRI), CSIC-UPC, Universitat Polit`ecnica de Catalunya, C/. Llorens i Artigas 4-6, 08028 Barcelona, Spain (e-mail: {ywang, vpuig, cembrano}@iri.upc.edu) ∗∗ Departamento de Ingenier´ıa de Sistemas y Autom´atica, Escuela Superior de Ingenieros, Universidad de Sevilla, Avenida de los Descubrimientos, S/N, 41092 Sevilla, Spain (e-mail: {jsalvador1, dmunoz}@us.es) ∗∗∗ CETaqua, Water Technology Centre, Ctra. d’Esplugues 75, Cornell`a de Llobregat, 08940 Barcelona, Spain Abstract: A periodic nonlinear economic model predictive control (EMPC) with changing prediction horizon is proposed for the optimal management of water distribution networks (WDNs). The control model of the WDN is built by means of nonlinear differential-algebraic equations in which both the hydraulic pressure and flow variables are taken into account. The model allows the controller to consider minimum pressure constraints at the demands. A periodic terminal constraint is employed in order to guarantee closed-loop stability. The prediction horizon is modified on-line in order to guarantee convergence to the optimal periodic trajectory. The proposed control strategy is verified with the case study of the Richmond water network in a realistic hydraulic simulator. Although there are modeling errors between the control model and hydraulic model, the closed-loop system converges to a sub-optimal periodic trajectory satisfying all the constraints. Keywords: Economic model predictive control, periodic operation, nonlinear differential-algebraic equations, water distribution networks, closed-loop simulations. 1. INTRODUCTION A water distribution network (WDN) in an urban area is part of a water cycle after the water production and transport parts. It generally consists of a large number of hydraulic elements, such as reservoirs/tanks, pressurized pipelines, pumping stations (including several parallel pumps) and valves. The main task of a WDN is to supply enough water flows with suitable pressures to all the demand sectors. Different optimal control strategies for the operational management of WDNs have been discussed in the past decade considering the economic performance using the model predictive control (MPC) framework, see e.g. (Brdys and Ulanicki, 1994; Cembrano et al., 2000; Ocampo- Martinez et al., 2013; Wang et al., 2016a). In these references, the optimal flow set-points for actuators (pumps and valves) can be computed by solving a finite-horizon optimization problem with the minimization of a multiobjective problem including economic costs and safety This work has been partially funded by the Spanish Government and FEDER through the projects CICYT ECOCIS (ref. DPI2013- 48243), CICYT DEOCS (ref. DPI2016-76493) and CICYT HARCRICS (ref. DPI2014-58104-R). indexes. However, only the water flows are considered as the system variables and the pressures/hydraulic heads 1 are ignored. Looking into more realistic scenarios, it is necessary to include the hydraulic heads inside the model of the WDN when minimum pressures at the demand sectors are required. Meanwhile, the suitable pressure allocation for the WDN is also able to protect the system equipments from fatigue. Economic model predictive control (EMPC) has attracted a lot of attention recently (Ellis et al., 2017). The stability of this class of EMPC controllers is an open issue to be clarified because the conventional MPC stability analysis considers that there exist system references. Recently, the dissipativity assumption has been widely used for proving the stability of EMPC (Angeli et al., 2012; Liu and Liu, 2016). The stability analysis of EMPC is established assuming that the considered linear or nonlinear system is dissipative. Besides, the terminal constraint and region are usually employed in order to guarantee convergence 1The hydraulic head is a measure of the potential energy of a fluid. It is usually measured in meters, referring to the pressure under a static water column of this height. The hydraulic head at any node in a water distribution network is the sum of its topographical elevation and the pressure at that node, expressed in water-column units. Proceedings of the 20th World Congress The International Federation of Automatic Control Toulouse, France, July 9-14, 2017 Copyright © 2017 IFAC 6782 Periodic Nonlinear Economic Model Predictive Control with Changing Horizon for Water Distribution Networks Ye Wang ∗Jos´e Ram´on Salvador ∗∗ David Mu˜noz de la Pe˜na ∗∗ Vicen¸c Puig ∗ Gabriela Cembrano ∗,∗∗∗ ∗Institut de Rob`otica i Inform`atica Industrial (IRI), CSIC-UPC, Universitat Polit`ecnica de Catalunya, C/. Llorens i Artigas 4-6, 08028 Barcelona, Spain (e-mail: {ywang, vpuig, cembrano}@iri.upc.edu) ∗∗ Departamento de Ingenier´ıa de Sistemas y Autom´atica, Escuela Superior de Ingenieros, Universidad de Sevilla, Avenida de los Descubrimientos, S/N, 41092 Sevilla, Spain (e-mail: {jsalvador1, dmunoz}@us.es) ∗∗∗ CETaqua, Water Technology Centre, Ctra. d’Esplugues 75, Cornell`a de Llobregat, 08940 Barcelona, Spain Abstract: A periodic nonlinear economic model predictive control (EMPC) with changing prediction horizon is proposed for the optimal management of water distribution networks (WDNs). The control model of the WDN is built by means of nonlinear differential-algebraic equations in which both the hydraulic pressure and flow variables are taken into account. The model allows the controller to consider minimum pressure constraints at the demands. A periodic terminal constraint is employed in order to guarantee closed-loop stability. The prediction horizon is modified on-line in order to guarantee convergence to the optimal periodic trajectory. The proposed control strategy is verified with the case study of the Richmond water network in a realistic hydraulic simulator. Although there are modeling errors between the control model and hydraulic model, the closed-loop system converges to a sub-optimal periodic trajectory satisfying all the constraints. Keywords: Economic model predictive control, periodic operation, nonlinear differential-algebraic equations, water distribution networks, closed-loop simulations. 1. INTRODUCTION A water distribution network (WDN) in an urban area is part of a water cycle after the water production and transport parts. It generally consists of a large number of hydraulic elements, such as reservoirs/tanks, pressurized pipelines, pumping stations (including several parallel pumps) and valves. The main task of a WDN is to supply enough water flows with suitable pressures to all the demand sectors. Different optimal control strategies for the operational management of WDNs have been discussed in the past decade considering the economic performance using the model predictive control (MPC) framework, see e.g. (Brdys and Ulanicki, 1994; Cembrano et al., 2000; Ocampo- Martinez et al., 2013; Wang et al., 2016a). In these references, the optimal flow set-points for actuators (pumps and valves) can be computed by solving a finite-horizon optimization problem with the minimization of a multiobjective problem including economic costs and safety This work has been partially funded by the Spanish Government and FEDER through the projects CICYT ECOCIS (ref. DPI2013- 48243), CICYT DEOCS (ref. DPI2016-76493) and CICYT HARCRICS (ref. DPI2014-58104-R). indexes. However, only the water flows are considered as the system variables and the pressures/hydraulic heads 1 are ignored. Looking into more realistic scenarios, it is necessary to include the hydraulic heads inside the model of the WDN when minimum pressures at the demand sectors are required. Meanwhile, the suitable pressure allocation for the WDN is also able to protect the system equipments from fatigue. Economic model predictive control (EMPC) has attracted a lot of attention recently (Ellis et al., 2017). The stability of this class of EMPC controllers is an open issue to be clarified because the conventional MPC stability analysis considers that there exist system references. Recently, the dissipativity assumption has been widely used for proving the stability of EMPC (Angeli et al., 2012; Liu and Liu, 2016). The stability analysis of EMPC is established assuming that the considered linear or nonlinear system is dissipative. Besides, the terminal constraint and region are usually employed in order to guarantee convergence 1The hydraulic head is a measure of the potential energy of a fluid. It is usually measured in meters, referring to the pressure under a static water column of this height. The hydraulic head at any node in a water distribution network is the sum of its topographical elevation and the pressure at that node, expressed in water-column units. Proceedings of the 20th World Congress The International Federation of Automatic Control Toulouse, France, July 9-14, 2017 Copyright © 2017 IFAC 6782 Periodic Nonlinear Economic Model Predictive Control with Changing Horizon for Water Distribution Networks Ye Wang ∗Jos´e Ram´on Salvador ∗∗ David Mu˜noz de la Pe˜na ∗∗ Vicen¸c Puig ∗ Gabriela Cembrano ∗,∗∗∗ ∗Institut de Rob`otica i Inform`atica Industrial (IRI), CSIC-UPC, Universitat Polit`ecnica de Catalunya, C/. Llorens i Artigas 4-6, 08028 Barcelona, Spain (e-mail: {ywang, vpuig, cembrano}@iri.upc.edu) ∗∗ Departamento de Ingenier´ıa de Sistemas y Autom´atica, Escuela Superior de Ingenieros, Universidad de Sevilla, Avenida de los Descubrimientos, S/N, 41092 Sevilla, Spain (e-mail: {jsalvador1, dmunoz}@us.es) ∗∗∗ CETaqua, Water Technology Centre, Ctra. d’Esplugues 75, Cornell`a de Llobregat, 08940 Barcelona, Spain Abstract: A periodic nonlinear economic model predictive control (EMPC) with changing prediction horizon is proposed for the optimal management of water distribution networks (WDNs). The control model of the WDN is built by means of nonlinear differential-algebraic equations in which both the hydraulic pressure and flow variables are taken into account. The model allows the controller to consider minimum pressure constraints at the demands. A periodic terminal constraint is employed in order to guarantee closed-loop stability. The prediction horizon is modified on-line in order to guarantee convergence to the optimal periodic trajectory. The proposed control strategy is verified with the case study of the Richmond water network in a realistic hydraulic simulator. Although there are modeling errors between the control model and hydraulic model, the closed-loop system converges to a sub-optimal periodic trajectory satisfying all the constraints. Keywords: Economic model predictive control, periodic operation, nonlinear differential-algebraic equations, water distribution networks, closed-loop simulations. 1. INTRODUCTION A water distribution network (WDN) in an urban area is part of a water cycle after the water production and transport parts. It generally consists of a large number of hydraulic elements, such as reservoirs/tanks, pressurized pipelines, pumping stations (including several parallel pumps) and valves. The main task of a WDN is to supply enough water flows with suitable pressures to all the demand sectors. Different optimal control strategies for the operational management of WDNs have been discussed in the past decade considering the economic performance using the model predictive control (MPC) framework, see e.g. (Brdys and Ulanicki, 1994; Cembrano et al., 2000; Ocampo- Martinez et al., 2013; Wang et al., 2016a). In these references, the optimal flow set-points for actuators (pumps and valves) can be computed by solving a finite-horizon optimization problem with the minimization of a multiobjective problem including economic costs and safety This work has been partially funded by the Spanish Government and FEDER through the projects CICYT ECOCIS (ref. DPI2013- 48243), CICYT DEOCS (ref. DPI2016-76493) and CICYT HARCRICS (ref. DPI2014-58104-R). indexes. However, only the water flows are considered as the system variables and the pressures/hydraulic heads 1 are ignored. Looking into more realistic scenarios, it is necessary to include the hydraulic heads inside the model of the WDN when minimum pressures at the demand sectors are required. Meanwhile, the suitable pressure allocation for the WDN is also able to protect the system equipments from fatigue. Economic model predictive control (EMPC) has attracted a lot of attention recently (Ellis et al., 2017). The stability of this class of EMPC controllers is an open issue to be clarified because the conventional MPC stability analysis considers that there exist system references. Recently, the dissipativity assumption has been widely used for proving the stability of EMPC (Angeli et al., 2012; Liu and Liu, 2016). The stability analysis of EMPC is established assuming that the considered linear or nonlinear system is dissipative. Besides, the terminal constraint and region are usually employed in order to guarantee convergence 1The hydraulic head is a measure of the potential energy of a fluid. It is usually measured in meters, referring to the pressure under a static water column of this height. The hydraulic head at any node in a water distribution network is the sum of its topographical elevation and the pressure at that node, expressed in water-column units. Proceedings of the 20th World Congress The International Federation of Automatic Control Toulouse, France, July 9-14, 2017 Copyright © 2017 IFAC 6782 Periodic Nonlinear Economic Model Predictive Control with Changing Horizon for Water Distribution Networks Ye Wang ∗Jos´e Ram´on Salvador ∗∗ David Mu˜noz de la Pe˜na ∗∗ Vicen¸c Puig ∗ Gabriela Cembrano ∗,∗∗∗ ∗Institut de Rob`otica i Inform`atica Industrial (IRI), CSIC-UPC, Universitat Polit`ecnica de Catalunya, C/. Llorens i Artigas 4-6, 08028 Barcelona, Spain (e-mail: {ywang, vpuig, cembrano}@iri.upc.edu) ∗∗ Departamento de Ingenier´ıa de Sistemas y Autom´atica, Escuela Superior de Ingenieros, Universidad de Sevilla, Avenida de los Descubrimientos, S/N, 41092 Sevilla, Spain (e-mail: {jsalvador1, dmunoz}@us.es) ∗∗∗ CETaqua, Water Technology Centre, Ctra. d’Esplugues 75, Cornell`a de Llobregat, 08940 Barcelona, Spain Abstract: A periodic nonlinear economic model predictive control (EMPC) with changing prediction horizon is proposed for the optimal management of water distribution networks (WDNs). The control model of the WDN is built by means of nonlinear differential-algebraic equations in which both the hydraulic pressure and flow variables are taken into account. The model allows the controller to consider minimum pressure constraints at the demands. A periodic terminal constraint is employed in order to guarantee closed-loop stability. The prediction horizon is modified on-line in order to guarantee convergence to the optimal periodic trajectory. The proposed control strategy is verified with the case study of the Richmond water network in a realistic hydraulic simulator. Although there are modeling errors between the control model and hydraulic model, the closed-loop system converges to a sub-optimal periodic trajectory satisfying all the constraints. Keywords: Economic model predictive control, periodic operation, nonlinear differential-algebraic equations, water distribution networks, closed-loop simulations. 1. INTRODUCTION A water distribution network (WDN) in an urban area is part of a water cycle after the water production and transport parts. It generally consists of a large number of hydraulic elements, such as reservoirs/tanks, pressurized pipelines, pumping stations (including several parallel pumps) and valves. The main task of a WDN is to supply enough water flows with suitable pressures to all the demand sectors. Different optimal control strategies for the operational management of WDNs have been discussed in the past decade considering the economic performance using the model predictive control (MPC) framework, see e.g. (Brdys and Ulanicki, 1994; Cembrano et al., 2000; Ocampo- Martinez et al., 2013; Wang et al., 2016a). In these references, the optimal flow set-points for actuators (pumps and valves) can be computed by solving a finite-horizon optimization problem with the minimization of a multiobjective problem including economic costs and safety This work has been partially funded by the Spanish Government and FEDER through the projects CICYT ECOCIS (ref. DPI2013- 48243), CICYT DEOCS (ref. DPI2016-76493) and CICYT HARCRICS (ref. DPI2014-58104-R). indexes. However, only the water flows are considered as the system variables and the pressures/hydraulic heads 1 are ignored. Looking into more realistic scenarios, it is necessary to include the hydraulic heads inside the model of the WDN when minimum pressures at the demand sectors are required. Meanwhile, the suitable pressure allocation for the WDN is also able to protect the system equipments from fatigue. Economic model predictive control (EMPC) has attracted a lot of attention recently (Ellis et al., 2017). The stability of this class of EMPC controllers is an open issue to be clarified because the conventional MPC stability analysis considers that there exist system references. Recently, the dissipativity assumption has been widely used for proving the stability of EMPC (Angeli et al., 2012; Liu and Liu, 2016). The stability analysis of EMPC is established assuming that the considered linear or nonlinear system is dissipative. Besides, the terminal constraint and region are usually employed in order to guarantee convergence 1The hydraulic head is a measure of the potential energy of a fluid. It is usually measured in meters, referring to the pressure under a static water column of this height. The hydraulic head at any node in a water distribution network is the sum of its topographical elevation and the pressure at that node, expressed in water-column units. Proceedings of the 20th World Congress The International Federation of Automatic Control Toulouse, France, July 9-14, 2017 Copyright © 2017 IFAC 6782 Periodic Nonlinear Economic Model Predictive Control with Changing Horizon for Water Distribution Networks Ye Wang ∗Jos´e Ram´on Salvador ∗∗ David Mu˜noz de la Pe˜na ∗∗ Vicen¸c Puig ∗ Gabriela Cembrano ∗,∗∗∗ ∗Institut de Rob`otica i Inform`atica Industrial (IRI), CSIC-UPC, Universitat Polit`ecnica de Catalunya, C/. Llorens i Artigas 4-6, 08028 Barcelona, Spain (e-mail: {ywang, vpuig, cembrano}@iri.upc.edu) ∗∗ Departamento de Ingenier´ıa de Sistemas y Autom´atica, Escuela Superior de Ingenieros, Universidad de Sevilla, Avenida de los Descubrimientos, S/N, 41092 Sevilla, Spain (e-mail: {jsalvador1, dmunoz}@us.es) ∗∗∗ CETaqua, Water Technology Centre, Ctra. d’Esplugues 75, Cornell`a de Llobregat, 08940 Barcelona, Spain Abstract: A periodic nonlinear economic model predictive control (EMPC) with changing prediction horizon is proposed for the optimal management of water distribution networks (WDNs). The control model of the WDN is built by means of nonlinear differential-algebraic equations in which both the hydraulic pressure and flow variables are taken into account. The model allows the controller to consider minimum pressure constraints at the demands. A periodic terminal constraint is employed in order to guarantee closed-loop stability. The prediction horizon is modified on-line in order to guarantee convergence to the optimal periodic trajectory. The proposed control strategy is verified with the case study of the Richmond water network in a realistic hydraulic simulator. Although there are modeling errors between the control model and hydraulic model, the closed-loop system converges to a sub-optimal periodic trajectory satisfying all the constraints. Keywords: Economic model predictive control, periodic operation, nonlinear differential-algebraic equations, water distribution networks, closed-loop simulations. 1. INTRODUCTION A water distribution network (WDN) in an urban area is part of a water cycle after the water production and transport parts. It generally consists of a large number of hydraulic elements, such as reservoirs/tanks, pressurized pipelines, pumping stations (including several parallel pumps) and valves. The main task of a WDN is to supply enough water flows with suitable pressures to all the demand sectors. Different optimal control strategies for the operational management of WDNs have been discussed in the past decade considering the economic performance using the model predictive control (MPC) framework, see e.g. (Brdys and Ulanicki, 1994; Cembrano et al., 2000; Ocampo- Martinez et al., 2013; Wang et al., 2016a). In these references, the optimal flow set-points for actuators (pumps and valves) can be computed by solving a finite-horizon optimization problem with the minimization of a multiobjective problem including economic costs and safety This work has been partially funded by the Spanish Government and FEDER through the projects CICYT ECOCIS (ref. DPI2013- 48243), CICYT DEOCS (ref. DPI2016-76493) and CICYT HARCRICS (ref. DPI2014-58104-R). indexes. However, only the water flows are considered as the system variables and the pressures/hydraulic heads 1 are ignored. Looking into more realistic scenarios, it is necessary to include the hydraulic heads inside the model of the WDN when minimum pressures at the demand sectors are required. Meanwhile, the suitable pressure allocation for the WDN is also able to protect the system equipments from fatigue. Economic model predictive control (EMPC) has attracted a lot of attention recently (Ellis et al., 2017). The stability of this class of EMPC controllers is an open issue to be clarified because the conventional MPC stability analysis considers that there exist system references. Recently, the dissipativity assumption has been widely used for proving the stability of EMPC (Angeli et al., 2012; Liu and Liu, 2016). The stability analysis of EMPC is established assuming that the considered linear or nonlinear system is dissipative. Besides, the terminal constraint and region are usually employed in order to guarantee convergence 1The hydraulic head is a measure of the potential energy of a fluid. It is usually measured in meters, referring to the pressure under a static water column of this height. The hydraulic head at any node in a water distribution network is the sum of its topographical elevation and the pressure at that node, expressed in water-column units. Proceedings of the 20th World Congress The International Federation of Automatic Control Toulouse, France, July 9-14, 2017 Copyright © 2017 IFAC 6782 in closed-loop. From the application point of view, for a large-scale system, it would be computationally expensive to find the terminal region and probably not possible to obtain a time-varying terminal region within a computation time that is consistent with real-time constraints. Moreover, for a specific system, it is also necessary to satisfy the dissipativity property. From the industrial experience, the possible optimal control actions for management of a WDN could be obtained with a periodic behavior because water demands and electricity costs usually present daily repetitive patterns. Hence, a periodic EMPC is suitable for optimal management of a WDN in order to guarantee the multiple control objectives, including satisfying water demands to all the customers, protecting the equipments inside the network and maximizing their work life. The main contribution of this paper is to propose a periodic nonlinear EMPC (PNEMPC) strategy for the operational management of WDNs. The control-oriented model of the WDN is built by means of nonlinear differentialalgebraic equations in discrete-time taking into account not only the water balance equations, but also the hydraulic head and the relationship between flows and headdrops in the network. The periodic operation of the proposed controller is enforced by employing a periodic terminal equality constraint. The prediction horizon is chosen to be time-varying in order to guarantee convergence under certain assumptions to the optimal periodic trajectory also satisfying all the constraints. The results of applying the proposed strategy to the Richmond water network show its effectiveness both using the control-oriented model and EPANET. 2. PROBLEM STATEMENT 2.1 Optimal Operation of WDNs The common operational objectives for the operational management of WDNs include (Ocampo-Martinez et al., 2013): •Economic: To provide a reliable water supply with required pressures minimizing operational costs. •Safety: To guarantee the availability of enough water and hydraulic head in each storage tank to satisfy its underlying uncertain water demands. •Smoothness: To operate actuators of the WDN under smooth control actions. To this end, the actuators and pumps of the network have to be operated so that these objectives are satisfied taking into account the available information on the future demands and other relevant parameters such as electricity costs. Most MPC applications found in the literature focus only on controlling the water at the different tanks using model-based water balance equations. However, another key variable is the hydraulic head/pressure at different nodes of the network. To control this variable, nonlinear algebraic equations have to be considered relating flow and head. The actuator in most WDNs can only operate in an ON/OFF fashion, defining the control laws as simple switching logics which in general are hard to tune (Van Zyl et al., 2004). Switching actuators lead to hybrid models which in general are difficult to consider in an EMPC setting. In this work, we follow a hierarchical approach, in which a periodic EMPC controller will decide the mean flow in each actuator of the WDN, and a low level control layer will implement the switching sequence to guarantee that mean flow. In the case that the pumps and valves can be regulated controlling directly the frequency or the degree of opening, PID controllers can be used. If only ON/OFF sequences can be implemented, which is a common constraint in real networks, an appropriate openloop or closed-loop strategy has to be used. In particular, we proposed a control strategy in which at the beginning of the sampling period, all pumps and valves are switched on, and are switched off only when the amount of water needed in the period is reached. In this case, it is important to note that the hydraulic head at the nodes depends on the state of the actuators, leading to sudden pressure changes. For this reason, the output variable is defined as the mean hydraulic head at the demand nodes. The simulations will be carried out using EPANET, a well known software that models water distribution piping systems (Rossman, 2000), and using the Yalmip toolbox (L¨ofberg, 2004) and IPOPT solver through OPTI toolbox (Currie and Wilson, 2012) in MATLAB. EPANET provides continuous time simulations of the network between sampling times. 2.2 Control-oriented Model of WDNs In order to define the EMPC controller an appropriate model is needed. We propose to model a WDN by a set of discrete-time differential-algebraic equations as follows (Wang et al., 2016c): xk+1 =Axk+Buuk+Bvvk+Bddk,(1a) 0=Euuk+Evvk+Eddk,(1b) 0=Pxxk+Pzzk+ψ(vk),(1c) where xk∈Rnxdenotes the vector of hydraulic heads at the storage nodes (reservoirs/tanks) as differential states, zk∈Rnzdenotes the vector of mean hydraulic heads at the non-storage nodes as algebraic states, uk∈Rnudenotes the vector of mean manipulated flows of the actuators (pumps and valves), vk∈Rnvdenotes the vector of mean non-manipulated flows through the interconnected pipes and dk∈Rnddenotes the vector of mean water demands, which are regarded as the measured system disturbances. Moreover, A, Bu,B v,B d,E u,E v,E d,P xand Pzare timeinvariant matrices with suitable dimensions decided by the network topology while ψis a vector of the nonlinear mapping functions. Equation (1a) describes the system dynamics, (1b) presents the physical and static relations in the water network by means of mass balance at non-storage nodes and (1c) describes the hydraulic head-flow relationship in the pipes that connect the demand nodes to different tanks, which is built by using the Chezy-Manning formula: zi k−zj k=Ri,jvi,j k vi,j k ,(2) where ziand zjdenote the heads at the i-th and jth nodes, respectively, vi,j denotes the flow through the pipe between the i-th and j-th nodes and Ri,j is the pipe Proceedings of the 20th IFAC World Congress Toulouse, France, July 9-14, 2017 6783
Ye Wang et al. / IFAC PapersOnLine 50-1 (2017) 6588–6593 6589 Periodic Nonlinear Economic Model Predictive Control with Changing Horizon for Water Distribution Networks Ye Wang ∗Jos´e Ram´on Salvador ∗∗ David Mu˜noz de la Pe˜na ∗∗ Vicen¸c Puig ∗ Gabriela Cembrano ∗,∗∗∗ ∗Institut de Rob`otica i Inform`atica Industrial (IRI), CSIC-UPC, Universitat Polit`ecnica de Catalunya, C/. Llorens i Artigas 4-6, 08028 Barcelona, Spain (e-mail: {ywang, vpuig, cembrano}@iri.upc.edu) ∗∗ Departamento de Ingenier´ıa de Sistemas y Autom´atica, Escuela Superior de Ingenieros, Universidad de Sevilla, Avenida de los Descubrimientos, S/N, 41092 Sevilla, Spain (e-mail: {jsalvador1, dmunoz}@us.es) ∗∗∗ CETaqua, Water Technology Centre, Ctra. d’Esplugues 75, Cornell`a de Llobregat, 08940 Barcelona, Spain Abstract: A periodic nonlinear economic model predictive control (EMPC) with changing prediction horizon is proposed for the optimal management of water distribution networks (WDNs). The control model of the WDN is built by means of nonlinear differential-algebraic equations in which both the hydraulic pressure and flow variables are taken into account. The model allows the controller to consider minimum pressure constraints at the demands. A periodic terminal constraint is employed in order to guarantee closed-loop stability. The prediction horizon is modified on-line in order to guarantee convergence to the optimal periodic trajectory. The proposed control strategy is verified with the case study of the Richmond water network in a realistic hydraulic simulator. Although there are modeling errors between the control model and hydraulic model, the closed-loop system converges to a sub-optimal periodic trajectory satisfying all the constraints. Keywords: Economic model predictive control, periodic operation, nonlinear differential-algebraic equations, water distribution networks, closed-loop simulations. 1. INTRODUCTION A water distribution network (WDN) in an urban area is part of a water cycle after the water production and transport parts. It generally consists of a large number of hydraulic elements, such as reservoirs/tanks, pressurized pipelines, pumping stations (including several parallel pumps) and valves. The main task of a WDN is to supply enough water flows with suitable pressures to all the demand sectors. Different optimal control strategies for the operational management of WDNs have been discussed in the past decade considering the economic performance using the model predictive control (MPC) framework, see e.g. (Brdys and Ulanicki, 1994; Cembrano et al., 2000; Ocampo- Martinez et al., 2013; Wang et al., 2016a). In these references, the optimal flow set-points for actuators (pumps and valves) can be computed by solving a finite-horizon optimization problem with the minimization of a multiobjective problem including economic costs and safety This work has been partially funded by the Spanish Government and FEDER through the projects CICYT ECOCIS (ref. DPI2013- 48243), CICYT DEOCS (ref. DPI2016-76493) and CICYT HARCRICS (ref. DPI2014-58104-R). indexes. However, only the water flows are considered as the system variables and the pressures/hydraulic heads 1 are ignored. Looking into more realistic scenarios, it is necessary to include the hydraulic heads inside the model of the WDN when minimum pressures at the demand sectors are required. Meanwhile, the suitable pressure allocation for the WDN is also able to protect the system equipments from fatigue. Economic model predictive control (EMPC) has attracted a lot of attention recently (Ellis et al., 2017). The stability of this class of EMPC controllers is an open issue to be clarified because the conventional MPC stability analysis considers that there exist system references. Recently, the dissipativity assumption has been widely used for proving the stability of EMPC (Angeli et al., 2012; Liu and Liu, 2016). The stability analysis of EMPC is established assuming that the considered linear or nonlinear system is dissipative. Besides, the terminal constraint and region are usually employed in order to guarantee convergence 1The hydraulic head is a measure of the potential energy of a fluid. It is usually measured in meters, referring to the pressure under a static water column of this height. The hydraulic head at any node in a water distribution network is the sum of its topographical elevation and the pressure at that node, expressed in water-column units. Proceedings of the 20th World Congress The International Federation of Automatic Control Toulouse, France, July 9-14, 2017 Copyright © 2017 IFAC 6782 Periodic Nonlinear Economic Model Predictive Control with Changing Horizon for Water Distribution Networks Ye Wang ∗Jos´e Ram´on Salvador ∗∗ David Mu˜noz de la Pe˜na ∗∗ Vicen¸c Puig ∗ Gabriela Cembrano ∗,∗∗∗ ∗Institut de Rob`otica i Inform`atica Industrial (IRI), CSIC-UPC, Universitat Polit`ecnica de Catalunya, C/. Llorens i Artigas 4-6, 08028 Barcelona, Spain (e-mail: {ywang, vpuig, cembrano}@iri.upc.edu) ∗∗ Departamento de Ingenier´ıa de Sistemas y Autom´atica, Escuela Superior de Ingenieros, Universidad de Sevilla, Avenida de los Descubrimientos, S/N, 41092 Sevilla, Spain (e-mail: {jsalvador1, dmunoz}@us.es) ∗∗∗ CETaqua, Water Technology Centre, Ctra. d’Esplugues 75, Cornell`a de Llobregat, 08940 Barcelona, Spain Abstract: A periodic nonlinear economic model predictive control (EMPC) with changing prediction horizon is proposed for the optimal management of water distribution networks (WDNs). The control model of the WDN is built by means of nonlinear differential-algebraic equations in which both the hydraulic pressure and flow variables are taken into account. The model allows the controller to consider minimum pressure constraints at the demands. A periodic terminal constraint is employed in order to guarantee closed-loop stability. The prediction horizon is modified on-line in order to guarantee convergence to the optimal periodic trajectory. The proposed control strategy is verified with the case study of the Richmond water network in a realistic hydraulic simulator. Although there are modeling errors between the control model and hydraulic model, the closed-loop system converges to a sub-optimal periodic trajectory satisfying all the constraints. Keywords: Economic model predictive control, periodic operation, nonlinear differential-algebraic equations, water distribution networks, closed-loop simulations. 1. INTRODUCTION A water distribution network (WDN) in an urban area is part of a water cycle after the water production and transport parts. It generally consists of a large number of hydraulic elements, such as reservoirs/tanks, pressurized pipelines, pumping stations (including several parallel pumps) and valves. The main task of a WDN is to supply enough water flows with suitable pressures to all the demand sectors. Different optimal control strategies for the operational management of WDNs have been discussed in the past decade considering the economic performance using the model predictive control (MPC) framework, see e.g. (Brdys and Ulanicki, 1994; Cembrano et al., 2000; Ocampo- Martinez et al., 2013; Wang et al., 2016a). In these references, the optimal flow set-points for actuators (pumps and valves) can be computed by solving a finite-horizon optimization problem with the minimization of a multiobjective problem including economic costs and safety This work has been partially funded by the Spanish Government and FEDER through the projects CICYT ECOCIS (ref. DPI2013- 48243), CICYT DEOCS (ref. DPI2016-76493) and CICYT HARCRICS (ref. DPI2014-58104-R). indexes. However, only the water flows are considered as the system variables and the pressures/hydraulic heads 1 are ignored. Looking into more realistic scenarios, it is necessary to include the hydraulic heads inside the model of the WDN when minimum pressures at the demand sectors are required. Meanwhile, the suitable pressure allocation for the WDN is also able to protect the system equipments from fatigue. Economic model predictive control (EMPC) has attracted a lot of attention recently (Ellis et al., 2017). The stability of this class of EMPC controllers is an open issue to be clarified because the conventional MPC stability analysis considers that there exist system references. Recently, the dissipativity assumption has been widely used for proving the stability of EMPC (Angeli et al., 2012; Liu and Liu, 2016). The stability analysis of EMPC is established assuming that the considered linear or nonlinear system is dissipative. Besides, the terminal constraint and region are usually employed in order to guarantee convergence 1The hydraulic head is a measure of the potential energy of a fluid. It is usually measured in meters, referring to the pressure under a static water column of this height. The hydraulic head at any node in a water distribution network is the sum of its topographical elevation and the pressure at that node, expressed in water-column units. Proceedings of the 20th World Congress The International Federation of Automatic Control Toulouse, France, July 9-14, 2017 Copyright © 2017 IFAC 6782 Periodic Nonlinear Economic Model Predictive Control with Changing Horizon for Water Distribution Networks Ye Wang ∗Jos´e Ram´on Salvador ∗∗ David Mu˜noz de la Pe˜na ∗∗ Vicen¸c Puig ∗ Gabriela Cembrano ∗,∗∗∗ ∗Institut de Rob`otica i Inform`atica Industrial (IRI), CSIC-UPC, Universitat Polit`ecnica de Catalunya, C/. Llorens i Artigas 4-6, 08028 Barcelona, Spain (e-mail: {ywang, vpuig, cembrano}@iri.upc.edu) ∗∗ Departamento de Ingenier´ıa de Sistemas y Autom´atica, Escuela Superior de Ingenieros, Universidad de Sevilla, Avenida de los Descubrimientos, S/N, 41092 Sevilla, Spain (e-mail: {jsalvador1, dmunoz}@us.es) ∗∗∗ CETaqua, Water Technology Centre, Ctra. d’Esplugues 75, Cornell`a de Llobregat, 08940 Barcelona, Spain Abstract: A periodic nonlinear economic model predictive control (EMPC) with changing prediction horizon is proposed for the optimal management of water distribution networks (WDNs). The control model of the WDN is built by means of nonlinear differential-algebraic equations in which both the hydraulic pressure and flow variables are taken into account. The model allows the controller to consider minimum pressure constraints at the demands. A periodic terminal constraint is employed in order to guarantee closed-loop stability. The prediction horizon is modified on-line in order to guarantee convergence to the optimal periodic trajectory. The proposed control strategy is verified with the case study of the Richmond water network in a realistic hydraulic simulator. Although there are modeling errors between the control model and hydraulic model, the closed-loop system converges to a sub-optimal periodic trajectory satisfying all the constraints. Keywords: Economic model predictive control, periodic operation, nonlinear differential-algebraic equations, water distribution networks, closed-loop simulations. 1. INTRODUCTION A water distribution network (WDN) in an urban area is part of a water cycle after the water production and transport parts. It generally consists of a large number of hydraulic elements, such as reservoirs/tanks, pressurized pipelines, pumping stations (including several parallel pumps) and valves. The main task of a WDN is to supply enough water flows with suitable pressures to all the demand sectors. Different optimal control strategies for the operational management of WDNs have been discussed in the past decade considering the economic performance using the model predictive control (MPC) framework, see e.g. (Brdys and Ulanicki, 1994; Cembrano et al., 2000; Ocampo- Martinez et al., 2013; Wang et al., 2016a). In these references, the optimal flow set-points for actuators (pumps and valves) can be computed by solving a finite-horizon optimization problem with the minimization of a multiobjective problem including economic costs and safety This work has been partially funded by the Spanish Government and FEDER through the projects CICYT ECOCIS (ref. DPI2013- 48243), CICYT DEOCS (ref. DPI2016-76493) and CICYT HARCRICS (ref. DPI2014-58104-R). indexes. However, only the water flows are considered as the system variables and the pressures/hydraulic heads 1 are ignored. Looking into more realistic scenarios, it is necessary to include the hydraulic heads inside the model of the WDN when minimum pressures at the demand sectors are required. Meanwhile, the suitable pressure allocation for the WDN is also able to protect the system equipments from fatigue. Economic model predictive control (EMPC) has attracted a lot of attention recently (Ellis et al., 2017). The stability of this class of EMPC controllers is an open issue to be clarified because the conventional MPC stability analysis considers that there exist system references. Recently, the dissipativity assumption has been widely used for proving the stability of EMPC (Angeli et al., 2012; Liu and Liu, 2016). The stability analysis of EMPC is established assuming that the considered linear or nonlinear system is dissipative. Besides, the terminal constraint and region are usually employed in order to guarantee convergence 1The hydraulic head is a measure of the potential energy of a fluid. It is usually measured in meters, referring to the pressure under a static water column of this height. The hydraulic head at any node in a water distribution network is the sum of its topographical elevation and the pressure at that node, expressed in water-column units. Proceedings of the 20th World Congress The International Federation of Automatic Control Toulouse, France, July 9-14, 2017 Copyright © 2017 IFAC 6782 Periodic Nonlinear Economic Model Predictive Control with Changing Horizon for Water Distribution Networks Ye Wang ∗Jos´e Ram´on Salvador ∗∗ David Mu˜noz de la Pe˜na ∗∗ Vicen¸c Puig ∗ Gabriela Cembrano ∗,∗∗∗ ∗Institut de Rob`otica i Inform`atica Industrial (IRI), CSIC-UPC, Universitat Polit`ecnica de Catalunya, C/. Llorens i Artigas 4-6, 08028 Barcelona, Spain (e-mail: {ywang, vpuig, cembrano}@iri.upc.edu) ∗∗ Departamento de Ingenier´ıa de Sistemas y Autom´atica, Escuela Superior de Ingenieros, Universidad de Sevilla, Avenida de los Descubrimientos, S/N, 41092 Sevilla, Spain (e-mail: {jsalvador1, dmunoz}@us.es) ∗∗∗ CETaqua, Water Technology Centre, Ctra. d’Esplugues 75, Cornell`a de Llobregat, 08940 Barcelona, Spain Abstract: A periodic nonlinear economic model predictive control (EMPC) with changing prediction horizon is proposed for the optimal management of water distribution networks (WDNs). The control model of the WDN is built by means of nonlinear differential-algebraic equations in which both the hydraulic pressure and flow variables are taken into account. The model allows the controller to consider minimum pressure constraints at the demands. A periodic terminal constraint is employed in order to guarantee closed-loop stability. The prediction horizon is modified on-line in order to guarantee convergence to the optimal periodic trajectory. The proposed control strategy is verified with the case study of the Richmond water network in a realistic hydraulic simulator. Although there are modeling errors between the control model and hydraulic model, the closed-loop system converges to a sub-optimal periodic trajectory satisfying all the constraints. Keywords: Economic model predictive control, periodic operation, nonlinear differential-algebraic equations, water distribution networks, closed-loop simulations. 1. INTRODUCTION A water distribution network (WDN) in an urban area is part of a water cycle after the water production and transport parts. It generally consists of a large number of hydraulic elements, such as reservoirs/tanks, pressurized pipelines, pumping stations (including several parallel pumps) and valves. The main task of a WDN is to supply enough water flows with suitable pressures to all the demand sectors. Different optimal control strategies for the operational management of WDNs have been discussed in the past decade considering the economic performance using the model predictive control (MPC) framework, see e.g. (Brdys and Ulanicki, 1994; Cembrano et al., 2000; Ocampo- Martinez et al., 2013; Wang et al., 2016a). In these references, the optimal flow set-points for actuators (pumps and valves) can be computed by solving a finite-horizon optimization problem with the minimization of a multiobjective problem including economic costs and safety This work has been partially funded by the Spanish Government and FEDER through the projects CICYT ECOCIS (ref. DPI2013- 48243), CICYT DEOCS (ref. DPI2016-76493) and CICYT HARCRICS (ref. DPI2014-58104-R). indexes. However, only the water flows are considered as the system variables and the pressures/hydraulic heads 1 are ignored. Looking into more realistic scenarios, it is necessary to include the hydraulic heads inside the model of the WDN when minimum pressures at the demand sectors are required. Meanwhile, the suitable pressure allocation for the WDN is also able to protect the system equipments from fatigue. Economic model predictive control (EMPC) has attracted a lot of attention recently (Ellis et al., 2017). The stability of this class of EMPC controllers is an open issue to be clarified because the conventional MPC stability analysis considers that there exist system references. Recently, the dissipativity assumption has been widely used for proving the stability of EMPC (Angeli et al., 2012; Liu and Liu, 2016). The stability analysis of EMPC is established assuming that the considered linear or nonlinear system is dissipative. Besides, the terminal constraint and region are usually employed in order to guarantee convergence 1The hydraulic head is a measure of the potential energy of a fluid. It is usually measured in meters, referring to the pressure under a static water column of this height. The hydraulic head at any node in a water distribution network is the sum of its topographical elevation and the pressure at that node, expressed in water-column units. Proceedings of the 20th World Congress The International Federation of Automatic Control Toulouse, France, July 9-14, 2017 Copyright © 2017 IFAC 6782 Periodic Nonlinear Economic Model Predictive Control with Changing Horizon for Water Distribution Networks Ye Wang ∗Jos´e Ram´on Salvador ∗∗ David Mu˜noz de la Pe˜na ∗∗ Vicen¸c Puig ∗ Gabriela Cembrano ∗,∗∗∗ ∗Institut de Rob`otica i Inform`atica Industrial (IRI), CSIC-UPC, Universitat Polit`ecnica de Catalunya, C/. Llorens i Artigas 4-6, 08028 Barcelona, Spain (e-mail: {ywang, vpuig, cembrano}@iri.upc.edu) ∗∗ Departamento de Ingenier´ıa de Sistemas y Autom´atica, Escuela Superior de Ingenieros, Universidad de Sevilla, Avenida de los Descubrimientos, S/N, 41092 Sevilla, Spain (e-mail: {jsalvador1, dmunoz}@us.es) ∗∗∗ CETaqua, Water Technology Centre, Ctra. d’Esplugues 75, Cornell`a de Llobregat, 08940 Barcelona, Spain Abstract: A periodic nonlinear economic model predictive control (EMPC) with changing prediction horizon is proposed for the optimal management of water distribution networks (WDNs). The control model of the WDN is built by means of nonlinear differential-algebraic equations in which both the hydraulic pressure and flow variables are taken into account. The model allows the controller to consider minimum pressure constraints at the demands. A periodic terminal constraint is employed in order to guarantee closed-loop stability. The prediction horizon is modified on-line in order to guarantee convergence to the optimal periodic trajectory. The proposed control strategy is verified with the case study of the Richmond water network in a realistic hydraulic simulator. Although there are modeling errors between the control model and hydraulic model, the closed-loop system converges to a sub-optimal periodic trajectory satisfying all the constraints. Keywords: Economic model predictive control, periodic operation, nonlinear differential-algebraic equations, water distribution networks, closed-loop simulations. 1. INTRODUCTION A water distribution network (WDN) in an urban area is part of a water cycle after the water production and transport parts. It generally consists of a large number of hydraulic elements, such as reservoirs/tanks, pressurized pipelines, pumping stations (including several parallel pumps) and valves. The main task of a WDN is to supply enough water flows with suitable pressures to all the demand sectors. Different optimal control strategies for the operational management of WDNs have been discussed in the past decade considering the economic performance using the model predictive control (MPC) framework, see e.g. (Brdys and Ulanicki, 1994; Cembrano et al., 2000; Ocampo- Martinez et al., 2013; Wang et al., 2016a). In these references, the optimal flow set-points for actuators (pumps and valves) can be computed by solving a finite-horizon optimization problem with the minimization of a multiobjective problem including economic costs and safety This work has been partially funded by the Spanish Government and FEDER through the projects CICYT ECOCIS (ref. DPI2013- 48243), CICYT DEOCS (ref. DPI2016-76493) and CICYT HARCRICS (ref. DPI2014-58104-R). indexes. However, only the water flows are considered as the system variables and the pressures/hydraulic heads 1 are ignored. Looking into more realistic scenarios, it is necessary to include the hydraulic heads inside the model of the WDN when minimum pressures at the demand sectors are required. Meanwhile, the suitable pressure allocation for the WDN is also able to protect the system equipments from fatigue. Economic model predictive control (EMPC) has attracted a lot of attention recently (Ellis et al., 2017). The stability of this class of EMPC controllers is an open issue to be clarified because the conventional MPC stability analysis considers that there exist system references. Recently, the dissipativity assumption has been widely used for proving the stability of EMPC (Angeli et al., 2012; Liu and Liu, 2016). The stability analysis of EMPC is established assuming that the considered linear or nonlinear system is dissipative. Besides, the terminal constraint and region are usually employed in order to guarantee convergence 1The hydraulic head is a measure of the potential energy of a fluid. It is usually measured in meters, referring to the pressure under a static water column of this height. The hydraulic head at any node in a water distribution network is the sum of its topographical elevation and the pressure at that node, expressed in water-column units. Proceedings of the 20th World Congress The International Federation of Automatic Control Toulouse, France, July 9-14, 2017 Copyright © 2017 IFAC 6782 in closed-loop. From the application point of view, for a large-scale system, it would be computationally expensive to find the terminal region and probably not possible to obtain a time-varying terminal region within a computation time that is consistent with real-time constraints. Moreover, for a specific system, it is also necessary to satisfy the dissipativity property. From the industrial experience, the possible optimal control actions for management of a WDN could be obtained with a periodic behavior because water demands and electricity costs usually present daily repetitive patterns. Hence, a periodic EMPC is suitable for optimal management of a WDN in order to guarantee the multiple control objectives, including satisfying water demands to all the customers, protecting the equipments inside the network and maximizing their work life. The main contribution of this paper is to propose a periodic nonlinear EMPC (PNEMPC) strategy for the operational management of WDNs. The control-oriented model of the WDN is built by means of nonlinear differentialalgebraic equations in discrete-time taking into account not only the water balance equations, but also the hydraulic head and the relationship between flows and headdrops in the network. The periodic operation of the proposed controller is enforced by employing a periodic terminal equality constraint. The prediction horizon is chosen to be time-varying in order to guarantee convergence under certain assumptions to the optimal periodic trajectory also satisfying all the constraints. The results of applying the proposed strategy to the Richmond water network show its effectiveness both using the control-oriented model and EPANET. 2. PROBLEM STATEMENT 2.1 Optimal Operation of WDNs The common operational objectives for the operational management of WDNs include (Ocampo-Martinez et al., 2013): •Economic: To provide a reliable water supply with required pressures minimizing operational costs. •Safety: To guarantee the availability of enough water and hydraulic head in each storage tank to satisfy its underlying uncertain water demands. •Smoothness: To operate actuators of the WDN under smooth control actions. To this end, the actuators and pumps of the network have to be operated so that these objectives are satisfied taking into account the available information on the future demands and other relevant parameters such as electricity costs. Most MPC applications found in the literature focus only on controlling the water at the different tanks using model-based water balance equations. However, another key variable is the hydraulic head/pressure at different nodes of the network. To control this variable, nonlinear algebraic equations have to be considered relating flow and head. The actuator in most WDNs can only operate in an ON/OFF fashion, defining the control laws as simple switching logics which in general are hard to tune (Van Zyl et al., 2004). Switching actuators lead to hybrid models which in general are difficult to consider in an EMPC setting. In this work, we follow a hierarchical approach, in which a periodic EMPC controller will decide the mean flow in each actuator of the WDN, and a low level control layer will implement the switching sequence to guarantee that mean flow. In the case that the pumps and valves can be regulated controlling directly the frequency or the degree of opening, PID controllers can be used. If only ON/OFF sequences can be implemented, which is a common constraint in real networks, an appropriate openloop or closed-loop strategy has to be used. In particular, we proposed a control strategy in which at the beginning of the sampling period, all pumps and valves are switched on, and are switched off only when the amount of water needed in the period is reached. In this case, it is important to note that the hydraulic head at the nodes depends on the state of the actuators, leading to sudden pressure changes. For this reason, the output variable is defined as the mean hydraulic head at the demand nodes. The simulations will be carried out using EPANET, a well known software that models water distribution piping systems (Rossman, 2000), and using the Yalmip toolbox (L¨ofberg, 2004) and IPOPT solver through OPTI toolbox (Currie and Wilson, 2012) in MATLAB. EPANET provides continuous time simulations of the network between sampling times. 2.2 Control-oriented Model of WDNs In order to define the EMPC controller an appropriate model is needed. We propose to model a WDN by a set of discrete-time differential-algebraic equations as follows (Wang et al., 2016c): xk+1 =Axk+Buuk+Bvvk+Bddk,(1a) 0=Euuk+Evvk+Eddk,(1b) 0=Pxxk+Pzzk+ψ(vk),(1c) where xk∈Rnxdenotes the vector of hydraulic heads at the storage nodes (reservoirs/tanks) as differential states, zk∈Rnzdenotes the vector of mean hydraulic heads at the non-storage nodes as algebraic states, uk∈Rnudenotes the vector of mean manipulated flows of the actuators (pumps and valves), vk∈Rnvdenotes the vector of mean non-manipulated flows through the interconnected pipes and dk∈Rnddenotes the vector of mean water demands, which are regarded as the measured system disturbances. Moreover, A, Bu,B v,B d,E u,E v,E d,P xand Pzare timeinvariant matrices with suitable dimensions decided by the network topology while ψis a vector of the nonlinear mapping functions. Equation (1a) describes the system dynamics, (1b) presents the physical and static relations in the water network by means of mass balance at non-storage nodes and (1c) describes the hydraulic head-flow relationship in the pipes that connect the demand nodes to different tanks, which is built by using the Chezy-Manning formula: zi k−zj k=Ri,jvi,j k vi,j k ,(2) where ziand zjdenote the heads at the i-th and jth nodes, respectively, vi,j denotes the flow through the pipe between the i-th and j-th nodes and Ri,j is the pipe Proceedings of the 20th IFAC World Congress Toulouse, France, July 9-14, 2017 6783
6590 Ye Wang et al. / IFAC PapersOnLine 50-1 (2017) 6588–6593 coefficient. Notice that zior zjare replaced by xior xj depending on the network topology. Assuming that the hydraulic heads at the storage nodes vary sufficiently slow, these equations provides an estimate of the mean hydraulic head drop at each pipe. This model can be used both for WDNs controlled using PIDs or with a switching logic as proposed in the previous subsection. In the proposed model, the hydraulic head-flow relationship of actuators is not considered. Hence, this implies that only hydraulic heads of demands directly connected to tanks can be estimated. The water demand dk+ifor i=1,2,...,H palong the prediction horizon Hpis assumed to be predicted as ˆ dk+i by using a suitable short-term forecasting method, such as in Wang et al. (2016b). The demand forecasts are periodic with a period T. 2.3 General EMPC Problem The control performance of the WDN is evaluated by an economic cost function that considers an exogenous periodically time-varying parameter pkwith the period T. The economic parameter prepresents the periodically time-varying electricity price in a WDN and its variation is assumed to be known. The periodic behavior implies that the time-varying economic cost function is T-periodic. The economic performance is measured with the average of the time-varying economic cost function in closed-loop considering an infinite horizon, which is formulated as L∞lim n→∞ 1 nT nT −1 i=0 (·).(3) In addition, we consider the following constraints: xk∈X,(4) zk∈Z,(5) uk∈U,(6) where X,Zand Udenote constraints on x,zand u depending on the physical limitations of components in the WDN, respectively. We propose to use a finite horizon optimization problem to define the EMPC in which a suitable value for nis chosen at each time step to guarantee convergence of the closed loop system to the optimal infinite horizon trajectory. In this paper, the criterion of the selection of a time-varying nis discussed. 2.4 Constraint and Cost Function Settings Considering the aforementioned control objectives for the management of WDNs, we propose next an objective function computed as the weighted sum of several terms. Assuming a linear relation between the flow and the energy used by a pump, the economic performance can be estimated as e(uk,p k)pT kuk,(7) where e(uk,p k) directly measures the operational costs from the usage of the pumps in the WDN. The safety and smoothness objectives can be optimized by using the following two cost functions: m(ξk)ξT kξk,(8a) s(uk)∆uT k∆uk,(8b) with ∆ukuk−uk−1,(9) where (8a) corresponds to a soft constraint setting with a predefined safe water head vector xsat storage tanks and a positive slack variable ξkat time instant k, which can be formulated as xk≥xs−ξk,(10a) ξk≥0.(10b) and (8b) penalizes the quadratic term of the slew rate ∆uk at time instant k. In order to maintain the stability and closed-loop convergence to the optimal steady states, an additional penalty term is considered in order to guarantee that we only keep the minimum reserved water in storage tanks, which is defined as follows: x(xk)=xk−xs2 2.(11) Furthermore, the minimum pressure is required at each demand sector. Hence, an additional constraint for the variable zkat time instant kis added as follows: zk≥z,(12) where zdenotes the vector of the minimum heads at nonstorage nodes where there is a demand associated. Note that the minimum head at demand sector contains its elevation and the required minimum pressure. Considering the feasibility of the corresponding MPC optimization problem, (12) is also set as a soft constraint. Therefore, (12) can be reformulated as zk≥z−ζk,(13a) ζk≥0,(13b) where ζkis also a slack variable and corresponding cost function is defined as z(ξk)ζT kζk,(14) Thus, the general economic cost function for the management of the WDN can be written as follows: T=λ1e(uk,p k)+λ2m(ξk)+λ3s(uk) +λ4x(xk)+λ5z(ζk),(15) where λ1,λ2,λ3,λ4and λ5are the prioritization weights for different functions. Remark 1. Parameter λ4should be small compared to the rest of weights because the main objective for management of WDNs is to minimize the economic cost depending on pumping with periodically time-varying electrical prices. Hence, it is optimal to accumulate water in the storage tanks when the electricity price is low. 3. PERIODIC NONLINEAR ECONOMIC MODEL PREDICTIVE CONTROL WITH CHANGING HORIZON 3.1 PNEMPC Planner In order to analyze the closed-loop convergence, a PENMPC planner is also designed. By using this planner, the Proceedings of the 20th IFAC World Congress Toulouse, France, July 9-14, 2017 6784
Ye Wang et al. / IFAC PapersOnLine 50-1 (2017) 6588–6593 6591 optimal steady states and control inputs can be obtained. Moreover, the optimal planner cost can be also obtained. Considering the T-periodic operations for the management of WDNs, the optimal steady trajectory can be obtained by a finite-horizon open-loop optimization problem with a periodic terminal constraint as follows (Angeli et al., 2012; Limon et al., 2016): min x∗ s,u∗ s,ξ∗ s,ζ∗ s Ls T T−1 i=0 T,(16a) subject to xi+1 =Axi+Buui+Bvvi+Bdˆ di,(16b) 0=Euui+Evvi+Edˆ di,(16c) 0=Pxxi+Pzzi+ψ(vi),(16d) xi∈X,(16e) ui∈U,(16f) xi≥xs−ξi,(16g) zi≥z−ζi,(16h) x0=xT.(16i) Assumption 1. The steady-state planner implemented in the optimization problem (16) has a unique solution that defines the optimal periodic trajectory that can be reached. The feasible solutions of the above finite-horizon optimization problem are denoted by x∗ sand u∗ sare regarded as the best feasible periodic steady-state pair (x∗ s,u∗ s). Besides, the optimal operational cost is denoted by Ls T. 3.2 PNEMPC with Changing Prediction Horizon The PNEMPC strategy for management of WDNs is implemented by solving the following optimization problem: Ln kmin x∗ k,u∗ k,ξ∗ k,ζ∗ s 1 n nT −1 i=0 T,(17a) subject to xk+i+1|k=Axk+i|k+Buuk+i+Bvvk+i+Bdˆ dk+i|k,(17b) 0=Euuk+i+Evvk+i+Edˆ dk+i,(17c) 0=Pxxk+i|k+Pzzk+i+ψ(vk+i),(17d) xk+i+1|k∈X,(17e) uk+i∈U,(17f) xk+i+1|k≥xs−ξk+i,(17g) zk+i|k≥z−ζk+i,(17h) xk|k=xk+nT |k,(17i) xk|k,ˆ dk|k=(xk,d k),(17j) where (17i) denotes the periodic terminal equality constraint in order to achieve the periodic operational behavior. If the optimization problem (17) is feasible, a sequence of optimal control actions u∗ k=u∗ 0|k,u ∗ 1|k,...,u ∗ nT −1|k and the corresponding optimal operational cost Ln∗ kat time instant kis obtained. The controller is implemented in a receding horizon scheme, applying the first optimal control action and discarding the rest of the solution: u∗ k=u∗ 0|k.(18) The prediction horizon Hpin the corresponding PNEMPC optimization problem (17) is set as nT , where nis a parameter to be determined taking into account the convergence of the closed-loop system to the optimal planner trajectory if possible. In this paper, we proposed an heuristic algorithm to achieve this property. Recursive feasibility of the optimization problem, and hence stability, is guaranteed by the (17i) assuming that the parameter nat time k+1 is the same as the parameter nat time k. This is proved taking into account that by definition x(k+ 1) = x(k+1|k) so using the shifted sequence of control actions a periodic trajectory that satisfies all the constraints is obtained. This also implies that since the previous optimal sequence of control actions is feasible, the optimal operational cost at time k+ 1 will be at least equal to the optimal operational cost at time k, that is: Ln k≤Ln k+1 However, there is no guarantee that the cost will decrease, which can possibly lead to a closed-loop steady trajectory different from the optimal trajectory of the planner. Taking into account Assumption 1, it can be proved that under mild assumptions: lim n→∞ Ln k=Ls T for all feasible x(k). This implies that increasing the value of the parameter to n>ncan lead to a decrease in the cost, that is, Ln k=Ln k+1 >L n k+1 proving convergence to the planner cost. Convergence to the planner cost is achieved when the cost does not decreases as the parameter nincreases, that is: Ln k=Ln k+1 =Ln k+1 for all n>n. Following these ideas, we propose the following heuristic control algorithm to determine nand the corresponding optimal solution. At time step k, solve problem (17) to obtain Ln k. If the cost has decreased, that is, Ln k<L n k−1 then apply the first optimal input. If the cost is the same, solve problem (17) with n=n+ 1. If the cost has decreased, that is, Ln k<L n kthen apply the first optimal input and set n=n. If the cost is the same, then the closed-loop system has reached the optimal planner trajectory, apply the first optimal input and set n= 1. 4. CASE STUDY: RICHMOND WATER NETWORK 4.1 System Description The Richmod water network 2is chosen as the case study in this paper. In this network, there are 6 tanks, 7 actuators (pumps), 11 water demand sectors, 41 nonstorage nodes and 41 interconnected pipes. 2http://emps.exeter.ac.uk/engineering/research/cws/resources /benchmarks/operation/richmond.php Proceedings of the 20th IFAC World Congress Toulouse, France, July 9-14, 2017 6785
6592 Ye Wang et al. / IFAC PapersOnLine 50-1 (2017) 6588–6593 Table 1. Safety heads of the storage tanks Tank Safety head [m] A 185.15 B 218.03 C 259.40 D 242.28 F 235.90 To obtain the proposed control-oriented model (1), several simplification were made. In particular, the flows through the pipes (ID: 1783) and (ID: 1793) were assumed to be equal and tank E was considered to be full at all times, acting as a pipe with a fixed output hydraulic pressure. These simplifications introduce modeling errors between the control model and EPANET, in particular, the errors will be high if tank E is not full. By simulation, we have demonstrated that because of the head and size difference between tanks D and E, tank E is always full in normal operation. Note also that both tanks are connected in a passive link without pumps. Using these simplifications, the resulting model has 5 states, 6 actuators, 11 demands and 15 nonlinear algebraic equations. Regarding the benchmark information of the Richmond water network, we changed the sign of the demand at Junction (ID: 777) so that it consumes water. In addition, both the electrical price pattern and the demands are supposed to start at 07:00 when the electrical price pattern starts from the peaks. Every hour, the tank levels are read from EPANET, the optimization problem is solved to obtain the desired mean flows. Then, a series of EPANET simulations is carried out to decide at which minute each of the pumps should be turned off depending on the amount of water delivered. The selection of weights in the cost function are λ1= 10, λ2= 1, λ3=0.1, λ4=0.001 and λ5= 1. The timevarying electricity prices pk, system constraint on xkare obtained from the original Richmond network given in the EPANET model. The physical constraints on ukand the minimum heads around pumps are obtained from running the simulation in EPANET. The safety heads for the storage tanks are given in Table 1. Moreover, the minimum required pressure at all the demand sectors are set as 10 meters. The short-term water demand forecasts are available with a daily period. Therefore, the period Tof the EMPC control strategy is chosen as 24 hours. Considering the computational cost of solving a nonlinear optimization problem, the possible prediction horizons in this case study are Hp= 24 hours (n= 1) and Hp= 48 hours (n= 2) in this paper. All the simulations have been executed for 5 days. 4.2 Results of PNEMPC with Changing Horizon In order to verify the proposed algorithm of the PNEMPC with changing horizon, the first simulation is carried out by using the PNEMPC controller and nonlinear control model in (1) as the simulator. In this scenario, the modeling errors are zero. The results of system state evolutions are expected to reach the optimal steady states after the transient period. Fig. 1 shows the on-line PNEMPC cost and the nonlinear planner cost. The prediction horizon Hp is switched between 24 and 48 hours. During the transient period between k= 6 and k= 10, Hpis set to 48 in order to guarantee that the PNEMPC cost is always decreasing. When the PNEMPC cost is close enough to the nonlinear planner cost, Hpis set back to 24. 20 40 60 80 100 120 Ln k 146 150 154 PNEMPC Planner k[h] 20 40 60 80 100 120 Hp 24 48 Fig. 1. Closed-loop optimal operational cost trajectory using the control-oriented model to simulate the system (blue). Planner cost (red). The results of system states and control inputs are shown in Fig. 2 and 3. From an initial condition, the system states can reach the optimal steady states obtained by the nonlinear planner as shown in Fig. 2. Hence, the Richmond water network operated using the proposed controller provides and appropriate closed-loop behavior. On the other hand, the electrical price patterns for each pump are also shown in Fig. 3. The control inputs can not only reach the optimal steady inputs but also timevarying with respect to the economic objective. When the price is high, less water is pumped. Hence, it is clear that the economic performance is correctly taken into account. k[h] 20 40 60 80 100 120 x1[m] 184.5 185 185.5 186 186.5 187 187.5 PNEMPC Planner Safety Head (a) Tank A k[h] 20 40 60 80 100 120 x6[m] 236 236.5 237 237.5 PNEMPC Planner Safety Head (b) Tank F Fig. 2. Closed-loop tank trajectories using the controloriented model to simulate the system. k[h] 20 40 60 80 100 120 u12 [m 3 /s] 0 0.02 0.04 0.06 PNEMPC Planner Price Pattern (a) Pump Station A k[h] 20 40 60 80 100 120 u5[m3/s] ×10-3 0 1 2 3 4 PNEMPC Planner Price Pattern (b) Pump 5C Fig. 3. Closed-loop pump trajectories using the controloriented model to simulate the system. 4.3 Closed-loop Results with the EPANET Simulator The results obtained using the EPANET simulator are presented below. As explained in the nonlinear controloriented model, there are mismatches between the prediction model and the EPANET model. Proceedings of the 20th IFAC World Congress Toulouse, France, July 9-14, 2017 6786
Ye Wang et al. / IFAC PapersOnLine 50-1 (2017) 6588–6593 6593 Table 1. Safety heads of the storage tanks Tank Safety head [m] A 185.15 B 218.03 C 259.40 D 242.28 F 235.90 To obtain the proposed control-oriented model (1), several simplification were made. In particular, the flows through the pipes (ID: 1783) and (ID: 1793) were assumed to be equal and tank E was considered to be full at all times, acting as a pipe with a fixed output hydraulic pressure. These simplifications introduce modeling errors between the control model and EPANET, in particular, the errors will be high if tank E is not full. By simulation, we have demonstrated that because of the head and size difference between tanks D and E, tank E is always full in normal operation. Note also that both tanks are connected in a passive link without pumps. Using these simplifications, the resulting model has 5 states, 6 actuators, 11 demands and 15 nonlinear algebraic equations. Regarding the benchmark information of the Richmond water network, we changed the sign of the demand at Junction (ID: 777) so that it consumes water. In addition, both the electrical price pattern and the demands are supposed to start at 07:00 when the electrical price pattern starts from the peaks. Every hour, the tank levels are read from EPANET, the optimization problem is solved to obtain the desired mean flows. Then, a series of EPANET simulations is carried out to decide at which minute each of the pumps should be turned off depending on the amount of water delivered. The selection of weights in the cost function are λ1= 10, λ2= 1, λ3=0.1, λ4=0.001 and λ5= 1. The timevarying electricity prices pk, system constraint on xkare obtained from the original Richmond network given in the EPANET model. The physical constraints on ukand the minimum heads around pumps are obtained from running the simulation in EPANET. The safety heads for the storage tanks are given in Table 1. Moreover, the minimum required pressure at all the demand sectors are set as 10 meters. The short-term water demand forecasts are available with a daily period. Therefore, the period Tof the EMPC control strategy is chosen as 24 hours. Considering the computational cost of solving a nonlinear optimization problem, the possible prediction horizons in this case study are Hp= 24 hours (n= 1) and Hp= 48 hours (n= 2) in this paper. All the simulations have been executed for 5 days. 4.2 Results of PNEMPC with Changing Horizon In order to verify the proposed algorithm of the PNEMPC with changing horizon, the first simulation is carried out by using the PNEMPC controller and nonlinear control model in (1) as the simulator. In this scenario, the modeling errors are zero. The results of system state evolutions are expected to reach the optimal steady states after the transient period. Fig. 1 shows the on-line PNEMPC cost and the nonlinear planner cost. The prediction horizon Hp is switched between 24 and 48 hours. During the transient period between k= 6 and k= 10, Hpis set to 48 in order to guarantee that the PNEMPC cost is always decreasing. When the PNEMPC cost is close enough to the nonlinear planner cost, Hpis set back to 24. 20 40 60 80 100 120 Ln k 146 150 154 PNEMPC Planner k[h] 20 40 60 80 100 120 Hp 24 48 Fig. 1. Closed-loop optimal operational cost trajectory using the control-oriented model to simulate the system (blue). Planner cost (red). The results of system states and control inputs are shown in Fig. 2 and 3. From an initial condition, the system states can reach the optimal steady states obtained by the nonlinear planner as shown in Fig. 2. Hence, the Richmond water network operated using the proposed controller provides and appropriate closed-loop behavior. On the other hand, the electrical price patterns for each pump are also shown in Fig. 3. The control inputs can not only reach the optimal steady inputs but also timevarying with respect to the economic objective. When the price is high, less water is pumped. Hence, it is clear that the economic performance is correctly taken into account. k[h] 20 40 60 80 100 120 x1[m] 184.5 185 185.5 186 186.5 187 187.5 PNEMPC Planner Safety Head (a) Tank A k[h] 20 40 60 80 100 120 x6[m] 236 236.5 237 237.5 PNEMPC Planner Safety Head (b) Tank F Fig. 2. Closed-loop tank trajectories using the controloriented model to simulate the system. k[h] 20 40 60 80 100 120 u12 [m3/s] 0 0.02 0.04 0.06 PNEMPC Planner Price Pattern (a) Pump Station A k[h] 20 40 60 80 100 120 u5[m3/s] ×10-3 0 1 2 3 4 PNEMPC Planner Price Pattern (b) Pump 5C Fig. 3. Closed-loop pump trajectories using the controloriented model to simulate the system. 4.3 Closed-loop Results with the EPANET Simulator The results obtained using the EPANET simulator are presented below. As explained in the nonlinear controloriented model, there are mismatches between the prediction model and the EPANET model. Proceedings of the 20th IFAC World Congress Toulouse, France, July 9-14, 2017 6786 k [ h ] 40 60 80 100 120 Lc k 6.5 7 7.5 8 Fig. 4. Closed-loop actual operational cost trajectory using EPANET to simulate the system. The closed-loop actual operational cost trajectory is shown in Fig. 4. In this plot, the cost is increasing until it reaches the cost of the periodic optimal operation that the MPC can deliver. The average actual cost is computed in a sliding window of 24 hours. The average actual cost is computed as Lc k1 T T−1 i=0 T(ˇxk−i,ˇuk−i),k≥T, (19) where ˇxkand ˇukare the actual heads at storage tanks and mean flows through actuators obtained from the EPANET simulator. The closed-loop results of system states and control inputs are shown in Fig. 5 and 6. The optimal solutions of system states are compared with the actual states simulated with the EPANET model in Fig. 5. It can be seen that the Richmond network is controlled appropriately by using the prediction model in spite of the modeling errors. As introduced in Section 2, the optimal flow set-points can be translated into a sequence of ON-OFF values and then these ON-OFF values are sent to the EPANET simulator. The actual mean flows through actuators fed back from the EPANET simulator is compared with the optimal flow set-points for each pump in Fig. 6. k[h] 20 40 60 80 100 120 x1[m] 184.5 185 185.5 186 186.5 187 187.5 PNEMPC EPANET Safety Head (a) Tank A k[h] 20 40 60 80 100 120 x6[m] 236 236.5 237 237.5 PNEMPC EPANET Safety Head (b) Tank F Fig. 5. Closed-loop tank evolutions using EPANET to simulate the system. k[h] 20 40 60 80 100 120 u12 [m 3 /s] 0 0.02 0.04 0.06 PNEMPC EPANET Price Pattern (a) Pump Station A k[h] 20 40 60 80 100 120 u5[m3/s] ×10 -3 0 1 2 3 4 PNMPC EPANET Price Pattern (b) Pump 5C Fig. 6. Closed-loop pump operations using EPANET to simulate the system. 5. CONCLUSION In this paper, a new EMPC controller for the operational management of WDNs is presented along with two set of simulation results using the Richmond water network case study. First, the simulation with the nonlinear control model is carried out in order to investigate the system convergence by applying the PNEMPC strategy with changing horizon. Then, the closed-loop simulation with the EPANET simulator is executed. Both simulations prove that the PNEMPC strategy is effective and is able to operate the WDN achieving the expected performances. REFERENCES Angeli, D., Amrit, R., and Rawlings, J. (2012). On average performance and stability of economic model predictive control. IEEE Transactions on Automatic Control, 57(7), 1615 – 1626. Brdys, M. and Ulanicki, B. (1994). Operational Control of Water Systems: Structures, Algorithms and Applications. Prentice-Hall. Cembrano, G., Wells, G., Quevedo, J., Perez, R., and Argelaguet, R. (2000). Optimal control of a water distribution network in a supervisory control system. Control Engineering Practice, 8(10), 1177 – 1188. Currie, J. and Wilson, D. (2012). OPTI: Lowering the Barrier Between Open Source Optimizers and the Industrial MATLAB User. URL http://www.i2c2.aut.ac.nz/Wiki/OPTI. Ellis, M., Liu, J., and Christofides, P. (2017). Economic Model Predictive Control: Theory, Formulations and Chemical Process Applications. Springer. Limon, D., Pereira, M., Mu˜noz de la Pe˜na, D., Alamo, T., Jones, C., and Zeilinger, M. (2016). MPC for tracking periodic references. IEEE Transactions on Automatic Control, 61(4), 1123 – 1128. Liu, S. and Liu, J. (2016). Economic model predictive control with extended horizon. Automatica, 73, 180 – 192. L¨ofberg, J. (2004). YALMIP: A Toolbox for Modeling and Optimization in MATLAB. URL http://users.isy.liu.se/johanl/yalmip. Ocampo-Martinez, C., Puig, V., Cembrano, G., and Quevedo, J. (2013). Application of MPC strategies to the management of complex networks of the urban water cycle. IEEE Control Systems Magazine, 33(1), 15 – 41. Rossman, L. (2000). Epanet 2.0 Users Manual. URL https://www.epa.gov/water-research/epanet. Van Zyl, J., Savic, D., and Walters, G. (2004). Operational optimization of water distribution systems using a hybrid genetic algorithm. Journal of Water Resources Planning and Management, 130(2), 160 – 170. Wang, Y., Ocampo-Martinez, C., and Puig, V. (2016a). Stochastic model predictive control based on Gaussian processes applied to drinking water networks. IET Control Theory & Applications, 10(8), 947 – 955. Wang, Y., Ocampo-Martinez, C., Puig, V., and Quevedo, J. (2016b). Gaussian-process-based demand forecasting for predictive control of drinking water networks. In Critical Information Infrastructures Security, 69 – 80. Springer. Wang, Y., Puig, V., and Cembrano, G. (2016c). Economic MPC with periodic terminal constraints of nonlinear differential-algebraic-equation systems: Application to drinking water networks. In 2016 European Control Conference, 1013 – 1018. Aalborg, Denmark. Proceedings of the 20th IFAC World Congress Toulouse, France, July 9-14, 2017 6787