can I use Model Predictive Controller in Simulink and coding in script at the same time? using MATLAB

1 次查看(过去 30 天)
Hello,
so i have a question, I have Model Predictive Controller in Simulink and also i have to add some new constraints and cost function that are not added by the MPC, so i have to write them in script;
my question is: can i use the simulink and coding for model predictive controller at the same time, or should I just use coding?;
i remember last year someone form matlab answered and said that they are working to make the MPC working in parallel by simulink and script.
thanks in advance

回答(1 个)

Satwik
Satwik 2024-3-28
Hello,
To my knowledge, defining custom constraints and cost functions is only possible in Nonlinear MPC (NLMPC) and not in Linear MPC. So, if you are using a NLMPC to serve the purpose of your project, you can go ahead and add custom constraints and cost functions using the steps provided in the following documentation:
Additionally, I recommend you have a look at this MATLAB Central discussion:
It could help you formulate a possible workaround on using custom constraints even in Linear MPC.This discussion also provides some insights into the merits and demerits of NLMPC versus Linear MPC.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Linear Plant Specification 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by