Hi,
This sounds like a nice application of acados!
The topic has been discussed already here
Overall, the spikes should come only from the QP solver, as all other parts of the algorithm have a deterministic runtime. Maybe you can assess this, by logging time_qp
.