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?

Respuestas (1)

Sam Chak
Sam Chak el 17 de Abr. de 2022

0 votos

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.

Productos

Versión

R2022a

Etiquetas

Preguntada:

el 16 de Abr. de 2022

Respondida:

el 17 de Abr. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by