Main Content

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 to use 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 this transient SI engine dataset with fixed sampling.

Input DataOutput Data

  • Throttle position (%)

  • Wastegate area (%)

  • Engine speed (RPM)

  • Intake cam advance from park (deg)

  • Exhaust cam retard from park (deg)

  • Spark retard from nominal (deg)

  • Lambda — Air/Fuel ratio, normalized to stoichiometric Air/Fuel ratio

  • Airflow — Intake air mass flow rate (kg/s)

  • Torque (N·m)

  • Intake manifold gas pressure (Pa)

  • Exhaust gas temperature (K)

To generate the deep learning engine model,

  1. Start the SI engine dynamometer reference application. Enter this command in the MATLAB® Command Window.

    The data used for the Engine Dynamometer unpacks.

  2. When the Engine Dynamometer window appears, double-click the Generate Deep Learning Engine Model box in the lower part of the window. Model generation can take several hours.

    By default, to train the deep learning engine model, the reference application supplies input and response data from a design of experiment (DoE) set of input data from the SI Core Engine block. Alternatively, 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.

    • 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 Powertrain Blockset uses half the data to train the model, and half to test the model.

  3. Once you generate the deep learning SI model, you can view the results.

    • These pairwise overlays show “test versus train dataset input” at steady state. Use them to check that the data used to train and to test the model span the same space, with roughly the same density.

    • These plots show the seven engine input signals the deep learning model uses to test its ability to create the output responses.

    • These four plots show the engine outputs. Each plot displays the SI engine deep learning model predicted output in red and the test data in blue.

    • These histograms 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.

    • The Simulation Data Inspector displays the results of an engine performance test of the trained SI engine deep learning model over a matrix of engine speeds and commanded engine torque. You can use the commanded versus measured torque response comparisons to assess the suitability of the deep learning model for use in a vehicle model.

    • This 3-D plot shows output torque versus commanded torque from the quasi-steady state portions of the previous plot. The plot shows each state as a blue dot. The mesh shows a curve fit to those states, so you can visualize the overall output of the SI deep learning model.

  4. You can choose the deep learning SI model SiDLEngine as your engine plant model variant in the conventional vehicle and hybrid electric vehicle (HEV) reference applications in the Powertrain Blockset. For example, in the conventional vehicle reference application, on the Modeling tab, in the Design section, open the Variant Manager. Navigate to Passenger Car > Engine. Right-click SiDLEngine and select Set as Label Mode Active Choice.

  5. To fit your own deep learning SI engine model or adjust the deep learning training settings, go to the reference application project folder and run the FitSiEngineDL.m script in the reference application project folder.

See Also


Related Topics