Optimal Control

In optimal control theory, we wish to solve problems of the form

\[\begin{split}\begin{aligned} \min_{\boldsymbol{u}} J &= \int_{t_0}^{t_f} L(t, \boldsymbol{x}, \boldsymbol{u}) \; dt + \eta(\boldsymbol{x}(t_f)) \\ \text{Subject to:}& \\ \dot{\boldsymbol{x}} &= \mathbf{f}(t, \boldsymbol{x}, \boldsymbol{u}) \\ 0 &= \boldsymbol{\phi}(t_0, \boldsymbol{x}(t_0)) \\ 0 &= \boldsymbol{\xi}(t_f, \boldsymbol{x}(t_f)) \\ \boldsymbol{g}_{lower} &\leq \boldsymbol{g}(\boldsymbol{x}, \boldsymbol{u}, t) \leq \boldsymbol{g}_{upper} \end{aligned}\end{split}\]

Setting up a Problem

Initialize a new Optimal Control Problem with

>>> import beluga
>>> ocp = beluga.OCP()
<beluga.problem.OCP object at 0x0...>

Define parameters in the Optimal Control Problem with

>>> ocp.<parameter>(value1, value2, ..., valuen)

for example

>>> ocp.independent('t', 's')

defines the independent variable \(t\) with units of \(s\) representing “seconds”. Info for available parameters are included in the OCP documentation.

beluga Examples

Examples are organized into folders for various disciplines. For more optimal control specific examples, see the following.

Pure control path-constrained:

Pure state path-constrained:

Mixed state-control path-constrained:

Staged vehicles and discontinuous functions:

Custom function implementation:

Base Class Reference