A Closed-loop Framework to Discriminate Models Using Optimal Control
Predicting the response of an observed system to a known input is a fruitful first step to accurately control the system’s dynamics. Despite the recent advances in fully data-driven algorithms, the most interpretable way to reach this goal is through mechanistic mathematical modeling. Here, we leverage optimal control and propose a closed-loop iterative method to choose among a set of candidate models the one that most accurately predict an observed system. We assume that one has control over an input of the observed system and access to measurements of its response. Our approach is to identify the input control that maximally discriminates the response of the candidate models, allowing us to determine which model is best by comparing such responses with the observed data. We demonstrate our proposed framework in numerical simulations before applying it during an electrophysiology experiment, successfully discriminating between different models for photocurrents produced via opsin dynamics.
💡 Research Summary
The paper introduces a closed‑loop iterative framework that uses optimal control to discriminate among competing mechanistic models of a dynamical system when the experimenter can directly manipulate an input signal and record the system’s output. The authors start by assuming a set of candidate models, each described by nonlinear state equations (\dot X_k = F_k(X_k,u;\Theta_k)) and an output map (Y_k = H_k(X_k;\Theta_k)). An initial, possibly arbitrary, input (u(t)) is applied to the reference system (the real experiment) and the resulting output data (Z(t;u)) are collected. For each candidate model the parameters (\Theta_k) are fitted by minimizing a time‑integrated squared‑error loss using gradient‑based optimization (Adam) with automatic differentiation.
After fitting, the core of the method is to design a new input that maximally separates the two model predictions. This is formulated as an optimal control problem with objective
(J(u)=\int_0^T |Y_1(t;u)-Y_2(t;u)|^2 dt - c_1\int_0^T u(t)^2 dt - c_2\sum_{j=1}^{J}\int_0^T (u(t)-u^{(i-j)}(t))^2 dt).
The first term encourages large output discrepancy, the second penalizes excessive control energy, and the third promotes diversity relative to previously used control signals, preventing the algorithm from getting stuck in a narrow class of inputs. The continuous‑time problem is discretized using a fixed timestep (\Delta t) and the trapezoidal rule; forward Euler enforces the dynamics as constraints. Bounds on the control amplitude and a lower bound on its energy are also imposed. The resulting nonlinear program is solved with the interior‑point optimizer IPOPT, yielding the optimal control (u^{*}(t)).
The optimal control is then applied to the real system, a new dataset is recorded, and the parameters of each model are refitted on this fresh data. This loop—parameter fitting → optimal control synthesis → data acquisition—is repeated until a stopping criterion is met: at least one model’s parameters have converged and its prediction error falls below a predefined tolerance. The authors note that convergence of parameters does not guarantee global optimality because of possible structural or practical identifiability issues, but the iterative scheme tends to drive the system into regions of state space where the models behave distinctly.
The methodology is first validated on synthetic data where the true model is known. Candidate models of differing complexity (e.g., 4‑state vs 6‑state opsin models) are used. Starting from a random sinusoidal input, the first optimal control already creates a noticeable divergence in the predicted photocurrents. After three to four iterations the algorithm correctly identifies the true model, with parameter estimates matching the ground truth and prediction errors dropping below (10^{-3}).
A real‑world demonstration follows an electrophysiology experiment involving optogenetic stimulation of cells expressing light‑sensitive ion channels (opsins). The experimental setup integrates a MATLAB‑based recording suite (Symphony) with a Julia TCP server (Sockets.jl) to stream control commands and current measurements in real time. An initial low‑intensity light pulse is used, after which the algorithm proposes a control consisting of brief high‑intensity spikes interleaved with low‑level illumination. When this control is applied, the two candidate opsin models produce markedly different photocurrent waveforms, allowing the algorithm to favor the more complex six‑state model, which better matches the recorded data after only two iterations.
The authors discuss several advantages: (i) the approach actively designs informative experiments rather than passively fitting existing data, thereby reducing the amount of data needed; (ii) it integrates model selection with control design, which is valuable for downstream tasks such as model‑based feedback control; (iii) it relaxes the strict requirement of structural identifiability, focusing instead on predictive performance under designed inputs. Limitations include the computational burden of solving a non‑convex optimal control problem at each iteration, sensitivity to initial parameter guesses, and practical constraints on the admissible control (e.g., maximum light intensity, actuator bandwidth). The paper suggests future extensions such as multi‑model discrimination (more than two candidates), global optimization strategies to avoid local minima, and robust control formulations to handle measurement noise.
In summary, the work presents a novel, experimentally validated framework that leverages optimal control to iteratively sharpen the distinction between competing mechanistic models, offering a powerful tool for scientists and engineers who need both accurate models and effective control inputs in settings where data are scarce or costly to acquire.
Comments & Academic Discussion
Loading comments...
Leave a Comment