|
|
|
| R2012a Documentation → Model-Based Calibration Toolbox | |
Learn more about Model-Based Calibration Toolbox |
|
| Contents | Index |
| On this page… |
|---|
Overview of Optimization in CAGE |
You can use CAGE to solve many automotive optimization problems. For examples of problems you can solve with CAGE, see Optimization Problems You Can Solve with CAGE.
To reach the Optimization view, click the Optimization button in the left Processes pane.

In the Optimization view you can set up and view optimizations. The view is blank until you create an optimization. When you have optimizations in your project, the left pane shows a tree hierarchy of your optimizations, and the right panes display details of the optimization selected in the tree.
For any optimization, you need one or more models. You can run an optimization at a single point, or you can supply a set of points to optimize. The steps required are
Optimization functionality in CAGE is described in the following sections:
The steps for setting up and running optimizations are described in these sections:
Optimization Analysis describes using the optimization output views to analyze your results, fill tables and export results.
After you set up an optimization, you can apply it to a region in a set of tradeoff tables. See Automated Tradeoff.
You can define your own optimization functions for use in CAGE. See Writing User-Defined Optimizations.
There are tutorial examples to guide you through the optimization functionality. See the optimization sections in Gasoline Engine Calibration Case Study, Diesel Engine Calibration Case Study, Point-by-Point Diesel Engine Calibration Case Study, Example Composite Models and Modal Optimizations and Tutorial: Optimization and Automated Tradeoff, in the Getting Started documentation.
If you have the Parallel Computing Toolbox™ product available, you can distribute optimization runs to a cluster of computers. The optimization runs are then executed in parallel. This option can significantly reduce the computation time for larger problems where each run is taking a lot longer than the time it takes to send the problem to another computer.
This functionality only appears in the menu if you have the Parallel Computing Toolbox product installed.
To use parallel computing in your optimizations:
Select a scheduler for parallel computing. In CAGE select Optimization > Parallel Computing > Select Scheduler. The Parallel Computing Toolbox Scheduler dialog box appears. Select the configuration in the list that defines your scheduler, and click OK. You only need to do this once per user per machine.
If you have a multicore or multiprocessor machine you can use the default local scheduler to run local workers. To use a remote cluster you first need to set up a configuration.
To use parallel computing, select Optimization > Parallel Computing > Distribute Runs. A tick appears next to the menu item, and the Optimization Information pane shows Distributed runs: On. This setting is saved with your optimization. If you try to run the same optimization on a machine without parallel computing you see a warning.
If your optimization requires additional files (such as user-defined optimization scripts, function model files, user-defined models) you must also distribute these to the workers. To specify these, select Optimization > Parallel Computing > Set Job Parameters. In the dialog box, add files and paths required on the workers. Paths must be relative to the worker.
When you run the optimization, each run is performed on a worker. Running the optimization creates a parallel computing job, that distributes a task for each run.
CAGE displays a modal status dialog box, displaying progress messages until the job is completed. If the job is being held in the scheduler's execution queue, you see the message Waiting for job to be started. While the job runs, the progress bar tells you how many tasks are complete and how many tasks are currently running.
For more information about these terms and settings, see Parallel Computing Toolbox on the MathWorks Web site.
Note Opening matlabpool may prevent other jobs (e.g., parallel optimizations in CAGE) from being processed. See Parallel Model Building. |
CAGE provides a flexible optimization environment in which many automotive optimization problems can be solved. These problems can be divided into two main groups, point and sum problems. This section describes point problems.
In a point problem, a single optimization run can determine optimal control parameter values at a single operating point. To optimize control parameters over a set of operating points, an optimization can be run for each point.
Examples of point problems that CAGE can be used to solve are described below:
Find the optimal spark timing (SPK), intake valve timing (INTCAM) and exhaust valve timing (EXHCAM) at each point of a lookup table whose axes are engine speed (N) and relative load (L).
Optimized values of the control parameters are determined by running the following optimization at each point of the lookup table:
Objective: Maximize engine torque, TQ = TQ(N, L, SPK, EXHCAM, INTCAM)
Constraints:
Residual fraction <= 17% at each (N, L) operating point
Exhaust temperature <= 1290°C at each (N, L) operating point
Engine to be operated inside the operating envelope of the engine
Find the optimal mass of fuel injected (F), rail pressure (P), pilot timing (PT) and main timing (MT) at each point of a lookup table whose axes are engine speed (N) and engine torque (TQ).
Optimized values of the control parameters are determined by running the following optimization at each point of the lookup table:
Objective: Minimize brake specific fuel consumption, BSFC = BSFC(N, TQ)
Constraints:
Engine out NOx <= 0.001 kg/s at each (N, TQ) operating point
Engine out Soot emissions <= 0.0001 kg/s at each (N, TQ) operating point
Find the optimum spark timing (SPK) and exhaust gas recirculation (EGR) at each point of a set of operating points defined by engine speed (N), engine load (L) pairs. Optimized values of SPK and EGR are determined by running the following optimization at each point:
Objective: Maximize engine torque, TQ = TQ(N, L, SPK, EGR)
Constraints: Engine out NOx <= 400 g/hr at each (N, L) operating point
For a new engine, find out the optimal torque versus NOx emissions curve for this engine over the operating range of the engine. This is a multi-objective optimization, and CAGE Optimization contains an algorithm (NBI) to solve these problems.
For this example, the optimal torque-NOx curve is determined by solving the following optimization problem for optimal settings of spark timing (SPK) and exhaust gas recirculation (EGR):
Objectives:
Maximize engine torque, TQ = TQ(N, L, SPK, EGR)
Minimize engine out NOx = NOx(N, L, SPK, EGR)
To find out more about solving multiobjective optimization problems in CAGE, see Set Up Multiobjective Optimizations.
For engines with multiple operating modes, find the best operating mode for each operating point. See Set Up Modal Optimizations.
To find out more about solving point optimization types of problems in CAGE, see Create an Optimization.
In a sum optimization, a single optimization run can determine the optimal value of control parameters at several operating points simultaneously. All the control parameters for the operating points are optimized by calling the algorithm once (there's only one call to foptcon per run for a sum optimization). This approach contrasts with a point optimization, which has to make a call to the algorithm for every point to find the optimal settings of the control parameters.
Find the optimal spark timing (SPK), intake valve timing (INTCAM) and exhaust valve timing (EXHCAM) at each point of a look-up table whose axes are engine speed (N) and relative load (L).
Optimized values of the control parameters are determined by running the following optimization once:
Objective: Maximize weighted sum of engine torque, TQ = TQ(N, L, SPK, EXHCAM, INTCAM) over the (N, L) points of a look-up table.
Constraints:
Difference in INTCAM between adjacent cells is no greater than 5°.
Difference in EXHCAM between adjacent cells is no greater than 10°.
At each table cell, residual fraction <= 17%
At each table cell, exhaust temperature <= 1290°C
Find the optimal start of injection (SOI), basefuelmass (BFM), fuel pressure (P), turbo position (TP) and lift of the EGR valve (EGR) at a set of mode points defined by engine speed (N), engine torque (TQ) pairs.
Optimized values of the control parameters are determined by running the following optimization once:
Objective: Maximize weighted sum of brake specific fuel consumption, BSFC = BSFC(SOI, BFM, P, TP, EGR, N, TQ) over the (N, TQ) mode points.
Constraints:
Weighted sum of brake specific NOx must be less than a legislated maximum
At each mode point, air fuel ratio must be greater than a specified minimum
At each mode point, turbo speed must not exceed a specified maximum
To find out more about solving these types of problems in CAGE, see Set Up Sum Optimizations.
![]() | Optimization Setup | Create an Optimization | ![]() |

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 |