Skip to Main Content Skip to Search
Product Documentation

Performing Feature Calibrations

What Are Feature Calibrations?

A 'feature' calibration is the process of calibrating lookup tables and their normalizers by comparing an ECU strategy (represented by a Simulink diagram) to a model.

The strategy is an algebraic collection of lookup tables. It is used to estimate signals in the engine that cannot be measured and that are important for engine control.

CAGE calibrates an electronic control unit (ECU) subsystem by directly comparing it with a plant model of the same feature.

There are advantages to feature calibration compared with simply calibrating using experimental data. Data is noisy (that is, there is measurement error) and this can be smoothed by modeling; also models can make predictions for areas where you have no data. This means you can calibrate more accurately while reducing the time and effort required for gathering experimental data.

Procedure for Feature Calibration

The basic procedure for performing feature calibrations is as follows:

  1. Set up the variables and constants. (See Setting Up Variable Items.)

  2. Set up the model or models. (See Setting Up Models.)

  3. Set up the feature calibration. (See Setting Up a Feature Calibration.)

  4. Initialize the feature. See Initializing Tables and Normalizers

  5. Calibrate the normalizers. (See Optimizing Normalizer Breakpoints.)

  6. (Optional) Calibrate the tables individually. (See Optimizing Table Values.)

  7. Calibrate the entire feature and view the results.. (See Optimizing Table Values and Comparing the Strategy and the Model.)

  8. Export the normalizers, tables, and features. (See Importing and Exporting Calibrations.)

The normalizers, tables, and features form a hierarchy of nodes, each with its own view and toolbar. The feature view is shown.

Working With Feature Tables

After you set up your session and your tables, you can calibrate your tables.

Highlight a table in the tree display to see the Table view. For more information about the Table view, see Editing Tables.

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.

Each lookup table has either one or two axes associated with it. These axes are normalizers. See About Normalizers for more information.

For example, a simple MBT feature has two tables:

Before you can calibrate your tables, you must calibrate your normalizers. For information, see Optimizing Normalizer Breakpoints.

This section describes how you can use CAGE to fill your lookup tables by reference to a model.

To fill the table values, either click the buttons in the toolbar, , or select from the following options in the Table menu:

How CAGE Optimizes Normalizer Breakpoints

Optimizing breakpoints alters the position of the table normalizers so that the total square error between the model and the table is reduced.

This routine improves the fit between your strategy and your model. The following illustration shows how the optimization of breakpoint positions can reduce the difference between the model and the table. The breakpoints are moved to reduce the peak error between breakpoints. In CAGE this happens in two dimensions across a table.

To see the difference between optimizing breakpoints and optimizing table values, compare with the illustration in How CAGE Optimizes Table Values.

See Filling Methods for details on how the optimal breakpoint spacing is calculated.

Filling Methods

This section describes in detail the methods for spacing the breakpoints of your normalizers in CAGE.

ReduceError

Spacing breakpoints using ReduceError uses a greedy algorithm:

  1. CAGE locks two breakpoints at the extremities of the range of values.

  2. Then CAGE interpolates the function between these two breakpoints.

  3. CAGE calculates the maximum error between the model and the interpolated function.

  4. CAGE places a breakpoint where the error is maximum.

  5. Steps 2, 3, and 4 are repeated.

  6. The algorithm ends when CAGE locates all the breakpoints.

ShareAveCurv and ShareCurvThenAve

Consider calibrating the normalizers for speed, N, and relative air-charge, L, in the preceding MBT model.

In both cases, CAGE approximates the MBTAV(N, L) model, in this case using a fine mesh.

The breakpoints of each normalizer are calibrated in turn. In this example, these routines calibrate the normalizer in N first.

Spacing breakpoints using ShareAveCurv or ShareCurvThenAve calculates the curvature, K, of the model MBTAV(N, L),

as an approximation for

Both routines calculate the curvature for a number of slices of the model at various values of L. For example, the figure shown has a number of slices of a model at various values of L.

Then

Rule for Placing Breakpoints.  If j breakpoints need to be placed, the ith breakpoint, Ni, is placed where the average curvature so far is

Essentially this condition spaces out the breakpoints so that an equal amount of curvature (in an appropriate metric) occurs in each breakpoint interval. The breakpoint placement is optimal in the sense that the maximum error between the lookup table estimate and the model decreases with the optimal convergence rate of O(N-2). This compares with an order of O(N-1/2) for equally spaced breakpoints.

The theorem for determing the position of the unequally spaced breakpoints is from the field of Approximation Theory — page 46 of the following reference: de Boor, C., A Practical Guide to Splines, New York, Springer-Verlag, 1978.

How CAGE Optimizes Table Values

The Feature Fill Wizard optimizes the table values to minimize the current total square error between the feature values and the model.

This routine optimizes the fit between your strategy and your model. Using Fill places values into your table. The optimization process shifts the cell values up and down to minimize the overall error between the interpolation between the model and the strategy.

This process is illustrated by the following example; the green shaded areas show the error between the mesh model (evaluated at the number of grid points you choose) and the table values.

To see the difference between optimizing table values and optimizing the positions of breakpoints, compare with the illustration in How CAGE Optimizes Normalizer Breakpoints.

CAGE evaluates the model over the number of grid points specified in the Feature Fill Wizard, then calculates the total square error between this mesh model and the feature values. CAGE adjusts the table values until this error is minimized, using lsqnonlin if there are no gradient constraints, otherwise fmincon is used with linear constraints to specify the gradient of the table at each cell.

See Also

  


Recommended Products

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