Free access
TECHNICAL PAPERS
Jun 9, 2010

Canal Structure Automation Rules Using an Accuracy-Based Learning Classifier System, a Genetic Algorithm, and a Hydraulic Simulation Model. II: Results

This article is a reply.
VIEW THE ORIGINAL ARTICLE
This article has a reply.
VIEW THE REPLY
Publication: Journal of Irrigation and Drainage Engineering
Volume 137, Issue 1

Abstract

An accuracy-based learning classifier system (XCS), as described in a companion paper (Part I: Design), was developed and evaluated to produce operational rules for canal gate structures. The XCS was applied together with a genetic algorithm and an unsteady hydraulic simulation model, which was used to predict responses to gate operation rules. In the tested cases, from 100 to 2,000 XCS simulations, each involving thousands of hydraulic simulations, were required to produce satisfactory rules. However, the overall fitness of the set of rules increased monotonically as XCS simulations progressed. Initial fitness started at an arbitrary value, and rules increased in strength by better achieving operational objectives during the training process. Fewer XCS iterations were required to increase the fitness as the rule population evolved. Calculated water depths approached the respective target depths for variable water delivery demand through turnout structures in the simulated canal systems. The water depth achieved stabilization inside a dead band of  ± 8% of the target depth after applying different turnout demand hydrographs to each reach. The calculated depth was inside the dead band 92% of the time in Reach 1, and 73% of the time in Reach 2 for the constant supply experiment. The water depth was inside the dead band 100% of the time in Reach 1, and 76% of the time in Reach 2 for the variable-supply experiment.

Introduction

Many attempts have been made to try to solve the problem of controlling water flow in irrigation canals through the automation of adjustable gate structures. One of the most important recent efforts to organize and evaluate different control algorithms that have been developed and applied was done by the ASCE Task Force on Canal Automation Algorithms (Clemmens et al. 1998). The ASCE Task Force developed several cases to evaluate canal control algorithms for testing the general suitability of canal structure control schemes. Due to the increased availability of canal gate control equipment and methods since the 1980s, and in order to provide guidance to managers and engineers in improving irrigation water management, numerous devices and algorithms have been classified and evaluated. For example, definitions and classifications of various algorithms have been based on the required parameters, the logic of the controller, and the design technique (Malaterre et al. 1998). More recently, the performance of three downstream-control algorithms was evaluated on a test canal (Wahlin and Clemmens 2002), and a traditional classifier system supported by a genetic algorithm (GA) was developed for rule-based operation of canal gates (Chittaladakorn and Merkley 2005).
The common practice of controlling each pool in a canal system as an independent local control problem is often not appropriate due to the hydraulic interactions between pools. For example, controllers that are stable and reliable in a single pool can become unstable and perform poorly when placed in a series of pools (Ruiz-Carmona et al. 1998). Thus, control problems have been identified in terms of the difficulty of adjusting several canal gates in series, and with regard to empirical parameter values that appear to work well at high flow rates but often perform poorly at low flow rates (Burt et al. 1998), suggesting that the operation of canal gate structures requires an integral system-wide approach. Furthermore, it has been reported that the software used in automated canal systems still do not adequately simulate some of the hydraulic details close to the gate structures (Piao and Burt 2005).
This paper provides a detailed description of the results obtained from an accuracy-based learning classifier system (XCS) model, a GA, and a canal hydraulic model integrated to develop a set of gate operating rules which could successfully control the hydraulics of a given canal system. Different operational scenarios were used to test the computer program and model performance was evaluated. A companion paper presents details on the design of the computer model.

Experimental Design

All of the XCS simulations started by comparing potential solutions in the population against a current situation in the environment. The XCS created different arrays, and then selected actions to be performed on the canal gate structures. The set of selected actions was passed to the hydraulic model, which computed the water depths and flow rates after the application of changes to structure settings. The calculated depths could sometimes reflect a numerical failure in the hydraulic model, meaning that there was a sudden hydraulic regime change between orifice and nonorifice flow, or a pool that became completely dewatered. Such failures, in addition to cases in which the water overtopped the canal banks, were penalized as “infeasible operations.” In these cases, the XCS simulation was terminated, penalties were applied to the rule set, and the simulation started over again to test a new series of actions. When the action applied to the hydraulic model did not generate any failure situations, the XCS computed both rewards and penalties, and continued with the next XCS iteration based on a previous successful hydraulic simulation, generating a new set of actions to be applied to the gates in the system.
One way to evaluate XCS progress was through an analysis of the cumulative number of iterations that the XCS achieved with no hydraulic model failures. If the XCS continuously proposed feasible solutions to the hydraulic model, the series of structure operations was included as a potentially acceptable solution because the full set of water demands at delivery points (turnouts) was satisfied. Otherwise, the series of operations was shorter, and sometimes it did not allow the hydraulic model to go through the complete set of specified turnout demand changes. Therefore, the larger the number of successful hydraulic model time steps, the better the XCS solutions, while a smaller number of successful iterations indicated a greater degree of noncompliance with the operational objectives.
Different operational scenarios were used to test the XCS. All studied cases were for downstream-controlled canal structures in single and multiple reaches. The water supply at the upstream end of the first reach was constant in some cases, and variable in others, while the water demand at turnouts was generated randomly, as described below. The structure types used in the simulations included rectangular gates and rectangular weirs.
Each XCS simulation began with a steady state gradually varied flow condition. There were two termination criteria for a hydraulic simulation. The first was fixed duration and the second was termination upon reaching hydraulic stability criteria. Whenever a particular termination criterion was selected for an experiment, it was applied for the complete set of XCS simulations, and did not change until the next experimental run. A fixed duration limit was used most frequently, where the limit ranged from one to two times the duration of changes in the turnout demand hydrographs.
Experiments were for two-reach canal systems. Parameters were defined for the hydraulic model and for the XCS. For the XCS, a standard experimental design used in the literature was followed (Wilson 1995). Each XCS experiment consisted of a hydraulic problem which the system was required to solve by running the XCS and the hydraulic model in a two-phase process. The first phase was for testing and calibrating the XCS, and the second phase was for producing a viable rule set. Commonly used parameter settings for an XCS were taken as starting points from Butz and Wilson (2000). The learning rate, β , was 0.15 for the testing phase, and it was increased to 0.20 during the production phase. The parameter α , which is normally 0.1 (Butz and Wilson 2000), was constant during each run. The parameter εo , used to compute the prediction error, was 0.001. The power parameter, ν , used in calculating the accuracy of a classifier was equal to 5. The discount factor, γ , was 0.7, and the threshold to apply the GA was 2. The probability of applying crossover was 0.75, and genetic mutation probability was 0.025. The initialization parameters for prediction, prediction error, and fitness were 0.001. Finally, the covering threshold varied from 10 to 50.
All reaches were open channels with prismatic trapezoidal cross sections, longitudinal bed slopes from 0.000  15 to 0.000  25, and lengths from 1,000 to 2,000 m. The upstream water supply was controlled by a gate structure in some study cases, and in other cases it was defined to deliver a constant discharge into the first reach. Structures were defined as regulators (at the ends of each reach) and turnouts (water delivery locations along the canal), near the downstream end of each reach. Most regulators were rectangular gates, but some were weirs located at the downstream end of the last reach. All gates were operated as orifices, meaning that a change in regime to nonorifice flow was not allowed. Whenever such a flow regime change took place during a hydraulic simulation, the hydraulic simulation was terminated, followed by the start of a new XCS simulation.
Calibration parameters for reaches and gate structures, and numerical parameters for the system layout were the default values obtained from the hydraulic model. The Manning equation was used to estimate hydraulic losses along the channels in which the roughness value, n , varied between 0.012 and 0.015. Seepage and evaporation losses of up to 10 mm/d were applied in some of the simulations, but no significant change was manifested in the XCS behavior due to their inclusion.
For those cases with constant discharge entering the upstream end of the first reach, the specified flow rate was between 0.5 and 1.5m3/s , and it was maintained at a constant value for each XCS simulation. The specified flow acted as a boundary condition, and as such, did not require a structure definition for the water supply (i.e., there was no need to define a relationship between water depth and discharge at this location in the canal system).
The terminus reach was that which did not have another reach in series at the downstream end. At the downstream end of the terminus reach, two structure types were used: rectangular sluice gates and weirs. Setting adjustments were made by the XCS in those cases in which the terminus reach had a rectangular gate. For all reaches, the target water depth (at the upstream or downstream end of a reach, depending on the test scenario) was defined to be from 0.75 to 0.90 m. All gate structures required an initial setting to start an XCS simulation. These settings were defined by performing hydraulic model simulations to guarantee that the XCS had a feasible starting condition. In some cases, the initial setting was selected in such a way that the upstream reach water depth was close to the target depth. This criterion was applied to the first (furthest upstream) reach only. Demand hydrographs for turnouts were generated randomly, and each reach had a unique hydrograph, meaning that water deliveries through the turnouts were different in amount, time, and location.
Simultaneous XCS simulations were performed on two computers (PCs) for solving independent problems. Testing-phase simulations lasted from a few days to more than a month of continuous calculations. Simulations of relatively short duration were performed for model testing and calibration in which parameters were adjusted, and then the XCS was allowed to execute undisturbed for up to 2 months. The following two experiments were conducted by performing numerous hydraulic simulations on two canal reaches in series, whereby the XCS and GA were applied to develop rule sets for gate structure operations. These are examples of the experiments conducted under the research program.

Constant Supply Experiment

Two reaches of 2,000 and 1,000 m length, in series, were used for these simulations. Channel slopes were 0.0002 and 0.00015. The Manning roughness coefficient was 0.012 for both reaches. All sections had a base width of 1.0 m, a lining depth of 1.1 m, and side slopes of 1:1.5 (vertical to horizontal). In-line structures were 1-m wide rectangular gates. For the initial condition, the gate located at the downstream end of Reach 1 (the furthest upstream reach) was given a vertical opening of 0.5 m, and the gate at the downstream end of Reach 2 was given an opening of 0.4 m. A target water depth of 0.75 m was specified at the upstream end of each reach.
Each simulation started under a steady-state hydraulic condition, and all reaches were initially full of water, up to the respective steady-state depth for initial gate structure settings. The upstream source was not controlled by the XCS, but defined inside the hydraulic model to deliver a constant supply of 0.85m3/s . Generated random water demands at each turnout were from 0 to 0.5m3/s , and the total duration varied from 0 to 6 h. The criterion adopted for terminating hydraulic simulations was a fixed duration of 8 h to allow the application of the full set of turnout demands. A total of 669 simulations were performed using this configuration. This experiment was done taking advantage of a population generated previously during the testing phase, and it contained 58,635 rules as an initial population. After 21 days and 669 XCS simulations, the population grew to 95,337 members.
In this experiment, the first 15 XCS simulations had 25 successful canal structure operations, on average, which were added to the population. After 150 simulations, the average number of successful canal structure operations was 30, and the XCS tended to stabilize at an average of nearly 35 successful operations after 600 XCS simulations, as shown in Fig. 1. This means that with more XCS simulations, the population was gaining strength because the canal system failed (regime changes at gates, overtopping, and dewatering) less frequently than with a lesser number of XCS simulations. And, as the XCS proposed a set of gate structure operations, it generated less hydraulic failures than the initial operational sets. This established that for a larger number of simulations, the proposed actions allowed for more successful hydraulic model time steps than for fewer simulations.
Fig. 1. Successful XCS iterations as a function of the number of XCS simulations
The average population fitness was also evaluated. After running each XCS simulation, the fitness for the updated population was computed. The average fitness for the population (Fig. 2) grew consistently with each XCS simulation, again demonstrating that the population was gaining strength. The average fitness computed for the total population increased almost threefold along the XCS learning process. During simulations the value computed for fitness never decreased and water depths consistently approached the respective target values.
Fig. 2. Average population fitness as a function of the number of XCS simulations for a constant water supply
The turnout demand changed over a 5-h period between 0 and 0.5m3/s in Reach 1, and after this the demand was kept constant during three additional hours to test the ability of the rule set to hydraulically stabilize the canal system (Fig. 3). For Reach 2, the turnout demand changed between 0 and 0.42m3/s during the first 5 h, after which it was maintained constant at 0.46m3/s for three additional hours (Fig. 4). The water depth achieved stabilization inside a dead band of  ± 8% of the target depth after applying the different turnout demand hydrographs to each reach. The calculated depth was inside the dead band 92% of the time in Reach 1, and 73% of the time in Reach 2.
Fig. 3. Turnout demand and depth as a function of simulation time for Reach 1 with a constant water supply
Fig. 4. Turnout demand and depth as a function of simulation time for Reach 2 with a constant water supply

Variable Supply Experiment

The same basic canal configurations used for simulations with a constant upstream water supply were used for handling the source with a variable supply. The main changes were for a rectangular gate with an opening of 1.0×1.5m , which was added to control the water source at the upstream end of the first canal reach, thereby allowing a variable supply of water to the system. Upstream of the source control structure, the water depth was kept constant at 1.5 m. Automated operation of the gate located at the source helped the system satisfy the varying water demand.
In-line structures were 1m×1m rectangular gates. The gate located at the source was given an initial vertical opening of 0.35 m. The gate at the downstream end of Reach 1 was given an initial opening of 0.7 m, and the gate at the downstream end of Reach 2 was given an opening of 0.35 m. The target water depth was 0.9 m in both reaches. The criterion adopted for terminating a hydraulic simulation was the attainment of system-wide hydraulic stability (inflow equal to total outflow for at least two consecutive time steps in the hydraulic model).
Turnouts were located 5 m before the downstream end of each reach. Generated random demands were bounded between 0 and 0.4m3/s , and between 0 and 5 h duration. The demand changed for 4 h and 53 min between 0 and 0.24m3/s in Reach 1, and then the demand was kept constant at 0.21m3/s during four additional hours. For Reach 2, the demand changed between 0 and 0.25m3/s during the first 4 h and 6 min, and after that it was maintained constant at 0.22m3/s for four additional hours.
In total, 877 XCS simulations were performed using this configuration. As in the previous case with a constant upstream water supply, this experiment was done taking advantage of a population of 17,666 members generated previously during the testing phase. After running continuously for 18 days, the population grew up to 61,937 members, and the average rule strength increased by almost three times (Fig. 5).
Fig. 5. Average population fitness as a function of the number of XCS simulations on a two-reach canal system with a variable upstream water supply
The fitness growth rate for the average population in the first 200 simulations was 76%, and for the last 200 simulations it was 13%, indicating that the XCS was approaching an optimal rule set. The target depth established for this experiment was 0.9 m in both canal reaches. The water depth achieved stabilization inside the dead band of  ± 8% after applying the different scheme of demands to both reaches. The water depth was inside the dead band 100% of the time in Reach 1 (Fig. 6), and 76% of the time in Reach 2 (Fig. 7).
Fig. 6. Turnout demand and depth as a function of simulation time for Reach 1 with a variable water supply
Fig. 7. Turnout demand and depth as a function of simulation time for Reach 2 with a variable water supply
For the variable upstream water supply experiment, the initial population had less strength than for the case with a constant water supply, but more simulations were performed for the former. In this experiment, the fitness of the rule set never decreased.

Summary and Conclusions

In this paper, it was demonstrated that an XCS can be successful in developing a set of operational rules for canal gates in an open-channel irrigation conveyance and distribution system. The results showed an ability to operate all gate structures in a canal system simultaneously, while maintaining all water depths near their target values during variable demand periods, and afterwards with high hydraulic stability.
Simulations were performed using an XCS, a GA, and a hydraulic model to develop rule sets for canal gate operations. The study cases presented herein included two open-channel reaches with turnouts located near the downstream end of each reach. The upstream water supply was constant in some of the cases, and variable in others. The demands at turnouts were generated randomly and an ending period of constant demand was allowed for stabilization analysis. The type of structures used for flow control included rectangular gates (operating as orifices) and weirs. The model was able to achieve a satisfactory set of solutions for the tested cases. The average rule fitness increased monotonically as XCS simulations progressed, and less XCS iterations were required to increase the fitness as the rule population evolved. Calculated water depths approached their respective targets and remained within the dead bands as turnout demand remained constant after an initial period of variable demand. It was also found that the computational time was a function of the number of reaches in the simulated canal system, and the number of simulations required to solve the problem depended upon its complexity, with durations lasting from a few days to more than a month.
The use of a GA for optimizing the operation of canal structures aided in solving the problem of determining recommended operating rules for multiple flow control structures at the same time. After an analysis of initial simulations, it was found that when the rule set was not adequately trained, it did not converge toward the solution of a feasible set of operational rules. But after some training, the model was able to produce acceptable rules, leading to convergence toward the specified target depths. Afterwards, the model produced rules that forced the water depth inside the dead band, and after additional simulations, the water depths remained inside the dead band.
In principle, the model can be applied to network layouts with variable turnout demands, within the limits of current hydraulic simulation capabilities. The XCS was not tested for branching canals, nor for very long reaches, but it has been configured to function for further research involving such cases. With this modeling tool, gate automation designers and canal operators can implement operational improvements for improved hydraulic control.

Acknowledgments

Support from the Utah Agricultural Experiment Station is gratefully acknowledged.

References

Burt, C. M., Mills, R. S., Khalsa, R. D., and Ruiz-Carmona, V. M. (1998). “Improved proportional-integral (PI) logic for canal automation.” J. Irrig. Drain. Eng., 124(1), 53–57.
Butz, M. V., and Wilson, S. W. (2000). “An algorithmic description of XCS.” Proc., 3rd Int. Workshop: Advances in Learning Classifier Systems, P. Lanzi, W. Stolzmann, and S. Wilson, eds., Springer-Verlag, Berlin, 253–272.
Chittaladakorn, S., and Merkley, G. P. (2005). “Classifier system for rule-based operation of canal gates.” J. Water Resour. Plann. Manage., 131(1), 3–13.
Clemmens, A. J., Kacerek, T. F., Grawitz, B., and Schuurmans, W. (1998). “Test cases for canal control algorithms.” J. Irrig. Drain. Eng., 124(1), 23–30.
Malaterre, P. O., Rogers, D. C., and Schuurmans, J. (1998). “Classification of canal control algorithms.” J. Irrig. Drain. Eng., 124(1), 3–10.
Piao, X., and Burt, C. M. (2005). “Tuning algorithms for automated canal control.” ITRC Rep. No. R 05-005, Irrigation Training and Research Center, California Polytechnic State Univ., San Luis Obispo, Calif.
Ruiz-Carmona, V. M., Clemmens, A. J., and Schuurmans, J. (1998). “Canal control algorithm formulations.” J. Irrig. Drain. Eng., 124(1), 31–39.
Wahlin, B. T., and Clemmens, A. J. (2002). “Performance of historic downstream canal control algorithms on ASCE Test Canal 1.” J. Irrig. Drain. Eng., 128(6), 365–375.
Wilson, S. W. (1995). “Classifier fitness based on accuracy.” Evol. Comput., 3(2), 149–175.

Information & Authors

Information

Published In

Go to Journal of Irrigation and Drainage Engineering
Journal of Irrigation and Drainage Engineering
Volume 137Issue 1January 2011
Pages: 12 - 16

History

Received: Jun 24, 2009
Accepted: Jun 4, 2010
Published online: Jun 9, 2010
Published in print: Jan 2011

Permissions

Request permissions for this article.

Authors

Affiliations

J. E. Hernández, M.ASCE [email protected]
Research Agricultural Engineer, USDA-ARS-CPRL, Bushland, TX 79012-0010. E-mail: [email protected]
G. P. Merkley [email protected]
Professor, Dept. of Civil and Environmental Engineering, Utah State Univ., Logan, UT 84322-4110 (corresponding author). E-mail: [email protected]

Metrics & Citations

Metrics

Citations

Download citation

If you have the appropriate software installed, you can download article citation data to the citation manager of your choice. Simply select your manager software from the list below and click Download.

Cited by

View Options

Media

Figures

Other

Tables

Share

Share

Copy the content Link

Share with email

Email a colleague

Share