Warped-Time Data-Driven Control for Fluid Networks with State-Dependent Delays

When a canal gate opens or a pump changes speed, the water downstream does not respond after a fixed lag. The lag depends on how deep and fast the water already is. Deeper, faster flow carries the disturbance sooner. Most predictive controllers with mathematical safety guarantees assume the opposite: a fixed time step and dynamics that are linear and time-invariant, meaning that scaled and summed past responses predict future ones. This note proposes a simple change of clock. The controller measures time in units of "how long a wave currently takes to cross the reach" rather than in seconds. In that clock, the moving delay becomes nearly constant, and the system looks much closer to linear. Existing data-driven predictive controllers with proven robustness can then be applied with guarantees that actually mean something.

The opportunity matters because fluid operators face the trade-off described in the valve-timing literature. Acting early and hard moves water quickly but overshoots, drawing down a pump's intake pool or setting off pressure oscillations. Acting gently is safe but slow. Today's tools either ignore the state dependence of timing, which is what linearized models and fixed-delay schedules do, or handle it with full nonlinear optimization that offers no usable guarantees across flow regimes. A clock change that restores near-linearity would let one dataset and one controller cover low-flow and high-flow operation together, with a checkable bound on how much nonlinearity remains.

Core Claim

The idea is to model travel time across a reach as a function of the measured state. Call it $\hat\tau(x)$, where $x$ is the current upstream depth and discharge. Controls are then issued on a uniform grid in the warped time

$$s(t) = \int_0^t \frac{d\sigma}{\hat\tau(x(\sigma))},$$

so one unit of $s$ always corresponds to roughly one wave crossing, whatever the flow. The central claim is empirical but sharply testable. In warped time, the map from gate or pump discharge to the controlled downstream level has a much smaller linear time-invariant defect than in real time. The defect is the residual left after the best fit of a future trajectory by a combination of recorded past trajectories. It is the quantity that the robust data-driven controller of Berberich et al. treats as bounded noise. That paper proves practical exponential stability of data-driven predictive control under bounded measurement noise, using terminal constraints and regularization. If the warped-time defect falls below the noise level that theorem tolerates, while the real-time defect does not, then a guarantee proven for linear systems carries over to a nonlinear transport system.

A further point is that stability in warped time transfers back to real time whenever $\hat\tau$ stays between known positive bounds $\tau_{\min}$ and $\tau_{\max}$. Real-time convergence rates are then the warped rates rescaled by at most $\tau_{\max}$, because $dt = \hat\tau\, ds$. State constraints such as freeboard limits and minimum pump submergence do not depend on time, so they are unaffected by the change of clock.

Grounding in Prior Work

Three papers motivate the warp, because each shows that timing is a smooth, low-dimensional function of state. Yan et al. simulate the Jiaodong diversion canal with a Saint-Venant model, the standard one-dimensional shallow-water equations. They find that pumping-station control time follows a power law in initial discharge and decays exponentially with depth. Koh et al. show at seven tide gauges that surge-raised water makes tides arrive early. Rabbani et al. show that leaving out the downstream weir relation produces delays of up to 0.6 hours before steady state. They also identify Manning roughness, the friction coefficient of the channel bed, as the parameter that matters most for timing. We use these results as evidence that $\hat\tau$ can be fitted from a few step tests. We do not use them as controllers.

Two lines of work constrain the design. Data-driven predictive control (DeePC) predicts future behavior directly from a matrix of recorded input-output data. The regularized version of Coulson, Lygeros and Dörfler interprets its regularization as worst-case robustness over a ball of nearby data distributions. Like Berberich et al., it rests on linearity. The research file records that this fails when superposition breaks. Our contribution is to shrink that failure, not to deny it. The Lyapunov results of Tang et al. and Hayat and Shang prove exponential stability of the full nonlinear equations under boundary feedback, but only near one steady state. Warped time is aimed at exactly the large regime changes those local proofs leave out.

The closest architectural relative is flat MPC with a convex safety filter (FMPC+SOCP). It makes a quadrotor linear through a change of output coordinates. We instead linearize approximately through a change of time coordinate, and we target infinite-dimensional transport. Greeff and Schoellig supply a useful precedent: parameterizing control over discrete windows of past and future inputs and outputs avoids differentiating noisy signals. Our warped Hankel windows inherit that benefit.

Research Program

The work has four parts.

First, we estimate the clock. We fit $\hat\tau$ in two ways. One is physical: the integrated inverse characteristic speed, roughly $\sqrt{gh}$ plus flow velocity, along the reach, using measured depth. The other is empirical: a power law or exponential fit to step-response arrival times, using Yan et al.'s 1%-to-99% arrival definition. We will compare the two.

Second, we resample and test linearity. We collect one persistently exciting input-output record spanning low to high discharge. We resample it on the uniform grid in $s$ and measure the LTI defect: the singular-value spectrum of the warped Hankel matrix beyond the expected system order, and held-out prediction error. We compare this with the same record in real time.

Third, we build the controller. We run the Berberich robust DeePC in warped time, with the defect bound inserted as its noise bound. A real-time scheduler converts warped steps into gate commands.

Fourth, we transfer to a pressurized system. As an exploratory second domain, we use the high-pressure fuel-rail problem of Zhu. There, bulk modulus rises quadratically with pressure, so both response speed and wave speed $\sqrt{E/\rho}$ depend on state. We warp by the pressure-dependent time constant and ask whether a single controller replaces the hand-tuned valve opening time.

Baselines

The naive reference point is a fixed schedule. For the canal, the downstream pump changes discharge at the same moment as the upstream gate, with no timing compensation. For the fuel rail, we use the constant opening duration of 0.754 ms that Zhu found reaches 150 MPa in about 4000 ms. That is the only reported number for this benchmark, and it is what we must beat on settling time without exceeding its overshoot. For the canal, no reported result was found on Lacuna for closed-loop controllers on the Jiaodong G1–P1 reach. Our baselines therefore define the comparison.

The physically strongest classical competitor is the two-degree-of-freedom scheme that Rabbani et al. recommend but did not build. It combines their flatness-based feedforward, including the weir boundary, with boundary PI feedback of the kind Tang et al. prove locally stable. It uses the same simulator and the same roughness error. Its PI gains are tuned under the same number of closed-loop trials we use to select DeePC regularization.

The strongest data-driven competitor is regularized DeePC in real time (Coulson et al.). It uses the identical data record, horizon in seconds matched to our horizon at median flow, and regularization swept over the same grid.

The strongest model-based competitor is linear MPC with a delay schedule. Its transport delay is looked up from $\hat\tau(x)$ at each step, but it keeps a fixed sampling period and a single linear model. Full nonlinear MPC on the discretized Saint-Venant model serves as a performance ceiling, with its solve time reported.

Two ablations isolate the key ingredient. In the first, the clock is warped with a constant $\hat\tau$, which recovers real-time DeePC with resampling artifacts. In the second, it is warped with an oracle $\hat\tau$ computed from the true simulator state. Beating a baseline means fewer constraint violations at matched delivery time and a lower integrated level error. For the guarantee claim specifically, the warped defect must fall below the tolerated noise bound where the real-time defect does not.

Why not just…?

Why not just use linear MPC with a scheduled delay? This is the real threat. If varying the delay in a fixed-step linear model works as well, the clock change adds little. Two things could separate them. The first is that changing the clock also rescales the internal diffusion and storage dynamics, not only the pure delay. The second is that a single linear model with a time-varying delay has no stability proof across switches. We will measure both closed-loop performance and the residual nonlinearity of each approach. If delay-scheduled MPC matches warped DeePC on Jiaodong-like transients, we will report that, and the contribution narrows to the guarantee.

Why not just run full nonlinear MPC on the Saint-Venant model? It will probably track best. But it needs the roughness value that Rabbani et al. identify as the dominant source of timing error. Its solve times on long reaches limit how often it can replan. It also inherits no recursive-feasibility guarantee across regimes. We will report it as a ceiling, including runs with mistuned roughness.

Why not just add PI feedback to flatness feedforward? That is our strongest classical baseline. PI reacts only after an error appears and cannot enforce freeboard or submergence limits. Yan et al. show that in narrow canals, delayed reactions exhaust the available storage. The narrow-channel and large-step experiments will show whether that failure appears.

Why not just collect more data for real-time DeePC? More data does not restore superposition. The four-tank results of Berberich et al. show that unconstrained data-driven control diverged even at a noise bound of 0.002 with 400 samples. A larger structural defect will make this worse. Our defect-versus-data-size curves will test whether the real-time defect plateaus while the warped defect keeps falling.

Proposed Experiments

The testbed is a full nonlinear Saint-Venant solver: SIC as used by Rabbani et al., or a Preissmann-scheme implementation following Yan et al. It is configured with Jiaodong G1–P1 geometry, a downstream weir, and narrow and wide cross-sections. Scenarios are discharge steps of increasing size around the nominal flow, unmeasured lateral inflows, and roughness mismatch of ±20%. The secondary testbed is Zhu's 100→150 MPa fuel-rail benchmark. The four-tank system serves as a sanity check that the warp reduces to identity when delays are constant.

Metrics are the LTI defect, which carries the guarantee claim; peak and integrated deviation of the pump intake level; counts of freeboard and submergence violations; time to deliver the new discharge; solve time; and, on the fuel rail, settling time and overshoot.

The decisive check is a single plot of LTI defect against step size, in real versus warped time, with the theoretical tolerance line overlaid. If the warped curve stays below the line over operating ranges where the real-time curve crosses it, and closed-loop violations follow the same split, the claim holds. If the oracle-clock ablation shows the warp gives little benefit even with perfect timing knowledge, we will abandon the idea.