Hi, everyone. Now I have a well-trained dynamic model that uses a time series prediction model. The network takes the linear velocity, angular velocity, control inputs, and angle information of the robot for the past 5 time steps as input and predicts the acceleration for the next time step. Now, I want to integrate this model into an MPC (Model Predictive Control) problem solved using acados.
The MPC cost function involves minimizing the positional differences between the robot and reference trajectory points over a prediction horizon T. The challenge I face is how to appropriately set up the model variables in acados to meet my modeling requirements.
To clarify, after predicting the acceleration using my neural network, I need to integrate it to obtain the velocity for the next time step and I want to use the integrator in acados to do this . Subsequently, when making the next prediction, I want to update the input matrix of my network. This involves removing the earliest time step’s information and including the newly obtained linear velocity, angular velocity, control inputs, and angle information from the integration.
In this process, I’m unsure how to set the acados variables to fulfill my needs.Do I have to use original casadi to set up my model or I can still use acados? Please feel free to answer my questions and thanks you in advance.
Plus, I have completed the template in place of torch calculation by using casadi symbol.