# Low Temperature Combustion Modeling and Predictive Control of Marine Engines
## 2 Materials and Methods
### RTM and Model Predictive Control Design  
Nowadays, optimality is a matter of great importance for controllers. Model predictive control is one of the most applied optimal control approaches; it has the capability of taking the constraints into consideration. In addition to effectively manage system delays, its robustness is ensured due to the implementation of a receding horizon. Although, nonlinear MPC seems more accurate, it entails huge computational burden (up to 40 times, compared to the linear one [37]) to solve the nonlinear optimization problem. This could easily cause the control system not to be real-time. Linear MPC, on the other hand, has much lighter computational load and can be operated in real-time [38]. More importantly, as shown in [37], there could be only less than 2% difference between the accuracy of linear MPC and nonlinear MPC. For these reasons, linear MPC has been employed in this study. Predictive models inherently carry uncertainty, and failure to consider this uncertainty in control design can result in instability. It should be noted that the system properties vary notably in different operating points. Adaptive MPC strategy is one feasible approach with adapting prediction model for changing conditions. It can also upgrade the prediction accuracy and controller performance of the strongly nonlinear plant. An adaptive MPC with the linear parameter varying RTM model is developed for controlling the RCCI COM. RTM is capable of estimating heat release, heat release rate, in-cylinder pressure, combustion phase and start of combustion. The RTM estimates the aforementioned variables both crank angle and cycle-wise and updates the internal plant model used by the MPC controller in real-time for each operating point [14]. In this work a centralized MIMO MPC is developed to control \(\theta_{50}\) and \(\text{IMEP}_{\text{gross}}\) of the COM. The chosen controller signals (U) are total fuel energy (\(E_{\text{fuel}}\)) and energy-based LRF-HRF BR as presented in Equation (18)  
\[E_{\text{fuel}} =m_{\text{LRF}}\text{LHV}_{\text{LRF}}+m_{\text{HRF}}\text{LHV}_{ \text{HRF}} \tag{18}\] \[\text{BR} =\frac{m_{\text{LRF}}\text{LHV}_{\text{LRF}}}{E_{\text{fuel}}},\]  
where \(m\) is the injected fuel mass, and LHV is the lower heating value of LRF and HRF, respectively. The RTM is defined as:  
\[ \begin{bmatrix}Q_{c}(k+1)\\ p_{cyl}(k+1)\\ \text{IMEP}_{\text{gross}}(k)\end{bmatrix}  = \begin{bmatrix}Q_{c}(k)\\ p_{cyl}(k)\\ \text{IMEP}_{\text{gross}}(k)\end{bmatrix} + \begin{bmatrix}\frac{\partial Q_{c}} {\partial E_{\text{fuel}}}&\frac{\partial Q_{c}}{\partial\text{BR}}\\ \frac{\partial p_{cyl}}{\partial E_{\text{fuel}}}&\frac{\partial p_{cyl}}{ \partial\text{BR}}\\ \frac{\partial\text{IMEP}_{\text{gross}}}{\partial E_{\text{fuel}}}&\frac{ \partial\text{IMEP}_{\text{gross}}}{\partial\text{BR}}\end{bmatrix}\begin{bmatrix} \Delta E_{\text{fuel}}\\ \Delta\text{BR}\end{bmatrix}  \tag{19}\] \[+ \begin{bmatrix}D_{1,Q_{c}}(k)&D_{2,Q_{c}}(k)\\ D_{1,p_{cyl}}(k)&D_{2,p_{cyl}}(k)\\ D_{1,\text{IMEP}_{\text{gross}}}(k)&D_{2,\text{IMEP}_{\text{gross}}}(k)\end{bmatrix} \begin{bmatrix}T_{\text{IVC}}\\ m_{\text{EGR}}\end{bmatrix} .\]  
Here \(k\) indicates the cycles. The updated values of \(Q_{c}\), \(p_{cyl}\) and \(\text{IMEP}_{\text{gross}}\) for cycle \(k+1\) are defined as the sum their respective values at cycle \(k\) and the changes imposed by the control variables of Equation (18). As previously mentioned, RTM can estimate its variables in crank angle domain as well. Thus, \(Q_{c}\), \(p_{cyl}\) are also vectors covering the closed cycle of the RCCI combustion. \(D_{1}\) and \(D_{2}\) represent process uncertainties as \(T_{\text{IVC}}\) and mass of EGR (\(m_{\text{EGR}}\)), since these variables cannot be imposed as control inputs. Thesedisturbances are modelled as zero-mean Gaussian noise. The linear relation between the control signals and CHR, \(p_{cyl}\) and \(\text{IMEP}_{\text{gross}}\) is shown in Equation (20).