Multi-phase OCP and mapping of parameters

Hi,

I am currently working on a WholeBody MPC for bipedal walking and I want to use different ‘model fidelities’ over the prediction horizon. I guess the multi-phase OCP is the correct acados-‘feature’ for this.
I understand that I am able to map the ‘last state’ N of phase k to the first state 0 of phase k+1 via a discrete dynamics function x_{k+1,0} = f(x_{k, N}). (Please correct me, if I am wrong!).
I had a look into the paper and the examples but wasn’t able to clarify my following questions regarding parametric multi-phase OCPs (maybe I oversaw something, so feel free to just point me to the right ressources):

  • Do I have in the transition dynamics function acces to the parameters p (of stage N in phase k) and the parameters p_global of phase k ?
  • Is it possible to map from the last state of the preivous phase to the p_global or p of the following stage; or is there a way to get acces to parts of the state from the last state of the previous phase in the current phase without the need to carry them in the state vector x.
    Thanks for your help!

Best,
Franek

Hi Franek,

the transition function is its own phase, which includes only a single stage. So it does not have access to p from the previous or next stage. The global parameters are shared across all phases and stages.

In order to map from the last state of the previous phase to parameters of the next state you need to model these parameters as states (with dynamics x^+ = x).

I think this example showcases quite nicely how the transition phase works:

Hope this is helpful,
Katrin

Hi Katrin,
thanks for the clarification!

1 Like