In some cases, you cannot use Uncertain State Space blocks in the Simulink® model because you share the model or generate code. You can still account for uncertainty in your linear analysis without specifying uncertainty using Uncertain State Space blocks. Robust Control Toolbox™ lets you specify a core or custom Simulink block to linearize to an uncertain variable. The linearization produces an uncertain state-space uss model. The specified uncertainty associates only with the block and does not affect the model simulation. For more information, see Controlling Block Linearization in the Simulink Control Design™ documentation.
Note If you have Uncertain State Space blocks in the model and want to obtain an uncertain state-space model, see Obtain Uncertain State-Space Model from Simulink Model.
To specify blocks to linearize to uncertain variables and obtain an uncertain state-space model:
For this example, you can open the model rct_ulinearize_builtin.
Right-click the block and select Linear Analysis > Specify Selected Block Linearization.
This action opens the Block Linearization Specification dialog box.
In the Block Linearization Specification dialog box, select the Specify block linearization using one of the following: check box. Selecting this check box lets you to specify an uncertain variable for linearization.
This check box defaults to MATLAB Expression in the drop-down menu. This option lets you specify the block to linearize to an uncertain variable using a MATLAB® expression containing Robust Control Toolbox functions. To learn more about the options, see Controlling Block Linearization in the Simulink Control Design documentation.
In the Enter an expression to specify the linearization of the Simulink block field, enter an expression, which must evaluate to an uncertain variable or uncertain model, such as ureal, umat, ultidyn or uss.
Click OK to save the changes.
Note You can also specify a block to linearize to an uncertain variable at the command line. For an example, see Linearize Block to Uncertain Model.
Run the linearize command to compute an uncertain linearization. This command returns an uss model.
For more information on linearization and how to validate linearization results, see Linearization Basics in the Simulink Control Design documentation.