Products & Services Solutions Academia Support User Community Company


ufind

Purpose

Find uncertain variables in Simulink model

Syntax

Description

uvars = ufind ('mdl') finds Uncertain State Space blocks in the Simulink model mdl. It returns a structure uvars that contains all uncertain variables associated with the Uncertain State Space blocks. Each uncertain variable is a ureal or ultidyn object and is listed by name in uvars.

[uvars,pathinfo] = ufind('mdl') returns a cell array pathinfo that contains paths to the Uncertain State Space blocks and the corresponding uncertain variables in the block. The first column of pathinfo lists the block paths through the model hierarchy and the second column lists the uncertain variables associated with the block. Use pathinfo to verify that all Uncertain State Space blocks in the model mdl have been identified.

uvars = ufind(usys_1,usys_2,...) collects all uncertain variables referenced by the uncertain model usys_n. usys_n can be uss or ufrd models. Use this syntax as an alternative to querying the model itself, when you know the uncertain models that the Uncertain State Space blocks use.

ufind can find Uncertain State Space blocks inside Masked Subsystems, Library Links, and Model References but not inside Accelerated Model References. ufind errors out if the same uncertain variable name has different definitions in the model. For example, if your model contains two Uncertain State Space blocks where the uncertain system variables define the same uncertain variable "unc_par" as ultidyn('unc_par',[1 1]) and ureal('unc_par',5), such an error occurs.

Examples

Find all Uncertain State Space blocks and uncertain variables in a Simulink model:

  1. Open the Simulink model.

  1. The model, as shown in the following figure, contains three Uncertain State Space blocks named Unmodeled Plant Dynamics, Plant , and Sensor Gain. These blocks depend on three uncertain variables named input_unc, unc_pole and sensor_gain.

  1. Use ufind to find all Uncertain State Space blocks and uncertain variables in the model.
  2. Type uvars to view the structure uvars. MATLAB returns the following result:

  1. Each uncertain variable is a ureal or ultidyn object and is listed by name in uvars.

  1. View the Uncertain State Space block paths and uncertain variables.
    1. Type pathinfo(:,1) to view paths of the Uncertain State Space blocks in the model. MATLAB returns the following result:
      • ans = 
        
            'usim_model/Plant'
            'usim_model/Sensor Gain'
            'usim_model/Unmodeled Plant Dynamics'
        

    2. Type pathinfo(:,2) to view the uncertain variables referenced by each Uncertain State Space block. MATLAB returns the following results:
      • ans = 
        
            'unc_pole'
            'sensor_gain'
            'input_unc'
        

See Also

usample, Uncertain State Space block

Tutorials

Varying Uncertainty Values Using Individual Uncertain State Space Blocks

Varying Uncertainty Values Across Multiple Uncertain State Space Blocks

Robustness Analysis in Simulink

How To

Simulating Uncertainty Effects


 Provide feedback about this page 

Previous page udyn ufrd Next page

Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS