Inputs parameterized over prediction horizon

Hi everyone,

I am using acados with Matlab and trying to implement parameterized MPC, i.e. the inputs U over the prediction horizon dependent on basis functions F, which are multiplied with a factor K (U = F * K). So K describes a new decision variable that is constant over the prediction horizon and F represents the basis functions, e.g. polynomials. This should reduce the computational burden.

I am struggling with the implementation and wanted to ask, what suggestions you have to tackle this. I would like to have most of the adjustment steps for parameterized MPC to happen before the function “AcadosOcpSolver()”.
What I am trying so far with the quadcopter example, is to redefine the model, so that the K factors are the new inputs. That means the model is now dependent on the stage index which is needed to evaluate the basis functions along the prediction horizon. For this I use a model dependency on the parameter p. Furthermore I have to define equality constraints as K should stay constant over the prediction horizon. In the simulation I then define p to be the stage index.

I have the feeling my implementation is cumbersome. So I am happy for any suggestions how I could improve my design.

Best
Matthias

Hi Matthias,

just to clarify, you would like to have u_n = F(p_n)K_n where n ist the stage index and K_n = K_m for all n,m.

In this case I would recommend to implement K_n as a state with \dot{K} = 0 (or K_{n+1} = K_n if you are using discrete dynamics) and a free initial state.

Best, Katrin