collocationPoints() Radau, Legendre

926 views
Skip to first unread message

Michael S

unread,
Sep 6, 2016, 4:10:39 PM9/6/16
to CasADi
Hello Casadi Team!


I am solving a control problem with collocation. For this purpose I wanted to get some information about the Radau and Legendre collocation points. All the information I found were for the interval [-1,1], like this one:

http://vdol.mae.ufl.edu/ConferencePublications/unifiedFrameworkAAS.pdf

When I transform this interval to [0,1] I get different numbers than the collocationPoints() function calculates. So my problem is, I can nowhere find the numbers you guys discussed in the issue #673 for the collocation points (https://github.com/casadi/casadi/issues/673). What confuses me even more is that, all the papers I read (e.g. the link above) tell, that the Radau collocations points have only the endpoint 1 included, not both 0 and 1 like in issue #673. The method that has both endpoints included is called Lobatto method.


Did I get something wrong? Could you guys maybe give me a hint where I can find some information and literature to get the same numbers the collocationPoints() function gives me.


Thanks a lot for your help!

Joel Andersson

unread,
Sep 6, 2016, 4:20:01 PM9/6/16
to CasADi
Hi Michael,

I think that you'll find references for the collocation points in "Nonlinear Programming: Concepts, Algorithms, and Applications to Chemical Processes" by Biegler. For Radau and Legendre collocation points, zero is indeed *not* a collocation point. The interpolating polynomials go through these points, but we do not evaluate the ODE/DAE there. Since this was a bit confusing, we changed this in the CasADi 3.0 refactoring: The new function, which is now called "collocation_points", no longer returns the zero time point.

Best regards,
Joel

Peter Listov

unread,
Sep 6, 2016, 5:32:24 PM9/6/16
to CasADi
Hello Michael,

I could recommend the L. Trefethen "Spectral methods in Matlab" as a good initial reading on numerical/algorithmic aspects of spectral methods. In particular he gives (as an example) a stable algorithm for computing Chebyshev (or Gauss-Lobato) collocation points that can be applied for arbitrary intervals.

Best regards,
Peter

Michael S

unread,
Sep 7, 2016, 4:33:38 AM9/7/16
to CasADi
Hi Peter and Joel!

Thank you for the book recommendations and your answers! Unfortunately in "Spectral methods in Matlab" I could not find the calculation of Radau points.

My Problem is, how do I calculate the Radau collocation points e.g. 4th order that are given in Casadi?

[0.088588,0.409467,0.787659,1.000000] (Zero point excluded)

All the other sources (e.g. http://mathworld.wolfram.com/RadauQuadrature.html or "Introduction to Numerical Analysis" by  F. B. Hildebrand page 409) I found, say the the Radau points of 4th order are

[-1, -0.575319, 0.181066, 0.822824]

transformed to the [0,1] interval it gives

[0,  0.2123405, 0.590533, 0.911412]

which is not equal to the radau points from Casadi. Joel, did you mean the endpoint 1 has to be excluded or the endpoint 0?


Thank you for your help!

Joel Andersson

unread,
Sep 7, 2016, 8:31:44 AM9/7/16
to CasADi
Isn't that exactly the same, just mirrored? I mean, take one minus those points. For Radau, 1 is a collocation point (we want the equations to be satisfied at the end point). Joel

Peter Listov

unread,
Sep 7, 2016, 9:02:55 AM9/7/16
to CasADi
Hello Michael,

Certainly, the book I have mentioned is all about Chebyshev collocation methods, but it gives simple explanations on where these points come from and how they can be calculated. 

Anyway, you should be more careful with Radau points. In fact, the paper you cited in the first post gives a possible explanation to your question. It says that LGR points include only one the boundary points. It means that you can fix either -1 or 1 to compute collocation points which in turn implies that there are two sets of Radau points for a given order of polynomial interpolation. If you choose to fix -1, then the right bound is free and you need to use quadrature formula to assign a function value to it.

At least this is my understanding of the matter.

Best regards,
Peter  

Michael S

unread,
Sep 7, 2016, 11:24:14 AM9/7/16
to CasADi
Mirroring was was the tip I was looking for :) Thanks guys!!!

Keep up the good work!
Reply all
Reply to author
Forward
0 new messages