## 3 Optimal Control of the Hybrid Electric Powertrain  
The criterion for optimal control of the hybrid electric powertrain is minimal fuel consumption (i.e., for a given driving cycle, the electric drive and the ICE must be operated in such a way that the consumed fuel is minimal). Therefore, the mass flow rate of the fuel \(\dot{m}_{\rm f}\) in Equation (7) is defined to be a cost function, while the overall costs and fuel consumption are obtained by integrating \(\dot{m}_{\rm f}\) over the duration of the driving cycle \(t_{\rm e}\):  
\[m_{\rm f}=\int\limits_{0}^{t_{\rm e}}\dot{m}_{\rm f}(T_{\rm ICE},\omega_{\rm ICE })dt. \tag{11}\]  
Additionally, the battery current is expressed as  
\[\dot{q}=-i_{\rm Batt}(q,P_{\rm el}), \tag{12}\]  
with the following initial and end conditions:  
\[ \begin{array}{l}q_{0}=\frac{SoC_{0}}{100}\cdot z_{\rm cell}\cdot Q_{\rm cell,nom},\\ q_{\rm e}=\frac{SoC_{0}}{100}\cdot z_{\rm cell}\cdot Q_{\rm cell,nom},\end{array}  \tag{13}\]  
which are related to the battery's state of charge at the beginning \(SoC_{0}\) and the end \(SoC_{\rm e}\) of the driving cycle that must be considered. The evaluation of the state of Equation (12) requires the electrical power \(P_{\rm el}\), which is consumed or generated by the electrical drive. According to Equation (8), it can be summarized as  
\[P_{\rm el}=f_{\rm ED}(T_{\rm ED},\omega_{\rm ED}). \tag{14}\]  
The torques and angular velocities of the ICE and electric drive in Equations (11) and (14) are determined by the transmission model of Equations (2)-(6). This can be summarized as follows:  
\[[T_{\rm ICE}\ T_{\rm ED}\ \omega_{\rm ICE}\ \omega_{\rm ED}]^{T}=f_{\rm Trans }(T_{\rm FD},\omega_{\rm FD},\mathbf{u}), \tag{15}\]  
with the torque \(T_{\rm FD}\) and angular velocity \(\omega_{\rm FD}\) at the final drive resulting from the vehicle dynamics model in Equation (1) and the control variable of the powertrain:  
\[\mathbf{u}=\left[ \begin{array}{c}s_{\rm m}\\ u_{\rm ED}\end{array} \right]. \tag{16}\]  
It must be taken into account that the control variable as well as the state variable are limited due to the technical boundaries of the powertrain components:  
\[ \begin{array}{l}s_{\rm m}\in\mathcal{U}_{\rm T},\qquad\text{with}\ \mathcal{U}_{\rm T}=\{s_{\rm m}\in\mathbb{N}|1\leq s_{\rm m}\leq 6\},\\ u_{\rm ED}\in\mathcal{U}_{\rm ED},\qquad\text{with}\ \mathcal{U}_{\rm ED}=\{u_{\rm ED }\in\mathbb{R}|u_{\rm ED}\in\mathcal{U}_{\rm FD}\ \text{or}\ u_{\rm ED}\in\mathcal{U}_{\omega_{\rm ED}}\},\\ q\in\mathcal{X}_{\rm q},\qquad\text{with}\ \mathcal{X}_{\rm q}=\{q\in\mathbb{R}|0 \leq q\leq z_{\rm cell}\cdot Q_{\rm cell,nom}\}.\end{array}  \tag{17}\]The sets \(\mathcal{U}_{\text{FED}}\) and \(\mathcal{U}_{\omega_{\text{ED}}}\) correspond to the torque and angular velocity boundaries, respectively, given by the maps of the ICE and electric drive shown in Figure 4. In order to obtain the optimal control of the hybrid electric powertrain, the minimal fuel consumption  
\[m_{t}^{*}=\min_{\mathbf{u}}\,m_{t}(\mathbf{u}) \tag{18}\]  
must be determined with respect to Equations (11)-(17). The optimal control variable \(\mathbf{u}^{*}\) is a result of Equation (18). In general, the various methods for the solution of the optimization problem in Equations (11)-(18) are known. One approach is Pontryagin's Maximum Principle (PMP). It is based on variational calculus and the enhancement of considering the boundaries of the control variables in Equation (17). For obtaining the optimal control variable \(\mathbf{u}^{*}\) by means of PMP, the Hamilton function  
\[\mathcal{H}(\lambda,\mathbf{u},q)=-\dot{m}_{t}(\mathbf{u})+\lambda\cdot\dot{q }(\mathbf{u},q) \tag{19}\]  
must be evaluated while considering the necessary conditions given in [43]. In Equation (19), \(\lambda\) is the Lagrange multiplier.