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.
ex_range_conflict model. At the MATLAB® command line,
The model displays the specified design minimum and maximum values for the blocks in the model.
The Inport blocks
In2 have a design range of
The Outport block
Out1 has a
design range of
To display design ranges in your model, in the Debug tab, select Information Overlays > Signal Data Ranges.
From the Simulink® Apps tab, select Fixed-Point Tool.
In the Fixed-Point Tool, under New workflow, select
Iterative Fixed-Point Conversion.
In the Fixed-Point Tool, under System Under Design (SUD),
ex_range_conflict as the system you want to
Under Range Collection Mode, select Derived ranges.
Click the Collect Ranges button.
The Fixed-Point Tool reports an error because the derived range for the
[-2..2] is outside the
specified design range for the Outport block,
To fix the conflict, change the design range on the Outport
[-10..20] so that this range includes the derived
range for the Sum block.
In the model, double-click the Outport block.
In the block parameters dialog box, click the Signal Attributes tab.
In this tab, set Minimum to
-10 and click
Clear previously collected ranges and rerun the range analysis.
In the Fixed-Point Tool, under New workflow,
Changing workflows clears range data collected during the active workflow.
Switch back to the
Select Derived ranges as the range collection mode.
Click the Collect Ranges button again to rerun the range analysis.
The range analysis derives a minimum value of
-2 and a
maximum value of
2 for the Outport