Main Content

Specify Uncertainty Using Uncertain State Space Blocks

How to Specify Uncertainty in Uncertain State Space Blocks

Specifying uncertainty in the Uncertain State Space block makes the uncertainty a part of the Simulink® model and affects both simulation and linearization. Use this approach to vary the uncertainty and analyze the effects on simulation or linearization.

To specify uncertainty in the Uncertain State Space block:

  1. Drag and drop an Uncertain State Space block from the Robust Control Toolbox™ block library into a Simulink model. For more information on how to open the block library, see Simulink Blocks for Analyzing Uncertainty.

    Simulink model canvas containing one Uncertain State Space block in its default state

  2. In the Simulink model, double-click the Uncertain State Space block to open the Function Block Parameters: Uncertain State Space dialog box, as shown in the following figure.

    Block parameters of the Uncertain State Space block, shown in the block dialog box. The block parameters are Uncertain system variable, Uncertainty value, Initial states (nominal dynamics), and Initial states (uncertain dynamics).

  3. Specify an uncertain state-space model in the Uncertain system variable (uss) field. The model must be an uss object or any other model that can be converted to uss, such as umat, ureal, umargin, and ultidyn. The model depends on a set of uncertain variables (ureal, umargin, or ultidyn) and you can specify the model as one of the following:

    • Function or expression that evaluates to an uss model. For example, ss(ureal('a',-5),5,1,1).

    • Variable, defined in the MATLAB® workspace. For example, unc_sys, where unc_sys is defined as ss(ureal('a',-5),5,1,1) in the workspace.

  4. Specify values for the uncertain variables that the uncertain state-space model you specify in step 3 uses. For example, if you specify the uncertain system as ureal('g',2)*tf(1,[ureal('tau'),1]), then you must specify values for the uncertain variables g and tau. To do so, enter a structure with fields g and tau in the Uncertainty value (struct or [] to use nominal value) field. You can also enter [] to use the nominal values of the uncertain parameters g and tau.

    Tip: You can also use this field to vary the uncertainty values for performing Monte Carlo simulation. For more information, see Simulate Uncertainty Effects.

  5. (Optional) Specify the initial states of the nominal and uncertain dynamics in the Initial states (nominal dynamics) and Initial states (uncertain dynamics) fields, respectively.

For more information on the block parameters, see the Uncertain State Space block reference page.

Next Steps

After you specify uncertainty in Uncertain State Space blocks, you can perform one of the following: