Skip to Main Content Skip to Search
Product Documentation

Setting Up Calibrations

Starting CAGE

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.

Setting Up Variables

To set up the variables and constants that you want to use in your calibration,

  1. Click Variable Dictionary in the Data Objects pane of CAGE.

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:

After setting up your variables and constants, you can export the variable dictionary to use in other calibrations.

Importing a Variable Dictionary

To import a variable dictionary,

  1. Select File > Import > Variable Dictionary.

  2. 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

Your display should resemble the following.

Adding and Editing Variables and Constants

To add a variable for the spark angle,

  1. Click New Variable   in the toolbar. This adds a new variable to your dictionary.

  2. Right-click the new variable and select Rename (or press F2) to rename the variable.

  3. Enter SPK as the name.

  4. 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:

  1. Enter S, spark in the Alias edit box.

  2. Enter Spark advance (deg) in the Description edit box.

      Note   The Variable Dictionary is case sensitive: s and S are different.

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.

  1. Select SPK and enter 25 in the Set Point edit box to specify the preferred value.

Setting Up Models

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.

Importing a Model

To import a model built using the Model Browser,

  1. Select File > Import > Model, which opens a file browser.

  2. 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.

  3. 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.

  4. Click Finish to complete the wizard.

CAGE switches to the Models view, as shown following.

For more information about models, see Setting Up Models in the CAGE documentation.

  


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