PolyOCP.jl -- A Julia Package for Stochastic OCPs and MPC
Pith reviewed 2026-05-17 05:21 UTC · model grok-4.3
The pith
A Julia package uses polynomial chaos expansions to solve stochastic optimal control problems for linear systems with additive disturbances.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The paper presents PolyOCP.jl as a toolbox that enables efficient solution of stochastic OCPs for linear systems subject to a large class of disturbance distributions by using Polynomial Chaos Expansions to transcribe the stochastic optimal control problem into a solvable deterministic equivalent.
What carries the argument
Polynomial Chaos Expansions, which represent random disturbances as expansions in orthogonal polynomials to approximate stochastic effects and recast the OCP as a deterministic optimization problem.
If this is right
- Practitioners gain an accessible Julia tool to incorporate stochastic disturbances directly into optimal control and MPC designs without custom PCE implementations.
- The approach supports a broad range of disturbance probability distributions for additive i.i.d. noise in linear dynamics.
- The deterministic transcription allows reuse of existing numerical solvers for the converted optimization problems.
- Illustrative examples confirm that the package handles both the transcription and solution steps in practice.
Where Pith is reading between the lines
- The same PCE transcription idea could extend to problems with uncertain system parameters if the toolbox is adapted accordingly.
- Scalability tests on higher state dimensions or longer horizons would reveal practical limits for real-time MPC use.
- Linking PolyOCP.jl outputs to other Julia control packages could streamline end-to-end stochastic control pipelines.
Load-bearing premise
Polynomial Chaos Expansions must deliver accurate enough approximations of the disturbance effects so that the resulting deterministic problem produces control solutions that remain valid under the original stochastic uncertainty.
What would settle it
Compare closed-loop trajectories and costs from PolyOCP.jl solutions against statistical results from many Monte Carlo simulations of the same linear system with sampled disturbances; large consistent mismatches would show the transcription fails to capture the stochastic behavior.
Figures
read the original abstract
The consideration of stochastic uncertainty in optimal and predictive control is a well-explored topic. Recently Polynomial Chaos Expansions (PCE) have received considerable attention 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 linear systems subject to 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.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript introduces PolyOCP.jl, an open-source Julia package for solving stochastic optimal control problems (OCPs) and model predictive control (MPC) for linear systems subject to additive i.i.d. stochastic disturbances. It employs Polynomial Chaos Expansions (PCE) to transcribe the stochastic OCP into a deterministic form and explains the main mathematical concepts of this transcription. Functionalities are illustrated via two examples.
Significance. If the implementation correctly realizes the PCE transcription for the claimed class of disturbances without hidden truncation or scaling issues, the package would provide a useful specialized tool in the Julia ecosystem for stochastic control. Existing PCE toolboxes are noted as not tailored for additive disturbances in OCPs, so this fills a gap and supports reproducibility through open-source code. The Julia choice may aid numerical efficiency for the resulting quadratic programs.
major comments (2)
- [Abstract and §2] Abstract and §2 (Mathematical Concepts): The claim that the toolbox 'enables to efficiently solve stochastic OCPs for linear systems subject to a large class of disturbance distributions' lacks any specification of the supported distribution class (e.g., Askey-scheme matching or generalized chaos), error bounds on the PCE approximation, or analysis of coefficient growth with prediction horizon. This is load-bearing for the efficiency and tractability assertions.
- [Examples] Examples section: The two examples illustrate functionalities but report no quantitative metrics such as approximation error versus Monte Carlo, solve times, or basis sizes. Without these, it is not possible to verify that the Julia implementation avoids the exponential growth or poor convergence risks for multi-step OCPs under non-standard distributions.
minor comments (2)
- [Package Description] Clarify the exact interface for specifying custom disturbance distributions and the default truncation strategy in the package documentation or code examples.
- [§2] Ensure all equations in the PCE transcription section use consistent notation for the number of terms and multi-index sets.
Simulated Author's Rebuttal
We thank the referee for the constructive and detailed comments on our manuscript. We address each major comment point by point below, agreeing where revisions are warranted to improve clarity and completeness.
read point-by-point responses
-
Referee: [Abstract and §2] Abstract and §2 (Mathematical Concepts): The claim that the toolbox 'enables to efficiently solve stochastic OCPs for linear systems subject to a large class of disturbance distributions' lacks any specification of the supported distribution class (e.g., Askey-scheme matching or generalized chaos), error bounds on the PCE approximation, or analysis of coefficient growth with prediction horizon. This is load-bearing for the efficiency and tractability assertions.
Authors: We agree that the abstract and Section 2 would benefit from explicit specification of the supported distributions and related analysis. PolyOCP.jl implements PCE using the Askey scheme for standard distributions (Hermite for Gaussian, Legendre for uniform) and generalized polynomial chaos for others via user-specified orthogonal polynomials. For linear systems with additive i.i.d. disturbances, the mean and covariance propagate exactly without truncation in the stochastic component. We will revise the abstract and expand §2 to specify the supported classes, reference standard error bounds from the PCE literature, and discuss coefficient growth with horizon length along with truncation options. revision: yes
-
Referee: [Examples] Examples section: The two examples illustrate functionalities but report no quantitative metrics such as approximation error versus Monte Carlo, solve times, or basis sizes. Without these, it is not possible to verify that the Julia implementation avoids the exponential growth or poor convergence risks for multi-step OCPs under non-standard distributions.
Authors: We acknowledge the value of quantitative metrics for verifying performance. In the revised manuscript we will augment the examples with tables reporting approximation errors relative to Monte Carlo benchmarks, solve times for the transcribed quadratic programs, and the basis sizes employed. We will also note any observed scaling behavior for multi-step horizons under the tested distributions. revision: yes
Circularity Check
No circularity: toolbox implements known PCE transcription methods
full rationale
The paper presents PolyOCP.jl as an open-source Julia implementation of established Polynomial Chaos Expansion techniques for transcribing stochastic OCPs into deterministic forms for linear systems with additive i.i.d. disturbances. It draws on existing mathematical concepts from the PCE literature without introducing new derivations, fitted parameters, or predictions that reduce to the paper's own inputs by construction. No self-definitional steps, fitted-input predictions, or load-bearing self-citations appear in the abstract or described structure; the contribution is the software realization and example usage of prior methods. This is a standard non-circular software/toolbox paper whose claims rest on external PCE theory and code correctness rather than internal reduction.
Axiom & Free-Parameter Ledger
axioms (1)
- standard math Polynomial Chaos Expansions can represent stochastic variables and convert stochastic OCPs into deterministic equivalents
Reference graph
Works this paper leans on
-
[1]
Separation of estimation and control for discrete time systems,
H. Witsenhausen, “Separation of estimation and control for discrete time systems,”Proceedings of the IEEE, vol. 59, no. 11, pp. 1557– 1566, 1971
work page 1971
-
[2]
Optimal control of continuous time Markov stochastic systems,
J. J. Florentin, “Optimal control of continuous time Markov stochastic systems,”International Journal of Electronics, vol. 10, no. 6, pp. 473– 488, 1961
work page 1961
-
[3]
A maximum principle for stochastic control systems,
H. J. Kushner and F. C. Schweppe, “A maximum principle for stochastic control systems,”Journal of Mathematical Analysis and Applications, vol. 8, no. 2, pp. 287–302, 1964
work page 1964
-
[4]
A probabilistic approach to model predictive control,
M. Farina, L. Giulioni, L. Magni, and R. Scattolini, “A probabilistic approach to model predictive control,” in52nd IEEE Conference on Decision and Control (CDC). IEEE, 2013, pp. 7734–7739
work page 2013
-
[5]
Nonlinear stochastic model predictive control via regularized polynomial chaos expansions,
L. Fagiano and M. Khammash, “Nonlinear stochastic model predictive control via regularized polynomial chaos expansions,” in51st IEEE Conference on Decision and Control (CDC). IEEE, 2012, pp. 142– 147
work page 2012
-
[6]
Stochastic model predictive control for linear systems using probabilistic reachable sets,
L. Hewing and M. N. Zeilinger, “Stochastic model predictive control for linear systems using probabilistic reachable sets,” in2018 IEEE Conference on Decision and Control (CDC). IEEE, 2018, pp. 5182– 5188
work page 2018
-
[7]
R. D. McAllister and J. B. Rawlings, “Nonlinear stochastic model predictive control: Existence, measurability, and stochastic asymptotic stability,”IEEE Transactions on Automatic Control, vol. 68, no. 3, pp. 1524–1536, 2022
work page 2022
-
[8]
J. Schießl, , H. Selder, R. Ou, T. Faulwasser, M. H. Baumann, and L. Grüne, “Stability and performance of stochastic economic mpc - stochastic characterization of the closed-loop asymptotics,” arXiv:2510.19416, 2025
-
[9]
The scenario approach to robust control design,
G. C. Calafiore and M. C. Campi, “The scenario approach to robust control design,”IEEE Transactions on Automatic Control, vol. 51, no. 5, pp. 742–753, 2006
work page 2006
-
[10]
The role and use of the stochastic linear-quadratic- gaussian problem in control system design,
M. Athans, “The role and use of the stochastic linear-quadratic- gaussian problem in control system design,”IEEE Transactions on Automatic Control, vol. 16, no. 6, pp. 529–552, 1971
work page 1971
-
[11]
D. Landgraf, A. Völz, F. Berkel, K. Schmidt, T. Specker, and K. Graichen, “Probabilistic prediction methods for nonlinear systems with application to stochastic model predictive control,”Annual Re- views in Control, vol. 56, p. 100905, 2023
work page 2023
-
[12]
To- wards turnpike-based performance analysis of risk-averse stochastic predictive control,
J. Schießl, R. Ou, M. H. Baumann, T. Faulwasser, and L. Grüne, “To- wards turnpike-based performance analysis of risk-averse stochastic predictive control,”ArXiv:2504.00701, 2025
-
[13]
Data-driven control of stochastic systems: Representation, prediction, and optimal control,
G. Pan, “Data-driven control of stochastic systems: Representation, prediction, and optimal control,” Ph.D. dissertation, Hamburg Univer- sity of Technology (TUHH), 2025
work page 2025
-
[14]
Sullivan,Introduction to Uncertainty Quantification
T. Sullivan,Introduction to Uncertainty Quantification. Springer International, 2015, vol. 63
work page 2015
-
[15]
N. Wiener, “The homogeneous chaos,”American Journal of Mathe- matics, pp. 897–936, 1938
work page 1938
-
[16]
K. Kim and R. Braatz, “Probabilistic analysis and control of un- certain dynamic systems: Generalized polynomial chaos expansion approaches,” in2012 American Control Conference, 2012, pp. 44–49
work page 2012
-
[17]
K. K. Kim, D. E. Shen, Z. K. Nagy, and R. D. Braatz, “Wiener’s polynomial chaos for the analysis and control of nonlinear dynamical systems with probabilistic uncertainties [Historical Perspectives],” IEEE Control Systems Magazine, vol. 33, no. 5, pp. 58–67, 2013
work page 2013
-
[18]
K. Kim and R. Braatz, “Generalised polynomial chaos expansion approaches to approximate stochastic model predictive control,”In- ternational journal of control, vol. 86, no. 8, pp. 1324–1337, 2013
work page 2013
-
[19]
P. K. Mishra, J. A. Paulson, and R. D. Braatz, “Polynomial chaos- based stochastic model predictive control: An overview and future research directions,”arXiv preprint arXiv:2406.10734, 2024
-
[20]
Pocet: a polynomial chaos expansion toolbox for matlab,
F. Petzke, A. Mesbah, and S. Streif, “Pocet: a polynomial chaos expansion toolbox for matlab,”IFAC-PapersOnLine, vol. 53, no. 2, pp. 7256–7261, 2020, 21st IFAC World Congress
work page 2020
-
[21]
R. Ou, J. Schießl, M. H. Baumann, L. Grüne, and T. Faulwasser, “A polynomial chaos approach to stochastic LQ optimal control: Error bounds and infinite-horizon results,”Automatica, vol. 174, p. 112117, 2025
work page 2025
-
[22]
“PolyOCP.jl,” https://github.com/OptCon/PolyOCP.jl, 2025, ver- sion 0.1.0
work page 2025
-
[23]
Poly- Chaos.jl—A Julia package for polynomial chaos in systems and control,
T. Mühlpfordt, F. Zahn, V . Hagenmeyer, and T. Faulwasser, “Poly- Chaos.jl—A Julia package for polynomial chaos in systems and control,”IFAC-PapersOnLine, vol. 53, no. 2, pp. 7210–7216, 2020, 21th IFAC World Congress
work page 2020
-
[24]
JuMP: A modeling language for mathematical optimization,
I. Dunning, J. Huchette, and M. Lubin, “JuMP: A modeling language for mathematical optimization,”SIAM Review, vol. 59, no. 2, pp. 295– 320, 2017
work page 2017
-
[25]
The gradient based nonlinear model predictive control software GRAMPC,
B. Käpernick and K. Graichen, “The gradient based nonlinear model predictive control software GRAMPC,” in2014 European Control Conference (ECC). IEEE, 2014, pp. 1170–1175
work page 2014
-
[26]
Casadi: a software framework for nonlinear optimization and optimal control,
J. Andersson, J. Gillis, G. Horn, J. Rawlings, and M. Diehl, “Casadi: a software framework for nonlinear optimization and optimal control,” Mathematical Programming Computation, vol. 11, no. 1, pp. 1–36, 2019
work page 2019
-
[27]
Distributionally robust uncertainty quan- tification via data-driven stochastic optimal control,
G. Pan and T. Faulwasser, “Distributionally robust uncertainty quan- tification via data-driven stochastic optimal control,”IEEE Control Systems Letters, vol. 7, pp. 3036–3041, 2023
work page 2023
-
[28]
Chaospy: An open source tool for designing methods of uncertainty quantification,
J. Feinberg and H. P. Langtangen, “Chaospy: An open source tool for designing methods of uncertainty quantification,”Journal of Compu- tational Science, vol. 11, pp. 46–57, 2015
work page 2015
-
[29]
S. Marelli and B. Sudret,UQLab: A Framework for Uncertainty Quantification in Matlab, 2014, pp. 2554–2563
work page 2014
- [30]
-
[31]
B. M. Adams, W. J. Bohnhoff, K. R. Dalbey, M. S. Ebeida, J. P. Eddy, M. S. Eldred, R. W. Hooper, P. D. Hough, K. T. Hu, J. D. Jakeman, M. Khalil, K. A. Maupin, J. A. Monschke, E. E. Prudencio, E. M. Ridgway, P. Robbe, A. A. Rushdi, D. T. Seidl, J. A. Stephens, L. P. Swiler, and J. G. Winokur, “Dakota 6.19.0 documentation,” Sandia National Laboratories, Al...
work page 2023
-
[32]
The orthogonal development of non- linear functionals in series of Fourier-Hermite functionals,
R. Cameron and W. Martin, “The orthogonal development of non- linear functionals in series of Fourier-Hermite functionals,”Annals of Mathematics, pp. 385–392, 1947
work page 1947
-
[33]
On the convergence of generalized polynomial chaos expansions,
O. Ernst, A. Mugler, H.-J. Starkloff, and E. Ullmann, “On the convergence of generalized polynomial chaos expansions,”ESAIM: Mathematical Modelling and Numerical Analysis, vol. 46, no. 2, pp. 317–339, 2012
work page 2012
-
[34]
The Wiener–Askey polynomial chaos for stochastic differential equations,
D. Xiu and G. Karniadakis, “The Wiener–Askey polynomial chaos for stochastic differential equations,”SIAM Journal on Scientific Computing, vol. 24, no. 2, pp. 619–644, 2002
work page 2002
-
[35]
B. Fristedt and L. Gray,A Modern Approach to Probability Theory. Birkhäuser Boston, 1997
work page 1997
-
[36]
On a stochastic fundamental lemma and its use for data-driven optimal control,
G. Pan, R. Ou, and T. Faulwasser, “On a stochastic fundamental lemma and its use for data-driven optimal control,”IEEE Transactions on Automatic Control, vol. 68, no. 10, pp. 5922–5937, 2023
work page 2023
-
[37]
A. Wächter and L. T. Biegler, “On the implementation of an interior- point filter line-search algorithm for large-scale nonlinear program- ming,”Mathematical Programming, vol. 106, no. 1, pp. 25–57, 2006
work page 2006
-
[38]
Oberhettinger,Fourier transforms of distributions and their inverses: a collection of tables
F. Oberhettinger,Fourier transforms of distributions and their inverses: a collection of tables. Academic Press, 1973
work page 1973
-
[39]
Stochastic model predictive control—how does it work?
T. A. N. Heirung, J. A. Paulson, J. O’Leary, and A. Mesbah, “Stochastic model predictive control—how does it work?”Computers & Chemical Engineering, vol. 114, pp. 158–170, 2018
work page 2018
-
[40]
Data-driven model predictive control with stability and robustness guarantees,
J. Berberich, J. Köhler, M. A. Müller, and F. Allgöwer, “Data-driven model predictive control with stability and robustness guarantees,” IEEE Transactions on Automatic Control, vol. 66, no. 4, pp. 1702– 1717, 2020
work page 2020
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.