Table of Contents
Fetching ...

Least Squares and Marginal Log-Likelihood Model Predictive Control using Normalizing Flows

Eike Cramer

TL;DR

The paper presents conditional normalizing flows as flexible discrete-time state-space models to learn stochastic dynamics for model predictive control in chemical processes. It compares a traditional least-squares tracking objective with a likelihood-based marginal log-likelihood objective, using MC scenarios generated from the learned PDFs to drive optimization and enforce chance constraints. Through simulations on Lotka-Volterra dynamics and a stochastic CSTR, the NF-based MPC methods achieve better setpoint tracking and fewer constraint violations than a nominal controller, with the MLL objective offering slightly improved stability at small scenario counts. The work demonstrates a practical, data-driven path to stochastic MPC that naturally handles non-Gaussian, state-dependent disturbances and explicit uncertainty quantification.

Abstract

Real-world (bio)chemical processes often exhibit stochastic dynamics with non-trivial correlations and state-dependent fluctuations. Model predictive control (MPC) often must consider these fluctuations to achieve reliable performance. However, most process models simply add stationary noise terms to a deterministic prediction. This work proposes using conditional normalizing flows as discrete-time models to learn stochastic dynamics. Normalizing flows learn the probability density function (PDF) of the states explicitly, given prior states and control inputs. In addition to standard least squares (LSQ) objectives, this work derives a marginal log-likelihood (MLL) objective based on the explicit PDF and Markov chain simulations. In a reactor study, the normalizing flow MPC reduces the setpoint error in open and closed-loop cases to half that of a nominal controller. Furthermore, the chance constraints lead to fewer constraint violations than the nominal controller. The MLL objective yields slightly more stable results than the LSQ, particularly for small scenario sets.

Least Squares and Marginal Log-Likelihood Model Predictive Control using Normalizing Flows

TL;DR

The paper presents conditional normalizing flows as flexible discrete-time state-space models to learn stochastic dynamics for model predictive control in chemical processes. It compares a traditional least-squares tracking objective with a likelihood-based marginal log-likelihood objective, using MC scenarios generated from the learned PDFs to drive optimization and enforce chance constraints. Through simulations on Lotka-Volterra dynamics and a stochastic CSTR, the NF-based MPC methods achieve better setpoint tracking and fewer constraint violations than a nominal controller, with the MLL objective offering slightly improved stability at small scenario counts. The work demonstrates a practical, data-driven path to stochastic MPC that naturally handles non-Gaussian, state-dependent disturbances and explicit uncertainty quantification.

Abstract

Real-world (bio)chemical processes often exhibit stochastic dynamics with non-trivial correlations and state-dependent fluctuations. Model predictive control (MPC) often must consider these fluctuations to achieve reliable performance. However, most process models simply add stationary noise terms to a deterministic prediction. This work proposes using conditional normalizing flows as discrete-time models to learn stochastic dynamics. Normalizing flows learn the probability density function (PDF) of the states explicitly, given prior states and control inputs. In addition to standard least squares (LSQ) objectives, this work derives a marginal log-likelihood (MLL) objective based on the explicit PDF and Markov chain simulations. In a reactor study, the normalizing flow MPC reduces the setpoint error in open and closed-loop cases to half that of a nominal controller. Furthermore, the chance constraints lead to fewer constraint violations than the nominal controller. The MLL objective yields slightly more stable results than the LSQ, particularly for small scenario sets.
Paper Structure (19 sections, 28 equations, 7 figures, 10 tables)

This paper contains 19 sections, 28 equations, 7 figures, 10 tables.

Figures (7)

  • Figure 1: Normalizing flow transformation between random variable $X$ and Gaussian $Z$ with conditional input variable $Y$. The conditional information is added to the INN as proposed in cramer2022normalizing. The figure is similar to cramer2024dayahead_NF.
  • Figure 2: Three steps of regression using normalizing flows. Here, $\mathbf{x}[k]$ are the states, $\mathbf{u}[k]$ are the control inputs, and $\mathbf{z}\sim \mathcal{N}(\mathbf{0}, \mathbb{I})$ is a multivariate Gaussian with $\dim(\mathbf{x}) = \dim(\mathbf{z})$. The two-headed arrow represents the INN $T_R$ (Equation \ref{['Eq: INN regression']}) with conditional inputs mapping between $\mathbf{z}$ and the increment distribution $\mathbf{x}^+[k]$.
  • Figure 3: Simulation of the Lotka-Volterra system (Equation \ref{['eq: lv conti']}) with the Euler-Murayama simulation (left) and the normalizing flow simulation (right). The top row shows the populations' evolutions over time, and the bottom row shows the same in the state space. In the bottom row, the initial state is marked with a black dot.
  • Figure 4: Continuously stirred tank reactor (CSTR) sketch similar to bequette1998process. State variables are the concentration of component A, $C_A$, and the reactor temperature $T$. Control variables are the feed temperature $T_f$, the jacket temperature $T_j$, and the feed concentration of component A, $C_{Af}$.
  • Figure 5: Simulation of the reagent concentration $C_A$ and the reactor temperature $T$ for the control inputs in Table \ref{['tab: CSTR Simlation inputs']}. The first and the second rows show the mean ("NF mean") and 50% and 99% prediction intervals for the normalizing flow in comparison to a simulation using the true model equations in \ref{['Eqs: CSTR model']} ("Realization"). The prediction intervals are estimated from 1000 scenarios.
  • ...and 2 more figures