help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bvp4c.m Question


From: eirikbloodaxe
Subject: bvp4c.m Question
Date: Wed, 10 Apr 2013 06:40:36 -0700 (PDT)

I need help/clarification concerning bvp4c.m. The problem I want to solve is
a Hamiltonian two point BVP of the form

dx/dt = del H / del p
dp/dt = - del H / del x

where x and p have dimension, say, n and H(x, p), the Hamiltonian, is a
function of x and p. `del' means partial derivative. The boundary values are
x(t_start) = x0 and p(t_end) = 0, where x0 is some prescribed point in R^n.
The problem has to do with finding optimal (minimum energy) controls.

I succesfully used bvp4c.m in matlab but I now want to switch to octave with
this problem because I like octave more. I am not interested in 1-to-1
compatibility with matlab, but I need to know more about bvp4c.m in octave
in order to use it properly and recommend it to others.

Questions:

(1) My vector field has dimension 2*n, but bvp4c tries to evaluate it using
a 2*n-times-3 matrix. Am I supposed to return the values of the vector field
for each column of this 2*n-times-3 matrix? If yes, why 3? Can I tweak this
number? My problem allows for massive economies in terms of evaluating the
vector field at more than one point, but the number of points should
preferrably be even.

(2) How do I provide derivatives of my boundary conditions and vector field?
(I want to demonstrate to people that this improves the performance.)

(3) I believe that bvp4c solves the collocation equations using fsolve. I'd
like to extract more information about the collocation equations at the
solution from fsolve (e.g. the Jacobian), but in order to interprete this
information, I need to know precisely how the collocation equations are
organised.

(4) Am I right in thinking that bvp4c is a fourth order scheme, so that
there is an implicit assumption that (x, p) have temporal derivatives of up
to order 4?




--
View this message in context: 
http://octave.1599824.n4.nabble.com/bvp4c-m-Question-tp4651692.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]