ABSTRACT
This work proposes a stochastic model predictive control for an irrigation canal with uncertainties where a moving robot takes measurements across the canal considering criteria such as the robot’s velocity, energy consumption, and distances between the measuring spots. Tightened constraints are applied over the prediction horizon to the optimization so that the controller selects the optimal route for the robot from a control viewpoint. The simulations compare three different approaches, demonstrating that the proposed technique achieves superior results by reducing constraints violations and operational costs and ensuring more precise and reliable water level management across the canal compared to other methods.
HIGHLIGHTS
It proposes a control strategy that optimizes the operation of the water canal by considering predictive modeling and addressing uncertainties and constraints.
The method employs a moving robot to take measurements at important spots of the irrigation canal.
It involves planning the movement of the robot.
The approach is useful in case of the low price of the deployment and maintenance of such a network.
INTRODUCTION
Water systems must allocate the available water resources to provide farmers with water while keeping the level of each pool close to the set points (Segovia et al. 2019; Ranjbar et al. 2022; Shahverdi et al. 2022).
In this regard, there are challenges as the uncertainties arising from external disturbances, e.g., the inflows and human activities (Van Overloop et al. 2008), the errors of water level or flow measurements (Alam & Bhutta 2004), and modeling potential inaccuracies (Muleta & Nicklow 2005).
Many automation strategies have been proposed for water systems, e.g., model predictive controllers (MPCs), PID controllers, and linear quadratic regulators (LQRs) (Lozano et al. 2010; Kakouei et al. 2019; Hosseini Jolfan et al. 2020). In particular, MPC has demonstrated significant performance in the field of water systems management compared to other methods (Fele et al. 2014; Rodríguez et al. 2017; Segovia Castillo et al. 2018; Segovia et al. 2019; Pour et al. 2022). It is an optimization-based control strategy that uses a process model to predict the future behavior of a system for a certain prediction horizon while managing challenging issues such as constraints and delays (Figueiredo et al. 2013). In the case of irrigation canals, this approach requires a model of the canal dynamics and a forecast of future water demands. The model is employed to formulate an optimization problem, yielding the most efficient series of actions applicable to the system, guided by a performance index that aligns with operational objectives, such as maintaining the water level close to the designated set points (Ouarda & Labadie 2001; Geletu et al. 2013; Grosso et al. 2014; Velarde et al. 2019). Also, to deal with random disturbances in the system evolution, stochastic MPC (SMPC) has been introduced (Van Overloop 2006; Cannon et al. 2010; Nasir et al. 2017). One particular approach within the SMPC family is that of Chance-Constraint (Schwarm & Nikolaou 1999), which uses probabilistic information about additive disturbances to achieve a trade-off between constraint satisfaction and control performance (Cannon et al. 2012). Considering the stochastic features of the uncertainties, the method can set the frequency of constraint violations to be lower than a specified threshold (Dai et al. 2016).
To operate irrigation canals, sensors are needed to provide measurements, e.g., of water levels and flows (van de Wiel et al. 2020; Hamdi et al. 2021). Maintaining these sensors is costly and requires effort as they are prone to deterioration due to extreme weather conditions (Maestre 2021). In this regard, this work considers using a robot as a substitute for sensors. In particular, it is assumed that the robot can move freely around the system to capture measurements at different spots and transmit this information back to the controller. In areas where the robot is absent, the system model is used to provide the values following an unknown input observer (UIO) approach (Chen & Saif 2006; Conde et al. 2021). Additionally, the MPC algorithm also needs to consider the robot’s velocity, battery, energy consumption, recharge, and the maximum distance between the spots to determine the robot routes.
Several studies have explored the use of robotic data collection methods. In the agricultural field, Tokekar et al. (2016) employed small and affordable unmanned aerial vehicles (UAVs) and unmanned ground vehicles (UGVs) together to collect soil data. Another study investigated the allocation of measurement tasks to multiple robots in a solar thermal plant (Martin et al. 2021a). Furthermore, in the same domain, Martin et al. (2021b) studied how the robot sensor network (RSN) can be managed to collect information for the control system while also updating the probability of coverage in specific areas of the solar field to direct the robots to locations where information collection was maximized. In Wang et al. (2016), a solution is proposed including a mobile robot and a path generation system to direct the robot’s movements, taking into account the robot’s expected deployment time, expected measurement value at each location, and the last time each location was visited. Most of the previous research regarding using mobile robots to monitor the water systems has focused on managing water quality (Von Borstel et al. 2013; Shademani et al. 2017; Anderson et al. 2022a, 2022b); however, the main contribution of this paper is employing a moving robot in a water canal that takes measurements of water levels at specific locations and the focus is exclusively on the water regulation problem. The fact that irrigation canals are exposed to external disturbances and retain random uncertainty motivated the development of a stochastic MPC to plan the movement of the robot. The objective can be achieved by reducing constraint violations through tighter constraints and improved control performance.
Preliminary research of the current work has been presented in Ranjbar et al. (2023). By addressing the identified gaps and limitations of this paper, the new study contributes to novel perspectives in this field. We apply the existing strategy to an extended model of the canal, rather than a portion of it. Additionally, the functional features of the robot have been taken into account, enhancing the practicality of our work. The current investigation incorporates parameters such as battery level and maximum velocity, which impose restrictions on the robot’s possible routes. Furthermore, the consideration of idle time necessitates an energy recharging period as an additional limiting factor. Finally, the current work updates the computation of uncertainty propagation along the prediction horizon.
The rest of the paper is organized as follows: Section 2 describes the system and the problem statement. In Section 3, the stochastic MPC framework and its interaction with the moving robot are explained. Simulation and results are presented in Section 4, followed by concluding remarks in Section 5.
PROBLEM STATEMENT
In this work, the Integrator-Delay (ID) model (Litrico & Fromion 2004) is employed to represent the dynamics of open-channel irrigation canals. This simplified model captures key hydraulic processes such as flow propagation, attenuation, and backwater effects, providing an accurate approximation of the Saint-Venant equations in both frequency and time domains. The ID model explicitly incorporates the influence of canal geometry, hydraulic structures, and physical parameters, enabling effective control design. The model accounts for variations in water levels based on upstream and downstream flow rates
and
, the backwater surface area
, and the delay time
, critical for managing irrigation systems.
























Stochastic disturbances and constraints
The amount of water in the canal system is affected by uncertain factors and modeling errors such as precipitation and hydrological run-off process parameters (Van Overloop et al. 2008), increasing the probability of constraint.




























Planning the robot’s movement
The system is considered as a graph with
a set of measurement spots (where N is the last spot) and
representing a set of edges such that
when there exists a direct route between
and
. To employ a robot to take measurements of water level at different spots, a route
has to be calculated from location
. A route is a sequence of edges
connecting a set of vertices to each other (Van Overloop et al. 2015). If the robot visits location
at time step k, a measurement is sent to the controller, so that
; otherwise,
keeps growing, ultimately compelling the robot to return to the specified location at a later time through the tightening of the constraints.














To compute the tightening parameters, the Gaussian variable is converted into a normalized Gaussian
. Then, its Cumulative Distribution Function (CDF) is employed to set how each limit is updated. Finally, let us denote the set of tightened constraints that correspond to route
by
.
PROPOSED ALGORITHM


Remark 1.Equation (18) emphasizes that the state constraints depend on the route by the fact that uncertainty grows with the number of time steps elapsed since the robot’s last visit.
The proposed approach followed at each time instant takes the form of Algorithm 1.
Algorithm 1 Online Calculations, Executed at Every Time Step k, k∈Np During the Sampling Time Ts
Require: The robot's initial position, distance to the next segment, the robot's initial battery, the robot's energy consumption for each unit of distance, the robot's battery recharge for each sampling time, and the robot's fixed velocity.
Ensure: the current state x(k) in (6)
1: Compute the current robot's battery
2: Compute the set of possible routes
3: for eachdo
4: Define the set of tightened constraints according to
and
5: Update the robot's battery
6: Compute J through MPC in (14)
7: end for
8: Select the optimum routes with the minimum J
9: Apply
10: Recompute MPC for the next time steps.
Initially, the desired segment (reach) from which the robot should start traveling is selected. The starting spot for the robot may be arbitrarily chosen, with the option to commence from the beginning, middle, or end of the canal to undertake the measurements. This decision can be made based on various factors, such as the nature of the canal, accessibility, and the specific objectives of the measurement.
Following this, the system incorporates noise in the form of a vector containing the mean of each reach, denoted by , and the variance of disturbance represented by
. Thus, by having the disturbances following the normal distribution, the current state
is computed by employing Equation (6).
After specifying the robot’s velocity, the maximum distance it can traverse is calculated as , where
represents the distance limit that the robot can cover,
denotes the velocity of the robot, and
corresponds to the sampling time. Next, the battery of the robot can be calculated for each route. To do so, the new battery level is determined by adding the current amount of battery to the amount of battery recharged and then subtracting the energy consumed during the distance traveled, which is multiplied by the energy consumption rate. As mentioned in Section 2.2, the robot’s features play a crucial role in determining the total number of feasible routes for the robot. Consequently, the set of possible routes
is computed by taking into account the robot’s restrictions and conducting an exhaustive search with the reduced prediction horizon
.
Once all the possible routes have been identified, for each route, the constraints on states get tightened based on the selected and the variable
and there becomes a set of tightened constraints
. Additionally, at each sampling time, the robot’s battery gets updated and the cost
is computed through the MPC formulation.
When the costs are determined for all available routes, the routes containing the minimum cost are deemed as the optimal choice. Subsequently, the updated inputs are incorporated into the MPC framework, triggering the recomputation of the process for subsequent time steps until the end of the prediction horizon.
RESULTS AND DISCUSSION
For this research, a DJI-based drone, a type of unmanned aerial vehicle (UAV) known for its advanced capabilities and versatility, has been selected as the robot for the study. Given the total length of the canal, and the number of trips the robot is expected to make, its velocity is set to , as higher velocities result in greater energy consumption. The energy consumption for each unit of distance is considered to be the 0.003 state of charge (SoC), where SoC is a crucial indicator of battery condition determined by calculating the ratio between the remaining capacity and the total capacity of the battery (Sun et al. 2021). To this end, the initial battery of the robot is 40 SoC and the battery recharge is set to 2.5 SoC for each sampling time (Aguilar-López et al. 2022). Based on the fact that energy consumption is the product of distance traveled and energy consumed per unit distance, the total energy consumption for the drone can be calculated by multiplying the 9.5 km distance by the energy consumption rate of 0.003 SoC per meter. The flight time is determined by dividing the total distance by the drone’s velocity, resulting in an approximately 20-min duration for a round trip of 19 km. The energy recharge rate also gives the drone a good amount of energy recovery during the trip. Considering these factors – the energy consumption for the round trip, the drone’s flight time, and its recharge capabilities – the initial battery life of 40 SoC appears sufficient to successfully traverse the length of the canal. This setup ensures that the drone can complete multiple round trips while maintaining a reasonable margin of battery life for continued operation.









The MPC optimization problem is solved for every route of the robot applying quadratic programming (QP). Matrix has ones in the states corresponding to water levels and zeros elsewhere, while matrix
is likewise diagonal, assigning a value of 0.2 to each control action (each reach of the canal that the measurements are taken from). The constraints are tightened by assuming a maximum probability violation of 0.01 (
is selected to be 0.99). In order to assess the suggested methodology, two alternative algorithms are implemented in the system. One includes an MPC controller with a robot that moves sequentially following a predefined route that includes measuring all spots from the initial to the final point and then returning from the final point to the initial one (referred to as PR-MPC). The other method involves employing an MPC controller with classic constraints incorporating full system information (referred to as C-MPC). Our proposal is called the Optimal Route with Stochastic Constraints Model Predictive Control (SC-OR- MPC).
Water levels with stochastic constraints in proposed method (SC-OR-MPC).
Thus the proposed method for tightening the constraints enhances the controller’s ability to focus on the most uncertain states of the system. By tightening these constraints, the controller becomes more sensitive to potential deviations from the desired performance, which allows it to better prioritize areas of the system where uncertainty is the highest. As a result, the overall performance improves, as illustrated in Figure 5, where the PR-MPC method with tightened soft constraints (referred to as SC-PR-MPC) is shown. The tightening method reduces the discrepancy between the controller’s predicted and actual states, leading to fewer violations of the system’s constraints. However, despite this improvement, there is still significant room for further optimization. A key opportunity for enhancing performance lies in allowing the controller to autonomously select the measurement locations for the robot. By enabling the controller to decide where to gather data, it can maximize the utility of the robot’s measurement capacity and available battery life. This approach would ensure that the robot visits the most critical locations – such as gates or reaches that significantly impact the system’s overall performance – thereby optimizing the use of resources and improving the controller’s efficiency.
This concept is clearly demonstrated in Figure 6, which shows the results of the closed-loop system using the proposed SC-OR-MPC method. The figure highlights a notable improvement: While the two other methods assessed in the study result in multiple violations of constraints, the SC-OR-MPC approach reduces these violations to a single minor breach of a soft constraint (not a hard constraint) around time instant at Reach 1 (
). Furthermore, there is a much closer alignment between the belief states and the actual states, indicating that the controller is better able to estimate the system’s real-time conditions. The closer correspondence underscores the effectiveness of the tightened soft constraints and the optimized measurement strategy in improving overall system performance.
Table 1 presents the accumulated cost of the three assessed methods over the 100 time instants of the simulation. It also includes the results of a conventional MPC (C-MPC) controller with full state information, providing a reference of the loss of performance due to the absence of a fixed sensor network. Table 1 demonstrates that the proposed SC-OR-MPC method effectively compensates for the lack of a fixed sensing infrastructure. Despite not relying on a permanent sensor network, the proposed approach maintains performance close to that of the C-MPC controller.
Accumulated cost in the assessed approaches vs. conventional MPC with full state information
CostApproach . | Accumulated cost . | Relative cost to C-MPC (%) . |
---|---|---|
C-MPC | 26.68 | – |
SC-OR-MPC | 27.64 | 3.6 |
SC-PR-MPC | 100.02 | 274.9 |
PR-MPC | 441.84 | 1556.1 |
CostApproach . | Accumulated cost . | Relative cost to C-MPC (%) . |
---|---|---|
C-MPC | 26.68 | – |
SC-OR-MPC | 27.64 | 3.6 |
SC-PR-MPC | 100.02 | 274.9 |
PR-MPC | 441.84 | 1556.1 |
CONCLUSION
In this work, a moving robot in combination with a stochastic MPC is applied to the ASCE test canal. The canal is considered to have uncertainties and the moving robot is planned to move along the reaches and take measurements right at reaches. To do so, the movement of the robot is limited to its battery, velocity, energy consumption, and the distances it can travel. The controller selects the optimal routes for the robot by tightening the constraints at every sampling time of the prediction horizon. The performance has been evaluated by comparing the proposed algorithm with a classic MPC with no uncertainty and another proposal that assigns a robot moving through predefined routes. The outcome of this work highlights the favorable control performance of the proposed approach, in terms of economic efficiency compared to other approaches. Moreover, the method effectively compensates for the lack of a fixed sensor network infrastructure by providing essential information to the controller to minimize constraints violations. Considering the price of the deployment and maintenance of such a network, the proposed alternative based on a controlled robot that retrieves water level measurements should be fully taken into account in water management projects.
Future work will explore how this robot can be integrated with operators in the loop, enabling the benefits of model predictive control to be realized without the need for installing fixed actuators and sensors in the irrigation canal. Additionally, we aim to investigate reinforcement learning-based approaches and other methods like neural network-based controllers to enhance the adaptability and robustness of the control strategy, providing a richer comparative framework and deeper insights into the proposed method’s performance. Moreover, to address the computational complexity of the Exhaustive Search (ES) method, we plan to explore optimizations such as reducing the prediction horizon further and using heuristic methods to make the search more efficient for real-time applications.
FUNDING
This project received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation program (OCONTSOLAR, grant agreement no. 789051) and the C3PO projects corresponding to grant PID2020-119476RB-I00, and grant PID2023-152876OB-I00 funded by MCIN/AEI/10.13039/501100011033 and ERDF/EU. Additionally, it is supported by the Regional Council of Hauts-de-France. The authors gratefully thank these institutions for their support.
AUTHOR CONTRIBUTIONS
All authors contributed to the study’s conception and design. R.R. contributed to methodology, coding, data processing, validation, writing – original draft, writing – review and editing. J.G.M. contributed to coding, visualization, collected resources, writing – review and editing. J.M.M. contributed to supervision, coding, methodology, review and editing. L.E. contributed to resources. E.D. contributed to review and editing. E.F.C. contributed to review and editing.
DATA AVAILABILITY STATEMENT
All relevant data are included in the paper or its Supplementary Information.
CONFLICT OF INTEREST
The authors declare there is no conflict.