## 3 Proposed Optimization L-Control Strategy
### Online Calculation Solution: LaGrange Multiplier
#### 3.3.2 Adaptative \(\lambda\)-Control  
Operating with an open-loop structure usually leads, in the context of real-time control, to uncontrolled battery depletion, especially when the drive cycle is not known. For this reason, closed-loop control is prescribed. Figure 10 illustrates the proposed model of an efficient-adaptive lambda control in online computing. The principal inputs are the required vehicle torque, the required speed (\(T_{wh}\), \(W_{wh}\) ), the gearbox ratio, and the calculated lambda value estimated over the time-covered cycle in which the Hamiltonian function depends. The feedforward loop is then added to adjust this forecasted latter to further ensure that the evolution of the battery SoC does not deviate from the initial deployed required target while the driver is performing the journey. The proposed settlement is inspired by the similar controllers used in [36] for the various HEV powertrain architectures and also adopted in [22; 32; 37; 38] to deal with parallel HEV for the EMS online optimization problem. It has been then extended in this article to resolve battery management of the different PHEV modes of operations.  
Hence, a PI controller is implemented to correct the error between the SoC of the battery and the targeted SoC. In that case, the new calculated tuning factor \(\lambda\) over the time-variation is set in Equation (25). The required SoC of the battery \(SoC_{required}(d(t),\ \alpha,\ \beta)\) is a distance-dependent function where \(\alpha\) and \(\beta\) are parametric coordinates that differ according to the initial SoC of the battery and the final desired SoC value and the nature of the driving model that is involved. Here, the proposed desired SoC is a linear profile scheme that can be presented as a time or distance-based travel pattern.  
On the other hand, the studies conducted in [39] revealed that the addition of the PID controller might cause occasional deviations in the expected performances regarding the tracking of the requested SoC of the battery by the time-current SoC and consequently on the engine optimal control. Therefore, the initial estimated value of lambda needs to be updated over time, as was mentioned in [32; 38] according to the periodic update \(N_{\lambda}\) parameter.  
\[\lambda(t)=\lambda_{initial}+K_{P}\Big{(}SOC_{required}(d(t),\ \alpha,\ \beta)- SOC(t)\Big{)}+K_{I}(\int SOC_{required}(t,\ \alpha,\ \beta)- SoC(t) \tag{25}\]  
Figure 10: Diagram of an online L-Control calculation.  
To assess the process, it is then crucial to select these indicators properly. The latter are selected either through trial and error or through algorithmic optimization [24]. To this extent, ref. [40] adopted Equation (26) if SoC gets to its maximum value to justify the horizon parameter in the case of optimization using the model predictive control MPC. By determining the relevant initial estimated and updated lambda value, it is possible to calculate the Hamiltonian function and thus deliver the system with economic electrical and thermal control.  
\[K_{P}\leq\frac{\lambda(0)}{\left|SoC_{required}-SoC_{max}\right|} \tag{26}\]