Implementing mpctools package (from Rawlings group) in Simulink
    10 views (last 30 days)
  
       Show older comments
    
I want to implement mpctools (https://sites.engineering.ucsb.edu/~jbraw/software/mpctools/index.html) in Simulink for a Non Linear MPC.  It seems that CASADI offers a demo file for implementation of MPC using CASADI (https://web.casadi.org/blog/mpc-simulink/), however I am planning to use mpctools (IPOPT Solver), and not sure what modifications are needed.
(The state dynamics include states, control and disturbances, and I also want to impose constraints on states, control, and change in control)
I would prefer implementation using Interpreter Function or MATLAB System Object (Similar to CASADI Implementation), however if this package can also be used with a Model Predictive Controller Toolbox, I would appreciate that too.
0 Comments
Answers (1)
  Emmanouil Tzorakoleftherakis
    
 on 17 Jul 2023
        I cannot comments on mpctools, but if your objective is to use IPOPT in Simulink, Model Predictive Control Toolbox allows you to bring in your own solver. Please take a look at the following links for additional information:
1 Comment
  Dynamo
 on 28 Mar 2025
				Thank you for your response on @Anshul Paunikar orginal post. I wasn't aware of solver configuration in NMPC blocks. I have a follow up question because I am also working on same problem and would like some guidance. when we are looking for optimization of NMPC for lower real-time computation load. Natural choice of engineers is CasADi or ACADOS, but implementation of either of these is painful in Simulink with existing NMPC setup. Albiet, one needs to code the NMPC in MATLAB independently, which does help in CodeGen and higher performance for real-time use, but the learning curve is very steep. 
How does sqp solver perform against CasADi or ACADOS? What trade-offs we are expecting over implementation simplicity?
Is there any way CasADi or ACADOS can be integrated into Simulink for NMPC problems? 
Thanks
See Also
Categories
				Find more on Controller Creation in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

