From ACADO to ACADOS - Missing features

Hi all,

For starters, thank you for your efforts in developing this new tool.

I have used CasADi in the past, and currently using ACADO mainly for their RTI scheme.
One of the issues in ACADO was implementing dead time (or delay) in the system model.
This is due to the fact that ACADO requires a continuous ODE and doesn’t have low level access to the single states/controls per prediction step, unlike CasADi, which does.

Since ACADOS will be using CasADi formulation, will it be possible to implement dead time? It would be nice to have dedicated support for that. However, in CasADi it is possible to shift the states by the amount of delay to achieve that. Whereas in ACADO i had to approximate the system with a higher order differential equation.
If this is possible, this would be a strong argument for me to switch to ACADOS.

Also, i read that you are working on an RTI scheme similar to this of ACADO based on SQP? Would be interesting to know that dead time could be implemented for that as well.

Regards,
Tamam Abou Al Fadel

Hi Tamam,

First of all, thanks for your interest in acados!

Maybe a stupid question, but why do you need to include the delay of the system in the model? Wouldn’t it be sufficient to predict the future state of the system and use the predicted state as current one in the optimal control problem? I have the feeling that this would be enough in many practical applications, but maybe what you have in mind cannot be implemented this way?

Regarding the RTI scheme, this is sort of implemented in acados, in the sense that you can of course carry out a single SQP iteration per sampling time. On the other side splitting into feedback and preparation phase is not implemented yet (if your application would benefit a lot from this feature, we can quickly implement it).

Cheers,
Andrea

Hi Andrea,

I think what you are referring to is something like ‘‘shifting states’’ which was possible in CasADi, since it is possible to formulate each prediction step by itself. I take from your comment that this would also be possible in acados.

What would be very handy though is to be able to define system delay directly coming from the system identification, i don’t know how difficult this implementation could be and what considerations have to be made due to the linearization of the problem, but since this tool is still heavily under development, maybe it can be considered.
I know many people have discussed this before in ACADO and CasADi forums.

Regarding the RTI scheme, that is good news. For splitting the phases, is this aimed for parallel computing applications? at the moment i have no application for it, but will keep it in mind!

Regards,
Tamam

Hi Tamam,

I am afraid I do not know what you mean exactly by “shifting states” and still do not entirely understand what you want to do :slight_smile: Could you please describe mathematically how your model looks like and what is your goal in words or, even better, what is your optimal control formulation?

Cheers,
Andrea

Hi Andrea,

i’ll try to describe it better with an example.

Let’s say i want to control the steering wheel of a vehicle, where the steering system is identified as a first order + delay system like in the picture i attached, where Td is the dead time and the bold line is the command value (step input).

This would be a transfer function of the form

k*exp(-T_d*s) / T*s +1

In time domain this would look something like this:

y(t < T_d) = y(0)
y(t => T_d) = ...some exponential function f(t, y_command)..

What i ultimately want to do is define that in my system model (or solve it in another way, besides approximation of the system with a higher order differential equation)

Regards,
Tamam

Hi Tamam,

At the moment there is no plan to include the possibility of dead times in the model. The easiest thing to do, which would lead to an equivalent closed-loop behavior is to eliminate x_{1} from the optimal control problem since it will not be a function of u_{0}, but of u_{-1}, which is known, and can hence be computed under the assumption of nominal dynamics. Then you can treat x_{1} as the initial state of the system in the modified optimal control problem. This all boils down to predicting x_{1} given the current control action and use it as initial state of the system.

This workaround should cover your case, if I am not mistaken :stuck_out_tongue:

Cheers,
Andrea

1 Like