You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, this package looks amazing and the application is really interesting. I hope it gets widely adopted.
Further, I am trying to implement an MPC controller where I am using a neural network as the prediction model. The model is trained on past input/output data and future inputs such that the output can be predicted in a multistep fashion. For the network I am using a RBF neural network with one layer and RBF activation functions. I have validated the model by analytically constructing the network in Matlab and running the controller and it manages to reference track. I also checked the conversion from Pytorch to L4Casadi and gave it an input that I know that works and it gave the correct output.
I have tried replacing the mathematical description of the system and then it works so I am suspecting that the problem is with l4Casadi and how I define the constraint with the L4Casadi model. Is there a specific way the input should be provided?
Thanks for reaching out. An easy way to sanity check if L4CasADi as a framework is the problem here would be to replace the learned mode with the mathematical description of the system but in PyTorch with L4CasADi. I am unsure if this is what you did already or if you replaced it with the mathematical description of the system in CasADi.
Should this result in the correct behavior, then the problem lies with the interaction of the model and optimizer rather than the L4CasADi framework, which simply exposes the model to CasADi / the optimizer. Keep in mind that without guidance the optimizer could query the model (and its derivatives) at any point in input space. Theoretically these points can be far away from where it was trained. This can result in undefined behavior where the optimizer diverges.
Hey!
First of all, this package looks amazing and the application is really interesting. I hope it gets widely adopted.
Further, I am trying to implement an MPC controller where I am using a neural network as the prediction model. The model is trained on past input/output data and future inputs such that the output can be predicted in a multistep fashion. For the network I am using a RBF neural network with one layer and RBF activation functions. I have validated the model by analytically constructing the network in Matlab and running the controller and it manages to reference track. I also checked the conversion from Pytorch to L4Casadi and gave it an input that I know that works and it gave the correct output.
I have tried replacing the mathematical description of the system and then it works so I am suspecting that the problem is with l4Casadi and how I define the constraint with the L4Casadi model. Is there a specific way the input should be provided?
Model Code:
MPC Setup Code:
The text was updated successfully, but these errors were encountered: