HW8 - degree of approximate polynomial and number of collocation points

HW8 - degree of approximate polynomial and number of collocation points

by Šíp Václav -
Number of replies: 3

I have a problem with divergence. Precisely speaking, the solver won't find the solution due to divergence.

Before I start doing crazy stuff because I can't find a reason for divergence, I would like to confirm if using an approximate polynomial of the third degree and thus one collocation point for each segment is the right choice for this problem?

In reply to Šíp Václav

Re: HW8 - degree of approximate polynomial and number of collocation points

by Gurtner Martin -
Third order polynomial and one collocation point in the middle of the discretization interval are fine. In fact, I would not have problem accepting any other other collocation method in your solution.

Anyway, if you have a problem with divergence, I suggest using the RK4 method from the lab session to verify that the rest of optimal control problem is correctly implemented. If so, you can move on to debugging your collocation method.
In reply to Gurtner Martin

Re: HW8 - degree of approximate polynomial and number of collocation points

by Šíp Václav -
Thank you. It didn't occur to me that I could check the stuff outside the collocation method with this so nicely. It really helped.
In reply to Šíp Václav

Re: HW8 - degree of approximate polynomial and number of collocation points

by Hurák Zdeněk -
Let me interfere a bit here. Strictly speaking, for a polynomial of degree 3, we need 3 collocation points because on top on one condition on the value, we need three conditions on the derivatives.

Although some other choices for location of collocation points are possible, one popular choice is to choose two of them equal to the grid/mesh/discretization points and one in the middle. The fact that the two of the three collocation points coincide with the grid/mesh/discretization points does not make them any less collocation points. See, for example, section 4 (Hermite–Simpson Collocation Method) in the nice (and freely available) tutorial
  • Kelly, Matthew. „An Introduction to Trajectory Optimization: How to Do Your Own Direct Collocation". SIAM Review 59, č. 4 (1. leden 2017): 849–904. https://doi.org/10.1137/16M1062569.








More detailed treatment is in the monograph
  • Betts, John T. Practical Methods for Optimal Control and Estimation Using Nonlinear Programming. 2nd ed. Philadelphia: Society for Industrial & Applied Mathematics, 2009.
Should you find a way to get the book, you will find it in the section 4.6.5. In fact, Kelly obviously based his tutorial on Betts' book.




Now, if the name "Hermite-Simpson" sounds familiar to you, then indeed, this only reflects the fact that for this choice of collocation points, the method is equivalent to the implicit Runge-Kutta (IRK) method called... well... Hermite-Simpson IRK method.


In fact, this class of methods that involve both the start and end point of the discretization interval among the collocation points has its name – these methods are called Lobatto methods. If you only allow collocation points (strictly) inside the interval, these are called Gauss (or Gauss-Legendre) methods. If you allow one of the boundary points of the interval to be also a collocation point, these are Radau methods.

But I admit the terminology is not used consistently by all authors... I myself used to find it confusing.