Real-Time Control of the Middle Route of South-to-North Water Diversion Project

: Scientiﬁc and effective operation control of the Middle Route of South-to-North Water Diversion Project (MRP) is crucial to ensure water conveyance safety. As the longest water transfer project in China, its operation is confronted with unprecedented difﬁculties since it is controlled by a large number of check gates and diversion gates, subject to multiple constraints, and has no online regulation reservoirs. No automatic control models have been successfully put into use yet. This paper ﬁrstly introduced an expanded downstream depth operation method, and then scheduled the delivery using the volume balance principle and chartography according to the possible combination of ﬂow change of the check gate, water volume change of the pool and ﬂow change of diversions. Next, an improved real-time control model was established on the basis of PI controller, and the models were integrated into an automatic system for daily operation. Finally, a case study was carried out. Results showed that water level variations could be controlled within the target interval (0.25 m), and users’ demands could be met ﬁve times more rapidly. In addition, the total times of check gate operation could be reduced almost two times. The ﬁndings could promote the intelligent operation of the MRP.


Introduction
Large water diversion projects are used worldwide to deliver water from water-rich areas to water-deficient areas. Reliable automatic operation of the diversion projects is important to ensure safety and improve efficiency of water conveyance [1].
Operation method of the canal system should be identified before automatic control is investigated. The traditional operation methods include constant downstream depth, constant upstream depth, constant volume, and controlled volume method [2], based on the location in the canal pool at which the water depth remains constant (pivot point). For the first three methods, the pivot point is located at the downstream end of the canal pool, the upstream end of the canal pool and near the midpoint of the canal pool, respectively. As for the controlled volume method, the pivot point is not required. The constant downstream depth method is mostly used in long distance canal systems because it could greatly reduce investment and is simple for operators' use. The constant volume method is used in the Central Arizona Project in U.S.A. to avoid mismatch of flows at the two ends of aqueducts [3,4], but is seldom used for long distance water diversion projects in China for its complexity and requirements for simultaneous operation of all pumps and check gates.
In real-time canal operations, the combination of feedforward and feedback control is recommended for it can reduce water level error propagation [5]. The scheduling of gate adjustments to meet anticipated water demand changes is described as feedforward control, which is open-loop. The gate stroking method was proposed nearly five decades gate adjustments to meet anticipated water demand changes is described as feedforward control, which is open-loop. The gate stroking method was proposed nearly five decades ago for canal routing [6] but has not been put into use since it is difficult to get a reasonable solution and sometimes there is no solution at all. The impracticality promotes the volume-compensation method, which schedules each demand change individually under the assumption of a series of steady states and superimposes the individual results for multiple-pool canal systems [7]. In this method, the check gate at the upstream end of the pool should firstly give a larger inflow change to increase or decrease the pool volume, and then change back to match the outflow. The key to this method is the response time of a canal pool, which has been extensively studied [8][9][10]. The volume compensation method performs satisfactorily under ideal flow control conditions but is less effective and does not show much superiority when subjected to realistic constraints on the gate movements and incorrect canal hydraulic roughness information. Several improved approaches have been put forward. For instance, the sequential quadratic problem (SQP) method is adopted to solve the nonlinear optimization problem with constraints considered [11]. Additional adjustments to all check structures are attempted to shorten the stabilization time and accelerate flow routing [12].
The correction of the pre-determined process with actual monitoring data during operation is referred as feedback control, which is closed loop. Quite a few algorithms have been brought forward and tested on the American Society of Civil Engineers (ASCE) test canals, such as the EL-FLO algorithm [13], the Proportion Integration (PI) or Proportion Integration Differentiation (PID) algorithm [14][15][16][17][18][19], model predictive control (MPC), and linear quadratic regulator (LQR) [20][21][22][23][24]. Whereas most of these algorithms can effectively deal with single-pool canals, they are less qualified for long distance multi-pool canals due to the strong and complicated interactions between different pools, unknown disturbances [25], or too long computation time for the whole system [22][23][24].
This paper deals with the real-time control of the Middle Route of South-to-North Water Diversion Project (MRP), the largest water conveyance project in China. It provides living and industrial water as well as agricultural water for 19 large and medium-sized cities including Beijing, Tianjin and over 100 counties and county-level cities in the North China plain, playing an important role in relieving the severe water shortage in North China. In addition, the MRP promotes the sustainable economic and social development of water-receiving areas and protects the local environment [26,27]. The MRP is 1432 kilometers in length, diverting water from the headwork Taocha in Danjiangkou reservoir northward to Beijing and Tianjin along the newly excavated canals, as sketched in Figure  1. The MRP has an average water transfer volume of 9.5 billion cubic meters for the past many years, and the design flow of head gate Taocha is 350 m 3 /s. Compared with other large diversion projects in different regions, the operation of the MRP is confronted with unprecedented difficulties: (1) The MRP is consisted of a large number of open channels as well as low-pressurized inverted siphons and is controlled by 63 check gates; thus, the interaction among pools caused by gate regulations would be even more complicated [28]. (2) Since the canal is too long, the delivery delay time for downstream users is much more than users' expectation. Practices showed that it would take at least 2-3 days for translatory waves initiated by the flow change at the head gate travelling to the reaches after Yellow River. Further, the delay time differs greatly among canal pools since the size and design flow of each pool differ greatly [29]. For instance, the carrying capacity of the end canal pool is less than 15% of that of the first pool. (3) There are 97 diversion gates and 54 recession gates along the canal, so the possible combination of flow changes at the canalside turnouts would be considerable. (4) It has no online regulation reservoirs and should obey many strict constraints, making it extremely difficult to accommodate some desired flow schedules by users. For example, the drawdown rate for normal operation should be limited to 0.15m per hour and 0.30-0.50 m per day to prevent damage to the canal lining.
The constant downstream depth method turns out to be unsuitable for the MRP in practice. Check gates should be adjusted typically 3-4 days before the delivery starts [30], so that the inflow change at the upstream end of the pool could overcompensate for the outflow change. However, the MRP tends to become flexible in response to users' demands. It is also known that changes in demand should be predicted so that the inflow change can be made in advance [31], but some changes in water demand are often unforeseen or known less than one day ahead. In addition, fluctuations of diversion flows are common in the MRP, as shown in Figure 2, in which the dots represent real-time diversion flows (monitored every hour), the fold line represents the average daily diversion flow, and the dashed line represents the anticipated flow made late last month. The periodical flow fluctuations put the canal system always under imbalances between inflow and outflow, so keeping the downstream depth constant may cause frequent or even unnecessary check gate regulation. The constant volume method and controlled volume method allow a reduction of the time delay [4], but they are neither straightforward for operators nor economical for automatic control design, thus they are not appropriate for the MRP. Therefore, it is urgent to develop a simple, efficient, and reliable operation method for the MRP. Compared with other large diversion projects in different regions, the operation of the MRP is confronted with unprecedented difficulties: (1) The MRP is consisted of a large number of open channels as well as low-pressurized inverted siphons and is controlled by 63 check gates; thus, the interaction among pools caused by gate regulations would be even more complicated [28]. (2) Since the canal is too long, the delivery delay time for downstream users is much more than users' expectation. Practices showed that it would take at least 2-3 days for translatory waves initiated by the flow change at the head gate travelling to the reaches after Yellow River. Further, the delay time differs greatly among canal pools since the size and design flow of each pool differ greatly [29]. For instance, the carrying capacity of the end canal pool is less than 15% of that of the first pool. (3) There are 97 diversion gates and 54 recession gates along the canal, so the possible combination of flow changes at the canalside turnouts would be considerable. (4) It has no online regulation reservoirs and should obey many strict constraints, making it extremely difficult to accommodate some desired flow schedules by users. For example, the drawdown rate for normal operation should be limited to 0.15m per hour and 0.30-0.50 m per day to prevent damage to the canal lining.
The constant downstream depth method turns out to be unsuitable for the MRP in practice. Check gates should be adjusted typically 3-4 days before the delivery starts [30], so that the inflow change at the upstream end of the pool could overcompensate for the outflow change. However, the MRP tends to become flexible in response to users' demands. It is also known that changes in demand should be predicted so that the inflow change can be made in advance [31], but some changes in water demand are often unforeseen or known less than one day ahead. In addition, fluctuations of diversion flows are common in the MRP, as shown in Figure 2, in which the dots represent real-time diversion flows (monitored every hour), the fold line represents the average daily diversion flow, and the dashed line represents the anticipated flow made late last month. The periodical flow fluctuations put the canal system always under imbalances between inflow and outflow, so keeping the downstream depth constant may cause frequent or even unnecessary check gate regulation. The constant volume method and controlled volume method allow a reduction of the time delay [4], but they are neither straightforward for operators nor economical for automatic control design, thus they are not appropriate for the MRP. Therefore, it is urgent to develop a simple, efficient, and reliable operation method for the MRP.  As for the control method, the traditional volume-compensation is not suitable for the feedforward control of MRP, because the assum is almost impossible in realistic operation, and multiple constrained its application. In addition, the response time is quite different for e pends largely on the flow condition and canal size [8], which differ g The response time needs modification individually, which would work. Moreover, the required two-step adjustment of check gates is unidirectional regulation way of the MRP. With respect to feedba many improvements have been made to enhance the model perfor As for the control method, the traditional volume-compensation principle for routing is not suitable for the feedforward control of MRP, because the assumption of steady states is almost impossible in realistic operation, and multiple constrained conditions hamper its application. In addition, the response time is quite different for each pool since it depends largely on the flow condition and canal size [8], which differ greatly among pools. The response time needs modification individually, which would cause tremendous work. Moreover, the required two-step adjustment of check gates is against the favorable unidirectional regulation way of the MRP. With respect to feedback control, although many improvements have been made to enhance the model performance under violent and unforeseen flow fluctuations at the turnout points, there have been no reports of successful application of feedback controllers in the MRP so far. Therefore, it is necessary to improve the real-time control strategy and model for the MRP.
In this paper, an improved operation method for the MRP is put forward. Then scheduling of check structures based on different flow and water level changes is presented, and the real-time control strategy and control model are developed for daily automatic operation of the MRP. Finally, a case study is applied to verify the efficiency and reliability of the operation method and model proposed.

The Expanded Downstream Depth Operation Method
Typically, the main canal of a long distance water diversion project is divided into a series of pools by check gates, which is sketched in Figure 3.
As for the control method, the traditional volume-compensation principle for routing is not suitable for the feedforward control of MRP, because the assumption of steady states is almost impossible in realistic operation, and multiple constrained conditions hamper its application. In addition, the response time is quite different for each pool since it depends largely on the flow condition and canal size [8], which differ greatly among pools. The response time needs modification individually, which would cause tremendous work. Moreover, the required two-step adjustment of check gates is against the favorable unidirectional regulation way of the MRP. With respect to feedback control, although many improvements have been made to enhance the model performance under violent and unforeseen flow fluctuations at the turnout points, there have been no reports of successful application of feedback controllers in the MRP so far. Therefore, it is necessary to improve the real-time control strategy and model for the MRP.
In this paper, an improved operation method for the MRP is put forward. Then scheduling of check structures based on different flow and water level changes is presented, and the real-time control strategy and control model are developed for daily automatic operation of the MRP. Finally, a case study is applied to verify the efficiency and reliability of the operation method and model proposed.

The Expanded Downstream Depth Operation Method
Typically, the main canal of a long distance water diversion project is divided into a series of pools by check gates, which is sketched in Figure 3. The MRP promotes timely delivery service to users after operation, no matter it is scheduled or temporary. However, it has no online regulation reservoirs and is also subject to strict constraints in terms of water level. To respond to water users' demands more The MRP promotes timely delivery service to users after operation, no matter it is scheduled or temporary. However, it has no online regulation reservoirs and is also subject to strict constraints in terms of water level. To respond to water users' demands more rapidly and maintain operational stability of the main canal, the expanded downstream depth operation method is proposed herein. The basic foundations of the method are: 1.
The water level upstream of the check gate is controlled within an interval instead of a fixed point. The interval is obtained from expanding the target water level upward and downward for certain extent, which is determined by trial calculation to meet the operational requirements of each canal.

2.
The target water level is variable according to the demands such as diversion flow changes and routine maintenances, so that the own storage of the main canal can be fully utilized to meet different requests.

3.
Check gates are regulated after considering the overall water volume upstream and downstream the pool, instead of simply relying on the volume or water level of local pool mostly used before [28,32,33].
In this way, the adverse influence of daily flow fluctuations and temporal flow adjustments on the canal system stability can be largely reduced. As long as the diversion flow variations are not durative or substantial, the head gate can remain unmoved. For the traditional operation method, check gates are supposed to be regulated frequently to deal with mismatches caused by such diversion flow changes, which may even lead to oscillations.
When the water level upstream of the check gate exceeds the target interval, the gate should be regulated to coordinate the whole water volume upstream and downstream the canal pool, rather than only to maintain the balance of the local pool. For example, if the water level upstream of a certain check gate is high while the water level upstream of the upper check gates is low, the reduction of upper gate openings should be made rather than the increase of the opening of the gate at the downstream end of the local pool.
By carrying out analysis of the daily and monthly diversion flow pattern and the unsteady flow simulation, combined with practical experiences, the target water level interval of the main canal of the MRP is determined as follows: (1) The upper limit of the target interval is 0.15 m above the target water level and below the highest allowable limit to prevent overflow. (2) The lower limit of the target interval is 0.10 m below the target water level and beyond the lowest allowable limit, which is set to guarantee the stable turnout delivery, the submergence of the entrance of inverted siphons as well as the stability of canals with high underground water level. (3) The water level in some special canal pools should be controlled more strictly. For example, the water level variation at the entrance of Yellow River crossing water conveyance tunnel should be controlled within 0.10 m for safety, and the water level variation upstream of the end check gate should be controlled within 0.20 m to ensure the stable operation of further pump station Huinanzhuang. It means that the target interval and regulable storage are not the same for individual canal pool.

Scheduling of Water Delivery
Next, the scheduling of water delivery is discussed, namely the feedforward control. In practice, the initial state of the canal system is known. The target diversion flow is collected by operators from users and the target state of the canal system can be easily calculated by using the one-dimensional hydrodynamic model. As the deduction is made from the upstream to downstream successively, and the flow process of the head gate is given, the key to obtain the scheduling of delivery lies in determining the start and the end time of adjustment of the diversion gate and the check gate at the downstream end of each pool. The relative relationship between the start time of regulation of check gates and that of diversion gates is determined by the delivery method of the project. For the supply-oriented delivery, check gates are firstly regulated to fill or release canal pools, and diversion gates are then regulated at the given time based on the schedule. For the demand-oriented delivery, diversion gates are firstly regulated to meet users' demands, and check gates are then regulated at an appropriate time to match the flow.
It is recognized that the total water volume demanded by users can only be satisfied to a limited scope if the head gate Taocha does not make changes. So, the available storage of the canal system should be calculated to determine whether the need could be met immediately. The available storage is calculated from the water level limit and the current water level. If the available storage is larger than the total demanded volume, adjacent pools adjust their openings or target water level so that the demanded volume could be supplied with their available storage. We try to give a uniform volume redistribution as far as possible, so that there would not be a wide range of pools reaching the water level limit after the delivery. In this case, the most recent upstream check gate whose opening is constant could be regarded as a new head gate. Otherwise, the start time of adjustment and the target flow of head gate Taocha should be calculated from the water volume gap.
After the chronological regulation order of various control structures is determined, the scheduling of delivery can be dealt with. The transition process of each canal pool from the initial state to target state can be divided into four scenarios according to the possible combination of flow change of the check gate at the downstream end of the pool and volume change of the pool. The four scenarios are called "gate opening with water filling", "gate opening with water releasing", "gate closing with water filling", and "gate closing with water releasing" for simplicity. "Gate opening with water filling" means that target flow of check gate at the downstream end of the pool increases and the target water volume of the pool also increases, and the other three scenarios can be analogized. Each scenario can be subdivided into two cases according to the change of diversion flow, which are "increase of diversion flow" and "decrease of diversion flow". The first case corporates the situation that the diversion flow is constant. Thus there are eight possible operational cases for each canal pool. The flow of each check gate is assumed to change in a piecewise linear way, and the rate is determined from trial calculation. The scheduling is made using chartography successively. The start and end time of the regulation of check gates and diversion gates under each case can be calculated on the principle of water volume balance without the traditional hypothesis that the canal system starts from a balance state of inflow and outflow.
The scheduling procedure is illustrated herein by taking "gate opening with water filling" as an example. Scheduling of the rest three scenarios can be derived in a similar way.
It is obvious that where the check gate at the downstream end of the ith canal pool is numbered as i, as shown in Figure 3; subscripts 0 and e are used to denote the initial state and target state, respectively; the diversion flow and water volume of the pool are QF i and V i , respectively; the flow of check gate i is Q i ; the start and end time of adjustment of check gate i are T i,0 and T i,e , respectively; the start and end time of adjustment of the diversion gate are TF i,0 and TF i,e , respectively; the flow rates of check gate i and diversion gate are K i and KF i , respectively. Here we assume K i = KF i . If the diversion flow increases, the inflow of the canal pool must increase. For demandoriented delivery taken by the MRP, the diversion flow is supposed to increase simultaneously with the inflow to meet water users' demand as soon as possible. Thus, The check gate at the downstream end of the pool starts to increase its opening after the diversion gate accomplishes its adjustment. The flow increase of check gate i-1 consists of the flow increase of check gate i and the flow increase of diversion. As the pool is to be filled, the check gate at the downstream end of the pool must be the last one to finish adjustment, as illustrated in Figure 4a. The water volume balance relation of the pool is described by Equation (4). With Equations (1)-(4), the start and end time of adjustment of check gate i and the diversion gate can be uniquely determined.
Water 2021, 13, x FOR PEER REVIEW 7 of 18 filled, the check gate at the downstream end of the pool must be the last one to finish adjustment, as illustrated in Figure 4a. The water volume balance relation of the pool is described by Equation (4). With Equations (1)-(4), the start and end time of adjustment of check gate i and the diversion gate can be uniquely determined.
If the diversion flow decreases, the inflow of the canal pool could either decrease or increase. The diversion flow also increases simultaneously with the inflow; thus, Equation (3) still holds. When the inflow increases, the flow increase of check gate i-1 consists of the flow increase of check gate i and the flow decrease of diversion. As the diversion gate starts regulation simultaneously with check gate i-1, the check gate at the downstream end of the pool must be the last one to accomplish adjustment, otherwise, the pool would be in a releasing state. The scheduling is illustrated in Figure 4b, and the water volume balance relation of the pool is described by Equation (5). When the inflow decreases, the decrease of diversion flow consists of the flow increase of check gate i and the flow decrease of check gate i-1; thus, TFi,e must be larger than Ti-1,e, and the check gate at the downstream end of the pool is still the last one to accomplish adjustment; otherwise, during the time from Ti,e to TFi,e, the outflow would be larger than the inflow, and the pool will be in a releasing state, as illustrated in Figure 4c. Obviously, Equation (5) still serves in this case.

The Real-Time Automatic Control Model
The canal system is faced with strong disturbances during routine operation, so the anticipated delivery needs to be modified according to the real-time monitoring data (feedback control). The traditional PID controller or three-point controller are unfavorable for the MRP for their poor performances such as frequent gate regulation, overshoot, and oscillation. This paper builds an improved automatic control model on the basis of Proportion Integration (PI) controller in following aspects: (1) The constraint that the ultimate target is in a steady flow state is abandoned, since it is impossible for the canal pool to realize complete balance between inflow and outflow in practice. (2) The overall water volume of the canal system is taken as the primary control factor. The water level of the local pool is taken as the secondary control factor, and the flow is taken as the third control factor to avoid unnecessary gate adjustments due to periodical unbalances between in- If the diversion flow decreases, the inflow of the canal pool could either decrease or increase. The diversion flow also increases simultaneously with the inflow; thus, Equation (3) still holds. When the inflow increases, the flow increase of check gate i-1 consists of the flow increase of check gate i and the flow decrease of diversion. As the diversion gate starts regulation simultaneously with check gate i-1, the check gate at the downstream end of the pool must be the last one to accomplish adjustment, otherwise, the pool would be in a releasing state. The scheduling is illustrated in Figure 4b, and the water volume balance relation of the pool is described by Equation (5). When the inflow decreases, the decrease of diversion flow consists of the flow increase of check gate i and the flow decrease of check gate i-1; thus, TF i,e must be larger than T i-1,e , and the check gate at the downstream end of the pool is still the last one to accomplish adjustment; otherwise, during the time from T i,e to TF i,e , the outflow would be larger than the inflow, and the pool will be in a releasing state, as illustrated in Figure 4c. Obviously, Equation (5) still serves in this case.

The Real-Time Automatic Control Model
The canal system is faced with strong disturbances during routine operation, so the anticipated delivery needs to be modified according to the real-time monitoring data (feedback control). The traditional PID controller or three-point controller are unfavorable for the MRP for their poor performances such as frequent gate regulation, overshoot, and oscillation. This paper builds an improved automatic control model on the basis of Proportion Integration (PI) controller in following aspects: (1) The constraint that the ultimate target is in a steady flow state is abandoned, since it is impossible for the canal pool to realize complete balance between inflow and outflow in practice. (2) The overall water volume of the canal system is taken as the primary control factor. The water level of the local pool is taken as the secondary control factor, and the flow is taken as the third control factor to avoid unnecessary gate adjustments due to periodical unbalances between inflow and outflow.
The downstream control and upstream control are both available for real-time modification of gate operations. The choice depends on the trend of whole water volume upstream and downstream the pool, but the downstream control is preferred when both modifications are reasonable. For example, when the water level upstream of the check gate is beyond the upper limit of the target interval, the downstream gate should increase its opening if the water volume upstream the pool and downstream the pool are both stable. While if the whole water volume upstream the pool is below or near the lower target limit or continues to decline, the upstream gates should be closed to different extents, determined by the volume deviation from the target, the expected recovery time, and the allowable drawdown rate. The faster the water level rises, the greater amount of reduction of upstream check gates is.
In addition, the check gate is preferred to be adjusted in one direction to maintain the system stability. The scheduling is modified when the water level upstream of the check gate exceeds the target water level by 70% of the interval and changes unidirectionally towards the limit for two consecutive times (about four hours), which is obtained from immense numerical simulation to avoid overshoot or under regulation.
Although flow is used as the feedback control variable, orders of check gates should be given as opening for execution. Researches show that the use of gate openings as control variable directly is better than discharge, but only for short canal pools where the interactions are strong and canal pools are completely affected by backwater [34]. For the MRP where a disturbance from downstream might not always reach the upstream end of the canal pool, this method is not expected to show advantages. The ultimate gate opening is calculated with the revised target flow and the real-time water level by the sluice discharge equation. The traditional semi-theoretical equations show low accuracy in the MRP operation, which are supposed to be affected by the structural layout, types of check gates, underflow conditions and so on. The empirical discharge coefficients and submergence coefficients for different flow patterns need to be calibrated individually with measured data [35][36][37], which is extremely complicated and work-consuming. This paper adopts the real-time correction technique to identify the coefficients from 48 groups of measured data (flow, water level and gate opening) in the last 24 h. The mean value of the calculated coefficients of 48 groups is taken as the coefficient for the current time. The models are integrated into an automatic system for the daily operation of the MRP, which can collect monitoring data of each control structure, as well as generate and send gate orders.

Case Study
Here an application example is used to show the performance of the models. The real-time flow and water level data are collected and used as feedback control information. The batch of operation orders of check gates is generated automatically every two hours and then sent for execution. The test time lasts 48 h.

Study Area
The study area is the whole main canal of the MRP. The canal system is divided into 60 pools by 61 check gates. In each pool, there is at least one diversion or recession gate. Locations of the main control structures are shown in Figure 5. The Yellow River crossing tunnel, located nearly in the middle of the main canal, is a landmark structure of the MRP. The water level at the entrance of the tunnel is required to be controlled between 117.00m and 117.10m during normal operation for safety. The Zhanghe-crossing inverted siphon, nearly at three quarters of the distance, is another landmark structure of the MRP for administrative division reasons. The end check gate Beijuma does not participate in operation and the water level in the last pool is controlled by the upstream check gates.

Test Condition
To validate the efficiency and stability of model, the chosen test has two features. Firstly, the diversions with flow changes are all located at the lower reaches of the main canal. Secondly, the inflow mismatches the outflow. The test condition is described as follows:  Table  1. The total diversion flow is reduced by 3 m 3 /s at the initial time and reduced by 8 m 3 /s 12 h later for the second time. The reduction of the total inflow is greater than that of the total diversion flow, thus the canal system is in a releasing state. 3. In the initial state, water level of most canal pools is within the target interval, except several pools from Anyanghe River to Guyunhe River, as shown in Table 2, in which those out of the target interval are underlined. The water level at Yellow River crossing tunnel inlet is 117.05 m. 4. The target water level is taken as the design value.
The steady target state could be calculated by the one-dimensional steady flow equations and the water level-volume relationship.  Typically, the canal pools at the upstream reaches have larger sizes and adjustable storages than that at the downstream reaches, for the design flow is much greater at upstream. Therefore, flow changes at downstream reaches are much more challenging for operation.

Test Condition
To validate the efficiency and stability of model, the chosen test has two features. Firstly, the diversions with flow changes are all located at the lower reaches of the main canal. Secondly, the inflow mismatches the outflow. The test condition is described as follows: 1.
The flow of head gate Taocha is reduced by 20 m 3 /s for two times. It is reduced by 10 m 3 /s for the first time and reduced by 10 m 3 /s again after 12 h.

2.
The flows of Fuyanghe, Hutuohe, Shahe (north), and Beiyishui diversions are reduced by 3 m 3 /s, 5 m 3 /s, 10 m 3 /s, and 3 m 3 /s, respectively. The flows of Tanghe and Baohe diversions are increased by 3 m 3 /s and 7 m 3 /s, respectively, as shown in Table 1. The total diversion flow is reduced by 3 m 3 /s at the initial time and reduced by 8 m 3 /s 12 h later for the second time. The reduction of the total inflow is greater than that of the total diversion flow, thus the canal system is in a releasing state.

3.
In the initial state, water level of most canal pools is within the target interval, except several pools from Anyanghe River to Guyunhe River, as shown in Table 2, in which those out of the target interval are underlined. The water level at Yellow River crossing tunnel inlet is 117.05 m.

4.
The target water level is taken as the design value. The steady target state could be calculated by the one-dimensional steady flow equations and the water level-volume relationship.

Test Results and Discussion
By adopting the operation method in this paper, canal storages are firstly fully utilized to store the reduced water volume by users temporarily, and after the negative translatory wave travels downstream, the pool volume decreases. The results based on the proposed method as well as the discussion are illustrated below.

Variations of Check Gate Openings
Variations of the opening of check gates located near the diversions with flow changes and at the key cross sections are shown in Figure 6. It is shown that each check gate adjusts its opening in one direction before reaching the target flow and remains almost unmoved after reaching the target flow. The exception is that check gates from Baohe to Fenzhuanghe increase their openings from 24th to 38th hours mainly due to the unforeseen decrease of water level upstream of end check gate Beijuma ( Figure 8). As check gate Beijuma does not participate in operation, the water level deviation can only be resumed by the operation of its upstream gates.
The total times of gate adjustments has been added up, as shown in Table 3. In addition, the total times of gate adjustments made by the traditional PID controller are used as comparison, which is done by numerical simulation. It can be seen that the control model in this paper could reduce gate adjustments by nearly two times. seen decrease of water level upstream of end check gate Beijuma ( Figure 8). As check gate Beijuma does not participate in operation, the water level deviation can only be resumed by the operation of its upstream gates. The total times of gate adjustments has been added up, as shown in Table 3. In addition, the total times of gate adjustments made by the traditional PID controller are used as comparison, which is done by numerical simulation. It can be seen that the control model in this paper could reduce gate adjustments by nearly two times.

Variations of Water Level Upstream of Check Gates
Variations of water level upstream of the check gates located at canal pools with diversion flow changes and other special water level control requirements are shown in Figures 7 and 8, respectively. It is shown that the water level upstream of the check gates mostly changes within the target interval. The water level in canal pools from Zhanghe-Crossing inverted siphon to Guyunhe River culvert almost lies at the upper limit of the target interval, since the pools store the reduced water volume of users.
Water 2021, 13, x FOR PEER REVIEW 13 of 18 disturbances. The upstream check gate Suohe speeds up the reduction of its opening, as shown in Figure 6, and the water level returns to normal after about 4 h. This illustrates that the feedback control is robust.

Conclusions
Real-time control of the MRP is important for delivery efficiency and safety. So far, no real-time controllers have been successfully put into use in daily operation of the MRP mainly due to the poor performance under violent and unforeseen flow fluctuations at the turnout points. In this paper, an expanded downstream depth operation method was introduced to respond to users' demand more flexibly and maintain the whole canal system stable. Then the scheduling of delivery was presented, and an improved control model was built on the basis of PI controller. The models were integrated into an automatic system for daily operation of the MRP. Finally, an application is illustrated for validation. The conclusions are summarized as follows: (1) The expanded downstream depth operation method was proposed. The water level is controlled within a target interval instead of a fixed point, and the target interval is changeable, so that flow mismatches can be tolerated, and users' requests can be accommodated more flexibly. The interval is about 0.25 m for the MRP. Results show that the canal system could respond to users' demands five times more rapidly, compared to the constant downstream depth method.
(2) The scheduling of delivery could be obtained by chartography from upstream to downstream successively. The operation is divided into four scenarios according to the possible combination of flow change of the check gate at the downstream end of the pool and volume change of the pool, and each scenario can be subdivided into two cases according to the change of diversion flow. In each case, the flow chart can be drawn based on the delivery method and the target. The start and end time of regulation of the check gate at the downstream end of the pool and diversions can be determined on the basis of volume balance principle. An improved real-time automatic control model is built for feedback control, in which the overall water volume upstream and downstream the pool is taken as the primary control factor, the water level of the local pool is taken as the secondary control factor, and the flow is taken as the third control factor. Results show that the developed model is robust and efficient. It can keep water level within the target interval during operation and reduce gate regulations by more than two times, compared to the traditional PID controller.
The expanded downstream depth operation method proposed could be popularized in long-distance water diversion projects with both supply-oriented delivery and demand-oriented delivery, which is under our investigation currently. Additionally, this paper assumes that the anticipated flow rate of different check gates is the same. Further researches would be done to obtain the rate for individual gate based on theoretical derivation. The water level at the entrance of Yellow River crossing tunnel exceeds the upper limit of the target interval in the 32nd hour, maybe due to diversion fluctuations or other disturbances. The upstream check gate Suohe speeds up the reduction of its opening, as shown in Figure 6, and the water level returns to normal after about 4 h. This illustrates that the feedback control is robust.

Conclusions
Real-time control of the MRP is important for delivery efficiency and safety. So far, no real-time controllers have been successfully put into use in daily operation of the MRP mainly due to the poor performance under violent and unforeseen flow fluctuations at the turnout points. In this paper, an expanded downstream depth operation method was introduced to respond to users' demand more flexibly and maintain the whole canal system stable. Then the scheduling of delivery was presented, and an improved control model was built on the basis of PI controller. The models were integrated into an automatic system for daily operation of the MRP. Finally, an application is illustrated for validation. The conclusions are summarized as follows: (1) The expanded downstream depth operation method was proposed. The water level is controlled within a target interval instead of a fixed point, and the target interval is changeable, so that flow mismatches can be tolerated, and users' requests can be accommodated more flexibly. The interval is about 0.25 m for the MRP. Results show that the canal system could respond to users' demands five times more rapidly, compared to the constant downstream depth method.
(2) The scheduling of delivery could be obtained by chartography from upstream to downstream successively. The operation is divided into four scenarios according to the possible combination of flow change of the check gate at the downstream end of the pool and volume change of the pool, and each scenario can be subdivided into two cases according to the change of diversion flow. In each case, the flow chart can be drawn based on the delivery method and the target. The start and end time of regulation of the check gate at the downstream end of the pool and diversions can be determined on the basis of volume balance principle. An improved real-time automatic control model is built for feedback control, in which the overall water volume upstream and downstream the pool is taken as the primary control factor, the water level of the local pool is taken as the secondary control factor, and the flow is taken as the third control factor. Results show that the developed model is robust and efficient. It can keep water level within the target interval during operation and reduce gate regulations by more than two times, compared to the traditional PID controller.
The expanded downstream depth operation method proposed could be popularized in long-distance water diversion projects with both supply-oriented delivery and demand-oriented delivery, which is under our investigation currently. Additionally, this paper assumes that the anticipated flow rate of different check gates is the same. Fur-ther researches would be done to obtain the rate for individual gate based on theoretical derivation.
Author Contributions: Y.W., Z.L., and H.H. contributed to the development of the operation method and control model. Y.W., L.L., and X.C. carried out the case study and analysis. Y.W. finalized the paper draft. All authors have read and agreed to the published version of the manuscript.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to data confidentiality agreement with the administrative bureau of the MRP.