필터 지우기
필터 지우기

How to use model predictive control and quadprog() in MicroAutobox III

조회 수: 18 (최근 30일)
Zekun Yang
Zekun Yang 2023년 3월 31일
댓글: Zekun Yang 2023년 4월 1일
I use Matlab2018b to build MPC function in Simulink, but there's an error Function 'quadprog' not supported for code generation and quadprog() can not work in AutoboxIII. Does it work that I update Matlab to 2022a? If not, what might be the possible solutions?

답변 (2개)

Pratheek
Pratheek 2023년 3월 31일
Hi Zekun Yang,
Quadprog does support Code Generation but there are some constraints and limitations for that, go through the following to make sure you are not violating any of them: Quadratic programming - MATLAB quadprog (mathworks.com).
Here is an example for useing code generation for quadprog: Generate Code for quadprog - MATLAB & Simulink (mathworks.com)
Hope this resolves your issue!

Emmanouil Tzorakoleftherakis
Emmanouil Tzorakoleftherakis 2023년 3월 31일
Hi,
You can use quadprog for simulation and code generation as a solver in Model Predictive Control Toolbox as of R2021b release (see here). So if you upgrade you should be all set. By the way, Model Predictive Control Toolbox also has other built-in QP solvers you can try as you see fit (see here).
Hope this helps

카테고리

Help CenterFile Exchange에서 Model Predictive Control Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by