I am using CasADi to control a hydraulic system with MPC. The MPC is now implemented and tested in matlab and Simulink and works fine. I want to apply the MPC to a real-world environment in an embedded system (such as space, vector,...). My question is how to generate code from Simulink for embedded systems?
I tried to do it in Simulink with code generation, I have to import CasADi for the Simulink model to work, but code generation doesn't support the import. I have read about the codegen of CasADi:
https://web.casadi.org/blog/s-function/, but there, only the function is generated. For the MPC, I want to also use the solver in the generated code.
Does anyone have any experience with that? Any help is appreciated.
Thank you!
Runyang