This example shows how to design a model predictive controller using an identified plant model with a nontrivial noise component.
This example requires a System Identification Toolbox™ license.
Obtain an identified linear plant model.
load dryer2; Ts = 0.08; dry_data = iddata(y2,u2,Ts); dry_data_detrended = detrend(dry_data); plant_idss = ssest(dry_data_detrended,3);
plant_idss is a third-order, identified state-space
model that contains one measured input and one unmeasured (noise)
Design a model predictive controller for the identified plant model.
controller = mpc(plant_idss,Ts);
controller is an
The software treats:
The measured input of
the manipulated variable of
The unmeasured noise input of
the unmeasured disturbance of the plant for
The output of
plant_ss as the measured
output of the plant for
To view the structure of the model predictive controller, at
the MATLAB® command prompt, type
You can change the treatment of a plant input in one of two ways:
Programmatic — Use the
to modify the signal .
Model Predictive Control Toolbox design tool — Use the Input signal properties table to modify the plant model signal types.
You can also design a model predictive controller using:
plant_ss = ss(plant_idss,'augmented'); controller = mpc(plant_ss,Ts);
When you use the
'augmented' input argument,
two input groups,
for the measured and noise inputs of
the measured and noise components of