Derive Ranges Using Block Initial Conditions

This example shows how range analysis takes into account block initial conditions.

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

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

    The model uses block annotations to display the specified design minimum and maximum values for the Inport block and the initial conditions for the Unit Delay block.

    • In1 design range is [5..10].

    • Unit Delay block initial condition is 0.

    Tip

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

  2. In the model, select Analysis > 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_2 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.

    In the spreadsheet, the Fixed-Point Tool displays the derived minimum and maximum values for the blocks in the model.

    The derived minimum and maximum range for the Outport block, Out1, is [0..10]. The range analysis derives this range by taking the union of the initial value, 0, on the Unit Delay block and the design range on the block, [5..10].

  6. Change the initial value of the Unit Delay block to 7.

    1. In the model, double-click the Unit Delay block.

    2. In the Block Parameters dialog box, set Initial condition to 7, then click OK.

    3. In the Fixed-Point Tool, click the Collect Ranges button.

      Because the analysis takes the union of the initial conditions, 7, and the design range, [5..10], on the Unit Delay block, the derived range for the block is now [5..10].

Related Topics