Skip to Main Content Skip to Search
Product Documentation

Building the Models

Completing Model Setup

You have already set up the local and global inputs and the global model type before constructing the design. Now you have imported, examined, and filtered the data in preparation for modeling. To complete your model setup, you need to specify the local model type, select the data to model, and choose the responses (model outputs) you want to model.

Remember that the aim of this case study is to produce optimized tables for

These tables are all functions of load and rpm, subject to constraints of operating region and residual fraction.

To produce these tables, you need to make accurate models of the behavior of torque, exhaust temperature, and residual fraction at different values of speed, load, spark, and cam timings. You have set the local model input as spark, and the global model inputs as engine speed, load, intake cam phase, and exhaust cam phase. Therefore, the responses you want to model are

Specifying the Local Model Type

The first response you want to model is torque against spark. The shape of torque/spark curves is well understood and you have examined some in the Data Editor. Polynomial spline curves are useful for fitting these shapes, where different curvature is required above and below the maximum. Therefore, you should set the local model type to polynomial spline. A spline is a curve made up of pieces of polynomial, joined smoothly together. The points of the joins are called knots. In this case, there is only one knot, at the maximum. The location of the knot in this case marks MBT.

To specify polyspline as the local model type,

  1. First select the Two-Stage test plan node in the model tree, so you can see the test plan diagram.

  2. Double-click the local model icon in the test plan diagram.

    The Local Model Setup dialog box appears.

    1. Select Polynomial Spline from the Local Model Class.

    2. Set Spline Order to 2 below and 2 above knot.

  3. Click OK to dismiss the dialog box.

Notice that the new name of the local model class, PS (for polyspline) 2,2 (for spline order above and below the knot) now appears on the two-stage model diagram.

Selecting Data and Responses to Model

You have set up model types and model inputs. Now you can select the data for modeling and the responses (model outputs) you want to model.

  1. Double-click the Response block in the test plan diagram. The Data Selection Wizard appears.

  2. Because the test plan contains a design, the radio button Match selected data to design is selected. The imported DIVCP design appears in the left list (and other designs you created), and the data object in the right list.

    Select the DIVCP design and click Next.

  3. The wizard tries to match each symbol to a data signal (shown as Signal Name). Make sure SPARK, SPEED, LOAD, INT_ADV and EXH_RET are selected, as shown. Edit incorrect matches by selecting the corresponding entries in the input and data lists and click the green arrow to select. Do not select the copy range check box.

    Click Next.

  4. On this screen you select the response to model.

    1. Select BTQ as the response you want to model and click Add. Notice the local model settings you set earlier (PS22).

    2. Select Maximum from the Datum drop-down menu. In this case, the maximum of the torque/spark curves is MBT (spark angle at maximum brake torque), so this can be a useful feature to model.

    3. Click Next.

  5. On this screen, you see the settings for matching data to designs.

    1. Enter 0.05 in the LOAD tolerance edit box.

    2. Select Do Not Use from the drop-down menu for Unmatched Data. Data points that do not fall within tolerance of the design points will not be used for modeling.

    3. Leave the other settings at the defaults and click Finish.

    The Data Editor appears so you can select data for modeling. The response model is built when you close the Data Editor.

  6. Right-click a view and select Current View > Cluster View. Use the drop-down menus to select SPEED and LOAD for plotting.

  7. Inspect the data and design points by using the check boxes in the cluster plot. Clear the check box for Equal data and design to remove matched (green) clusters from the display. These data points fall within tolerance of the design point, so these points are selected for modeling. When you remove them from the display, you can see other points more clearly.

  8. Clear the box for Unmatched design points, and look at the remaining excluded data points (plotted as crosses).

    These points have not been matched to any design points because they do not lie within tolerance. The value of load achieved at these points was not close enough to the desired value of load, indicating a problem with these operating points. Notice that these points lie near the edge of the constrained area. In the Data Wizard, you selected Do not use unmatched points, so these points have not been selected for modeling. You can always change the tolerances and decide to include unmatched data points later; the choice in the Data Wizard is not irrevocable.

  9. To accept the matched data for modeling, close the Data Editor. A dialog appears to check that you want to build the response model for torque and update the Actual Design to include all data selected for modeling. Click Yes, and the models are created.

  


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