The code in this repository is concerned with the data-driven optimal control of nonlinear systems. We present a convex formulation of the optimal control problem with a discounted cost function. We consider optimal control problems with both positive and negative discount factors. The convex approach relies on lifting nonlinear system dynamics in the space of densities using the linear Perron– Frobenius operator. This lifting leads to an infinite-dimensional convex optimization formulation of the optimal control problem. The data-driven approximation of the optimization problem relies on the approximation of the Koopman operator and its dual: the Perron–Frobenius operator, using a polynomial basis function. We write the approximate finite-dimensional optimization problem as a polynomial optimization which is then solved efficiently using a sum-of-squares-based optimization framework. Refer to the paper for high-level details of the framework.
We use sum-of-squares-based (SOS) optimization in our convex framework to ensure the positivity of the density function sosopt
which is a Matlab toolbox for formulating and solving Sum-of-Squares (SOS) polynomial optimizations. For more information on the sosopt
toolbox, click here. The sosopt
toolbox requires the multipoly
toolbox to construct the polynomial constraints. multipoly
can be obtained from here. sosopt
also requires one of the following optimization codes for solving semidefinite programs (SDPs): SeDuMi
, SDPT3
, CSDP
, DSDP
, SDPAM
, or SDPLR
. The latest version of SeDuMi
can be obtained from here. For ease of access, we have provided all the required toolboxes in the folder titled SOS Toolbox
.
Koopman operator is a linear operator in the function space. If f(x) is the vector field of the dynamics and the
Any optimal control problem is typically written as minimizing a cost function while satisfying the system dynamics. Here,