PILOTE - CANARI

obtained from the steady-state solution of the Riccati equation. A Kalman .... equation, and Hk is a feedforward control vector. ..... quadratic regulator theory.
57KB taille 7 téléchargements 311 vues
« PILOTE »: optimal control of irrigation canals By P.O. Malaterre1

ABSTRACT This paper presents an application of optimal control theory to the automatic control of two different 8-pool irrigation canals. The model used to design the controller is derived from Saint-Venant's equations discretized through the Preissmann implicit scheme. The LQR closed-loop controller is obtained from the steady-state solution of the Riccati equation. A Kalman Filter is used to reconstruct the state variables and the unknown perturbations from a reduced number of observed variables. Both perturbation rejection and tracking aspects are handled by the controller. Known offtake withdrawals and future targets are anticipated through an open-loop obtained from the time varying solution of the LQ optimization problem. The controller and Kalman filter are tested on a full non-linear model and proved to be efficient. INTRODUCTION Significant research efforts in irrigation canal automation can be recognized in the literature and were summarized by Malaterre (1994). In particular, since it handles easily multivariable systems, optimal control was considered by the following authors. The first published applications of optimal control on irrigation canals were from Corriga et al. (1982a,b). Balogun et al. (1988) and Garcia et al. (1992) did not consider explicitly external perturbations acting on the system, such as unpredicted offtakes' outflows inherent in on-demand deliveries. Reddy et al. (1992) considered unknown external perturbations. A state observer which did not include perturbations was used. So, when the system was perturbed, the state reconstruction error was expected to differ from zero. However this was not commented on. Furthermore, variable targets (i.e. tracking) and anticipation

1

Cemagref, BP 5095, 34033 Montpellier Cedex 1, France

1

on future known offtake withdrawals (i.e. open-loop) were never explicitly studied. In this paper, a discrete time optimal control algorithm for irrigation canals under predicted and unknown external perturbations is presented. It is named « PILOTE » for « Preissmann Implicit scheme, Linear Optimal control, Tracking of variables and Estimation of perturbations ». The control algorithm is tested on canal 1 (Figure 1) and canal 2 (Figure 2) of the test cases set by the ASCE Task Committee on Canal Automation Algorithms (ASCE 1995).

Figure 1. Longitudinal profile of canal 1 (Initial state of Test 1.1).

Figure 2. Longitudinal profile of canal 2 (Initial state of Test 2.1). LINEAR MODEL To apply the optimal control method, a linear model is required. The latter can be obtained analytically (Malaterre 1994) or from transfer function 2

identification (Kosuth 1994). The first option is selected in this paper. Saint Venant equations are discretized with Preissmann's implicit scheme, replacing the partial derivatives by finite differences. The canal is divided into j cross sections and two variables are considered at each section: the water elevation δZi and the flow discharge δQi. Appropriate boundary conditions need to be specified at offtakes, check gates, head and tail end of the system. The control action variables are the upstream discharge δQ1 and the check gate openings δwi, i=2,8. The perturbation variables are the unknown offtake outflows δQp i, i=1,8. All δ variables are relative to the reference steady state. CONTROL ALGORITHM Characterization Characteristics of the PILOTE controller presented in this paper, according to the terminology defined in Malaterre et al. 1995a,b,c are: IDENTIFICATION Name

Developer

PILOTE

Cemagref

(Malaterre,

Kosuth,

Baume)

CHARACTERIZATION Considered variables

I/O

Logic of

Design Technique

control controll measured ed ydn

yup & ydn

ctrl.

Struc

act.

t.

Type

Direct.

Qup & G MIMO FB + FF up dn

APPLICATIONS OR TESTS Non

linear

model

(SIC

Model)

3

+ LQR + Observer

Linear optimal control theory applied to a perturbed system Discretized Saint-Venant equations can be written under the usual representation of a linear discrete dynamic system: xk+1 = Axk + Buk + Bppk  (1) yk = Cxk  n m l p where xk ∈5 , uk ∈5 , yk ∈5 , pk ∈5 , are respectively state, control action, and controlled variables, and perturbation vectors at each time step k. A, B, Bp, and C are matrices of appropriate dimensions. The sequence of control vectors uk can be calculated using the well known linear discrete-time optimal regulator theory. Performance index J is minimized: N J = ∑[(yk - yk*)TQy(yk - yk*) + ukT R uk] (2) k=0 where N is the optimization horizon, Qy and R are respectively a non-negative and a positive definite symmetric weighting matrix. In the case of tracking, a controlled variable's reference trajectory yk* (k = 0 to N) different from zero is defined. Integral states are appended to the system state vector in order to remove steady state errors. These states are constrained with a QI matrix. The optimization constraints are imposed by the system linear dynamics (1). By using standard optimization procedures, the optimal control variable uk is obtained as: uk = - K xk + Hk (3) K is the steady feedback matrix gain obtained from the algebraic Riccati equation, and Hk is a feedforward control vector. This latter one is obtained from the time varying solution of the minimization problem (Malaterre 1994). The feedforward component is then considerably improved compared to the steady-state solution as used in previous papers (Malaterre 1995d, Sawadogo et al. 1995). Discrete-Time Observer The control law (3) assumes that the complete system state vector xk can be measured accurately, which is often unrealistic. Most frequently, only certain linear combinations of states, denoted observed variables zk, can be measured: zk = Dxk (4) q where zk ∈5 , and D is a (q, n) matrix. From variable zk, the state vector xk can be reconstructed. Then, the actual state xk is replaced by the reconstructed state ^ xk in (3). Due to unknown perturbations acting on the system, a state Kalman filter including a perturbation observer is designed. The state Kalman filter is defined as:

4

^ xk+1 = Ax ^k + Buk + Bpp ^k + L [zk - ^ z k] (5) where p ^k is the perturbation vector estimation: p ^k+1 = p ^k + Lp [zk - ^ z k] (6) L and Lp matrices can be computed by pole placement (Luenberger observer), or through the minimization of the reconstruction error (Kalman filter). The second option is tested in this paper. In steady conditions the global observer (5) plus (6) guarantees the vanishing of the reconstruction error and reconstructs accurately the perturbation acting on the system. Tuning Tuning parameters of the PILOTE algorithms are the Qy and R matrices of equation (2), the QI matrix acting on the integral states, the equivalent Qo and Ro matrices of the Kalman filter, and the feedforward horizon Tf used to compute the Hk term of equation (3). The Qy and R matrices can be chosen through a try and error procedure. It is quite straightforward since the matrices can be chosen diagonal, with each coefficient corresponding to a given control action or controlled variable. The initial value of these coefficients can be chosen as 1, and then decreased if the corresponding variable moves too much, or increased otherwise. A very interesting method using the Grammien matrices was also tested (Larminat 1993). It gives directly the Qy and R matrices from only one tuning parameter (identical to a time horizon). It gave very good results, increasing the robustness of the controller, although slightly degrading the performance indicators. Results presented in this paper are those using the try and error selection of Qy, QI and R matrices: Qy = 1 Id, QI = 0.1 Id, R = 10*[0.8 0.8 1 1 1 1.5 1.5 2] for canal 1 scenario 1, Qy = 10-6 Id, QI = 1 Id, R = 102*[105 105 1 1 1 1 1 1] for canal 1 scenario 2 and Qy = 2 Id, QI = 0.2 Id, R = 0.08*[0.6 1 1 1 1 1 2 2] for canal 2 for both scenarios. The same options exist for the selection of the weighting matrices of the Kalman filter. We choose Qo = 102 Id, Ro = 102 Id for canal 1 and Qo = 105 Id, Ro = 10-3 Id for canal 2. The latest tuning parameter, the feedforward horizon Tf, can be increased until no improvement of the performance indicators can be observed. We choose Tf = 5 h for canal 1 and Tf = 3h20 for canal 2. SIMULATION RESULTS AND ANALYSIS The two processes to be controlled are two 8-pool open-canals receiving water from a source located upstream. The control system aims to match the water level at the downstream end of each pool with a target value. It adjusts upstream inflow and opening of cross gates. The observed variables are water levels at the upstream and downstream ends of each pool. No other variable is measured on the system, in particular no discharge is measured along the system and no information is measured at the offtakes. 5

The discrete-time linear model (1) is generated by a special module of the computer package SIC, developed by Cemagref (1992), with a sampling interval of 5 minutes and a space step of 50 m (at the downstream section of the pools) and 500 m (at the upstream section of the pools) for canal 1 (respectively 15 minutes and 400 m for canal 2). The controller design and simulations using a linear model are carried out with the commercial package MatLab & Simulink (1992). Results obtained on this linear model are not presented in this paper. The simulations, tests and computation of performance indicators are carried out on the full non-linear simulation model SIC, with a sampling interval of 5 minutes and a space step of 50 m for canal 1 (respectively 15 minutes and 200 m for canal 2). A minimum gate movement of 0.5 % of the gate height was imposed to the check gates, as suggested in ASCE 1995. Performance indicators In order to assess the performance of the controller, 3 indicators are computed for each controlled variable: the maximum absolute error (MAE), the integral of absolute magnitude of error (IAE), the steady state error (StE), and 2 indicators are computed for each control action variable, when this is relevant: the integrated average absolute gate movement (IAW) and the integrated average absolute discharge change (IAQ). These indicators are computed for 2 periods [t1..t2]: [0h..12h] and [12h..24h] corresponding, respectively, to schedule and unscheduled changes. These indicators are defined as: Max[t1..t2] | yj- yj target | MAEj = y j target

t2 ∆t | y -y | (t2-t1+∆t).yj target ∑ j j target t=t1 t2 ∆t StEj = | ∑ (yj-yj target) | (t0+∆t).yj target t=t2- t0 IAEj =

where t0 = 2 hours

t2

IAWi =

∑|w

i

(t)-wi (t-∆t) | - | wi (t2)-wi (t1) |

for i = 2 to 8

t=t1+∆t t2 IAQi = for i = 1 to 8 ∑ | Qi (t)-Qi (t-∆t) | - | Qi (t2)-Qi (t1) | t=t1+∆t Where yj, yj target, ∆t, wi and Qi are respectively the water elevation at the downstream end of pool j (controlled variable, j= 1 to 8), the corresponding targeted value, the regulation time step (5 mn for canal 1 and 15 mn for canal 2), the gate opening (control action variable for structures 2 to 8) and the discharge at structure i (control action variable for structure 1, resulting flow for structures 2 to 8). 6

Since this represents a large number of indicators, only the maximum and average values along the system are presented in the following sections. Simulation results for canal 1 scenario 1 The initial head discharge is 0.8 m3/s. The initial offtake withdrawals are 0.1 m3/s from offtake 1 to 8. The resulting tail end discharge is 0 m3/s. After 2 hours, offtakes 3 and 4 increase their gate openings by 0.023 and 0.021 m, respectively, which should correspond, after steady state stabilization, of a discharge increase of 0.1 m3/s at both offtakes, as scheduled. Then, at time 14 h, offtakes 4 and 5 reduce their gate openings to get a 0.1 m3/s discharge decrease without prediction. This is called the "tuned conditions". Then, the same controller is tested without further tuning on the same system and same scenario except 3 modifications: Manning coefficient is 0.018 instead of 0.014, discharge coefficients at check gates are 10 % lower (0.9 instead of 1.0), offtake withdrawals are 5% higher. Figures 3 shows the evolution of the control action and controlled variables and of the flows at control structures as a function of time. The obtained performance indicators are presented in table 1.

7

Figure 3. Graphical results on canal 1 scenario 1. MAE (%)

IAE (%)

StE (%)

IAW

IAQ

Perio 0-12 12- 0-12 12- 0-12 12- 0-12 12- 0-12 12d 24 24 24 24 24 Tuned Max. 4.62 13.4 0.61 1.8 5 Avg. 2.64 8.6

0.39 0.36 0.53 0.56 2.32 2.46

0.56 1.27 0.11 0.12 0.31 0.34 1.52 1.7

Untune Max. 3.53 15.2 0.68 2.33 0.22 0.35 0.54 0.53 2.17 2.48 d 3 Avg. 2.25 10.2 0.58 1.54 0.1 3

0.16 0.29 0.34 1.27 1.56

Table 1. Performance indicators on canal 1 scenario 1. Simulation results for canal 1 scenario 2 The initial head discharge is 2.0 m3/s. The initial offtake withdrawals are 0.2 m3/s from offtake 1 to 7 and 0.6 m3/s at offtake 8. The resulting tail end discharge is 0 m3/s. After 2 hours, offtakes 2, 3, 4, 5, 6 and 8 change their gate openings to get a discharge change of -0.2, 0.2, -0.2, -0.2, 0.1 and 0.3 m3/s, respectively, as scheduled. Then, at time 14 h, the same offtakes change their gate openings by the opposite values, without prediction. Figures 4 shows the evolution of the control action and controlled variables and of the flows at control structures as a function of time, for tuned and untuned conditions (as defined for scenario 1). The obtained performance indicators are presented in table 2.

8

Figure 4. Results on canal 1 scenario 2.

9

MAE (%)

IAE (%)

StE (%)

IAW

IAQ

Perio 0-12 12- 0-12 12- 0-12 12- 0-12 12- 0-12 12d 24 24 24 24 24 Tuned Max. 25.3 43.0 7.06 9.24 3.8 9 4

11.1 1.26 0.76 1.45 2.89 9

Avg. 19.5 24.9 5.01 5.22 2.94 2.91 0.77 0.38 0.96 1.37 6 4 Untune Max. 25.3 47.6 6.78 9.94 6.83 4.86 1.64 0.62 1.03 1.85 d 5 Avg. 20.3 23.3 6.26 4.89 4.12 1.87 0.92 0.22 0.75 0.8 3 2 Table 2. Performance indicators on canal 1 scenario 2. Simulation results for canal 2 scenario 1 The initial head discharge is 11.0 m3/s. The initial offtake withdrawals are 1 m3/s from offtake 1 to 8. The resulting tail end discharge is 3 m3/s. After 2 hours, offtakes 5 and 6 increase their gate openings to get a discharge change of 1.5 and 1 m3/s, respectively, as scheduled. Then, at time 14 h, offtake 6 reduces its gate opening to get a discharge change of 2 m3/s without prediction. This is called the "tuned conditions". Then the same controller is tested without further tuning on the same system and same scenario except 3 modifications: Manning coefficient is 0.026 instead of 0.020, discharge coefficients at check gates are 10 % lower (0.72 instead of 0.8), offtake withdrawals are 5% higher. Figures 5 shows the evolution of the control action and controlled variables and of the flows at control structures as a function of time. The obtained performance indicators are presented in table 3.

10

Figure 5. Graphical results on canal 2 scenario 1. MAE (%)

IAE (%)

StE (%)

IAW

IAQ

Perio 0-12 12- 0-12 12- 0-12 12- 0-12 12- 0-12 12d 24 24 24 24 24 Tuned Max. 1.67 7.5 0.46 Avg.

2

0.13 0.23 0.32 0.59 3.68 7.63

1.02 4.83 0.26 1.31 0.04 0.07 0.24 0.4 2.49 4.65

Untune Max. 5.76 12.8 2.46 3.81 2.29 1.79 1.71 1.07 4.18 5.81 d 4 Avg.

3.71 6.63 1.55 2.24 1.36 1.01 0.61 0.6 2.81 4.6

Table 3. Performance indicators on canal 2 scenario 1. Simulation results for canal 2 scenario 2 The initial head discharge is 2.7 m3/s. The initial offtake withdrawals are 0.2, 0.3, 0.2, 0.3, 0.2, 0.3, 0.2, 0.3 m3/s, respectively, from offtake 1 to 8. The resulting tail end discharge is 0.7 m3/s. After 2 hours, offtakes 1, 2, 3, 6, 7 and 8 increase their gate openings to get a discharge change of 1.5, 1.5, 2.5, 0.5, 1 and 2 m3/s, respectively, as scheduled. The tail end discharge is also increased by 2 m3/s, as scheduled. Then, at time 14 h, the same offtakes reduce their gate openings by the same 11

value, without prediction. The tail end discharge is also decreased by 2 m3/s, without prediction. Figures 6 shows the evolution of the control action and controlled variables and of the flows at control structures as a function of time, for tuned and untuned conditions (as defined for scenario 1). The obtained performance indicators are presented in table 4.

Figure 6. Results on canal 2 scenario 2.

12

MAE (%)

IAE (%)

StE (%)

IAW

IAQ

Perio 0-12 12- 0-12 12- 0-12 12- 0-12 12- 0-12 12d 24 24 24 24 24 Tuned Max. 11.2 34.1 4.17 10.5 2.44 8.79 0.45 0.49 9.34 10.3 4 6 7 5 Avg. 5.06 17.1 2.09 7.09 1.18 4.29 0.26 0.28 4.15 6.08 1 Untune Max. 17.6 44.1 7.34 16.0 4.04 11.6 0.46 0.36 10.2 6.61 d 5 2 6 5 Avg. 9.46 22.2 4.1 9

10.5 1.92 5.4 5

0.3

0.12 4.43 2.92

Table 4. Performance indicators on canal 2 scenario 2. Remark: in order to simplify the modeling of canal 2, and to have a tail-end closed canal as canal 1, the tail end discharge was added to the discharge of the offtake n°8 and the tail-end of the canal was considered as closed. SUMMARY AND CONCLUSION This paper proposes a method for automatic control of irrigation canals. By adjusting the upstream discharge and the gate openings a target water level is maintained at the downstream end of each pool. Linear optimal control theory provides an elegant way to tackle this multivariable control problem. Under external perturbed conditions, such as on-demand deliveries, a perturbation observer is added to improve the state reconstruction. The controller and the Kalman filter are found efficient. The resulting control algorithm can be suited for real-time operations. Some features supporting this potential of applications are: (1) It is designed for water levels and discharge control, but only feasible hydraulic measurements (water elevations) are used for feedback; (2) Its performance is satisfactory in terms of a quick evolution to target water levels; (3) The algorithm is able to deal with unknown perturbations such as unpredicted water withdrawals. Results presented in this paper are obtained using a full non-linear model. REFERENCES ASCE (1995). Test cases and procedures for algorithm testing and presentation. First International Conference on Water Resources Engineering, San Antonio, USA, 14-18 August 1995. 5 p. Balogun O.S., Hubbard M., DeVries J.J. (1988). Automatic control of canal flow using linear quadratic regulator theory. J. of Irrigation and Drainage Eng., 114 (1), 75-101.

13

Cemagref (1992). SIC user's guide and theoretical concepts. Cemagref Publication. 191p. Corriga, G., Fanni, A., Sanna, S. and Usai, G. (1982a). A constant-volume control method for open channel operation. International Journal of Modelling and Simulation, Vol. 2, n° 2, pp. 108-112. Corriga G., Sanna S., Usai G. (1982b). Sub-optimal level control of open-channels. Proceedings International AMSE conference Modelling & Simulation, Vol. 2, p 67-72. Garcia A., Hubbard M., and DeVries J. J. (1992). Open channel transient flow control by discrete time LQR methods. Automatica, 28, 255-264. Kosuth P. (1994). Techniques de régulation automatique des systèmes complexes : application aux systèmes hydrauliques à surface libre. Thèse de Doctorat, Institut National Polytechnique de Toulouse - Cemagref - LAAS CNRS, 330 p. Larminat P. (1993). Automatique - Commande des systèmes linéaires. Hermès, 321 p. Liu F., Malaterre P.O., Baume J.P., Kosuth P., Feyen J. (1995). Evaluation of a canal automation algorithm CLIS. First International Conference on Water

Resources

Engineering, San Antonio, USA, 14-18 August 1995. 5 p. Malaterre, P.O. (1994). Modelisation, Analysis and LQR Optimal Control of an Irrigation Canal. Ph.D. Thesis LAAS-CNRS-ENGREF-Cemagref, Etude EEE n°14, ISBN 2-85362368-8, 255 references, 220 p. Malaterre

P.O.

(1995a).

La

régulation

des

canaux

d’irrigation:

caractérisation

et

classification, Journal la Houille Blanche, Vol. 5/6 - 1995, p. 17-35. Malaterre, P.O. (1995b). Regulation of irrigation canals: characterisation and classification. International Journal of Irrigation and Drainage Systems, Vol. 9, n°4, November 1995, p. 297-327. Malaterre P.O., D.C. Rogers, J. Schuurmans. (1995c). Classification of Canal Control Systems. First International Conference on Water Resources Engineering, Irrigation and Drainage, San Antonio, Texas, USA, 14-18 August 1995. Malaterre, P.O. (1995d). PILOTE: optimal control of irrigation canals. First International Conference on Water Resources Engineering, Irrigation and Drainage, San Antonio, Texas, USA, 14-18 August 1995. MatLab & Simulink (1992). A program for simulating dynamic systems. MathWorks Inc. Reddy, J.M. (1990). Local optimal control of irrigation canals. J. of Irrigation and Drainage Eng., 116 (5), 616-631. Reddy J.M, Dia A., and Oussou A. (1992). Design of control algorithm for operation of irrigation canals. J. of Irrigation and Drainage Eng., 118 (6), 852-867.

14

Sawadogo S., Malaterre P.O., P. Kosuth. 1995. "Multivariable optimal control for on-demand operation of irrigation canals". International Journal of System Science, Vol. 26:1, p 161178.

15