Main Content

Insufficient 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 input design minimum and maximum values.

Open the ex_derived_min_max_4 Model

open_system("ex_derived_min_max_4")

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

  • The Inport block In1 has a design minimum but no specified maximum value, as shown by the annotation, [-1..].

  • The Gain block has a design range of [-1.5..1.5].

  • The Outport block Out1 has no design range specified.

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

Collect Ranges

  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_4 as the system you want to convert.

  4. Under Range Collection Mode, select Derived ranges.

  5. Click the Collect Ranges button.

    The Fixed-Point Tool displays the derived minimum and maximum values for the blocks in the model. The range analysis is unable to derive a maximum value for the Inport block, In1.

Fix Insufficient Design Ranges

  1. To fix the issue, specify a design maximum value for In1:

    1. In the model, double-click the Inport block, In1.

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

    3. In this tab, set Maximum to 1 and click OK. To update the diagram, press (Ctrl + D).

      The model displays the updated maximum value in the block annotation for In1, [-1..1].

  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 can now derive ranges for the Inport and Gain blocks.

    BlockDerived RangeReason

    Inport In1

    [-1..1]

    Uses specified design range on the block.

    Gain

    [-1.5..1.5]

    The design range specified on the Gain block is [-1.5..1.5]. The derived range at the block input is [-1..1] (the derived range at the output of In1). Therefore, because the gain is 2, the derived range at the Gain block output is the intersection of the propagated range, [-2..2], and the design range, [-1.5..1.5].

    Outport Out1

    [-1.5..1.5]

    Same as Gain block output because there is no locally specified design range on Outport block.

Related Topics