February 2026 · 12 min read · Technical

How AI Optimizes Irrigation Schedules

How automatic differentiation through soil and hydraulic simulators enables gradient-based optimal scheduling. A look at what makes physics-based irrigation different from rule-based approaches.

In plain English: This article explains how we use calculus-powered physics simulations (a "digital twin" of your irrigation system) to automatically find the best watering schedule. Instead of rules like "water for 10 minutes if the soil is dry," the system simulates exactly how water moves through your soil under different weather conditions and mathematically optimizes every zone's schedule simultaneously. The result: 40-50% less water with healthier turf.

Most "smart irrigation" products use rules: if soil moisture drops below X%, turn on valve Y for Z minutes. These rules are hand-tuned, single-variable, and fundamentally unable to find globally optimal schedules across dozens of zones with interacting hydraulic constraints.

We took a different approach: make the entire physics chain differentiable, then let gradient-based optimization find the best schedule.

This article explains what that means, why it matters, and how it works.

The Core Idea

Imagine you could ask the question: "If I add one more minute of watering to Zone 7, how much would crop stress decrease across the whole site tomorrow?" To answer that precisely, you need to trace the chain of physical causation:

  1. More water applied to Zone 7
  2. Soil moisture increases (Richards equation)
  3. Root uptake changes (FAO-56 stress model)
  4. Crop stress decreases
  5. But also: pressure at other zones changes (hydraulics)
  6. And: more pump energy is consumed

The gradient dL/du (derivative of the loss function with respect to the control input) captures all of this in a single number. If we can compute this gradient efficiently, we can use standard optimization algorithms (Adam, L-BFGS, etc.) to find the optimal schedule.

Forward Pass (Simulation)
Controls u(t)
Soil Physics
Stress Model
Loss L
↓ ↑
Backward Pass (Gradients)
∂L/∂u
∂L/∂θ
∂L/∂Ks
∂L/∂L = 1

This is the same pattern used in deep learning (backpropagation), but instead of neural network layers, our "layers" are physics equations: Richards equation, Penman-Monteith ET, van Genuchten soil parameters, and pipe network hydraulics. This approach falls under the broader field of differentiable physics, which applies automatic differentiation to physical simulators.

The Physics Stack

Layer 1: Evapotranspiration (Penman-Monteith)

The FAO-56 Penman-Monteith equation calculates reference evapotranspiration from weather data:

ET₀ = [0.408Δ(Rn-G) + γ(C/(T+273))u₂ · VPD] / [Δ + γ(1+0.34u₂)]

Every variable in this equation has an analytical derivative. For instance, ∂ET/∂T depends on the slope of the saturation vapor pressure curve, which itself is a smooth function of temperature. We compute all six partial derivatives (∂ET/∂Rn, ∂ET/∂T, ∂ET/∂u2, ∂ET/∂VPD, ∂ET/∂γ, ∂ET/∂Kc) analytically.

Layer 2: Soil Water Dynamics (Richards Equation)

The Richards equation governs water movement in unsaturated soil:

∂θ/∂t = ∂/∂z [K(θ) ∂ψ/∂z] + ∂K/∂z - S(z,t)

where θ is volumetric water content, K is hydraulic conductivity, ψ is matric potential, and S is the root sink term (plant water uptake).

We solve this with an implicit finite-difference scheme (backward Euler). The key challenge for differentiability is that K and ψ are nonlinear functions of θ via the van Genuchten model:

θ(ψ) = θr + (θs - θr) / [1 + (α|ψ|)n]m

These functions are smooth and differentiable everywhere, which means the entire Richards solver can be differentiated through. We implement analytical derivatives for every van Genuchten function:

  • ∂θ/∂m - how water content changes with pore distribution parameter
  • ∂θ/∂n - includes both direct and indirect (through m=1-1/n) effects
  • ∂K/∂m and ∂K/∂n - how conductivity changes with soil parameters

Why analytical derivatives matter: Finite-difference gradients (ΔL/Δu) require N+1 forward simulations for N controls. With 50 zones and 288 time blocks (24h at 5-min intervals), that's 14,400 simulations. Analytical gradients via backpropagation compute the same information in ~2x the cost of a single forward pass.

Layer 3: Crop Stress (FAO-56 Water Stress)

The FAO-56 stress coefficient Ks reduces transpiration when soil dries beyond the management threshold:

Ks = (TAW - Dr) / ((1 - p) × TAW)

where TAW is total available water, Dr is root zone depletion, and p is the depletion threshold. This is a piecewise linear function of θ, which is differentiable almost everywhere (and we use a smooth approximation at the breakpoint).

Layer 4: Multi-Component Objective

The loss function balances competing goals: minimize crop stress, minimize water use, minimize energy, and produce a schedule that's physically realizable (valves can't flicker on and off every second, and the pipe network has finite capacity). Each term is differentiable, so the gradient ∂L/∂q tells the optimizer exactly how to adjust each zone's allocation to improve the overall objective.

From Continuous to Discrete

The physics gives us gradients over continuous water delivery rates — but real valves are either open or closed. Bridging that gap is one of the harder problems in irrigation optimization. Our approach uses the continuous gradients to inform a discrete scheduling step that respects hydraulic constraints, minimum run times, and pipe network capacity. The result is a minute-by-minute valve schedule that's both physically valid and close to the continuous optimum.

Stochastic Extension: CVaR Optimization

When ensemble weather forecasts are available (e.g., NOAA GEFS with 30 members), the optimizer extends to a stochastic formulation:

minu (1-λ) · E[L(u, ξ)] + λ · CVaRα[L(u, ξ)]

where ξ represents the weather scenario, λ controls the risk aversion, and CVaRα is the expected loss in the worst α% of scenarios (typically α=10%).

The optimizer finds a schedule that performs well on average and avoids catastrophic outcomes when the forecast is wrong.

Practical impact: In simulation benchmarks, the stochastic optimizer uses 5-8% more water than a perfect-information solution, but eliminates the tail risk of severe crop stress. This is analogous to buying insurance - a small premium for significant downside protection.

Implementation Details

Edge Deployment

The entire optimization runs locally on a small edge computer. A typical 50-zone, 24-hour optimization completes in under 60 seconds. No cloud dependency — the system continues operating if internet connectivity is lost.

Why This Matters

The differentiable physics approach has several advantages over both rule-based systems and black-box ML:

  1. Physical guarantees: The optimizer respects conservation laws (water balance, energy balance) by construction, not by training.
  2. Sample efficiency: No training data required. The physics provides the "training signal" through exact gradients.
  3. Interpretability: Every decision can be traced to a physical cause. "Zone 7 ran for 8 minutes because its soil moisture was projected to drop below the stress threshold at 2pm given the forecasted 90°F temperature."
  4. Generalization: Works on any site with known soil parameters and equipment layout. No need to collect site-specific training data.
  5. Uncertainty quantification: The stochastic extension provides principled uncertainty handling, not ad-hoc "add 10% buffer" rules.

Further Reading