scieee AI-readable full text Open interactive document viewer

Switching Model Predictive Control of canals characterized by large operating conditions

Anderson, Alejandro; Segovia, Pablo; García Martín, Javier; Duviella, Éric

Abstract

This paper presents a switched linear system representation of water canal dynamics to incorporate different operating modes, which arise due to the occurrence of extreme weather phenomena such as flooding and drought episodes. To guarantee the stability during mode switching, a proper analysis on permanence regions–given by a collection of equilibrium states–for the switched linear system is presented. The permanence region is computed within a compact set, which depends on an adequate level region for the canals. A suitable algorithm is used to formulate an asymptotic stable Model Predictive Control (MPC) that steers and maintains the states of the system inside the target region indefinitely in a feasible manner. This strategy is successfully tested in a simulation using a realistic model of a canal.

Full text

IFAC PapersOnLine 56-2 (2023) 755–760 ScienceDirect ScienceDirect Available online at www.sciencedirect.com 2405-8963 Copyright © 2023 The Authors. This is an open access article under the CC BY-NC-ND license . Peer review under responsibility of International Federation of Automatic Control. 10.1016/j.ifacol.2023.10.1657 10.1016/j.ifacol.2023.10.1657 2405-8963 Copyright © 2023 The Authors. This is an open access article under the CC BY-NC-ND license ( https://creativecommons.org/licenses/by-nc-nd/4.0/ ) Switching Model Predictive Control of canals characterized by large operating conditions A. Anderson ∗P. Segovia ∗∗ J.G. Martin ∗∗∗ E. Duviella ∗ ∗IMT Nord Europe, Institut Mines-T´ el´ ecom, Lille, France ∗∗ Department of Maritime &Transport Technology, Delft University of Technology, Delft, the Netherlands ∗∗∗ Departamento de Ingenier´ ıa de Sistemas y Autom´ atica, Universidad de Sevilla, C/ Camino de los Descubrimientos, s/n., 41092 Sevilla, Spain Abstract: This paper presents a switched linear system representation of water canal dynamics to incorporate different operating modes, which arise due to the occurrence of extreme weather phenomena such as flooding and drought episodes. To guarantee the stability during mode switching, a proper analysis on permanence regions–given by a collection of equilibrium states–for the switched linear system is presented. The permanence region is computed within a compact set, which depends on an adequate level region for the canals. A suitable algorithm is used to formulate an asymptotic stable Model Predictive Control (MPC) that steers and maintains the states of the system inside the target region indefinitely in a feasible manner. This strategy is successfully tested in a simulation using a realistic model of a canal. Keywords: Switched Linear Systems, Stable Regions, Time-Delay Systems, Model Predictive Control, Water Systems 1. INTRODUCTION Free-surface open-channel systems are large-scale networks consisting of rivers, canals and waterways. As these are mainly used for freight transportation, the main management objective consists of guaranteeing the navigability, which requires keeping water levels within predefined limits. However, the fact that these systems are strongly affected by extreme weather phenomena complicates the achievement of this objective. In the context of climate change, severe and long-lasting drought and record rainfall are increasingly expected worldwide. Model predictive control (MPC) is one of the most popular approaches for real-time control of free-surface systems due to its simplicity and versatility, a fact that can be testified by the extense body of literature on the topic (Ocampo-Martinez et al., 2013; Fele et al., 2014). However, extreme weather episodes may render this simplification no longer valid, as these lead to time-varying average flows along the water courses, and therefore time-varying operating points. Linear parametervarying (LPV) models, which describe a nonlinear system that can be modeled as parameterized linear systems (each designed at a different operating point), emerge as an approach to take large operating ranges into account. LPV models have been successfully employed in open-channel modeling and control (Bolea and Puig, 2016). When multiple operating modes must be considered for canal management purposes as a result of multiple operating points, the use of LPV or nonlinear models is not strictly required. A good alternative is to rely on switching systems (Duviella et al., 2007), in which a linear model is identified for each operating point within the operational range of the canal. Switching between modes can then be considered when the operating conditions of the canal change. Advantages of this modeling strategy are the use of a bank of simpler linear models and the fact that it is supported by the theory on switching systems. However, in order to formulate a stabilizing control strategy for switched systems, the characterization of general invariance regions becomes a necessity. From set control theory it is known that invariance regions play an important role in the controllability and stability analysis (Blanchini and Miani, 2015). General invariant sets are the only ones that can be formally stabilized by an MPC strategy (Rawlings et al., 2017). For a switched linear system where the signal must switch mode in finite time (i.e., mode switching is mandatory), the only formal invariant set is the origin, and this point usually lacks applicability. More general regions can be found in the literature: for instance, Anderson et al. (2021); Perez et al. (2022) assess this problem with different characterizations and computations of a particular Permanence Sets (PS), i.e., General Control Invariant Sets for switched systems. In this work, a PS is proposed inside a target region Toutside of the origin. The PS is a subset of the output space of the model for the water canal dynamics. The dynamics of the mode are modeled by a delay switched linear system (with switches affecting only the output variable). The result is used to formulate an stable MPC which is tested in several scenario simulations. 2. DYNAMICAL MODEL AND SET-CONTROL ANALYSIS 2.1 Control Model of Canals The dynamics of a canal, i.e., part of a water course between two control structures, are accurately described by the SaintVenant equations, a set of partial nonlinear differential equations that are not well suited for real-time control. Under simplifying assumptions and considering a unique operating point, the Saint-Venant equations can be simplified and linearized, and the Switching Model Predictive Control of canals characterized by large operating conditions A. Anderson ∗P. Segovia ∗∗ J.G. Martin ∗∗∗ E. Duviella ∗ ∗IMT Nord Europe, Institut Mines-T´ el´ ecom, Lille, France ∗∗ Department of Maritime &Transport Technology, Delft University of Technology, Delft, the Netherlands ∗∗∗ Departamento de Ingenier´ ıa de Sistemas y Autom´ atica, Universidad de Sevilla, C/ Camino de los Descubrimientos, s/n., 41092 Sevilla, Spain Abstract: This paper presents a switched linear system representation of water canal dynamics to incorporate different operating modes, which arise due to the occurrence of extreme weather phenomena such as flooding and drought episodes. To guarantee the stability during mode switching, a proper analysis on permanence regions–given by a collection of equilibrium states–for the switched linear system is presented. The permanence region is computed within a compact set, which depends on an adequate level region for the canals. A suitable algorithm is used to formulate an asymptotic stable Model Predictive Control (MPC) that steers and maintains the states of the system inside the target region indefinitely in a feasible manner. This strategy is successfully tested in a simulation using a realistic model of a canal. Keywords: Switched Linear Systems, Stable Regions, Time-Delay Systems, Model Predictive Control, Water Systems 1. INTRODUCTION Free-surface open-channel systems are large-scale networks consisting of rivers, canals and waterways. As these are mainly used for freight transportation, the main management objective consists of guaranteeing the navigability, which requires keeping water levels within predefined limits. However, the fact that these systems are strongly affected by extreme weather phenomena complicates the achievement of this objective. In the context of climate change, severe and long-lasting drought and record rainfall are increasingly expected worldwide. Model predictive control (MPC) is one of the most popular approaches for real-time control of free-surface systems due to its simplicity and versatility, a fact that can be testified by the extense body of literature on the topic (Ocampo-Martinez et al., 2013; Fele et al., 2014). However, extreme weather episodes may render this simplification no longer valid, as these lead to time-varying average flows along the water courses, and therefore time-varying operating points. Linear parametervarying (LPV) models, which describe a nonlinear system that can be modeled as parameterized linear systems (each designed at a different operating point), emerge as an approach to take large operating ranges into account. LPV models have been successfully employed in open-channel modeling and control (Bolea and Puig, 2016). When multiple operating modes must be considered for canal management purposes as a result of multiple operating points, the use of LPV or nonlinear models is not strictly required. A good alternative is to rely on switching systems (Duviella et al., 2007), in which a linear model is identified for each operating point within the operational range of the canal. Switching between modes can then be considered when the operating conditions of the canal change. Advantages of this modeling strategy are the use of a bank of simpler linear models and the fact that it is supported by the theory on switching systems. However, in order to formulate a stabilizing control strategy for switched systems, the characterization of general invariance regions becomes a necessity. From set control theory it is known that invariance regions play an important role in the controllability and stability analysis (Blanchini and Miani, 2015). General invariant sets are the only ones that can be formally stabilized by an MPC strategy (Rawlings et al., 2017). For a switched linear system where the signal must switch mode in finite time (i.e., mode switching is mandatory), the only formal invariant set is the origin, and this point usually lacks applicability. More general regions can be found in the literature: for instance, Anderson et al. (2021); Perez et al. (2022) assess this problem with different characterizations and computations of a particular Permanence Sets (PS), i.e., General Control Invariant Sets for switched systems. In this work, a PS is proposed inside a target region Toutside of the origin. The PS is a subset of the output space of the model for the water canal dynamics. The dynamics of the mode are modeled by a delay switched linear system (with switches affecting only the output variable). The result is used to formulate an stable MPC which is tested in several scenario simulations. 2. DYNAMICAL MODEL AND SET-CONTROL ANALYSIS 2.1 Control Model of Canals The dynamics of a canal, i.e., part of a water course between two control structures, are accurately described by the SaintVenant equations, a set of partial nonlinear differential equations that are not well suited for real-time control. Under simplifying assumptions and considering a unique operating point, the Saint-Venant equations can be simplified and linearized, and the Switching Model Predictive Control of canals characterized by large operating conditions A. Anderson ∗P. Segovia ∗∗ J.G. Martin ∗∗∗ E. Duviella ∗ ∗IMT Nord Europe, Institut Mines-T´ el´ ecom, Lille, France ∗∗ Department of Maritime &Transport Technology, Delft University of Technology, Delft, the Netherlands ∗∗∗ Departamento de Ingenier´ ıa de Sistemas y Autom´ atica, Universidad de Sevilla, C/ Camino de los Descubrimientos, s/n., 41092 Sevilla, Spain Abstract: This paper presents a switched linear system representation of water canal dynamics to incorporate different operating modes, which arise due to the occurrence of extreme weather phenomena such as flooding and drought episodes. To guarantee the stability during mode switching, a proper analysis on permanence regions–given by a collection of equilibrium states–for the switched linear system is presented. The permanence region is computed within a compact set, which depends on an adequate level region for the canals. A suitable algorithm is used to formulate an asymptotic stable Model Predictive Control (MPC) that steers and maintains the states of the system inside the target region indefinitely in a feasible manner. This strategy is successfully tested in a simulation using a realistic model of a canal. Keywords: Switched Linear Systems, Stable Regions, Time-Delay Systems, Model Predictive Control, Water Systems 1. INTRODUCTION Free-surface open-channel systems are large-scale networks consisting of rivers, canals and waterways. As these are mainly used for freight transportation, the main management objective consists of guaranteeing the navigability, which requires keeping water levels within predefined limits. However, the fact that these systems are strongly affected by extreme weather phenomena complicates the achievement of this objective. In the context of climate change, severe and long-lasting drought and record rainfall are increasingly expected worldwide. Model predictive control (MPC) is one of the most popular approaches for real-time control of free-surface systems due to its simplicity and versatility, a fact that can be testified by the extense body of literature on the topic (Ocampo-Martinez et al., 2013; Fele et al., 2014). However, extreme weather episodes may render this simplification no longer valid, as these lead to time-varying average flows along the water courses, and therefore time-varying operating points. Linear parametervarying (LPV) models, which describe a nonlinear system that can be modeled as parameterized linear systems (each designed at a different operating point), emerge as an approach to take large operating ranges into account. LPV models have been successfully employed in open-channel modeling and control (Bolea and Puig, 2016). When multiple operating modes must be considered for canal management purposes as a result of multiple operating points, the use of LPV or nonlinear models is not strictly required. A good alternative is to rely on switching systems (Duviella et al., 2007), in which a linear model is identified for each operating point within the operational range of the canal. Switching between modes can then be considered when the operating conditions of the canal change. Advantages of this modeling strategy are the use of a bank of simpler linear models and the fact that it is supported by the theory on switching systems. However, in order to formulate a stabilizing control strategy for switched systems, the characterization of general invariance regions becomes a necessity. From set control theory it is known that invariance regions play an important role in the controllability and stability analysis (Blanchini and Miani, 2015). General invariant sets are the only ones that can be formally stabilized by an MPC strategy (Rawlings et al., 2017). For a switched linear system where the signal must switch mode in finite time (i.e., mode switching is mandatory), the only formal invariant set is the origin, and this point usually lacks applicability. More general regions can be found in the literature: for instance, Anderson et al. (2021); Perez et al. (2022) assess this problem with different characterizations and computations of a particular Permanence Sets (PS), i.e., General Control Invariant Sets for switched systems. In this work, a PS is proposed inside a target region Toutside of the origin. The PS is a subset of the output space of the model for the water canal dynamics. The dynamics of the mode are modeled by a delay switched linear system (with switches affecting only the output variable). The result is used to formulate an stable MPC which is tested in several scenario simulations. 2. DYNAMICAL MODEL AND SET-CONTROL ANALYSIS 2.1 Control Model of Canals The dynamics of a canal, i.e., part of a water course between two control structures, are accurately described by the SaintVenant equations, a set of partial nonlinear differential equations that are not well suited for real-time control. Under simplifying assumptions and considering a unique operating point, the Saint-Venant equations can be simplified and linearized, and the Switching Model Predictive Control of canals characterized by large operating conditions A. Anderson ∗P. Segovia ∗∗ J.G. Martin ∗∗∗ E. Duviella ∗ ∗IMT Nord Europe, Institut Mines-T´ el´ ecom, Lille, France ∗∗ Department of Maritime &Transport Technology, Delft University of Technology, Delft, the Netherlands ∗∗∗ Departamento de Ingenier´ ıa de Sistemas y Autom´ atica, Universidad de Sevilla, C/ Camino de los Descubrimientos, s/n., 41092 Sevilla, Spain Abstract: This paper presents a switched linear system representation of water canal dynamics to incorporate different operating modes, which arise due to the occurrence of extreme weather phenomena such as flooding and drought episodes. To guarantee the stability during mode switching, a proper analysis on permanence regions–given by a collection of equilibrium states–for the switched linear system is presented. The permanence region is computed within a compact set, which depends on an adequate level region for the canals. A suitable algorithm is used to formulate an asymptotic stable Model Predictive Control (MPC) that steers and maintains the states of the system inside the target region indefinitely in a feasible manner. This strategy is successfully tested in a simulation using a realistic model of a canal. Keywords: Switched Linear Systems, Stable Regions, Time-Delay Systems, Model Predictive Control, Water Systems 1. INTRODUCTION Free-surface open-channel systems are large-scale networks consisting of rivers, canals and waterways. As these are mainly used for freight transportation, the main management objective consists of guaranteeing the navigability, which requires keeping water levels within predefined limits. However, the fact that these systems are strongly affected by extreme weather phenomena complicates the achievement of this objective. In the context of climate change, severe and long-lasting drought and record rainfall are increasingly expected worldwide. Model predictive control (MPC) is one of the most popular approaches for real-time control of free-surface systems due to its simplicity and versatility, a fact that can be testified by the extense body of literature on the topic (Ocampo-Martinez et al., 2013; Fele et al., 2014). However, extreme weather episodes may render this simplification no longer valid, as these lead to time-varying average flows along the water courses, and therefore time-varying operating points. Linear parametervarying (LPV) models, which describe a nonlinear system that can be modeled as parameterized linear systems (each designed at a different operating point), emerge as an approach to take large operating ranges into account. LPV models have been successfully employed in open-channel modeling and control (Bolea and Puig, 2016). When multiple operating modes must be considered for canal management purposes as a result of multiple operating points, the use of LPV or nonlinear models is not strictly required. A good alternative is to rely on switching systems (Duviella et al., 2007), in which a linear model is identified for each operating point within the operational range of the canal. Switching between modes can then be considered when the operating conditions of the canal change. Advantages of this modeling strategy are the use of a bank of simpler linear models and the fact that it is supported by the theory on switching systems. However, in order to formulate a stabilizing control strategy for switched systems, the characterization of general invariance regions becomes a necessity. From set control theory it is known that invariance regions play an important role in the controllability and stability analysis (Blanchini and Miani, 2015). General invariant sets are the only ones that can be formally stabilized by an MPC strategy (Rawlings et al., 2017). For a switched linear system where the signal must switch mode in finite time (i.e., mode switching is mandatory), the only formal invariant set is the origin, and this point usually lacks applicability. More general regions can be found in the literature: for instance, Anderson et al. (2021); Perez et al. (2022) assess this problem with different characterizations and computations of a particular Permanence Sets (PS), i.e., General Control Invariant Sets for switched systems. In this work, a PS is proposed inside a target region Toutside of the origin. The PS is a subset of the output space of the model for the water canal dynamics. The dynamics of the mode are modeled by a delay switched linear system (with switches affecting only the output variable). The result is used to formulate an stable MPC which is tested in several scenario simulations. 2. DYNAMICAL MODEL AND SET-CONTROL ANALYSIS 2.1 Control Model of Canals The dynamics of a canal, i.e., part of a water course between two control structures, are accurately described by the SaintVenant equations, a set of partial nonlinear differential equations that are not well suited for real-time control. Under simplifying assumptions and considering a unique operating point, the Saint-Venant equations can be simplified and linearized, and the Switching Model Predictive Control of canals characterized by large operating conditions A. Anderson ∗P. Segovia ∗∗ J.G. Martin ∗∗∗ E. Duviella ∗ ∗IMT Nord Europe, Institut Mines-T´ el´ ecom, Lille, France ∗∗ Department of Maritime &Transport Technology, Delft University of Technology, Delft, the Netherlands ∗∗∗ Departamento de Ingenier´ ıa de Sistemas y Autom´ atica, Universidad de Sevilla, C/ Camino de los Descubrimientos, s/n., 41092 Sevilla, Spain Abstract: This paper presents a switched linear system representation of water canal dynamics to incorporate different operating modes, which arise due to the occurrence of extreme weather phenomena such as flooding and drought episodes. To guarantee the stability during mode switching, a proper analysis on permanence regions–given by a collection of equilibrium states–for the switched linear system is presented. The permanence region is computed within a compact set, which depends on an adequate level region for the canals. A suitable algorithm is used to formulate an asymptotic stable Model Predictive Control (MPC) that steers and maintains the states of the system inside the target region indefinitely in a feasible manner. This strategy is successfully tested in a simulation using a realistic model of a canal. Keywords: Switched Linear Systems, Stable Regions, Time-Delay Systems, Model Predictive Control, Water Systems 1. INTRODUCTION Free-surface open-channel systems are large-scale networks consisting of rivers, canals and waterways. As these are mainly used for freight transportation, the main management objective consists of guaranteeing the navigability, which requires keeping water levels within predefined limits. However, the fact that these systems are strongly affected by extreme weather phenomena complicates the achievement of this objective. In the context of climate change, severe and long-lasting drought and record rainfall are increasingly expected worldwide. Model predictive control (MPC) is one of the most popular approaches for real-time control of free-surface systems due to its simplicity and versatility, a fact that can be testified by the extense body of literature on the topic (Ocampo-Martinez et al., 2013; Fele et al., 2014). However, extreme weather episodes may render this simplification no longer valid, as these lead to time-varying average flows along the water courses, and therefore time-varying operating points. Linear parametervarying (LPV) models, which describe a nonlinear system that can be modeled as parameterized linear systems (each designed at a different operating point), emerge as an approach to take large operating ranges into account. LPV models have been successfully employed in open-channel modeling and control (Bolea and Puig, 2016). When multiple operating modes must be considered for canal management purposes as a result of multiple operating points, the use of LPV or nonlinear models is not strictly required. A good alternative is to rely on switching systems (Duviella et al., 2007), in which a linear model is identified for each operating point within the operational range of the canal. Switching between modes can then be considered when the operating conditions of the canal change. Advantages of this modeling strategy are the use of a bank of simpler linear models and the fact that it is supported by the theory on switching systems. However, in order to formulate a stabilizing control strategy for switched systems, the characterization of general invariance regions becomes a necessity. From set control theory it is known that invariance regions play an important role in the controllability and stability analysis (Blanchini and Miani, 2015). General invariant sets are the only ones that can be formally stabilized by an MPC strategy (Rawlings et al., 2017). For a switched linear system where the signal must switch mode in finite time (i.e., mode switching is mandatory), the only formal invariant set is the origin, and this point usually lacks applicability. More general regions can be found in the literature: for instance, Anderson et al. (2021); Perez et al. (2022) assess this problem with different characterizations and computations of a particular Permanence Sets (PS), i.e., General Control Invariant Sets for switched systems. In this work, a PS is proposed inside a target region Toutside of the origin. The PS is a subset of the output space of the model for the water canal dynamics. The dynamics of the mode are modeled by a delay switched linear system (with switches affecting only the output variable). The result is used to formulate an stable MPC which is tested in several scenario simulations. 2. DYNAMICAL MODEL AND SET-CONTROL ANALYSIS 2.1 Control Model of Canals The dynamics of a canal, i.e., part of a water course between two control structures, are accurately described by the SaintVenant equations, a set of partial nonlinear differential equations that are not well suited for real-time control. Under simplifying assumptions and considering a unique operating point, the Saint-Venant equations can be simplified and linearized, and the Switching Model Predictive Control of canals characterized by large operating conditions A. Anderson ∗P. Segovia ∗∗ J.G. Martin ∗∗∗ E. Duviella ∗ ∗IMT Nord Europe, Institut Mines-T´ el´ ecom, Lille, France ∗∗ Department of Maritime &Transport Technology, Delft University of Technology, Delft, the Netherlands ∗∗∗ Departamento de Ingenier´ ıa de Sistemas y Autom´ atica, Universidad de Sevilla, C/ Camino de los Descubrimientos, s/n., 41092 Sevilla, Spain Abstract: This paper presents a switched linear system representation of water canal dynamics to incorporate different operating modes, which arise due to the occurrence of extreme weather phenomena such as flooding and drought episodes. To guarantee the stability during mode switching, a proper analysis on permanence regions–given by a collection of equilibrium states–for the switched linear system is presented. The permanence region is computed within a compact set, which depends on an adequate level region for the canals. A suitable algorithm is used to formulate an asymptotic stable Model Predictive Control (MPC) that steers and maintains the states of the system inside the target region indefinitely in a feasible manner. This strategy is successfully tested in a simulation using a realistic model of a canal. Keywords: Switched Linear Systems, Stable Regions, Time-Delay Systems, Model Predictive Control, Water Systems 1. INTRODUCTION Free-surface open-channel systems are large-scale networks consisting of rivers, canals and waterways. As these are mainly used for freight transportation, the main management objective consists of guaranteeing the navigability, which requires keeping water levels within predefined limits. However, the fact that these systems are strongly affected by extreme weather phenomena complicates the achievement of this objective. In the context of climate change, severe and long-lasting drought and record rainfall are increasingly expected worldwide. Model predictive control (MPC) is one of the most popular approaches for real-time control of free-surface systems due to its simplicity and versatility, a fact that can be testified by the extense body of literature on the topic (Ocampo-Martinez et al., 2013; Fele et al., 2014). However, extreme weather episodes may render this simplification no longer valid, as these lead to time-varying average flows along the water courses, and therefore time-varying operating points. Linear parametervarying (LPV) models, which describe a nonlinear system that can be modeled as parameterized linear systems (each designed at a different operating point), emerge as an approach to take large operating ranges into account. LPV models have been successfully employed in open-channel modeling and control (Bolea and Puig, 2016). When multiple operating modes must be considered for canal management purposes as a result of multiple operating points, the use of LPV or nonlinear models is not strictly required. A good alternative is to rely on switching systems (Duviella et al., 2007), in which a linear model is identified for each operating point within the operational range of the canal. Switching between modes can then be considered when the operating conditions of the canal change. Advantages of this modeling strategy are the use of a bank of simpler linear models and the fact that it is supported by the theory on switching systems. However, in order to formulate a stabilizing control strategy for switched systems, the characterization of general invariance regions becomes a necessity. From set control theory it is known that invariance regions play an important role in the controllability and stability analysis (Blanchini and Miani, 2015). General invariant sets are the only ones that can be formally stabilized by an MPC strategy (Rawlings et al., 2017). For a switched linear system where the signal must switch mode in finite time (i.e., mode switching is mandatory), the only formal invariant set is the origin, and this point usually lacks applicability. More general regions can be found in the literature: for instance, Anderson et al. (2021); Perez et al. (2022) assess this problem with different characterizations and computations of a particular Permanence Sets (PS), i.e., General Control Invariant Sets for switched systems. In this work, a PS is proposed inside a target region Toutside of the origin. The PS is a subset of the output space of the model for the water canal dynamics. The dynamics of the mode are modeled by a delay switched linear system (with switches affecting only the output variable). The result is used to formulate an stable MPC which is tested in several scenario simulations. 2. DYNAMICAL MODEL AND SET-CONTROL ANALYSIS 2.1 Control Model of Canals The dynamics of a canal, i.e., part of a water course between two control structures, are accurately described by the SaintVenant equations, a set of partial nonlinear differential equations that are not well suited for real-time control. Under simplifying assumptions and considering a unique operating point, the Saint-Venant equations can be simplified and linearized, and the 756 A. Anderson et al. / IFAC PapersOnLine 56-2 (2023) 755–760 Integrator Delay Zero (IDZ) model can be obtained. Moreover, a discrete-time version of the IDZ model can be obtained in state-space form (Segovia et al., 2019). By considering several operating points and switching dynamics, the state-space representation is given by x(k+ 1) = Ax(k)+Bu(k)+B⋆u(k−n),(1) y(k)=Cσ(k)x(k)+Dσ(k)u(k)+D⋆ σ(k)u(k−n), with x(0) = x0, where x(k)∈X⊂R2is the state of the system [m3],u(k)∈U⊂R2is the control input (gate control actions at both ends of the canal) [m3/s],y(k)∈Y⊂R2 is the output (water levels at both ends of the canal) [m],nis the delay (in samples) and σ(k)∈Σ := {1,2,...,q}is the switching signal 1that selects the mode σ(k)at time k∈N, among q>1possible values. Note that only matrices Cσ(k) and Dσ(k)depend on the operating mode, which means that the switched signal σ(k)only affects the output y(k). Matrices B⋆ and D⋆ σ(k)appear as a consequence of the delayed effect of a control action at the opposite end. Furthermore, the transport delay of the canal ncan be defined as the minimum time required for an action (e.g., controlled discharge, disturbance, etc.) to propagate from one end of the canal to the other end. The so-called switching path,σ(T) := {σ(k)}T k=0, with T∈ N, is a sequence that indicates how weather phenomena such as flooding or drought periods affect the consideration of the appropriate operating point. 2.2 Set-Control Delayed terms in Eq. (1) represent how the control affects the dynamics of the water levels. However, it can be easily shown that the delayed system (1) is equivalent to the ’undelayed’ 2 linear system x(k+ 1) = Ax(k)+Bu(k),(2) y(k)=Cσ(k)x(k)+Dσ(k)u(k), with x(k)∈X⊂Rn,u(k)∈U⊂Rm,y(k)∈Y⊂Rnand σ(k)∈Σ={1,··· ,q}. The equivalence of Eqs. (1) and (2) is possible by an extension of the dimension of the system (see details in Section 6.1). From now on, in order to facilitate the comprehension of the analysis, the undelayed linear system (2) will be considered in the results of this section. The next definition presents several concepts of PS for system (2). Definition 1 (Control Equilibrium Set).The control equilibrium set, Xs⊆Xof system (2) is given by all the admissible states xs∈Xfor which there is us∈Σ×U that fulfills xs=Axs+Bus. According to the system, the switching signal only affects the outputs, so the analysis of set-control will be focused on the output space Y. The equilibrium sets Xsand Usdefine the equilibrium set for the outputs for every σ∈Σby Yσ s=CσXs⊕DσUs,(3) where ⊕represents the Minkowski sum. The control equilibrium outputs for all modes is given by 1In this study the switching signal σis not a control variable, and represents different environmental conditions (like drought or rains). 2The term undelayed is used to stress the fact that the delay is hidden by the extension of the system dimension. Ys= σ∈Σ Yσ s. Next, the concept of invariant sets and controllable sets will be presented. Prior to that, note the dynamics of the outputs based on the previous step: y(k+ 1) = Cσx(k+1)+Dσu(k+ 1) =Cσ(Ax(k)+Bu(k)) + Dσu(k+ 1) =Cσ[AB]   Fσ x(k) u(k)+Dσu(k+ 1) =Fσ[x(k)u(k)]′+Dσu(k+ 1). Then, the concepts of control invariant sets and controllable sets can be defined as follows. Definition 2 (Control Invariant Set for Outputs).A nonempty set Ω⊂Yis said to be a control invariant set for the switched system (2) if for every state x∈Xand input u∈Usuch that y=Cσx+Dσy∈Ω, for some σ∈Σ, there is a a pair (¯σ, ¯u)∈Σ×Usuch that F¯σ[xu]′+D¯σ¯u∈Ω. Remark 3. Note that the control equilibrium set Ysis a particular case of a control invariant set for the output. Definition 4 (Controllable Set of Mode σfor the Output). Consider a nonempty set Ω⊂Y, the one step controllable set to Ωfor mode σis given by S(σ, Ω) = {y=Ax+Bu :∃¯u∈Us.t. Fσx u+Dσ¯u∈Ω}. The k-step controllable set to Ωfor mode σfor the output can be defined iteratively by Sk(σ, Ω) := S(σ, Sk−1(σ, Ω)) for k≥1, with S0(σ, Ω):=Ω. Section 6.2 shows a method to compute the controllable set S(σ, Ω) for a convex set Ω. 2.3 Main Results: Characterization of Feasible PS Invariant and equilibrium sets outside of the origin for switched systems—which switches mode after a finite amount of time— are hard to characterize. However, the problem was simplified in Perez et al. (2022) by proposing the concept of Permanence Sets (PS). This is a more general concept that allows to find a stabilizing region for the control switched system. Generally, equilibrium, invariant and cyclic set are particular cases of a PS. In short, a PS Ω, can be defined as follows. Consider a set Tsuch that Ω⊂T, where every point y(0) ∈Ω satisfies the following condition: ∀y(0) ∈Ω∃u(k)∈Usuch as y(k)∈T,∀k>0. Note that the trajectory of the output y(k)can remain inside the target set Tif it starts inside a particular region (the PS Ω) inside T. The concept of PS is properly defined next. Definition 5 (Control Permanence Set—CPS).Consider a target set T ⊂Y. A nonempty set Ω⊂Tis said to be a control permanence set of Tfor the switched system (2), if for every y(0) ∈Ωthere exists an infinite sequence of inputs u:= {u(k)}∞ k=0 and a switching path σ={σ(k)}∞ k=0 such that y(k)∈T for every k≥0. Note that if Ω≡Ton the above definition, the Control Permanence Set is a Control Invariant Set. Next, an algorithm is proposed to characterize a Control Permanence set for the outputs. Consider a value Mσfor every σ∈Σ, A. Anderson et al. / IFAC PapersOnLine 56-2 (2023) 755–760 757 Integrator Delay Zero (IDZ) model can be obtained. Moreover, a discrete-time version of the IDZ model can be obtained in state-space form (Segovia et al., 2019). By considering several operating points and switching dynamics, the state-space representation is given by x(k+ 1) = Ax(k)+Bu(k)+B⋆u(k−n),(1) y(k)=Cσ(k)x(k)+Dσ(k)u(k)+D⋆ σ(k)u(k−n), with x(0) = x0, where x(k)∈X⊂R2is the state of the system [m3],u(k)∈U⊂R2is the control input (gate control actions at both ends of the canal) [m3/s],y(k)∈Y⊂R2 is the output (water levels at both ends of the canal) [m],nis the delay (in samples) and σ(k)∈Σ := {1,2,...,q}is the switching signal 1that selects the mode σ(k)at time k∈N, among q>1possible values. Note that only matrices Cσ(k) and Dσ(k)depend on the operating mode, which means that the switched signal σ(k)only affects the output y(k). Matrices B⋆ and D⋆ σ(k)appear as a consequence of the delayed effect of a control action at the opposite end. Furthermore, the transport delay of the canal ncan be defined as the minimum time required for an action (e.g., controlled discharge, disturbance, etc.) to propagate from one end of the canal to the other end. The so-called switching path,σ(T) := {σ(k)}T k=0, with T∈ N, is a sequence that indicates how weather phenomena such as flooding or drought periods affect the consideration of the appropriate operating point. 2.2 Set-Control Delayed terms in Eq. (1) represent how the control affects the dynamics of the water levels. However, it can be easily shown that the delayed system (1) is equivalent to the ’undelayed’ 2 linear system x(k+ 1) = Ax(k)+Bu(k),(2) y(k)=Cσ(k)x(k)+Dσ(k)u(k), with x(k)∈X⊂Rn,u(k)∈U⊂Rm,y(k)∈Y⊂Rnand σ(k)∈Σ={1,··· ,q}. The equivalence of Eqs. (1) and (2) is possible by an extension of the dimension of the system (see details in Section 6.1). From now on, in order to facilitate the comprehension of the analysis, the undelayed linear system (2) will be considered in the results of this section. The next definition presents several concepts of PS for system (2). Definition 1 (Control Equilibrium Set).The control equilibrium set, Xs⊆Xof system (2) is given by all the admissible states xs∈Xfor which there is us∈Σ×U that fulfills xs=Axs+Bus. According to the system, the switching signal only affects the outputs, so the analysis of set-control will be focused on the output space Y. The equilibrium sets Xsand Usdefine the equilibrium set for the outputs for every σ∈Σby Yσ s=CσXs⊕DσUs,(3) where ⊕represents the Minkowski sum. The control equilibrium outputs for all modes is given by 1In this study the switching signal σis not a control variable, and represents different environmental conditions (like drought or rains). 2The term undelayed is used to stress the fact that the delay is hidden by the extension of the system dimension. Ys= σ∈Σ Yσ s. Next, the concept of invariant sets and controllable sets will be presented. Prior to that, note the dynamics of the outputs based on the previous step: y(k+ 1) = Cσx(k+1)+Dσu(k+ 1) =Cσ(Ax(k)+Bu(k)) + Dσu(k+ 1) =Cσ[AB]    Fσ x(k) u(k)+Dσu(k+ 1) =Fσ[x(k)u(k)]′+Dσu(k+ 1). Then, the concepts of control invariant sets and controllable sets can be defined as follows. Definition 2 (Control Invariant Set for Outputs).A nonempty set Ω⊂Yis said to be a control invariant set for the switched system (2) if for every state x∈Xand input u∈Usuch that y=Cσx+Dσy∈Ω, for some σ∈Σ, there is a a pair (¯σ, ¯u)∈Σ×Usuch that F¯σ[xu]′+D¯σ¯u∈Ω. Remark 3. Note that the control equilibrium set Ysis a particular case of a control invariant set for the output. Definition 4 (Controllable Set of Mode σfor the Output). Consider a nonempty set Ω⊂Y, the one step controllable set to Ωfor mode σis given by S(σ, Ω) = {y=Ax+Bu :∃¯u∈Us.t. Fσx u+Dσ¯u∈Ω}. The k-step controllable set to Ωfor mode σfor the output can be defined iteratively by Sk(σ, Ω) := S(σ, Sk−1(σ, Ω)) for k≥1, with S0(σ, Ω):=Ω. Section 6.2 shows a method to compute the controllable set S(σ, Ω) for a convex set Ω. 2.3 Main Results: Characterization of Feasible PS Invariant and equilibrium sets outside of the origin for switched systems—which switches mode after a finite amount of time— are hard to characterize. However, the problem was simplified in Perez et al. (2022) by proposing the concept of Permanence Sets (PS). This is a more general concept that allows to find a stabilizing region for the control switched system. Generally, equilibrium, invariant and cyclic set are particular cases of a PS. In short, a PS Ω, can be defined as follows. Consider a set Tsuch that Ω⊂T, where every point y(0) ∈Ω satisfies the following condition: ∀y(0) ∈Ω∃u(k)∈Usuch as y(k)∈T,∀k>0. Note that the trajectory of the output y(k)can remain inside the target set Tif it starts inside a particular region (the PS Ω) inside T. The concept of PS is properly defined next. Definition 5 (Control Permanence Set—CPS).Consider a target set T ⊂Y. A nonempty set Ω⊂Tis said to be a control permanence set of Tfor the switched system (2), if for every y(0) ∈Ωthere exists an infinite sequence of inputs u:= {u(k)}∞ k=0 and a switching path σ={σ(k)}∞ k=0 such that y(k)∈T for every k≥0. Note that if Ω≡Ton the above definition, the Control Permanence Set is a Control Invariant Set. Next, an algorithm is proposed to characterize a Control Permanence set for the outputs. Consider a value Mσfor every σ∈Σ, which represents the maximum amount of time the switched system (2) must remain in mode σbefore switching to another mode (this parameter is defined by the application). Then, the following algorithm computes a Control Permanence Set of the target set T. Algorithm 1 Output Control Permanence Set construction Require: System , kσ≤Mσ,T, 1: Compute ¯ Yj s:= Yj s∩T,∀j∈Σ 2: Compute Skj(j, ¯ Yj),∀j∈Σ▷in every of the k2steps ∩T 3: ¯ Yj=¯ Yj s∩ i∈Σ,i=j Ski(i, ¯ Yi s)∩T,j∈Σ 4: Compute Skj(j, ¯ Yj s),∀j∈Σ▷in every of the k2steps ∩T 5: Is ¯ Yj s⊂ i∈Σ,i=j Ski(i, ¯ Yi s)for all j∈Σ? 6: If step 5 is false →return to step 3. 7: If step 5 is true →stop. Ω=i∈N ¯ Yi sfor N⊂Σfor all i∈N Proposition 6. If Algorithm 1 converges to a nonempty set Ω⊂Y, then Ωis a Control Permanence Set of Tfor switched system (2). Proof. Assume Algorithm 1 converges to a nonempty set Ω. Consider y(0) ∈Ω, then y(0) ∈¯ Yj s∩S ki(i, ¯ Yi s)for some j, i ∈N⊂Σwith j=i. Then, y(0) ∈S ki(i, ¯ Yi s), which means that y(0) ∈¯ Yj scan be feasibly driven in kisteps to ¯ Yi s without leaving set T. Furthermore, every point of ¯ Yi sbelongs to a set Skℓ(ℓ, ¯ Yℓ s)for some ℓ∈N. Then, the same reasoning can be applied to this point, can be proved iteratively so that y(k)∈T for all k≥0. There is no guarantee that Algorithm 1 converges to a nonempty set for every possible condition (as it will be shown in the following simulation scenarios). Nevertheless, parameter kσcan be tuned to avoid situations in which Algorithm 1 converges to an empty set. This is based on the statement that the size of set Skσ(σ, ·)increases with the value kσ(although at the expense of increasing the computational cost). Another alternative to increase the set Skσ(σ, Ω) is by increasing the size of Ω, so the control equilibrium sets Yj scan be replaced by control invariant sets for each mode. The following simulation results are based on an identified switched linear model with three modes σ=1,2,3that account for normal, rainy and dry conditions. The target set for the output (see Fig. 3) is given by T={(y1,y 2):2.3≤y1≤3,2≤y2≤3}. For the simulation results depicted in Fig. 1, the following three different equilibrium sets Yi sare selected: Y1={y∈Y: A1x≤b1},Y2={y∈Y:A2x≤b2},Y3={y∈Y: A3x≤b3}, with A1=   −10 0−1 10 0−1   ,A 3=   −10 0−1 10 0−1   , b1=[−2.22,−2.42,2.57,2.57]′,b3= [−2.22,−2.67,2.75,2.7]′ Note that Y1 s=Y2 s(violet set in Fig. 1). Fig. 1 also shows Y3 s for the next step, which is the intersection of the current Y3 swith Sk1(σ, Y1 s)∪S k2(σ, Y2 s). Values k1=k2= 70 and k3= 130 Fig. 1. Equilibrium sets Yi sfor i=1,2,3, and their corresponding controllable sets Ski(i, Yi s)inside a target set T. The first step of Algorithm 1 reduces the size of the set Y3 s (darker green). amount of steps are chosen for each case as the minimum values such that Algorithm 1 converges to a nonempty set. Fig. 2 shows the results after 3steps of the algorithm. As it can be easily seen in the figure Step 5of the Algorithm 1 is fulfilled. Therefore, the result Ω= ¯ Y1 s∪¯ Y3 s(note that ¯ Y1 s=¯ Y2 s) is the PS for this problem. This region will be used afterwards in the canal control simulation. Fig. 3 shows initial equilibrium sets Yi s,i=1,2,3, for which the Algorithm converges to an empty set. In this case, it is not possible to drive the system from one equilibrium Yi sto another Yj swith i=jwith only one mode. The proposed MPC will not be able to stabilize these equilibrium sets without leaving the target set T. A possible control strategy in this scenario is to switch mode in the region given by the intersection S70(2,Y2 s)∩S 130(3,Y3 s)(intersection of the blue and green region in Fig. 3), or in the region given by the intersection S70(2,Y2 s)∩S 70(1,Y1 s)(intersection of the blue and red sets in Fig. 3). However, investigation of this kind of strategy is left for future research. 3. CONTROL DESIGN This section presents an MPC (based on the results of Segovia et al. (2019)) that feasibly drives and maintains the output levels of the switched system of the canal inside a given target region T ⊂Y. The results presented in Fig. 2 are considered to design a target reference for the output according to two different modes (normal and rainy conditions). In this work, the MPC minimizes the distance between the predicted output ykat time kwith a given reference yref k(σ)∈ ¯ Yσ s. This is, when mode σ(k)is active at time k, the reference 758 A. Anderson et al. / IFAC PapersOnLine 56-2 (2023) 755–760 Fig. 2. Final equilibrium sets ¯ Yi sfor i=1,2,3. Note that every point of every ¯ Yj sbelongs at least to one controllable set Ski(i, ¯ Yi s), with j=i. Fig. 3. Scenario where Algorithm 1 converges to an empty set. is defined by yref k:= yref k(σ), so the reference follows the switching path σ={σ(k)}with k≥0. Remark 7. The following MPC formulation is based on a punctual reference that switches according to the switching path σ={σ(k)}with k≥0. However, a relaxation term in the cost function is incorporated so as to provide robustness to the controller. The cost function of the MPC is defined next. 3.1 Operational objectives •Keep water levels as close to the reference levels as possible with sub-cost J(1) k: J(1) k=yk−yref k⊺yk−yref k,(4) with yref k∈¯ Yσ sfor some ¯ Yσ s⊂Ω, where Ωis a PS for T. The reference levels at time instant k, i.e., yref k, depend on the current mode σ(k), i.e., yref k=yref k(σ(k)) for the active mode σ(k)at time k. •In order to robustify the controller, keep the levels within the navigation rectangle and avoid temporal unfeasibility due to operating mode switches and disturbances, a soft constraint on navigation bounds is included. This is achieved by means of the decision variable αk, which must be penalized to ensure that the water levels are outside the bounds as little as possible: J(2) k=α⊺ kαk.(5) •Minimize control effort: J(3) k=u⊺ kuk.(6) •Ensure smoothness of control actions to extend the useful life of actuators: J(4) k=∆u⊺ k∆uk,(7) with ∆uk=uk−uk−1. The multi-objective function J(y0;yref ,u,σ)is then given by J(y0;yref ,u,σ) := Hp  k=1 4  j=1 βjJj k,(8) where y0is the initial output, yref ={yref k}is the reference sequence, u={uk}are the predicted inputs, and σ={σk}are the known signals, with k=1,··· ,H p, with Hpthe prediction horizon. The value βjis the weight of the j-th objective. 3.2 MPC design The problem to be solved at time instant kand i∈{k, ..., k + Hp−1}is given by min {ui|k}k+Hp−1 i=k J(yk|k;yref ,u,σ)(9a) subject to: xi+1|k=Axi|k+Bui|k+B⋆ui−n|k,(9b) yi|k=Cσ(k)xi|k+Dσ(k)ui|k+D⋆ σ(k)ui−n|k,(9c) ui|k∈U,j =k−n, ..., k +Hp−1(9d) xi|k∈X,j =k−n, ..., k +Hp−1(9e) yi|k−αi|k≤yi|k≤yi|k+αi|k,(9f) αi|k≥0,(9g) A. Anderson et al. / IFAC PapersOnLine 56-2 (2023) 755–760 759 Fig. 2. Final equilibrium sets ¯ Yi sfor i=1,2,3. Note that every point of every ¯ Yj sbelongs at least to one controllable set Ski(i, ¯ Yi s), with j=i. Fig. 3. Scenario where Algorithm 1 converges to an empty set. is defined by yref k:= yref k(σ), so the reference follows the switching path σ={σ(k)}with k≥0. Remark 7. The following MPC formulation is based on a punctual reference that switches according to the switching path σ={σ(k)}with k≥0. However, a relaxation term in the cost function is incorporated so as to provide robustness to the controller. The cost function of the MPC is defined next. 3.1 Operational objectives •Keep water levels as close to the reference levels as possible with sub-cost J(1) k: J(1) k=yk−yref k⊺yk−yref k,(4) with yref k∈¯ Yσ sfor some ¯ Yσ s⊂Ω, where Ωis a PS for T. The reference levels at time instant k, i.e., yref k, depend on the current mode σ(k), i.e., yref k=yref k(σ(k)) for the active mode σ(k)at time k. •In order to robustify the controller, keep the levels within the navigation rectangle and avoid temporal unfeasibility due to operating mode switches and disturbances, a soft constraint on navigation bounds is included. This is achieved by means of the decision variable αk, which must be penalized to ensure that the water levels are outside the bounds as little as possible: J(2) k=α⊺ kαk.(5) •Minimize control effort: J(3) k=u⊺ kuk.(6) •Ensure smoothness of control actions to extend the useful life of actuators: J(4) k=∆u⊺ k∆uk,(7) with ∆uk=uk−uk−1. The multi-objective function J(y0;yref ,u,σ)is then given by J(y0;yref ,u,σ) := Hp  k=1 4  j=1 βjJj k,(8) where y0is the initial output, yref ={yref k}is the reference sequence, u={uk}are the predicted inputs, and σ={σk}are the known signals, with k=1,··· ,H p, with Hpthe prediction horizon. The value βjis the weight of the j-th objective. 3.2 MPC design The problem to be solved at time instant kand i∈{k, ..., k + Hp−1}is given by min {ui|k}k+Hp−1 i=k J(yk|k;yref ,u,σ)(9a) subject to: xi+1|k=Axi|k+Bui|k+B⋆ui−n|k,(9b) yi|k=Cσ(k)xi|k+Dσ(k)ui|k+D⋆ σ(k)ui−n|k,(9c) ui|k∈U,j =k−n, ..., k +Hp−1(9d) xi|k∈X,j =k−n, ..., k +Hp−1(9e) yi|k−αi|k≤yi|k≤yi|k+αi|k,(9f) αi|k≥0,(9g) xk|k=ˆxk,(9h) dj|k=ˆ dj,j∈{k−n, ..., k +Hp−1}(9i) ul|k=uMPC l,l∈{k−n, ..., k −1},(9j) where iis the time instant along the prediction horizon, jand lspan time intervals that differ from the one described by i, and the pairs {yi|k, yi|k}and {ui|k, ui|k}denote lower and upper output and input bounds, respectively. Note the temporal dependency of the bounds: this is connected to the existence of several modes, which may be characterized by different bounds. Moreover, ˆxkand ˆ djrepresent the initial state and the disturbance estimates 3, as their values are not directly available for measurement. On the one hand, ˆxkis determined as the solution of the moving horizon estimator (MHE) proposed in Segovia et al. (2019, Eq. (27)) (its formulation is not included in this paper due to space limitations). Finally, uMPC ldenotes past control inputs injected into the system, and which still have an effect on the water levels at time k. Remark 8. A terminal constraint set and a terminal cost can be added to (9) to stabilize the system (Mayne et al., 2000). On the one hand, the terminal constraint set XHpcan be defined as an invariant ellipsoidal set given by (Conte et al., 2013) XHp=xk+Hp|k∈Rnxx⊺ k+Hp|kQxk+Hp|k≤1.(10) On the other hand, the terminal cost is expressed as  xk+Hp|k 2 Q, and Qis defined as the corresponding LQR gain (Limon et al., 2008). 4. CASE STUDY A canal with physical parameters as in Table 1 is used to test the control strategy. Two different operating modes—normal and rainy conditions—are considered. A 24-hour simulation is designed as follows: the system starts in normal mode; after eight hours, a rainy episode that lasts four hours is considered, after which normal mode is considered until the end of the simulation. Moreover, a sampling time equal to thirty minutes is considered. Uncontrolled offtakes for irrigation purposes at the upstream and downstream ends of the canal are regarded as system disturbances, and have an additive effect on both states and outputs. These flows, which are assumed to be unmeasurable but bounded (maximum value of 2 m3/s), complicate the realization of operational objectives. The approach followed in this paper is to consider worst-case upstream and downstream disturbances, i.e., equal to 2 m3/s, during the prediction step, although random offtake values within the bounds are simulated. This mismatch is compensated by the closed-loop nature of the control strategy, although it is worth noting that the resulting optimal control inputs may be over-conservative. The control problem is designed in Matlab R2020b (64 bits), using the Gurobi 9.2 optimization package 4as solver and YALMIP (L¨ ofberg, 2004) as parser. The closed-loop solution for a certain reference yref k=yref k(σ(k)) and the mode switch given by σ=1and σ=2is depicted in Figure 4. It can 3Disturbances of additive nature are not explicitly considered in the model, but they are in the simulation scenario (more details in Section 4). 4https://www.gurobi.com/ Fig. 4. Simulation results for a canal with two operating modes: level bounds (dashed red line), reference values (black dash-dotted line) and water levels (blue solid line) be realized that the control strategy is able to steer the water levels to the time-varying references with minimal error despite imperfect disturbance knowledge. Moreover, the water levels are kept within the navigation rectangle at all times, and the control inputs (not provided due to space limitations) are kept within admissible bounds. In order to quantify the performance of the controller, the tracking indices given in Segovia et al. (2018, Eq. (17)) are considered. These indices are equal to 95.87% and 98.33% for the upstream and downstream water levels, respectively, which allows to conclude that the tracking performance is guaranteed. 5. CONCLUSIONS In this paper, a switching MPC for canals with stability and controllability properties during the all switching instant was proposed. The canal was modelled on the basis of a linear model and considering three operating points. The MPC was designed to control the canal levels at the boundaries for large operating ranges while guaranteeing controllability under changes of modes. Several simulations for realistic cases of study demonstrate the satisfactory performance of the control strategy. 6. APPENDIX 6.1 Equivalent ’Undelayed’ System In what follows, the equivalence between Eq. (1) and Eq. (2) will be demonstrated. W.l.o.g. it can be assumed that n=1(the same reasoning can be applied for n>1). Eq. (1) is equivalent to x(k) x(k+ 1) =01 0Ax(k−1) x(k)+ 00 B⋆Bu(k−1) u(k), x(k) y(k)=01 0Cσ(k)x(k−1) x(k)+ 00 D⋆ σ(k)Dσ(k)u(k−1) u(k). Defining ¯x(k)=x(k−1) x(k),¯u(k)=u(k−1) u(k),¯y(k)= x(k) y(k)and matrices 760 A. Anderson et al. / IFAC PapersOnLine 56-2 (2023) 755–760 Table 1. Physical data of the test canal LNL [m] NNL [m] HNL [m] Length [m] Width [m] Side slope [m/m] Bottom slope [m/m] Manning coeff. [s/m1/3] Average flow [m3/s] {2.25,2.40} {2.35,2.53} {2.40,2.55} {2.50,2.68} {2.55,2.70} {2.65,2.83}26720 20 0 0 0.035 6 10 ¯ A=01 0A,¯ B=00 B⋆B, ¯ Cσ(k)=01 0Cσ(k),¯ Dσ(k)=00 D⋆ σ(k)Dσ(k), Eq. (1) is equivalent to ¯x(k+ 1) = ¯ A¯x(k)+ ¯ B¯u(k),(11) ¯y(k)= ¯ Cσ(k)¯x(k)+ ¯ Dσ(k)¯u(k), with ¯x(k)∈¯ X=X×X,¯u(k)∈¯ U=U×U. It can be noted that Equations (11) and. (2) are equivalent. 6.2 Controllable Set Characterization for the Output Direct manipulation of Eq. (1) leads to y(k+ 1) = Cσ(k)x(k+1)+Dσ(k)u(k+ 1) (12) +D⋆ σ(k)u(k+1−n) =Cσ(k)Ax(k)+Bu(k)+B⋆u(k−n) +Dσ(k)u(k+1)+D⋆ σ(k)u(k+1−n), and, by assuming Cσnon-singular for all σ∈Σ, then x(k)=C−1 σ(k)y(k)−Dσ(k)u(k)−D⋆ σ(k)u(k−n). Thus, y(k+ 1) can be expressed as a function that depends on the previous outputs and inputs as follows: y(k+ 1) = E−1 σ(k)y(k)+Cσ(k)B−Eσ(k)Dσ(k)u(k) (13) +Dσ(k)u(k+ 1) +(Cσ(k)B⋆−Eσ(k)D⋆ σ(k))u(k−n) +D⋆ σ(k)u(k+1−n), with Eσ(k)=Cσ(k)AC−1 σ(k). Since u(k),u(k−n),u(k+1− n)∈U, and by assuming matrix Eσ(k)is non-singular for all σ∈Σ, (14) can be transformed into Y+=E−1 σ(k)Y⊕Fσ(k)U,(14) and Y=Eσ(k)(Y+⊖Fσ(k)U),(15) with Fσ(k)=Cσ(k)(B−B⋆)+Eσ(k)(Dσ(k)−D⋆ σ(k))+Dσ(k)+ D⋆ σ(k). If the set Ω := Y+and S(σ, Ω) := Y, and ¯ Fσ(k)=−Fσ(k)in Eq. (15), then S(σ, Ω) = Eσ(k)(Ω ⊕¯ Fσ(k)U). The k-step controllable set to Ω,Sk(σ, Ω) for k>1, can be computed iteratively by Sk(σ, Ω) := S(σ, Sk−1(σ, Ω)) for k≥1, with S0(σ, Ω):=Ω. REFERENCES Anderson, A., Abuin, P., Ferramosca, A., Hernandez-Vargas, E., and Gonzalez, A. (2021). Cyclic control equilibria for switched systems with applications to ecological systems. International Journal of Robust and Nonlinear Control. Blanchini, F. and Miani, S. (2015). Set-Theoretic Methods in Control. Systems & Control: Foundations & Applications. Springer International Publishing. Bolea, Y. and Puig, V. (2016). Gain-scheduling multivariable LPV control of an irrigation canal system. ISA Transactions, 63, 274–280. Conte, C., Zeilinger, M.N., Morari, M., and Jones, C.N. (2013). Robust distributed model predictive control of linear systems. In 2013 European Control Conference (ECC), 2764– 2769. Duviella, E., Bako, L., and Charbonnaud, P. (2007). Gaussian and boolean weighted models to represent variable dynamics of open channel systems. In 2007 46th IEEE Conference on Decision and Control, 3084–3089. Fele, F., Maestre, J.M., Hashemy, S.M., Mu˜ noz de la Pe˜ na, D., and Camacho, E.F. (2014). Coalitional model predictive control of an irrigation canal. Journal of Process Control, 24(4), 314 – 325. Limon, D., Alvarado, I., Alamo, T., and Camacho, E.F. (2008). MPC for tracking piecewise constant references for constrained linear systems. Automatica, 44(9), 2382 – 2387. L¨ ofberg, J. (2004). YALMIP: a toolbox for modeling and optimization in MATLAB. In 2004 IEEE International Conference on Robotics and Automation, 284–289. Mayne, D.Q., Rawlings, J.B., Rao, C.V., and Scokaert, P.O.M. (2000). Constrained model predictive control: Stability and optimality. Automatica, 36(6), 789 – 814. Ocampo-Martinez, C., Puig, V., Cembrano, G., and Quevedo, J. (2013). Application of predictive control strategies to the management of complex networks in the urban water cycle. IEEE Control Systems Magazine, 33(1), 15–41. Perez, M., Anderson, A., Hernandez-Vargas, E.A., Gonz´ alez, A.H., and Actis, M. (2022). Permanence regions for switched linear systems under waiting-time constraints. IFACPapersOnLine, 55(16), 184–189. Rawlings, J.B., Mayne, D.Q., and Diehl, M. (2017). Model predictive control: theory, computation, and design, volume 2. Nob Hill Publishing Madison, WI. Segovia, P., Rajaoarisoa, L., Nejjari, F., Duviella, E., and Puig, V. (2018). Input-delay model predictive control of inland waterways considering the backwater effect. In 2018 IEEE Conference on Control Technology and Applications (CCTA), 589–594. Segovia, P., Rajaoarisoa, L., Nejjari, F., Duviella, E., and Puig, V. (2019). Model predictive control and moving horizon estimation for water level regulation in inland waterways. Journal of Process Control, 76, 1 – 14.