- The paper presents a unified, gradient-based framework coupling MPC with online parameter identification through differentiable simulators.
- It demonstrates the method on fluid simulations, achieving viscosity estimates within 1% accuracy and improved swimming efficiency under varying conditions.
- It extends the approach to particle accelerator control, showcasing rapid recovery and robust system tracking using high-fidelity, differentiable physics.
MPC and System Identification with Differentiable Physics: Fluid System and Particle Beam Control
Differentiable Physics in Model Predictive Control and System Identification
The paper presents a methodology for integrating model predictive control (MPC) and online system identification within complex physical systems, where models are available exclusively as differentiable simulators rather than explicit closed-form algebraic descriptions. The authors formalize a receding-horizon framework where both control and parameter estimation are coupled via automatic differentiation through high-fidelity numerical simulators. This paradigm shift allows for gradient-based joint optimization of control inputs and underlying physical parameters, permitting real-time adaptation in systems governed by computational physics models.
A notable architectural distinction is the use of a single shared differentiable model. Both the MPC rollout and the parameter update utilize gradients with respect to control and unknown parameters, thereby enabling simultaneous adaptation to nonstationary environments or online detection of unmodeled effects. This approach treats the simulator as an implicit computational constraint rather than a system of equations, rendering the methodology widely applicable to systems typified by PDE-governed dynamics or black-box computational pipelines.
Technical Framework
The proposed methodology addresses the full pipeline of estimation and control in discrete time. Dynamics are expressed in the form
xt+1​=f(xt​,ut​;ϕ,θ),yt​=h(xt​,ut​;ϕ,θ),
with ϕ denoting known model parameters and θ denoting unknown parameters estimated online. Formulations for input and state constraints, finite-horizon objectives, and prediction rollouts compatible with general infinite-dimensional discretized systems are assembled. All optimization is conducted via gradient-based methods, with gradients systematically computed by automatic differentiation through the simulator's forward pass.
State estimation is formalized using moving-horizon estimation (MHE) techniques, solving a consistency-constrained least-squares problem over a sliding window whenever the state is not directly measurable. Parameter identification is recast as simulation-based minimization of output mismatch over a buffer of historical input/output pairs. In both cases, the constraint-enforcing simulation is differentiated end-to-end, yielding exact sensitivities with respect to both the control and parameter vectors.
The iterative loop synchronizes three optimization processes—MPC, state estimation (if necessary), and online parameter identification—through their respective differentiable formulation. This coupling enables persistent adaptation as new data becomes available.
Fluid Dynamics Example: Swimmer Optimization in Complex Rheology
The methodology is instantiated in a two-dimensional fluid-structure interaction problem: a swimming elliptical foil in background flow, where both swimming gait optimization and fluid viscosity identification are carried out online. The state comprises discretized velocity and pressure fields, the controls are parametrized by Fourier coefficients governing heave and pitch, and the parameter to be estimated is the scalar viscosity η (or, in extension, multiple Carreau–Yasuda rheological parameters).
Gait policies are optimized for Froude-type swimming efficiency over long rollouts, using only net power measurements as observations (i.e., simulating realistic sensor readbacks). The system achieves strong identification performance, converging to within 1% of true viscosity within 4-10 control updates across three hyperparameter settings, while simultaneously increasing swimming efficiency from suboptimal initializations to E≈0.14, closely matching offline-optimized benchmarks (Figure 1).
(Figure 1)
Figure 1: Joint MPC gait optimization and viscosity estimation at Re=1,000; (a) shows swimming efficiency, (b) viscosity estimate, and (c) absolute power-prediction residual across three hyperparameter configurations.
The results elucidate the interplay between control adaptation and parameter identifiability: parameter estimation is naturally excited by non-stationary policies emerging from the receding-horizon control routine, mitigating a common decline in observability endemic to closed-loop adaptation. Persistent oscillations in efficiency after parameter convergence highlight challenges in nonconvex policy landscapes, optimizer hyperparameter sensitivity, and finite-horizon artifacts.
The fluid simulation backend leverages a differentiable JAX-based PDE solver, and the asynchronous optimizer design ensures separation between plant, controller, and parameter updater, mirroring typical hardware-in-the-loop deployment schemas.
Particle Accelerator Example: Differentiable MPC in Static Input-Output Mappings
The second example targets high-speed differentiable simulation within a particle accelerator beamline—modeled after the Isotope Production Facility (IPF)—using the Cheetah platform. Here, the system is static from a control-theoretic perspective, with control inputs as quadrupole magnet setpoints and outputs as beam size measurements at diagnostic checkpoints. Unknowns correspond to the incoming particle distribution's phase-space parameters.
The MPC routine propagates control sequences through the differentiable simulator, enforcing safety (diagnostic envelope) and soft constraint penalties on beam size, and utilizing windowed online parameter identification of initial beam conditions. The implementation confirms rapid feasibility recovery from initially unsafe beam states and stable convergence of both system tracking and identification objectives over eleven control iterations (Figure 2; Figure 3).
(Figure 2)
Figure 2: Quadrupole setpoint values (top) and beam size measurements (bottom) over 11 time steps; the optimizer steers the beam rapidly from infeasible to target-safe configurations.
(Figure 3)
Figure 3: Loss curves for (top) the differentiable MPC control optimization and (bottom) the parameter identification subproblem over the initial 5 steps.
These findings underscore the practicality of gradient-based MPC in non-algebraic, high-fidelity accelerator models, and the effectiveness of simulation-constrained parameter identification at tracking calibration drift and modeling uncertainty.
Theoretical and Practical Implications
This work demonstrates the feasibility of first-principles, simulation-based MPC and system identification for systems lacking tractable algebraic models, expanding the operational reach of MPC to regimes previously dependent on surrogates or model-free approaches. Particularly, it addresses well-recognized issues in both fluid mechanics and accelerator operations, where conventional models are insufficient or unavailable at necessary fidelity.
The methodology provides a foundation for real-time, closed-loop, gradient-based adaptive control directly over rich numerical simulators, with strong implications for process industries, robotics, experimental facilities, and scientific apparatus. This is especially pertinent as the diversity and fidelity of differentiable simulators increase and as computation becomes more readily available on HPC and accelerator hardware.
Identifiability under closed-loop control remains a principal challenge; informative state excitation can be inadvertently suppressed by good tracking performance, necessitating either explicit excitation terms in the optimization or the strategic design of planning horizons and objectives. Moreover, scaling the approach to partially observed, high-dimensional systems with stiff or implicit solvers will require joint innovation in numerical optimization and solver architectures.
Conclusion
The paper advances a rigorous, simulation-based methodology for tightly-coupled MPC and system identification on systems described only by differentiable physics simulators. Through concrete examples in fluid dynamics and particle accelerator control, it validates the direct online use of high-fidelity computational models for both adaptation and constraint handling without surrogate model reduction. Future work will address the remaining challenges in constrained optimization for systems with partial observability and design of excitation-aware MPC objectives to guarantee parameter convergence in data-limited settings.