Linear Dynamics with Matrices as Parameters

Hi,

I’m working on an optimization project, and it would be great if I can use ACADOS for my project (I’m using Python Interface)

I want to perform optimization on:

X_dot = A(t) + B(t)*u(t)

where A(t) and B(t) are non-constant variables which is not a function of state, but known in advance. This is not usual state-space equation, and I want to optimize u(t) based on some cost function and constraints.

It is my understanding that for ACADOS, I must define the dynamics (f_expl_expr). So, basically, what I want to do is to pass pre-computed arrays of A(t) and B(t) over prediction horizon to the solver at every optimization step.

Can such formulation possible with ACADOS? Any help would be greatly appreciated

Regards,

Steve

Hi,

you can use the DISCRETE dynamics module and use parameters to change A, B
This example should help acados/example_ocp_dynamics_formulations.py at master · acados/acados · GitHub

Cheers!