## 3 Real-Time Optimization-Based Strategy
### \(\lambda\)-Control Strategy  
The \(\lambda\)_-control_strategy is a real-time optimization-based EMS, which minimizes a performance index while taking into account some constraints [16; 35]. Two steps are necessary to design an optimization-based EMS: (1) the formulation of the optimal control problem with the performance index, the definition of the variables and constraints, and the mathematical description of the problem; and (2) the control problem resolution with the choice of the optimal method (here, the \(\lambda\)_-control_strategy). The reference currents calculated by the EMS are set to minimize a performance index. The performance index considered here is to reduce the hydrogen consumption while preserving the battery lifetime. The battery current root mean square (RMS) value is a good indicator of the battery state of stress [36]. The current RMS reduces at the same time the variations of state of change (SoC) and the battery heating, which are the key parameters for battery ageing. The performance index \(J\) to be minimized is then expressed by a weighting function,  
\[J=\int_{t_{0}}^{t_{f}}\bigl{(}Q_{m}+A_{b}i_{\mathit{lb}}^{2}\bigr{)}dt \tag{6}\]  
where \(Q_{m}\) is the hydrogen mass flow, \(A_{b}\) is a weighting factor, \(t_{0}\) is the beginning of the driving cycle, and \(t_{f}\) is the end of the driving cycle. The higher \(A_{b}\) is, the more the battery current term is taken into account. Figure 6: Optimal control scheme: (**a**) single-level control, (**b**) multi-level control. In the studied case, the control variables \(u\) are the reference currents \(i_{dcb\text{-}ref}\) and \(i_{dcf\text{-}ref}\), which are the outputs of the EMS in Figure 5. Some inequality constraints are set to comply with their physical limits. Relationships  
\[0\leq i_{dcf\text{-}ref}\leq i_{dcf\text{-}M} \tag{7}\]  
\[i_{dcb\text{-}m}\leq i_{dcb\text{-}ref}\leq i_{dcb\text{-}M} \tag{8}\]  
are then used to fix the boundaries with the maximal and minimal currents of the FC and the battery. Moreover, the gradient of the FC current is limited to avoid fuel starvation [37]:  
\[\left|\frac{d}{dt}i_{dcf\text{-}ref}\right|\leq\rho_{i\text{-}M} \tag{9}\]  
where \(\rho_{i\text{-}M}\) is the maximal gradient of the FC current. The state variables \(x\) are the stored energies of the secondary energy storage sources: \(E_{b}\) for the battery and \(E_{sc}\) for the SC. Constraints are also set on these state variables to respect their physical limits. The stored energy are then constrained with the state of charge \(SoC_{b}\),  
\[SoC_{b\text{-}m}\leq SoC_{b}(t)\leq SoC_{b\text{-}M} \tag{10}\]  
and the voltage \(u_{sc}\),  
\[u_{sc\text{-}m}\leq u_{SC}(t)\leq u_{sc\text{-}M} \tag{11}\]  
for the battery and the SC, respectively. To compare efficiently the studied FC-BAT-SC-based electric vehicle with a FC-based electric vehicle, without any secondary source, a charge sustaining for the secondary sources is needed. A charge sustaining allows to have a zero energy balance of the secondary sources between the beginning and the end of the driving cycle. Two charge sustaining conditions are then defined for the battery and the SC:  
\[SoC_{b}\big{(}t_{f}\big{)}=SoC_{b}(t_{0}) \tag{12}\]  
\[u_{SC}\big{(}t_{f}\big{)}=u_{SC}(t_{0}) \tag{13}\]  
In order to simplify the control problem resolution, namely the second step of the optimization-based EMS design, it is common to use a reduced (quasi-static) model of the system [38]. EMR is based on the action-reaction principle, which enables us to respect the interactions between the different subsystems. This principle allows us to deduce the quasi-static model by neglecting the local control of each element. Moreover, since the reduced model is deduced from a forward description through EMR, the control variables can be implemented in real-time without any change [35]. The DC-DC converters, the smoothing inductors, and their related controls are first reduced.