Main Content

getindist

Retrieve unmeasured input disturbance model

Description

indist = getindist(mpcobj) returns the input disturbance model, indist, used by the model predictive controller, mpcobj.

example

[indist,channels] = getindist(mpcobj) also returns the input channels to which integrated white noise has been added by default. For more information on the default model, see MPC Prediction Models.

example

Examples

collapse all

Define a plant model with no direct feedthrough.

plant = rss(3,1,2);
plant.D = 0;

Set the first input signal as a manipulated variable and the second input as an unmeasured disturbance.

plant = setmpcsignals(plant,MV=[1],UD=[2]);

Create an MPC controller for the defined plant.

mpcobj = mpc(plant,0.1);
-->"PredictionHorizon" is empty. Assuming default 10.
-->"ControlHorizon" is empty. Assuming default 2.
-->"Weights.ManipulatedVariables" is empty. Assuming default 0.00000.
-->"Weights.ManipulatedVariablesRate" is empty. Assuming default 0.10000.
-->"Weights.OutputVariables" is empty. Assuming default 1.00000.

Extract the input disturbance model.

indist = getindist(mpcobj);
-->Converting model to discrete time.
-->The "Model.Disturbance" property is empty:
   Assuming unmeasured input disturbance #2 is integrated white noise.
   Assuming no disturbance added to measured output #1.
-->"Model.Noise" is empty. Assuming white noise on each measured output.

Define a plant model with no direct feedthrough.

plant = rss(3,1,3);
plant.D = 0;

Set the first input signal as a manipulated variable and the other two inputs as unmeasured disturbances.

plant = setmpcsignals(plant,MV=1,UD=[2 3]);

Create an MPC controller for the defined plant.

mpcobj = mpc(plant,0.1);
-->"PredictionHorizon" is empty. Assuming default 10.
-->"ControlHorizon" is empty. Assuming default 2.
-->"Weights.ManipulatedVariables" is empty. Assuming default 0.00000.
-->"Weights.ManipulatedVariablesRate" is empty. Assuming default 0.10000.
-->"Weights.OutputVariables" is empty. Assuming default 1.00000.

Extract the default output disturbance model.

[indist,channels] = getindist(mpcobj);
-->Converting model to discrete time.
-->The "Model.Disturbance" property is empty:
   Assuming unmeasured input disturbance #2 is integrated white noise.
   Assuming unmeasured input disturbance #3 is white noise.
   Assuming no disturbance added to measured output #1.
-->"Model.Noise" is empty. Assuming white noise on each measured output.

Check which input disturbance channels have integrated white noise added by default.

channels
channels = 
1

An integrator has been added only to the first unmeasured input disturbance. The other input disturbance uses a static unity gain to preserve state observability.

Input Arguments

collapse all

Model predictive controller, specified as an MPC controller object. To create an MPC controller, use mpc.

Output Arguments

collapse all

Input disturbance model used by the model predictive controller, mpcobj, returned as a discrete-time, delay-free, state-space model.

The input disturbance model has:

  • Unit-variance white noise input signals. By default, the number of inputs depends upon the number of unmeasured input disturbances and the need to maintain controller state observability. For custom input disturbance models, the number of inputs is your choice.

  • nd outputs, where nd is the number of unmeasured disturbance inputs defined in mpcobj.Model.Plant. Each disturbance model output is sent to the corresponding plant unmeasured disturbance input.

If mpcobj does not have any unmeasured disturbance, indist is returned as an empty state-space model.

This model, in combination with the output disturbance model (if any), governs how well the controller compensates for unmeasured disturbances and modeling errors. For more information on the disturbance modeling in MPC and about the model used during state estimation, see MPC Prediction Models and Controller State Estimation.

Input channels with integrated white noise added by default, returned as a vector of input indices. If you set indist to a custom input disturbance model using setindist, channels is empty.

Tips

  • To specify a custom input disturbance model, use the setindist command.

Version History

Introduced in R2006a