Intermediate Range Results
This example shows how to interpret the Intermediate Maximum and Intermediate Minimum results in the Result Details tab.
Open the model. At the MATLAB® command line, enter:
Update the diagram (Ctrl+D). Notice the design range information for each of the input ports.
To display design ranges in your model, in the Debug tab, select Information Overlays > Signal Data Ranges.
Open the Fixed-Point Tool. 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), select
ex_intermediateRangeas the system you want to convert.
Under Range Collection Mode, select Derived ranges.
Click the Collect Ranges button.
The Fixed-Point Tool displays the derived minimum and maximum values for each object in the
In the Convert section of the toolstrip, open the Settings menu.
In the Default word length field, enter
Click the Propose Data Types button .
The tool displays the proposed data types appear in the spreadsheet.
Look at the proposed data type of the Product block. The Fixed-Point Tool proposed a data type with 32-bit word length and 12-bit fraction length. The derived maximum value of the Product block is 1, but the maximum representable value for the proposed data type is approximately 1,048,575.
To learn more about the data type proposal, select the product block in the spreadsheet. The Result Details pane populates with information about the result.
In the Result Details pane, in the Ranges used for proposal table, notice the row labeled Intermediate. After the first two inputs to the Product block are multiplied, the block has a maximum value of 1000000 before being multiplied by the next two inputs for a final maximum value of 1. The data type proposal for the Product block in this model is based on the intermediate minimum and maximum values. It is not based on the derived minimum and maximum values to prevent overflows at the intermediate stages of the block.