|
|
|
| R2012a Documentation → Model-Based Calibration Toolbox | |
Learn more about Model-Based Calibration Toolbox |
|
| Contents | Index |
| On this page… |
|---|
When you select a table in the tree (under feature or tables), you see the Table view.
Note For feature calibration (filling and optimizing table values by comparing a strategy or collection of tables with a model), see Performing Feature Calibrations. To fill a single table with model values, see Filling a Table From a Model. |
In CAGE, a table is defined to be either a one-dimensional or a two-dimensional lookup table. One-dimensional tables are sometimes known as characteristic lines or functions. Two-dimensional tables are also known as characteristic maps or tables. CAGE regards them both as similar objects.
Each lookup table has either one or two axes associated with it. These axes are normalizers. See About Normalizers.
For example, a simple MBT feature has two tables:
A two-dimensional table with speed and relative air charge as its normalizers
A one-dimensional table with AFR as its normalizer
The example following is a feature view. In the Tables view for manual calibration, you do not see the lower comparison pane because you are not comparing tables with a model.

The parts of the display are numbered and labeled as follows:
The table displays the values of the breakpoints and the values of the table.
The table breakpoint values are not necessarily identical to the normalizer breakpoints. When you create a table the breakpoint values are the same as the normalizer values. If you delete breakpoints from the normalizers the table size does not change, so the table column and row breakpoint values are interpolated between the remaining normalizer breakpoints. (See Viewing and Editing a Table.)
The graph of the table pane displays the table values graphically. (See Using the Graph of the Table.)
The comparison-of-results pane displays a comparison between the current output of the strategy and the feature model. (Only visible when calibrating a feature, see Inverting a Table.)
Note You can view and revert table changes in the History display by selecting View > History. For information, see Using the History Display. |
This section describes each of these parts in detail.
The table displays the values of your lookup table and displays the breakpoints of the normalizers. For example, the following table shows a lookup table with speed and relative air charge (load) as its normalizers.

To edit a value in the table, double-click the cell, then you can enter a value. Selected cells are blue except for the focussed cell which is white and outlined (typing edits the focussed cell). You can right-click to Copy or Paste values. You can also edit table values using the table graph, see below.
See also Filling a Table by Extrapolation, and Arithmetic Operations On Table Values for information on applying arithmetic operations to selected cell values or whole tables.
Note You can revert table changes in the History display. Select View > History. See Using the History Display. |
When you are satisfied with a region of the table, you might want to lock the cell values in that region, to ensure that those values do not change.
To lock or unlock a cell value, right-click the cell and select from the menu. Locked cells have a padlock icon in the display. You can also lock an entire table using the Table menu.
The table view displays both the table values and a graph of the table. This gives a useful display of the table's behavior. Shown is an example of a graph in dragging and rotation mode.

In the default mode, you can rotate the graph of the table by clicking and dragging the axes.
Select View > Edit Table Surface to alter values in the table by clicking and dragging vertically any point. In this mode, when you click a point, a blue line indicates the selected point in the table. To return to table rotation mode without altering table values, select View > Rotate Table Surface.
Note When editing the table surface you may drag a value unintentionally - to return to previous table values, use the History display. See Using the History Display. |
To fill a single table with model values, see Filling a Table From a Model.
Filling a table by extrapolation fills the table with values based on the values already placed in the extrapolation mask. Using the extrapolation mask is described below.
To fill a table by extrapolating over a preselected mask, click
or select Table > Extrapolate.
This extrapolation does one of the following:
If the extrapolation mask has points on a line, then CAGE performs linear extrapolation on points projected on to that line. The simplest case of this is when you try to fill a 2D table using data from a single row or column.
If the extrapolation mask has points on a plane, then CAGE uses the plane for extrapolation. The simplest case of this is when the mask has three points and the points are not on a line.
If the extrapolation mask has four or more ordered cells in a grid, then CAGE uses bilinear extrapolation.
If the extrapolation mask has four or more cells not on a grid, CAGE uses a thin plate spline (a type of radial basis function) to extrapolate the table values.
The extrapolation mask defines a set of cells that form the basis of any extrapolation.
For example, a speed-load (or relative air charge) table has values in the following ranges that you consider to be accurate:
Speed 3000 to 5000 rpm
Load 0.4 to 0.6
You can define an extrapolation mask to include all the cells in these ranges. You can then fill the rest of your table based on these values.
To add or remove a cell from the extrapolation mask,
Cells included in the extrapolation mask are colored yellow.
Cells that are locked and in the extrapolation mask are yellow and have a padlock icon.
When using feature calibration you can also generate the extrapolation mask from the boundary model or from the predicted error of the model. See Filling Tables by Extrapolation.
All the toolbar button functions are also found in the table menu: Initialize, Fill, Extrapolate, Fill by Inversion. For information on these see Optimizing Table Values.
The Table menu contains the following other options
Adjust Cell Values. This opens a dialog where you can specify an arithmetic operation to apply to either the whole table or only the cells currently selected. Arguments to operations can be numeric (plus 10) or percentages (minus 5%). You can set the selected cells to a value or to the mean. You can also apply user-defined functions. See Arithmetic Operations On Table Values. This function is also in the table context menu.
Extrapolation Mask
The following items are also in the table context menu:
Add Selection — Adds selected cells to the extrapolation mask.
Remove Selection — Removes selected cells from the extrapolation mask.
Clear Mask — This ensures that none of the cells are in the extrapolation mask.
Generate From PE — Generate extrapolation mask depending on the value of prediction error (PE). Only available for tables in feature calibration, as you must have a model to calculate PE. A dialog opens where you can specify the threshold value of PE below which you want to include cells in the mask. The dialog contains information about the range and mean of prediction error for the model to help you select a threshold.
Generate From Boundary Model — Generate extrapolation mask to include only cells within the boundary model. Only available for tables in feature calibration, as you must have a boundary model.
Extrapolate — Extrapolates values from the cells in the extrapolation mask to fill the whole table. Also in the toolbar.
Table Cell Locks The following items are also in the table context menu:
Lock Selection — Locks the selected cells and a padlock icon appears..
Unlock Selection — Unlocks the selected cells.
Lock Entire Table — Locks every cell in the current table.
Clear All Locks — Unlocks all cells in the table.
Convert to Model. This option converts a table directly to a model.
Properties. This opens the Table Properties dialog where you can set the precision type of the table data. You can also reach this from the Calibration Manager. See Table Properties.
The Table menu item Adjust Cell Values (also a right-click context menu item) opens a dialog where you can specify an arithmetic operation to apply to either the whole table or only the cells currently selected. Arguments to operations can be numeric (plus 10) or percentages (minus 5%). You can set the selected cells to a value or to the mean. You can also apply user-defined functions.
Right-click the table or select Table > Adjust Cell Values. The Adjust Cell Values dialog box appears.
Select the operation to apply from the list - plus, minus, times, divide, set to value, set to mean, or custom operation. Use the custom operation to specify your own function in a file.
Use the Value edit box to enter an argument. All operators accept a numeric argument (e.g. operator = plus, value = 10). You can also enter a percentage for the operators plus, minus, and set to value (e.g. `minus' `1%').
Select the radio buttons to apply the operation to either the whole table or only the cells currently selected, and click OK.
You can use the custom operation option to apply user-defined functions.
The custom function is called in this way:
newvalues = customfcn( currentvalue, selectedregion )
Where currentvalue is the matrix of table values and selectedregion is a logical matrix the same size as the table, that is "true" where a cell is selected by the user, and false otherwise.
The newvalues matrix should be the same size as currentvalue, and these numbers are put straight into the table.
EXAMPLES:
function table = addOne( table, region ) table(region) = table(region) + 1; return; function table = randomtable( table, region ) table( region ) = rand( nnz( region ), 1 ); function table = saturate( table, region ) maxValueAllowed = 150; table( region & table>maxValueAllowed ) = maxValueAllowed; minValueAllowed = 100; table( region & table<minValueAllowed ) = minValueAllowed ; return
As an illustration, to use the saturate example:
Select custom operation from the Operation list
Enter saturate in the Value edit box (the first function of that name found on the MATLAB path will be used), or click the browse button to locate the file.
Select the radio button to Apply to selected table cells, and click OK.
The selected table cells are saturated between the ranges specified in the function file (between 100-150).
![]() | Adding, Duplicating and Deleting Tables | Filling a Table From a Model | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |