Environmental Modelling & Software: R. Rivas-Perez, V. Feliu-Batlle, F.J. Castillo-Garcia, A. Linares-Saez
Environmental Modelling & Software: R. Rivas-Perez, V. Feliu-Batlle, F.J. Castillo-Garcia, A. Linares-Saez
Environmental Modelling & Software: R. Rivas-Perez, V. Feliu-Batlle, F.J. Castillo-Garcia, A. Linares-Saez
a r t i c l e i n f o
a b s t r a c t
Article history:
Received 3 October 2013
Accepted 3 October 2013
Available online 31 October 2013
This paper describes the formulation and development of a mathematical model for high-performance
robust controller design techniques, based on a complete identication for control procedure, of an irrigation main canal pool (true plant), which is characterized by the exhibition of large variations in its
dynamic parameters when the discharge regime changes in the operating range [Qmin, Qmax]. Real-time
eld data has been used. Four basic steps of the proposed procedure have been dened in which all the
stages, from the design of the experiments to the model validation, are considered. This procedure not
only delivers a nominal model of the true plant, but also a reliable estimate of its model uncertainty
region bounded by the true plant models under minimum and maximum operating discharge regimes
(limit operating models). The model uncertainty set, dened by the nominal model and its uncertainty
region, is characterized by its being as tight as possible to the true irrigation main canal pool. The obtained results are very promising since this kind of models facilitates the design of robust controllers,
which allow improving the operability of irrigation main canal pools and also substantially reduce water
losses.
2013 Elsevier Ltd. All rights reserved.
Keywords:
Systems identication
Irrigation canal
Time-varying parameters
Model uncertainty set
Robust controller
Water efcient use
1. Introduction
A signicant part of the control system design of irrigation main
canals is devoted to obtaining their mathematical models. These
mathematical models should provide an accurate description of the
relevant irrigation main canal pool dynamics. The physical dynamics of an irrigation main canal pool (plant) are usually modeled
and simulated by using the SainteVenant equations, owing to their
capacity to represent the nonlinear hydraulic characteristics of real
interest (Chaudhry, 1993). These equations are not easy to use
directly as a model for control system design (Kovalenko, 1983;
Litrico and Fromion, 2009; Rivas-Perez et al., 2007). Linearization
or simplications of the SainteVenant equations are therefore
recurrently used by the irrigation canal control research community. Linear and rational models open up the possibility to apply
well-known control system design techniques, which are relatively
easy to implement.
208
2. Methodology
3.2. Design of the experiments (step 1 of the procedure)
We propose the following four basic steps algorithm for the
identication for control procedure of a true irrigation main canal
pool from N eld sampled measurements of the input and output
Z N futk ; ytk gN
k1 .
Step 1: Design of the experiments;
Step 2: Data collection, parameter estimation and validation of
the linear nominal model of the true plant under nominal operating
discharge regime (Q(t) Qnom);
Step 3: Data collection, parameter estimation and validation of
the linear models of the true plant under limit operating discharge
regimes (model uncertainty region);
Step 4: Delivery of the true plant model uncertainty set,
comprised by the nominal model and its uncertainty region.
The eld data and results reported in this paper were obtained
from the rst pool in the AIMC, which is known as the Bocal. It is a
lined trapezoidal canal pool of 8 km in length, with a variable depth
of between 3.5 and 4.15 m, a variable width of between 21 and
26.9 m, and a design maximum discharge of 30 m3/s, in its entire
extension. Fig. 1 shows an upper view of the Bocal in which it is
possible to observe the Ebro River, the Pignatelli dam, and the Gate
House.
This canal pool is operated in a downstream end regulation
mode (Kovalenko, 1983). The downstream end water level is
controlled by means of 10 upstream undershoot gates located in
the Gate House on the side of the canal. The measurements available
209
Q t Cd L
q
p
2g ut yup t ydw t;
(1)
(2)
210
This step has the following two stages: a) nonparametric identication, and b) parametric identication (Ljung, 1999). The
nonparametric identication is very often a rst step in obtaining
experimental information on the dynamic properties of a plant. In
this case a preliminary experiment, such as a step response, is
performed to gain primary knowledge (by visual inspection) about
plant dynamic characteristics. Generally, this provides good insights into important properties of the plant, as e.g. the presence
and length of time delays, possible model order, static gain and
time constants (Van den Hof and Bombois, 2004). The information
obtained from nonparametric identication is then used in parametric identication to determine the plant model based on a more
83.0
166.0
249.0
332.0
415.0
249.0
332.0
415.0
time (min)
170
120
70
20
83.0
166.0
time (min)
Fig. 4. Experimental eld data of the Bocal obtained with a PRBS under nominal operating discharge regime.
Gnom s
Dynom s
Knom
esnom s ;
Dunom s
T1nom s 1T2nom s 1
(3)
where Knom is the static gain, T1nom, T2nom are the time constants,
and snom is the time delay. We consider that T1nom is the dominant
time constant (the largest of those associated with the dynamics of
the canal pool), while T2nom is the smallest time constant that
represents the motors equivalent control gate dynamics secondary canal dynamics. T2nom is usually much smaller than T1nom
(Rivas-Perez et al., 2007).
The transfer function (3) is similar to that obtained by other
authors (e.g. Litrico and Fromion, 2009). It is a standard model of
the type used in DBM modeling of hydrological and other environmental systems (Young, 2011, 1998). The second order assumed
dynamics for this model needs to be conrmed in the next stage
(parametric identication and model validation) of this step using
model structures with different orders, delays and sampling period
(Garnier and Wang, 2008). The approximated nominal values of the
parameters estimated from Fig. 3 are Knom z0.044 cm/cm, T1nom
z46.95 min, T2nom z0.85 min, snom z6 min, tss_nom z78.33 min
(settling time). The model evaluation (Bennett et al., 2013), i.e. the
comparison of the step test and the prediction given by the linear
model (3) with the parameters estimated nominal values, is shown
in Fig. 3 also.
b) Parametric identication: Experiment based on the response
to a pseudo random binary sequence (PRBS) as input was also
carried out in order to collect data containing the maximum information with regard to the dynamic behavior of the nominal
plant. The PRBS are persistent excitation signals, which contain
frequency spectrums that are sufciently wide to represent the real
plant dynamics (Ljung, 1999). This command sequence was
designed in such a way that signicant, although not very large,
downstream end water level variations were obtained. According
to the linear system theory (Dorf and Bishop, 2005), in order to
capture the main dynamic behavior of a real plant, its input should
be excited around the frequency at which its Bode diagram presents
bends, i.e. around the plant cutoff frequency. This frequency may be
computed by means of the time constants of the nominal plant
obtained in the experiment based on the step command.
It was determined that the PRBS should change the upstream
control gate opening magnitude at intervals that were multiples of
10 min with a maximum variation interval of 50 min. The sampling
period was 1 min. In this case, the downstream gate was again kept
in a xed position and the equivalent control gate received an
increment in its opening magnitude of 120 cm in such a way that
a total equivalent control gate opening magnitude of 140 cm was
achieved. These experiments lasted 415 min (approximately 7 h).
The experimental eld data collected was stored in a computer and
they are shown in Fig. 4. An additional procedure was that of
211
splitting the collected data into data for estimation and data for
validation (left and right of the vertical red line, respectively).
The data collected from these experiments were analyzed with
the purpose of verifying their suitability for the parameter estimation procedure. Their adequacy was veried and these data
were, therefore, used directly in this step of the proposed identication for control procedure. Different model structures such as
ARX, OE, BoxeJenkins and ARMAX were tested to determine which
of them best described the dynamic behavior of the nominal plant.
These structures are the most used in the design of control systems
and are represented by means of the following expressions (Ljung,
1999):
Aq b
y ARX
b
y OE
b
y BJ
nom t
Bq nk
q
unom t xOE
Fq
Bq nk
Cq
x
q
unom t
Fq
Dq BJ
nom t
nom t
Aq b
y ARMAX
nom t
nom t;
(4)
nom t;
(5)
nom t;
(6)
nom t;
(7)
where b
y ARX nom t; b
y OE nom t; b
y BJ nom t; b
y ARMAX nom t are the
nominal model output signals (the estimated downstream end
water level) of the respective structures ARX, OE, BoxeJenkins and
ARMAX (j structures), A(q), B(q), C(q), D(q) and F(q) are polynomials
dened as: A(q) 1 a1q1.anaqna; B(q) b1q1.bnbqnb;
C(q) 1 c1q1.cncqnc; D(q) 1 d1q1.dndqnd;
F(q) 1 f1q1.fnfqnf, na, nb, nc, nd, nf are the orders of the
respective polynomials, ai, bi, ci, di, f are the parameters of the
polynomials to be estimated, nk is the plant time delay, and xARx_nom(t), xOE_nom(t), xBJ_nom(t), xARMAx_nom(t) are uncorrelated random
white noise sequences with zero mean of the nominal model
structures ARX, OE, BoxeJenkins and ARMAX.
The parameter estimation procedure for the selected model
structures was developed using the data located to the left of the
vertical line in Fig. 4 and the Matlab System Identication Toolbox.
q N nom j of each of
The estimation of the nominal parameter vector b
the selected model structures j (from a nominal data set) was carried out on the basis of the Prediction Error framework using a least
mean square criterion to minimize the prediction error. This
parameter vector was computed by means of the following
expression (Ljung, 1999):
b
q
N nom j
arg min
qnom
arg min
qnom
N
1 X
2 t; qnom j
N t1 j
N
2
1 X
y nomj t; qnom j ;
ynom t b
N t1
(8)
where j(t,qnomj), b
y nom j t; qnom j are the prediction error and the
nominal model output signal of the selected model structure j, and
N is the total number of the nominal eld data used in the
parameter estimation (N 300). The nominal parameter vector
b
q N nom j was estimated for different model orders, time delays and
sampling periods in order to obtain the nominal model that best
reproduces the eld data in each of the selected model structures j.
Once the parameter estimation phase has been concluded, it is
necessary to decide whether the nominal models obtained are
sufciently accurate for the plants dynamic behavior under the
nominal operating discharge regime. The procedure used to evaluate the quality of the nominal models obtained is known as model
212
Table 1
Validation results of the plant nominal models.
Model
structure
ARX
OE
BoxeJenkins
ARMAX
ARX
OE
BoxeJenkins
ARMAX
(1,
(1,
(1,
(1,
(2,
(2,
(2,
(2,
1,
1,
1,
1,
2,
2,
2,
2,
5)
5)
1, 1, 5)
1, 6)
6)
5)
2, 2, 7)
2, 6)
72.55%
72.86%
72.41%
72.55%
76.28%
83.90%
80.26%
87.08%
FPE
AIC
0.0708
0.1676
0.0684
0.0717
0.0499
0.0781
0.0567
0.0355
2.648
1.786
2.682
2.636
2.998
2.549
2.868
3.337
(2, 2, 6)
74.21%
(2, 2, 5)
80.32%
(2, 2, 2, 2, 7) 76.60%
75.42%
81.19%
78.48%
76.87%
83.20%
80.26%
76.28%
82.90%
79.32%
(2, 2, 2, 6)
85.29%
87.08%
86.41%
85.29%
b
y ARMAX
nom t
1:4022b
y ARMAX
nom t
0:435 b
y ARMAX
1
nom t
2
0:0007786unom t 5
0:0005905unom t 6 xARMAX
0:9736xARMAX
nom t
0:1508xARMAX
nom t 2:
nom t
1
(9)
The cross-validation results of the nominal model (9) are presented in Fig. 5. This gure shows that the obtained nominal model
adequately reproduces the eld plant data, even when considering
data that were not used in the parameter estimation.
In the residual analysis of the model (9), the auto-correlation
function of the residuals and the cross-correlation function between the input and the residuals do not go outside of the 99%
condence regions, as shown in Fig. 6. The residuals are, therefore,
white and totally uncorrelated with the input signal. We can thus
be satised with the accuracy of the model (9). The true plant
nominal model selected (9) can therefore be represented in the
Laplace domain by means of the following transfer function:
h
b nom s G
bu
G
nom s
bv
H
nom s
(10)
where:
bu
G
nom s
Dynom s
0:0417
e6s ;
(11)
bv
H
nom s
Dynom s
4:24s 10:9s 1
:
Dvnom s
15:84s 11:3s 1
(12)
213
10
lag
15
20
25
Cross corr. function between input unom and residuals from output yARMAXnom
0.5
0.5
25
20
15
10
0
lag
10
15
20
25
such a way that a total gate opening magnitude of 120 cm was achieved. The experimental eld data collected under this operating
discharge regime were stored in a computer and ltered. These
experimental eld data are shown in Fig. 7.
The model that best represents the dynamic behavior of the true
plant under this operating discharge regime was estimated by
following the same procedure as that shown in Subsection 3.3. As a
result, the following second order model with the ARMAX structure
and time delay was obtained:
Table 3
Validation results of the plant ARMAX models under limit operating discharge regimes.
Limit operating
discharge regimes
Model order
(na, nb, nc, nk)
Performance
index (FIT)
Variance of the
residual error (cm)
FPE
AIC
Minimum operating
discharge regime
Maximum operating
discharge regime
(2, 2, 2, 7)
85.6%
0.0389
3.245
(2, 2, 2, 5)
80.04%
0.0644
2.739
214
Fig. 8. The cross-validation results of the true plant ARMAX models under minimum and maximum operating discharge regimes.
Fig. 7. Experimental eld data of the Bocal obtained with a PRBS under minimum and maximum operating discharge regimes.
Nominal model
b nom s)
(G
b
Bounds of uncertainty region (D Gs)
Maximum discharge
regime model
Minimum discharge
regime model
K (cm/cm)
T1 (min)
T2 (min)
s (min)
Knom 0.0417
T1nom 15.84
T2nom 1.3
snom 6
Kmin 0.0303
T1min 13.33
T2min 1.11
smin 5
Kmax 0.0736
T1max 25.18
T2max 1.37
smax 7
215
b
y ARMAX
max t
1:334 b
y ARMAX
max t
0:3768 b
y ARMAX
1
max t
2
0:0007545umax t 4
0:0005458umax t 5 xARMAX
b
y ARMAX
min t
1:443 b
y ARMAX
min t
0:4632 b
y ARMAX
1
min t
2
1:0151xARMAX
max t
0:2312xARMAX
max t 2;
max t
1
(17)
0:0008367umin t 6
0:0006479umin t 7 xARMAX
0:9903xARMAX
min t 1
0:1406xARMAX
min t
min t
2:
(13)
i
b
b
b
G
min s G u min s G v min s ;
h
b max s G
bu
G
b
G
u
min s
Dymin s
0:0736
e7s ;
Dumin s
25:18s 11:37s 1
(15)
b
G
v
min s
Dymin s
5:18s 10:89s 1
:
Dvmin s
25:18s 11:37s 1
(16)
bv
G
max s
(18)
where:
bu
G
max s
Dymax s
0:0303
e5s ;
(19)
bv
G
max s
Dymax s
2:85s 11:03s 1
:
Dvmax s
13:33s 11:11s 1
(20)
(14)
where:
max s
3.5. The model uncertainty set of the true plant (step 4 of the
procedure)
It is well known that the hydraulic parameters (the friction coefcient, the pool geometry, the downstream water elevation, the
main velocity, etc.) and/or the discharge regime Q(t) of main irrigation canal pools may change randomly within the operating
range, thus originating uncertainties in the nominal model
dynamical parameters. Therefore, the exact dynamic behavior of
these canal pools is unknown on multiple occasions. This has been
reported by various authors (see e.g. Deltour and Sanlippo, 1998;
Fig. 9. Step responses of the true plant model uncertainty set obtained.
216
Fig. 10. Bode plots of the true plant model uncertainty set obtained.
6
Mnom
= 4.99%
p
4
tnom
= 20.65 min
s
20
40
60
80
100
time (min)
120
140
160
180
200
Fig. 11. Nominal time response of the Bocal with PI controller (25).
D
Kmin Kt Kmax ; T1min T1 t T1max ; T2min T2 t T2max ;
smin st smax :
(21)
Consequently, the model uncertainty set of the true plant is
comprised of its nominal model and all the models (family of
models) that can be found in its uncertainty region, which is
bounded by the true plant limit operating models (minimum and
maximum discharge regime models). The true plant model
n
GD
o
b nom s D Gs
b
G
;
(22)
b
where D Gs
is the model uncertainty region, bounded by the true
plant limit operating discharge regime models. Table 4 shows the
model uncertainty set of our true plant bounded by the parameters
of the limit models, which were derived using the results yielded in
Subsections 3.3 and 3.4.
The time-domain responses and the Bode plots of the resulting
true plant model uncertainty set when the discharge regime
changes in the operating range [Qmin, Qmax] are presented in Figs. 9
and 10. For time domain responses was used a total equivalent
b
Fig. 12. PI controller: settling time and overshoot of the time responses when operating discharge regime changes (D Gs).
217
cosfm jsinfm
;
b u nom juc
G
(24)
Fig. 13. Block diagram of the control system with SP based HN robust controller.
RPI s Kp
Ki
;
s
(23)
where <() and J() represent real and imaginary parts of a complex
number respectively. The gain crossover frequency uc is related to
the settling time tsnom of the response to a step command, while the
phase margin fm is related to the time response overshoot Mpnom .
Using the second order transfer function relation between the
settling time and the gain crossover frequency, and between the
overshoot and the phase margin as a rst approximation (Dorf and
Bishop, 2005), the following PI controller is easily obtained:
RPI s 33:38
1:682
;
s
(25)
nom
Mp
= 0.107%
2
tnom = 20.67 min
s
20
40
60
80
100
time (min)
120
140
160
180
200
218
b
Fig. 15. SP based HN robust controller: settling time and overshoot of the time responses when the operating discharge regime changes (D Gs).
W1
s
SN
us
s S0 us
(26)
RN s
s3
(27)
Fig. 16. PI controller vs. SP based HN robust controller: time responses for different discharge regimes.
Finally, Fig. 16 compares the time responses that both controllers (25) and (27) provide for the minimum, nominal and maximum
operating discharge regimes. From this gure it is observed that the
quality of the time response of the Bocal control system has been
signicantly improved throughout the range of variation of the
b
operating discharge regimes (D Gs)
if the designed robust
controller (27) were used.
4. Comments and conclusions
This paper develops a mathematical model for the design of a
robust control system of the most important pool of the AIMC,
known as the Bocal, in Spain. This research is in fact a rst step
towards the implementation of a high-performance robust control
system in the whole AIMC which will be based on this kind of
models. These control systems have a special relevance in irrigation
main canal pools whose dynamic parameters change drastically
with the discharge regime variations in the operating range [Qmin,
Qmax], and disturbances from different sources are present.
The approach proposed in this paper is based on a complete
algorithmic procedure of identication for control, which enables
one to deliver the nominal model Gnom(s) of the true plant when the
irrigation main canal pool is operated under a nominal discharge
regime (Q(t) Qnom) and also delivers an explicit model uncertainty
region DG(s) of the true plant when the Bocal is operated under
other discharge regimes, different from the nominal one. This uncertainty region is bounded by the limit operating models obtained
when the irrigation main canal pool is operated under minimum
(Q(t) Qmin) or maximum (Q(t) Qmax) discharge regimes. The
proposed algorithmic procedure thus delivers the true plant model
uncertainty set (22), which is dened by the true plant nominal
model and its uncertainty region.
The model has been developed based on the software platform
of system identication toolbox of Matlab. The wide range of applications in which MATLAB is the working framework shows that
it is a powerful, comprehensive and easy-to-use real-time environment for implementing different technologies, among which
are those related to identication and control of environmental
systems.
The proposed algorithmic procedure of identication for control
has been applied to deliver the model uncertainty set (22) with
parameter variation ranges shown in Table 4. This model has been
used later to design an HN controller (27) robust in all the above set.
Comparative simulations show that the time responses of the Bocal
obtained with this controller e which takes into account the canal
pool parameter variations provided by our identied model e
signicantly outperform the responses provided by a standard PI
controller designed only from information on the nominal plant
dynamics.
The results are very encouraging since control-oriented models
facilitate the design of highly efcient robust controllers, which
allow the operability of the irrigation main canal pools to be
increased and the service to the farmers to be improved. The next
objective of this research will be to extend the proposed procedure
to obtain a control-oriented model of the whole AIMC considering
pool interactions and wave propagations.
Acknowledgments
The authors wish to acknowledge the help received from the
Ebro Hydrographical Confederation authorities in carrying out this
research, the fruitful discussions concerning the modeling and
operation of irrigation main canals, and their unconditional support. The authors would also like to thank the journal editor, the
associated editor and the anonymous reviewers for their detailed
219
220
Rivas-Perez, R., Feliu-Batlle, V., Castillo-Garcia, F., Linarez-Saez, A., 2008a. System
identication for control of a main irrigation canal pool. In: IFAC Proceedings
Volumes (IFAC-PapersOnline) 17 (Part 1), pp. 9649e9654.
Rivas-Perez, R., Feliu-Batlle, V., Sanchez-Rodrguez, L., Pedregal-Tercero, D.J.,
Linares- Saez, A., Aguilar-Mariosa, J.V., Langarita-Garca, P., 2008b. Identication of the rst pool of the Imperial de Aragon main irrigation canal. Hydraul
Eng. Mexico 23 (1), 71e87.
Rivas-Perez, R., Feliu-Batlle, V., Sanchez-Rodriguez, L., 2007. Robust system identication of an irrigation main canal. Adv. Water Resour. 30, 1785e1796.
Rivas-Perez, R., Prada Moraga, C., Peran-Gonzalez, J.R., Kovalenko, P.I., 2002. Robust
adaptive predictive control of water distribution in irrigation canals. In: IFAC
Proceedings Volumes (IFAC-PapersOnline) 15 (Part 1), pp. 97e102.
Rivas-Perez, R., 1984. Technological Process Control in Main Canals of Irrigation
Systems, with Application to Irrigation Systems of Cuba. Ph.D. thesis. Scientic
Research Institute on Land Reclamation and Hydraulic Engineering of Ukrainian
Academy of Agricultural Sciences (UkrNIIGIM), Kiev, Ukraine.
Romanowicz, R.J., Young, P.C., Beven, K.J., 2006. Data assimilation and adaptive
forecasting of water levels in the River Severn catchment. Water Resour. Res. 42
(6), W06407.
Schuurmans, J., Hof, A., Dijkstra, S., Bosgra, O.H., Brouwer, R., 1999. Simple water
level controller for irrigation and drainage canals. J. Irrig. Drainage Eng. ASCE
125 (4), 189e195.
Van den Hof, P.M.J., Bombois, X., 2004. System Identication for Control. Lecture
Notes DISC Course. Delft Center for Systems and Control and Delft University of
Technology, Nederlands.
Young, P.C., 2011. Recursive Estimation and Time-series Analysis: an Introduction
for the Student and Practitioner. Springer-Verlag, Berlin.
Young, P.C., Garnier, H., 2006. Identication and estimation of continuous-time,
data-based mechanistic models for environmental systems. Environ. Model.
Softw. 21, 1055e1072.
Young, P.C., 1998. Data-based mechanistic modeling of environmental, ecological,
economic and engineering systems. Environ. Model. Softw. 13, 105e122.