Linearize Block to Uncertain Model

This example demonstrates how to specify a core Simulink® block to linearize to an uncertain variable and compute an uncertain linearization at the command line. To learn how to perform this task using the user interface, see Specify Uncertain Linearization for Core or Custom Simulink Blocks.

  1. Open the Simulink model.

    slexAircraftExample
  2. Double-click the Aircraft Dynamics Model block to view the subsystem.

  3. Specify uncertain variables for the gain blocks Zd and Mw in the Aircraft Dynamics Model subsystem.

    spec.Type = 'Expression';
    spec.Specification = ureal('Zd',-63.9979,'Percentage',20);
    BlockSubs(1) = struct('Name','slexAircraftExample/Aircraft Dynamics Model/Gain5','Value',spec);
    spec.Specification = ureal('Mw',-63.9979,'Percentage',20);
    BlockSubs(2) = struct('Name','slexAircraftExample/Aircraft Dynamics Model/Gain4','Value',spec);
    
  4. Compute the uncertain linearization.

    mdl = 'slexAircraftExample'; 
    sys = linearize(mdl,BlockSubs) 
    sys =
    
      Uncertain continuous-time state-space model with 1 outputs, 1 inputs, 7 states.
      The model uncertainty consists of the following blocks:
        Mw: Uncertain real, nominal = -64, variability = [-20,20]%, 1 occurrences
        Zd: Uncertain real, nominal = -64, variability = [-20,20]%, 1 occurrences
    
    Type "sys.NominalValue" to see the nominal value, "get(sys)" to see all properties, and "sys.Uncertainty" to interact with the uncertain elements.

sys is an uncertain state-space (uss) model.

Was this topic helpful?