In this paper, a deep neural network (DNN)-based nonlinear model predictive controller (NMPC) is demonstrated using real-time experimental implementation. First, the emissions and performance of a 4.5-liter 4-cylinder Cummins diesel engine are modeled using a DNN model with seven hidden layers and 24,148 learnable parameters created by stacking six Fully Connected layers with one long-short term memory (LSTM) layer. This model is then implemented as the plant model in an NMPC. For real-time implementation of the LSTM-NMPC, an open-source package acados with the quadratic programming solver HPIPM (High-Performance Interior-Point Method) is employed. This helps LSTM-NMPC run in real time with an average turnaround time of 62.3 milliseconds. For real-time controller prototyping, a dSPACE MicroAutoBox II rapid prototyping system is used. A Field-Programmable Gate Array is employed to calculate the in-cylinder pressure-based combustion metrics online in real time. The developed controller was tested for both step and smooth load reference changes, which showed accurate tracking performance while enforcing all input and output constraints. To assess the robustness of the controller to data outside the training region, the engine speed is varied from 1200 rpm to 1800 rpm. The experimental results illustrate accurate tracking and disturbance rejection for the out-of-training data region. At 5 bar indicated mean effective pressure and a speed of 1200 rpm, the comparison between the Cummins production controller and the proposed LSTM-NMPC showed a 7.9% fuel consumption reduction, while also decreasing both nitrogen oxides () and Particle Matter (PM) by up to 18.9% and 40.8%.
Model Predictive Control (MPC) provides an optimal control solution based on a cost function while allowing for the implementation of process constraints. As a model-based optimal control technique, the performance of MPC strongly depends on the model used where a tradeoff between model computation time and prediction performance exists. One solution is the integration of MPC with a machine learning (ML) based process model which are quick to evaluate online. This work presents the experimental implementation of a deep neural network (DNN) based nonlinear MPC for Homogeneous Charge Compression Ignition (HCCI) combustion control. The DNN model consists of a Long Short-Term Memory (LSTM) network surrounded by fully connected layers which was trained using experimental engine data and showed acceptable prediction performance with under 5% error for all outputs. Using this model, the MPC is designed to track the Indicated Mean Effective Pressure (IMEP) and combustion phasing trajectories, while minimizing several parameters. Using the acados software package to enable the real-time implementation of the MPC on an ARM Cortex A72, the optimization calculations are completed within 1.4 ms. The external A72 processor is integrated with the prototyping engine controller using a UDP connection allowing for rapid experimental deployment of the NMPC. The IMEP trajectory following of the developed controller was excellent, with a root-mean-square error of 0.133 bar, in addition to observing process constraints.