| 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… |
|---|
Introducing the Variable Dictionary View Importing and Exporting a Variable Dictionary |
The Variable Dictionary is a store for all the variables, constants, and formulae in your session.
To view or edit the items in the Variable Dictionary, click the button, shown, in the Data Objects pane.
![]()
Selecting the Variable Dictionary view displays the variables, constants, and formulae in the current project.
Note that if you have existing CAGE projects you can use the CAGE Import Tool to import variable items and other CAGE items directly from other projects.
Following is an example of the Variable Dictionary view.

The upper pane shows a list of all the current variables, constants, and formulas. The lower pane displays edit boxes so you can specify the settings of the selected variable, constant, or formula.
Different Variable Dictionary Items
Variables — standard items that feed into models, strategies and tables, and define ranges for these items
Constant — used for inputs that you do not want to change
Formulae — used when you want a variable item to depend on another
A variable dictionary contains all the variable items for your calibrations. You can set up your variable dictionary once, and use it in many calibrations.
If you import a model, it has variables associated with it, in which case you might not have to import a variable dictionary.
To import a dictionary of variables from an .xml file,
Note you can also import variable items directly from other CAGE projects using the CAGE Import Tool.
After setting up a variable dictionary, you can save the dictionary for use in many different calibrations.
To export a dictionary of variables to an .xml file,
To add variable items you can use the Variable Dictionary toolbar, shown, or you can select items from the File -> New -> Variable Items menu.

To add a variable,
Select File > New > Variable Item > Variable.
A new variable is added to the variable dictionary.
Specify the Minimum and Maximum values of the variable in the edit boxes in the lower pane.
Using Set Points in the Variable Dictionary. The set point of a variable is a point that is of particular interest in the range of the variable. You can edit set points in the variable dictionary or the models view.
For example, for the air/fuel ratio variable, AFR, the range of values is typically 11 to 17. However, whenever only one value of AFR is required, it is preferable to choose 14.3, the stoichiometric constant, over any other value. So enter 14.3 as the Set Point.
CAGE uses the set point as the default value of the variable wherever one value from the variable range is required. For instance, CAGE uses the set point when evaluating a model over the range of a different variable.
For example, a simple model for torque depends on AFR, engine speed, and relative air charge. CAGE uses the set point of AFR when it calculates the values of the model over the ranges of the engine speed and relative air charge.
To add a constant,
Select File > New > Variable Item > Constant.
A new constant is added to the variable dictionary.
Specify the value of the constant in the Set Point edit box, in the lower pane.
You might want to add a formula to your session. For example,
the formula
![]()
where afr is the air/fuel ratio and stoich is the stoichiometric constant.
To add a formula,
Select File > New > Variable Item > Formula.
The Add Formula dialog box appears.
In the dialog, enter the right side of the formula, as in this example afr/stoich. Note it is normal to create inputs to a formula first. If you do not use pre-existing variable names then those inputs are created, so be careful to get input names exactly correct. Follow these requirements for a valid formula string:
A formula can only have exactly one variable input
No formulae as inputs
Not circular (i.e. self referencing)
Must not error when evaluated
Must produce a vector for a vector input
Must be invertible
Click OK and a new formula is added to the variable dictionary.
The Variable menu in the variable dictionary enables you to alter variable items. These choices are also available in the right-click context menu on the list view.
Change item to:
Alias
Changes the selected item to be an alias of another item in the current project. For example, if you have two variables, engine_speed and n, you can change n to be an alias of engine_speed, with its maximum and minimum values. For more information, see the next section, Using Aliases.
Formula
Changes a variable or constant into a formula. You have to define the right side of the formula, and you can select the check box to calculate the range.
Constant
Changes a variable or formula into a constant. The value of the constant is the set point of the old item.
Variable
Changes a constant or formula into a variable. The range is from 0 to twice the constant's value (negative values have a maximum of 0).
The variable dictionary enables you to use the same set of variables, constants, and formulas with many different models and calibrations.
It is possible that in one model or strategy the engine speed has been defined as N, and in another it has been defined as rpm. The alias function enables you to automatically link inputs with various names to a single CAGE variable when you import models and strategies.
For example, in a variable dictionary there are two variables:
N, with a range of 500 to 6500
rpm, with a range of 2500 to 3500
To set rpm to be an alias of N,
This eliminates the variable rpm from your variable dictionary, and every model and calibration that refers to rpm now refers to N instead.
Note If N is made an alias of rpm in the preceding example, the range of N is restricted to the range of rpm, 2500 to 3500. |
You can also add aliases to existing items by entering a list of names in the Alias edit box.
![]() | CAGE Import Tool | Setting Up Models | ![]() |

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 |