Generate Deep Learning SI Engine Model
If you have Deep Learning Toolbox™, and Statistics and Machine Learning Toolbox™, you can generate a dynamic (transient) deep learning spark-ignition (SI) engine model for use within Virtual Vehicle Composer. Use the model for hardware-in-the-loop (HIL) testing, powertrain control, diagnostics, and estimator algorithm design. For example, from physical hardware or from a high-fidelity model, you can fit a deep learning model to measured engine-out transient emissions data and use it for aftertreatment control and diagnostic algorithm development.
To train the deep learning SI engine model, Powertrain Blockset™ uses a transient SI engine dataset with fixed sampling of these data.
To generate the deep learning engine model for your virtual vehicle,
Start the Virtual Vehicle Composer application. Enter this command in the MATLAB® Command Window.
On the Composer tab, click New.
On the Setup pane, select Vehicle class to be
Passenger carand select a Powertrain architecture having an SI engine, such as
Conventional Vehicle. Set Model template and Vehicle dynamics as desired.
Click Configure. The app will prepare the vehicle data.
On the left side of the Data and Calibration pane, select Powertrain > Engine.
On the Engine tab, select
SI Deep Learning Engine.
Click the Calibrate from Data tab.
Select the data source file to use to train your engine model. You can use data acquired by physical testing, or generated by Powertrain Blockset from Gamma Technologies LLC engine models or other high-fidelity engine models.
Click Calibrate to initiate the training. Model generation can take several hours.
During model generation, the training progress window shows how the deep learning loss function (cost function) varies vs. iterations. You can also stop the training process from this window. When processing is complete, the Stop button turns green.
Note that the training may stop before reaching its scheduled number of iterations if it reaches its loss tolerance first.
Note that the Powertrain Blockset uses half the data to train the model, and half to test the model.
Once the app has completed training the model, you can view the results in the workspace window under five separate tabs.
The first is pairwise overlays that show “test versus train dataset input” at steady state. Use these to check that the data used to train and to test the model span the same space, with roughly the same density.
The next two show the seven engine input signals the deep learning model uses to test its ability to re-create the output responses.
The next tab checks the model capability. Its four plots each display the test data in blue and the SI engine deep learning model predicted output in red.
The histograms under the fifth tab display the modeling error distribution for the four engine outputs, under dynamic (transient) conditions. The error is the difference between the response predicted by the deep learning model and the measured test response of the engine.
Continue with the specification of your virtual vehicle in Virtual Vehicle Composer.