| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Model-Based Calibration |
| Contents | Index |
| Learn more about Model-Based Calibration |
| On this page… |
|---|
If you are considering a straightforward strategy, you might want to fill tables directly from experimental data. For example, a simple torque strategy fills a lookup table with values of torque over a range of speed and relative air charge, or load. You can use CAGE to fill this strategy (which is a set of tables) by referring to a set of experimental data. You can also fill tables with the output of optimizations.
This tutorial takes you through the steps of calibrating a lookup table for torque, based on experimental data.
This section describes the steps required to set up CAGE in order to calibrate a table by reference to a set of data.
Filling the Table from the Experimental Data describes the process of filling the lookup table.
Selecting Regions of the Data describes how you can select some of the data for inclusion when you fill the table.
Exporting the Calibration describes how to export your completed calibration.
cage
at the MATLAB prompt.
If you already have a CAGE session open, select File > New Project.
First you will set up a blank table ready for filling using experimental data or optimization output.
The steps that you need to follow to set up the CAGE session are
Add the variables for speed and load by importing a variable dictionary.
Add a new table to your session.
The next sections describe each of these processes in detail.
Before you can add tables to your session, you must add variables to associate with the normalizers or axes.
To add a variable dictionary,
This loads a variable dictionary into your session. The variable dictionary includes the following:
N, the engine speed
L, the relative air charge
A, the air/fuel ratio (AFR)
stoich, the stoichiometric constant
You can now add a table to your session.
You must add a table to fill.
To add a new table,
This opens a dialog box that asks you to specify the variable names for the normalizers. As you can see in the dialog controls, accepting the defaults will create a table with ten rows and ten columns with an initial value of 0 in each cell.
Select L as the variable for normalizer Y and N as the variable for normalizer X, then click OK.
CAGE takes you to the Tables view, where you can see the following.

CAGE has automatically initialized the normalizers by spacing the breakpoints evenly across the range of values for the engine speed (N) and load (L). The variable ranges are found in the variable dictionary. Switch to the Normalizer view to inspect the normalizers.
Expand the table branch by clicking
, and select NNormalizer as
shown.

This displays the two normalizers for the table.
You have an empty table with breakpoints over the ranges of the engine speed and load, which you can fill with values based on experimental data.
To fill a table with values based on experimental data, you must add the data to your session. If you want to fill a table with the output of an optimization, the output appears automatically in the Data Sets view as a new data set called Exported_Optimization_Data when you select the Export to Data Set toolbar button. For this tutorial you need to import some experimental data.
CAGE uses the Data Sets view to store grids of data. Thus, you need to add a data set to your session as well.
Select File > New > Data Set to add a data set to your session. This changes the view to the Data Set view.
You can now import experimental data into the data set:
In the file browser, select meas_tq_data.csv from the matlab\toolbox\mbc\mbctraining directory and click Open.
This set of data includes six columns of data: the test cell settings for engine speed (RPM), and the measured values of torque (tqmeas), engine speed (nmeas), air/fuel ratio (afrmeas), spark angle (spkmeas), and load (loadmeas).
This opens the Data Set Import Wizard. The first screen asks which of the columns of data you want to import. Click Next to import them all.
The following screen asks you to associate variables in your project with data columns in the data.
Highlight N in the Project Assignments column and nmeas in the Data Column, then click the assign button, shown.
![]()
Repeat this to associate L with loadmeas. The dialog box should be the same as the following.

You now have an empty table and some experimental data in your session. You are ready to fill the table with values based on this data.
![]() | Tutorial: Filling Tables from Data | Filling the Table from the Experimental Data | ![]() |

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