Fixing Design Range Conflicts

This example shows how to fix design range conflicts. If you specify conflicting design minimum and maximum values in your model, the range analysis software reports an error. To fix this error, examine the design ranges specified in the model to identify inconsistent design specifications. Modify them to make them consistent. In this example, the output design range specified on the Outport block conflicts with the input design ranges specified on the Inport blocks.

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

    addpath(fullfile(docroot,'toolbox','fixpoint','examples'))
    ex_range_conflict

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

    • The Inport blocks In1 and In2 have a design range of [-1..1].

    • The Outport block Out1 has a design range of [10..20].

    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_range_conflict 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 reports an error because the derived range for the Sum block, [-2..2] is outside the specified design range for the Outport block, [10..20].

  6. To fix the conflict, change the design range on the Outport block to [-10..20] so that this range includes the derived range for the Sum block.

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

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

    3. In this tab, set Minimum to -10 and click OK.

  7. Click the Collect Ranges button to rerun the range analysis.

    The range analysis derives a minimum value of -2 and a maximum value of 2 for the Outport block.

Related Topics