Menu

Incorporate analytical solution for u(lambda) for input affine system

hcl734
2019-08-01
2019-08-13
  • hcl734

    hcl734 - 2019-08-01

    I have an input affine system dynamic with constraints on the states and controls. I can solve $\frac{\partial H}{\partial u} = 0$ for $u = \psi (\lambda)$ as described in section 5.5.2 of [1].
    So if I look at the inner minimization algorithm described in [2, Algorithm 2], since $\lambda$ is a function of $u$ anyway and I am solving the line search problem for $u$ and then update $u$ iteratively I would not have to integrate the adjoint system dynamics (eq 22) (if I know $u$, I know $lambda$).

    Or I could take the function $\psi$ solve it for $\lambda$ and obtain an expression like $\lambda = \phi(u)$. Plugging $\lambda = \phi(u)$ into the adjoint system dynamics (eq 22) I obtain kind of a dynamic equation for $u$. So I have a BVP problem to solve (e.g. bvp4c in MATLAB: shooting method).

    I feel that there is a mistake in my reasoning here, could somebody confirm me that this approach would work or were it is mistaken?

    [1] : https://www.uni-ulm.de/fileadmin/website_uni_ulm/iui.inst.110/Downloads/Vorlesung/Optimierung/Skript/Skript_MOOS_WS1819.pdf

    [2] : https://arxiv.org/pdf/1805.01633.pdf

     
  • Andreas Völz

    Andreas Völz - 2019-08-12

    Hello hcl734,

    if you are able to compute the optimal control u as function of the states x and \lambda, then you can plug it into the canonical equations (\dot x and \dot \lambda) and solve the resulting BVP numerically using, e.g., discretization or shooting methods. An alternative approach is the fixed-point iteration method from [1] that builds on the forward and backward integrations of the canonical equations. Instead of performing a line search for updating u, it directly computes the new control from x and \lambda and then goes to the next iteration.

    Regards,
    Andreas

    [1] Graichen, Knut. "A fixed-point iteration scheme for real-time model predictive control." Automatica 48.7 (2012): 1300-1305.

     
  • hcl734

    hcl734 - 2019-08-13

    Thanks for your reply, Andreas. Is there an implementation (sth like GRAMPC) avaiable for the approach that you mention regarding [1]?

     

    Last edit: hcl734 2019-08-13
  • Andreas Völz

    Andreas Völz - 2019-08-13

    Hello hcl734,

    I know of no implementation of the fixed-point scheme that is publicly available. However, it is not very difficult to implement if GRAMPC is used as basis. Basically, you have to add another problem function (probfct.h and probfct.c)

    void phifct(typeRNum* out, ctypeRNum t, ctypeRNum* x, ctypeRNum* adj, typeUSERPARAM* userparam)
    

    that computes the optimal control u for given states x and adjoint states adj. Then, you can modify the main loop of GRAMPC in grampc_run.c, lines 109--163. Instead of computing dHdu, performing a line search and then updating u, you directly compute the new control using phifct. Note that you have to consider the input constraints umin, umax either in phifct or call inputproj(u, grampc) afterwards. Furthermore, the numerical robustness of the fixed-point scheme can be improved by implementing a damped update (see Remark 1 in the paper), which I would highly recommend.

    Regards,
    Andreas

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.