1. Introduction
Urban water distribution systems (WDSs) are complex, mission-critical infrastructures that face significant operational challenges such as high energy use, head losses, and leakage driven by excess pressures [
1]. Accordingly, optimal pressure management is a primary means of reducing leakage and improving energy efficiency, typically implemented via pressure-reducing valves (PRVs) placed at strategic locations to regulate pressures at critical demand nodes [
1,
2,
3]. Real-time control (RTC) is required to maintain service levels (pressure/flow/quality) [
2,
4,
5], yet WDS dynamics are nonlinear, high-dimensional, and subject to parametric uncertainty (e.g., pipe roughness, time-varying demand, valve/pump characteristics), which challenges traditional control approaches [
1,
4].
Model predictive control (MPC) is a common RTC strategy, but it relies on accurate physics-based or state-space models whose development and calibration are costly and difficult on a large scale. Against this backdrop, data-driven approaches have gained traction. Data-Enabled Predictive Control (DeePC) is a method that offers a model-free paradigm that uses measured input–output sequences (historical data) to predict and optimize control actions [
4], leveraging the Fundamental Lemma [
4,
6] and a Hankel matrix representation constructed from the data [
7,
8,
9]. For WDS, DeePC naturally accommodates structural uncertainty and nonlinear behavior [
4].
Nevertheless, DeePC performance is sensitive to calibration choices, both algorithmic and system-level. On the algorithmic side, the formulation employs slack variables and regularization weights to balance tracking accuracy against robustness to noise and partial model information, so tuning these regularization weights is therefore critical [
4,
7,
9,
10]. On the data/system side, performance depends on the size of the historical data set, the initialization window, and the prediction horizon [
4,
8]. Moreover, on hydraulic boundary conditions, the placement of an internal PRV is a fundamental design factor that shapes nodal pressures and leakage potential [
2,
3,
5]. The optimal placement of pressure-reducing valves (PRVs) is a fundamental and challenging problem in water-distribution management, typically formulated as a mixed-integer nonlinear programming design problem [
1]. The optimization seeks to determine both the locations and the operating settings of the valves so as to maximize their effectiveness in reducing leakage and improving energy efficiency [
1,
5]. Installing a valve on any branch of the network can dramatically alter the overall hydraulic behavior [
1,
3], so placement should target points with the highest potential for pressure reduction in downstream subareas [
3]. Analyses indicate that employing multiple internal PRVs can achieve more effective pressure management than relying on a single boundary PRV, since distributing valves provides larger pressure margins for leakage control within the monitored areas. Conversely, a suboptimal valve location may leave many critical nodes outside the control region of the existing valves [
2], thereby directly impairing the system’s ability to meet the required pressure target and, indirectly, the performance of DeePC. In addition, the reservoir head sets the available energy and governs service levels. In systems experiencing failures (e.g., pipe or pump failures), reservoirs with sufficient stored volume can mitigate or even eliminate supply shortfalls. The effective network pressure directly determines the service level; if the pressure at a node falls below the service-head threshold, the delivered supply may decrease, and if it drops below the minimum-head threshold, supply may cease altogether. Empirically, the head and operational management of reservoirs exert a strong influence on overall network reliability [
11]. Accordingly, the performance of DeePC aimed at minimizing the pressure tracking error at a critical node is markedly affected by the system’s overall level of potential energy provided by the reservoirs. In online implementation, a key operational parameter is the control time step
, i.e., the frequency at which the optimization is updated. In online implementation, a key operational parameter is the control time step (Δ
t), i.e., the frequency at which the optimization is updated, as it is a critical factor in DeePC. Similar to MPC, DeePC operates in a receding-horizon manner: solving the optimization yields an optimal input sequence
over the prediction horizon
, yet only the first action of this sequence is applied immediately to the system. After Δ
t control steps (with
), the problem is re-solved by updating the most recent measurements
, thereby shifting the prediction horizon forward. Choosing
reduces the number of times online optimization is required and thus lowers the computational burden. However, the update frequency (
) must be selected in accordance with the system’s dynamics and feedback delay, if
is too large, the controller’s ability to react to changes in real time may be impaired. Therefore, a sensitivity analysis with respect to
is essential to determine the optimal balance between computational efficiency and the achieved control quality (MAE) [
4,
7].
Against this background, the present study aims to provide a comprehensive, practice-oriented sensitivity analysis of DeePC for pressure management in WDS, quantifying how network/system factors (topology/boundary conditions) and algorithmic choices (parameterization/update frequency) affect the mean absolute error (MAE) of the controlled-node pressure relative to a fixed reference. We systematically examine the following: (1) the impact of internal PRV placement on the hydraulic topology and controller benefit [
3]; (2) the effect of reservoir head on dynamics and control effort [
11]; (3) the effect of the control time step (online optimization frequency) [
4]; and (4) the effect of regularization weights
on the balance between accuracy and robustness [
7,
8]. The resulting insights support reliable and efficient deployment of DeePC for complex operational and optimization tasks in water networks.
2. Methodology
DeePC is a model-free control approach that enables real-time optimal decision making for unknown or uncertainty-affected systems, without requiring an explicit mathematical model. Unlike standard MPC, which relies on system identification and calibration of a state space model, DeePC uses raw input–output samples from the system’s history to predict future behavior and derive optimal control actions [
4,
7].
DeePC builds on Behavioral Systems Theory and the Fundamental Lemma of Willems et al. The Lemma states that, for a linear time-invariant system, the set of all possible trajectories can be spanned by a linear combination of past data, provided the data are persistently exciting [
12]. Accordingly, a Hankel matrix is constructed from an offline historical data sequence
of length
, and partitioned into “past” and “future” blocks:
where
supply the initialization information
, and
are used to predict over the horizon
. At each time step
, the algorithm solves an optimization problem to determine the decision vector
that links the most recent measurements
to the future input–output sequence
via the Hankel matrices. For water systems exhibiting nonlinearity and measurement noise, the standard formulation is extended to regularized DeePC. The problem minimizes a cost composed of reference-tracking error, control effort, and regularization terms:
subject to dynamic and physical constraints:
In Equations (2) and (3), and denote, respectively, the valve setting inputs (PRV head settings) and the monitored node pressure over the prediction horizon ; are the most recent samples (“past window”) used for initialization; is the behavioral mixing vector selecting a linear combination of past trajectories from the Hankel columns; and are slack variables that relax the past data consistency on the input and output blocks. The regularization weights act exactly where they appear in (2): promotes parsimonious, robust combinations (guards against overfitting to noise); penalizes deviations on the input-consistency block (e.g., actuation/excitation imperfections); and penalizes deviations on the output consistency block (measurement noise/model mismatch).
Offline, we collect a persistently exciting data record
of length
and assemble the Hankel blocks
. Before online operation, we select the hyperparameters
(initialization window) and
(prediction horizon), the control time step
, and the regularization weights
. Online, at each control instant, we measure/update
, solve (2) and (3) subject to bounds, and apply only the first input from the optimized sequence
; after
, the horizon is shifted (receding-horizon operation), measurements are refreshed, and the problem is re-solved [
4,
7].
The water-distribution systems used in the studies by Fossolo and Modena were obtained from the Water Benchmark Hub [
13,
14]. We first validated our control implementation by running DeePC on the Fossolo network under the same conditions reported by Perelman and Ostfeld [
4], expecting to reproduce their MAE values to a close approximation. All optimization problems in DeePC were solved with the Gurobi Optimizer (default settings). Hydraulic simulations were carried out in EPANET via EPyT (Python 3.11) [
15], and the DeePC framework was implemented using the public PyDeePC library following Coulson’s research [
7], which is also the code base used by Perlman and Ostfeld [
4]. After reproducing comparable results, we proceeded to develop and execute the sensitivity analyses.
Each run followed a two-stage DeePC routine, randomized data collection followed by closed-loop control. In all figures, the grey segment marks identification and the white segment marks control, both in the pressure plot and in the PRV setting plot. For each sensitivity setting, we re-collected a fresh identification dataset using the same randomized excitation with a fixed seed, and rebuilt the Hankel matrices; no identification data were reused across settings. Thus, DeePC was re-initialized under the conditions tested rather than transferred from a different operating point. The control input is the PRV opening (head setting), and the measured output is the pressure at the monitored node. Hankel matrices were assembled from the last samples of the identification phase. We note that alternative Hankel constructions exist in the literature, but we kept this choice fixed across scenarios to ensure fair comparisons. We used the same randomized excitation with a fixed seed in every setting, and identification data were re-collected per setting, which reduces scenario variance while introducing a mild seed dependence (observed as small MAE deviations across seeds, without altering conclusions). Unless otherwise specified by a sensitivity test, the baseline settings were as follows: time step = 1 [h], identification window = 48 [h], prediction horizon = 12 [h], closed-loop control phase duration = 1 week, and the data-collection phase comprised 600 steps. The performance metric is MAE [m] of the monitored node pressure relative to its reference value, computed over the control window only.
In the Modena case study, in addition to MAE, we report two complementary performance indicators computed over the closed-loop control window only. Let
index the control samples, let
denote the monitored node pressure, and let
denote the fixed pressure reference. Define the tracking error
. The MAE is
To capture worst-case tracking, we also compute the maximum absolute deviation from the reference:
To quantify valve actuation effort, consider
active PRVs in a given run (including both fixed and added valves, as applicable), and let
denote the valve setting command of PRV
at control sample
. We define the cumulative
actuation effort as the sum of absolute inter-sample changes across all valves:
For all sensitivity analyses except the test, actuation effort is reported normalized by the number of valves to enable fair comparison across scenarios with different numbers of PRVs. In the sensitivity analysis, where the number of control updates changes with the sampling rate, the valve actuation effort is additionally normalized by the number of control phase steps (equivalently, by the control duration in hours) to obtain a per-step/per-hour average actuation per valve. This prevents the summed effort from artificially increasing as decreases simply because more actuation increments are accumulated.
In the reservoir head sensitivity test,
intentionally perturbs the hydraulic boundary conditions; therefore, for sufficiently negative
, the 28 [m] reference at the monitored node may become hydraulically unattainable. In such cases, MAE is still reported as a consistent reference tracking metric, and the outcome is interpreted as a service-feasibility limitation rather than a controller tuning limitation. To allow for replication,
Table A1 in
Appendix A summarizes the baseline parameters that were kept constant throughout the run unless explicitly changed by a sensitivity test.
For pressure regulation from the sources, PRVs were added near the reservoirs in both networks, and baseline reservoir heads were explicitly modified relative to the Benchmark networks: Fossolo +14 [m] at the reservoir and in Modena +25 [m] applied to all reservoirs. In Fossolo, the reservoir adjacent valve acts as the fixed PRV (Valve 59), while Valve 58 is the tested PRV; it is substituted in place of each candidate pipe during the code run and evaluated as the additional PRV. In Modena, we did not attempt an exhaustive scan. Instead, we assembled a random informed subset of 54 candidate pipes as follows: (i) start from a uniform random sample; (ii) retain pipes that, in the baseline steady state snapshot, exhibited relatively high throughputs, non-negligible headloss, or a topologically strategic role (e.g., main trunks or inter-zone connectors); and (iii) force include the two pipes adjacent to the monitored node (274, 275) to enable a near-node comparison. Baseline EPANET flows/headlosses were used only for pre-screening and were not fed to the controller. The resulting set is representative but non-exhaustive; consequently, the reported “best” location is the best among those tested.
From the outset, all PRV installations were constrained to preserve the network’s original flow directions. To enforce this, at each iteration after positioning the PRV and executing the DeePC run, we inspected the flow sign along the tested pipe over the entire run. If the flow remained zero or negative and did not change sign during that run, we reversed the valve orientation and re-ran the case, thereby restoring a positive, physically admissible flow consistent with the original direction. Installing a PRV against the prevailing flow effectively blocks the pipe and may impair the operation of the DeePC controller. In Fossolo, no sign changes occurred during runs; in Modena, some pipes did show sign changes within a run, and at this stage of the study, such pipes were excluded from analysis and conclusions.
Beyond analyzing additional valve placements, three sensitivity studies were performed, holding all other settings fixed under the same control protocol: (1) control time step—runs at several steps while keeping the number of identification steps identical and the total control duration identical; (2) reservoir head offsets—in Modena, a uniform
was applied to all reservoirs relative to baseline, and DeePC was re-run under otherwise identical conditions; and (3) regularization weights (“lambdas”)
(measurement slack),
(penalty on the mixing vector), and
(actuation change smoothing). The search ranges for the lambdas followed Coulson’s guidance [
7] and were scanned on a logarithmic grid, at each stage one weight was varied while the other two were held constant, and the roles were then cycled. Given this coarse “one factor at a time” sweep (three logarithmically spaced levels per weight), the analysis provides a local indication only and does not warrant inference about global linear or non-linear trends.
4. Discussion
Prior work using optimization algorithms has established that optimally locating pressure-reducing valves (PRVs) can be crucial for regulating pressures in water distribution systems, reducing leakage, and even enabling energy savings (and recovery) [
1,
5]. Motivated by these findings, we examined how PRV placement interacts with the DeePC method and whether different PRV locations can improve its performance. The analyses on the two networks, Fossolo and Modena, show that adding a PRV can substantially improve tracking of the pressure reference at the monitored node; however, the benefit depends strongly on the added valve’s location and on the local hydraulics.
In the Fossolo network (
Figure 1), there was a tendency for topologically closer locations to the monitored node to yield a lower MAE, both when Node 21 was monitored and when the experiment was repeated with Node 15. Still, exceptions were observed, hinting at the role of dominant flow paths. To prove this, we tested two simple indicators: the pipe flow magnitude and the pipe headloss where the PRV was installed. Neither exhibited a clear relation to the resulting MAE, suggesting that dominant paths are not captured by these indicators alone.
In the Modena network (
Figure 5), the “closeness” pattern did not persist. The best location was found not at the pipe closest to the monitored node but rather near one of the reservoirs, consistent with the first placement identified by the algorithm reported by Price et al. [
3], where the added valve exerted significant control over a large sub-network with downstream surplus pressures. By contrast, locations immediately adjacent to the monitored node (Pipes 274 and 275) did not outperform the baseline. This reinforces that there is no universal rule for PRV placement. To find a DeePC-enhancing location, one must run a brute force search on small networks or rely on an external optimization procedure on larger ones. In addition,
Table 1 compares the baseline Modena configuration to the best-performing configuration with one additional internal PRV (Pipe 312). The added internal PRV improves the primary tracking metric, reducing MAE from 2.19 [m] to 2.02 [m]. However, this improvement is accompanied by a higher valve actuation effort and a slightly larger maximum deviation, indicating a clear trade-off between average tracking accuracy and control effort and occasional excursions. A plausible explanation is that introducing an additional degree of freedom allows DeePC to “work harder” (more frequent/larger adjustments distributed across valves) to reduce the average error, even if it does not simultaneously reduce peak deviations.
Figure 3 further indicates that when two valves operate simultaneously, one valve may become dominant while the other remains nearly wide open with little effect. In the worst Fossolo case, the original reservoir valve was mostly at high settings (i.e., largely open), whereas the added valve governed most of the control action, leading to less stable tracking and a higher MAE. This observation is consistent with Price et al. [
3], who underscore the strategic importance of the reservoir-adjacent valve for pressure regulation, as a nearly fully open reservoir valve effectively mimics the absence of a regulating valve at that location. The Modena comparison in
Table 1 is consistent with this interaction perspective, adding an internal valve can shift and intensify the control action rather than simply “adding regulation for free,” which helps explain why lower MAE may coincide with increased actuation effort.
Regarding controller parameters, a shorter control time step consistently improved performance. Reducing the step increases the number of control iterations within a fixed window, as seen in
Figure 7, and convergence to the reference within the window is faster for smaller steps. Consequently, the MAE, an average over the control window, puts greater weight on the many post-convergence samples (with smaller oscillations) as the step decreases. A similar monotonic trend is also observed for the valve actuation effort: as the time step increases, the actuation effort increases as well (
Figure 8). This is consistent with the valve and pressure trajectories in
Figure 7, where after convergence the pressure fluctuations reduce, and the control actions become more stable; therefore, using a smaller step effectively yields a larger portion of post-convergence “steady” samples within the fixed window, which reduces both the averaged tracking error and the averaged actuation effort. Notably, the maximum deviation remained identical across all tested time steps (7.8 [m]). This supports the interpretation that a single “worst” transient segment occurring early in the control phase dominates the peak error, while the remainder of the window becomes progressively less oscillatory. As a result, changing
primarily affects the average metrics (MAE and actuation effort) through the growing proportion of post transient samples, but does not increase the observed peak beyond that early worst-case value. Based on this behavior, we anticipate that continued reductions in the time step will approach a practical error floor at which the MAE stabilizes. In our sampled range, both MAE and actuation effort exhibit an approximately linear trend with the time step (
Figure 8). Interestingly, the MAE improvement across the examined steps was approximately linear (
Figure 8), which is notable because the time step is an algorithmic choice in DeePC rather than a network-specific characteristic.
Reservoir head levels had a particularly strong effect (
Figure 9 and
Figure 10a,b). The sensitivity analysis shows that the available hydraulic energy at the sources directly impacts control quality and MAE at the monitored node. In line with Wagner et al.’s results on service-level criteria and head sufficiency at supply nodes [
11], insufficient head leads to degraded service, which manifests as worse control performance. In
Figure 10a, increasing the head relative to baseline improved tracking up to an apparent plateau between +25 and +30 [m]. Conversely, large decrements severely degraded performance due to a lack of “hydraulic power.” These results stress the need to calibrate the system before running DeePC so that the controller is assessed under meaningful operating conditions. The non-monotonic behavior seen for −15 [m] and −10 [m] (
Figure 9b,c), a drop, then a rise, stems from the network lacking sufficient head to drive flow to the monitored node. The measured pressure exhibits very small oscillations tightly near the 28 [m] reference from below.
Figure 9a shows a related case where the pressure does not approach the reference at all. Altogether, these findings indicate a practical improvement limit and the importance of calibrating reservoir heads prior to control. In addition to MAE,
Figure 10b complements the interpretation by reporting maximum deviation and valve actuation effort. Unlike the largely monotonic MAE trend (
Figure 10a), these two metrics do not exhibit a single clear monotone pattern across
. For the most negative offsets (and around −5 [m]), the maximum deviation becomes relatively large, consistent with a “struggle” regime in which the controller attempts to compensate for insufficient hydraulic head. Importantly, the relatively low MAE observed at −15 and −10 [m] should therefore be interpreted cautiously, as, despite low average error, the pressure can remain “stuck” near the reference from below due to head insufficiency, so the MAE may reflect a constrained operating point rather than genuinely improved controllability. For positive offsets, the decrease in maximum deviation from about −5 [m] toward higher heads is consistent with easier regulation as more head becomes available; however, beyond roughly +30 [m], the actuation effort curve suggests a shallow optimum rather than a strict plateau, with the lowest effort occurring around the +30 [m] case and a slight increase thereafter. This indicates that while higher heads can improve MAE, they do not necessarily minimize control effort, and a practical operating point may be better selected by balancing the three metrics. Finally, the actuation effort metric appears most informative once the valves begin actively modulating (rather than remaining near a saturated “mostly open” behavior under severe head deficit), which is consistent with the time series behavior in
Figure 9.
Finally, the tuning of regularization weights modestly affected performance compared to the other sensitivities. Good operating points were found, but no dramatic changes between neighboring values. Following Coulson et al. [
7], we selected the tested ranges, and, within them (
Figure 11a–c) we observed the following: (i) higher λᵧ improved tracking; (ii) a relatively small λ
g yielded the lowest MAE, while larger values degraded performance; and (iii) for λ
u, there was an interior best value, with too small or too large values worsening MAE. The meaning of these choices follows the guidance in Coulson et al.’s work [
7]. In
Figure 11a–c, the same qualitative conclusion holds for the maximum deviation, which shows similarly mild sensitivity, indicating that pressure oscillations are not strongly amplified by neighboring regularization settings within the tested grid. In contrast, the valve actuation effort exhibits a clearer dependence on the regularization weights, suggesting that the tuning primarily changes how “aggressively” the controller uses the valves rather than fundamentally altering the achievable tracking quality. This is consistent with the role of the regularizers, particularly λ
u, which directly penalizes the control sequence and therefore affects how strongly the optimizer modulates the PRVs, while λᵧ and λg can also influence effort indirectly by changing the preferred trajectory fit and the regularization of the DeePC decision variables [
7]. Across the sampled combinations, some cases show overlap between the best-performing settings of different metrics (as indicated by the green-highlighted markers per metric), but this is not systematic in such a sparse grid. Overall, these results suggest that once reasonable ranges are selected (per Coulson et al. [
7]), the final choice of regularization weights may benefit from placing additional emphasis on valve actuation effort, which appears more discriminative here, while acknowledging the inherent trade-off between the three objectives. A broader and denser sweep would be needed to confirm whether the observed overlaps persist and to identify robust multi-metric settings.
5. Conclusions
This study shows that DeePC performance in water distribution systems is sensitive to operating conditions and therefore should be preceded by baseline calibration of the system (especially reservoir-head conditions) to avoid biased, artificially bounded, or unreliable outcomes and to realize the controller’s potential. Across the sensitivities we examined, PRV placement, control time step, reservoir head, and regularization weights, we observed performance gains when an additional PRV was placed at favorable locations, the control time step was reduced, and the reservoir head was sufficient to supply the required hydraulic power. The tuning of regularization weights had a measurable but comparatively modest effect. The results should be interpreted as local, baseline-anchored sensitivities because we varied one factor at a time while holding the others fixed. Potential cross-factor interactions (e.g., , PRV placement) were outside the present scope and are a natural direction for future work. In addition to that, additional factors may also be relevant and warrant systematic investigation. We found that the sensitivity-driven improvements are not limited to MAE, depending on the operating condition, maximum deviation, and valve actuation effort, and can either improve alongside MAE or reveal trade-offs (e.g., improved tracking at the expense of higher actuation effort when adding an internal PRV). Across both benchmark networks, DeePC achieved repeatable closed-loop tracking of a fixed pressure reference using only measured input–output data and valve constraints, and its performance responded consistently to hydraulically meaningful changes. In Fossolo, several internal PRV placements reduced the baseline MAE, whereas unfavorable placements markedly increased the error, demonstrating that DeePC can both benefit from and diagnose structural controllability differences within the network. In Modena, the best tested candidate improved the baseline MAE, and time-step refinement yielded a consistent MAE reduction over the examined range. Moreover, consistent with the MAE trend under time-step refinement, the valve actuation effort decreased as the time step decreased, indicating that improved tracking was accompanied by less aggressive control action over the stabilized portion of the window. Reservoir-head offsets had a pronounced, physically interpretable effect: increasing heads improved tracking until a plateau, while negative offsets degraded performance. Finally, the comparatively modest spread observed under the tested regularization weight settings indicates that, once baseline hydraulic conditions are plausible, DeePC can deliver stable pressure control without requiring excessively delicate tuning. At the same time, the actuation effort metric was more sensitive than the pressure error metrics to changes in regularization weights, suggesting that once a reasonable range is selected, practical tuning can prioritize effort/operability without substantially compromising tracking. As a concrete next step, we propose an outer loop genetic-algorithm optimization that searches over candidate PRV locations, using DeePC-in-the-loop experiments to score each candidate and select the placement that minimizes the tracking error. Future work should also extend the performance assessment beyond a single monitored node by incorporating spatial service metrics (e.g., network-wide pressure compliance and spatial pressure variability) to ensure that improved local tracking does not come at the expense of degraded conditions elsewhere in the network.