Table of Contents
Fetching ...

PolyOCP.jl -- A Julia Package for Stochastic OCPs and MPC

Ruchuan Ou, Learta Januzi, Jonas Schießl, Michael Heinrich Baumann, Lars Grüne, Timm Faulwasser

TL;DR

PolyOCP.jl introduces a Julia toolbox for solving stochastic optimal control problems and MPC using polynomial chaos expansions (PCE). It provides a principled transcription of stochastic dynamics with additive disturbances into a coefficient-space optimization, interfacing with PolyChaos.jl for basis construction and JuMP for optimization. The approach relies on a joint PCE basis that scales linearly with the horizon and uses Cantelli-based moment constraints to enforce chance constraints, enabling exact or conservative reformulations under suitable assumptions. Demonstrations on a stochastic chemical reactor OCP and a stochastic MPC for a four-tank system illustrate distribution propagation, constraint handling, and parallelized computation, highlighting practical applicability for rapid prototyping under non-Gaussian uncertainty.

Abstract

The consideration of stochastic uncertainty in optimal and predictive control is a well-explored topic. Recently Polynomial Chaos Expansions (PCE) have seen a lot of considerations for problems involving stochastically uncertain system parameters and also for problems with additive stochastic i.i.d. disturbances. While there exist a number of open-source PCE toolboxes, tailored open-source codes for the solution of OCPs involving additive stochastic i.i.d. disturbances in julia are not available. Hence, this paper introduces the toolbox PolyOCP$.$jl which enables to efficiently solve stochastic OCPs for a large class of disturbance distributions. We explain the main mathematical concepts between the PCE transcription of stochastic OCPs and how they are provided in the toolbox. We draw upon two examples to illustrate the functionalities of PolyOCP$.$jl.

PolyOCP.jl -- A Julia Package for Stochastic OCPs and MPC

TL;DR

PolyOCP.jl introduces a Julia toolbox for solving stochastic optimal control problems and MPC using polynomial chaos expansions (PCE). It provides a principled transcription of stochastic dynamics with additive disturbances into a coefficient-space optimization, interfacing with PolyChaos.jl for basis construction and JuMP for optimization. The approach relies on a joint PCE basis that scales linearly with the horizon and uses Cantelli-based moment constraints to enforce chance constraints, enabling exact or conservative reformulations under suitable assumptions. Demonstrations on a stochastic chemical reactor OCP and a stochastic MPC for a four-tank system illustrate distribution propagation, constraint handling, and parallelized computation, highlighting practical applicability for rapid prototyping under non-Gaussian uncertainty.

Abstract

The consideration of stochastic uncertainty in optimal and predictive control is a well-explored topic. Recently Polynomial Chaos Expansions (PCE) have seen a lot of considerations for problems involving stochastically uncertain system parameters and also for problems with additive stochastic i.i.d. disturbances. While there exist a number of open-source PCE toolboxes, tailored open-source codes for the solution of OCPs involving additive stochastic i.i.d. disturbances in julia are not available. Hence, this paper introduces the toolbox PolyOCPjl which enables to efficiently solve stochastic OCPs for a large class of disturbance distributions. We explain the main mathematical concepts between the PCE transcription of stochastic OCPs and how they are provided in the toolbox. We draw upon two examples to illustrate the functionalities of PolyOCPjl.

Paper Structure

This paper contains 12 sections, 26 equations, 5 figures, 4 tables.

Figures (5)

  • Figure 1: Flow chart of solving stochastic OCPs using PolyOCP.jl
  • Figure 2: Trajectories of the first 30 PCE coefficients of $X_1$ for the chemical reactor
  • Figure 3: Comparison of PDFs and histograms of $10^4$ samples for the chemical reactor
  • Figure 4: 10 different closed-loop realizations of state trajectories for the four tank system
  • Figure 5: Time evolution of empirical distributions of $X_i$, $i=1,2$ of the closed-loop four tank system

Theorems & Definitions (5)

  • Definition 1: Exact PCE representation
  • Remark 1: Generic affine PCE series
  • Example 1: Independent components in random vector
  • Example 2: Multivariate Gaussian
  • Example 3: Nonlinear map