Fractional-order mathematical model of an irrigation main canal pool

In this paper a fractional order model for an irrigation main canal is proposed. It is based on the experiments developed in a laboratory prototype of a hydraulic canal and the application of a direct system identification methodology. The hydraulic processes that take place in this canal are equivalent to those that occur in real main irrigation canals and the results obtained here can therefore be easily extended to real canals. The accuracy of the proposed fractional order model is compared by deriving two other integer-order models of the canal of a complexity similar to that proposed here. The parameters of these three mathematical models have been identified by minimizing the Integral Square Error (ISE) performance index existing between the models and the real-time experimental data obtained from the canal prototype. A comparison of the performances of these three models shows that the fractional-order model has the lowest error and therefore the higher accuracy. Experiments showed that our model outperformed the accuracy of the integer-order models by about 25%, which is a significant improvement as regards to capturing the canal dynamics. Additional key words: prototype hydraulic canal; system identification; parameter estimation; canals automation; management of water resources. Abbreviations used: DAQ (data acquisition card); DC (direct current); EMF (electromagnetic flowmeters); FIR (finite impulse response); FPI (fractional proportional integral controller); GL (Grundwald-Letnikov); GPS (gate position sensor); ID (integrator with delay); IIR (infinite impulse response); ISE (integral square error); LPV (linear parameter variable); LS (level sensor); MIMO (multiple input multiple output); PC (personal computer); PI (proportional integral controller); PID (proportional integral derivative controller); PLC (programmable logic controller); RL (Riemann-Liouville); SCADA (data acquisition and supervisory system); US (ultrasonic level sensor). Citation: Calderon-Valdez S. N.; Feliu-Batlle V.; Rivas-Perez, R. (2015). Fractional-order mathematical model of an irrigation main canal pool. Spanish Journal of Agricultural Research, Volume 13, Issue 3, e0212, 13 pages. http://dx.doi.org/10.5424/ sjar/2015133-7244. Received: 12 Dec 2014. Accepted: 18 Jun 2015 Copyright © 2015 INIA. This is an open access article distributed under the Creative Commons Attribution License (CC by 3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Funding: Consejería de Educación, Cultura y Deportes de la Junta de Comunidades de Castilla-La Mancha; European Social Fund (Project POII-2014-014-P). Competing interests: The authors have declared that no competing interests exist. Correspondence should be addressed to Raul Rivas-Perez: rivas@electrica.cujae.edu.cu


Introduction
Recent studies have shown that in many countries around the world an average of only 44% of the water conveyed by irrigation main canals actually reaches the crops for which it was intended, while the remaining percentage is lost during the water transportation process (Litrico & Fromion, 2009). A more efficient use and better management of irrigation main canals might imply that more water would be available for the future industrial and agricultural necessities, signifying that there is a real need to improve the management and usage of water in these canals.
The best alternative to improve management and reduce water losses in irrigation main canals, enhance service to water users, and also reduce the cost of canal operation is that of implementing effective water distribution control systems (Clemens, 2006;. However, the design of such control systems is not a simple task, since irrigation main canals are complex systems with distributed parameters over long distances, significant time-delays, strong nonlinearities and dynamics that change with the operation conditions (Rivas-Perez, 1990;Litrico & Fromion, 2009).
A typical main irrigation canal consists of several pools separated by gates that are used to regulate the 2 accurate as the models based on Saint-Venant equations with estimated parameters, and are much easier to use (Pedregal et al., 2009).
Various linear models of irrigation main canal pools currently exist, and are based either on Saint-Venant equations (Schuurmans et al., 1999;de Halleux et al., 2003;Litrico & Fromion, 2004;Wahlin & Clemmens, 2006) or on the use of system identification tools (Weyer, 2001;Cueto-Medina & Rivas-Perez, 2003;Sepulveda, 2007;Rivas-Perez et al., 2008). A review of the main approaches used in the development of models for irrigation main canal pools is carried out in Malaterre & Baume (1998). This survey includes: the Saint-Venant linearization model, an infinite order linear transfer function, a finite order non-linear model, a finite order linear state space model, a finite order linear transfer function, a neural network model, a fuzzy model and a petri net model. Some of the models that have been developed in the recent years are mentioned below.
An integrator with a delay model (ID) was proposed in Schuurmans et al. (1999) for a canal under backwater flow conditions. This model has also been used to generate state-space MIMO models of complete canals by Clemmens & Schuurmans (2004) and Montazar et al. (2005). Some improvements to the ID model have additionally been proposed by Litrico & Fromion (2004) and Sepulveda (2007). Nonlinear irrigation canal models have also been developed in de Halleux et al. (2003) and Dulhoste et al. (2004).
A completely different approach consists of modeling canal dynamics as black-box and grey-box models, as has been reported by Rodellar et al. (1993), Ruiz & Ramirez (1998), Sawadogo et al. (1998), Weyer (2001) and Rivas-Perez et al. (2011). These models are based on experiments and identification techniques, and they do not have any physical or hydraulic meaning.
water distribution from one pool to the next (Malaterre, 1995). Fig. 1 shows a schematic representation of an irrigation main canal with undershot gates. These canals have many inputs (gate positions of the pools) and outputs (basically, the water levels in the pools) that must be regulated, and these are affected by stochastic disturbances which are mainly caused by unknown water withdrawals or weather conditions.
The design and implementation of effective water distribution control systems require mathematical models that accurately depict the dynamic behavior of irrigation main canal pools in realistic conditions (Litrico & Fromion, 2009). However, the construction of these mathematical models can be a very difficult and laborious task (Rivas-Perez et al., 2014).
The dynamic behaviours of these canal pools have been modeled using the Saint-Venant equations, which are nonlinear hyperbolic partial differential equations (Chaudry, 2008). Although these equations constitute a very accurate model for computational simulation, they are not appropriate as a control model because it is difficult to use them directly in controller design (Malaterre, 1995). Furthermore, they have limitations when the flow is not one-dimensional, the pressure distribution is not hydrostatic and the flow undergoes sharp discontinuity (Chaudhry, 2008).
In order to obtain a good mathematical model that describes the physical reality of irrigation main canal pools and which is useful for control, two main approaches have been followed: the first is related to the use of linearized Saint-Venant equations (Litrico & Fromion, 2009) while the second is associated with system identification methods (Ljung, 1999). It is important to highlight that the mathematical models obtained through the use of the system identification tools for design purposes and the practical implementation of control systems and/or forecasting systems, are as Figure 1. Scheme of an irrigation main canal with undershot gates: LS, level sensor; GPS, gate position sensor; y up (t), y dw (t) and y dwe (t), upstream, downstream and downstream end water levels, respectively; Q(t), water flow; q(t), lateral discharge; u(t), gate opening magnitude. Gate Fractional-order mathematical model of an irrigation main canal pool

Fractional order operators
Fractional calculus involves the generalization of standard integration and differentiation to non-integer (fractional) order fundamental operators. These are represented as a D α t where a and t are the limits and α (α ∈ℜ) is the order of the operator. Several definitions of this operator have been proposed (Podlubny, 1999), all of which generalize the standard differential/integral operator in two principal respects: a) they become the standard differential/integral operator of any order when α is an integer, b) the Laplace transform of the operator a D t α is s α (provided there are zero initial conditions), and hence the frequency characteristics of this operator are (jω) α . This last feature is very appealing as regards its use to identify linear models from their frequency responses, as it allows us to describe systems with new asymptotic behaviors in the frequency domain (both in magnitude and phase).
One of the most frequently used definitions of the general fractional differential operator is that of Riemann-Liouville (the RL definition) (Podlubny, 1999): where n -1 < α < n , Γ(.) is an integer positive number, is the Euler's gamma function and t > a. Another definition is that of Caputo which is often preferred, as the initial conditions that appear in its Laplace transform are integer derivatives of f (t) while the initial conditions of Eq.
[1] are given in terms of fractional derivatives of that function. The Laplace transform of any of these definitions under zero initial conditions for order α, (0< α < 1) is given by: [2] A fractional order system is that system described by the following fractional order differential equation: where α n > α n-1 > ... > α 1 > α 0 and b m > b m-1 > ... > b 1 > b 0 are arbitrary real numbers, and , a k (k = 0, 1, ..., n), b k (k = 0, 1, ..., m) are constant coefficients. The fractional order transfer function is therefore given by the following expression: However, the degree of adequacy of the aforementioned models for the design of high performance control systems is not that required owing to the nonlinear behavior of the canal and to model parameter uncertainties (Rivas-Perez et al., 2014). This means that there still are significant open control problems in this field.
In the last few decades, increasing attention has been paid to fractional order calculus as a powerful tool with which to model and control real industrial processes (Bagley & Calico, 1991;Podlubny, 1999;Feliu-Batlle et al., 2005;Monje et al., 2010;Tavakoli-Kakhki et al., 2010). These controllers have been successfully applied during the control of water distribution in main irrigation canal pools (Calderon-Valdez et al., 2009;Feliu et al., 2009;Feliu-Batlle et al., 2011).
Researchers have found that fractional order differential equations are more adequate than integer order equations when modeling certain processes, thus providing an excellent tool with which to describe the dynamics of these processes (Podlubny, 1999;Monje et al., 2010). In particular, fractional order calculus has shown to be very effective in modeling distributed parameter processes that involve partial differential equations, as occurs in electrochemical processes (Feliu & Feliu, 1997), thermal processes (Jesus & Machado, 2011), or hydraulic processes (Martinez-Gonzalez et al., 2009).
Some authors have shown that the use of fractional order models in the design of fractional order controllers allows the use of controllers that are more effective than traditional integer order controllers (see e.g. Martinez-Gonzalez et al., 2009;Tavakoli-Kakhki et al., 2010). However, the fractional order controllers developed to control the water distribution in irrigation main canals have been based on integerorder linear models (Monje et al., 2010). Moreover, in the field of fractional order systems, the problems related to developing useful simple fractional order models, estimating their parameters and using those in control system design have not been thoroughly addressed in control literature (Tavakoli-Kakhki et al., 2010).
This article explores the possibility of increasing the accuracy of the simple linearized models of canal pool dynamics by means of fractional order derivative operators. A fractional order model of an irrigation main canal pool is therefore proposed, which has been developed using an experimental laboratory prototype of a hydraulic canal. This model is obtained by means of a direct system identification approach (Garnier & Young, 2004), which allows the immediate derivation of a continuous-time model using continuous-time model identification tools.

The prototype hydraulic canal
The prototype hydraulic canal used as a case study in the present research is a closed-loop water variable slope rectangular canal with glass walls and a methacrylate bottom, manufactured by the Spanish company MCD-2000, and located in the Fluids Mechanics Laboratory of the Castilla-La Mancha University (Spain). The canal is 5 m long and 8 cm wide, while its walls are 25 cm high. The estimated manning coefficient is 0.001. It consists of a closed-loop water canal with an instrumental platform that integrates electromechanical sensors and actuators, a PLC (programmable logic controller) and a SCADA (data acquisition and supervisory system). The canal has motorized and manual adjustable slide gates (with a discharge coefficient of 0.4) that allow it to be divided into pools of different lengths, but considering its small dimensions the canal is fundamentally operated as a single main canal pool of approximately 4.7 m in length and with a downstream end operation method. The upstream gate of this main pool is a motorized undershot gate and the downstream gate is a manually adjustable overshot gate. A view of this prototype hydraulic canal is shown in Fig. 2 and its schematic representation is depicted in Fig. 3. The geometry of the downstream overshot gate is shown on the right-hand side of Fig. 3. The angular position of this gate can be manually adjusted to three values which yield gate top heights of 13, 23 and 33 mm above the canal bottom, respectively.
where P(s) and Q(s) have no common zeros and the normalization a n = 1, ..., α 0 = 0 has been carried out. If a fractional system has to be simulated, then it is necessary to approximate expression [1] by means of discrete realizations. These can be obtained in two ways (Vinagre et al., 2000): i) by approximating the fractional operator using a standard transfer function in the frequency range of interest and then applying any habitual discretization technique (e.g., Tustin operator), ii) by numerically approximating the fractional operator. In the second way, the numerical approximations of the fractional derivative/integral operator are often implemented by using the following numerical generalization: and T is the period of discretization. This operator is formally expressed as: and can be implemented by using: where [.] represents the integer part, and the combinatorial function has been generalized in the following respect: This numerical approximation is called the Grundwald-Letnikov (GL) definition of the discretized fractional operator (Podlbny, 1999), and provides sufficiently accurate results in most cases, provided that T is sufficiently small. This discrete operator may be approximated using FIR or IIR discrete filters. Expression [8] can be truncated to a fixed number of N + 1 terms of this sum (0 ≤ j ≤ N) in oder to obtain a FIR filter. This can be done because and it lim is called the short memory approximation. This approximation usually leads to FIR filters of a very large order (often N > 100). The water flows in a closed circuit from an upstream reservoir to a downstream storage reservoir in order to economize water. The return of the water to the upstream reservoir is guaranteed by an electric pump. This pump operates with a speed variator, thus allowing adjustments in frequency from 0 to 50 Hz. The total 5 Fractional-order mathematical model of an irrigation main canal pool Froude number attained in the downstream of the main pool is 0.97. The regime of the flow at the end of the main pool is therefore always subcritical.
Two ultrasonic sensors (US), located outside the top of the canal, are used to monitor and control the upstream (y up (t)) and downstream end (y dwe (t )) water levels. A third ultrasonic sensor is shown in Fig. 3, and this measures the water level immediately downstream canal inflow is adjustable from 0 to 9 m 3 /h (≈ 2.5 L/s). The canal does not therefore have any water losses except evaporation effects, which are not significant in this case. Moreover, the laboratory canal has a water extraction system with which to simulate users' water offtakes. Taking into account the maximum inflow permitted and the minimum downstream water level measured in our experiments (see Fig. 4), the maximum  Gate 3 downstream, downstream end, mixed, Bival, etc.), and set-point changes (y dwe_sp (t )) and (y up_sp (t )) of the primary and secondary control loops, respectively. This SCADA application also provides other facilities such as: 1) storage of all the input and output signals in a data-base, allowing their exportation to other programs, such as MS-Excel, Matlab, etc.; 2) a display of the state of all the input and output signals; 3) alarm generation making it possible to obtain information about verified damages, the suggestion of the corresponding actions and, in extreme conditions, even the making of automatic decisions. The main alarms are: water levels inside the hydraulic canal (in order to prevent the canal from emptying or overtopping), and the operational state of the control system devices (canal control station, DC motor, gate position and ultrasonic sensors, flowmeters, pumps, speed variators, etc.).

Dynamic models of irrigation canals and identification process
The dynamics of water flowing in irrigation canal pools is modeled by using the Saint-Venant equations. These equations are derived from mass and momentum balances and are given by (Chaudhry, 2008): where A (x,t ) is the canal cross section area, Q (x,t ) is the water flow (discharge) through section A, q (x,t ) is the lateral discharge, y (x,t ) is the water depth, S f (x,t ) is the friction slope, S b is the bed slope, g is the gravitational acceleration, t is the time variable, and x is the longitudinal abscissa in the direction of the flow. Several methods currently exist for the solution of the Saint-Venant equations, but all of them have considerable mathematical complexities (Litrico & Fromion, 2004). These are thus often solved numerically by using specific software (e.g., Valipour, 2012;Khasraghi et al., 2015). Moreover, the direct use of these equations in the analysis of flow dynamics and the design of controllers is very difficult (Malaterre, 1995). The Saint-Venant equations are often linearized around a set-point. In this case, an equivalent first-order plus a time delay system is used to model the canal pool dynamic behavior (Rivas-Perez, 1990;Weyer, 2001). Experiments developed by some authors have demonstrated that the dynamical parameters of these linear-of the undershot gate. When the canal has a variable slope, measurements of the second (y dw (t )) and third (y dwe (t )) ultrasonic sensors are different. The motorized slide undershot gate is equipped with a DC motor and a gate position sensor (GPS). The canal is also equipped with two electromagnetic flowmeters (EMF). One flowmeter is installed in the water return tube which measures the canal water inflow (Q in (t )) pumped by the electric pump from the storage downstream reservoir toward the upstream reservoir, while the other is installed in the water extraction system tube which measures the canal water outflow (Q out (t )) pumped by the electric pump from the canal laboratory. This is not shown in Fig. 3 because neither the water extraction system nor its outflow pump or its flowmeter are used in our experiments. These two flowmeters facilitate the supervision of the pumping operations.
Our hydraulic canal prototype uses a PC (personal computer) as a canal control station. A SCADA application is installed in this PC to ensure the automatic control and supervision of the canal. Signals from the various installed sensors are measured and recorded for the: upstream (x up (t )) gate position, upstream (y up (t )), downstream (y dw (t )), and downstream end (y dwe (t )) canal water levels, canal water inflow (Q in (t )) and canal water outflow (Q out (t )).
Control of this hydraulic canal is very complicated because the maneuvers needed to open and close the upstream gate produce very large changes in the upstream water levels, owing to the small dimensions of the upstream pool (see Fig. 2). In order to solve this problem, a secondary control loop that controls the upstream water level and maintains it at a fixed reference was implemented. The upstream water level is controlled by a PID controller, which acts on a speed variator (frequency converter) that varies the water flow of a pump. The primary control loop carries out the control of the downstream end water level in the main pool of the hydraulic canal. The aforementioned upstream water level control then decouples the main pool dynamics from the upstream pool dynamics, and allows us to focus on identifying only the main canal dynamics without having to pay attention to secondary dynamics caused by any interaction with the upstream pool.
All the hydraulic canal prototype controllers are installed inside the PLC, which is supervised by the SCADA application. Fig. 3 shows the overall control system for this canal. The primary control loop can be seen in the upper part of this figure, and the secondary standard control loop can be seen in the lower part. The SCADA application developed facilitates the implementation of different control strategies, such as fractional order control, standard, robust and nonlinear controls, along with various canal operation methods (upstream, 7 Fractional-order mathematical model of an irrigation main canal pool an insight into the hydraulic process involved, let us consider a very simplified dynamic model of the main pool, which is labeled as Pool 2. Consider the following equation, which represents the flow balance just upstream of Gate 3: where, according to Fig. 1, Q 2 (t) and Q 3 (t) are the input and output flows to the main pool, q 2 (t) is the offtake (assumed to be close to Gate 3), A is a constant, and t is the time-delay that represents the time required by an increment of mass at the upstream gate to move to the position of the downstream gate. As Fig. 3 shows, our canal uses a submerged undershot gate like Gate 2, and an overshot gate like Gate 3 (this gate has a constant opening). These flows are therefore those given by e.g. Chaudhry (2008): where K 2 and K 3 are constants, u 2 is the Gate 2 opening, and h is the constant height of the top of Gate 3 with regard to the canal bottom; (y dwe (t) -h) is thus the upstream head over the gate.
In the steady state, the flow balance is Q 2 = Q 3 + q 2 , where the overline signifies steady state values. The linearization of Eqs.
[11] and [12] around this steady state, assuming that q 2 = 0 and taking only the input u 2 and the output y dwe (t) as the variables representative of the process, leads to the following incremental model: where the overline again represents initial steady state values of the gates' opening and water levels. This linearized model is a first order plus time delay system whose parameters change dramatically depending on the operation regime. Its transfer function (taking the Laplace transforms in Eq. [13]) is: ized models may vary considerably when the discharges through the upstream gates of the canal pools vary in the operation range [Q min , Q max ] (Litrico & Fomion, 2009;Rivas-Perez et al., 2011). A linear parameter variable (LPV) non-integer order model of a canal pool was obtained using fractionalorder LPV identification (Martinez et al., 2009). Rational local fractional-order models were obtained at different operation points, and a global LPV model was then obtained from polynomial interpolations of the parameters of these local models.
Experiments based on the response to a step like input were carried out in our hydraulic canal prototype in order to obtain a mathematical model that would accurately describe its dynamic behavior. In these experiments, the downstream gate was fixed in one of the three possible positions (13, 23 and 33 mm) above the horizontal level of the canal bottom. Different step movements were performed by the upstream gate in order to excite the canal dynamics and the downstream end water level was measured with an ultrasonic sensor. Furthermore, experiments were carried out with different upstream water levels (60, 65 and 70 mm), thus allowing us to obtain suitable and exhaustive experimental data that would permit an adequate characterization of the dynamic behavior of our canal. During the experiments, the upstream gate was in free or submerged flow, which depends on the upstream water level and the position of the downstream gate. The downstream gate was in free flow. The water levels and upstream gate positions were sampled with a period of 0.15 s. The positions of the upstream gate and the water level are given in mm. Fig. 4 shows different step responses of our hydraulic canal prototype. This figure shows that the upstream reservoir water level is maintained approximately constant by the pump, whose speed variator is controlled by the PID. This control system compensates for the variations in the upstream water level caused by the different openings and outflows of the upstream gate (note that only fast transients that are quickly removed are produced on the upstream water level by the upstream gate opening changes).
According to the responses obtained after carrying out the experiments developed, we have proposed three simple linear models with which to characterize the dynamic behavior of our hydraulic canal prototype.

Standard first order plus time-delay model
This is the simplest and probably most frequently used canal pool model (Malaterre, 1995). It is based on simple physical considerations. In order to obtain 8 where u i and u f are the initial and final values of a gate manoeuvre (the gate position undergoes a step from u i to u f ). This yielded a total amount of 1080 different experiments that were carried out. Model [15] was fitted to the response data obtained in each of these experiments. This set of experiments yielded the following ranges of model parameter variations: 0.086 ≤ K ≤ 0.775, 1.1 ≤ T ≤ 48.94 and 2.25 ≤ t ≤ 5.7.
The accuracy of the model [15] estimated in the different operation regimes was sufficient for control purposes, but we wished to explore whether, by just slightly increasing the complexity of the model, a better fit to the experimental data could be achieved, which would obviously have a significant impact on the design of the controller.
We have three parameters (K, T and t) in the first order plus time delay model. In the following subsections we explored the impact on the model accuracy if a fourth parameter is added to the model. We therefore fit models with four parameters to our already recorded experimental data, and we considered two new model structures, which are natural extensions of the previous one. The first is of an integer-order nature (the second order plus time delay model), while the second is of a fractional-order nature (a fractional-order plus time delay model), which implies using only a fractional order derivative operator s α in the model [15].

Second order plus time-delay model
This is a standard integer-order model that has also often been used to model main irrigation canal pools (see e.g. Rivas-Perez et al., 2008): where: K is the static gain, T 1 , T 2 are the time constants, and t is the time-delay. The identification method applied in this case consisted of the following: i) parameters K and t were taken from the previous identification process, because the time-delay and the static gain would remain the same in both models [15] and [18], as they had been obtained from the first and the last instants of the response respectively, which were not influenced by the transient response, and ii) parameters T 1 and T 2 were again obtained from an optimization procedure that minimized the ISE performance index using model [18].
We ran this identification process on the data of the 1080 experiments, and yielded the following ranges of model parameter variations: 0.086 ≤ K ≤ 0.775, 1 ≤ T 1 ≤ 48.92, 0 ≤ T 2 ≤ 13.18 and 2.25 ≤ t ≤ 5.7.
The transfer function [14] can be expressed as: where K is the static gain, T is the time constant, and t is the time-delay. Expression [14] shows that these parameters change according to the canal operation regime. An algorithm is designed in order to estimate parameters K, T and t of Eq. [15] in each canal operation regime. The quality of the estimated model is measured using the value of the Integral Square Error (ISE), in which the error is defined between the step input response of the estimated mathematical model and the response experimentally obtained from our canal. The ISE is a performance index that is very often used in system identification (Ljung, 1999) and which is defined as: Even though the ISE is calculated from 0 to infinity in Eq.
[15], we calculate the ISE in the range from 0 to 360 s in order to save computation time, as all the experiments reached their steady state in less than 360 s (and the error between the model output and the real response would therefore become approximately zero in less than this time, if the gain K had been properly tuned). All the experiments were executed during the same time interval of 360 s.
In our identification approach, therefore: i) we manually determine the time-delay value t by means of a simple inspection of the experimental response, and ii) parameters K and T are obtained from an optimization procedure that minimizes the aforementioned ISE index. The nominal values obtained for the laboratory hydraulic canal model (values obtained in the case of the most frequent operation regime) are: K 0 = 0.372, T 0 =10.975 and t 0 =4.05. They correspond to an upstream reservoir water level of 70 mm, a downstream end water level of 50 mm in the main pool, and a gate opening of 15 mm. However, these parameters have wide ranges of variation around their nominal values when the operation regime changes.
We repeated the identification process of model [15] using the canal step input response data obtained in all the possible operation regimes: we covered the entire flow range, we used different upstream water levels, and we opened the downstream gate in the main pool using different settings. All the possible combinations of the following values were considered: 60,65,70,75,80] mm y dwe € [13,23,33] mm u i € [10,15,20,25,30,35,40,45,50] mm u f € [10,15,20,25,30,35,40,45,50] mm Fractional-order mathematical model of an irrigation main canal pool has four parameters to be tuned (a model with the same complexity of the second order plus time-delay model shown in the previous subsection and with only one more parameter to be tuned than in the first order plus time-delay model): where K is the static gain, T is the time constant, t is the time-delay, and α is the fractional order. The identification method applied in this case was similar to that used in the previous subsection. It consisted of: i) removing parameters K and t from the first order plus time-delay identification process, for the same reason as that shown in the previous subsection, and ii) once again obtaining parameters T and α from an optimization procedure that minimized the ISE performance index using model [20].
We again ran this identification process on the data of the 1080 experiments, and yielded the following ranges of model parameter variations: 0.086 ≤ K ≤ 0.775, 1.17 ≤ T ≤ 48, 2.25 ≤ t ≤ 5.7 and 0.59 ≤ α ≤ 1.32. In many of the identification experiments carried out, the second order model with a time-delay fitted converted into a first order model with a time-delay, because the optimum T 2 obtained was zero. This meant that adding a second pole to the model did not, in many cases, improve the accuracy attained with the first order plus time-delay model.

Results and discussion
There is another integer-order model with four parameters to be tuned that could be used: but this model is not suitable for our canal as it implies a discontinuity in the step input response (just when the response starts varying, after the time-delay has passed), and we verified that the experimental responses of our canal pool did not have such discontinuity.

Fractional-order plus time-delay model
The previous subsection allows us to conclude that increasing the complexity of the transfer function obtained from an integer-order differential equation by adding one more parameter does not produce more accurate models of our main canal pool. In this subsection we therefore model our canal pool dynamics with a fractional-order differential equation plus time delay. We propose a simple fractional-order model that also Step response of the prototype hydraulic canal Step response of the firts order plus time-delay model Step response of the second order plus-time delay model Step response of the traditional-order plus time-delay model 10 where t f is the time of the duration of each experiment, i.e., 360 s, and Δy dwe is the difference between the downstream end water level after the upstream gate has been opened and the downstream end water level before the upstream gate has been opened. With this normalization we basically obtained a value for the average error of the fitting, which was then normalized by using the extent of the change undergone by the downstream water level during a manoeuver, in order not to weight too much errors produced in large maneuvers on errors in small maneuvers.
We then calculated the mean error, the maximum error and the standard deviation of the set of values [21] obtained in the 1080 experiments with each of the proposed models. These are illustrated in Table 1, which shows that the fractional-order plus time-delay model has 11% less mean error than the first order plus time-delay and the second order plus time-delay models.
It should be noted that this improvement would be much higher and apparent if a visual inspection of the responses were to be made, because in our experiments the ISE is distorted by sensor noise, water surface waves (higher order dynamics), etc., which are present in the steady state (see in Fig. 5 the variations of the experimental response in its steady state). This causes an unnecessary increase in the ISE performance index, produced by the integration of these squared errors during the steady state time interval which lasts until the 360 s. This increase is very significant since in many cases such a steady state interval is more than (model validation results) of our hydraulic canal pool prototype. Upon comparing the responses in this figure, we concluded that the step responses of the three models closely follow the real time experimental data, but that the response of the fractional-order model is more approximate than the other two (in Fig. 5 the responses of first order plus time-delay and second order plus time-delay models are almost equal, and cannot be distinguished). In particular, the fractional-order model response fits the transient of the canal pool response more accurately. In this section we check whether this result is the same in all the operation regimes. For this purpose we quantify the accuracy of the fittings by using the ISE index.
After having obtained the parameters of the three models for the different processes characterized by the different operation regimes, the ISE indexes yielded by all these fittings were compared. Fig. 6 presents the ISE indexes obtained in the 1080 experiments after having fitted the three models. It is observed that the fractional-order plus time delay model yields the lowest ISE of the three models, and that the ISE obtained with the first order plus time-delay and the second order plus timedelay models are almost equal in most cases.
In order to carry out a quantitative comparison of the results obtained, the ISE index is normalized as follows: Fractional-order mathematical model of an irrigation main canal pool prototype hydraulic canal more accurately than the other two models.
It is important to stress that the canal pool models obtained through the use of the direct system identification tools (for purposes of design and practical implementation of control systems and/or forecasting systems) are as accurate as those based on Saint-Venant equations with estimated parameters and are much easier to use.
The LPV rational fractional-order model obtained by Martinez et al. (2009) had a lower error than an LPV integer order rational model. The aforementioned work differs from ours in two aspects: 1) the authors used a prototype canal that did not have the geometry and structure of real irrigation canals because the water there was moved from one pool to the adjacent one through a pipe with the aid of a pump, rather than through a gate with a regulated opening, 2) they improved the accuracy of the fractional-order dynamical model at the cost of significantly increasing its complexity. The question of whether it would be possible to obtain the same accuracy with integer-order models of a similar complexity to the fractional-order models proposed therefore remains open.
In the context of hydraulic engineering, the principal contribution of this paper therefore consists of the fact that an accurate fractional order model of an irrigation main canal pool with a complex hydraulic infrastructure has been obtained under different real operation conditions and using real-time data. The results attained are very promising and show that there is great potential for the use of fractional order models in depicting the dynamic behavior of irrigation main canal pools.
We highlight that improving the accuracy of the dynamic model of our prototype hydraulic canal and of a real canal has a significant impact on improving the performance of canal monitoring, control, and supervisory systems, which are based on such dynamic models. Sources of error in our identification 60% of the whole time interval (360 s). This reduces the relative effects of having improved the transient fitting with the fractional-order model in the total value of the ISE index.
In the following, we overcome the previous problem by calculating index [21] using a variable time interval t f . This t f is the instant at which we consider that the experimental response has reached its steady state, and is different for each experiment. However, for a given experiment, t f remains the same when calculating the fitting errors to the experimental data of the three model responses. Table 1 shows the mean error, the maximum error and the standard deviation of the set of values [21] obtained in the 1080 experiments with each of the proposed models, but using the proposed modification as regards allowing a variable t f . This table shows that the fractional-order plus time-delay model now has 25% less mean error than the first order plus time-delay and the second order plus time-delay models.
We should mention that we carried out a fair comparison of the proposed models. Two of them had four parameters to be determined, while the standard model had three. The integer-order and fractional-order models compared had approximately the same number of parameters to be adjusted, unlike that which occurred in a previous work in which fractional-order models with many parameters to be adjusted were compared with much simpler integer-order models.
Our results showed that: i) a moderate increase (one parameter more) in the complexity of a model based on integer-order differential equations did not improve the accuracy achieved with the standard first order plus time delay model, ii) using a very simple fractionalorder plus time-delay model (with only one more parameter to be identified than in the first order plus time delay model) improved the accuracy of the model by about 25% (data taken from Table 1) and this model was capable of capturing the transient dynamics of our technique are the low accuracy of our ultrasonic sensor for the water level and the fact that the high order dynamics of the water flow were not taken into consideration. In future research we shall develop more complex fractional-order models that will include such high order oscillatory dynamics and we shall also improve the precision of our sensors. Finally, we should mention that our future work will also be devoted to obtaining a fractional order model of a true irrigation main canal.