Direct single shooting with acados

Hello everyone :wave:

I am using acados in MATLAB on Windows. I would like to implement a linear MPC in a dense formulation, i.e., using the direct single shooting method. Is that option somehow possible with the OCP-NLP interface? I would also like to use the generated solver in Simulink afterwards.

So far I’ve managed to reproduce the results from section 8.2 of the paper linked here, but still see a significant difference in solve time between acados and the original implementation in qpOASES (roughly 25ms vs 1ms).

For the QP solver I’ve selected full_condensing_hpipm, but I assume this does not lead to a completely dense formulation?

I am also aware of the possibilities to do it with CasADi or HPIPM directly, but would prefer using the acados interface for an easier comparison with nonlinear examples.

Any help on the topic would be much appreciated.

Kind regards,
Josip

Hi Josip,

unfortunately I do not know of a way to do this nicely.
The focus of acados is nonlinear MPC and multiple shooting.

You can get the timing of the QP solver call, i.e. excluding time for condensing using time_qp_solver_call just to verify that this is similar.

Other than that you could set up the single shooting OCP and formulate it with a horizon N=1 in acados.

Best,
Jonathan

Hi Jonathan,

thank you for the reply, I will try that.

Kind regards,
Josip