Skip to Main Content Skip to Search
Product Documentation

Analyzing Modal Optimization Results

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.

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

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

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

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

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

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

  7. If you change the selected mode for a point, return to the Selected Solution view to observe the selected solutions for all operating points.

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

Creating Sum Optimizations from Modal Optimizations

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:

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

  2. You can then add table gradient constraints to ensure smooth control and engine response.

See also Create Sum Optimization from Point Optimization Output.

Filling Tables for Operating Modes

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.

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:

To see the example:

  1. Load the example project CompositeWith2Tables.cag found in matlab\toolbox\mbc\mbctraining.

  2. View completed examples of composite models, optimizations and filled tables.

  3. To see the table filling filter rules, expand the Sum_BTQ_Optimization node to view the optimization output node.

  4. Select Solution > Fill Tables or use the toolbar button.

    The Table Filling From Optimization Results Wizard appears.

  5. Click Next to review the saved settings in the wizard.

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

  


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