Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

getindist

Retrieve unmeasured input disturbance model

Syntax

  • indist = getindist(MPCobj)
    example
  • [indist,channels] = getindist(MPCobj)
    example

Description

example

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 Modeling.

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);
-->The "PredictionHorizon" property of "mpc" object is empty. Trying PredictionHorizon = 10.
-->The "ControlHorizon" property of the "mpc" object is empty. Assuming 2.
-->The "Weights.ManipulatedVariables" property of "mpc" object is empty. Assuming default 0.00000.
-->The "Weights.ManipulatedVariablesRate" property of "mpc" object is empty. Assuming default 0.10000.
-->The "Weights.OutputVariables" property of "mpc" object is empty. Assuming default 1.00000.

Extract the input disturbance model.

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

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);
-->The "PredictionHorizon" property of "mpc" object is empty. Trying PredictionHorizon = 10.
-->The "ControlHorizon" property of the "mpc" object is empty. Assuming 2.
-->The "Weights.ManipulatedVariables" property of "mpc" object is empty. Assuming default 0.00000.
-->The "Weights.ManipulatedVariablesRate" property of "mpc" object is empty. Assuming default 0.10000.
-->The "Weights.OutputVariables" property of "mpc" object 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 of "mpc" object 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 channel #1.
-->The "Model.Noise" property of the "mpc" object is empty. Assuming white noise on each measured output channel.
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 Modeling 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.

More About

collapse all

Tips

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

Introduced in R2006a

Was this topic helpful?