Design Controller Using Identified Model with Noise Channel

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) input.

Design a model predictive controller for the identified plant model.

controller = mpc(plant_idss,Ts);

controller is an mpc object. The software treats:

  • The measured input of plant_ss as the manipulated variable of controller

  • The unmeasured noise input of plant_ss as the unmeasured disturbance of the plant for controller

  • The output of plant_ss as the measured output of the plant for controller

To view the structure of the model predictive controller, at the MATLAB® command prompt, type controller.

You can change the treatment of a plant input in one of two ways:

  • Programmatic — Use the setmpcsignals command 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, ss creates two input groups, Measured and Noise, for the measured and noise inputs of plant_idss. mpc handles the measured and noise components of plant_ss and plant_idss identically.

See Also

Related Examples

More About

Was this topic helpful?