When generating C code using the MPC module in Simulink, is it necessary to configure an external solver separately?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
When generating C code using the MPC module in Simulink, is it necessary to configure an external solver separately?
0 Commenti
Risposte (1)
Aravind
il 9 Apr 2025
No, when generating C code using the MPC module in Simulink, you do not need to configure an external solver separately. The MPC block automatically includes the necessary QP solver in the generated code. Specifically, the MPC block uses KWIK, a built-in active-set QP solver optimized for embedded applications. This solver is automatically included with the generated C code, and the solver parameters are configured directly within the MPC block settings.
If you wish to use a custom QP solver, then you would need to configure the MPC Controller to call this solver instead of the default one. This requires some external configuration. More information about using custom QP solvers for the MPC controller can be found on the following documentation page: https://www.mathworks.com/help/mpc/ug/qp-solver.html#bu7wrmu.
I hope this answers your question.
0 Commenti
Vedere anche
Categorie
Scopri di più su Code Generation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!