Table of Contents
Fetching ...

MPC and System Identification with Differentiable Physics: Fluid System and Particle Beam Control

Alan Williams, Alp Sunol

Abstract

We consider the problem of simultaneous control and parameter estimation when the model is available only as a differentiable physics simulator. We propose a receding-horizon control framework in which a model predictive control (MPC) objective is optimized using gradients obtained by differentiating through the simulator, while physical parameters are updated online using measurement data. Unlike classical MPC, which relies on explicit algebraic models, our approach treats the dynamics as a computational object and performs simulation-based optimization using automatic differentiation. A shared differentiable model enables joint, real-time optimization of control inputs and physical parameters. We present two preliminary examples to demonstrate the proposed framework on two challenging applications: a fluid flow problem and a particle accelerator.

MPC and System Identification with Differentiable Physics: Fluid System and Particle Beam Control

Abstract

We consider the problem of simultaneous control and parameter estimation when the model is available only as a differentiable physics simulator. We propose a receding-horizon control framework in which a model predictive control (MPC) objective is optimized using gradients obtained by differentiating through the simulator, while physical parameters are updated online using measurement data. Unlike classical MPC, which relies on explicit algebraic models, our approach treats the dynamics as a computational object and performs simulation-based optimization using automatic differentiation. A shared differentiable model enables joint, real-time optimization of control inputs and physical parameters. We present two preliminary examples to demonstrate the proposed framework on two challenging applications: a fluid flow problem and a particle accelerator.

Paper Structure

This paper contains 22 sections, 21 equations, 5 figures.

Figures (5)

  • Figure C1: Control and estimation with a shared differentiable model, with rollout constraints enforced in each of the three optimizations.
  • Figure D1: The elliptical foil in a background flow $U$, with heave $h(t)$ and pitch $\psi(t)$ parameterized by the Fourier series in \ref{['eq:heave']} and \ref{['eq:pitch']}. The solver implements the generalized Newtonian constitutive model \ref{['eq:carreau_yasuda']}, though results in this work use the Newtonian limit ($\eta_0 = \eta_\infty = \eta$). The domain has periodic boundary conditions.
  • Figure D2: Joint MPC gait optimization and viscosity estimation at $Re = 1{,}000$ over 100 replanning cycles, shown for three hyperparameter configurations that differ in learning rates and late-stage decay schedule. (a) Swimming efficiency $\mathcal{E}$; solid lines are 5-point centered moving averages and translucent markers show the raw per-cycle values; the dashed line is an offline gait optimization with known $\eta$ over many gradient steps. (b) Viscosity estimate $\hat{\eta}$; the dashed line is $\eta_{\text{true}} = 10^{-3}$. (c) Absolute power-prediction residual $|P_{\text{pred}} - P_{\text{meas}}|$.
  • Figure E1: Quadrupole setpoint values (top) and beam size measurements (bottom) over 11 time steps.
  • Figure E2: Loss curves of \ref{['eq:ipf_cost_used']} for the MPC optimization problem \ref{['eq:acc_static_mpc']} (top) and \ref{['eq:acc_param_est']} (bottom) for the parameter estimation for the first 5 time steps.