%% Get Controller State Object
% Create a model predictive controller for a single-input-single-output (SISO) plant. For this example, the plant includes an input delay of 0.4 time units, and the control interval to 0.2 time units.

H = tf(1,[10 1],'InputDelay',0.4);
MPCobj = mpc(H,0.2);

%
% Create the corresponding controller state object in which all states are at their default values.

xMPC = mpcstate(MPCobj)

% The plant model, H, is a first-order, continuous-time transfer function. The Plant property of the mpcstate object contains two additional states to model the two intervals of delay. By default, the controller contains a first-order output disturbance model (Disturbance property is a scalar) and a static gain noise model (Noise property is empty).
%
% You can access the properties of the controller state object using dot notation. For example, view the default covariance matrix.

xMPC.Covariance

% Copyright 2015 The MathWorks, Inc.