I need to implement a Linear-time varying (LTV) MPC in Simulink, Windows, this leads to a quadratic optimization in the form
0.5*x'*H*x+f'*x subject to
A*x<=b. I compute by myself the matrices, therefore, I would like to write a
Simulink S-function which solves a dense quadratic problem as in hpipm/guide.pdf at master · giaf/hpipm · GitHub, such that the S-function can receive as input the matrices and provide as output the optimized variables.
Further, the controller will be implemented in
MicroAutoBox on a
dSPACE RCP Platform.
I went though all the
Matlab examples but the
dense QP structure is not used, so I would like to ask if this idea is feasible.
Besides, in case I embrace totally the
acados_ocp structure as in the examples, is it possible to provide at each sampling time the linearized matrices around the optimal trajectory at the previous sample time and exploit them to avoid the nonlinear optimization? I have real-time constraints and I cannot afford a nonlinear optimization.
Thanks for your help,