|
|
|
| R2012a Documentation → Model-Based Calibration Toolbox | |
Learn more about Model-Based Calibration Toolbox |
|
| Contents | Index |
| On this page… |
|---|
Viewing and Selecting Modal Optimization Results |
After you run your modal optimization, use the optimization output node to verify the results. For general advice see Analyzing Point Optimization Output. The following process describes features specific to the results of modal optimizations.
Modal optimization results have more than one solution at each operating point. The modal optimization algorithm tries to automatically select the best mode for each operating point.
Use the optimization output node tools to view all solutions, see which solution is selected, and change the selections manually if you want. These features are also useful for selecting solutions for multiple objective optimizations (using the NBI algorithm) and multiple start points (using the MultiStart algorithm) that also have more than one solution per point.
Use the Solution Slice view to see all the results for a single mode at a time. In the Solution Slice table view, use the Current solution controls to change which mode results to display.
The default view in the GasolineComposite.cag example shows all the solutions for CylinderMode 1, the 4 cylinder mode. Set the Current solution to 2 to view solutions for CylinderMode 2(8 cylinder mode).
In the example shown following the table and contour plot shows the results for CylinderMode 2(8 cylinder mode) at every operating point.

To see which mode is selected as best for all operating points in one view, switch to the Selected Solution view. Select View > Selected Solution or use the toolbar button. The table and contour plot display the selected best solution for all operating points.

In the Selected Solution view, review the Results Contour plot to see which mode has been selected across all operating points. Use this view to verify the distribution of mode selection.
If you have extra objectives, you can also view them in the tables and plots. Use the other objectives to explore the results. For example you may want to manually change the selected mode based on an extra objective value. If you have extra objectives it can be useful to view plots of the other objective values at your selected solutions. To display another plot simultaneously, right-click the Results Contour title bar and select Split View.
Click to select a point in the table or Results Contour, and you can use the Selected solution controls (or the toolbar button) to alter which mode is selected at that point. You may want to change selected mode if another mode is also feasible at that point. For example, you can change the mode if you want to make the table more smooth.
In the GasolineComposite.cag example, some operating points can be run in either 4– or 8–cylinder mode. When both modes are feasible, the modal optimization algorithm selects the mode that results in the best torque.
Use the Pareto Slice view to see all the solutions for a particular operating point. You can inspect the objective value (and any extra objective values) for each solution. If needed, you can manually change the selected mode to meet other criteria, such as the mode in adjacent operating points, or the value of an extra objective. Change the selected solution using the Selected solution control or by selecting the solution and using the toolbar.
If you change the selected mode for a point, return to the Selected Solution view to observe the selected solutions for all operating points.
Check the messages and exit flags for each solution, shown in the Optimization Results table (hover over the Accept icons) and the Solution Information pane. Modal optimizations provide exit messages from fmincon and prefix the message with the mode number for the solution. See the fmincon function for exit messages. There is also an exit message specific to modal optimization: -7 which reports that the mode is not valid (NaN) for a particular operating point.
When you are satisfied with all selected solutions for your modal optimization you can make a sum optimization over all operating points. The mode must be fixed in the sum optimization to avoid optimizing a very large number of combinations of operating modes. For example, the GasolineComposite.cag example optimization has 2x57=114 different combinations of modes.
To create a sum optimization from your point modal optimization:
From your point optimization output node, select Solution > Create Sum Optimization.
The toolbox automatically creates a sum optimization for you with your selected best mode for each operating point. The create sum optimization function converts the modal optimization to a standard single objective optimization (foptcon algorithm) and changes the Mode Variable to a fixed variable.
You can then add table gradient constraints to ensure smooth control and engine response.
See also Create Sum Optimization from Point Optimization Output.
Composite models can require the ability to select part of the optimization results to fill a particular table. For example, you need to discard solutions for other modes when filling a table with an input that is not used for all modes.
You can apply filter rules to select part of the optimization results for table filling. The filter rules are important for modal optimizations. You can specify an operating mode or any valid expression as a filter when using the Table Filling wizard.
Use filter rules when your goal is to fill a different table for each mode.
Specify a filter rule with a logical expression using any input or model available for use in table filling.
The Table Filling from Optimization Results wizard automatically sets up filter rules for you if some inputs are not used for all modes in your composite model.
From any type of optimization you can use the Table Filling From Optimization Results Wizard. The example project CompositeWith2Tables.cag shows the use of filter rules in the wizard to specify results from a single mode to fill a specified table.
In this example project:
There is a single table for each control variable which stores the value for the best mode. The strategy has separate tables for each mode.
Composite calibration problems of this kind often involve separate optimizations (point and sum) with different free variables and constraints for each mode.
There is a separate point optimization for each mode. The results from each mode are exported to the same data set (using the append option). The sum optimization uses the point results data set.
To finish off the calibration, the sum optimization provides results for a multimodal drive cycle, using the selected mode at each point.
To see the example:
Load the example project CompositeWith2Tables.cag found in matlab\toolbox\mbc\mbctraining.
View completed examples of composite models, optimizations and filled tables.
To see the table filling filter rules, expand the Sum_BTQ_Optimization node to view the optimization output node.
Select Solution > Fill Tables or use the toolbar button.
The Table Filling From Optimization Results Wizard appears.
Click Next to review the saved settings in the wizard.
On the final screen of the wizard, you can view filter rules. These rules specify which mode to use to fill each table.

For more information on the Table Filling Wizard, see Filling Tables from Optimization Results.
![]() | Tools for Optimizations With Multiple Solutions | Analyzing MultiStart Optimization Results | ![]() |

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 |