# Automatic Control of the Middle Route Project for South-to-North Water Transfer Based on Linear Model Predictive Control Algorithm

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

^{3}/s on the upstream side and 50 m

^{3}/s on the downstream side. In 2018, the operational flow rate was about 200 m

^{3}/s on the upstream side and 40 m

^{3}/s on the downstream side. The canal has 63 undershot check gate stations, one pump station, and 97 offtakes to customers. There is no online reservoir and the entire system is divided into 63 segments by the check gates and pump station. A supervisory control and data acquisition system continuously collects data on water levels, gate positions, and offtake flow rates, and controls the offtake flow and check gates remotely. Although the hardware of the MRP is relatively new and in very good condition, the generation of control strategies still depends on manual experience. The effect of this control mode is limited by the experience of the operators. Although operators are able to adapt to unforeseen changes in the behavior of the canal, their performance is limited by fatigue and loss of concentration; to compensate for this, the operators work in shifts. Furthermore, one operator can only operate a limited number of control structures at a time. This control mode results in obvious changes in water level, instability of the offtake flow, and a reduction in the water delivery efficiency of the canal system.

^{−5}), and the length of canal pools is relatively short, with several canal pools covering only 10 km. Small gate actions will lead to obvious water level oscillations, making it difficult to implement real-time automatic control. Therefore, this paper describes the use of an MPC algorithm to realize real-time automatic control of the MRP. Referring to other projects for the treatment of resonance problems in the control systems of canal pools, a low-pass filter [15,16,17] is employed to eliminate the resonance as much as possible. In this study, the control algorithm is implemented by establishing a simulation model and then applying a control model to the simulation model. Different water offtake disturbances are added to the simulation model to test the applicability of the MPC algorithm to the MRP.

## 2. Materials and Methods

#### 2.1. Study Area and Test Scenarios

^{3}/s. In scenario 2, the flow at offtake 11 reduces by 17 m

^{3}/s according to plan, so this change is known in advance. The same water diversion changes are considered in scenario 3, but the offtake change condition is unknown; this scenario provides a direct comparison with scenario 2. Scenario 4 is an emergency condition in which a sudden increase of 35 m

^{3}/s occurs at offtake 10.

#### 2.2. Numerical Simulation of the Study Area

^{2}); Q is the flow rate (m

^{3}/s); h is the water depth (m); S

_{0}is the canal bottom slope; g is the acceleration of gravity (m/s

^{2}); q is the lateral flow rate of the canal for a unit length (m

^{2}/s); and S

_{f}is the friction slope, which is defined as

^{1/3}) and R the hydraulic radius (m), defined by R = A/P, where P is the wetted perimeter (m).

^{3}/s); $G$ is the gate opening (m); $l$ is the gate width (m); ${h}_{0}$ is the water depth immediately upstream of the gate (m); ${h}_{S}$ is the water depth immediately downstream of the gate (m); and ${C}_{d}$ is the discharge coefficient.

^{3}/s) and ${Q}_{S}$ is the flow immediately downstream of the gate (m

^{3}/s).

^{3}/s); ${Q}_{f}$ is the flow of the canal section immediately downstream of the offtake (m

^{3}/s); and ${Q}_{i}$ is the flow of the offtake (m

^{3}/s), which represents a boundary of the simulation model. The above equations can be used to construct a simulation model of the MRP. The implicit difference scheme [18] is adopted to discretize the above equations and the double sweep method [19] can be used to solve the equations. As real-time control methods generally have good robustness [11,13,20], a model that can describe the characteristics of each pool of the MRP will satisfy the needs of the simulation, so model tuning is not discussed here. The simulation time interval is set to 2 min here.

#### 2.3. Canal Control Model

**y**represents the output variables.

#### 2.4. MPC Algorithm

**Q**is the weighting matrix of the output and

**R**is the weighting matrix of the input. The problem can be summarized as minimizing the objective function by adjusting the future control actions

**u**(k). However, only the first set of control actions is implemented on the canal system. The system is then updated and the process repeated. This is the rolling optimization strategy of MPC.

**Q**and

**R**provide a trade-off between minimizing the water level deviations and minimizing flow changes. Generally, the element values in matrix

**R**can be set to 1, and then the element values in matrix

**Q**can be assigned. Larger values of the elements of

**Q**result in more aggressive control, but a controller that is too aggressive or underdamped will tend to overshoot and oscillate. The elements in the output vector are $e\left(k\right)$ and ${e}^{*}\left(k\right)$, so the elements in

**Q**are the weight coefficients corresponding to $e\left(k\right)$ and ${e}^{*}\left(k\right)$. For MPC, repeated tuning is performed via trial-and-error techniques [13]. The weight coefficients corresponding to $e\left(k\right)$ can be set to 10, and the weight coefficients of ${e}^{*}\left(k\right)$ can be set to 20 with the obtained results of lesser fluctuations and a shorter stabilization time.

## 3. Results

**Q**also influence the control effect of the canal system. In our case,

**Q**was optimized after several trial calculations. Therefore, when the disturbance occurs in the downstream-most pool, the stabilization time is the longest, at about 4–5 times the sum of the delay times of all pools. However, in Figure 2, although the water level in all pools is eventually stabilized, pools 1–5 exhibit a relatively obvious resonance phenomenon, causing the water level to oscillate vigorously before stabilization. The water level oscillation is most obvious in pool 1, causing the water level to fluctuate erratically. This resonance makes changes in the water level unpredictable, and may cause the pool to overflow. In Figure 3, the changes in the inflow to these pools is relatively smooth, which indicates that the resonance is mainly determined by the characteristics of the pools. The fundamental reason is that the water waves at the control point are obvious when the canal pool is completely in the backwater area, but this wave characteristic is not considered in the ID model. Schuurmans (1999) [15] used a low-pass filter to process the water level information of the pools in complete backwater areas, and then used the filtered water level information to generate control strategies. In his results, only significant variations in the offtake flow (greater than the flow in the pools) produced obvious resonance. In this study, as pools 1 and 5 are relatively short with a flat bottom slope, there are obvious water waves in these pools, resulting in resonance in pools 1–5, even in the case of a small change in the offtake flow.

## 4. Discussion

## 5. Conclusions

- The short length and flat bottom slope of some pools of the MRP mean that water waves barely deform in these pools. When the control system constructed based on the ID model is used for automatic control of the MRP, although the control strategy is calculated by using the filtered water level signals through the low-pass filter, resonance still occurs in some pools under conditions of small changes in water delivery.
- In the case of a single disturbance, the stabilization time of the canal control system is approximately 4–5 times the delay time from the upstream-most check gate to the disturbance point. For the MRP, when the downstream water delivery changes, the stabilization time of the canal system will be too long. Under positive or negative disturbances over long time periods, the excessively long stabilization time may cause the water level deviations to accumulate, resulting in water level deviations that exceed the system constraints.
- The MPC algorithm is relatively robust. Although a linear control model is used, the water level can be stabilized even under significant changes in water delivery. Although the MPC algorithm can deal with the water level constraint problem, the water level constraint is an output constraint, and so the water level cannot be guaranteed to satisfy this constraint under large changes in delivery.
- To reduce the stabilization time of the control system and the calculation time of the MPC for the MRP, from an engineering point of view, it is suggested that some reservoirs be constructed in the MRP to divide the current canal system into several separate canal systems for regulation. Additionally, short canal pools in the system should be eliminated as much as possible.

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Burt, C.M. Current Canal Modernization from an International Perspective. In Proceedings of the USCID Workshop on Modernization of Irrigation Water Delivery Systems, Scottsdale, AZ, USA, 17–21 October 1999. [Google Scholar]
- Bautista, E. Real-Time Implementation of Model Predictive Control on Maricopa-Stanfield Irrigation and Drainage District’s Wm Canal. J. Irrig. Drain. Eng.
**2010**, 136, 747–756. [Google Scholar] - Lei, X.; Zheng, H.; Shang, Y.; Wang, H. Assessing Emergency Regulation Technology in the Middle Route of the South-to-North Water Diversion Project, China. Int. J. Water. Resour. D
**2018**, 34, 1–13. [Google Scholar] [CrossRef] - Perez, R.R.; Batlle, V.F.; Rodriguez, L.S. Robust System Identification of an Irrigation Main Canal. Adv. Water Resour.
**2007**, 30, 1785–1796. [Google Scholar] [CrossRef] - Bautista, E.; Clemmens, A.J. Volume Compensation Method for Routing Irrigation Canal Demand Changes. J. Irrig. Drain. Eng.
**2005**, 131, 494–503. [Google Scholar] [CrossRef] [Green Version] - Liu, F.; Feyen, J.; Berlamont, J. Computation Method for Regulating Unsteady Flow in Open Channels. J. Irrig. Drain. Eng.
**1992**, 118, 674–689. [Google Scholar] [CrossRef] - Soler, J.; Gómez, M.; Rodellar, J. GoRoSo: Feedforward Control Algorithm for Irrigation Canals Based on Sequential Quadratic Programming. J. Irrig. Drain. Eng.
**2013**, 139, 41–54. [Google Scholar] [CrossRef] - Malaterre, P.O.; Rogers, D.C.; Schuurmans, J. Classification of Canal Control Algorithms. J. Irrig. Drain. Eng.
**1998**, 124, 3–10. [Google Scholar] [CrossRef] [Green Version] - Rogers, D.C.; Goussard, J. Canal Control Algorithms Currently in Use. J. Irrig. Drain. Eng.
**1998**, 124, 11–15. [Google Scholar] [CrossRef] - Cui, W.; Chen, W.; Mu, X.; Bai, Y. Canal Controller for the Largest Water Transfer Project in China. Irrig Drain.
**2015**, 63, 501–511. [Google Scholar] [CrossRef] - Malaterre, P.O. Pilote: Linear Quadratic Optimal Controller for Irrigation Canals. J. Irrig. Drain. Eng.
**1998**, 124, 187–194. [Google Scholar] [CrossRef] - Sadowska, A.; Schutter, B.D.; van Overloop, P.J. Delivery-Oriented Hierarchical Predictive Control of an Irrigation Canal: Event-Driven Versus Time-Driven Approaches. IEEE Trans. Control Syst. Technol.
**2015**, 23, 1701–1716. [Google Scholar] [CrossRef] - Wahlin, B.T. Performance of Model Predictive Control on ASCE Test Canal 1. J. Irrig. Drain. Eng.
**2004**, 130, 227–238. [Google Scholar] [CrossRef] - Kong, L.; Lei, X.; Wang, H.; Long, Y.; Lu, L.; Yang, Q. A Model Predictive Water-Level Difference Control Method for Automatic Control of Irrigation Canals. Water
**2019**, 11, 762. [Google Scholar] [CrossRef] - Schuurmans, J.; Hof, A.; Dijkstra, S.; Bosgra, O.H.; Brouwer, R. Simple Water Level Controller for Irrigation and Drainage Canals. J. Irrig. Drain. Eng.
**1999**, 125, 189–195. [Google Scholar] [CrossRef] - Guan, G.; Clemmens, A.J.; Kacerek, T.F.; Wahlin, B.T. Applying Water-Level Difference Control to Central Arizona Project. J. Irrig. Drain. Eng.
**2011**, 137, 747–753. [Google Scholar] [CrossRef] - Clemmens, A.J. Water-Level Difference Controller for Main Canals. J. Irrig. Drain. Eng.
**2012**, 138, 1–8. [Google Scholar] [CrossRef] - Strelkoff, T.S.; Falvey, H.T. Numerical Methods Used to Model Unsteady Canal Flow. J. Irrig. Drain. Eng.
**1993**, 119, 637–655. [Google Scholar] [CrossRef] - Chalfen, M.; Niemiec, A. Analytical and Numerical Solution of Saint-Venant Equations. J. Hydrol.
**1986**, 86, 1–13. [Google Scholar] [CrossRef] - Isapoor, S.; Montazar, A.; Overloop, P.J.V.; Giesen, N.V.D. Designing and Evaluating Control Systems of the Dez Main Canal. Irrig. Drain.
**2011**, 60, 70–79. [Google Scholar] [CrossRef] - Schuurmans, J.; Bosgra, O.H.; Brouwer, R. Open-Channel Flow Model Approximation for Controller Design. Appl. Math. Model.
**1995**, 19, 525–530. [Google Scholar] [CrossRef] - Weyer, E. System Identification of an Open Water Channel. Control. Eng. Pract.
**2001**, 9, 1289–1299. [Google Scholar] [CrossRef] - Clemmens, A.J.; Wahlin, B.T. Simple Optimal Downstream Feedback Canal Controllers: Asce Test Case Results. J. Irrig. Drain. Eng.
**2004**, 130, 35–46. [Google Scholar] [CrossRef] - Hashemy, S.M.; Monem, M.J.; Maestre, J.M.; Overloop, P.J.V. Application of an In-Line Storage Strategy to Improve the Operational Performance of Main Irrigation Canals Using Model Predictive Control. J. Irrig. Drain. Eng.
**2013**, 139, 635–644. [Google Scholar] [CrossRef] - Litrico, X.; Fromion, V. Analytical Approximation of Open-Channel Flow for Controller Design. Appl. Math. Model.
**2004**, 28, 677–695. [Google Scholar] [CrossRef] - Wahlin, B.T.; Clemmens, A.J. Automatic Downstream Water-Level Feedback Control of Branching Canal Networks: Simulation Results. J. Irrig. Drain. Eng.
**2006**, 132, 208–219. [Google Scholar] [CrossRef] - Hou, Z.; Xiong, S. On Model Free Adaptive Control and its Stability Analysis. IEEE. Trans. Autom. Contr.
**2019**. accepted. [Google Scholar] [CrossRef] - Roman, R.C.; Precup, R.E.; David, R.C. Second Order Intelligent Proportional-Integral Fuzzy Control of Twin Rotor Aerodynamic Systems. Procedia Comput. Sci.
**2018**, 139, 372–380. [Google Scholar] [CrossRef]

Pool | Pool Length (km) | Bottom Width (m) | Side Slope | Slope | Downstream Initial Flows (m^{3}/s) | Offtake Initial Flows (m^{3}/s) | Target Water Depth (m) |
---|---|---|---|---|---|---|---|

Heading | 125.5 | ||||||

1 | 9.4 | 13.2 | 2.5 | 5.58 × 10^{−5} | 125.5 | 0 | 7.2 |

2 | 22.0 | 21.5 | 2.5 | 3.89 × 10^{−5} | 118.5 | 7 | 7.16 |

3 | 15.2 | 21.5 | 2.5 | 4.05 × 10^{−5} | 113.5 | 5 | 7.23 |

4 | 19.5 | 21.5 | 2.5 | 5.56 × 10^{−5} | 109.5 | 4 | 6.77 |

5 | 9.2 | 15 | 3 | 3.50 × 10^{−5} | 109.5 | 0 | 6.7 |

6 | 25.7 | 21.5 | 2.5 | 3.30 × 10^{−5} | 99.5 | 10 | 4.29 |

7 | 13.2 | 21.5 | 2.5 | 6.72 × 10^{−5} | 94.5 | 5 | 7 |

8 | 26.6 | 21 | 2 | 9.78 × 10^{−5} | 87 | 7.5 | 4.5 |

9 | 9.7 | 22.5 | 2.75 | 3.81 × 10^{−5} | 70 | 17 | 4.5 |

10 | 14.9 | 17 | 1 | 6.13 × 10^{−5} | 55 | 15 | 4.21 |

11 | 20.8 | 10 | 2 | 5.37 × 10^{−5} | 42 | 13 | 4.19 |

12 | 14.7 | 7.5 | 2.5 | 5.13 × 10^{−5} | 42 | 0 | 4.21 |

13 | 25.4 | 7.5 | 2.5 | 5.32 × 10^{−5} | 35 | 7 | 3.95 |

**Table 2.**Parameters of the integral delay (ID) model, upstream water depths, and uniform water depths of 13 pools.

Parameter | Pool | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | |

${A}_{s}$ | 252,101 | 759,494 | 491,803 | 689,655 | 327,869 | 413,793 | 480,000 | 659,340 | 411,176 | 327,869 | 416,667 | 361,446 | 431,655 |

${t}_{d}$ | 15 | 48 | 33 | 46 | 21 | 60 | 31 | 70 | 24 | 35 | 57 | 41 | 75 |

${H}_{up}$ | 5.06 | 6.71 | 4.44 | 4.55 | 6.34 | 4.31 | 3.86 | 3.18 | 4.29 | 3.81 | 3.83 | 3.82 | 3.56 |

${H}_{u}$ | 4.71 | 4.33 | 4.16 | 3.78 | 4.62 | 4.01 | 3.25 | 3.00 | 3.46 | 3.45 | 3.68 | 3.38 | 3.35 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Kong, L.; Quan, J.; Yang, Q.; Song, P.; Zhu, J.
Automatic Control of the Middle Route Project for South-to-North Water Transfer Based on Linear Model Predictive Control Algorithm. *Water* **2019**, *11*, 1873.
https://doi.org/10.3390/w11091873

**AMA Style**

Kong L, Quan J, Yang Q, Song P, Zhu J.
Automatic Control of the Middle Route Project for South-to-North Water Transfer Based on Linear Model Predictive Control Algorithm. *Water*. 2019; 11(9):1873.
https://doi.org/10.3390/w11091873

**Chicago/Turabian Style**

Kong, Lingzhong, Jin Quan, Qian Yang, Peibing Song, and Jie Zhu.
2019. "Automatic Control of the Middle Route Project for South-to-North Water Transfer Based on Linear Model Predictive Control Algorithm" *Water* 11, no. 9: 1873.
https://doi.org/10.3390/w11091873