sandeep026 / NumericalOptimalControl

Direct transcription methods for optimal control problem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem description

The optimal control problem for the cart system 1 is provided below. z1 and z2 are the position and velocity of the cart and they comprise the states. f is the force applied and there is a drag force which is proportional to the velocity of the cart. The system starts from rest and additional boundary condition is placed at the end of the trajectory. Along the trajectory the control effort is minimized from time 0 to 2.

image

Analytical solution

The system admits the following analytical solution, which can be later used to verify the numerical solution and its accuracy.

image

Numerical optimal control

Direct methods 2 are used to solve optimal control problem for a cart system. The optimal control problem is discretized and transformed to a nonlinear optimization problem and solved using the state of the art solver IPOPT. The numerical methods used for discretization are

  1. single shooting with piecewise constant control (RK45)
  2. multiple shooting with piecewise constant control (RK45)
  3. trapezoidal with piecewise linear/constant control
  4. hermite simpson with piecewise linear control
  5. LGL pseudospectral (The quadrature and diff matrices are taken from 3)

Requirements

To run the programs the following are required

References

Footnotes

  1. Conway, B. A. and K. Larson (1998). Collocation versus differential inclusion in direct optimization. Journal of Guidance, Control, and Dynamics, 21(5), 780–785

  2. Diehl, Moritz, and Sébastien Gros. "Numerical optimal control." Optimization in Engineering Center (OPTEC) (2011).

  3. Shen, Jie, Tao Tang, and Li-Lian Wang. Spectral methods: algorithms, analysis and applications. Vol. 41. Springer Science & Business Media, 2011.

About

Direct transcription methods for optimal control problem

License:MIT License


Languages

Language:MATLAB 100.0%