Problem with designing MPC
显示 更早的评论
I created an MPC block and try to use the 'Design option'. I put into field some MPC name and click 'Design'. An error appears: 'Specified MPC object 'name' cannot be found in base workspace.
What to do?
回答(1 个)
Sam Chak
2022-4-17
Because you need to have the MPC object in the Workspace. And this is how you create a basic one:
Plant = tf([1], [1 0 0]); % double integrator
Ts = 1; % sample time
b1 = 3.60e-05; % upper bound of manipulated variable (MV)
b2 = 4.32e-07; % upper bound of MV rate
% bounds on the controller
MV = struct('Min', -b1, 'Max', b1, 'RateMin', -b2, 'RateMax', b2);
Np = 300; % prediction horizon
Nc = 0.01*Np; % control horizon
MPCobj = mpc(Plant, Ts, Np, Nc, [], MV)
Then, you can click on the "Design" button to launch the MPC Designer App.
Hope this info is helpful to you.
类别
在 帮助中心 和 File Exchange 中查找有关 Controller Creation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!