derive ranges using design ranges
this example shows how the range analysis narrows the derived range for the outport block. this range is based on the range derived for the add block using the design ranges specified on the two inport blocks and the design range specified for the add block.
open the model and view design ranges
open the model. at the matlab command line, enter:
open_system('ex_derived_min_max_1')
update the diagram to display the specified design minimum and maximum values for each block.
in1
design range is[-50..100]
.in2
design range is[-50..35]
.add block design range is
[-125..55]
.
derive ranges
from the simulink® apps tab, select fixed-point tool.
in the fixed-point tool, under new workflow, select
iterative fixed-point conversion
.under system under design (sud), select
ex_derived_min_max_1
as the system you want to convert.under range collection mode, select derived ranges.
click the collect ranges button.
to calculate the derived range at the add block input, the software uses the design minimum and maximum values specified for the inport blocks,
[-50..100]
and[-50..35]
. the derived range at the add block input is[-85..150]
.when the analysis is complete, the fixed-point tool displays the derived and design minimum and maximum values for the blocks in the selected system in the spreadsheet.
the derived range for the add block output signal is narrowed to
[-85..55]
. this derived range is the intersection of the range derived from the block inputs,[-85..150]
, and the design minimum and maximum values specified for the block output,[-125..55]
.note
the accumulator in the add block does not participate in derived range analysis. ranges are derived only for block output signals.
the derived range for the outport block
out1
is[-85..55]
, the same as the add block output.
tip
to display design ranges in your model, in the debug tab, select information overlays > signal data ranges.