Universitat Politècnica de Catalunya Programa de Doctorat: Automàtica, Robòtica i Visió Tesi Doctoral MULTI-LAYER MODEL PREDICTIVE CONTROL OF COMPLEX WATER SYSTEMS Congcong SUN Directors: Dr. Gabriela Cembrano Gennari i Dr. Vicenç Puig Cayuela Setembre 2015 To my family Declaration I hereby declare that this dissertation is the result of my own work and is not substantially the same as any work that has been submitted for a degree, diploma or other qualifications at any other university or institution. Congcong SUN Barcelona, Spain, September 2015 iii Acknowledgements Eventually, I have reached the excited stage of my doctorate trip to produce the final thesis. It was a tough but pleasant experience with the sincere guide, companionship and encouragement from the encountered people. Everyone of them has left special mark and particular memory in my mind and the achievements also belong to them. The first and most important persons I want to thank are my supervisors Prof. Vicenç Puig and Prof. Gabriela Cembrano who have poured opportunities, tutorship, encouragement on my Ph.D thesis and subtle positive influence about how to be a better person. They are quite excellent in academia, well-educated with good behavior even when I made mistakes, and all along willing to contribute time and material for the development of their students. As foreign Ph.D candidate, sometimes accidents happened and I could always receive their help in time. The patient grant application, inspiring discussions, the moved Christmas reunions, beautiful summer seaside invitation and the moment accompanied me to the court in an unpleasant dispute have become memories. These all might be things within their responsibilities but quite crucial and important to me. Now, I have two great friends in Spain more than wonderful supervisors and there are tons of honor for me to be able to encounter them. Extremely plenty of gratitude would be provided to dear Ana Canales and my other colleagues in the Institute of Robotics and Industrial Informatics and Research Center for Supervision, Safety and Automatic Control of Polytechnic University of Catalunya. Before discussing with my friends who have the same grant as mine, I would never know it is your kind hearted and generous that help me to get the long-term working permission of Spain, which brings me much convenient for working here. You are so kind and special and worth to get the health, happiness and escape from all the negative things. Prof. Carlos A. Ocampo Martínez, who is an expert of Model Predictive Control (MPC) and also an intelligent person with lots of life wisdoms, his talk on MPC and the positive attitude of enjoying the research impressed me a lot. Dr. Juan Manual Grosso, his talented and earnest research properties enlightened me, and the MPC solver also helped me a lot. Besides, without the co-work of Maite Urrea Espinosa, Juli Romera, Josep Pascual, it could be much more difficulty for me to finish my research on time. I also want to thank Prof. Dragan Savic who allowed me to visit the Center for Water Systems of University of Exeter and Dr. Mark Morley for helping me quite a lot during the daily work. This experience provided me a good chance to learn through practice new ways of doing research. And the cooperation work with real applications in Exeter helped me approving and extending my topic. Besides that, I would like to thank Dr. Li Guang, who invited me to visit and present my work in School of Engineering and Material Sciences of Queen Mary in University of London. The discussions on similar topics allow me to discover new ways to research and to redirect the topics I am working on. Besides, I would provide my sincere gratitude to ACA, ATLL, ADASA and Center for Water Systems of University of Exeter for providing the case studies as well as for sharing their hydrological management expertise. My research has also been partially funded by CDTI v (MCyT) project HIDROPTIM IDI-20100722, the DGR of Generalitat de Catalunya (SAC group Ref. 2009/SGR/1491), the AGAUR by an FI grant and by EFFINET grant FP7-ICT2012-318556 of the European Commission. Finally and indispensably, I would dedicate all the honors to my parents, who gave me life, braveness, cognition, and then freedom to choose the way of life I prefer, which seems mundane but really difficult to them considering their traditional ideology. On this long trip of pursuing dream and knowledge, they are always my powerful accompany and have devoted painstaking efforts both in heed and economic. Besides that, these four years distant courses make them bear more thoughts and concerns which are not required and can be avoided. Without their tolerance and comprehension, this wonderful and rewarding journey would be just a talk. Congcong SUN Barcelona, Spain, September 2015 vi Abstract The control of complex water systems (as regional and distribution networks), has become an important research topic because of the significance of water for human beings. The optimization of regional water networks, which have been structurally organized into Supply, Transportation and Distribution layers from a functional perspective, aims at controlling water systems in global perspective. Inside the distribution layer, the mathematical problem of optimizing drinking water networks (DWNs) is hard because they are complex large-scale multiple-input and multiple-output systems with sources of additive and, possibly, parametric uncertainty. Additionally, DWNs comprise of both deterministic and stochastic components and involve linear (flow model) as well as non-linear (pressure model) elements, which difficult the generation of sufficiently accurate and reliable solutions in an acceptable time. In water distribution networks, pumping water comprises the major fraction of the total energy budget, whose optimal policy is simplified into a set of rules or a schedule, that indicates when a particular pump or group of pumps should be turned on or off, will result in the lowest operational cost and highest efficiency of pumping stations. Model predictive control (MPC) is a well-established class of advanced control methods for complex large scale networks and has been successfully applied to control and optimize DWNs when the flow model is considered. In recent literature, there is a renewed interest in multi-layer MPC either from industrial practice or from academia. This is specially for the case when a system is composed of subsystems with multiple time scales as in the case of the regional water networks. A way to cope with this kind of problem is to apply a hierarchical control structure based on decomposing the original control task into a sequence of different, simpler and hierarchically structured subtasks, handled by dedicated control layers operating at different time scales. This thesis is devoted to design a multi-layer MPC controller applied to the complex water network taking into account that the different layers with different time scales and control objectives have their own controller. A two-layer temporal hierarchy coordinating scheme has been applied to coordinate the MPC controllers for the supply and transportation layers. An integrated real-time simulation-optimization approach which contributes to consider the effect of more complex dynamics, better represented by the simulation model, has been developed for regional water networks. The use of the combined approach of optimization and simulation coordination between simulator and optimizer allows to test the proposed multi-layer MPC in a feedback scheme using a realistic simulator of the regional network. The second part of this thesis is focused on the design of a control scheme which uses the combination of linear MPC with a constraint satisfaction problem (CSP) to optimize the nonlinear operational control of DWNs. The methodology has been divided into two functional layers: First, a CSP algorithm is used to transfer non-linear DWN pressure equations into linear constraints, which can enclose the feasible solution set of the hydraulic non-linear problem during the optimizing process. The network aggregation method (NAM) is used to simplify a complex water network into an equivalent conceptual one for the bidirectional network before vii the use of CSP. Then, a linear MPC with added linear constraints is solved to generate optimal control strategies which optimize the control objective. The proposed approach is simulated using Epanet to represent the real DWN. Non-linear MPC is used for validation using a generic operational tool for controlling water networks named PLIO. A two-layer scheduling scheme for pump stations in a water distribution network has also been designed in the second part of this thesis. The upper layer, which works in one-hour sampling time, uses MPC to produce continuous flow set-points for the lower layer. While in the lower layer, a scheduling algorithm has been used to translate the continuous flow set-points to a discrete (ON-OFF) control operation sequence of the pump stations with the constraints that pump stations should draw the same amount of water as the continuous flow set-points provided by the upper layer. The tuning parameters of such algorithm are the lower layer control sampling period and the number of parallel pumps in the pump station. Key words: regional water network, water distribution network, multi-layer MPC, coordination, CSP, NAM, Epanet, Non-linear MPC, PLIO, scheduling scheme. viii Resum El control dels sistemes complexos d’abastament d’aigua potable (incloent les xarxes regionals i de distribució), s’ha convertit en un important tema de recerca degut a la importància de l’aigua per als éssers humans. L’optimització de les xarxes regionals d’aigua potable, que s’organitza en Captació, Transport i Distribució des d’una perspectiva funcional de tres capes, persegueix la gestió òptima des d’una perspectiva global. Dins de la capa de distribució, el problema matemàtic d’optimització de xarxes d’aigua potable és difícil perquè es tracta d’un problema a gran escala de múltiples entrades i múltiples sortides amb fonts d’incertesa additiva, i possiblement, paramètrica. A més, les xarxes d’aigua potable presenten tant components deterministes com estocàstics i involucren elements lineals (model de cabal), així com no lineals (model de pressió), que dificulta la generació precisa i fiable de solucions en un temps acceptable. En les xarxes de distribució d’aigua potable, el bombament d’aigua comprèn la fracció principal del cost total d’energia, la política òptima es simplifica mitjançant un conjunt de regles o un horari que indica quan una determinada, bomba o grup de bombes s’ha d’activar o desactivar obtenint el cost d’operació més baix i el rendiment més alt possible de l’estació de bombament. El control predictiu basat en models (MPC) és una classe ben establerta de mètodes de control avançats per a xarxes complexes a gran escala i s’ha aplicat amb èxit per controlar i optimitzar el model de cabal de les xarxes d’aigua potable. A la literatura recent, hi ha un renovat interès en MPC multicapa ja sigui des de la pràctica industrial o des de l’acadèmia. Això és interessant per al cas de què el sistema estigui format per subsistemes amb múltiples escales de temps com és el cas de la xarxes d’aigua regionals. Una manera de fer front a aquest tipus de problemes és aplicar una estructura de control jeràrquic basat en descomposició de la tasca de control original en una seqüència de subtasques, més simples i jeràrquicament estructurades, a càrrec de capes de dedicades que operen a diferents escales de temps. Aquesta tesi està dedicada a dissenyar un controlador MPC multicapa que s’aplica a una complexa xarxa regional emprant com a principal idea el fet de què les diferents capes treballen amb diferents escales de temps i objectius de control s’aconseguiran amb el seu propi controlador. Un esquema jeràrquic de coordinació temporal de dues capes s’ha aplicat per a coordinar als controladors MPC per a les xarxes de captació i transport. Un enfocament integrat de simulació-optimizació que contribueix a asegurar que l’efecte de les dinàmiques complexes, millor representades pel model de simulació s’hagin tingut en compte, s’ha propostat per la gestió operacional temps real de les xarxes regionals. La segona part d’aquesta tesi es centra en el disseny d’un esquema de control que utilitza la combinació del control MPC lineal amb una problema de satisfacció de restriccions (CSP) per optimitzar el control operacional no-lineal de les xarxes d’aigua potable. La metodologia s’ha dividit en dues capes funcionals: En primer lloc, un algorisme de CSP s’utilitza per transformar les equacions de pressió DWN no lineals en restriccions lineals, que acota el conjunt de solucions factibles del problema hidràulic no lineal durant el procés d’optimització. El mètode d’agregació de xarxes (NAM) s’utilitza per simplificar una xarxa d’aigua complexa en una x xarxa conceptual bidireccional equivalent abans d’utilitzar el CSP. A continuació, un MPC lineal amb restriccions lineals amb límits operacionals modificats pel CSP s’utilitza per generar estratègies de control òptim que optimitzen l’objectiu de control. L’enfocament proposat es simula utilitzant Epanet per representar el comportament hidràulic de la xarxa d’aigua potable. Finalment, el MPC no lineal s’utilitza per a la validació fent ús de l’eina PLIO per a la seva implementació. I també, un esquema de planificació de dues capes per a estacions de bombament en una aigua xarxa de distribució ha estat proposat en la segona part d’aquesta tesi. La capa superior, que funciona en temps de mostreig d’una hora, utilitza un controlador per generar consignes de cabal òptimes per la capa inferior. Mentre que a la capa inferior, un algorisme de scheduling ha estat utilitzat per traduir el flux continu a una seqüència discreta d’operació de control (ONOFF) de les estacions de bombament que garanteixi que la quantitat d’aigua bombejada és la mateixa quantitat que el cabal determinat pel controlador MPC en la capa superior. Els paràmetres d’ajust d’aquest algorisme són el període de mostreig de control de la capa inferior i el número de bombes en paral·lel en la estació de bombament. Paraules Clau: xarxa regional d’aigua potable, xarxa de distribució d’aigua potable, MPC multicapa, coordinació, DWNs, CSP, NAM, Epanet, MPC no lineal, PLIO, esquema de planificació. xi Resumen El control del sistema complejo de una red de abastecimiento de agua potable (incluyendo regional y las redes de distribución), se ha convertido en un importante tema de investigación debido a la importancia del agua para los seres humanos. La optimización de una red regional de agua potable, que se organiza estructuralmente en Captación, Transporte y Distribución desde una perspectiva funcional, se centra en la gestión desde una perspectiva global. Dentro de la capa de distribución, el problema matemático de optimización de redes de agua potable es difícil debido a su a gran escala así como debido a las múltiples entradas y salidas con fuentes de incertidumbre aditiva y, posiblemente, paramétrica. Además, las redes de agua potable comprenden tanto componentes deterministas como estocásticos e involucran elementos lineales (modelo de flujo), así como no lineales (modelo de presión), lo que dificulta la generación suficientemente precisa y fiable de soluciones en un tiempo aceptable. En redes convencionales de distribución de agua, el bombeo de agua comprende la fracción principal del presupuesto total de energía, cuya política óptima se simplifica en un conjunto de reglas o un horario que indica cuando una bomba en particular o un grupo de bombas se debe activar o desactivar para conseguir en el coste de operación más bajo y el más alto rendimiento posible de la estación de bombeo. El control predictivo basado en modelo (MPC) es una clase bien establecida de métodos de control avanzado para redes complejas a gran escala y se ha aplicado con éxito para controlar y optimizar el modelo de flujo de DWNs. En la literatura reciente, existe un renovado interés en el MPC multicapa ya sea desde la práctica industrial o desde la academia. Esto es especialmente cierto tanto para el caso de que un sistema se componga de subsistemas con múltiples escalas de tiempo así como en el caso de la redes regionales. Una manera de hacer frente a este tipo de problemas es aplicar una estructura de control jerárquico basada en la descomposición del cálculo de las acciones de control en una secuencia de subtareas más simple y jerárquicamente estructuradas a cargo de capas de control dedicadas que operan a diferentes escalas de tiempo. Esta tesis está dedicada a diseñar un controlador MPC multicapa aplicado a una compleja red de agua regional utlizando como principales ideas que las diferentes capas tienen su propio controlador y que operan con diferentes escalas de tiempo y objetivos de control. Un esquema de coordinación temporal con dos capas de jerarquía se ha aplicado para coordinar los controladores MPC para las redes de captación y transporte. Un enfoque integrado de simulación-optimización que contribuye a asegurar que el efecto de sistemas con dinámicas complejas sea mejor representado por el modelo de simulación se ha utilizado y aplicado a la gestión operacional de redes regionales de agua en tiempo real. La segunda parte de esta tesis se centra en el diseño de un esquema de control que xiii utiliza la combinación de MPC lineal con un problema de satisfacción de restricciones (CSP) para optimizar el modelo no lineal en presión utilizado para el control operacional de redes de distribución de agua potable. La metodología se ha dividido en dos capas funcionales: En primer lugar, un algoritmo de CSP se utiliza para transformar las ecuaciones no lineales de presión DWN en restricciones lineales, que acota el conjunto de soluciones factibles del problema hidráulico no lineal durante el proceso de optimización. El método de agregación de redes (NAM) se utiliza para simplificar una red compleja de agua en una red conceptual bidireccional equivalente antes de utilizar el CSP. A continuación, un MPC lineal con restricciones lineales se utliza para generar estrategias de control óptimo que optimizan el objetivo de control. El enfoque propuesto se simula utilizando Epanet para representar el comportamiento hidráulico de las red de distribución de agua potable. Finalmente, se utiliza el control MPC no lineal para la validación utilizando la herramienta PLIO para su implementación. Y también en la segunda parte de esta tesis se ha propouesto un esquema de scheduling de dos capas para estaciones de bombeo en redes de distribución de agua. En la capa superior, que funciona con un tiempo de muestreo de una hora, se utiliza un control MPC para generar estrategias de flujo continuas óptimas para la capa inferior. Mientras que en la capa inferior, un algoritmo de scheduling se ha sido utilizado para traducir el flujo continuo en una secuencia discreta de operación de control (ON-OFF) para las estaciones de bombeo garantizando que se bombea la misma cantidad de agua que la determinada en la capa superior. Los parámetros de ajuste de dicho algoritmo son el periodo de muestreo de control de la capa inferior y el número de bombas en paralelo en la estación de bombeo. Palabras clave: redes regionales de agua potable, redes de distribución de agua potable, MPC multicapa, coordinación, DWNs, CSP, NAM, Epanet, el esquema no lineal MPC, PLIO, programación. xiv 摘要 水對人類有著無可取代的重要意義, 複雜供水網絡（包括區域供水網絡和配送網絡）的 控制已經成為一項重要的研究課題。 按照功能結構，區域供水網絡可被劃分為供應、 運輸和配送三層。 區域供水網絡的優化主要致力於從全局角度控制供水系統。 在配 送網絡內部， 鑑於其多輸入輸出的複雜性，參數的不確定性，飲用水網絡的優化變得 異常困難。除此以外，飲用水網絡所包含的確定性和隨機性以及其分別所涉及的線性 （水流模型）和非線性（水壓模型）模型，增加了在可接受時間內產生足夠精確和可 靠的解決方案的難度。在傳統的配送水網中，水泵抽水是能源消耗的主要部分，針對 不同的泵站組合，生成一組包含不同水泵工作調度的優化策略，將會大幅度提高泵站 工作效率，並降低操作成本。 模型預測控制是一種針對大型網絡行之有效的先進的控制方法，並已成功應用於飲 用水網絡的水流模型優化控制中。近期文獻顯示，學術界和工業界開始對多層模型預 測控制產生新的興趣。尤其針對由多個不同時域和控制目標的子系統組成的，類似區 域供水網絡這類複雜系統。針對類似複雜網絡，一種有效的方法是將整體目標，按照 採樣時間和控制目標的不同，分配成不同的子任務，並在不同子任務區間採用特定時 域的專用控制器。 本文按照不同層具有不同時間尺度和控制目標的獨立控制器的思路，為複雜區域供 水網絡設計多層模型預測控制器。每一層均由獨立的模型預測控制優化控制。針對不 同層（供應層和運輸層）控制器之間的協調問題，提出了基於時間的雙層協調控制模 型。為了讓仿真模型更好的模擬控制器的複雜動態，採用集成的仿真優化建模方法實 現實時模擬，並與優化控制器反饋交互。 文章第二部分致力於設計結合約束滿足問題的線性模型預測控制，用以優化飲用水 網絡中的非線性操作控制。該方法被劃分為兩個功能層：首先採用約束滿足問題將飲 用水網絡中的非線性壓力方程轉化為線性約束，以包含非線性液壓優化過程中的可行 解集合。網絡聚合方法被用於將雙向網絡簡化概念化為適合約束滿足問題的單向簡化 模型。此後，增加了線性約束的線性模型預測控製針對控制目標產生最優控制策略。 Epanet用來仿真模擬真實網絡， 非線性模型預測控制工具PLIO用來驗證該方法的可行 性。 針對分配網絡泵站的雙層調度方案也在文章的第二部分介紹。調度方法的上層用於 在一小時的採樣時間中，用模型預測控制為下層產生連續的定點流量。調度的下層， 將連續定點流量轉換為控制泵站不同水泵開/關的離散操作序列。下層泵站在工作時間 需產生與上層定點流量一致的水流。這一算法的調諧參數是下層控制的採樣週期和並 聯泵的數目。 關 鍵 詞: 複雜區域供水系統、 多層模型預測控制、 協調、 飲用水網絡、 約束滿足 問題、 網絡聚合方法、 Epanet、 非線性模型預測控制、 PLIO、 調度模型。 xvi Vitae Congcong SUN was born on April 04 of 1986, in Xinxiang, Henan, P.R. China. She has received her Bachelor degree of Computer Science and Technology from Nanjing Audit University(NAU), Nanjing, Jiangsu, P.R.China, in June of 2008, and later on, obtained her Master degree on Systems Engineering from Tongji University(TJU), Shanghai, P.R.China, in March of 2011. She is currently a Ph.D. candidate in Automatic Control at the Institut de Robòtica i Informàtica Industrial (CSIC-UPC), Technical University of Catalonia (UPC), Barcelona, Catalonia, Spain. xviii Contents I Preliminaries 7 1 Introduction 9 1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.2 Water Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.3 2 1.2.1 Brief Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.2.2 Hierarchical Definition . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.2.3 Elements of a Water Network . . . . . . . . . . . . . . . . . . . . . . 13 Model Predictive Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.3.1 MPC Application in Industrial Control . . . . . . . . . . . . . . . . . 18 1.3.2 History of MPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.3.3 Renewed Interest of Multi-layer MPC . . . . . . . . . . . . . . . . . . 20 1.4 EFFINET Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.5 Thesis Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 1.6 Outline of Thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Background and Modelling 2.1 2.2 2.3 26 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.1.1 Model Predictive Control . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.1.2 Multi-layer MPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.1.3 MPC in Water Networks . . . . . . . . . . . . . . . . . . . . . . . . . 32 Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.2.1 Flow Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.2.2 Pressure Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 xx CONTENTS II 3 Regional Water Networks MPC Control using Temporal Multi-level Coordination Techniques Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.2 Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 3.2.1 State Space Model of Supply Layer . . . . . . . . . . . . . . . . . . . 43 3.2.2 State Space Model of Transportation Layer . . . . . . . . . . . . . . . 46 3.2.3 Operational Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.2.4 Formulation of the optimization problem . . . . . . . . . . . . . . . . 48 Temporal Multi-layer MPC Scheme . . . . . . . . . . . . . . . . . . . . . . . 49 3.3.1 3.4 3.5 3.6 3.7 3.8 3.9 Temporal Multi-layer Coordination Techniques . . . . . . . . . . . . . 49 Formulation of the Temporal Multi-layer MPC Scheme . . . . . . . . . . . . . 56 3.4.1 Formulation of Temporal Coordination Problem . . . . . . . . . . . . . 56 3.4.2 Formulation for Predicting the Water Demand . . . . . . . . . . . . . . 56 Case Study: Catalunya Regional Water Network . . . . . . . . . . . . . . . . . 58 3.5.1 4 41 3.1 3.3 III 39 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Results of Temporal MPC Control Scheme . . . . . . . . . . . . . . . . . . . . 59 3.6.1 Supply Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 3.6.2 Transportation Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.6.3 Coordination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Integrated Simulation and Optimization Scheme . . . . . . . . . . . . . . . . . 66 3.7.1 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 3.7.2 Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 3.7.3 Integration scheme of Simulator and Controller . . . . . . . . . . . . . 68 Results of Integrated Optimization and Simulation . . . . . . . . . . . . . . . . 70 3.8.1 Simulation Scheme of the Catalunya Regional Water Network . . . . . 70 3.8.2 Result of the Integrated Scheme . . . . . . . . . . . . . . . . . . . . . 71 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Distribution Water Networks 75 Combining Constraints Satisfaction Problem and MPC for the Operational Control of Water Networks 77 xxi CONTENTS 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 4.2 Operational Control Problem Statement . . . . . . . . . . . . . . . . . . . . . 79 4.3 4.4 4.5 4.2.1 MPC for Flow Control . . . . . . . . . . . . . . . . . . . . . . . . . . 79 4.2.2 Nodal Model for Pressure Management . . . . . . . . . . . . . . . . . 80 4.2.3 MPC for Pressure Management . . . . . . . . . . . . . . . . . . . . . 81 Proposed Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 4.3.1 Overview of Scheme CSP-MPC . . . . . . . . . . . . . . . . . . . . . 82 4.3.2 Definition of CSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.3.3 CSP-MPC Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 4.3.4 Modelling Uncertainty . . . . . . . . . . . . . . . . . . . . . . . . . . 85 4.3.5 Simulation of the proposed approach . . . . . . . . . . . . . . . . . . 85 Illustrative Example: Richmond Water Network . . . . . . . . . . . . . . . . . 86 4.4.1 Description of Richmond Water Network . . . . . . . . . . . . . . . . 86 4.4.2 CSP for different configurations . . . . . . . . . . . . . . . . . . . . . 87 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 4.5.1 Results of CSP-MPC . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 4.5.2 Results of Modelling Uncertainty . . . . . . . . . . . . . . . . . . . . 92 4.6 Comparison with Nonlinear MPC . . . . . . . . . . . . . . . . . . . . . . . . 92 4.7 Comparison with other approaches . . . . . . . . . . . . . . . . . . . . . . . . 96 4.8 Application Limitations of CSP-MPC in DWNs . . . . . . . . . . . . . . . . . 96 4.8.1 4.9 Network Aggregation Method (NAM) . . . . . . . . . . . . . . . . . . 97 Application Example: D-Town Water Network . . . . . . . . . . . . . . . . . 98 4.9.1 Description of D-Town Network . . . . . . . . . . . . . . . . . . . . . 98 4.9.2 Results of NAM for D-Town . . . . . . . . . . . . . . . . . . . . . . . 99 4.9.3 Results of CSP-MPC for D-Town . . . . . . . . . . . . . . . . . . . . 99 4.9.4 Comparison with other Approaches . . . . . . . . . . . . . . . . . . . 102 4.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 5 Two-layer Scheduling Scheme for Pump Stations 104 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 5.2 Presentation of the Two-layer Control Scheme . . . . . . . . . . . . . . . . . . 106 5.2.1 Optimizing Flow at the Upper layer . . . . . . . . . . . . . . . . . . . 108 5.2.2 Pump scheduling of the Lower layer . . . . . . . . . . . . . . . . . . . 108 xxii CONTENTS 5.3 6 V 5.3.1 Time interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 5.3.2 Parallel pump configuration . . . . . . . . . . . . . . . . . . . . . . . 110 5.4 Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 5.5 Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 5.6 IV Factors Affect Scheduling Algorithms . . . . . . . . . . . . . . . . . . . . . . 109 5.5.1 Results for the upper layer MPC controller . . . . . . . . . . . . . . . 112 5.5.2 Results for the lower layer scheduling algorithm . . . . . . . . . . . . 112 5.5.3 Scheduling Results using Different ∆tk 5.5.4 Scheduling Results for Different Pump Configurations . . . . . . . . . 113 . . . . . . . . . . . . . . . . . 112 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Concluding Remarks and Future Work Conclusions and Future Work 116 118 6.1 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 6.2 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 6.3 Future Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Appendix 122 A Algorithm of Demand Forecast 124 A.1 Daily demand forecast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 A.2 Hourly demand forecast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 xxiii CONTENTS Notations x(k) u(k) y(k) d(k) Hp x(0) e xmin e xmax umin umax (k, l, m) P(x) Ts V Vi Vi qu qu i qu i qin qout qups qdns τd s u W, M, N Ri j Gi j S eci Ei ε(k) xer εex W a1 a2 c State vector at time step k Vector of command variables Vector of the measured output Disturbances correspond to demands Prediction horizon Initial condition of the state vector Minimal limitations of reservoirs Maximal limitations of reservoirs Minimal constraints on inputs variables Maximal constraints on inputs variables Time scale point of current month/week/day A logical predicate Sampling time Stored volume Maximal storage capacity of water tank Minimum storage capacity of water tank Manipulated flows through actuators Maximum flow capacity Minimum flow capacity Inflow of nodes Outflow of nodes Flow of upstream Flow of downstream The delayed value Pump speed Number of pumps that are turned on Pump specific coefficients Pipe conductivity Control variable of valve from 0 (closed) to 1 (open) Cross-sectional area of the tank Tank elevation Slack variables for unsatisfied demands Water safety level The slack to xer Related weights which decide the priorities Cost of water treatment Cost of pumping Constant value produced by vector calculation 1 CONTENTS h hr q G(q) V D C ∆e ρ ũ(k) popt Jdis Heads of junction nodes Heads of reservoir/tank nodes Branch flows Flow-head relationship functions A finite set of variables Domains set of variables Finite set of variable constraints Demand uncertainty Density of water Nominal pump flows Optimal working schedule for the pump Optimal scheduling accuracy 2 CONTENTS Acronyms DWNs MPC CSP NAM FEW VSP FSP PID RTC SCADA ICT GIS LQR QP LTP MTP LTP STP USACE DSHW-GP NLP GA HGA ACO PSP DMPC Drinking Water Networks Model Predictive Control Constraint Satisfaction Problem Network Aggregation Method Food, Energy, Water organization Variable Speed Pumps Fixed Speed Pumps Proportional Integral Derivative Real Time Control Supervisory Control And Data Acquisition Information and Communications Technologies Geographical Information System Linear Quadratic Regulator Quadratic Programming Long-Term Problem Medium-Term Problem Long-Term Problem Short-Term Problem U.S. Army Corps of Engineers Double-Seasonal Holt-Winters Gaussian Process Nonlinear Optimization Problem Genetic Algorithm Hybrid Genetic Algorithm Ant Colony Optimization Pump Scheduling Problem Decentralized Model Predictive Control 3 CONTENTS List of Figures Figure 1.1 Figure 1.2 Figure 1.3 Figure 1.4 Figure 1.5 Figure 1.6 Figure 1.7 Figure 1.8 Figure 2.1 Figure 2.2 Figure 3.1 Figure 3.2 Figure 3.3 Figure 3.4 Figure 3.5 Figure 3.6 Figure 3.7 Figure 3.8 Figure 3.9 Figure 3.10 Figure 3.11 Figure 3.12 Figure 3.13 Figure 3.14 Figure 3.15 Figure 3.16 Figure 3.17 Figure 3.18 Figure 3.19 Figure 4.1 Figure 4.2 Figure 4.3 Figure 4.4 Figure 4.5 Figure 4.6 Figure 4.7 Figure 4.8 Figure 4.9 Distribution of Earth’s Water Projected Water Scarcity in 2025 Circle of water use Aggregate diagram of Catalunya Regional Water Network Aggregate transportation layer of Catalunya Regional Water Network Distribution layer of Catalunya Regional Water Network General components of a water network Water reservoir and tank Temporal hierarchy Spatial hierarchy Temporal hierarchical coordinating structure A hypothetical network system Upper and Lower layer optimizations of multi-layer MPC Droughts periods in the Catalunya Regional Water Network River flow and ecological level before/after ecological control of Llobregat Transportation network Pump flow with electricity price Water level of Dep − Masqueta Tank level before/after safety control starts 01/08/2011 Flows before temporal coordination with x-time and y-flow axis Flows after temporal coordination with x-time and y-flow axis Source flows between Multi-layer and Centralized MPC Feedback structure of Simulation and Optimization Main window of simulator Integration of optimization and simulation blocks Simulation network scheme of Catalunya Regional Case Study Volumes achieved by optimizer the integrated scheme Demand satisfaction and node balance Goal comparisons achieved by optimizer and integrated scheme The multi-layer control scheme Working principle of CSP-MPC Simulating CSP-MPC using Epanet The Richmond water distribution system in Epanet Valve Demand configuration Pump Demand configuration Node connected to a complex demand Comparison between tank penalty by CSP and its volume evolution Comparison between pump flow and its electricity price 4 CONTENTS Figure 4.10 Figure 4.11 Figure 4.12 Figure 4.13 Figure 4.14 Figure 4.15 Figure 4.16 Figure 4.17 Figure 4.18 Figure 4.19 Figure 4.20 Figure 4.21 Figure 4.22 Figure 5.1 Figure 5.2 Figure 5.3 Figure 5.4 Figure 5.5 Domains of demand-5 Water penalty level comparisons of calibration of tank D The PLIO model of Richmond water distribution network Comparison of water evolution in tank between CSP-MPC and non-linear MPC Comparison of pump flow between CSP-MPC and Non-linear MPC Comparison of demand node pressure between CSP-MPC and Non-linear MPC Node topology example used to illustrate NAM Network conceptualization Original D-Town network Simplified D-Town network Conceptual D-Town network Comparison of tank volume and the safety volume by CSP-MPC Comparison between pump flow and its electricity price Presentation of the proposed approach Two-layer Control Scheme Optimal Schedule for Pump4B with two pump branches Flow errors in different time intervals Flow errors in different parallel when ∆tk = 1 5 CONTENTS List of Tables Table 3.1 Table 3.2 Table 3.3 Table 4.1 Table 5.1 Table 5.2 Node-Arc Incidence Matrix for the Network of Figure 3.2 Balancing comparison of Scenarios 3 Closed-loop performance results (all values in e.u.) Compar. betw. non-linear MPC and CSP-MPC Accuracy Comparisons of different time interval Accuracy Comparisons of different branches 6 Part I Preliminaries 7 Chapter 1 Introduction In this thesis, multi-layer MPC management architecture for complex water systems (including both regional and distribution networks) is proposed. Motivation, brief introductions, objectives and outline of this thesis are provided in different sections of this chapter. 1.1 Motivation Water is a critical resource for supporting human activities and ecosystem conservation. As reported by FEW (Food, Energy, Water organization): there are both supplyside and demand-side threats to water necessary to meet human needs. One supplyside threat arises in cases in which we are withdrawing freshwater from water surface sources and groundwater aquifers at rates faster than replenishment or recharge. Another supply-side problem is that even if there is enough water, it is not good enough to meet human needs; much of the world’s fresh water is being degraded. One of the more frequently cited statistics in discussion of water availability presented in Figure 1.1 shows is the fact that only around 2.5% of the Earth’s water is freshwater. Of the 2.5% of freshwater available for the support of human life, agriculture, and most forms of non-ocean life, 30.1% is groundwater which is stored deep beneath and is nonrenewable. The demand-side concern arises from the following facts: • An increasing number of people on the planet, high-demand users sometimes are geographically concentrated in regions that cannot sustain demand levels. • Technologies that waste more water than alternative technologies and demand is often insufficiently restrained because of inadequate price mechanisms and outdated legal rules that set few limits on excessive use. 9 1.1 Motivation Figure 1.1: Distribution of Earth’s Water • Negative impacts of climate changes are likely to give rise to uncertainties in water availability and water demands, which may result in major economical and ecological consequences. Figure 1.2 shows water scarcity problems could happen in 2025, which means since the year of 2025, nearly half of places in the world will have a large number of people that can not have access to safe and affordable water to satisfy her or his needs for drinking, washing or their livelihood. "Water is the new oil" has shown the importance and criticality of water. With the limited water supplies, conservation and sustainable policies, as well as the infrastructure complexity for meeting consumer demands with appropriate flow, pressure and quality levels make water management a challenging problem with increasing concern. This situation indicates the need for the optimal operation of water distribution networks, especially during shortage events as discussed in [87] and [118]. [98] presented a discussion of uncertainty paradigms in water resources, and provided his views on water management tools that can be used in the future. Decision support systems provide useful guidance for operators in complex networks, where actions for best resource management are not intuitive [80]. Management of water systems involves objectives such as minimizing operational costs of pumps (which represents a significant fraction of the total expenditure as discussed in [77]), minimizing pressure, risks and safety goals (as explained in [68]). Optimization and optimal control techniques provide an important contribution to strategy computing in water systems management for efficient use of resources. Similarly, the 10 1.2 Water Networks Figure 1.2: Projected Water Scarcity in 2025 problems related to modelling and control of water supply and distribution have been the object of important research efforts in the last few years as discussed in [22, 37]. 1.2 Water Networks 1.2.1 Brief Description Water is the main raw material used by our civilization. Actually, the water cycle is considered to contain the following three processes (see Figure 1.3): • Water production: water treatment process to produce the drinking water; • Water collection: water storage process like urban drainage, etc.; • Water treatment: treat wasted water before releasing to the environment; The main objectives of this research are the water supply, transportation and distribution systems appeared in the first two processes in the water circulation. Water supply systems can be considered as part of the environment. They consist of a number of huge reservoirs, together with the rivers on which they are built. Their basic functions are to ensure the continuity of water supplies, in spite of seasonal fluctuations in water availability, and to protect against flood. The dynamic of the systems 11 1.2 Water Networks Figure 1.3: Cycle of water use are measured in months, and the time horizon for control decisions can be measured in years. The development of river-based projects is especially important in areas that are susceptible to drought. A water transportation/distribution system supplies clean water to industrial and domestic users. Water is taken from rivers, retention reservoirs (surface resources) or from boreholes (underground resources). Then, it is purified in treatment works using physical and chemical processes. The clean water is stored in tanks, after which it is pumped into a network of pipes. A distribution system can be classified as a grid system, a branching system or a combination of these. The grid system has the advantage that any point can be furnished from at least two sources. Water is transported along pipes under gravity, or by booster pumps. The service reservoirs comprise a vital part of water distribution system. Buffer storage is necessary to meet widely fluctuating demands and to equalize operating processes. Reservoirs are often located on natural heights or man-made towers in order to maintain pressure throughout their neighborhood network. The appropriate storage policy is a key issue for operational control; and water can be stored in reservoirs during periods of cheap electricity (off-peak hours) and can augment supplies during peak hours [80]. 1.2.2 Hierarchical Definition As discussed in sections above, a complex regional water system can be structurally organized in three layers considering different control objectives and time scales [92]: • Supply layer, which is the upper layer, composed of water sources, large reservoirs and also natural aquifers, rivers, wells, etc. 12 1.2 Water Networks • Transportation layer, the middle layer, linking water treatment and desalinization plants with reservoirs distributed all over the city. • Distribution layer, which is the lower layer, used for meeting consumer demands. Figure 1.4 is an aggregated diagram of the Catalunya Regional Water Network, which is one of the case studies of this work with more detailed description in the later chapter. According to definitions of different layers, the rivers lie on the two sides of this network together with their related elements form the supply layer. On the other hand, the center part as presented in Figure 1.5, which simplifies the supply layer as two water sources, is the aggregated transportation layer. The distribution layer, which corresponds to the demand elements (in dark blue color) in the network, is represented as a consumer demand as shown in Figure 1.6. Each of the layers in a regional water network have their specific characteristics and should be operated at different time scales because of the different dynamics they present according to their specific objectives. In general, these layers are often operated separately as independent units. Therefore, an advanced coordinated operation between different layers in a regional network is worth to be proposed. Inside the transportation and distribution layers, non-linear equations of pressure model appear which imply high computation power when large complex networks are considered. The need of solving the mix-integer problems appears in pump station scheduling. Besides, hydraulic model simulations, illustrative examples and also realistic applications have been applied as case studies. 1.2.3 Elements of a Water Network Water networks are generally composed of a big number of interconnected pipes, rivers, reservoirs, pumps, valves and other hydraulic elements which carry water to demand nodes from the supply areas, with specific pressure levels to provide a proper service to consumers. Additionally, the hydraulics involved differ considerably from one to another. In particular, between large, spatially distributed open channel areas and pressurized water sections with distribution to consumers. In many water systems, network operation is carried out based on heuristic approaches, operator judgment, etc., which may be very complex and not efficient in large-scale interconnected systems (Figure 1.7). 1.2.3.1 Sources. There are two kinds of water sources: surface water sources and underground resources. Surface water comes from a stream, river, lake, wetland, or ocean. The alternative is underground resources. In general, 35% of the public demand is covered 13 1.2 Water Networks Water Network of ACA-ATLL Apo_Guardiola Tra_Llobregat_1 Nud_Canal_Berga_1 Apo_Peguera Tra_Llobregat_2 Apo_Vilada_Cal_Tatxero Nud_Peguera Tra_Canal_Berga_1 Apo_Vilada_Sant_Miquel Tra_Peguera Tra_Merdancol_1 Tra_Llobregat_3 Nud_Merdancol Tra_Merdancol_2 Tra_Vilada Nud_Vilada Tra_Llobregat_4 Emb_La_Baells Tra_Llobregat_6 Nud_Berga_1 Nud_Canal_Berga_2 Apo_Llosa_Cavall Tra_Canal_Berga_4 Tra_Canal_Berga_3 Tra_Cardener_1 Tra_Llobregat_7 Dem_Berga Apo_Merles Emb_Llosa_Cavall_Sant_Ponc Tra_Merles Nud_Merles Apo_Naves Nud_Manresa_ETAPs Tra_Manresa_Sequia_1 Tra_Cardener_3 Tra_Llobregat_9 Nud_Manresa_Sequia_1 Tra_Naves Apo_Sau Apo_Major Nud_Naves Tra_Manresa Tra_Llobregat_10 Apo_Gabarresa Tra_Ter_1 Dem_Manresa Tra_Cardener_5 Tra_Major Tra_Gabarresa Nud_Cardona Emb_Sau_Susqueda Dem_Cardona Tra_Manresa_Sequia_3 Tra_Cardona Nud_Gabarresa Apo_Calders Tra_Ter_5 Tra_Llobregat_12 Dem_C250 Nud_Calders Tra_Aq_Ter_1 Con_C250_6 Tra_Calders Nud_Aq_Ter_1 Bom_SQRDC Tra_Llobregat_13 Con_C250_8 Con_C250_7 Tra_Ter_6 Dep_C250 Nud_Cardener Nud_C250_3 Tra_Pardina Dem_Pardina Con_C250_9 Emb_Pasteral Con_C250_10 Tra_Cardener_6 ETAP_Cardedeu Nud_C250_5 Tra_Llobregat_14 Con_C250_5 Dem_Cardedeu Nud_C250_4 Con_C250_11 Tra_Ter_7 Con_Dem_Cardedeu Con_Trinitat_1 Con_Can_Collet_1 Nud_C250_2 Dem_Abrera Tra_Terrassa Nud_Mina_Terrassa Dem_Montfulla Con_Dem_Abrera Tra_Ter_9 Apo_Osor Con_Trinitat_3 Tra_Osor Con_Can_Collet_2 Bom_C250_1 ETAP_Abrera Nud_Cellera_Ter Bom_Can_Collet Con_C250_3 Dem_Mina_Terrassa Con_C250_4 Tra_Llobregat_17 Tra_Montfulla Con_Trinitat_2 Bom_Trinitat Nud_Trinitat Con_C250_2 Nud_Abrera Tra_Abrera_1 Dep_Can_Collet Con_C250_1 Nud_C250_1 Tra_Bescano_3 Nud_Vilanna_1 Con_Trinitat_6 Con_Trinitat_7 Tra_Llobregat_18 Con_Masquefa_1 Nud_Osor Tra_Ter_10 Nud_Bescano Tra_Bescano_1 Con_Trinitat_4 Con_Can_Collet_3 Con_Fontsanta_1 Dem_Bescano Dem_Monar_Reg Tra_Ter_11 Con_Masquefa_2 Dem_Masquefa Dep_Masquefa Dep_Trinitat_200 Con_Fontsanta_4 Con_Masquefa_3 Bom_Masquefa Apo_Martorell Tra_Anoia_1 Nud_Salt Tra_Monar_1 Con_Trinitat_8 Nud_Fontsanta_1 Con_Garraf_1 Dem_Can_Collet Nud_Monar_1 Tra_Monar_2 Tra_Monar_3 Bom_Fontsanta Dep_Trinitat Con_Fontsanta_2 Tra_Anoia_2 Dep_Garraf Ali_Anoia Tra_Anoia_3 Con_Garraf_2 Tra_Monar_4 Ali_Monar Con_Fontsanta_3 Nud_Anoia_1 Dem_Garraf Tra_Ter_12 Tra_Bescano_4 Dem_Trinitat_200 Con_Trinitat_5 Apo_Rubi Apo_Estimada_1 Nud_Guell_2 Dem_Trinitat Tra_Ter_13 Dep_Fontsanta Tra_Llobregat_20 Tra_Rubi_1 Tra_Rubi_2 Tra_Estimada_1 Con_Fontsanta_5 Ali_Rubi_1 Nud_Girona_Estimada Tra_Monar_5 Nud_Papiol Dem_Fontsanta Tra_Llobregat_21 Tra_Rubi_3 Tra_Ter_14 Con_ITAM_Llobregat_2 Apo_EDAR_Prat Apo_Girona_Onyar Bom_ITAM_Llobregat Tra_Dreta_3 Tra_Girona_2 Tra_Girona_1 Nud_Girona Tra_Dreta_2 Con_ITAM_Llobregat_1 Nud_Papiol_Autopista Dem_Canal_Dreta Nud_Canal_Dreta_2 Tra_Dreta_1 Nud_Girona_Monar Nud_Canal_Dreta_1 Tra_Ter_16 Apo_EDAR_Girona ITAM_Llobregat Tra_Rubi_5 Nud_Infanta Tra_Girona_3 Nud_ETAP_Girona Tra_Canal_Infanta Tra_Rubi_6 Tra_Llobregat_22 Tra_Ter_18 Dem_Canal_Infanta Nud_Vinyals_1 Dem_Vinyals Tra_Julia_Ramis Dem_Julia_Ramis Tra_Vinyals_1 Tra_Rubi_7 Apo_Estimada_2 Tra_Ter_19 Nud_Tub_Governador_2 Tra_Estimada_2 Nud_Tub_Governador_1 Tra_Llobregat_25 Nud_Bordils_2 Tra_Sant_Joan_Despi Tra_Ter_20 Nud_Sant_Joan_Despi Dem_Sant_Joan_Despi Nud_Colomers Tra_Sentmenat Tra_Llobregat_26 Tra_Rubi_8 Legend Nud_Autopista Tra_Ter_21 Dem_Moli_Pals Dem_Sentmenat Nud_Moli_Pals Tra_Moli_Pals Tra_Llobregat_27 Water Contribution Stretch of River Junction Knot Pressure Driving Reservoir Water Outlet Spillway Tra_Ter_22 Sal_Llobregat Deposit Demand Pump ETAP ITAM 14 Figure 1.4: Aggregate diagram of Catalunya Regional Water Network Sal_Ter 1.2 Water Networks Dem_C250 Con_C250_7 Con_C250_6 Bom_SQRDC Con_C250_8 Dep_C250 Nud_C250_3 Con_C250_9 Con_C250_10 ETAP_Cardedeu Nud_C250_5 Con_C250_5 Dem_Cardedeu Nud_C250_4 Con_C250_11 Con_Trinitat_1 Con_Dem_Cardedeu Con_Can_Collet_1 Nud_C250_2 Dem_Abrera Con_Trinitat_2 Bom_Can_Collet Con_C250_3 Con_Trinitat_3 Con_C250_4 Con_Dem_Abrera Con_Can_Collet_2 Bom_C250_1 ETAP_Abrera Bom_Trinitat Nud_Trinitat Con_C250_2 Dep_Can_Collet Con_C250_1 Nud_C250_1 Con_Trinitat_6 Con_Trinitat_7 Con_Trinitat_4 Con_Can_Collet_3 Con_Fontsanta_1 Dem_Masquefa Dep_Masquefa Con_Masquefa_3 Dep_Trinitat_200 Con_Fontsanta_4 Dem_Can_Collet Bom_Masquefa Bom_Fontsanta Con_Fontsanta_2 Dem_Garraf Dep_Garraf Dep_Trinitat Con_Fontsanta_3 Con_Trinitat_5 Dep_Fontsanta Con_Garraf_2 Dem_Trinitat Con_ITAM_Llobregat_2 Con_Trinitat_8 Bom_ITAM_Llobregat Con_Fontsanta_5 Con_ITAM_Llobregat_1 ITAM_Llobregat Con_Dem_SJD Node13 Node14 Tra_Monar_5 Dem_SJD Con_Isjdsub ISJDSub Figure 1.5: Aggregate transportation layer of Catalunya Regional Water Network Figure 1.6: Distribution layer of Catalunya Regional Water Network 15 1.2 Water Networks Figure 1.7: General components of a water network (a) Reservoir (b) Tank Figure 1.8: Water reservoir and tank. by underground water [75]. The disadvantage of underground water is that it must be pumped out, but on the other hand it does not need much treatment like surface water and has stable physical and chemical properties. 1.2.3.2 Reservoirs and Tanks. Reservoir storage enhances flexibility of system and provides supplies for random fluctuations in demand. As in Figure 1.8, reservoirs always have great capacity including the natural dams and tanks. Because of that, they can also allow shift in periods of heavy pumping and high demands in order to reduce pumping costs. Tanks have an equally important function to sustain pressure in a neighborhood network. Storage capacity can vary from single megalitres for water tower tanks to hundred of megalitres for ground level reservoirs. The relationship between reservoir depth and its volume can be proportional but when the area of a cross-section varies, 16 1.2 Water Networks this relationship is more complicated [80]. Dynamic relations and equations will be provided in Chapter 2. 1.2.3.3 Pipes. Pipes convey water from sources to users. They operate under pressure to provide service to elevated locations. Physically, a pipe sector constitutes an analogue to electrical resistance, described by head drop versus flow characteristic. The point of connection between several pipes are called nodes of the network. There are other nodes where reservoir or water demands are located. 1.2.3.4 Pumps. Pumps are active elements of water network, boosting water to a required elevation or extracting from underground sources. Centrifugal pumps are the most widely used, where energy is supplied externally by electrical motors, and changes into the mechanical energy of water. From the hydraulic point of view, the pump is described by a head increase versus flow characteristic [46]. There are two basic type of pumps: variable speed pumps (VSP), in which the speed of an electrical motor can be changed by means of external control signals; and fixed speed pumps (FSP), with speed fixed at a constant value. The latter are in wider use, while in this thesis, VSP is used. In the case of VSP, there are two control factors, speed, which can change continuously; and pump configuration, which is a discrete variable [80]. 1.2.3.5 Valves. Flows between different parts of the network are controlled by valves. The valve can control both flow and pressure, or even network structure, thus providing flexibility in daily system operation by closing some routes and opening others. Pressure reducing valves adjust pressure to control elements to distribute water between different parts of the network as required by operational conditions [80]. Generally, in most water systems, the actuators, namely valves, turbines, pumps, gates and retention devices, are locally controlled (using simple control laws such as proportional integral derivative controller-PID), i.e., they are controlled by a remote station according to the measurements of sensors connected only to that station. However, a global real-time control (RTC) system, through the use of an operational model of the system dynamics can compute, ahead in time, optimal control strategies for the actuators based on the current state of the system provided by supervisory control and data acquisition (SCADA) sensors, the current disturbance measurements and appro- 17 1.3 Model Predictive Control priate demand predictions. The computation of an optimal global control law should take into account all the physical and operational constraints of the dynamical system, producing set-points which allow certain control objectives to be achieved. Decision support systems, which are based on mathematical network and operational models, may efficiently contribute to the optimal management of water networks by computing control strategies ahead in time, which optimize management goals. Thus, within the field of control of complex water systems, there exists a suitable strategy, which fits with the particular issues of such systems. This strategy is known as Model-based Predictive Control (or simply Model Predictive Control - MPC), which more than a control technique, is a set of control methodologies that use a mathematical model of the considered system to obtain a control signal minimizing a cost function related to selected indexes of the system performance as detailed explained in the following section. 1.3 Model Predictive Control Complex regional networks present control theory with new challenges due to its complex topology and large size as discussed in [78, 116]. The goal that control methods have to achieve for this kind of systems is to obtain a feasible solution with reasonable effort in modelling, designing and controller implementation. 1.3.1 MPC Application in Industrial Control Model Predictive Control (MPC) has been proven to be one of the most effective and accepted control strategies for the global optimal operational control of large-scale water networks in [93]. Applications to different large-scale infrastructures as drinking water networks in [80], sewer networks in [83], open-flow channel networks in [97] or electrical networks in [91] prove the advantages of this technique. One of the main reasons for its success is that once the plant dynamical model has been obtained, the MPC design consists in expressing the desired performance specifications through different control objectives (e.g., weights on tracking errors and actuator efforts as in classical linear quadratic regulation), and constraints on system variables (e.g., minima/maxima of selected process variables and/or their rates of change) which are necessary to ensure process safety and asset health. The rest of the MPC design is straightforward: the given model, constraints and weights define an optimal control problem over a finite time horizon in the future (for this reason the approach is called predictive). This is translated into an equivalent optimization problem and solved on line to obtain an optimal sequence of future control actions. Only the first of these actions is applied to the process, as at the next time step a new optimal control problem is solved, to exploit the information coming from fresh new measurements. In this way, an open-loop design 18 1.3 Model Predictive Control methodology (i.e., optimal control) is transformed into a feedback one. Nevertheless, the main hurdle for MPC control, as any other control technique, when applied to large-scale networks in a centralized way, is the non-scalability. The reason is that a huge control model is required along with the need of being rebuilt on every change in the system configuration as, for example, when some part of the network should be stopped because of maintenance actions or malfunctions. Subsequently, a model change would require re-tuning the centralized controller. It is obvious that the cost of setting up and maintaining the monolithic solution of the control problem is prohibitive. [19, 105] describes preliminary results of applying MPC techniques for flow management on a representative model of the Barcelona Drinking Water Network. [63] implements a centralized MPC of the complete network taking into account the economical cost in the function cost, but with difficulties of computing time, because of the size and complexity of the network. A way of circumventing these issues might be by looking into distributed techniques, where networked local MPC controllers are in charge of controlling each layer of the entire system as applied in [16, 80]. 1.3.2 History of MPC Various techniques have been developed for the design of model based control systems for robust multi-variable control of industrial unit processes since 1970 [13, 32, 33, 39, 55]. Predictive control was pioneered simultaneously by [33]. The first implemented algorithms and successful applications were reported in the referenced papers. MPC technology has evolved from a basic multi-variable process control technology to a technology that enables operation of processes within well defined operating constraints [6, 10, 106]. The main reasons for increasing acceptance of MPC technology by the process industry since 1985 are clear: • MPC is a model based controller design procedure, which can easily handle processes with large time-delays, non-minimum phase and unstable processes. • It is an easy-to-tune method, with very few parameters to be tuned. • Industrial processes have their limitations in valve capacity, technological requirements and are supposed to deliver output products with some pre-specified quality specifications. MPC can handle these constraints in a systematic way during the design and implementation of the controller. • Finally, MPC can handle structural changes, such as sensor and actuator failures, changes in system parameters and system structure by adapting the control strategy on a sample-by-sample basis. 19 1.4 EFFINET Project However, the main reasons for its popularity are the constraint-handling capabilities. As all controller design methodologies, MPC also has its drawbacks: • A detailed process model is required. This means that either one must have a good insight in physical behavior of the plant or system identification methods have to be applied to obtain a good model. • The methodology is open, and many variations have led to a large number of MPC methods. • Although, in practice, stability and robustness are easily obtained by accurate tuning, theoretical analysis of stability and robustness properties are difficult to derive [130]. 1.3.3 Renewed Interest of Multi-layer MPC In recent literature, there is a renewed interest in multi-layer MPC either from industrial practice and academia as described in [114, 123]. Many works have also been recently published in this area; see, e.g., [42, 67, 111, 133]. This is specially the case when a system is composed of subsystems with multiple time scales as in the case of the regional water networks. A straightforward task of designing and implementing a single centralized control unit is too difficult as discussed in [14], because the required long prediction horizon and short control time steps might lead to an optimization problem of very high dimension and under large uncertainty radius. A way to cope with this problem is to apply a hierarchical control structure based on decomposing the original control task into a sequence of different, simpler and hierarchically structured subtasks, handled by dedicated control layers operating at different time scales as provide in [16]. 1.4 EFFINET Project The work presented in this thesis is related to the project Efficient Integrated Real-time Monitoring and Control of Drinking Water Networks (EFFINET) which is funded by the European Commission and collaborated by different companies and research groups in order to largely improve the efficiency of drinking water networks in terms of water use, energy consumption, water loss minimization, and water quality guarantees by proposing a novel integrated water resource management system based on advanced ICT (Information and Communications Technologies) technologies of automation and telecommunications. The proposed water management system, which is linked to SCADA and Geographical Information System (GIS) systems, integrates the following three main modules: 20 1.4 EFFINET Project • a decision-support module for real-time optimal control of the water transport network, operating the main flow and pressure actuators and intermediate storage tanks to meet demand using the most sustainable sources and minimizing electricity costs, thanks to the use of stochastic model predictive control algorithms that explicitly take into account the uncertainty associated with energy prices and actual demand; • a module monitoring water balance and quality of the distribution network in real-time via fault diagnosis techniques, using information from hundreds of flow, pressure, and water quality sensors, and hydraulic and quality-parameter evolution models, to detect and locate leaks in the network, breach in water quality, and sensor/actuator failures; • a module for the management of consumer demand, based on smart metering techniques, producing a detailed analysis and forecasting of consumption patterns and providing a service of communication to consumers, together with economic measures to promote a more efficient use of water at the household level. Two real-life pilot demonstrations in Barcelona (Spain) and Lemesos (Cyprus), respectively, will prove the general applicability of the proposed integrated ICT solution and its effectiveness in the management of drinking water networks, with considerable savings of electricity costs and reduced water loss while ensuring the high European standards of water quality to citizens. The incorporation of recent advances in the information and communications industry, in sensor and actuator technology, and in advanced metering of consumer demand, have a significant potential to improve efficiency in monitoring and management of quantity and quality of water, to achieve best strategies for water and energy use, to avoid water loss because of leakage, to minimize risk of inadequate water quality, to understand consumer demands by taking into account the behaviors and attitudes of the consumers and even to promote more efficient demand patterns from consumers. The EFFINET project proposes the integration of selected innovative ICT technologies of operational control, network monitoring, and demand forecasting and management for improving the efficiency in water and energy use of water systems. The objectives of EFFINET are: • To develop MPC techniques to operate pumps and valves in the network and tailored to meet demand, to comply to environmental resource usage constraints and water service dependability, and to make the least possible use of energy and cost, taking into account the stochastic nature of electricity prices on the day-ahead market and of water consumption; • To develop a real-time monitoring methodology to detect and locate leaks and water quality-breach events, based on the use of real-time sensor information 21 1.5 Thesis Objectives and mathematical models; • To develop a general integrated software solution that combines the modules for strategic operational control, network monitoring, and demand forecasting management modules in a smooth and synergic way; • To extensively validate the proposed solution by real-life demonstrations, showing that it is technologically feasible, applicable by different water utilities, that provides improvements of efficiency in water and energy use, reducing water loss while guaranteeing water quality guarantee to consumers, and that contributes to create water-use awareness; • To provide quantifiable benefits of efficiency in water use, by optimally allocating water and energy resources, minimizing water loss, reducing quality breach, and managing demand towards the 2020 goals. 1.5 Thesis Objectives This dissertation describes several strategies to design multi-layer MPC controller for complex water systems (including both regional and distribution networks). According to discussions presented beforehand, the main idea of the multi-layer MPC is that different layers which may have different time scales and control objectives have their own controller based on MPC. The design of each MPC consists in expressing the desired control specifications through different performance indexes associated to common objectives such as reductions in control energy and economic costs, enhancement of water quality, maintenance of appropriate water storage levels in reservoirs for emergency-handling among many others. In order to fulfill the main objective of this thesis, a set of specific objectives are formulated as follows: • Design and implementation of MPC controllers for each of the layers considering their different time scales and control objectives, with special emphasis in the supply layer which has complex control properties with real rivers, time delays and several control objectives as river balancing management and ecological control; • In order to manage the MPC controllers considering different layers (Supply and Transportation layer), design a negotiation strategy to coordinate MPC controllers to manage the whole system globally; • Design computational effective way to solve the non-linear optimization difficulty of the hydraulic model in water distribution network; • Find reasonable and effective way to address the mixed-integer problem which appear in the pump scheduling problem of water distribution network; 22 1.6 Outline of Thesis • Apply the proposed control schemes to illustrative and realistic case studies to prove their feasibility; • Validate the proposed approaches and algorithms using realistic simulations and other proved and supportive tools. 1.6 Outline of Thesis The remainder of this dissertation is organized as follows: • Chapter 2: Background and Modelling This chapter aims to present the state of art about different conceptions, theories and the control oriented modelling methods of MPC, which are mainly related to problems involved in the following chapters. • Chapter 3: MPC Control using Temporal Multi-level Coordination Techniques Considering the background of the introduction section and literature analysis in Chapter 2, a multi-layer MPC with temporal multi-level coordination is proposed for regional water supply systems. First, as introduced at the beginning of this dissertation, a water network is functionally decomposed into a multi-layer control structure. Inside each layer, an MPC based controller is used. Between related layers, a temporal multi-level coordination mechanism is used to generate control strategies which consider objectives and time scales of both layers. The upper layer which is named supply layer works in a daily scale in order to achieve the global management policies for the different reservoirs. The lower layer which is named transportation layer works in a hourly scale and is in charge of manipulating the actuators (pumps and valves) set-point to satisfy the local objectives. After handling the complex control of regional networks using multi-layer MPC, an integrated simulation and optimization modelling approach in order to assess the optimal operation of the regional water networks in real time is presented. The use of the combined approach of optimization and simulation contributes to guarantee that the effect of more complex dynamics, better represented by a simulation model, may be taken into account. Coordination between simulator and optimizer works in a feedback scheme, from which both real-time interaction and also extensive validation of the proposed solution have been realized by realistic demonstrations. The results of the modelling will be applied to the Catalunya Regional Water Network. This chapter presents the simulation results based on an aggregate model of this network. 23 1.6 Outline of Thesis This chapter is based on the following publications: C. C. Sun, V. Puig and G. Cembrano, Temporal multi-level coordination techniques oriented to regional water networks: Application to the Catalunya case study, Journal of Hydroinformatics, 2014, 16(4):952-970, (SCI, IF=1.336). C. C. Sun, V. Puig and G. Cembrano, Transport of Water versus Transport over Water, Chapter of Coordinating MPC of transport and supply water systems, Editors: Carlos Ocampo-Martinez, Rudy R. Negenborn, Springer, 111-130, 2015. C. C. Sun, V. Puig and G. Cembrano, Multi-layer model predictive control of regional water networks: Application to the Catalunya case study, 52nd Conference on Decision and Control, 2013, Florence, pp. 7095-7100. C. C. Sun, V. Puig and G. Cembrano, Coordinating multi-layer MPC for complex water systems, 26th Chinese Control and Decision Conference, 2014, Changsha, pp. 592-597. C. C. Sun, V. Puig and G. Cembrano, Integrated Simulation and Optimization Scheme of Real-time Large Scale Water Supply Network:Applied to Catalunya Case Study, Simulation, 2015, 91(1):59-70, (SCI, IF=0.656). • Chapter 4: Combining Constraints Satisfaction Problem and MPC for the Operational Control of Water Networks This chapter presents a control scheme which uses a combination of linear MPC and a CSP to optimize the non-linear operational control of DWNs. The methodology has been divided into two functional layers: First, a CSP algorithm is used to transfer non-linear DWN pressure equations into linear constraints, which can enclose the feasible solution set of the hydraulic non-linear problem during the optimizing process. Then, a linear MPC with added linear constraints is solved to generate optimal control strategies which optimize the control objective. The proposed approach is simulated using Epanet to represent the real DWN. Nonlinear MPC is used for validation by means of a generic operational tool for controlling water networks named PLIO. To illustrate the performance of the proposed approach a case study based on the Richmond water network is used and a realistic example D-Town benchmark network is added as a supplementary case study. This chapter is based on the following publications: C. C. Sun, V. Puig and G. Cembrano, Combining CSP and MPC for the Operational Control of Water Network: Application to the Richmond Case Study, 24 1.6 Outline of Thesis Engineering Applications of Artificial Intelligence, (SCI, IF=2.176), Submitted. C. C. Sun, V. Puig and G. Cembrano, Combining CSP and MPC for the operational control of water networks: Application to the Richmond case study, 19th IFAC World Congress, 2014, Cape Town, South Africa, pp. 6246-6251. C. C. Sun, M. Morley, D. Savic, V. Puig, G. Cembrano and Z. Zhang, Combining model predictive control with constraint-satisfaction formulation for the operative pumping control in water networks, Computing and Control for the Water Industry, 2015, Leicester, Vol 119 of Procedia Engineering, pp. 963-972, Elsevier. • Chapter 5: Two-layer Scheduling Scheme for Pump Stations A two-layer scheduling scheme for pump stations in a water distribution network has been proposed in this chapter. The upper layer, which works in one-hour sampling time, uses MPC to produce continuous flow set-points for the lower layer. While in the lower layer, a scheduling algorithm has been used to translate the continuous flow set-points to a discrete (ON-OFF) control operation sequence of the pump stations with the constraints that pump stations should draw the same amount of water as the continuous flow set-points provided by the upper layer. The tuning parameters of such algorithm are the lower layer control sampling period and the number of parallel pumps in the pump station. The proposed method has been tested in the Richmond case study. This chapter is based on the following publications: C. C. Sun, V. Puig and G. Cembrano, Two-layer Scheduling Scheme for Pump Stations, IEEE Conference on Control Applications, 2014, Antibes, pp. 17411746. • Chapter 6: Conclusions and Future Work After detailed descriptions about the proposed control schemes and algorithms presented in previous chapters, this chapter is introduced to summarize all the research contributions and conclusions presented in this thesis and discuss the possible topics for future research. 25 Chapter 2 Background and Modelling Model Predictive Control with its extended control policies is the key tool used in this thesis. This chapter mainly introduces the basic knowledge regarding MPC, multilayer MPC and the application to water networks. Both feasibility and advantages of the MPC application to water networks are presented in Section 2.1. Besides, in Section 2.2, control oriented modelling methodology considering both flow (linear) and pressure (non-linear) models is provided in order to address the considered case studies for applications and validations which are needed in the following chapters. 2.1 2.1.1 Background Model Predictive Control Model Predictive Control is one of the most advanced control methodologies, which has made a significant impact on industrial control engineering. The reason for this success can be attributed to the fact that MPC is, perhaps, the most general way of posing the process control problem in the time domain. MPC does not consider a specific control strategy but a very wide range of control methods which make an explicit use of the process model to obtain the control signal by minimizing an objective function related to system performance. The MPC can handle multivariable control problems, to take into account actuator limitations and allow the operation considering operational and physical constraints of the plant. 2.1.1.1 MPC Strategy. The methodology of all the controllers belonging to the MPC family is characterized by a set of common elements, that are the following: 26 2.1 Background • Prediction model, which should capture all process dynamics and allows to predict the future response of the system considering control actions and disturbances. • Objective function, which is, in the general form, the mathematical expression of the control objectives. The objective function can consider several control objectives and it allows to represent the performance indexes of the considered system. • Constraints, which allow to represent physical and operational limits of the plant as well as constraints on the control signals, manipulated variables, and outputs. 2.1.1.2 Basic MPC Formulation. The MPC formulation can be expressed in state space allowing to present a generic and simple representation of the control strategy. The standard MPC problem based on the linear discrete-time prediction model is considered as explained in [81]: x(k + 1) = Ax(k) + Bu(k), y(k) = Cx(k), (2.1a) (2.1b) where x(k) ∈ Rn is the state vector and u(k) ∈ Rm is the vector of command variables at time step k, and y(k) ∈ R p is the vector of the measured output. Following the formalism in [81] for the basic formulation of a predictive control, the cost function is assumed to be quadratic and the constraints are in the form of linear inequalities. Thus, the following optimization problem has to be solved: min (u(1),u(2),...u(k)) s.t. (2.2a) J x(k + 1) = Ax(k) + Bu(k), k = 0, · · · , H p − 1, x(0) = x(k), xmin ≤ x(k) ≤ xmax , k = 1, · · · , H p , umin ≤ u(k) ≤ umax , k = 0, · · · , H p − 1, (2.2b) (2.2c) (2.2d) (2.2e) For example, in the case of water transportation network, the optimization objective can be expressed as follows: min (u(1),u(2),...u(k)) J(k) = min (u(1),u(2),...u(k)) H u −1 X Jeconomic (k)+ k=0 Hp X k=1 27 J sa f ety (k)+ H u −1 X k=0 J smoothness (k) (2.3) 2.1 Background where Jeconomic (k) = Wa (a1 + a2 (k))u(k) J sa f ety (k) = (x(k) − x sec (k))> W x (x(k) − x sec (k)) J smoothness (k) = ∆u(k)> Wu ∆u(k) and H p is the prediction horizon, x(0) is the initial condition of the state vector, umin and umax are known vectors defining the saturation constraints on inputs variables (operational ranges), xmin and xmax are vectors defining the constraints on state vector, and “≤” denotes componentwise inequality. Problem (2.2) can be recast as a Quadratic Programming (QP) problem, whose solution: U∗ (k) , [u(k)∗T · · · u(k + H p − 1)∗T ]T ∈ RH p m×1 (2.4) is a sequence of optimal control inputs that generates an admissible state sequence. At each sampling time k, Problem (2.2) is solved for the given measured (or estimated) current state x(k). Only the first optimal move u∗ (k) of the optimal sequence U∗ (k) is applied to the process: u MPC (k) = u∗ (k) (2.5) while the remaining optimal moves are discarded and the optimization is repeated at time k + 1. 2.1.2 Multi-layer MPC A well-established way to cope with a design of a controller for a complex system is to apply a hierarchical control structure. The technique of process control has been based on the hierarchical approach for years, with the main layers of the hierarchy being the lower layers of feedback (regulatory) control and the upper layers of optimization as proposed in [124]. The idea is well established in industrial practice and discussed in many papers and monographs, see e.g. in [47–50, 74, 124]. 2.1.2.1 Multi-layer Control Structures. There are three basic methods of decomposition of the overall control objective: • temporal hierarchy • spatial hierarchy 28 2.1 Background • functional hierarchy Temporal hierarchy is applied to cases where the task of control generation is formulated as a dynamic optimization problem and the controlled dynamic system (and/or disturbances) is multi-scale, i.e., there is a significant difference between the rate of change of fast and slow state variables (and/or disturbances) of the system. While for spatial hierarchy, it is concerned with a spatial structure of a complex controlled process. This hierarchy is based on a division of the control task (or a functional partial task, e.g., within one layer of the described multi-layer structure) into local subtasks of the same functional kind but related to individual spatially isolated parts of the entire complex control process. Finally, functional hierarchy is applied to a process treated as a whole, and is based on assigning a set of functionally different partial control objectives, in a structure of vertical, hierarchical dependence, called the multi-layer structure. The decision unit connected with each layer makes decisions concerning the controlled process, but each of them makes decisions of a different kind. In the following subsections multi-layer control structures, temporal and spatial, will be presented according to [16]. 2.1.2.2 Temporal hierarchy. The general principle is that decision of a higher layer have a wider spatial range and temporal extent than those of a lower one. At the same time, because of the limited capacity, the higher-level decision units process more aggregated information than the lower ones do. Particularly important in the control of water systems is the temporal hierarchy. A three-layer structure is shown in Figure 2.1. All layers work according to the idea of MPC control and all use the same decision making mechanism. Starting from the top of the hierarchy there is: the Long-Term Problem (LTP), the MediumTerm Problem (MTP) and the Short-Term Problem (STP) for the bottom layer. MPC control can be characterized by a tuple (H p , T s ), where H p is a time horizon for the optimization problem, T s is a repetition period which corresponds to the sampling time. The function of the top layer is to produce the target constraints on the states or some other parameters on the objective function (e.g. price) for the middle layer; the function of the middle layer is to produce the target constraints for the short-term problem while the bottom layer generates the control function which is directly applied to the physical system. The operation of the hierarchical structure is presented as a multi-loop scheme by the pseudo-code given below where the triple (k, l, m) is used to fix a point on a time scale, with the following meaning: k = the current month, l = week within the current month, m = day within the current week. K will denote the number of months over which the scheme is in operation, L will be the number of weeks in a month, and, finally, M will be the number of days in a week. For convenience the 29 2.1 Background Long-term problem Long-term prediction Measured State Target Constraints Medium-term problem Medium-term prediction Measured State Target Constraints Short-term problem Short-term prediction Control action Measured State Water System Figure 2.1: Temporal hierarchy following notation is chosen: x(k) = x(k, 1, 1), x(k, l) = x(k, l, 1), and x∗ is used to denote the state of the physical system. To evaluate a control function for three days ahead the following sequence of actions is required: solve the LT P, solve the MT P, solve the S T P, where the time horizons for the respective problems expressed in time steps are 12, 4 and 7. If singlelayer MPC scheme is employed, then every three days the Problem (2.2) is solved with a 365-day horizon. Since the computational complexity of a non-linear programming problem is at least polynomial, a three-layer structure is significantly cheaper in computation time than single-layer one. Moreover, the higher decision units use aggregated information in the form of aggregated time system models and inflow predictions. Also, the role of the two top layers is different from the bottom one, namely, they set targets in the state space, but the direct control function is generated by the bottom layer as explained in [80]. 2.1.2.3 Spatial hierarchy. A large-scale water retention system can be seen as a collection of sub-systems composed of river reaches into a complicated structure. A multi-layer decision hierarchy is the standard method for handling the complex decision making for large-scale systems. 30 2.1 Background Algorithm 1 Operation algorithm for hierarchical structure 1: for k := 1 to K do 2: initial-state := x∗ (k) 3: final-state := x∗ (k) 4: horizon := 1 year 5: model :=model(T s = 1 month) 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: {solve BOP to obtain x(k), x(k + 1), . . . } for l := 1 to L do initial-state := x∗ (k, l) final-state := interpolate (x(k), x(k + 1)) horizon := 1 month model :=model(T s = 1 week) {solve BOP to obtain x(k, l), x(k, l + 1), . . . } for m := 1 to M step ∆M do initial-state := x∗ (k, l, m) final-state := interpolate (x(k, l), x(k, l + 1)) horizon := 1 week model := 1 day {solve BOP to generate a control sequence u(k, l, m), u(k, l, m + 1), . . . } {apply u(k, l, m), . . . , u(k, l, m + ∆M),to a physical system} {measure the state of the physical system x∗ (k, l, m + ∆M)} end for{end of 0 m0 loop} end for{end of 0 l0 loop} end for{end of 0 k0 loop}; Consider a two-layer decision structure shown in Figure 2.2. Typically, the upper layer comprises a single decision unit responsible for the entire system. At the lower layer, there are many decision units, each responsible of controlling a sub-system. The top layer of the control structure may be able to find an optimal solution for a detailed model of the system. The role of the bottom layer would then change accordingly just to execute the decision of the higher layer and observe the functioning of the physical system. In most decision structures, the final decisions are usually approved by human operators. A computer and a telemetry system of each subsystem should allow the operator to understand its behavior in both normal and contingency situations. The decision making process can be formulated into a more general framework. To make a decision means to find a value of the decision variable x which satisfies a collection of conditions. These conditions can be formally expressed as a logical predicate P(x). For example, if the decision is obtained by solving a mathematical programming problem with an objective function f (x) and a feasible set =, then the predicate reads P(x) = (x ∈ =) ∧ (∀y ∈ =, f (x) ≤ f (y)) 31 (2.6) 2.1 Background Aggregated decisions Global decision Unit Aggregated decisions Aggregated information Local decision unit Measurements Control action Local decision unit Measurements Control action Water system 1st sub-system interconnections Nst sub-system Figure 2.2: Spatial hierarchy The predicate is satisfied for x, which belongs to the feasible set = and yields f (x) no greater than the value of the objective function for any other value from the feasible set. In a hierarchical structure, decisions of the lower layer are conditioned by decisions of the upper layer. Therefore, the predicate has two variables P(x, y), where y is a local decision variable and the value of x is produced by the upper layer. If the layer has N decision units, each of them solves its own predicate P(x, y1 ), P(x, y2 ), . . . , P(x, yN ) as mentioned in [80]. The variable x which appears in the local decision units can represent different mechanisms by which the top layer influences the decisions of the subordinate layer, for instance: • overall storage policy for each sub-system; • total volume of interaction flow between sub-systems; • price of buying and selling water for each subsystem . 2.1.3 MPC in Water Networks Nowadays, management systems and research literature focused on water supply, transportation and distribution are very active areas as it can be seen from the interests for 32 2.2 Modelling the whole society. Several modelling techniques for water networks appeared in the scientific literature, including control-oriented flow-based models in [23, 53, 105] and their extension to include pressure-based models in [54, 86]. For example in [113], the authors talk about multi-objective optimization problem for a large-scale groundwater system in a sustainable way and consider the Upper San Pedro River Basin, which belongs Semiarid Regions as the research case study. In order to get the solutions for the management model, they use a constraint method to produce a set of non-dominated solutions. [45] use the hierarchical concept applied to a water supply system in two separate sections: Implement a hierarchical control function via linked computers; use a time-decomposition method to calculate the controls for the linear-quadratic problem using a discrete time algorithm. In the context of water network management, optimization-based scheduling was considered by Brdys and Ulanicki in [80] as a two-level optimization approach: the upper level solves an optimization problem based on flow-based models to get references for the lower level, which is instead based on pressure-based models. Recent studies have proven the effectiveness of MPC for the control of water networks as in [100, 127]. In particular, the effectiveness of decentralized and distributed MPC tools were demonstrated in the past FP7 − ICT WIDE project [59] for the control of water distribution networks, taking into account large-scale deterministic models of the entire network, and decomposing the resulting optimal control formulas. The disturbance variable is water demand, so that demand forecasting becomes a crucial component of the control system. Depending on the time horizon, there are short-term, mid-term and long-term forecasts [11]. The short-term forecasting is mainly used for operational control, considering a demand prediction for either two or three days ahead [7, 107, 140]. The second main source of uncertainty is the price for electricity, in case (part of) the aforementioned fairly large amount of electrical energy is purchased on power exchange market to exploit maximum convenience. Stochastic MPC formulations that explicitly exploit models of uncertainty to optimize expected revenues and penalize risk have been developed over the last decade in academic community [115, 131]. As stochastic models of electricity prices dynamics can be derived from market data [5], stochastic MPC techniques were recently investigated within the FP7 − ICT E-PRICE project [1] for management of smart distribution grids [101, 138] and for placing bids on the energy market [104]. 2.2 Modelling Complex nonlinear models are very useful for off-line operations (for instance, calibration and simulation). Fine mathematical representations such as the Saint-Venant equations for describing the open-flow behavior [86] or pressure-flow models allow 33 2.2 Modelling the simulation of those systems with enough accuracy to observe specific phenomena, useful for design and investment planning. However, for on-line computation purposes such as those related to the global management, a simpler control-oriented model structure should be conveniently selected. This simplified model includes the following features: • Representation of the main network dynamics: It must provide an evaluation of the main representative hydrological/hydraulic variables of the network and their response to control actions at the actuators. • Simplicity, expendability, flexibility and computational speed: It must use the simplest approach capable of achieving the given purposes, allowing very easily to expand and/or modify the modelled portion of the network. Several modelling techniques dealing with the operational control of water systems have been presented in the literature, see [80, 86] and the references therein. Here, a control-oriented modelling approach is outlined, which follows the principles presented in [23] and [93]. The extension to include the pressure-model can be found in the references provided by [80] and [86]. As first presented in Chapter 1, a drinking water system generally contains tanks, which store the drinking water coming from the sources, a network of pipes and open flow canals, and a number of demands. Valves and/or pumping stations are elements that allow to manipulate the water flow according to a specific policy and to supply water requested by the network users. These flows are chosen by a global management strategy. The water system can be considered as composed of a set of constitutive elements, which are presented below first describing the flow model and later including the pressure model. 2.2.1 2.2.1.1 Flow Model Tanks and Reservoirs. Tanks and reservoirs provide the entire network with the water storage capacity. The i, j mass balance expression relating the stored volume v, the manipulated inflows qin and i,l outflows qout (including the demand flows as outflows) for the i-th storage element can be described by the discrete-time difference equation X X i, j i,l Vi (k + 1) = Vi (k) + ∆t qin (k) − qout (k) , j 34 l (2.7) 2.2 Modelling where ∆t is the sampling time and k denotes the discrete-time instant. The physical constraint related to the admissible range of volume in the i-th storage element is expressed as V i ≤ Vi (k) ≤ V i , for all k, (2.8) where V i and V i denote the minimum and the maximum storage capacity, respectively. As this constraint is physical, it is impossible to send more water to a storage element than it can store, or draw more water than the stored amount. Although V i might correspond to an empty storage element, in practice this value can be set as nonzero in order to maintain an emergency stored volume enough to supply for facing extreme circumstances. For simplicity purposes, the dynamic behavior of these storage elements is described as a function of the volume. However, in most of the cases, the measured variable is the water level (by using level sensors), which implies the computation of the water volume taking into account the storage element geometry. 2.2.1.2 Actuators. Two types of control actuators are considered: valves/gates and pumps (more precisely, complex pumping stations). The manipulated flows through the actuators represent the manipulated variables, denoted as qu . Both pumps and valves/gates have lower and upper physical limits, which are taken into account as system constraints. As in (2.8), they are expressed as qu ≤ qu i (k) ≤ qu i , i for all k, (2.9) where qu and qu i denote the minimum and the maximum flow capacity, respectively. i 2.2.1.3 Nodes. These elements correspond to the points in the water system where water flows are merged or split. Thus, the nodes represent mass balance relations, being modelled as equality constraints related to inflows (from other tanks through valves or pumps) and outflows, the latter being represented not only by manipulated flows but also by demand flows. The expression of the mass conservation in these nodes can be written as X qi,inj (k) = j X h 35 qi,h out (k). (2.10) 2.2 Modelling From now on and with some abuse of notation, node inflows and outflows are still denoted by qin and qout , respectively, despite the fact that they can be manipulated flows and hence denoted by qu , if required. 2.2.1.4 River Reaches. A single reach canal can be approximated by using the modelling approach proposed by [76] that leads to the following relation between the upstream (qups ) and downstream (qdns ) flows: qdns (k + 1) = a1 qdns (k) + b0 qups (k − d) (2.11) where d = τd /T s , τd is the downstream transport delay, T s is the sampling time, b0 = Ts 1 − a1 and a1 = e− T . 2.2.1.5 Demand and Irrigation Sectors. Demand and irrigation sectors represent the water consumed by the network users of a certain physical area. It is considered as a measured disturbance of the system at a given time instant. The demand in urban areas can be anticipated by a forecasting algorithm that is integrated within the MPC closed-loop architecture. The demand forecasting algorithm typically uses a two-level scheme composed by: • a time-series model to represent the daily aggregate flow values. • a set of different daily flow demand patterns according to the day type to cater for different consumption during the weekends and holidays periods. Every pattern consists of 24 hourly values for each daily pattern [107]. This algorithm runs in parallel with the MPC algorithm. The daily series of hourly-flow predictions are computed as a product of the daily aggregate flow value and the appropriate hourly demand pattern. On the other hand, irrigation demand is typically planned in advance with farmers. Pre-established flows for irrigation are fixed in the irrigation areas in certain periods of the year. 2.2.2 Pressure Model When considering the pressure model, the flow model presented in the previous section should be extended using the non-linear relationship between flow and head loss, which appears at pipes, valves, pumps and tanks as described in [80]. 36 2.2 Modelling 2.2.2.1 Pipes. Pipes are links which convey water from one point in the network to another. During the transportation, water head decreases because of friction. The Chezy-Manning model is one of the various widely used models to describe head loss between two nodes i and j linked by a pipe: g(q) = hi − h j = gi j (qi j ) = Ri j q2i j (2.12) Ri j = (10.29 × Li j )/(Ci j 2 × Di j 5.33 ) (2.13) where and Li j , Di j and Ci j denote the pipe length, diameter and roughness. 2.2.2.2 Pumps. Pumps introduce a positive increase of head between the suction node s and the delivery node d. Because it is not impossible to have an exact mathematical model describing the reality, the estimate function that relates the pump flow with the head change depends on the technical characteristics of the pump (e.g., if the pump can be controlled for example with fixed or variable speed). In the more general case that corresponds to variable speed pumps, the relation between the flow and the pressure increase is given by: Wq2 + Mq + N s2 , g(q, u, s) = hd − h s = 0, if u , 0 and s , 0 otherwise (2.14) where s is the pump speed and u corresponds to the number of pumps that are turned on, W, M and N are pump specific coefficients. In this paper, s and N inside a pump are constants. 2.2.2.3 Valves. There are many types of valves which perform different functions, e.g. pressure reduction or flow regulation. In this thesis, one-way butterfly valve is used. These valves can be modelled as a pipe with controlled conductivity, that is g(q, G) = Gi j Ri j q2i j 37 (2.15) 2.3 Summary where Ri j is the pipe conductivity and Gi j is the control variable that manipulates the valve from 0 (closed) to 1 (open). 2.2.2.4 Tanks. The head established by the ith tank is given by the following equation: hri (t) = Vi (t) + Ei S eci (2.16) where S eci is the cross-sectional area of the tank and Ei is the tank elevation. 2.3 Summary The complex multi-input and multi-output characteristics of water networks make MPC, which is well established process control method, become the wise and optimal choice for large scale water systems. Control oriented modelling methodologies based on linear flow and non-linear pressure head models are needed for representing water networks in a realistic way. Fundamental conceptions, properties and also formulations of MPC, multi-layer MPC and also MPC in water systems are revised in this chapter for future use in the following parts of this thesis. 38 Part II Regional Water Networks 39 Chapter 3 MPC Control using Temporal Multi-level Coordination Techniques The composition of a regional water network includes natural sources (rivers and aquifers), large reservoirs, transportation actuators and water consumers, etc. It is common to divide and control the regional water network by means of separated subsystems because of their different sampling time and dynamic evolution. The disadvantage of controlling subsystems separately is the loss of the global perspective in the water management which may not meet the sustainable, environmental or other global objectives in the long term. Simulation schemes are commonly used in realistic applications of water networks. Their exist plenty of simulation and optimization methods related with the water control topics. Most of the simulators are normally working separately from the optimizers and furthermore, the simulators are limited to carry out the validation instead of the real-time interaction with the optimizers, which would prevent producing the optimal management rules for regional water networks. The main contribution of this chapter is proposing a global control scheme for a regional water network, base on temporal multi-layer hierarchical MPC, which has not been applied before to this type of water networks according to the literature review. The proposed strategy will coordinate the MPC controllers for the supply and transportation layers by means of a temporal hierarchical sequence of optimizations and constraints going from the upper to the lower layer. Besides, this chapter also presents the validation of the proposed multi-layer approach by means of an integrated simulation and optimization scheme in order to provide the optimal management for the regional water networks emulating the real-time operation. The computation of control strategies by MPC uses a simplified model of the network dynamics. The use of the combined approach of optimization and simulation contributes to guarantee that the effect of more complex dynamics, better 41 3.1 Introduction represented by the simulation model, are taken into account in a satisfactory way. Coordination between simulator and optimizer works in a feedback scheme, from which both real-time interaction and also extensive validation of the proposed solution have been realized by several scenarios. The Catalunya regional water network has been used as the case study. 3.1 Introduction A regional water network operates to supply water from natural sources to municipal, industrial and irrigation needs. Management of these systems from planning to operation is very challenging since the problem deals with many complex modelling issues related to inflows, transportation delays, storage, urban, irrigation and industrial water demands as described in [34]. An effective management of regional water network requires a supervisory control system that takes optimal decisions regarding the operation of the whole network. Such decisions are implemented automatically or offered as a decision support to operators and managers. The control system should take into account operating constraints, costs and consumer demands. The decisions of the control systems are translated into set-points to individual, localized, lower level systems that optimize the pressure profile to minimize losses by leakage and provide sufficient pressure. The whole control system responds to changes in network topology (ruptures), typical daily/weekly profiles, as well as major changes in demand as discussed in [89]. As defined in Chapter 1, there are three different layers in a complex water network according to the functional perspective: Supply, Transportation and Distribution. Transportation and supply water layers are two types of systems with specific characteristics that have received a significant amount of attention in the recent years. Issues on how to obtain the best performance for a given transportation or supply water systems, or how to coordinate interactions between them are still open issues and need more research. A number of system analysis techniques involving simulation and optimization algorithms have been developed and applied over the last several decades to study regional water network and also have been reviewed in [135], [3] and [134]. [135] provides a comprehensive state-of-the-art review of theories and applications of system analysis techniques to regional water networks with a strong emphasis on optimization methods. Simulation and optimization models of regional water networks were reviewed by [3] who evaluated the usefulness of each approach for different decision support situations in order to provide better understanding of modelling tools which could help the practitioner in choosing the appropriate model. A review on optimal operation of regional water network, presented in [134], suggested the need to improve operational effectiveness and efficiency of water resources systems through the 42 3.2 Problem Formulation use of computer modelling and optimization tools. Continuous development in information technology (hardware and software) creates a good environment for transition to new decision making tools. Spatial decision support systems using object oriented programming algorithms are integrating transparent tools that will be easy to use and understand at [98]. A number of text books on modelling and system analysis of water resources including regional water networks are available as [34], [108], [18], [58], [40], [79] and [41]. This chapter presents a hierarchical MPC scheme with a supervisor that coordinates transportation and supply water systems. First, a MPC controller is designed for each layer of the hierarchy. In the two-level hierarchy, a supervisory coordinating mechanism is used to generate control strategies which consider objectives at different time scales. The first level, in charge of managing the supply system, works in a daily scale in order to achieve the global management policies in different rivers and balance management of different reservoirs. The second level, in charge of managing the transportation system, works in a hourly scale and manipulates actuator (pumps and valves) set-points to satisfy the local water supplying objectives (e.g.,minimizing economic cost, handling emergency storage and smoothing actuator operation). Then, an integrated simulation and optimization modelling approach which combines the strategic operational control modules with network monitoring in a smooth and synergic way for the real-time regional water network is also provided. The results of these controlling and modelling scheme will be applied to the Catalunya Regional Water Network and based on an aggregate model. 3.2 3.2.1 Problem Formulation State Space Model of Supply Layer The state space model of supply layer has two kinds of states and control variables. First kind of state variable represents reservoirs and the managed variable corresponds to actuator flows: x(k + 1) = A x(k) + B u(k) + B p [d(k) − ε(k)], k∈Z where x(k) ∈ Rnx u(k) ∈ Rnu d(k) ∈ Rnd ε(k) ∈ Rnd state variables represent volumes control corresponds to actuator flows disturbances correspond to demands slack variables for unsatisfied demands 43 (3.1) 3.2 Problem Formulation In normal operation, all demands are expected to be satisfied by the MPC control strategy with exceptional situations (e.g. drought) when some demands (especially irrigation demands) may be satisfied only partially. In (3.1), ε(k) is introduced to control the amount of demand which has not been satisfied. The second kind of states and control variables represents river flows in a river reach model with delays. For simplicity and brevity of the explanation, consider the river reach model (2.11) as a transport delay [44]: qouti = qini (k − τd ) (3.2) where τd represents the delay value. For time delays associated with flows within the network, the following auxiliary state equations are introduced: x j ,1 (k + 1) = q j (k) (3.3) x j ,i+1 (k + 1) = x j ,i (k), i = 1, · · · , τd (3.4) where x j ,i (k) ∈ Rnx state variables represent flows 0 q j (k) ∈ Rnu flows, part of control variables τd ∈ Z delay 0 More details on how this approach can be extended to the case that river reach model (2.11) is not just considered as a delay can be found in [44]. After combining (3.3) and (3.4) with (3.1), we have a new augmented state space representation ee e u(k) + B ep [d(k) − ε(k)], e x(k + 1) = A x(k) + Be k∈Z where " e x(k) = # x(k) , x j ,i (k) and 44 " e u(k) = u(k) q j (k) # (3.5) 3.2 Problem Formulation e x(k) ∈ Renx e u(k) ∈ Renu According to (2.8) and (2.9), all the variables are subject to the following inequality constraints: e xmin ≤ e x(k) ≤ e xmax (3.6) e umin ≤ e u(k) ≤ e umax (3.7) εmin ≤ ε(k) ≤ εmax (3.8) where e xmin and e xmax are physical limitations of the reservoirs, while e umin and e umax are physical limitations of the river flows. The range of εmin lies between zero and the related demand. As described at Chapter 1, the balance at every node should be satisfied, where E, Ed , Eex are matrices which parameters can be obtained from topology of the water network: Ee u + Ed d − Ed ε + Eex e x=0 During the consumption process, water storage of reservoir should be kept above a given level (named as water safety level) which is used as emergency supply for drought period or emergency situations. Any situation below the emergency level should be penalized using soft constraints: e x ≥ xer − εex (3.9) εex ≥ 0 (3.10) where xer is the water safety level and εex is the slack variable associated to xer . Stability of MPC is one important issue that has drawn a lot of attention since local optimization in a finite preview horizon does not guarantee stability in general [72]. The most widely referenced approach to guarantee stability in MPC procedures is to add an equality constraint on the final state in the prediction horizon (known as end-state constraint) or put a weight on the final state in the objective function [36, 57, 70, 71, 84, 125]. Another approach is to use an infinite prediction horizon with 45 3.2 Problem Formulation a finite control horizon [110], making it possible to apply standard linear quadratic regulator (LQR) theory to guarantee stability [28, 69]. In this thesis, additive constraints on the states to keep water level bounded in reservoirs are preferred to using a terminal condition. The idea is to avoid infeasibility of the MPC strategies for the water supply system due to uncertainty in the dynamic model. However, it is important to take into account that using a finite state horizon (e.g. 30 days) when the reservoir memory is considerably longer might produce strategies that do not guarantee longer-term stability. This methodological issue will be analyzed in future work. 3.2.2 State Space Model of Transportation Layer The state space model of the transportation layer is simpler since the states correspond to the tank volumes and the manipulated variables are the flows in pumps and valves. This leads to a standard state space representation (2.1) for the transportation layer. More details can be found in [93]. 3.2.3 3.2.3.1 Operational Goals Operational Goals for Supply Layer. The supply network is operated with a 30-day horizon, at daily time interval. The main operational goals to be achieved in the supply network are: • Operational safety (J sa f ety ): This criterion refers to maintain appropriate water storage levels in dams and reservoirs for emergency-handling. • Demand management (Jdemand ): This is especially important in the supply layer when urban and irrigation demands exist since urban demands must be fully satisfied while irrigation demands allow some degree of slackness. • Balance management (Jbalance ): This is operated only at supply layer which is necessary for keeping rivers or reservoirs exploited in a balanced way and escaping water deficit problem for both of the two rivers in a longer time. • Minimizing waste (Jwaste ): Taking into account that the river water eventually goes to the sea, this term tries to avoid unnecessary water release from reservoirs (release water that does not meet any demand and is eventually wasted). • Environment conservation (Jecological ): Water sources such as boreholes, reservoirs and rivers are usually subject to operational constraints to maintain water levels and ecological flows. Because that the river flow is modelling as one part of the state vector, this control objective is included in J sa f ety . 46 3.2 Problem Formulation Above mentioned goals lead to the following function: J = J sa f ety + Jdemand + Jwaste + Jbalance = εex (k)> Wex εex (k) + ε(k)> W f ε(k) + (e ui... j (k) − e u s (k))> Wwe(e ui... j (k) − e u s (k)) > 1 0 . . . 0 x −1 0 . . . 0 e + ( 0 . . . 0 xi0max x(k)) wme 0 jmax 1 0 . . . 0 x −1 0... 0 e x(k)) × ( 0 . . . 0 xi0max j0max (3.11) where εex (k) = e x(k) − e xr e u = Θ∆e u + Πe u(k − 1) ∆e u(k) = e u(k) − e u(k − 1) and: Θ = Imi 0 Imi Imi .. .. . . Imi Imi ... 0 ... 0 . .. . .. . . . Imi , Π = Imi Imi .. . Imi . Wex , W f , Wwe, Wex , wme are weights related to priorities of objectives (established by the water network authorities) for all the terms appearing in the objective function. The weight tuning method proposed in [127], based on computing the Pareto front of the multi-objective optimization problem presented in (3.11), is used in this paper. The initial step of this tuning approach is to find what are known as the anchor points that correspond to the best possible value for each objective obtained by optimizing a single criterion at a time. Then, a normalization procedure is applied, a Management Point (MP) defined by establishing objective priorities is defined, and the optimal weights are determined by computing those that minimize the distance from the solutions of the Pareto front and the MP. It should be noticed that the term J sa f ety in (3.11) contains the ecological flows, implicitly including Jecological . The reason is that flows in the rivers are modelled as additional state variables as discussed before. Variables ui (k), . . . , u j (k) are the flows from the rivers to the sea. e u s (k) are their ecological penalty levels. xi and x j are two main reservoirs located in two different rivers. 47 3.2 Problem Formulation 3.2.3.2 Operational Goals for Transportation Layer. The transportation network is operated with a 24-hour horizon, at hourly time interval. The main operational goals to be achieved in the transportation network are: • Cost reduction (Jcost ): Water cost is usually related to acquisition, which may have different prices at different sources and elevations, affected by power tariffs which may vary during a day. • Operational safety (J sa f ety ): This criterion refers to maintaining appropriate water storage levels in dams and reservoirs of the network for emergency-handling. • Control actions smoothness (J smoothness ): The operation of water treatment plants and main valves usually requires smooth flow set-point variations for best process operation. Above mentioned goals lead to the following function: J = J sa f ety + J smoothness + Jcost = εex (k)> Wex εex (k) + ∆e u(k)> Weu ∆e u(k) + Wa (a1 + a2 (k))e u(k) (3.12) where εex (k) = e x(k) − e xr e u = Θ∆e u + Πe u(k − 1) ∆e u(k) = e u(k) − e u(k − 1) and Wex , Weu , Wa are the related weights. The vectors a1 and a2 contain the cost of water treatment and pumping, respectively, where vector a2 is time varying. 3.2.4 Formulation of the optimization problem The objective function (3.11) and (3.12) of the MPC problem can be formulated in the following way: J = zT Φz + φT z + c 48 (3.13) 3.3 Temporal Multi-layer MPC Scheme where z = [∆e u εex ε]T (3.14) and c is a constant value. This allows to determine the optimal control actions at each instant k by solving a quadratic optimization problem by means of QP algorithm in the form: min z> Φz + φ> z z A1 z ≤ b1 A2 z = b2 3.3 Temporal Multi-layer MPC Scheme As presented in Chapter 2, there are three basic methods of decomposition of the overall control objective [80]: • temporal hierarchy • spatial hierarchy • functional hierarchy Among them, temporal hierarchy is particularly important in the control of water systems and its explanation and application will be presented in the following sections [16]. 3.3.1 Temporal Multi-layer Coordination Techniques The general principle of a pure temporal hierarchical controller is that: decision of a higher level has a wider temporal extent than that of a lower level, and the higher level decision units use more aggregated information than the lower ones [80]. As shown in Figure 2.1 in Chapter 2, the way to represent interaction between the upper (daily model for the supply layer) and lower (hourly model for the transportation layer) layers relies on two elements: • Measured disturbance (M s ): which handles the demands at the transportation layer in an aggregated way in the predictive horizon as shared information to the supply layer. 49 3.3 Temporal Multi-layer MPC Scheme • Target constraint (T d ): which expresses management policies at the supply layer to the transportation layer in the form of control constraints. In this chapter, the supply system could be assumed as the upper level, while the transportation system could be considered as the lower level. This temporal hierarchical coordinating structure is proposed in Figure 3.1. In the upper level, the daily model of the transportation system is used in order to estimate the aggregated prices (which include both water and electricity costs) by means of the optimal path method (OPM) in [27][37]. Detailed algorithms for this temporal coordination mechanism will be provided in detail in the following section. Upper Control Level Daily Transportation System Set Water Price by OPM Temporal Coordinator Daily Model Daily Supply System Measured Disturbance Target Constraints Lower Control Level Hourly Transportation System Hourly Model Real Water System Figure 3.1: Temporal hierarchical coordinating structure 3.3.1.1 Optimal Path Method. When optimizing the supply system, the whole transportation system will be simplified into a virtual demand with unitary price after considering both the treatment and electricity costs. In order to determine this unitary price, OPM is used [27]. There are three steps for applying OPM: • Step 1. Searching Exhaustive Paths: Find all possible paths from sources to demands detecting closed cycles to avoid infinite loops. • Step 2. Choosing Optimal Path: Find optimal path from the set of all paths obtained in Step 1. 50 3.3 Temporal Multi-layer MPC Scheme • Step 3. Calculating the source price: Calculate the source price by the total cost and the water consumption in the optimal path obtained in Step 2. In order to search optimal economical paths from sources to demands, it is necessary to determine all possible paths between them [35]. Before that, a node-arc representation method for a regional water network is provided, where a node represents a source, reservoir, demand or junction and an arc represents a transfer or trade [27]. Searching Exhaustive Paths. Figure 3.2: A hypothetical network system Table 3.1: Node-Arc Incidence Matrix for the Network of Figure 3.2 Node 1 2 3 4 Arc 1 -1 +1 0 0 Arc 2 -1 0 +1 0 Arc 3 -1 0 0 +1 Arc 4 0 -1 +1 0 Arc 5 0 0 -1 +1 Arc 6 0 -1 0 +1 In a regional water network, all flow paths can be obtained from node-arc incidence matrices because water always flows from upstream sources to downstream. In a nodearc incidence matrix, a node is represented by a row and an arc is represented by a column. In a row of the matrix, entry arcs are represented by +1 and leaving arcs are represented by −1. In a column, an element of +1 and an element of −1 represent the ending and starting nodes, respectively, of this arc. Table 3.1 shows the node-arc incidence matrix for the network in Figure 3.2. On the other hand, the node-arc incidence matrix that defines the relationship of the direction between nodes and arcs is transformed into a flow path matrix that defines all flow paths of the network. The flow path matrix A is a set of binary parameters a s,r that describes all flow paths in a water network: 51 3.3 Temporal Multi-layer MPC Scheme A = a1,1 a1,2 a2,1 a2,2 a3,1 a3,2 .. .. . . an,1 an,2 a1,3 a2,3 a3,3 .. . an,3 ... ... ... .. . . . . a1,p . . . a2,p . . . a3,p . .. . .. . . . . . . an,p In this matrix A, which is the target matrix in this section, p denotes number of paths and n denotes total number of arcs (or flow actuators) in a water network. A column represents a flow path and a row represents an arc in the network. The connection parameters a s,r is binary (0, 1) and is used to describe the connection between source nodes and receiving nodes. The connection parameters are assigned equal to 1 for linking arcs s in a flow path r, while other arcs are assigned to 0. The objective of this step is to find the optimal flow through each path. The optimal flow path problem can be formulated as a linear optimization problem as follows: Choosing Optimal Path. min x cT Ax Ax ≤ b Aeq x = beq lb ≤ x ≤ ub subject to (3.15) where c, x, b, beq , lb and ub are vectors and A and Aeq are matrices. The meaning of these vectors and equations is described in the following: The vector x contains the optimal flow through each path that minimizes the total operational cost. This cost is measured by the operational cost of each actuator, and the actuators involved in each path according to the flow path matrix A. The cost function can be expressed as cT Ax, where Ax provides the total flow through each actuator. Optimal path solution: x Operational cost: c The daily cost of each actuator is calculated as the mean cost value: c(i) = 24 X cost(i, k) k=1 24 where i represents the actuator and index k represents the time instant. 52 (3.16) 3.3 Temporal Multi-layer MPC Scheme Inequality constraints are related to actuator operational limits. One actuator can be involved in different paths, and each path can require a different constant flow through it. So, it is necessary to guarantee that the total flow for each actuator does not go beyond its upper limit. Actuator constraints: Ax ≤ b As explained in the previous section, A, whose row dimension is the number of actuators and column dimension is the number of paths, is a matrix formed by ones and zeros that indicates which actuators are used in each path. The product of this matrix with the solution vector x gives as a result the flow that goes through each actuator. Vector b contains the maximum actuator flow. Demand constraints: Aeq x = beq The total volume of water from sources to each demand sector must be equal to its demand. This can be expressed by using equality constraints related to demands and by introducing matrix Aeq that indicates which demand sector is supplied from which path. The row dimension of matrix Aeq is the number of demand sectors while column dimension is number of paths. They are used to restrict the flow in each path by establishing the interval of possible values due to operational limits of the actuators involved in the path. The upper limit ub is given by the minimal of the actuator upper bounds involved in the path, while the lower limit lb is the maximal of the actuator lower bounds in the path. Path capacity constraints: lb and ub From the optimal flow path calculation, the source price for the transport layer (including both the production and transportation costs) can be obtained as indicated in Algorithm 2 in lines 23 and 24. The economical unitary costs for the sources, C s1 and C s2 , are calculated by weighted averaging the optimal flow paths linking each source with the supply demands. The detailed calculations for every step of OPM are described in Algorithm 2. Calculating the source price. 3.3.1.2 Measured Disturbance. In the conceptual model of the supply layer, the whole transportation layer is simplified as one aggregated demand. Measured state in every optimization process for the supply layer should be sum of the related demand every prediction horizon (here 24 hours) M s (k) = 24 X dt (k, m) (3.17) m=1 where dt (k, i) is demand vector at the transportation layer corresponding to the k-th day. 53 3.3 Temporal Multi-layer MPC Scheme Algorithm 2 Optimal Path Method 1: x := [x1 , x2 , ..., x p ]; {optimization vector} 2: lb := [min x1 , min x2 , ..., min x p ]; {lower bounds of x} 3: ub := [max x1 , max x2 , ..., max x p ]; {upper bounds of x} 4: S ource := [s1 , s2 ]; {source matrix} 5: beq := [d1 , d2 , ..., dm ]; {demand node matrix} 6: Actuator := [a1 , a2 , ..., an ]; {actuator matrix} 7: build 0 − 1 exhaustive path matrix 8: Path := [s1 , a11 , a21 , ..., d1 ; ...; s2 , a12 , a22 , ..., dm ] {number of row is p} 9: build 0 − 1 actuator and path matrix 10: A := [a11 , a21 , ..., a p1 ; ...; an1 , an2 , ..., a pn ] 11: b := [maxa1 , maxa2 , ..., maxan ] 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: {maximum flow column for all the actuators} build 0 − 1 demand and path matrix Aeq := [d11 , d21 , ..., d p1 ; ...; dm1 , dm2 , ..., dmp ](24)(3600) Build cost matrix contain electrical and water cost c := [c1 ; c2 ; ...; cn ]; Set objective function fob j = cT Ax; Optimizing the problem x = linprog( fob j , A, b, Aeq , beq , lb , ub , x0 , option) {x0 is provided} Calculating the flow through each actuator; f low = Ax Calculating the source price by weighted averaging the optimal flow paths linking sources and demands; C s1 = cTs1 (A[s1, :]x(s1))/ f low[s1] C s2 = cTs2 (A[s2, :]x(s2))/ f low[s2] 54 3.3 Temporal Multi-layer MPC Scheme Thus, M s (k) should be considered as the demand for the supply layer d s (k) = M s (k) 3.3.1.3 (3.18) Target Constraints. The goal for the temporal coordination algorithm is transferring management policies from the upper (supply) to the lower (transportation) layer. In order to achieve this coordination, the following constraint is added to the lower layer MPC: 24 X u(k, m) ≤ T d (k) (3.19) m=1 where u is the shared control vector between supply and transportation layers. This constraint is introduced in order to enforce that the amount of water decided to be transferred from the supply to the transportation layer by the upper layer MPC is respected by the lower layer MPC. Without such a constraint, the lower layer MPC would decide the amount of water ignoring the upper layer MPC policy. The coordination working structure is shown at Figure 3.3. Daily Optimization Optimization of x(k), x(k+1), … (Every day) Ms(m/24) Td(k) Yes Hourly Optimization Optimization of u(k,m), u(k,m+1), … (Every hour) If m/24 ϵ Z No Figure 3.3: Upper and Lower layer optimizations of multi-layer MPC 55 3.4 Formulation of the Temporal Multi-layer MPC Scheme 3.4 3.4.1 Formulation of the Temporal Multi-layer MPC Scheme Formulation of Temporal Coordination Problem As explained in previous sections, the goal for the temporal coordination algorithm is transferring management policies from the upper (supply) to the lower (transportation) layer. In order to achieve this coordination, the constraint (3.19) is added to the lower layer MPC. Algorithm 3 shows how this constraint, that establishes a daily limitation, is generated and adapted at every time iteration of the lower layer MPC that operates at a hourly scale. Algorithm 3 takes into account the following facts when generating the constraint (3.19): • after the application of n hourly control actions u s (m) corresponding to the k-th n P day, the total remaining water for this day will be: T d (k) − u(m) m=1 • when limiting the control actions in the prediction horizon L, there is a part of control actions u(m) that corresponds to hours of the current day k that should be limited by T d (k), while the control actions correspond to hours of the next day n P k + 1 that should be limited by T d (k) − u(m). m=1 • the generated constraints are added as additional constraints of the BOP problem associated to the lower layer MPC. 3.4.2 Formulation for Predicting the Water Demand In order to implement the temporal multi-level MPC approach, two demand forecasts algorithms have been considered in this work (see Figure 2.1), based on the approach proposed in [107]. One at the daily level and the other at the hourly level: • A time-series modelling to represent the daily demand forecast. • A set of different daily flow demand patterns according to the day type to cater for different consumption during the weekends and holidays periods. Every pattern consists of 24 hourly values for each daily pattern (hourly demand forecast). The demand forecasting algorithm will run in parallel with the MPC algorithms both in supply and transportation layers to obtain the pattern of daily and hourly flow demand. 56 3.4 Formulation of the Temporal Multi-layer MPC Scheme Algorithm 3 Temporal multi-layer coordinator 1: L := 24 hours 2: I := 24N hours 3: T s := 1 hour {start creating new constraints for lower-layer BOP } 4: for i := 1 to I do 5: d := f loor(i/24) 6: t := rem(i, 24) 7: if t == 0 then 8: Update BOP by adding the following constraints: 9: u(1|k) ≤ T d (d) − i−1 P u s ( j|k); j=i−L+1 10: L P j=2 11: 12: 13: 14: u( j|k) ≤ T d (d + 1); end if if t == 1 then Update BOP by adding the following constraints: L P u( j|k) ≤ T d (d + 1); j=1 15: 16: 17: 18: end if if t == 2 then Update BOP by adding the following constraints: L−1 P u( j|k) ≤ T d (d + 1); j=1 19: 20: 21: 22: 23: 24: u(L|k) ≤ T d (d + 2); end if if t ≥ 3 then Update BOP by adding the following constraints: L−t+1 i−1 P P u( j|k) ≤ T d (d + 1) − u s ( j|k); j=1 L P j=L−t+2 j=i−L+1 u( j|k) ≤ T d (d + 2); 25: end if 26: Solve BOP to obtain u( j|k), u( j + 1|k), . . . with the new constraints added 27: u s (i|k) := u(1|k); 28: end for {end of 0 i0 loop} 57 3.5 Case Study: Catalunya Regional Water Network 3.5 3.5.1 Case Study: Catalunya Regional Water Network Description The Catalunya Regional Water Network lies within the Catalunya Inland Basins, from which the Metropolitan area of Barcelona is fed and where most of the population is concentrated (approximately 5.5 million people). The Catalunya Regional Water Network composed mainly by two rivers (Llobregat and Ter) and related components. An assessment based on data obtained by the supply companies in the Barcelona metropolitan area shows that in 2007, 81 percent of the water input came from surface sources. Of the total water input, 90 hm3 came from the Llobregat system and 124 hm3 from the Ter system. The water flow supplied by the Ter and Llobregat rivers are regulated respectively by three and two reservoirs and purified by one and two water treatment plants, respectively. In Figure 1.4 of Chapter 1, an aggregate model of Catalunya Regional Water Network is provided. According to the definition of functional decomposition, the Catalunya Regional Water Network can be separated into three layers. The supply layer, is composed by rivers Llobregat, Ter and all the connected elements, at the two sides of Figure 1.4. The transportation layer, composed by metropolitan areas and also treatment, desalination plants within them, is in the center of Figure 1.4. Demand areas at the transportation layer correspond to the distribution layer, which is not described in this network. The hydrological regime of Catalunya, is characterized by the irregularity of its rainfall pattern, which, as is typical of the Mediterranean climate, varies greatly between years. This makes the region especially vulnerable to drought episodes, which are expected to increase due to climate change. Moreover, according to the historical evolution of water reserves evolution in Llobregat and Ter reservoirs, which are the most important reservoirs in the Catalunya Regional Water Network, in the past thirty years (1982-2012), both reservoirs have had more than 6 times water warning problems. And, what is worse, in the recent 20 years (1992-2012), the frequency is increasing, as Figure 3.4 shows. In order to solve this water shortage problem, a desalination plant has been built, which is useful to mitigate the water scarcity. However, the water comes at a large economic and environmental cost representing a big expenditure. So, searching for an optimal control technique to meet more efficient use of water resources is quite crucial in such a network. This is the motivation for developing the multi-layer MPC scheme proposed in this paper. 58 3.6 Results of Temporal MPC Control Scheme Figure 3.4: Droughts periods in the Catalunya Regional Water Network 3.6 3.6.1 Results of Temporal MPC Control Scheme Supply Layer Three scenarios are considered according to amount of water in different rivers, which are: • Scenario 1: More initial water in Llobregat than in Ter. • Scenario 2: More initial water in Ter than in Llobregat. • Scenario 3: Initial water in both rivers are similar. According to real water usage policies, for the first two scenarios, when water in one river is adequate for use while in another river not, management policies will be set to extract water from only one of the rivers. For the scenario 3, when water quantity is similar in both of rivers, according to the balance management, which is one of control objectives in the supply layer, water consumption in both of the rivers will be proportional to their supplying capacity. Table 3.2 provides detailed results and also the improvement of water usages in the two rivers achieved by the proposed multi-layer MPC scheme. In this table, Source means outside sources flow into rivers, Fixed Demand means fixed demands which can not choose water source while Variable Demand is the demand which can receive water from more than one river. BD, abbreviation of Balanced Demand, is water volume that has been consumed from each of the reservoirs and PB, abbreviation of Proportion of Balanced demand, is the proportion of BD 59 3.6 Results of Temporal MPC Control Scheme (a) before (b) after Figure 3.5: River flow comparing with ecological level before and after ecological control in river Llobregat for the two reservoirs. PR, abbreviation of Proportion of Reservoir capacity, is the proportion of storage capacities of the two reservoirs. The similar values for PB and PR is what the multi-layer scheme wants to reach. And SA, abbreviation of Supplying Ability, is water supply ability in days of the whole water network before meeting a water deficit problem at the hypothesis with no rain and no water flow coming from outside. The comparisons prove that, after using this proposed MPC scheme, the proportion of water usage from two rivers (58.93%, which is ratio of Llobregat/Ter) is much closer with proportion of their storage capacities (53.48%). Moreover, the Catalunya Regional Water Network can supply water 65 days longer than in the case without balance management, which represents an important benefit regarding the sustainable usage of water resource in the long term perspective. Table 3.2: Balancing comparison of Scenarios 3 Sc. Es. L. T. Sc. Es. L. T. Source 3008 3532 Source 3008 3532 Multi-layer MPC Control Scheme Fixed Demand Variable Demand BD 2981 724 697 3518 1196 1182 Model Predictive Control Fixed Demand Variable Demand BD 2981 7.6 -19.4 3518 1914 1900 PB PR SA 58.93% 53.48% 242 Days PB PR SA -1.02% 53.48% 177 Days Figure 3.5 is one of the examples of one river reach. The plot shows that, after ecological control, water flow at this reach could meet the ecological objective during the whole optimization process. 60 3.6 Results of Temporal MPC Control Scheme 3.6.2 Transportation Layer In the transportation layer, as shown in Figure 3.6, water transportation implies electrical costs when pumping water from lower elevation to the higher elevation. In order to show how electrical cost optimization works, the case of Masque f a reservoir, which is marked using a box in the transportation layer will be used as an illustrative example. The figure shows that this reservoir is fed by a pump and supplies water to an urban demand corresponding to the city of Masque f a near Barcelona. Figure 3.7 shows in the same plot the pump flow and the electricity tariff. From this figure, it can be noticed that the pump sends more water to the reservoir at the lower price period and less or no water at the higher price period. Figure 3.8 shows in the same way the water level in the Masque f a reservoir altogether with electricity fee of the pump connected with that reservoir. The water level increases when the connected pump is working corresponding with the night period when the demand is minimal and electricity is cheaper. On the other hand, during the day the level decreases because consumers start demanding water and pumping is minimized because electricity is expensive. The volume of water that should be stored in the reservoir is determined by the MPC controller taking into account a 24-hour ahead demand forecast. For the rest of the control objectives in transportation layer, Figure 3.9 shows water level of one tank Dep_T rinitat compared with its safety level before and after the safety level control. 3.6.3 Coordination During the coordination process, management policies at the supply layer are transferred to the transportation layer using the way of set-point as discussed in Section 3.3. Figure 3.10 and Figure 3.11 show the amount of water consumed by the transportation layer from different rivers in order to satisfy the same demands before and after coordination, respectively. The two figures prove that average levels of water consumptions from two rivers are much closer after balance management. Figure 3.12 shows source flow comparisons between multi-layer MPC and centralized MPC, which proves the similarity between the two kinds of controllers. Table 3.3 provides detailed numerical results and compares the obtained control results in terms of economical performance over four days among the three different control techniques: • Current Control: Control the transportation layer of Catalunya Regional Water Network using heuristic strategies by human operators. • Multi-layer Model Predictive Control Scheme: 61 3.6 Results of Temporal MPC Control Scheme Dem_C250 Con_C250_7 Con_C250_6 Bom_SQRDC Con_C250_8 Dep_C250 Nud_C250_3 Con_C250_9 Con_C250_10 ETAP_Cardedeu Nud_C250_5 Con_C250_5 Dem_Cardedeu Nud_C250_4 Con_C250_11 Con_Trinitat_1 Con_Dem_Cardedeu Con_Can_Collet_1 Nud_C250_2 Dem_Abrera Con_Trinitat_2 Bom_Can_Collet Con_C250_3 Con_Trinitat_3 Con_C250_4 Con_Dem_Abrera Con_Can_Collet_2 Bom_C250_1 ETAP_Abrera Bom_Trinitat Nud_Trinitat Con_C250_2 Dep_Can_Collet Con_C250_1 Nud_C250_1 Con_Trinitat_6 Con_Trinitat_7 Con_Trinitat_4 Con_Can_Collet_3 Con_Fontsanta_1 Dem_Masquefa Dep_Masquefa Con_Masquefa_3 Dep_Trinitat_200 Con_Fontsanta_4 Dem_Can_Collet Bom_Masquefa Bom_Fontsanta Con_Fontsanta_2 Dem_Garraf Dep_Garraf Dep_Trinitat Con_Fontsanta_3 Con_Trinitat_5 Dep_Fontsanta Con_Garraf_2 Dem_Trinitat Con_ITAM_Llobregat_2 Con_Trinitat_8 Bom_ITAM_Llobregat Con_Fontsanta_5 Con_ITAM_Llobregat_1 ITAM_Llobregat Con_Dem_SJD Node13 Node14 Tra_Monar_5 Dem_SJD Con_Isjdsub ISJDSub Figure 3.6: Transportation network Figure 3.7: Pump flow with electricity price 62 3.6 Results of Temporal MPC Control Scheme Figure 3.8: Water level of tank Dep-Masquefa (a) before (b) after Figure 3.9: Water level of tank Dep-Masquefa before and after safety control starts from the date of 01/08/2011 63 3.6 Results of Temporal MPC Control Scheme Figure 3.10: Flows from the two rivers before using temporal coordination with x-time and y-flow axis Figure 3.11: Flows from two rivers after using temporal coordination with x-time and y-flow axis 64 3.6 Results of Temporal MPC Control Scheme Figure 3.12: Source flows comparison between Multi-layer MPC and Centralized MPC Control the same network using Multi-layer Model Predictive Control techniques with temporal multi-level coordination between the supply and transportation layers. • Model Predictive Control: Control the transportation layer of Catalunya Regional Water Network using Model Predictive Control techniques, where no coordination and communication between the supply and transportation layers is used. Table 3.3: Closed-loop performance results (all values in e.u.) Define Current Control Day Wat. Ele. Tot. 11/08/02 240 100 340 11/08/03 239 106 345 11/08/04 246 94 340 11/08/05 264 110 374 Proportion Multi-layer MPC Wat. Ele. Tot. 213 44 257 237 47 284 238 48 286 253 66 319 -5% -50% -18% Wat. 141 170 171 168 -34% MPC Ele. 40 39 41 42 -61% Tot. 181 209 212 210 -42% In the Table 3.3, Wat., abbreviation of Water, means water cost during the day, while Ele., abbreviation of Electricity, shows electricity cost and Tot., abbreviation of Total, means the total cost which include both water and electricity. The indices representing costs are given in economic units (e.u.) instead of euro due to confidentiality issues. The row of Proportion is the improved proportion to the current control. From this table, the result shows that, Multi-layer MPC technique with temporal coordination is 65 3.7 Integrated Simulation and Optimization Scheme better than the current control but a little worse than MPC technique without coordination regarding the economical cost, especially concerning the water source cost. The explanation is that while introducing coordination techniques, management policies at the supply layer have also been introduced to the transportation layer. As a consequence, it could happen that demands at the transportation layer have to consume less water from the cheaper river while consume more from the other river which increases the cost. From the perspective of long term, sustainable usage and ecological protection of rivers have been achieved at the price of certain limited cost. Besides that, even from the economical perspective, the Multi-layer MPC with coordination techniques is more feasible than MPC without coordination because the multi-layer MPC can make the Catalunya Regional Water Network supply water for 65 days longer as Table 3.2 shows, which can save much economical expense for solving the water deficit problem. 3.7 Integrated Simulation and Optimization Scheme Simulation could be the starting point in the planning of regional water network but in view of the large number of control strategies, capacity and operating policy, simulation without preliminary screening through optimization would be very time consuming. The studies of large scale systems at [26] and [64] have indicated that even with the use of simple programming approaches such as LP, valuable improvement can be obtained. SIMULINK, as talked about in [61], is an environment for multi-domain simulation and model-based design for dynamic and control systems. It provides an interactive graphical environment and a customizable set of block libraries that allow to design, simulate, implement, and test a variety of systems, used in communications, control, signal processing, video processing, and image processing. According to these properties, SIMULINK is appropriate to develop a water network simulation environment that allows to include a network model and the cost function computation. This model allows to interface the controller, developed in this work in MATLAB using the MPC method, which provides the set points of the related elements and meanwhile close a control in a feedback loop as in [43]. Identifying effective pre-defined operating rules for simulating complex water supply systems is a challenging task. To overcome this problem the researchers generally employ optimization methods coupled to simulation models like [64] and [2]. In regional water network, simulation and optimization are integrated in the feedback way as provided in Figure 3.13. It shows that, simulation and MPC optimization models are working interactively by communicating mutual information. In every iteration, the MPC optimizer provides optimized control actions as set-point flows to the simulator. After being simulated, the produced state variables, which represent tanks/reservoirs volume, are sent back to the MPC optimization model as initial 66 3.7 Integrated Simulation and Optimization Scheme tanks/reservoirs volume for the next iteration. Figure 3.13: Feedback structure of Simulation and Optimization 3.7.1 Simulation In spite of the development of optimization methodologies, simulation modelling techniques remain in practice a prominent tool for regional water network planning and management studies. Simulators associated with regional water network are usually based on mass balance equations and dynamic behavior of reservoir systems using inflows and other operating conditions. Application of simulation techniques to regional water network planning and management started with U.S. Army Corps of Engineers (USACE), who built simulations of Missouri River. The famous Harvard Water Program applied simulation techniques to the economic design of water resources as shown in [8]. The simulated models produced the behavior for power generation, irrigation and flood control as reported in [34]. At the beginning, the simulator requires the parameters of every elements and the values of the actuator set-points or the demands as explained in [43]. All these data, are loaded from the database to the workspace, which has been saved in a different structure for all the considered elements. Figure 3.14 is the main window of the regional water network simulator environment, which includes inputs, outputs and also all the functional blocks needed during the whole simulating process. The blocks at the left side are the main inputs, providing and updating the required parameters (e.g. water demands, objective weights or electricity price of pumps) to the simulator by loading related data file. Blocks on the right side are the main outputs for visualizing the simulating results. Inside the center part, embedded the complete water network, see Figure 3.16, which is the simulating of the regional water network of Catalunya case study as an example. 67 3.7 Integrated Simulation and Optimization Scheme Figure 3.14: Main window of simulator 3.7.2 Optimization The MPC controller computes the optimal solution with a predictive horizon and a multi-objective cost function, which provides the control strategy for the water networks. At any time interval, only the first set-point value is used and at the next time interval a new computation is started. The results are obtained interfacing the simulator described in the section above, with the MATLAB platform with the help of TOMLAB/CPLEX optimizer. 3.7.3 Integration scheme of Simulator and Controller As presented in Figure 3.13, the MPC controller coordinates with the simulator by communicating and exchanging mutual information. This integration is achieved by means of two S-functions (see SIMULINK manual for more details) S − controller and S − simulator, where they produce, transfer and receive the useful information in a closed loop as shown in Figure 3.15. In this closed loop, the optimizer will first produce the optimized control actions and send them to the simulator as set-points. After the simulation, the updated states and the implemented control actions are transferred into the controller as state estimation and initial set-point values respectively for the next optimizing process. Initial data for the first optimizer process is provided. The scheme is working emulating real-time operation by receiving and updating the demand and the measurements of the network real state from the telemetry system provided by SCADA system. 68 3.7 Integrated Simulation and Optimization Scheme Figure 3.15: Integration of optimization and simulation blocks In order to guarantee that the optimizer and simulator in the integrated scheme can work at a consistent pace, variable sampling steps have been used. There are two sampling time deltaT and mindeltaT , where deltaT is the sampling time for MPC optimizer, which equals with 10800 seconds, while mindeltaT is the sampling time for simulator, here equals with 30 seconds. The two different sampling time synchronize the simulator and optimizer as presented in Algorithm 4 and are selected according to the network dynamics. Algorithm 4 Integrated Simulation and Optimization Algorithm in S-functions 1: DeltaT := 10800 seconds {sampling time of optimizer} 2: mindeltaT := 30 seconds {sampling time of simulator} 3: K := T sim /mindeltaT {scenario of simulator, T sim is the simulating time} 4: for k := 1 to K do 5: if mod(k ∗ mindeltaT, deltaT ) == 0 then 6: i := (k ∗ mindeltaT )/deltaT 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: {step of optimizer} if i == 1 then xinit (i) = XINIT {XINIT is known value} S im.U (k) = Optimizer ( xinit (i), block (i) ) {Run MPC optimizer} { block (i) are known values of demands, objective weights, electricity price.} end if end if S tate (k) = S imulator ( S im.U(k), block(k) ) {Run Simulator} if mod(k ∗ mindeltaT, deltaT ) == 0 then i := (k ∗ mindeltaT )/deltaT xinit (i + 1) = S tate (k) end if end for 69 3.8 Results of Integrated Optimization and Simulation 3.8 3.8.1 Results of Integrated Optimization and Simulation Simulation Scheme of the Catalunya Regional Water Network Figure 3.16: Simulation network scheme of Catalunya Regional Case Study Figure 3.16 is the whole simulation network scheme of Catalunya Regional case study, where the two part at the sides are two rivers which names Llobregat and Ter and the center part is the aggregated network of water transportation in Barcelona city. As presented in Section 3.6.1, considering from where the demands can receive water, there are three kinds of scenarios divided by the amount of water in Llobregat and Ter rivers. For illustrating the integrated optimization/simulation scheme, only Scenario 3 is used. For the Scenario 3, water is abundant in both of rivers while the corresponding water consumption will be proportional to their supplying ability according to the balance management, which is one of control objectives of the MPC controller. The following results are used to show the usefulness of this tool and also the benefits of the integrated scheme that make the water supply and transport keep the supply of both rivers balanced. 70 3.8 Results of Integrated Optimization and Simulation 3.8.2 Result of the Integrated Scheme In the integrated scheme, simulator and MPC controller keep communicating at every time step. MPC optimizer send control action as set-point to the simulator, after simulating, state variables used as initial value for the next iteration. The computation of control strategies by MPC uses a simplified model of the network dynamics. The use of the combined approach of optimization and simulation contributes to gurantee that the effect of more complex dynamics, better represented by the simulation model, may be taken into account. State variables, which represent water volume evolution produced by this integrated scheme should be similar with that provided by the independent MPC controller which means MPC controller without communicating with simulator. As Figure 3.17 shows, the solid line is water volume evolution from the integrated scheme, while the dashed line shows the water volume produced by independent MPC controller, which work in a similar way. Figure 3.17: Volume comparison achieved by optimizer and by the integrated scheme On the other hand, according to the simulation structure, flow in nodes have to keep balance in every simulating and optimizing iteration. In Figure 3.18, the number one means demand satisfaction and node flow balance. Figure 3.19 compares the value of each operational goal in the objective function of the integrated and the independent control models. These values do not differ by significant amounts, so that the integrated approach does not significantly increase the operational cost. 71 3.8 Results of Integrated Optimization and Simulation Figure 3.18: Demands satisfaction and node balance Figure 3.19: Comparisons of operational goals achieved by optimizer and by integrated scheme 72 3.9 Summary 3.9 Summary In this chapter, a multi-layer MPC scheme with multi-level coordination for regional water supply systems is proposed in order to manage the regional water network in an integral way satisfying the global objectives regarding the sustainable use of water resources and environment protection when meeting the water demands. The need of multi-layer scheme derives from the fact that different networks in the water supply and transportation systems are operated according to different management goals, with different time horizon. While the management of the supply network is mainly concerned with long term safe-yield and ecological issues, the transportation layer must achieve economic goals in the short term (hourly strategy), while meeting demands and operational constraints. The use of the multi-layer modelling and the temporal hierarchy MPC coordination techniques proposed in this chapter makes it possible to achieve communication and coordination between the two layers in order to let individual operational goals affect each other, and finally, obtain short-term strategies which can effectively consider long-term objectives as well. According to objective functions, multi-layer MPC is used to generate control strategies for the complete regional water system to meet urban demands and as much irrigation demand as possible using optimized economical cost, safety water level in reservoirs, ecological flows in rivers and smooth flow control in actuators. The case study of the Catalunya Regional Water Network has been used to exemplify and verify the proposed management methodology. Results have shown the effectiveness of the proposed modelling and control methodologies allowing to establish a trade-off between short and long-term goals altogether that would not be possible if separate controls were applied. This is the main achievement of the proposed scheme. The main source of uncertainty is related to demands, although some uncertainty in the network dynamics is present as well because the use of simplified control oriented models. In this chapter, the proposed MPC controller does not handle the uncertainty explicitly. However, because MPC approach relies on the receding horizon principle, that is based on replanning the control strategy at every iteration, taking into account the measurements collected in real-time from the telemetry system, uncertainty will be compensated up to a certain extent. To explicitly address the effect of uncertainty in the MPC controller design, robust MPC approaches may be used. These approaches in general, require a representation of uncertainty that may be either deterministic [29, 60, 73, 85, 109] or stochastic [25, 56, 117]. The application of the those techniques is left as future research, since the contribution is mainly concentrated in the coordination between MPC controllers operating at different time scales in a regional water network. This chapter also presents an integrated simulation and optimization modelling approaches in order to provide the optimal management for regional water network in real time. The use of the combined approach of optimization and simulation contributes to guarantee that the effect of more complex dynamics, better represented by the simula- 73 3.9 Summary tion model, may be taken into account. Coordination between simulator and optimizer works in a feedback scheme. This combined approach provides the optimal management for regional water network which is able to optimize and monitor large water systems including reservoirs, open-flow channels for water supply and transport, water treatment plants and so on. Real-time network monitoring is provided by the simulator, which reflects the natural behavior of water flow in a graphically way, and dynamic behaviors of reservoirs in order provide graphical data to the supervisory control and data management system. Comparisons between integrated scheme also versify the feasibility of the proposed solution. The case study of Catalunya regional water network has been also emphasize practical meaning of the proposed approach. 74 Part III Distribution Water Networks 75 Chapter 4 Combining Constraints Satisfaction Problem and MPC for the Operational Control of Water Networks As presented in Part II of this thesis, the coordinated multi-layer control method and the integrated optimization-simulation schemes guarantee global management of regional water network in the sustainable and environmental effective way using convex optimization. However, inside the distribution water networks, the optimal operational control becomes non-linear because of the hydraulic equations associated to the pressure model. Considering complexity, non-convexity and the high computational load of solving a non-linear operational control problem in DWNs, obtaining an advanced control method for optimizing the non-linear operational control problem of DWNs is an important contribution both in academia and for real operation. This chapter presents a control scheme which uses a combination of linear MPC and a Constraint Satisfaction Problem (CSP) to address the non-linear optimal operational control of DWNs. The methodology involves dividing the problem into two functional layers: First, a CSP algorithm is used to transfer non-linear DWN pressure equations into linear constraints, which can enclose the feasible solution set of the hydraulic non-linear problem during the optimization process. Then, a linear MPC with updated linear constraints is solved to generate optimal control strategies which optimize the control objective. The proposed approach is simulated using Epanet to represent the real DWN in a high-fidelity manner. Non-linear MPC is used for validation by means of a generic operational tool for controlling water networks named PLIO. To illustrate the performance of the proposed approach a case study based on the Richmond water network is used and a realistic example D-Town benchmark network is provided as a supplementary case study. 77 4.1 Introduction 4.1 Introduction The mathematical problem of optimizing DWNs involves complex large-scale multipleinput and multiple-output systems with sources of additive and, possibly, parametric uncertainty. Additionally, DWN models include both deterministic and stochastic components and involve linear (flow model) as well as non-linear (pressure model) equations. The use of non-linear models in DWNs is essential for the operational control which involves manipulating not only flow but also pressure models. Then, the resulting optimization problem becomes non-linear. Non-linear optimization (or non-linear programming) refers to optimization problems where the objective or constraint functions are nonlinear, and possibly non-convex. No general solution methods exist for the general non-linear programming problem when it is non-convex and the global optimum value is sought. Even simple-look problems with as few as ten variables can be extremely challenging, while problems with a few hundreds of variables can be intractable. Methods for the general non-linear programming problem therefore take several different approaches, each of which involves some compromise. Local optimization methods can be fast and can also handle large-scale problems although they do not guarantee finding the global optimum. Alteratively, global optimization is limited to be used in small problems (networks), where computing time is not critical, because usually search of the global solution is time consuming as discussed in [12]. Early optimization approaches for DWN typically rely on a substantially simplified network hydraulic model (by dropping all nonlinearities, for instance) as described in [30, 38, 122] and [99], which is often unacceptable in practice. Other authors employ discrete dynamic programming as presented in [20, 21, 24, 90, 96] and [139], which is mathematically sound but only applicable to small networks unless specific properties can be exploited to increase efficiency. In [93] and [51], MPC has been successfully applied to control and optimize linear flow model of DWNs. When the pressure model is considered, the non-linear functions involved will increase the computation complexity of MPC especially when the size of the network increases. Besides, convergence to the global minimum cannot be easily guaranteed using non-linear MPC if non-linear programming algorithms are used. As described in [12], for a non-convex problem, an approximate, but convex formulation must be found. By solving the approximate problem, which can be done easily and without an initial guess, the exact solution to the approximate convex problem is obtained. Many methods for global optimization require a cheaply computable lower bound on the optimal value of the non-convex problem. In the relaxed problem, each non-convex constraint is replaced with a looser, but convex constraint. This chapter mainly provides a methodology for solving large scale complex nonlinear DWN problem using a convex approximation of the problem. The solution 78 4.2 Operational Control Problem Statement is compared to that of a nonlinear MPC implementation, obtained with a tool named PLIO ([54]). Obtained results are compared using the Richmond case study introduced in [132]. Finally, the D-Town benchmark network which is much more realistic is used as a supplementary case study. The aim of solving the non-linear optimization problem of DWNs by the combined use of linear MPC and CSP is to maintain optimality and also feasibility with the tightened linear constraints as in [119]. The real hydraulic behavior of the DWN is simulated by means of Epanet ([112]), which simulates DWNs using the input optimal solution provided by MPC. As shown in Figure 4.1, the whole controlling methodology works in a two-layer structure as initially proposed in [120]: CSP is the first step of this methodology and it constitutes the upper layer used for converting the non-linear hydraulic pressure constraints into linear constraints for the MPC problem. MPC is the lower layer producing optimal set-points for controlling actuators (pumps and valves) according to the defined objective functions including minimizing operational costs of pumps, risks and safety goals. Figure 4.1: The multi-layer control scheme 4.2 4.2.1 Operational Control Problem Statement MPC for Flow Control In the case of the flow control problem, the MPC problem is based on the linear discrete-time prediction model that is obtained using the flow modelling approach introduced in Chapter 2. The standard MPC problem based on the linear discrete-time prediction model described in equations (2.1), (2.2) and (2.3) in Chapter 2 is considered. An incidence matrix Λc is defined for junction nodes in order to write equation (2.10) in matrix form, where the element in the ith column and jth row of junction 79 4.2 Operational Control Problem Statement nodes incidence matrix Λc is defined as: 1 if flow of branch i enters node j ai j = 0 if branch i and node j are not connected −1 if flow of branch i leaves node j (4.1) Notice that the incidence matrix rows correspond to the non-storage nodes, while its columns are related to the network branches. Assuming one network has nc nonstorage nodes and b branches, this incidence matrix are nc rows and b columns. Thus, the matrix form of equation (2.10) is as follows: Λc q(k) = d(k) (4.2) where q = (q1 , . . . , qb )T is a vector of branch flows, d denotes a demand vector by zero components corresponding to non-loaded nodes. Following the formalism provided in Chapter 2 for the basic formulation of a predictive control, the cost function is assumed to be quadratic and the constraints are in the form of linear inequalities. Thus, the following basic optimization problem (BOP) has to be solved: min (u(0|k),··· ,u(H p−1 |k)) s.t. 4.2.2 (4.3) J(k) x(i + 1|k) = Ax(i|k) + Bu(i|k), i = 1, · · · , H p , x(0|k) = x(k), Λc u(i|k) = d(k) xmin ≤ x(i|k) ≤ xmax , i = 1, · · · , H p , umin ≤ u(i|k) ≤ umax , i = 0, · · · , H p−1 , (4.4) (4.5) Nodal Model for Pressure Management As described at the previous chapters, in the flow model of DWNs, pipes, valves and pumps constitute a static part of the DWN. The system dynamics are associated with tanks. In equation (2.7), the mass balance in the ith tank is provided, while equation (2.16) describes the relation between tank volume and its head. After combining equation (2.16) with equation (2.7), tank dynamics both consider- 80 4.2 Operational Control Problem Statement ing flow and pressure will be presented as: hri (t) = VS iec(t)i + Ei ! P j P h qin (k) − qout (k) Vi (k + 1) = Vi (k) + ∆t j (4.6) h For every junction node j, as shown in equation (2.10), the sum of inflows and outflows is equal to zero for every non-storage node. Considering a network with n nodes and b branches, the node-branch matrix Λ will have n rows and b columns. Consider element bi j in the ith row in the jth column such that equation (4.1) holds. Therefore, the ith row contains branch to node information, as opposed to the incidence matrix, where the ith row contains node to branch information. For the sake of convenience, we will place the rows corresponding to the tank/reservoir nodes on the first nr position. The other rows correspond to the junction nodes. With the help of matrix Λ, we can write the flow-head equations as the following vector equation: " # hr + G(q) = 0 Λ h T (4.7) where • hr = (hr1 , · · · , hr,nr )T heads of reservoir/tank nodes • h = (h1 , · · · , hnc )T heads of junction nodes • q = (q1 , · · · , qb )T branch flows • G(q) = (g1 (q1 ), · · · , −gi (qi , ni , si ), · · · , g1 (q1 , G1 ), · · · , )T functions defining flowhead relationships This equation combined with equation (2.10) yields the nodal model: Λc q = d hr T Λ h + G(q) = 0 4.2.3 (4.8) MPC for Pressure Management The MPC for pressure management may be defined in a similar way as MPC for flow control but with added constraints in order to consider the pressure models. In the case of pressure control of DWNs, the MPC is defined as 81 4.3 Proposed Approach Problem 1 min (u(0|k),··· ,u(H p−1 |k)) s.t. (4.9) J(k) x(i + 1|k) = Ax(i|k) + Bu(i|k), x(0|k) = xk , Λc u(i|k) = d(k), x(i|k) + Ei , hr (i|k) = S eci " # T hr (i|k) Λ + G(u(i|k)) = 0, h(i|k) xmin ≤ x(i|k) ≤ xmax , umin ≤ u(i|k) ≤ umax , i = 1, · · · , H p , i = 1, · · · , H p , i = 0, · · · , H p−1 , (4.10) (4.11) (4.12) (4.13) (4.14) (4.15) As described above, MPC for pressure management is non-linear because of added pressure constrains in equation (4.13), which adds complexity to the optimization problem for the large scale DWNs. 4.3 4.3.1 Proposed Approach Overview of Scheme CSP-MPC The scheme integrating CSP and MPC for DWNs is presented in Figure 4.2, which shows that the main principle of this proposed control scheme is translating the equations of the non-linear pressure model into linear constraints, which may be tackled by MPC using only the flow model with the CSP constraints. The linear constraints produced by CSP will be combined together with the initial constraints of the linear MPC for flow control. With this scheme, Problem 2 which is a non-linear MPC, will be translated into a linear MPC problem with updated constraints Problem 2 82 4.3 Proposed Approach Figure 4.2: Working principle of CSP-MPC min (u(0|k),··· ,u(H p−1 |k)) s.t. (4.16) J(k) x(i + 1|k) = Ax(i|k) + Bu(i|k), i = 1, · · · , H p , x(0|k) = xk , Λc u(i|k) = d(k) 0 0 xmin ≤ x(i|k) ≤ xmax , i = 1, · · · , H p , 0 0 umin ≤ u(i|k) ≤ umax , i = 0, · · · , H p−1 , (4.17) (4.18) (4.19) (4.20) where equation (4.19) and equation (4.20) are the updated constraints resulting from solving the CSP associated to the pressure equations. 4.3.2 4.3.2.1 Definition of CSP Introduction. As introduced in [65], a CSP on sets can be formulated as a 3-tuple H = (V, D, C), where • V = {v1 , · · · , vn } is a finite set of variables. • D = {D1 , · · · , Dn } is the set of their domains. • C = {c1 , · · · , cn } is a finite set of constraints relating variables of V. Solving a CSP consists of finding all variable value assignments such that all constraints are satisfied. The variable value assignment (ẑ1 , · · · , ẑn ) ∈ D is a solution of H if all constraints in C are satisfied. The set of all solution points of H is called the 83 4.3 Proposed Approach global solution set and denoted by S(H). The variable vi ∈ V is consistent in H if and only if ∀ẑi ∈ Di , ∃(ẑ1 ∈ D1 , · · · , ẑn ∈ Dn ), such as (ẑi , · · · , ẑn ) ∈ S(H) as presented in [126]. The solution of a CSP is said to be globally consistent if and only if every variable is consistent. A variable is locally consistent if and only if it is consistent with respect to all directly connected constraints. Thus, the solution of the CSP is said to be locally consistent if all variables are locally consistent. An algorithm for finding an approximation of the solution set of a CSP can be found in [65]. 4.3.2.2 Implementation using Intervals. It is well known that the solution of CSPs involving sets has a high complexity as explained in [65]. However, a first relaxation consists of approximating the variable domains by means of intervals and finding the solution through solving an interval CSP. The determination of the intervals that approximate in a more fitted form the sets that define the variable domains requires global consistency, what demands a high computational cost as in [62]. A second relaxation consists in solving the interval CSP by means of local consistency techniques, deriving on conservative intervals. Interval constraint satisfaction algorithms have a polynomial-time worst case complexity that implement local reasonings on constraints to remove inconsistent values from variable domains. In this chapter, the interval CSP is solved using a tool based on interval constraints propagation, known as Interval Peeler. This tool has been designed and developed by the research team of Professor Luc Jaulin whose description can be found in [9]. The goal of this software is to determine the solution of interval CSP in the case that domains are represented by closed real intervals. The solution provides refined interval domains consistent with the set of interval CSP constraints as provided in [105]. 4.3.3 CSP-MPC Algorithm The CSP-MPC approach is described as presented in Algorithm 5 where the non-linear constraints of the non-linear MPC presented in Problem 1 are formulated as a CSP. At each time interval, this CSP algorithm will produce updated constraints (4.19) and (4.20) to Problem 1 by means of propagating the effect of non-linear constraints equation (4.13) into the operational constraints equation (4.14) and equation (4.15), which will be used for linear MPC to generate optimized control strategies. 84 4.3 Proposed Approach Algorithm 5 CSP-MPC Algorithm 1: for k := 1 to H p do 2: U(k − 1) ⇐ [umin (k), umax (k)] 3: X(k) ⇐ [xmin (k), xmax (k)] 4: D(k) ⇐ [dmin (k), dmax (k)] 5: end for X 6: 7: 8: 9: 10: 11: D U }| { z }| { z }| { z V ⇐ x(1), x(2), ..., x(H p ), u(0), u(1), ...u(H p − 1), d(0), d(1), ...d(H p − 1) D ⇐ X(1), p ), U(0), U(1)...U(H p − 1), D(0), D(1)...D(H p − 1) " X(2)...X(H # T hr C⇐Λ + G(u) = 0 h H ⇐ V, D, C S = solve(H) Update limits for the linear MPC problem using the CSP solution 4.3.4 Modelling Uncertainty Some of the functional elements in DWNs involve uncertainty. This is the case of demand forecasts during the MPC problem horizon. A way to consider this uncertainty is by means of combining MPC and Gaussian Process to solve the uncertainty problem as first proposed by [82]. In this work, it was suggested that Gaussian process could be an approach to model and forecast demands and to implement robust MPC for DWNs. In order to solve the difficulty of multiple-step ahead forecasts, [137] and [136] propose a new algorithm scheme denoted Double-Seasonal Holt-Winters Gaussian Process (DSHW-GP) for multi-step ahead forecasting and robust MPC to take into account the influence of disturbances on state trajectories. Using the CSP-MPC approach, the demand could be included in the variable set V with the domains defined in equation (4.21) in order to consider the disturbance uncertainty into CSP-MPC: d0 (k) − ∆e ≤ d(k) ≤ d0 (k) + ∆e, k = 1, · · · , H p , (4.21) where d is the real demand, d0 is the demand forecast, and ∆e represents the demand uncertainty that can be obtained, e.g, using the method proposed by [137] and [136]. 4.3.5 Simulation of the proposed approach Hydraulic network models are widely used as tools to simulate water distribution systems, not only in academic research, but also by water companies in their daily operation, see [66]. There are many simulation packages. One of the most widely used is Epanet which is designed to be a research tool for improving and understanding the behavior of DWNs dynamics. This simulator has been used in many different kinds of applications in water distribution systems analysis: sampling program design, 85 4.4 Illustrative Example: Richmond Water Network hydraulic model calibration, chlorine residual analysis and consumer exposure assessment are some examples, see [112]. In this chapter, Epanet is used for simulating hydraulic behavior with the optimal actuator set points obtained from the CSP-MPC optimizer. The way of simulating CSP-MPC using Epanet is exchanging flow set-points and tanks/reservoirs dynamic behaviors at each time step, following the work flow shown in Figure 4.3. The continuous flow set-points are translated to ON-OFF pump operation using the Pump Scheduling Algorithm (PSA) that will be explained in detail in Chapter 5, which optimizes the difference between optimal pump flow Vĉ and the simulated pump flow Vt in [121]. Figure 4.3: Simulating CSP-MPC using Epanet 4.4 4.4.1 Illustrative Example: Richmond Water Network Description of Richmond Water Network To validate the proposed CSP-MPC approach, the Richmond water distribution system which is available from the Center of Water Systems of Exeter University and also the object of study in [132], is used. The Richmond case study includes one reservoir, four tanks, seven pumps and some one-directional pipes and valves, as Figure 4.4 shows using Epanet. 86 4.4 Illustrative Example: Richmond Water Network Figure 4.4: The Richmond water distribution system in Epanet 4.4.2 CSP for different configurations In the Richmond distribution water network, there are mainly three different kinds of configurations, which lead to non-linear constraints in the MPC problem: Case 1 Valve Demand: demand connected to one tank by means of a valve. Case 2 Pump Demand: demand connected to one tank by means of a pump. Case 3 Complex Node Demand: demand connected to a node, which has direct or indirect connection with more than one tank. 4.4.2.1 Case 1: CSP for a valve connected to a demand. Figure 4.5: Valve Demand configuration As shown in Figure 4.5, a tank is connected to a demand by means of a valve. In this case, the valve flow is always equal to the demand. Just as an example, assuming that the cross-section area of the tank S ec is 1m3 , elevation difference between tank and demand ∆E is 1.65m, L, D and C are the length, diameter and friction coefficients of the connecting pipe, which are constant, the demand flow d is 6.3375, R is the valve friction, g p is the head loss for the pipe, gv is the head loss for the valve, G is the valve 87 4.4 Illustrative Example: Richmond Water Network control variable, which is between 0 and 1. The CSP in Algorithm 5 can be formulated considering that: • D: Variable domains coming from the physical limits x ∈ [0, 50], u ∈ [0, 6.3375] • C: Mass conservation constraints x/S ec = g p + gv + ∆E. g p = (10.29 × L)/(C 2 × D5.33 )d2 gv = GRd2 After solving the CSP using Interval Peeler, it is found that: • H: The solution of the CSP provides the updated variable bounds to be used in the linear MPC as follows x ∈ [10.66, 50], u ∈ [0, 6.3375] 4.4.2.2 Case 2: CSP for a pump connected to a demand. Figure 4.6: Pump Demand configuration As shown in Figure 4.6, assuming that A, B, C are constant for pump head loss equation, s is the speed, gb is the head gain provided by the pump. The CSP in Algorithm 5 can be formulated considering that • D: Variable domains coming from the physical limits x ∈ [0, 35], u ∈ [0, 1.65] 88 4.4 Illustrative Example: Richmond Water Network • C: Mass conservation constraints x/S ec = g p − gb + ∆E gb = A(d)2 + B(d)s + Cs2 g p = (10.29 × L)/(C 2 × D5.33 )d2 After solving the CSP using the Interval Peeler: • H: The solution of the CSP provides the updated variable bounds to be used in the linear MPC as follows x ∈ [3.5, 35], u ∈ [0, 1.65] 4.4.2.3 Case 3: Node connected to a complex demand. One example for the configuration of complex node demand is shown in Figure 4.7, where the complex demand node 249 indirectly connected with more than one tank through both a valve and a pump. Figure 4.7: Node connected to a complex demand In this case, the CSP problem in Algorithm 5 will be formulated taking into account: • D: Variable domains coming from the physical limits u1 ∈ [0, 10], u2 ∈ [0, 50] u3 ∈ [0, 30], xi /S eci ∈ [0, Xmaxi ] 89 4.5 Results • C: Mass conservation constraints xE1 /S ecE xE2 /S ecE xE /S ecE xA1 /S ecA xA2 /S ecA xA3 /S ecA xA4 /S ecA xA /S ecA = g p1 + g p2 + ∆E1 . = g p3 + ∆E2 . = max(xE1 , xE2 ) = g p4 + g p5 + ∆E3 . = sum(g p ) + ∆E4 . = sum(g p ) − gb1 + ∆E5 . = sum(g p ) − gb2 + ∆E6 . = max([xA1 , xA2 , xA3 , xA4 ]) After solving the CSP in Algorithm 5, the updated variable bounds to be used in the linear MPC are: u1 ∈ [3.4, 10], u2 ∈ [2.3, 50] u3 ∈ [1.5, 30], xA ∈ [10, 43] xE ∈ [4.5, 30] 4.5 4.5.1 Results Results of CSP-MPC As presented above, in order to optimize nonlinear model of a complex water network, CSP solver is used to convert the nonlinear equations into additional linear constraints. By means of Algorithm 5, Problem 1 has been transformed into Problem 2 by updating constraints for both tanks and actuators. In order to validate the effect of CSP, Figure 4.8 shows the evolution of tank volumes compared with its new penalty level constraints, which has been produced by CSP in order to meet the required pressure for the demand consumer. In Figure 4.8, tank volume from the MPC controller is always above the penalty constraints for tanks, which guarantees the required pressure for appropriate service. As discussed in previous chapter, the objective function of MPC includes the economic water transportation cost associated to the pumps that should be minimized. Figure 4.9 shows in the same plot the pump flow after applying MPC with the electricity fee of pump station 2A. From this figure, it can be seen that the MPC decides to pump when the electricity price is at the lower value reducing the operational cost of the whole network. 90 4.5 Results Figure 4.8: Comparison between tank penalty by CSP and its volume evolution Figure 4.9: Comparison between pump flow and its electricity price 91 4.6 Comparison with Nonlinear MPC 4.5.2 Results of Modelling Uncertainty In the Richmond case study, there are no leakages included and the consumer demand is modelled by means of a deterministic pattern. In order to illustrate how to manage the demand uncertainty using the CSP-MPC approach, 5% of uncertainty with respect to the nominal value has been added to the demands. As shown in Figure 4.10, the evolution of demand-5 has been changed from demand pattern into demand domains according to equation (4.21). Consequently, this affects the minimal safety volume produced by CSP-MPC as constraints of state variables to meet hydraulic requirement, which can be seen in Figure 4.11. Figure 4.10: Domains of demand-5 4.6 Comparison with Nonlinear MPC The results obtained with the CSP-MPC will be compared against nonlinear MPC. The nonlinear MPC controller will be implemented using PLIO tool ([54]). PLIO is a realtime decision support tool based on non-linear MPC for the integral operative control of water systems. PLIO has been developed using standard GUI (graphical user interface) techniques and objective oriented programming using Visual Basic.NET. In PLIO, models are built using the GAMS optimization modelling language. The resulting non-linear optimization problem is solved using CONOPT, which is a solver for large-scale nonlinear 92 4.6 Comparison with Nonlinear MPC Figure 4.11: Water penalty level comparisons of calibration of tank D optimization problem (NLP) and is developed and maintained by ARKI Consulting and Development in Denmark. CONOPT is a feasible path solver based on the proven GRG method as in [52] with many newer extensions. All components of CONOPT have been designed for large and sparse models with over 10, 000 constraints. Figure 4.12 is the PLIO model of Richmond water distribution network. Figure 4.12: The PLIO model of Richmond water distribution network With the CSP-MPC control scheme, both linear and non-linear constraints of DWNs should be satisfied. Besides that, optimal solution produced by CSP-MPC should be 93 4.6 Comparison with Nonlinear MPC similar with that from non-linear MPC in tanks dynamic evolution, pump flows and also demand node pressure. As shown in Figure 4.13, Figure 4.14 and Figure 4.15, the evolution of tank volumes, pump flows and pressure at demand nodes are quite similar using both methods, which validates the functionality of the CSP-MPC control approach for this case study. Figure 4.13: Comparison of water evolution in tank between CSP-MPC and non-linear MPC Table 4.1 shows operational cost comparisons between non-linear MPC and CSPMPC in 288 hours using a 70% efficiency. The indices representing costs are given in pounds (£). The row of Comput. time compared the needed computing time for every iteration between non-linear MPC and CSP-MPC and the time unit is second (s). Since the sampling time used by the controller is 1 hour, consequently real-time operation can be clearly guaranteed by both approaches. The column of Improvement is the improved proportion of results of the CSP-MPC control compared to the nonlinear MPC. The results presented in this table confirm that all the operational costs obtained using nonlinear MPC and CSP-MPC are similar. However, the computation time of non-linear MPC is nearly more than twice longer than the one needed by CSPMPC. The relative improvement of execution time is expected to increase in a larger network and therefore, a potential advantage in large scale systems is foreseen using CSP-MPC. 94 4.6 Comparison with Nonlinear MPC Figure 4.14: Comparison of pump flow between CSP-MPC and Non-linear MPC Figure 4.15: Comparison of demand node pressure between CSP-MPC and Non-linear MPC 95 4.7 Comparison with other approaches Table 4.1: Compar. betw. Non-linear MPC and CSP-MPC 4.7 Define Name Non-linear MPC CSP-MPC Improvement Jcost (£) Comput.time(S ) 1079.1 83 1110.3 29.2 2.89% -185.71% Comparison with other approaches Operation of the Richmond water distribution system was optimized previously using Hybrid GA (HGA) in [132] and Ant Colony Optimization (ACO) in [77], whose optimal annual operational costs are £35296 and £33683, respectively. A comparison of CSP-MPC results with the ones obtained using the HGA and ACO methods is included below, to the extent possible with the information provided in the referenced papers. The calculation for estimating annual operational cost of Richmond system is as follows Cann. = 9.8 P7 P365 j=1 i=1 ρũ(i, j)∆H(i, j)a2 (i, j) e (4.22) Considering that g is the gravity, e as efficiency for the pumps, ρ is density of water, ∆H is the head gain provided by the pump, ũ is the pump flow and a2 contains the cost of pumping. In practice, considering that efficiency e ranges from 65% to 75%, the operational annual cost obtained using CSP-MPC is ranging from £31520 to £36369, which is in order of the results obtained using HGA in [132] and ACO in [77] achieving an improved computation time. 4.8 Application Limitations of CSP-MPC in DWNs Considering the definition and interval implementation characteristics of CSP explained in above sections, the building of the constraints C in DWNs can only be generally realized in networks that do not present bi-directional flows, as initially proposed in [120]. In many DWNs, some pipes are bidirectional, which adds difficulty to build the pressure constraints set for CSP. In order to apply successfully CSP-MPC to the bidirectional DWNs, an aggregation method is used to simplify a complex water network into an equivalent simplified conceptual one first and then transform the non-linear pressure constraints into safety volumes for the tanks. This is illustrated in the next section. 96 4.8 Application Limitations of CSP-MPC in DWNs 4.8.1 Network Aggregation Method (NAM) The bidirectional pipes in DWNs have added difficulties to build the required set of constraints CSP. In order to apply successfully CSP-MPC to the bidirectional DWNs, NAM is used to simplify a complex water network into an equivalent simplified conceptual one as referenced in [88] and [121]. 4.8.1.1 Simplification. In order to obtain the conceptual model, the first step is aggregating the nodes in terminal branches with no control elements. We define the distance between nodes nk and nl by the pressure head and flow difference between them: distance(nk , nl ) = ∆Ele(nk , nl ) + p X ∆P j (4.23) j=1 f low(nk , nl ) = ∆ f low(nk , nl ) (4.24) where ∆P j means pressure head loss at arc j and p is the path between nk and nl , ∆Ele(nk , nl ) and f low(nk , nl ) are the elevation and flow difference between node nk and nl . Following all the nodes from the terminal branch upstream, the nodes whose upstream is also a demand node and connected by pipe, can be deleted after adding their pressure head and flow distances. Figure 4.16: Node topology example used to illustrate NAM As shown in Figure 4.2, node n6 can be deleted after adding distance(n6 , n5 ) and f low(n6 , n5 ) to node n5 and then continue to the upstream. Both node n4 and node n5 97 4.9 Application Example: D-Town Water Network can be deleted after adding max(distance(n4 , n3 ), distance(n5 , n3 )) and sum( f low(n4 , n3 ), f low(n5 , n3 )) to node n3 . This process will continue until the branch meets pumps, valves or tanks. 4.8.1.2 Conceptualization. The main idea of the conceptual modelling approach is to assign demands to specific sources (tanks). Considering that water flows in pumps and valves are unidirectional, demand nodes located between pumps/valves and tanks can be considered as a demand allocated directly to a source (tank). This is illustrated in Figure 4.17 and CSP will be used to guarantee the equivalence of both schemes. It is worth noticing that the conceptual model is related to a specific network configuration. If the configuration is changed, the conceptual model must be revised to make sure it represents the network operation correctly. Figure 4.17: Network conceptualization 4.9 4.9.1 Application Example: D-Town Water Network Description of D-Town Network In order to test the applicability of CSP-MPC to a complex water network with many bidirectional elements, D-Town network is used as a supplementary case study. DTown network is a complex benchmark DWN with 388 nodes, 405 links and 7 tanks and multiple bidirectional links as shown in Figure 4.18 that has already been used in [103] and [102]. The sampling time used by the CSP-MPC controller is 1 hour, while the needed real-time computing time for every iteration of CSP-MPC is around 60 seconds which is mainly consumed by PSA as presented in [121]. 98 4.9 Application Example: D-Town Water Network Figure 4.18: Original D-Town network 4.9.2 Results of NAM for D-Town The conceptual one-directional network model of D-Town was obtained using the NAM presented in Section 4.8. The original D-Town network is simplified as indicated in Figure 4.19 with 88 nodes, 144 actuators and 7 tanks while the conceptual network of D-Town is shown in Figure 4.20, where all the demand nodes have been aggregated inside one demand node and related directly with the tanks. After these transformations, the resulting D-Town model can be optimized using CSP-MPC approach proposed in this paper. 4.9.3 Results of CSP-MPC for D-Town By means of CSP, non-linear pressure equations of D-Town have been transferred into linear constraints that impose new limitations for both tanks and also actuators. Figure 4.21 shows evolution of real tanks volume compared with its updated minimal safety volume, which has been produced by CSP in order to satisfy the required pressure in every demand node. From this figure, it can be noticed that the added constraints for tanks determine the safety volumes, which guarantee the required pressure for the demand node. As discussed in Chapter 3, the objective function of MPC includes the economic water transportation cost associated to the pumps that should be minimized. Figure 4.22 shows in the same plot the pump flow after applying MPC with the electricity fee 99 4.9 Application Example: D-Town Water Network Figure 4.19: Simplified D-Town network Figure 4.20: Conceptual D-Town network 100 4.9 Application Example: D-Town Water Network Figure 4.21: Comparison of tank volume and the safety volume by CSP-MPC Figure 4.22: Comparison between pump flow and its electricity price 101 4.10 Summary of pump station S 4 . From this figure, it can be seen that the MPC decides to pump when the electricity price is at the lower value reducing the operational cost of the whole network. The results of the combined CSP-MPC approach on D-Town show that its applicability is not restricted to simple case studies, such as the Richmond networks including only un-directional flows. 4.9.4 Comparison with other Approaches Operations of D-Town network were optimized previously by a Pseudo-Genetic Algorithm (PGA) proposed by [102] and a successive linear programming proposed by [103], whose optimal annual pump costs are 168118 and 117740 euros. Up to the information in the referenced papers, a comparison of CSP-MPC is included with the calculation for annual operational cost of D-Town network. Using equation (4.22), considering pump efficiency e as 70% here, the operational annual cost by CSP-MPC is 137880 euros, which is in order of the results obtained by [103] and [102]. 4.10 Summary The combined used of CSP and linear MPC for the optimal operative control for DWNs considering both flow and pressure models has great value in theory and practice. This CSP-MPC methodology successfully optimizes complex and non-linear models at DWNs in a linear way, which realizes a significant reduction of the computing load and complexity. Because of that, the proposed methodology can be applicable to large scale distribution water networks. After using the Richmond water distribution network as an illustrative case study, the challenging application of D-Town benchmark network has conformed the feasibility in a more realistic way of CSP-MPC control scheme. The results of the combined CSP-MPC approach on D-Town show that its applicability is not restricted to simple case studies, such as the Richmond networks. Non-linear MPC implemented in PLIO tool has also verified the proposed control scheme, using Epanet as the water network simulator to reproduce the water network behavior in a highly realistic manner. Results comparison between non-linear MPC and CSP-MPC verifies that the CSP-MPC control scheme produces optimization results that are comparable to those obtained from nonlinear MPC. Furthermore, the CSP-MPC method achieves a significant improvement in computation time. Besides, the proposed approach has also been compared with ACO and HGA producing similar results regarding the operational cost. Operational cost comparisons among CSP-MPC, ACO and HGA also confirm that, the CSP-MPC scheme is also economically feasible and reasonable. Finally, the supplementary application of D- 102 4.10 Summary Town network has been proved that, the CSP-MPC control scheme provides good results even for the complex and realistic case study presenting bi-directional flows if combined with a network aggregation modelling approach. As future work, the effect of the uncertainty in the performance will be studied determined the maximum allowed uncertainty. Moreover, distributed implementations of the proposed CSP-MPC approach will be investigated. 103 Chapter 5 Two-layer Scheduling Scheme for Pump Stations 5.1 Introduction The energy required to operate pumps stations can account for a significant amount of electrical consumption in a municipality [17]. Almost 7% of the electricity consumed in the United States is used by municipal water utilities [128]. In conventional water distribution systems, pumping water comprises the major fraction of the total energy budget. In practice, the operation of a pump station is simply a set of rules or a schedule that indicates when a particular pump or group of pumps should be turned on or off. The optimal policy will result in the lowest operating cost and highest efficiency of pump station [95]. The schedule of pumping stations, which works in ON-OFF discrete way, can affect seriously the water supply process and the economical cost when supplying water. Considering the continuous characteristic of water flow in drinking water networks (DWNs), optimization of pump scheduling in DWNs becomes a mix-integer problem with high complexity and challenge to obtain a solution. Optimal pump scheduling policies will indeed decrease economic consumption of the whole flow systems. However, the dynamical and mixed-integer nature associated to the optimization of scheduling pump stations increases the complexity of the optimal control problem of water networks [80]. Modern methods of mixed-integer programming can tackle such problems but with the limitations of computation capacity and are only reasonable to the low dimensional decision vector. In the history of optimal pump scheduling, the major efforts have been in converting the optimization problem into continuous one in order to escape from the mixed-integer framework [15, 129]. A especially attractive option is to develop a transformation from the discrete to the continuous domain. Theoretically it is elegant, but it can be very sensitive to numerical 104 5.1 Introduction rounding errors during iterations and often fails in multi-level computational structures. Besides that, there are some other typical mixed-integer linear programming or dynamic programming-based algorithms which are not applicable because of the high computation load, being infeasible or may be not being efficient enough for large water networks [80][31]. In this chapter, a new multi-layer approach to solve large scale optimal scheduling problems for water distribution networks has been proposed. Optimal scheduling is a complex task because of the extended period hydraulic model and also mixed-integer control variables. Optimizing a solution may require excessive computational load which limits the application only into small networks. The main motivation of this research is to formulate an algorithm which can significantly improve the computational efficiency and make it feasible to be applied to complex large scale water networks. The presented approach divides the problem in two layers. The upper layer, which works in one-hour sampling time, uses MPC to produce an optimal flow strategy as setpoints for the lower layer. These flows are represented as continues variables, which can take any value in an admissible range. And then, a scheduling algorithm has been used in the lower layer to translate the continuous flow set-points to a discrete (ONOFF) control operation sequence of the pump stations such that the pumped water is the same amount of water as the continuous flow set-points provided by the upper layer. The tuning parameters of such algorithm are the lower layer control sampling period and the number of parallel pumps in the pump station. The proposed method has been tested using the Richmond case study. MATLAB and EPANET have been used to simulate and validate the proposed approach in the Richmond network case study [4]. Let us consider that the pump scheduling time horizon [t0 , t f ] can be split into K time steps with ∆tk length each, where ∆tk = tk − tk−1 ; k = 1, ..., K, t f = tk . This results in timing of the scheduling problem which is determined by the intervention time instants t0 , t1 , ..., tk , ..., t f . Naturally, the system control vector, p(k), represents status of pumps (ON-OFF) in each of these time stages [80]. The pump scheduling problem (PSP) for a given time horizon can be formulated as follows: 105 5.2 Presentation of the Two-layer Control Scheme min p,∆tk s.t. K X α(k) ũ(k) p(k) ∆tk (5.1) k=1 x(k) = Ax(k) + Bũ(k), k = 1, · · · , K x(0) = x0 , k = 1, · · · , K Λc ũ(k) = d(k) xmin ≤ x(k) ≤ xmax , k = 1, · · · , K ũmin ≤ ũ(k) ≤ ũmax , k = 1, · · · , K p(k) ∈ {0, 1}, k = 1, · · · , K (5.2) (5.3) where ũ(k) is the nominal pump flows (when the pump is ON) and α(k) is the unitary electrical costs for the k time stage, x(k) represents the continuous tank volumes, and the system operating cost associated to pumping. The PSP is solved by selecting a proper ∆tk according to pump operational constraints and pump control sequence p that requires minimal economic pumping cost while satisfying flow or volume requirements induced by the demands. The small value of ∆tk and the complex topology and number pumps could consequently increase the computation load. The mixture of discrete control parameters (ON-OFF pump schedule) together with the continuous dynamics of tank volumes makes PSP problem a complex mixed-integer optimization problem [80]. For this complex mixed-integer problem, the method of conversion of the mixedinteger problem into the continuous one by switching times as the control variables is indeed useful, but the solution is obtained at the expense of an increased number of decision variables, whose applicability is limited to rather small networks due to poor robustness with respect to numerical errors [80]. Fig. 5.1 shows the two-layer control scheme proposed in this chapter. 5.2 Presentation of the Two-layer Control Scheme As shown in Figure 5.2, the proposed control scheme includes two layers. The upper layer is the continuous MPC model that produces flow set-points for pumps. The sampling time in the upper layer is one hour and every pump station is simplified into a controlled flow u(k) and cost (electricity price) model α(k). The lower layer is the scheduling problem, which works in ∆tk (smaller than one hour) sampling time, and is responsible of translating the continuous flow set-points into discrete ON-OFF actions to be executed by the pumps. The resulting pump schedule is simulated by EPANET before being sent to real pumps in the network. 106 5.2 Presentation of the Two-layer Control Scheme Figure 5.1: Presentation of the proposed approach Figure 5.2: Two-layer Control Scheme 107 5.2 Presentation of the Two-layer Control Scheme 5.2.1 Optimizing Flow at the Upper layer Model Predictive Control is used to produce optimal continuous set-points pump flows for being scheduled in the lower layer. The extension to include non-linear pressure model is already presented in Chapter 4 using CSP to transfer the non-linear MPC into linear ones with added constraints. The upper layer MPC problem is based on a linear discrete-time prediction model (4.3) obtained applying the control oriented methodology introduced in Chapter 4 considering the network topology and parameters. 5.2.1.1 Operational Goals. The water distribution network is operated with a 24-hour horizon, at hourly time interval. The main operational goals to be achieved are: Jcost , J sa f ety and J smoothness with the explanation, formulation and optimization presented in Chapter 3. 5.2.2 Pump scheduling of the Lower layer Denoting ĉ as the optimal flow set-points produced by the upper layer MPC controller during the time period [t0 , t f ], the total water volume pumped during this period is Vĉ = ĉ (t f − t0 ) (5.4) As explained in Section 2, the scheduling algorithm will split the time period [t0 , t f ] into K time steps with ∆tk step length. Let us denote p as the vector which contains the discrete ON (p(i) = 1) and OFF (p(i) = 0) pump control actions [80] and ũ(t) as its nominal pump flow (that is when the pump is ON). Then, the total water volume drawn by these pump control actions during [t0 , t f ] is Vt (p(1), · · · , p(K)) = K X Z ti p(i) i=1 ũ(t) dt (5.5) ti−1 The goal of the scheduling algorithm is to minimize the difference between Vĉ and Vt in (5.4) and (5.5). Since this difference could not completely be eliminated, the scheduling algorithm should find a scheduling sequence such that the following control objective is minimized Jdis = Vt − Vĉ 108 (5.6) 5.3 Factors Affect Scheduling Algorithms 5.3 Factors Affect Scheduling Algorithms There are two parameters which can affect accuracy of the scheduling algorithm as described in previous section • time interval (∆tk ) • number of units in the pump configuration 5.3.1 Time interval In order to guarantee that the pump station configuration can meet the pump flow setpoints provided by the upper layer, the sampling time can be selected to reduce the error introduced in (5.6). R ti Assuming ∆tk is small enough in order to accurately compute the term t ũ(t) dt i−1 in (5.5) as u∗ (k) ∆tk , where u∗ (k) is the nominal pump flow in time stage [tk−1 , tk ], the equation (5.5) can be rewritten as: Vt (p(1), · · · , p(K)) = K X Z ti p(i) ũ(t) dt ti−1 i=1 K X p(i)u∗ (k) ∆tk (5.7) i=1 Consequently, the accuracy of scheduling algorithm according to (5.6) can be calculated as follows: Jdis = min(Vt − Vĉ ) min( K X p(i)u∗ (k) ∆ti − ĉ (t f − t0 )) (5.8) i=1 In practice, Jdis is affected by ∆tk , the smaller ∆tk is, the smaller (5.8) will be. Pump scheduling algorithm with ∆tk works as presented in Algorithm 6. In this algorithm, popt is the optimal working schedule for the pump, and Jdis is the optimal scheduling accuracy. However, pump scheduling includes constraints on turning on or off the pumps according to their maintenance rules which will limit the value of ∆tk in the perspective of technological constraints. In order to prevent unacceptable errors between the real and the required pump flows produced by large ∆tk , parallel pump configuration is introduced. 109 5.4 Complexity Algorithm 6 Scheduling algorithm for one pump 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: popt = [p(1), p(2), ..., p(K)] p(1) = 1 for i := 2 to K do p(i) = 0 end for for i := 2 to K do Get Jdis using Equation (5.8) if Jdis < 0 then p(i) = 1 end if end for 5.3.2 Parallel pump configuration If a single pump cannot meet the pump flow set-points determined in the upper layer, additional units in the pump station should be activated. Assuming n − 1 supplementary units are available at the pump station in order to minimize (5.6): Vĉ ≤ V1t + V2t + ... + Vn (5.9) Then, scheduling accuracy of (5.8) could be evaluated as follows Jdis = min(V1t + V2t + ... + Vn − Vĉ ) n X K X min( p(i)u∗ (k) ∆tk − ĉ (t f − t0 )) 1 (5.10) i=1 where n means the number of parallel units in the pump station which is another factor that could be used to increase the schedule accuracy: the bigger n is, the more degrees of freedom and the higher accuracy could be achieved by means of the scheduling algorithm. Algorithm 7 presents the extension of Algorithm 6 to n parallel units of the pump station. The values of pn opt are the optimal schedules of the parallel pumps, Jdis is the optimal scheduling accuracy. 5.4 Complexity Regarding complexity, computation load of the scheduling Algorithm 6 is K, where t −f K = f∆tk 0 . This means that, ∆tk can affect computation load of the algorithm since 110 5.5 Case Study Algorithm 7 Scheduling algorithm for parallel pumps 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: ms = 1 n=1 while ms = 1 do ms = 0 pn opt = [pn (1), pn (2), ..., pn (K)] pn (1) = 1 for i := 2 to K do pn (i) = 0 end for for in := 2 to K do Get Jdis using Equation (5.10) if Jdis < 0 then pn (in ) = 1 end if if in = K and Jdis < 0 then n=n+1 ms = 1 end if end for end while more computations will be added with a smaller ∆tk , and consequently decreased with a bigger ∆tk . The same reasoning can be used in case of Algorithm 7, where the computation load is K n and the computation load is increased with the number of units n in parallel. Because of that, although smaller time interval and more parallel pumps can increase scheduling accuracy, more computation load is needed. Therefore, it is important to choose proper ∆tk and n even that establishes a trade-off between accuracy and computation load. 5.5 Case Study The case study used to test the proposed approach is the Richmond water distribution system [94] as in Chapter 4. A MPC controller at the upper layer is used to produce the pump flow set-points, while the pump scheduling algorithm described in section above is used to transfer the continuous flow set-points into discrete ON-OFF operations of the pump. The MPC controller and the pump scheduling algorithm are implemented into MATLAB, while the simulation of the Richmond network is realized using EPANET, which simulates the water network using a discretization time step ∆tk to realize operations of the scheduling algorithm. 111 5.5 Case Study 5.5.1 Results for the upper layer MPC controller As described in section above, the objective function of the upper layer MPC controller leads to minimize the electrical pumping cost. Figure 4.9 in Chapter 4 shows similar realization of this objective function, which provides continuous optimal flow set-points to the lower layer of PSA. 5.5.2 Results for the lower layer scheduling algorithm After applying scheduling algorithm, continuous optimal flow will be scheduled into discrete pump actions. Figure 5.3 shows in detail the pump actions of Pump4B after using the scheduling algorithm. Figure 5.3: Optimal Schedule for Pump4B with two pump branches 5.5.3 Scheduling Results using Different ∆tk As analyzed in Section 5.3.1, time interval ∆tk can affect accuracy of scheduling algorithm. Let us consider pump4B as an illustrative example. In this case, the sampling time at the upper layer that determines t f −t0 is equal to 1 hour while the sampling time at the lower layer will be changed from one minute to two minutes to see the effect in the scheduling algorithm result. While the time interval ∆tk will be set as 1 minute and 2 minute two different values for comparing. Scheduling accuracies for these two different sampling times at lower layer are plotted in Figure 5.4, which proves that, the smaller time interval can lead to higher scheduling accuracy. 112 5.5 Case Study Figure 5.4: Flow errors in different time intervals Accuracy comparisons are provided in detail in Table 5.1, which shows that, the scheduling accuracy when lower layer sampling time ∆tk is 1 minute results in 0.64%, which is much smaller than that of 1.71% when ∆tk is 2 minutes. Table 5.1: Accuracy Comparisons of different time interval Sc. Es. T. Sc. Es. T. 5.5.4 Optimal flow 332.4045 Optimal flow 329.6 With 2-minute Time Interval Simulated flow Flow Errors 326.7351 5.6694 With 1-minute Time Interval Simulated flow Flow Errors 327.4818 2.1182 Errors in Prop. 1.71% Errors in Prop. 0.64% Scheduling Results for Different Pump Configurations Number of parallel pump branches can also affect scheduling accuracy, since the bigger the number is, the higher the accuracy is. Considering t f − t0 of pump4B as 1 hour, ∆tk as 1 minute cases with single pump4B and two paralleled pump pump4B are simulated. Their accuracies are provided in Figure 5.5. Accuracy comparisons are provided in detail in Table 5.2, which shows that, the scheduling accuracy at the paralleled pump station is nearly 100% and much higher than that of the single pump case. 113 5.5 Case Study Figure 5.5: Flow errors in different parallel when ∆tk = 1 Table 5.2: Accuracy Comparisons of different branches Sc. Es. T. Sc. Es. T. Optimal flow 526.7603 Optimal flow 518.1651 With Single Pump Simulated flow Flow Errors 521.3726 5.3877 With 2 Pumps in Parallel Simulated flow Flow Errors 518.0742 0.0909 114 Errors in Prop. 1.02% Errors in Prop. 0.01% 5.6 Summary 5.6 Summary A two-layer control scheme for solving the mix-integer optimization problem of pump scheduling in water distribution networks has been presented in this chapter. With the definition of two layers: where the upper layer works in one-hour sampling time, uses a MPC strategy to optimize a continuous-variable flow model to produce set-point pump flows for the lower layer; the lower layer translates the optimal continuous setpoints flow into ON-OFF pump operations using a scheduling method, this mix-integer problem may be solved efficiently. With the two-layer control scheme, large scale distribution water networks with many pump stations and other elements may be optimized using limited computational effort. Similarly, the method proceeds through feasible solution, so that the possibility of not reaching a feasible solution is avoided. The effect of tuning parameters (sampling time and pump configurations) of the scheduling algorithm is a trade-off between scheduling accuracy and computation load. 115 Part IV Concluding Remarks and Future Work 116 Chapter 6 Conclusions and Future Work In this thesis, multi-layer MPC schemes have been proposed and applied to complex water systems (as regional and distribution networks). The motivation of managing regional water networks, which are composed by the supply, transportation and distribution functional layers, comes from the difficulty and necessity of optimizing water systems from a global perspective with sustainable water use, environmental maintenance and economical reduction, etc. In the specific parts of regional water networks, different control objectives with different time horizon and specific difficulties appear. In the distribution layer, which aims at supplying water to domestic users, the non-linear convergence difficulty of optimizing the hydraulic model and the mixed-integer problem of pumping scheduling problem in DWNs have also been proposed and fulfilled. 6.1 Contributions The contributions of this thesis are the following • MPC controllers for different functional layers (supply and transportation layers) of regional water network have been developed, implemented and tested in simulation with realistic simulators. These controllers allow to achieve control objectives with specific time horizon according to the dynamics of each layer. • A multi-layer temporal coordination strategy to negotiate MPC controllers in different layers has been proposed. This strategy avoids the disadvantage of controlling subsystems separately that leads to the loss of performance because of the management of the water systems. • An scheme that integrates optimization (based on MPC) and simulation for regional water networks has been developed. This integration strategy overcomes 118 6.2 Conclusions the limitations of most of current simulation schemes for regional networks which are normally operated separately from the optimizer. • A linear CSP-MPC control scheme is proposed for optimizing DWNs including both flow and pressure models. This last model involve highly non-linear equations that poses a challenging non-linear optimization problem. The advantage of this control scheme is that reduces the computational complexity of optimizing large-scale nonlinear problem into a linear one with updated constraints that take into account the effect of the non-linearities. • A network aggregation method (NAM) is provided for simplifying a complex water network into an equivalent simplified conceptual one, which overcomes the CSP-MPC limitations of being only applicable to unidirectional DWNs. • A two-layer pump scheduling algorithm (PSA) has been develop to optimize pumping problem of DWNs. This algorithm avoids having to solve the mixinteger difficulty appears in pump scheduling process in an efficient way. 6.2 Conclusions From the results obtained from the validation of the contributed control schemes using different case studies and mathematical tools, the following conclusions can be drawn. • MPC has been further proved as an advanced process controller suitable for the multi-input and multi-output regional water systems by using separate MPC controllers in different functional layers and the temporal hierarchy coordinating strategy. Results have been summarized in tables and graphical plots for validation. Current control using heuristic strategies applied by human operators is used for comparison. Illustrations confirm that, MPC controllers can provide economical improvement and better performance when applied to the regional water networks. The multi-layer temporal coordinating MPC can achieve the global management policies considering sustainable water use, environmental protection, ecological efficient and saving economical costs. • The integrated optimization and simulation scheme has allowed to assess the optimal operational management for regional water network operating in realtime like manner. Besides, the use of this combined approach guarantees that the effect of more complex dynamics, better represented by simulation model, can also be taken into account. In order to validate the performance of this integrated scheme, results of graphical plots between the MPC optimizer and the integrated scheme have been provided. 119 6.3 Future Research • The linear CSP-MPC method has been proved reasonable for optimizing complex non-linear models representing DWNs. Significant reduction of the computational load and mathematical complexity has been achieved compared with non-linear MPC implementation using PLIO tool. Operational cost comparisons among CSP-MPC, ACO and the HGA confirms the applicability of CSP-MPC for efficient cost optimization. The combined application of linear CSP-MPC with NAM to approximate the non-linear MPC problem to control large scale realistic as the D-Town case study. • The two-layer PSA scheme has been certified to be able to solve the mixedinteger optimization problem efficiently with the definition and separation of the continuous MPC flow layer and discrete pump scheduling layer. With this twolayer control scheme, large scale distribution water networks with many pump stations and other elements can be optimized using limited computational efforts. The sampling time and pump configurations, which can be used as a tuning parameter, provide the trade-off between scheduling accuracy and computation load. Results summarized in tables and graphical plots have been provided for validation. 6.3 Future Research Based on the work presented in this thesis, some topics should be further researched and new topics can be addressed: • Uncertainty sources of water systems in this multi-layer MPC control scheme are mainly related with the unexpected and forecasted demand. As a starting point, in the MPC controller designed for each layer, the uncertainty of water demand or pump leakage has only been modelled in a simple way as presented in Chapter 4, which may compensated for up to a certain extent. As future research, a complete uncertainty modelling method to explicitly address the effect of uncertainty in the MPC controller design and the corresponding robust MPC control actions should be designed and applied in order to improve the stability and accuracy of the control scheme. • For the MPC controller of each layer of regional water networks, only a centralized MPC implementation has been used. Considering the complexity and computing load to produce the optimal strategy in a large scale water systems, decentralized model predictive control (DMPC) could be considered. Coordination of the different MPC controllers in the same or between different layers will also be addressed as future work. • Considering the working limitations or physical constraints of elements in the water systems (e.g. constraints on turning on or off of the pumps), there is still 120 6.3 Future Research space for improvement in theory and application for both the CSP-MPC and PSA method for proving stability, feasibility and effectiveness. 121 Part V Appendix 122 Appendix A Algorithm of Demand Forecast A.1 Daily demand forecast The daily flow model is built on the basis of a time series modelling approach using an ARIMA strategy. A time series analysis was carried out on several daily aggregate series, which consistently showed a weekly seasonality, as well as the presence of deterministic periodic components. A general expression for the daily flow model, to be used for a number of demands in different locations, was derived using three main components: • A weekly-period oscillating signal, with zero average value to cater for cyclic deterministic behavior, implemented using a second-order (two-parameter) model with two oscillating modes (p1,2 = cos (2π/7) ± j sin (2π/7)) ∆yosc (k) = ∆yint − 2 cos (2π/7)∆yint (k − 1) + ∆yint (k − 2) • An integrator takes into account possible trends and the non-zero mean value of the flow data ∆yint (k) = y(k) − y(k − 1) (A.1) • An autoregressive component to consider the influence of previous flow values within a week. For the general case, the influence of four previous days is considered (A.2). However, after parameter estimation and significance analysis, the models are usually reduced implementing a smaller number of parameters: y(k) = −a1 y(k − 1) − a2 y(k − 2) − a3 y(k − 3) − a4 y(k − 4) 124 (A.2) A.2 Hourly demand forecast Combining the previous components in the following way the structure of aggregate daily flow model for each demand sensor is therefore: y p (k) = − b1 y(k − 1) − b2 y(k − 2) − b3 y(k − 3) − b4 y(k − 4) − b5 y(k − 5) − b6 y(k − 6) − b7 y(k − 7) (A.3) The parameters b1 , . . . , b7 should be adjusted using least-squares-based parameter estimation methods and historical data. A.2 Hourly demand forecast The hourly flow model is based on distributing the daily flow prediction provided by the time-series model described in previous section using a hourly flow pattern that takes into account the daily/monthly variation in the following way: y ph (k + i) = y pat (k, i) y p (k), 24 X y pat (k, j) i = 1, . . . , 24 (A.4) j=1 where y p (k) is the predicted flow for the current day k using (A.3) and y pat is the prediction provided by the flow pattern with the flow pattern class day/month of the current day. Demand patterns are obtained from statistical analysis (for more details see [107]). 125 Bibliography [1] http://www.e-price-project.eu/website/TLL/eprice.php. 2.1.3 [2] Johnson Sharon A., Stedinger Jery R., and Staschus Konstantin. Heuristic operating policies for reservoir system simulation. Journal of Water Resources and Research, 27:673–685, 1991. 3.7 [3] Wurbs Ralph A. Reservoir-system simulation and optimization models. Journal of Water Resources Planning and Management, 119:455–472, 1993. 3.1 [4] Hossam Saadeldin Saleh AbdelMeguid. Pressure, Leakage and Energy Management in Water Distribution Systems. PhD thesis, De Montfort University, 2011. 5.1 [5] S. Aggarwal, L. Saini, and A. Kumar. Electricity price forecasting in deregulated markets: A review and evaluation. International Journal of Electrical Power and Energy Systems, 31(1):13–22, 2009. 2.1.3 [6] F. Allgower, T.A. Badgwell, J.S. Qin, and J.B. Rawlings. Nonlinear predictive control and moving horizon estrimation-an introductory overview. In Advances in Control, Highlights of ECCŠ99, Edited by F. Frank, 1999. 1.3.2 [7] S. Alvisi, M. Franchini, and A. Marinelli. A short-term, pattern-based model for water-demand forecasting. Journal of Hydroinformatics, 9(1), 2007. 2.1.3 [8] Maass Arthur, Hufschmidt Maynard M., Dorfman Robert, JR Harold A. Thomas, Marglin Stephen A., and Fair Gordon Maskew. Design of water resources systems. Harvard University Press, Cambridge, 1962. 3.7.1 [9] X. Baguenard. Personal homepage. http://www.istia.univangers.fr//baguenar/, february. 2005. 4.3.2.2 [10] B.W. Bequette. Nonlinear control of chemical processes: A review. Ind. Eng. Chem. Res., 30(7):1391–1413, 1991. 1.3.2 [11] R.B. Billings and C.V. Jones. Forecasting Urban Water Demand. American Water Works Association, USA, 2008. 2.1.3 126 BIBLIOGRAPHY [12] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, Great Britain, 2004. 4.1 [13] S.P. Boyd and C.H. Barratt. Linear Controller Design, Limits of performance. Prentice Hall, Information and System Sciences Series, Englewood Cliffs, New Jersey, 1991. 1.3.2 [14] M. A. Brdys, M. Grochowski, T. Gminski, K. Konarczak, and M. Drewa. Hierarchical predictive control of integrated wastewater treatment systems. Control Engineering Practice, 16(6):751–767, 2008. 1.3.3 [15] M.A. Brdys, B. Coulbeck, C.H. Orr, and B. Ulanicki. Optimal scheduling for a class of water supply systems. Proc. of the IFAC Symposium on Large-Scale Systems, Berlin, GDR, 1989. 5.1 [16] Mietek A Brdys and Piotr Tatjewski. Iterative Algorithms for Multilayer Optimizing Control. Imperial College Press, London, 2005. 1.3.1, 1.3.3, 2.1.2.1, 3.3 [17] L.M. Brion and L.W. Mays. Methodology for optimal operation of pumping station in water distribution systems. Journal of Hydraulic Engineering, 117:1551– 1569, 1991. 5.1 [18] ReVelle C. Optimizing reservoir resources:including a new model for reservoir reliability. Wiley, New York, 1999. 3.1 [19] E. Caini, V. Puig, and G. Cembrano. Development of a simulation environment for drinking water networks: Application to the validation of a centralized mpc controller for the barcelona case study. Internal Report of Institut de Robotica i Informatica Industrial (CSIC-UPC), Barcelona, Spain, 2009. 1.3.1 [20] E.K. Can and M.H. Houck. Real-time reservoir operations by goal programming. J. Water Resour. Plng. Mgmt., 110:297–309, 1984. 4.1 [21] P. Carpentier and G. Cohen. Applied mathematics in water supply networks management. Automatica, 29:1215–1250, 1993. 4.1 [22] G. Cembrano, J. Quevedo, V. Puig, R. Perez, J. Figueras, G. Ramon, P. Rodryguez, G. Barnet, M. Casas, J. M. Verdejo, A. Gil, J. Marti, and H. Konig. Predictive optimal control of water supply and distribution. Control Engineering Practice, 2005. 1.1 [23] Quevedo J. Salamero M. Puig V. Figueras J. Cembrano, G. and J. MartA. Optimal control of urban drainage systems. a case study. Control Engineering Practice, 12(1):1–9, 2004. 2.1.3, 2.2 127 BIBLIOGRAPHY [24] R.G. Cembrowicz. Steuerungsoptimierung eines wasserversorgungssystems. GWF-Wasser/Abwasser, 131:550–562, 1990. 4.1 [25] A. Charnes and W.W. Cooper. Chance constraints and normal deviates. Journal of the American Statistical Association, 57(297):134–148, 1962. 3.9 [26] Chaturvedi and Srivastave. Study of a complex water-resources system with screening and simulation-models. Journal of Water Resources and Research, 17:783–794, 1981. 3.7 [27] Wei-Chen Cheng, Nien-Sheng Hsu, Wen-Ming Cheng, and William W.-G. Yeh. A flow path model for regional water distribution optimization. Water resources research, 45:W09411, 2009. 3.3.1, 3.3.1.1, 3.3.1.1 [28] X. Cheng and B. H. Krogh. Stability-constrained model predictive control. IEEE Trans. Automat. Contr., 46(11):1816–1820, 2001. 3.2.1 [29] L. Chisci, P. Falugi, and G. Zappa. Predictive control for constrained systems with polytopic uncertainty. Proc. of the American Control Conference, 4:3073– 3078, 2001. 3.9 [30] B. Coulbeck, M. Brdys, C. H. Orr, and J. P. Rance. A hierarchical approach to optimized control of water distribution systems. part i: Decomposition. Optimal Control Applications and Methods, 9(1):51–61, 1988. 4.1 [31] B. Coulbeck and C.H. Orr. Development of an interactive pump scheduling program for optimized control of bulk water supply. Proc. of Int. Cont. on Systems Engineering, Lanchester Polytechnic, pages 176–86, 1981. 5.1 [32] C.R. Cutler. Dynamic matrix control, An optimal multivariable control algorithm with constraints. Dissertation, Faculty of Chemical Engineering, University of Houston, 1983. 1.3.2 [33] C.R. Cutler and B.L. Ramaker. Dynamic matrix control-a computer control algorithm. In Proceeding Joint American Control Conference, San Francisco, CA, USA, 1980. 1.3.2 [34] Rani D. and Moreira M.M. Simulation-optimizaiton modeling: A survey and potential application in reservoir systems operation. Water Resource Management, 24(1):1107–1138, 2010. 3.1, 3.7.1 [35] G. H. Danielson. On finding simple paths and circuits in a graph. IEEE Trans. Circuit Theory, CT-15, pages 294–295. 3.3.1.1 [36] L. M. De Nicolao and R. Scattolini. Stabilizing receding-horizon control of nonlinear time-varying systems. IEEE Trans. Automat. Contr., 43:1030–1036, 1998. 3.2.1 128 BIBLIOGRAPHY [37] Saul Montes de Oca Armeaga. Hierarchica multilayer and decentralized mpc control of the barcelona water network. Master’s thesis. 1.1, 3.3.1 [38] A. Diba, P.W.F. Louie, and W.W.-G. Yeh. Planned operation of large-scale water distribution system. J. Water Resour. Plng. Mgmt., 121:260–269, 1995. 4.1 [39] J.C. Doyle. Analysis of feedback systems with structured uncertainties. CIn IEE Proceedings, 129-D:242–250, 1982. 1.3.2 [40] Loucks D.P., Stedinger J.R., and Haith D.A. Water resources systems planning and analysis. Prentice-Hall, Englewood Cliffs, 1981. 3.1 [41] Loucks D.P. and Beek V. Water resources systems planning and management: an introduction to method, models and applications. UNESCO, Paris, 2005. 3.1 [42] W. B. Dunbar. Distributed receding horizon control of dynamically coupled nonlinear systems. IEEE Transactions of Automatic Control, 52(7):1249–1263, 2007. 1.3.3 [43] Caini Elena. Sviluppo di un Tool di Simulazione per il Controllo Predittivo di Reti Idriche di Trasporto di Acqua Potabile. PhD thesis, Facolta di ingegneria, Universita Degli Studi Di Siena, 2009. 3.7, 3.7.1 [44] R. Evans, L. Li, I. Mareels, N. Okello, M. Pham, W. Qiu, and S. K. Saleem. Real-time optimal control of river basin networks. Preprints of the 18th IFAC World Congress, pages 11459–11464, 2011. 3.2.1, 3.2.1 [45] P.F. Perry F. Fallside. Hierarchical optimization of a water-supply network. I.E.E-I.E.R.E. Proceedings, 65:98–99, 1974. 2.1.3 [46] R.E. Featherstone and C. Nalluri. Civil Engineering Hydraulics, Essential Theory with Worked Examples. Granada, St Albans, 1982. 1.2.3.4 [47] W. Findeisen. Wielopoziomowe uklady sterowania (multilayer control systems, in Polish). PWN, Warszawa, 1974. 2.1.2 [48] W. Findeisen. Struktury sterowania dla zlozonych procesow (control structures for complex processes, in Polish). Warsaw University of Technology Press, Warszawa, 1997. [49] W. Findeisen, F.N. Bailey, M. Brdys, K. Malinowski, P. Tatjewski, and A. Wozniak. Control and coordination in hierarchical systems. J. Wiley & Sons, Chichester/New York/Brisbane/Toronto. [50] W. Findeisen, M. Brdys, and K. Malinowski. Control problems and control systems. An overview. Computer aided control systems design, World Scientific, Singapore, 1994. 2.1.2 129 BIBLIOGRAPHY [51] D. Fiorelli, G. Schutz, N. Metla, and J. Meyers. Application of an optimal predictive controller for a small water distribution network in luxembourg. Journal of Hydroinformatics(In Press), 2014. 4.1 [52] J. H. Flores-Villarreal and Z. R Rios-Mercado. Computational experience with a grg method for minimizing fuel consumption on cyclic natural gas networks. Computational methods in circuits and systems applications,, pages 90–94, 2003. 4.6 [53] J. Quevedo R. Perez G. Cembrano, G. Wells and R. Argelaguet. Optimal control of a water distribution network in a supervisory control system. Control Engineering Practice, 8(10):1177–1188, 2000. 2.1.3 [54] V. Puig R. Perez J. Figueras J. M. Verdejo I. Escaler G. Ramon G. Barnet P. Rodryguez G. Cembrano, J. Quevedo and M. Casas. Plio: A generic tool for real-time operational predictive/optimal control of water networks. 2.1.3, 4.1, 4.6 [55] C.E. Garcia, D.M. Prett, and B.L. Ramaker. Fundamental Process Control. Butterworths, Stoneham, MA, 1988. 1.3.2 [56] G.Calafiore and F.Dabbene. Probabilistic and randomized methods for design under uncertainty. Springer, 2006. 3.9 [57] H. Genceli and M. Nikolaou. Robust stability analysis of constrained norm model predictive control. AIChE J., 39(12):1954–1965, 1993. 3.2.1 [58] McMahon G.F. and Mein R.G. River and reservoir yield. Water Resources Publications, Fort Collins, 1986. 3.1 [59] Ing. Simone Giuliani. Decentralized and Wireless Control of Large-Scale Systems, 2007. http://cse.lab.imtlucca.it/hybrid/wide/. 2.1.3 [60] Paul J. Goulart, Eric C. Kerrigan, and Jan M. Maciejowski. Optimization over state feedback policies for robust control with constraints. Automatica, 42(4):523–533, 2006. 3.9 [61] Bishop Robert H. Modern Control Systems Anaylysis and Design Using MATLAB and SIMULINK. Addison-Wesley Longman Publishing Co., Boston, 1996. 3.7 [62] E. Hyvonen. Constraints reasoning based on interval arithmetic: The tolence approach. Artificial Intelligence, 58:71–112, 1992. 4.3.2.2 [63] J. Adrian i Roman. Modelat i control predictiu en xarxes d aigua potable. Aplicaci o al cas de la xarxa d abastiment de Barcelona. Universitat Politecnica de Catalunya (UPC), Barcelona, Spain, 2009. 1.3.1 130 BIBLIOGRAPHY [64] Kuo Jan-Tai, Hsu Nien-Sheng, Chu Wen-sen, Wan Shian, and Lin Youn-Jan. Real-time operation of tanshui river reservoirs. Journal of Water Resources Planning and Management, 116:349–361, 1990. 3.7 [65] L. Jaulin, M. Kieffer, O. Didrit, and E. Walter. Applied Interval Analysis, with Examples in Parameter and State Estimation, Robust Control and Robotics. Springer-Verlag, London, 2001. 4.3.2.1, 4.3.2.2 [66] L. Jun and Y. Guoping. Iterative methodology of pressure-dependent demand based on epanet for pressure-deficient water distribution analysis. J. Water Resour. Plng. Mgmt., 139:34–44, 2013. 4.3.5 [67] T. Keviczky, F. Borrelli, and G.J. Balas. Decentralized receding horizon control for large scale dynamically decoupled systems. Automatica, 42(12):2105–2115, 2006. 1.3.3 [68] W. Kurek and F. ASCE A. Ostfeld. Multiobjective water distribution systems control of pumping cost, water quality, and storage-reliability constraints. J. Water Resour. Plng. Mgmt., 140:184–193, 2014. 1.1 [69] H. Kwakernaak and R. Sivan. York:Wiley, 1972. 3.2.1 Linear Optimal Control Systems. New [70] W. H. Kwon and D. G. Byun. Receding horizon tracking control as a predictive control and its stability properties. Int. J. Control, 50(5):1807–1824, 1989. 3.2.1 [71] W. H. Kwon and A. E. Pearson. A modified quadratic cost problem and feedback stabilization of a linear system. IEEE Trans. Automat. Contr., AC-22:838–842, 1977. 3.2.1 [72] J. H. Lee and B Cooley. Recent advances in model predictive control and other related areas. Presented at the CPC V, Lake Tahoe, CA, 1996. 3.2.1 [73] J.H. Lee and Zhenghong Yu. Worse-case formulations of model predictive control for systems with bounded parameters. Automatica, 33(5):763–781, 1997. 3.9 [74] I. Lefkowitz. Multilevel approach applied to control system design. Journal of Basic Engineering-Transaction of the ASME, Series B, 2:392–398, 1966. 2.1.2 [75] R.K. Linsley Jnr., M.A. Kohler, and J.L.H. Paulhus. Hydrology for Engineers. McGraw-Hill, New York, 1982. 1.2.3.1 [76] X. Litrico and V. Fromion. Simplified modeling of irrigation canals for controller design. Journal of Irrigation and Drainage Engineering, 130(5):373– 383, 2004. 2.2.1.4 131 BIBLIOGRAPHY [77] M. Lopez-lbanez, T. Devi Prasad, and B. Paechter. Ant colony optimization for optimal control of pumps in water distribution networks. Journal of Water Resources Planning and Management, (7):337–346, 2008. 1.1, 4.7, 4.7 [78] J. Lunze. Feedback Control of Large-Scale Systems. Prentice Hall, Great Britain, 1992. 1.3 [79] Karamouz M., Szidarovszky F., and Zahraie B. Water resources systems analysis. Lewis, Boca Raton, 2003. 3.1 [80] B. Ulanicki. M. A. Brdys. Operational control of water systems : structures, algorithms, and applications. Prentice Hall, New York, 1994. 1.1, 1.2.1, 1.2.3.2, 1.2.3.4, 1.2.3.5, 1.3.1, 2.1.2.2, 2.1.2.3, 2.1.3, 2.2, 2.2.2, 3.3, 3.3.1, 5.1, 5.1, 5.2.2 [81] J. M. Maciejowski. Predictive Control with Constraints. Prentice Hall, Great Britain, 2002. 2.1.1.2, 2.1.1.2 [82] J.M. Maciejowski and Y. Xiaoke. Fault tolerant control using gaussian processes and model predictive control. 2013 Conference on Control and Fault-Tolerant Systemss (SysTol), Nice, France, pages 1–12, 2013. 4.3.4 [83] M. Marinaki and M. Papageorgiou. Optimal Real-time Control of Sewer Networks. Springer, London, 2005. 1.3.1 [84] D. Mayne and H. Michalska. Receding horizon control of nonlinear systems. IEEE Trans. Automat. Contr., 35:814–824, 1990. 3.2.1 [85] D.Q. Mayne, J.B. Rawlings, C.V. Rao, and P.O.M. Scokaert. Constrained model predictive control: Stability and optimality. Automatica, 36(6):789–814, 2000. 3.9 [86] L. Mays. Urban Stormwater Management Tools. McGrawHill Professional Publishing, USA, 2004. 2.1.3, 2.2 [87] D.Y. Miao, Y.P. Li, G.H. Huang, Z.F. Yang, and C.H. Li. Optimization model for planning regional water resource systems under uncertainty. J. Water Resour. Plng. Mgmt., 140:238–249, 2014. 1.1 [88] S. Miyaoka and M. Funabashi. Optimal control of water distribution systems by network flow theory. IEEE Transctions of Automatic Control, 29(4):303–311, 1984. 4.8.1 [89] Miguel Molina. Efficient integrated real-time monitoring and control of drinking water networks. Research proposal, 2011. 3.1 [90] D.M. Murray and S.J. Yakowitz. Constrained differential dynamic programming and its application to multi-reservoir control. Water Resources Research, 15:223–235, 1979. 4.1 132 BIBLIOGRAPHY [91] R. R. Negenborn. Multi-Agent Model Predictive Control with Applications to Power Networks. Delft University Press, Delft, The Netherlands, 2008. 1.3.1 [92] C. Ocampo-Martinez, D. Barcelli, V. Puig, and A. Bemporad. Hierarchical and decentralised model predictive control of drinking water networks. IET Control Theory and Applications, 6(1):62–71, 2012. 1.2.2 [93] C. Ocampo-Martinez, V. Puig, G. Cembrano, and J. Quevedo. Application of predictive control strategies to the management of complex networks in the urban water cycle. IEEE Control Systems Magazine, 33(1):15–45, 2013. 1.3.1, 2.2, 3.2.2, 4.1 [94] University of Exeter. Center for Water Systems. University of the year 20122013, 2012. http://emps.exeter.ac.uk/engineering/research/cws /resources/benchmarks/operation/richmond.html. 5.5 [95] Lindell E. Ormsbee and Kevin E. Lansey. Optimal control of water supply pumping systems. Journal of Water Resour. Plann. Management, 120:237Ű252, 1994. 5.1 [96] C.H. Orr, M.A. Parker, and S.T. Tennant. Implementation of on-line control scheme for city water system. J. Water Resour. Plng. Mgmt., 116:708–726, 1990. 4.1 [97] P. J. Van Overloop. Model Predictive Control on Open Water Systems. Delft University Press, Delft, The Netherlands, 2006. 1.3.1 [98] Simonovic Slobodan P. Tools for water management: one view of future. Water International, 25:76–88, 2000. 1.1, 3.1 [99] M. Papageorgiou. Optimal control of generalized flow networks. System Modelling and Optimization Proc, 59:373–382, 1983. 4.1 [100] Romera J. Puig V. Creus R. Minoves Pascual, J. Operational predictive optimal control of barcelona water transport network. Proc. 18th IFAC World Congress, 2011. 2.1.3 [101] P. Patrinos, S. Trimboli, and A. Bemporad. Stochastic mpc for real-time marketbased optimal power dispatch. in Proc. 50th IEEE Conf. on Decision and Control and European Control Conf, 2011. 2.1.3 [102] P.L.Iglesias-Rey, F.J.Martinez-Solano, D.Mora Melia, and P.D.MartinezSolano. Bblawn: a combined use of best management practices and an optimization model based on a pseudo-genetic algorithm. 16th Conference on Water Distribution System Analysis, WDSA, pages 29–36, 2014. 4.9.1, 4.9.4 133 BIBLIOGRAPHY [103] E. Price and A. Ostfeld. Battle of background leakage assessment for water networks using successive linear programing. 16th Conference on Water Distribution System Analysis, WDSA, pages 45–52, 2014. 4.9.1, 4.9.4 [104] L. Puglia, D. Bernardini, and A. Bemporad. A multi-stage stochastic optimization approach to optimal bidding on energy markets. in Proc. 50th IEEE Conf. on Decision and Control and European Control Conf, 2011. 2.1.3 [105] V. Puig, C. Ocampo-Martinez, G. Cembrano, R. Creus, and M. Minoves. Improving water management efficiency by using optimal control strategies: the barcelona case study. Conference IWA Conference on Instrumentation, Control and Automation (ICA2009), pages 1–9, 2009. 1.3.1, 2.1.3, 4.3.2.2 [106] S.J. Qin and T.A. Badgewell. An overview of industrial model predictive control technology. In Chemical Process Control-V, AIChe Symposium Series-American Institute of Chemical Engineers, 93, 1997. 1.3.2 [107] J. Quevedo, V. Puig, G. Cembrano, and J. Blanch. Validation and reconstruction of flow meter data in the barcelona water distribution network. Control Engineering Practice, 11:640–651, 2010. 2.1.3, 2.2.1.5, 3.4.2, A.2 [108] Wurbs R.A. Modeling and analysis of reservoir system operation. Prentice Hall, Upper Saddle River, 1996. 3.1 [109] S.V. Rakovic, B.Kouvaritakis, M.Cannon, C.Panos, and R.Findeisen. Parameterized tube model predictive control. IEEE Transactions on Automatic Control, 57(11):2746–2761, 2012. 3.9 [110] J. B. Rawlings and K. R. Muske. Stability of constrained receding horizon control. IEEE Trans. Automat. Contr., 38:1512–1516, 1993. 3.2.1 [111] J. B. Rawlings and B. T. Stewart. Coordinating multiple optimization-based controllers: New opportunities and challenges. Journal of Process Control, 18(9):839–845, 2008. 1.3.3 [112] L.A. Rossman. Epanet 2.0 Users Manual. Environmental Protection Agency EPA/600/R-00/057, United States, 2000. 4.1, 4.3.5 [113] A. Kumar S. Aggarwal, L. Saini. Multiobjective optimization for sustainable groundwater management in semiarid regions. Journal of water resources planning and management, 130(6):490–497, 2004. 2.1.3 [114] R. Scattolini. Architectures for distributed and hierarchical model predictive control: A review. Journal of Process Control, 19(5):723–731, 2009. 1.3.3 [115] A. Schwarm and M. Nikolaou. Chance-constrained model predictive control. AIChE Journal, 45(8):1743–1752, 1999. 2.1.3 134 BIBLIOGRAPHY [116] M. Sezer and D. D. Siljak. Nested epsilon decompositions of linear systems: Weakly coupled and overlapping blocks. SIAM Journal of Matrix Analysis and Aplications, 12:521–533, 1991. 1.3 [117] A. Shapiro, D. Dentcheva, and A. Ruszczynski. Lectures on stochastic programming: modeling and theory. Society for Industrial and Applied Mathmatics and Mathematical Programming Society, United States of America, 2009. 3.9 [118] M.J. Soltanjalili, O.B. Haddad, M.A. Marino, and D.M.ASCE. Operating water distribution networks during water shortage conditions using hedging and intermittent water supply concepts. J. Water Resour. Plng. Mgmt., 139:644–659, 2013. 1.1 [119] S. Streif, M. Kogel, T. Bathge, and R. Findeisen. Robust nonlinear model predictive control with constraint satisfaction: A relaxation-based approach. World Congress of The International Federation of Automatic Control(To appear), 2014. 4.1 [120] C.C. Sun, V. Puig, and G. Cembrano. Combining csp and mpc for the operational control of water networks: Application to the richmond case study. World Congress of The International Federation of Automatic Control, pages 6246– 6251, 2014. 4.1, 4.8 [121] C.C. Sun, V. Puig, and G. Cembrano. Two-layer scheduling scheme for pump stations. 2014 IEEE Conference on Control Applications, pages 1741–1746, 2014. 4.3.5, 4.8.1, 4.9.1 [122] Y.-H. Sun, W.W.-G Yeh, N.-S. Hsu, and P.W.F. Louie. Generalized network algorithm for water-supply-system optimization. J. Water Resour. Plng. Mgmt., 121:392–398, 1995. 4.1 [123] P. Tatjewski. Advanced control and on-line process optimization in multilayer structures. Annual Reviews of Control, 32(1):71–85, 2008. 1.3.3 [124] P. Tatjewski. Advanced control and on-line process optimization in multilayer structures. Annual Reviews in Control, 32(1):71–85, 2008. 2.1.2 [125] Y. A. Thomas. Linear quadratic optimal estimation and control with receding horizon. Electron. Lett., 11:19–21, 1975. 3.2.1 [126] S. Tornil-Sin, C. Ocampo-Martínez, V. Puig, and T. Escobet. Robust fault diagnosis of non-linear systems using interval constraint satisfaction and analytical redundancy relations. IEEE Transactions on Systems, Man and Cybernetics, Part A: Systems and Humans, 44:18–29, 2014. 4.3.2.1 135 BIBLIOGRAPHY [127] R. Toro, C. Ocampo-Martinez, F. Logist, J. Van Impe, and V. Puig. Tuning of predictive controllers for drinking water networked systems. Proc. 18th IFAC World Congress, Milano, Italy, 2011. 2.1.3, 3.2.3.1 [128] B. Ulanicki, J. Kahler, and H. See. Dynamic optimization approach for solving an optimal scheduling problem in water distribution systems. Journal of Water Resources Planning and Management, 133:23–32, 2007. 5.1 [129] B. Ulanicki and C.H. Orr. Unified approach for optimization of non-linear hydraulic systems. JOTA, 68(1):79–161, 1991. 5.1 [130] Ton J.J. van den Boom and Ton C.P.M. Backx. Model Predictive Control. Delft University of Technology, Delft, The Netherlands, 2005. 1.3.2 [131] D. H. van Hessem, C. W. Scherer, and O. H. Bosgra. Lmi-based closedloop economic optimization of stochastic process operation under state and input constraints. in Proc. 40th IEEE Conf. on Decision and Control, Orlando,, pages 4228–4233, 2001. 2.1.3 [132] 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. Plng. Mgmt., 130:160–170, 2004. 4.1, 4.4.1, 4.7, 4.7 [133] A. N. Venkat, I. A. Hiskens, J. B. Rawlings, and S. J. Wright. Distributed mpc strategies with application to power system automatic generation control. IEEE Tran on Control Systems Technology, 16(6):1192–1206, 2008. 1.3.3 [134] Labadie John W. Optimal operation of multireservoir systems:state-of-the-art review. Journal of Water Resources Planning and Management, 130:93–111, 2004. 3.1 [135] Yeh William W-G. Reservoir management and operations models:a state-ofthe-art review. Journal of Water Resources and Research, 21:1797–1818, 1985. 3.1 [136] Y. Wang, C. Ocampo-Martinez, and V. Puig. Robust model predictive control based on gaussian processes: Application to drinking water networks. 2015 European Control Conference, Linz, Austria (To appear), 2015. 4.3.4, 4.3.4 [137] Y. Wang, C. Ocampo-Martinez, V. Puig, and J. Quevedo. Gaussian-processbased demand forecasting for predictive control of drinking water networks. 9th International Conference on Critical Information Infrastructures Security (Springer, to appear), Limassol, Cyprus, pages 1–12, 2014. 4.3.4, 4.3.4 [138] J. Warrington, S. Mariethoz, C.N. Jones, and M. Morari. Predictive power dispatch through negotiated locational pricing. nnovative Smart Grid Technologies Conference Europe (ISGT Europe), IEEE PES, 1(8):11–13, 2010. 2.1.3 136 BIBLIOGRAPHY [139] U. Zessler and U. Shamir. Optimal operation of water distribution systems. J. Water Resour. Plng. Mgmt., 115:735–752, 1989. 4.1 [140] S.L. Zhou, T.A. McMahon, A. Walton, and J. Lewis. Forecasting operational demand for an urban water supply zone. Journal of Hydrology, 259:189–202, 2002. 2.1.3 137

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement