|
|
|
| R2012a Documentation → Model-Based Calibration Toolbox | |
Learn more about Model-Based Calibration Toolbox |
|
| Contents | Index |
| On this page… |
|---|
Start CAGE by typing
cage
at the MATLAB prompt.
Before you can perform a calibration, you must set up the variable dictionary and models that you want to use.
To set up the variables and constants that you want to use in your calibration,
The Variable Dictionary view displays all the variables, constants, and formulas in a session. This is empty until you add some variable items.
There are two ways in which you can set up variables:
Import a variable dictionary
Add variables and constants to your session
After setting up your variables and constants, you can export the variable dictionary to use in other calibrations.
To import a variable dictionary,
Select the tutorial.xml file found in matlab\toolbox\mbc\mbctraining and click Open. CAGE automatically switches to the Variable Dictionary view.
This imports a set of variables and a constant. In this example, the variable dictionary contains
The stoichiometric constant, stoich
N, engine speed
L, load
A, AFR
Your display should resemble the following.

To add a variable for the spark angle,
Click New Variable
in the toolbar. This adds a new
variable to your dictionary.
Right-click the new variable and select Rename (or press F2) to rename the variable.
Set the range of the variable by entering -5 as the Minimum and 50 as the Maximum.
The variable dictionary enables you to specify different names for the same variable, and also give descriptions of variables. For example, the variable spk might be referred to as S or spark in other models.
To ensure that CAGE recognizes an instance of S or spark as the same as spk, specify the aliases of SPK:
The variable dictionary enables you to specify a preferred value for a variable. For example, in the preferred value of the variable, AFR is set as the stoichiometric constant 14.35.
A model in the Model-Based Calibration Toolbox product is a function of a set of variables. Typically, you construct a model using the Model Browser; then you can use CAGE to calibrate lookup tables by reference to the model.
The following example uses a model of the behavior of torque with varying spark angle, air/fuel ratio, engine speed, and load.
To import a model built using the Model Browser,
Browse to matlab\toolbox\mbc\mbctraining, select the tutorial.exm file (this is a copy of the torque model built in the Model Browser's Quick Start tutorial), and click Open. The Model Import Wizard appears.
There are two models stored in this file, tq and knot. Highlight tq and select the check box to Automatically assign/create inputs.
CAGE automatically assigns variables in the variable dictionary to the model input factors or their aliases (as long as names are exact). If names are not exact you can select variables manually using the wizard.
CAGE switches to the Models view, as shown following.

For more information about models, see Setting Up Models in the CAGE documentation.
![]() | What Are Feature Calibrations? | Setting Up a Feature Calibration | ![]() |

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 |