Main Content

Derive Ranges Using Design Ranges

This example shows how the range analysis narrows the derived range for theOutport块。这个范围是on the range derived for theAddblock using the design ranges specified on the twoInportblocks and the design range specified for theAdd块。

Open the Model and View Design Ranges

Open the model. At the MATLAB command line, enter:

open_system('ex_derived_min_max_1')

Update the diagram to display the specified design minimum and maximum values for each block.

  • In1design range is[-50..100].

  • In2design range is[-50..35].

  • Add block design range is[-125..55].

Derive Ranges

  1. From the Simulink®Appstab, selectFixed-Point Tool.

  2. In the Fixed-Point Tool, underNewworkflow, selectIterative Fixed-Point Conversion.

  3. UnderSystem Under Design (SUD)中,选择ex_derived_min_max_1as the system you want to convert.

  4. UnderRange Collection Mode中,选择Derived ranges.

  5. Click theCollect Rangesbutton.

    To calculate the derived range at theAddblock input, the software uses the design minimum and maximum values specified for theInportblocks,[-50..100]and[-50..35]. The derived range at theAddblock input is[-85..150].

    When the analysis is complete, the Fixed-Point Tool displays the derived and design minimum and maximum values for the blocks in the selected system in the spreadsheet.

    • The derived range for theAddblock output signal is narrowed to[-85..55]. This derived range is the intersection of the range derived from the block inputs,[-85..150], and the design minimum and maximum values specified for the block output,[-125..55].

      Note

      The accumulator in theAddblock does not participate in derived range analysis. Ranges are derived only for block output signals.

    • The derived range for theOutportblockOut1is[-85..55], the same as theAddblock output.

Tip

To display design ranges in your model, in theDebugtab, selectInformation Overlays > Signal Data Ranges.

Related Topics