When generating C code using the MPC module in Simulink, is it necessary to configure an external solver separately?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
When generating C code using the MPC module in Simulink, is it necessary to configure an external solver separately?
0 Kommentare
Antworten (1)
Aravind
am 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 Kommentare
Siehe auch
Kategorien
Mehr zu Code Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!