Fit a Point-by-Point Model
Point-by-point modeling allows you to build a model at each operating point of an engine with the necessary accuracy to produce an optimal calibration. You often need point-by-point models for multiple injection diesel engines and gasoline direct-injection engines.
You can use point-by-point models to try a variety of models for your data. These models are especially useful if you think there is a lot of variation between operating points in your data. The software fits a selection of models and selects the best one for each operating point. This process allows you to have a variety of models at once. For example, for some operating points a Gaussian process model might fit best, while for others, a quadratic would be acceptable.
With point-by-point models, no predictions are available between operating points. If you need predictions between operating points, use a one-stage model instead. See Fit a One-Stage Model.
Import Data
Prepare your data before model fitting.
In MATLAB®, on the Apps tab, in the Automotive group, click MBC Model Fitting.
In the Model Browser home page, click Import Data.
Choose whether to import from file or workspace.
Select option Use data to fit a separate model for each operating point.
Use the file browser to select a file to import.
Use the Operating Point Groupings dialog box to group data.
Use the Data Editor to inspect and prepare your data. You can filter, group, and edit data, and you can define new variables. See Working with Data in the Model Browser.
Note
You must define operating point groupings before point-by-point modeling. See Define Operating Point Groupings. If you do not define operating point groupings, you are prompted after you try to fit models.
Fit Point-by-Point Models
In the Model Browser home page, click Fit models.
In the Fit Models dialog box, from the Data set list, select a data set in the project.
If you have no data loaded, you can click Import from file in the Data pane. Use the file browser to select a file to import.
Optionally, you can select validation data as a sample of the fitting data or a separate data set.
In the Template pane, click the Point-by-Point test plan icon. This template lets you create point-by-point test plans with local models at each engine operating point, which is useful when testing is done at fixed operating point settings. See Use Cases for Point-by-Point Models.
In the Inputs and Responses pane, select data channels to use for the responses you want to model. Click the button to add to the responses.
To create a boundary model, leave the Fit boundary model check box selected. The toolbox will fit a separate boundary model of type convex hull to each operating point. A boundary model describing the limits of the operating envelope can be useful when you are creating and evaluating models and optimization results.
Select data channels to use for the local inputs and operating point inputs. Click the button to add to the responses.
Click OK to fit the default model types to your selected data.
You can select from the Model type list to override the default model type to apply for all responses and operating points.
You can also select
Convex hullorPairwise convex hullfrom the Boundary model list to override the default boundary model setting.If the data does not have operating point groupings, the Operating Point Groupings dialog box appears with default operating points defined by the global inputs. Verify or change the operating point groupings and click OK to continue model fitting.
The toolbox calculates the fit and adds new model nodes to the Model Tree.
Point-by-point model fits automatically run in parallel if you have Parallel Computing Toolbox™ software.
Default Model Types Large Data Settings for any operating point >2000 Points or >100 operating points The toolbox fits these model types to each operating point and selects the best model:
Quadratic with Stepwise: Min PRESS
Cubic with Stepwise: Min PRESS
Hybrid RBF with nObs/3
Gaussian process models (using defaults)
Switches to fitting a single GPM per operating point (no Hybrid RBF or polynomial). Boundary model: Point-by-point boundary model with a single convex hull fit to all inputs at each operating point If any operating point has >2000 points, then point-by-point boundary model switches to a convex hull for every pair of inputs.
Switch when ≥ 8 inputs even when <2000 points.
The toolbox selects the best model type for each operating point in your data using the
PRESS RMSEselection criteria. For example, for some operating points a Gaussian process model might fit best, while a quadratic would be acceptable for others.The Model Browser displays the point-by-point model node if you created a single response model, or the test plan node if you created multiple response models.
Assess the model fit for each operating point at the
Point-by-Pointnode.For details about tools for viewing and refining the model fit, see Assess Point-by-Point Models and Guidelines for Selecting the Best Model Fit.
Export your point-by-point models to CAGE for optimized calibration. From the test plan node, in the Common Tasks pane, click Generate calibration.
Tip
To view an example project with engine data and finished models, see Multi-Injection Diesel Calibration Workflow.
Use Cases for Point-by-Point Models
The point-by-point test plan template provides a convenient mechanism to model a number of tests at different operating points using the same set of models.
You can divide the data into operating points and model it within a single test plan rather than having a separate one-stage test plan for each operating point.
You can also use point-by-point models in CAGE optimization by creating an optimization from your models, or you can use the models in an existing optimization, provided that the global variable values are the same as the global variables used for the local models in the Model Browser.
You can export point-by-point models to file or directly into CAGE and automatically create an optimization, a tradeoff, and a dataset.