On Modeling and Constrained Model Predictive Control of Open Irrigation Canals

This paper proposes a model predictive control of open irrigation canals with constraints. The Saint-Venant equations are widely used in hydraulics to model an open canal. As a set of hyperbolic partial differential equations, they are not solved explicitly and difficult to design optimal control algorithms. In this work, a prediction model of an open canal is developed by discretizing the Saint-Venant equations in both space and time. Based on the prediction model, a constrained model predictive control was firstly investigated for the case of one single-pool canal and then generalized to the case of a cascaded canal withmultipools.The hydraulic software SICC was used to simulate the canal and test the algorithms with application to a real-world irrigation canal of Yehe irrigation area located in Hebei province.


Introduction
Open irrigation canals deliver water from the water sources to the farmlands to satisfy the irrigation demands.With the scarcity of water resources, better water control and management attracts increasing attention in both the mathematical and engineering communities.Open irrigation canals are well modeled by the Saint-Venant equations, a set of hyperbolic partial differential equations.The control problem of irrigation canals could be stated as that the water level and water flow rate in a canal are regulated by using the gate opening heights as control actions.
The control problem has been investigated in the last few decades.Boundary control of open canals indicates the stable boundary feedback control laws proposed directly based on the Saint-Venant equations.The boundary feedback control was proposed to guarantee the stability of the solutions of the Saint-Venant equations by using either a Riemann invariants approach [1,2] or a Lyapunov approach [3,4].On the other hand, based on the simplified model derived either from the Saint-Venant equations or from the mass conservation laws, a large number of control methods have been proposed ranging from the simplest to the most sophisticated.They were classified in the survey paper [5].
Advanced control policies like model predictive control are becoming a research focus in recent years.According to the strength of the rainfall-runoff, multiple model predictive control of a drainage canal is presented [6].Distributed model predictive control and coordinated policy for an irrigation canal were presented by dividing the multipool canal into several subsystems according to the local structures with communications among the subsystems [7,8].A two-level hierarchical distributed model predictive control with a risk management strategy was proposed based on a simplified model coming from the flow conservation law [9].A constrained predictive control was presented based on an ARIMA model of an irrigation canal [10].A nonlinear predictive control based on Saint-Venant equations was presented to regulate both water depth and water flow rate by solving the two-point boundary value problem numerically [11].A multivariable model predictive controller was discussed and tested on a laboratory canal [12].
In this work, an approximated predictive model derived from the Saint-Venant equations by discretization in both space and time was presented.Since the gate opening height is constrained by the boundary water depth, a constrained model predictive control was developed to solve the optimization problem.To test the performance of this predictive control algorithm, a numerical model of one singlepool irrigation canal located in Hebei province of China was built in the hydraulic software SICC by using the 1dimensional hydrodynamic model.The control algorithm was tested through the link between MATLAB and SICC.The predictive control algorithm was further extended to a multipool irrigation canal.

Modeling of Open Irrigation Canals
The dynamics of open irrigation canals are described by the Saint-Venant equations [13] where the first equation of ( 1) is the continuity equation, the second one is the dynamical equation,  is time,  ∈ [0, ] is the space coordinate with  being the length of the canal,   =   (, ) is the wetted cross section at point  and time ,   =   (, ) is the water flow rate,   =   (, ) is the water level,  is the gravity acceleration constant,   is the friction slope, and  0 is the bed slope.  and  0 are defined as follows: where   is the hydraulic radius and   is the roughness coefficient.Let   be the bottom width and   be the side slope; it follows that   = (  +     )  .
The discharge relationship of a gate between the gate opening height and the water head is described by where   is the discharge coefficient,   is the gate width,   is the gate opening height, and Δ  =  left −  right is the difference between the left and right water levels of the gate.
Let us consider a single-pool canal delimited by two gates [14], as shown in Figure 1.  and   , the upstream water level of Gate 1 and the downstream water level of Gate 2, are assumed to be two constants.Δ  and Δ  are the differences between the left and right water levels of Gate 1 and Gate 2, respectively.The water dynamics are modeled by the Saint-Venant equations shown in (1).
Since the Saint-Venant equations are a set of hyperbolic PDEs, it is difficult to build a control scheme for a canal system directly based on them.In order to build a control model of an irrigation canal, the Saint-Venant equations are simplified by using the spatial discretization.In this paper, the pool is divided into  − 1 sections with  points in space.Define ℎ  ( = 1, 2, . . ., ) and   ( = 1, 2, . . ., ) as the water level and flow rate at point  and their equilibrium values as   ( = 1, 2, . . ., ) and   ( = 1, 2, . . ., ); then the differences between the actual water level and flow rate and the equilibrium ones at point  could be denoted as Δℎ  = ℎ  −  ( = 1, 2, . . ., ) and Δ  =   −  ( = 1, 2, . . ., ).
Similarly, define the gate opening heights of the upstream and downstream gates and their corresponding equilibrium values as  1 ,  2 and  1 ,  2 ; then the differences between the gate opening heights and their equilibrium points are denoted by Δ  =   −   ( = 1, 2).By using the finite difference method, the Saint-Venant equations could be discretized in space and then linearized around the equilibrium as follows [14,15]: where the state vector In the following, the modeling of a single-pool canal is extended to the cascaded multipool canal.A cascaded multipool canal is composed by  pools joined by  + 1 gates.Without loss of generalization, a two-pool cascaded irrigation canal is taken as the example, as shown in Figure 2. The irrigation canal consists of two pools delimited by three underflow gates.The water dynamics of each pool are also described by the Saint-Venant equations.
From (3), the discharge at the intermediate gate is related to the difference between the water level ℎ 1, at the last point  in pool 1 and the water level ℎ 2,1 at the first point 1 in pool 2 as follows: Combining ( 5) and ( 6), it follows the mathematical model of the two-pool cascaded irrigation canal derived from the Saint-Venant equations where the state vector

Mathematical Formulation of Constrained Model Predictive Control of Irrigation Canals
Since the objective is to apply a model predictive control to both the one single-pool canal and the cascaded canal, the model described by ( 4) should be converted into a discretetime version as follows: where   ,   , and   are the discrete version of matrices   ,   , and   .Since the difference between the actual water level at each spatial point and the target one could be defined as Δ  =   − , in which   = [ℎ 1 , . . ., ℎ  , . . ., ℎ  ]  ∈   and  = [ 1 , . . .,   , . . .,   ]  ∈   , the state equations ( 4) could be rewritten as Let , , and  be the increments in terms of the state vector, output vector, and the control vector at the adjacent sampling time; it is given that Thus the state-space equations of the one single-pool canal for designing the model predictive control could be written as follows: The performance functional of the model predictive control problem for the one single-pool canal has the following form: where  = [( | ), ( + 1 | ), . . ., ( +  − 1 | )]  , ( +  | ) is the reference trajectory,  is the prediction horizon,  is the control horizon, and  and  are, respectively, nonnegative and positive definite weighting symmetric matrices with appropriate dimensions.Considering that the gate opening height must be restricted by the upstream and downstream water levels of the gate, the control actions representing the gate opening heights should be constrained by Similar to the formulation of model predictive control problem of one single-pool canal, the discrete-time version of (7) for a cascaded multipool irrigation canal has the following form: Substituting Δ  =   −  into (15) gives Let , , and  be the increments in terms of the state vector, output vector, and the control vector at the adjacent sampling time; it is given that Thus the state-space equations of the two-pool cascaded canal for designing the model predictive control could be written as follows: The performance functional of the model predictive control problem for the two-pool cascaded canal has the following form: ( The control constraints are The control framework of the constrained model predictive control for a two-pool canal is depicted in Figure 3.

Simulation Results and Applications
4.1.Case of One Single-Pool Canal.In this section, the proposed constrained model predictive control was applied to a single-pool canal.The test canal is part of Yehe irrigation area in Hebei province of China [16], as shown in Figure 4.The canal has a constant rectangular cross section.The Gate 2  geometric parameters are summarized in Table 1, including the length, bottom width, canal height, bed slope, and side slope.The hydraulic conditions are summarized in Table 2, including the initial discharge at both gates at  = 0 and the initial water level of the canal at  = 0.
The simulations are performed on a PC with CORE i5, RAM 4 GB.The working environment is WIN 7 32-bit operation system and MATLAB R2008b.
This one single-pool canal is divided into 3 sections with 4 spatial points.A numerical model of the canal is established in a hydraulic software, SICC (Simulation of Irrigation Canals and Control) developed by Irstea [17].The constrained predictive controller is applied to the SICC model through the link between SICC and MATLAB.The weighting matrices  and  are selected as an identity matrix with according dimensions, respectively.The control horizon  and the prediction horizon  are selected to be of the same length; that is,  =  = 6.
The simulation time is set as 59 minutes.According to the irrigation demands, it is desired that the target water level of the pool is always kept at  = 1.3 m in whole simulation.The evolutions of the water levels at four spatial points are illustrated in Figure 5. From these figures, the water levels at the last three points have time delays except the first point.The water levels at the 1st and 4th point are stabilized at the target value faster than those at the 2nd and 3rd point.At each optimization step, it is observed that the upper bound of the control constraint ( 14) is varied with respect to the water level at the 4th spatial point.The evolutions of the two gate opening heights are illustrated in Figure 6.

Case of a Two-Pool Cascaded Canal.
In the case of twopool cascaded canal, two pools are assumed having the same length and with a constant trapezoidal cross section, as shown in Figure 7.The geometric parameters and hydraulic conditions of each pool are listed in Tables 3 and 4, respectively.Each pool is also divided into 3 sections with 4 points.The control horizon and prediction horizon take the same as those taken in the one single-pool case.By using SICC and MATLAB, the constrained model predictive controller is tested.
The simulation time is set as 300 s.Before 100 s, the target water levels of two pools are set as  1 () = 2.5 m and  2 () = 2 m.After 100 s, the target water levels of two pools switch to  1 () = 2 m and  2 () = 1.5 m.Similar to the case of one single-pool canal, the first scenario about control horizon and prediction horizon is selected as  =  = 10.Figures 8 and 9. From these figures, it is observed the water levels at four points are stabilized at the target values.The evolutions of three gate opening heights are illustrated in Figure 10.
In order to show the effects of MPC parameters on the control performance, two more scenarios with longer control horizon and prediction horizon are selected; that is,  =  = 30 and  =  = 60.The simulation results run by    control and prediction horizon result in better optimization performance and higher run time.

Conclusions
A predictive model of irrigation canals is mathematically derived from the Saint-Venant equations by discretization in both space and time.Since the gate control actions are restricted by the boundary water levels, a constrained model predictive control is developed for both a single-pool canal and multipool cascaded canal.The control performance of the proposed predictive control scheme is tested on one single-pool canal that is part of Yehe irrigation area in Hebei province of China and generalized to a two-pool cascaded canal.All the simulations carried out in SICC and MATLAB show that the constrained model predictive control could stabilize the water levels to the target values by regulating the gate opening heights.A performance comparison showed the control effects of different control horizon and prediction horizon.It should be emphasized that the predictive control is a centralized one.The time delays at the downstream points of each pool are caused due to the long conveying pool.A decentralized predictive control scheme could be a future work.

Figure 2 :
Figure 2: Structure of a two-pool cascaded canal.

Figure 3 :
Figure 3: Structure of predictive control scheme.

Figure 4 :
Figure 4: A single-pool canal in Yehe irrigation area.

Figure 5 :Figure 6 :
Figure 5: Evolutions of water levels at four points.

Figure 7 :
Figure 7: Schematic of a constant trapezoidal cross section.

Figure 8 :
Figure 8: Evolutions of water levels at four points in pool 1 with  =  = 10.

Table 1 :
Geometric parameters of one single-pool canal.

Table 2 :
Hydraulic conditions of one single-pool canal.

Table 3 :
Geometric parameters of each pool of the cascaded canal.

Table 4 :
Hydraulic conditions of each pool of the cascaded canal.

Table 5 :
Comparisons of optimization performances and computational times.