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 of -1 but no specified maximum value, as shown by the annotation, Max=[].

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

    • The Outport block Out1 has no design range specified, as shown by the annotations, Min=[], Max=[].

    Tip

    To display design ranges in your model, from the model menu select Display > Signals & Ports and select Design Ranges.

  2. From the Simulink® Analysis menu, select Data Type Design > Fixed-Point Tool.

  3. In the Fixed-Point Tool, in the Prepare System section of the toolstrip, under System under design, select ex_derived_min_max_4 as the system you want to convert.

  4. In the Collect Ranges section of the toolstrip, 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. On this tab, set Maximum to 1 and click OK.

      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 no locally specified design range on Outport block.

Related Topics