|
|
|
| R2011b Documentation → Model-Based Calibration Toolbox | |
Learn more about Model-Based Calibration Toolbox |
|
| Contents | Index |
| On this page… |
|---|
The feature contains both a strategy (which is a collection of tables) and a model. You can use CAGE to fill the lookup tables using the model as a reference.
These are the three steps to calibrate a feature, described in these sections:
Click the expand icon,
, to expand the nodes and display all the tables
and normalizers in the feature.

Each node in the display has a different view and different operations.
Normalizers are the axes for the lookup tables. Currently, Norm_N has 12 breakpoints; the other normalizers have 10 breakpoints each. This section describes how to set values for the normalizers Norm_N and Norm_L, based on the torque model, tq.
To display the Normalizer view, select the normalizer Norm_N in the branch display.

The Normalizer view has two panes, Norm_N and Norm_L.
In each pane, you see
An input/output table
A normalizer display
A breakpoint spacing display
In both Normalizer panes, the Input Output table and the Normalizer Display show the position of the breakpoints.
The Breakpoint Spacing display shows a blue slice through the model with the break points overlaid as red lines.
For a more detailed description of the Normalizer view, see Normalizer View in the CAGE documentation.
You now must space the breakpoints across the range of each variable. For example, Norm_N takes values from 500 to 6500, the range of the engine speed.
To space the breakpoints evenly throughout the data values,
Click Initialize
in the toolbar. Alternatively,
select Normalizer > Initialize.
This opens a dialog box that suggests ranges for Norm_N and Norm_L.
To accept the default ranges of values of the data, click OK.

A better fit between model and table can often be achieved by spacing the breakpoints nonlinearly.
Click Fill
in the toolbar. Alternatively,
select Normalizer > Fill.
This opens a dialog box that suggests ranges for Norm_N and Norm_L. It also suggests values for AFR and SPK; these values are the set points for AFR and SPK.
To accept the values in the dialog box, click OK.
This ensures that the majority of the breakpoints are where the model is most curved. The table now has most values where the model changes most. So, with the same number of breakpoints, the table is a better match to the model.
For more information about calibrating the normalizers, see About Normalizers in the CAGE documentation.

You can now calibrate the lookup tables; this is described in the next section.
The lookup tables currently have zero as the entry for each cell. This section demonstrates how to fill the table T with values of torque using the torque model, tq. To view the Table display, click the T node.

This view has three panes: the table, the graph, and the comparison-of-results pane.
To fill the table with values of the model at the appropriate operating points,
This opens the Feature Fill Wizard.

Observe the T table check box is selected, but you can also fill multiple tables at once using the wizard. You can Fill from the top feature node or from any table node in a feature. On the first screen you can set table bounds to avoid extrapolating to infeasible values, choose whether to only fill cells in the extrapolation mask, and choose whether to extrapolate automatically.
Leave the settings at the defaults and click Next.
On this screen you can see the tq model is selected to fill the table. Here you could also set up constraints, for example using a boundary model to constrain filling to table areas where data was collected, and you can link other models or features to inputs.

Leave the settings at the defaults and click Next.
Here you can set variable values for optimizing over.

By default the table's normalizer breakpoints (here N and L) and the set points of the other variables (A and SPK) are selected. You can select different normalizers, and edit values in the Values edit box to optimize over a range rather than at a single point. If you choose a range of values the table will be filled using the average model value at each cell. You can use the Interleave setting to add values between normalizer breakpoints to optimize over a finer grid than the number of table cells.
Leave the settings at the defaults and click Next.
Click Fill Tables.

The graph shows the progress of the optimization. Select all the check boxes and click Finish.
Plots are created of the filled table surface and the error between the table values and the model.
The following view shows the table filled with values of the model.

The following comparison-of-results pane shows how good a fit the strategy is to the model.

The model is represented by the multicolored surface and the strategy is the blue surface.
The table T is now filled with optimized values compared to the model at these operating points.
For more information about the process of filling tables, see Calibrating the Tables in the CAGE documentation
Now you must fill the tables F_A and F_SPK and their normalizers. The tables are modifiers for AFR and the spark angle respectively. These steps are described in the next section.
A feature is a strategy (which is a collection of tables) and a model. Currently the torque table, T, is filled with optimized values compared to the torque model, tq. You must now calibrate the normalizers and tables for F_A and F_SPK.
You could calibrate the normalizers and then the tables for F_A and F_SPK in turn. However, CAGE enables you to calibrate the entire feature in one procedure.
To view the Feature view following, click the New_Feature node.

To calibrate all the tables and their normalizers,
Select Feature > Initialize (or use the Initialize toolbar button). The Feature Initialization Options dialog appears.
Clear the Enable check boxes for Breakpoints of T, and Values of T, as shown.

You have already optimized the breakpoints and table values for table T, so you only want to initialize the other tables F_A and F_SPK.
Click OK.
Select Feature > Fill (or use the Fill
toolbar button) to open the Feature
Fill Wizard. This time select only the F_A table to fill, and follow
the steps in the wizard to fill this table: click Next 3 times then
click Fill Tables. Select the F_A table node
to view the results.
Select F_SPK table node and click Fill
. Repeat the wizard steps to fill
the table.
All three tables and normalizers are filled.
As the model and the feature are four-dimensional objects, it is difficult to fully view a comparison between the feature and the model. A meaningful comparison is shown in the lower half of the following figure (select the F_A node in the branch display). The equation model = strategy is rearranged so that the table is compared to the model and the remainder of the strategy. CAGE runs an optimization routine over the feature to minimize the total square error between the model and the feature.

This display shows that the range of the normalizer for F_A is 11 to 17, the range of AFR. The lower pane shows a comparison between the blue line of the strategy and a red slice through the model, over the range of AFR.
This completes the calibration of the torque feature.
For more information about calibrating features, see Calibrating the Feature Node in the CAGE documentation.
You can now export the calibration.
![]() | Setting Up a Feature Calibration | Exporting Calibrations | ![]() |

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 |