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:
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.
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.
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 touss
, such asumat
,ureal
,umargin
, andultidyn
. The model depends on a set of uncertain variables (ureal
,umargin
, orultidyn
) 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
, whereunc_sys
is defined asss(ureal('a',-5),5,1,1)
in the workspace.
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 variablesg
andtau
. To do so, enter a structure with fieldsg
andtau
in the Uncertainty value (struct or [] to use nominal value) field. You can also enter[]
to use the nominal values of the uncertain parametersg
andtau
.Tip: You can also use this field to vary the uncertainty values for performing Monte Carlo simulation. For more information, see Simulate Uncertainty Effects.
(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:
Simulate the model using nominal, manually-defined or random values, as described in Simulate Uncertainty Effects.
Perform an uncertain linearization, as described in Obtain Uncertain State-Space Model from Simulink Model.