Main Content

Provide More Design Range Information

This example shows that if the analysis cannot derive range information because there is insufficient design range information, you can fix the issue by providing additional design range information.

Open Model

Open the ex_derived_min_max_5 model.

open_system("ex_derived_min_max_5.slx")

The model displays the specified design minimum and maximum values for the blocks in the model.

  • The Inport block In1 has a design range of [-10..20].

  • The rest of the blocks in the model have no specified design range.

To display design ranges in your model, in the Debug tab, select Information Overlays > Signal Data Ranges.

Collect Ranges in the Fixed-Point Tool

  1. From the Simulink® Apps tab, select Fixed-Point Tool.

  2. In the Fixed-Point Tool, under New workflow, select Iterative Fixed-Point Conversion.

  3. In the Fixed-Point Tool, under System Under Design (SUD), select ex_derived_min_max_5 as the system you want to convert.

  4. Under Range Collection Mode, select Derived ranges.

  5. Click the Collect Ranges button.

    When the analysis is complete, the Fixed-Point Tool displays the derived minimum and maximum values for the blocks in the model in the spreadsheet. Because the model contains a feedback loop, the analysis is unable to derive an output range for the Add block or for any of the blocks connected to this output.

  6. To fix the issue, specify design minimum and maximum values inside the feedback loop. For this example, specify the range for the Gain2 block:

    1. In the model, double-click the Gain2 block.

    2. In the block parameters dialog box, select the Signal Attributes tab.

    3. In this tab, set Output minimum to -20 and Output maximum to 40 and click OK.

  7. Clear previously collected ranges and rerun the range analysis.

    1. In the Fixed-Point Tool, under New workflow, select Range Collection.

      Changing workflows clears range data collected during the active workflow.

    2. Switch back to the Iterative Fixed-Point Conversion workflow.

    3. Select Derived ranges as the range collection mode.

    4. Click the Collect Ranges button again to rerun the range analysis.

    The range analysis uses the minimum and maximum values specified for Gain2 and In1 to derive ranges for all objects in the model.

Provide Additional Design Range Information

  1. To fix the issue, specify design minimum and maximum values inside the feedback loop. For this example, specify the range for the Gain2 block:

    1. In the model, double-click the Gain2 block.

    2. In the block parameters dialog box, select the Signal Attributes tab.

    3. In this tab, set Output minimum to -20 and Output maximum to 40 and click OK.

  2. Clear previously collected ranges and rerun the range analysis.

    1. In the Fixed-Point Tool, under New workflow, select Range Collection.

      Changing workflows clears range data collected during the active workflow.

    2. Switch back to the Iterative Fixed-Point Conversion workflow.

    3. Select Derived ranges as the range collection mode.

    4. Click the Collect Ranges button again to rerun the range analysis.

    The range analysis uses the minimum and maximum values specified for Gain2 and In1 to derive ranges for all objects in the model.

Related Topics