## 2 Models and Methods
### Internal Combustion Engine Model
#### 2.3.2 Brake Torque  
By reversing the consumption model formulated by [PERSON] et al. [19], we obtain a relationship between brake torque \(\Gamma_{ICE}\) and fuel flow \(\dot{m}_{fuel}\) (Equation (9)). In this expression, brake torque is proportional to the ratio between flow rate and engine speed \(N\), with an extra term that estimates friction torque. The coefficient of proportionality corresponds to the engine efficiency, which depends on the parameters of close control of the engine (speed, equivalence ratio and spark advance), based on the shapes proposed by [PERSON] and [PERSON] [12].  
The evolution of combustion efficiency with speed is taken from the model proposed by [PERSON] et al. [19] (Equation (10) and Figure 14). The shape of the friction torque \(\Gamma_{f}\) is based on a Heywood model [5] (Equation (11)).  
\[\Gamma_{ICE}=\eta_{fi}\cdot\eta_{comb}\cdot\eta_{\phi}\cdot\eta_{SA}\cdot \frac{\dot{m}_{fuel}\cdot LHV}{\pi N/30}-\Gamma_{f} \tag{9}\]  
\[\eta_{comb}=\left(\eta_{c0}-\frac{A}{B+N}\right) \tag{10}\]  
\[\Gamma_{f}=(97+0.015\cdot N+5\times 10^{-6}\cdot N^{2})\cdot\frac{V_{d}}{2\pi R _{c}} \tag{11}\]  
Efficiency as a function of equivalence ratio decreases when the mixture is rich. This is because the extra fuel is not converted into energy due to a lack of oxygen. In addition, oxygen depletion can lead to incomplete combustion and reduce thermodynamic efficiency. On the contrary, in a lean mixture, all the fuel introduced can be consumed and the efficiency keeps a value of 1 over a wide range [12].  
The model of [PERSON] and [PERSON] takes into account these two phenomena. They thus propose a curve proportional to the excess air, a transition then a step at 1. However, it is only applicable for equivalence ratio greater than 0.77. For fuel contents below this limit, combustion misfires may occur due to the low fuel concentration [12]. Performance deteriorates thus quickly until combustion becomes impossible (lean flammability limit) [32]. We have chosen to model this behavior by a portion proportional to the excess air with a slightly larger directing coefficient than that of the rich mixture. The complete model is given by Equation (12) and plotted in Figure 14.  
Figure 13: Comparison between \(\dot{m}_{fuel}\) measurement and \(\dot{m}_{fuel}\) prediction based on \(\dot{m}_{fuel}\) model.  
\[\eta_{\phi}=\begin{cases}1.373/\phi-0.373&0.7\leq 1/\phi<0.95\\ 0.9313+(1-0.9313)\cdot sin\Big{(}\frac{1/\phi-0.95}{1-0.95}\Big{)}&0.95\leq 1/\phi<0.95 +\frac{\pi}{2}(1-0.95)\\ 1&0.95+\frac{\pi}{2}(1-0.95)\leq 1/\phi<1.3\\ -1.4286/\phi+2.8571&1.3\leq 1/\phi<1.54\end{cases} \tag{12}\]  
Spark advance has a significant impact on the conversion of thermal energy into mechanical energy. For a given speed, fuel/air ratio and fuel flow, there is an optimal advance that maximizes the torque and thus the engine's efficiency [5; 12; 33].  
A relative spark advance (symbol \(\Delta SA\)) can therefore be defined, which is the difference between the selected setting and the optimum spark advance for a given operating point. For the D4F engine used for this study, the optimal spark advance as a function of engine speed and intake pressure was determined during previous test campaigns (optimal values are reported in Table 10). We thus determine the relative advance for the various measurements carried out on the bench using the table of optimal advances (according to Equation (14)). The shape of the efficiency with regards to relative advance is inspired by [PERSON] and Onder [12] (Equation (13) at Figure 14).  
\[\eta_{SA}=1-0.04\times 10^{-2}\cdot\Delta SA^{2} \tag{13}\]  
\[\Delta_{SA}=SA-SA_{opti}(N,P_{intake}) \tag{14}\]  
We notice from Equation (14) that a negative value of \(\Delta_{SA}\) brings the ignition closer to top dead center, and a positive value of \(\Delta_{SA}\) increases the spark advance.  
We can see in Figure 15 that the model has a good fit to the measurements, with a determination coefficient of 0.92 and a mean error of 30%.  
Figure 14: Influence of parameters on torque model.