Control horizon and prediction horizon

Hello,

I am trying to create a MPC controller using acados with the Python interface for a drone application.
Is it possible to have a control horizon that is different than the prediction horizon?

If so, can someone refer me to an example code that I can follow to do this?

Thank you

I think this is discussed already here:

Thank you for your response. I checked this thread and this was your answer:
" Right, I was not really familiar with the term control horizon.
acados only supports problems where the prediction and control horizon are equal.

The case where they are not equal is just to have a long constant control in the end of the horizon as far as I understand.

This can be implemented in acados by using a nonuniform grid and setting the time between the last 2 shooting nodes larger compared to the previous ones.
In order to achieve the same integration accuracy, you could use more steps in the last integrator.

Would that work for you?"

Is there an example code of this implementation?

In this example all the settings for a nonuniform grid are used:

1 Like

Thank you so much !!

1 Like