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.

  1. Open the ex_derived_min_max_4 model. At the MATLAB® command line, enter:

    addpath(fullfile(docroot,'toolbox','fixpoint','examples'))
    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.

    Tip

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

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

  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. The tool highlights this result.

  6. 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.

  7. 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 In2

    [-1.5..1.5]

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

Related Topics