## 3 A-ECMS Based on Driving Pattern Recognition  
### ECMS and SOC Management  
The optimal control problem in terms of fuel economy can be stated as follows: for a given driving cycle, find the optimal control sequence \(u^{*}\in U\) in the admissible control set to minimize the total fuel consumption:  
\[J=\phi_{f}(x(t_{f}))+\int_{t_{0}}^{t_{f}}\dot{m}_{f}(x,u,t)dt \tag{10}\]  
\[s.t.\left\{ \begin{array}{l}\dot{x}(t)=f(x,u,t)\\ x(t_{0})=x_{0}\\ x(t)\in X,\forall t>0\\ u(t)\in U,\forall t>0\end{array} \right. \tag{11}\]  
where \(\dot{m}_{f}\) is the fuel flow rate, and \(\phi_{f}(x(t_{f}))\) represents a constraint on the final state. For a CVT-based HEV, the battery SOC is chosen as the only state variable, \(x_{t}=SOC(t)\). The control variables are the CVT speed ratio and the torque split factor between the engine and ISG motor:  
\[u(t)=\left\{ \begin{array}{l}i_{CVT}(t)\\ SF(t)\end{array} \right\}. \tag{12}\]  
With respect to the real-time optimal control problem with state and control variable constraints, according to [PERSON]'s minimum principle, for each time instant, the minimization of the cost function (10) is equivalent to minimizing the following Hamiltonian function:  
\[H(x,u,\lambda,t)=\dot{m}_{f}(u(t),t)+\lambda(t)\cdot\dot{SOC}(t) \tag{13}\]  
where \(\dot{SOC}(t)\) can be derived by Equation (9), and \(\lambda(t)\) is the adjoint state, defined by the Euler-Lagrange equation:  
\[\dot{\lambda}(t)=-\frac{\partial H(x,u,\lambda,t)}{\partial x}. \tag{14}\]  
The instantaneous cost function is to minimize the sum of the fuel consumption of the engine and the equivalent fuel consumption of the ISG, \(H=\dot{m}_{f}(t)+\dot{m}_{f,bat,\rho}(t)\). Define the equivalent factor \(s(t)\) for balancing fuel and battery power consumption as  
\[s(t)=-\lambda(t)\frac{LHV}{C_{nom}\cdot U_{\infty}}. \tag{15}\]  
\[\dot{m}_{f,bat,eq}(t)=s(t)\frac{P_{bat}}{LHV}. \tag{16}\]Conmmonly, a pair of equivalent factors (\(s_{chg},s_{dis}\)) can be defined according to charge and discharge of the battery, and a more accurate result of the fuel consumption can be expected. However, this also leads to a bidimensional problem, which burdens the computational cost. In fact, research shows that the performances are practically the same for ECMS with a pair and a unique equivalent factor [7]. In order to reduce the computational cost, a unique equivalent factor is used for the charging and discharging of the battery [19; 21]. In hybrid electric vehicles, battery SOC is controlled to change in a certain range, so the influence of the SOC deviations on the battery parameters, such as open-circuit voltage, internal resistance, and the charge/discharge efficiencies, is rather small; in other words, the dependence of \(H\) on the state variable \(x\) can be neglected. Thus, in Equation (14), \(\dot{\lambda}(\mathsf{t})=0\), and the equivalent factor \(s\) is a constant. For a given driving cycle, a shooting algorithm can be used to determine the optimal equivalent factor \(s^{opt}\), so that the constraint on the final state can be fulfilled, \(SOC(t_{f})=SOC(t_{0})\). However, the optimal equivalent factor varies with different driving cycles. In on-line applications, the equivalent factor needs to be continuously adjusted. By incorporating a reference SOC, the equivalent factor can be calculated as  
\[s(t)=s_{nom}\cdot f_{p}(SOC(t)-SOC_{ref}) \tag{17}\]  
where \(s_{nom}\) is the nominal equivalent factor, and \(f_{p}\) is the penalty function to prevent the SOC from large variations. Typically, a proportional-integral (PI) controller can be adopted to maintain the SOC around the reference value. In this study, the following functions, as described in [27], were used for SOC correction:  
\[f_{p}(SOC(t))=\left(1-\left(\frac{SOC(t)-SOC_{ref}}{SOC_{ref}-SOC_{\min}} \right)^{2n+1}\right)\cdot\left(1+\tanh(m\cdot I_{SOC})\right) \tag{18}\]  
\[I_{SOC}(kT)= 0.01(SOC_{ref}-SOC(t))+0.99I_{SOC}(t-kT) \tag{19}\]  
where \(kT\) is the sampling time, and \(n\) and \(m\) are the tuning parameters for the P, I multipliers, respectively.