I’m experimenting a bit with the Matlab Simulink interface of acados. I can get it running and the outputs seem fine. I have two questions about the simulink_model_advanced_closed_loop.slx, though:
The ocp sfunction block has an input x_init, which is set to zeros. Does that mean that this example will not warmstart the ocp sfunction block with the states from the solution at the previous simulation timestep. If not, would it better to couple the (delayed) ouput xtraj to the input x_init of the ocp sfunction block?
There is a delay block z^(-1) from the ocp sfunction block to the sim sfunction block. Wouldn’t it be better to put this delay block in the feedback line from the sim sfunction block to the ocp sfunction block? I think that corresponds better to how the closed loop examples are implemented.
Thanks in any case for making all of this Simulink functionality!