www.gusucode.com > mpc 案例源码 matlab代码程序 > mpc/SetInputDisturbanceModelToDefaultValueExample.m

    %% Set Input Disturbance Model to Default Value
% Define a plant model with no direct feedthrough.

plant = rss(2,2,3);
plant.D = 0;
%% 
% Set the second and third input signals as input disturbances.

plant = setmpcsignals(plant,'MV',1,'UD',[2 3]);
%% 
% Create an MPC controller for the defined plant.

MPCobj = mpc(plant,0.1);
%% 
% Set the input disturbance model to unity gain for both channels.

setindist(MPCobj,'model',tf(eye(2)))
%% 
% Restore the default input disturbance model.

setindist(MPCobj,'integrators')