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
Sam Chak 2022년 4월 17일

0 개 추천

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에 대해 자세히 알아보기

제품

릴리스

R2022a

태그

질문:

2022년 4월 16일

답변:

2022년 4월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by