## 3 Power Sizing and Energy Management Strategy
### Optimization Problem Formulation  
The EMS is implemented using a dynamic programming algorithm to optimize the objective function over the driving cycle. A multi-objective optimization problem combining component sizing and the EMS is defined as follows:  
\[ \begin{array}{c}\min\Big{/}\left(\overset{\sim}{x}\right)=\sum_{t=1}^{N}\mu_{ H2^{*}}(C_{fc_{tH2}}+\,C_{batt_{H2}}\Big{)}+(1-\mu_{H2})\cdot\Big{(}C_{fc_{d}eg}+\,C_{bat _{d}eg}\Big{)}\\ \\ s.t.\left\{\begin{array}{c}\overset{\sim}{x}=(\mu_{H2},Q_{bat})^{\mathsf{T}} \in U\\ v=v_{cycle}(t)\,t\in[0,N-1]\\ SOC_{L}\leq SOC\leq SOC_{H}\\ |SOC_{0}-SOC_{cnt}|\leq ASOC\\ P_{bat,min}\leq P_{bat}\leq P_{bat,max}\\ 0\leq P_{fc}\leq P_{fc,max}\\ \end{array}\right\}\end{array}  \tag{21}\]  
where \(J\) represents the total cost, comprising the following two main components: the economic cost, which accounts for the hydrogen consumption of the FCS and battery, and the durability cost, which reflects the degradation of both the FCS and battery. \(\mu_{H2}\) represents the economic cost coefficient, which signifies the weight in the energy management strategy. \begin{table}
\begin{tabular}{c c c} \hline
**Parameter** & **Value** & **Unit** \\ \hline \(v_{s1}\) & 180 & km/h \\ \(v_{s2}\) & 80 & km/h \\ \(\alpha_{s}\) & 6.5 & \% \\ \hline \end{tabular}
\end{table} 
Table 4: Parameters for drivability requirements. Specifically, when \(\mu_{H2}=0.5\), it indicates an equal weighting between the fuel economic cost and the system durability cost. If \(\mu_{H2}\) is greater than 0.5, it indicates that the energy management strategy prioritizes the minimization of hydrogen consumption. The NEDC (New European Driving Cycle) is used as the speed demand profile. \(U\) is the optimization space, as follows:  
\[U=\left\{ \begin{aligned} Q_{bat}&\in[11,22,33,44,55] Ah\\ \mu_{H2}&\in[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9] \end{aligned} \right\} \tag{22}\]  
In FCHVs, the battery voltage is typically boosted to match the bus voltage V\({}_{bus}\), which significantly impacts driving efficiency. The bus voltage is generally set in the range of 300-400 V. The maximum power limit of the battery is defined as follows:  
\[\left\{ \begin{aligned} P_{batmin}&=\frac{V_{ busmax}}{K_{batdis}}\left(\frac{V_{ocv}-V_{busmin}}{K_{batdis}}\right)\\ P_{batmax}&=\frac{V_{busmin}}{K_{batdis}}\end{aligned} \right\} \tag{23}\]  
where \(V_{ocv}\) is the open-circuit voltage of the battery, \(V_{busmax}\) and \(V_{busmin}\) represent the upper and lower limits of the bus voltage, and \(R_{batdis}\) and \(R_{batdis}\) correspond to the battery's charging resistance and discharging resistance. To ensure that the parameters remain within the specified constraints, a penalty function should be employed to increase the cost associated with exceeding these constraints. For SOC, the primary consideration is to keep it within the defined limits, meaning that it should not be overcharged or excessively discharged. The next step is to ensure that the SOC at the final time point equals that at the initial time point. Therefore, a penalty function is designed by the principles outlined in reference [5], as follows:  
\[C_{soc}=\left\{ \begin{aligned} & 1+\alpha(SOC-SOC_{H}+1)^{2}, SOC\in[SOC_{H},1]\\ & 0,SOC\in[SOC_{L},SOC_{H}]\\ & 1+\alpha(SOC_{L}-SOC+1)^{2},SOC\in[0,SOC_{L}]\end{aligned} \right\} \tag{24}\]  
\[C_{soc,end}=\left\{\begin{aligned} & 1+\alpha(SOC-SOC_{end}+1)^{2}, SOC\in[0,SOC_{end}-\varepsilon]\\ & 0,SOC\in[SOC_{end}-\varepsilon,SOC_{end}+\varepsilon]\\ & 1+\alpha(SOC_{end}-SOC+1)^{2},SOC\in[SOC_{end}+\varepsilon,1] \right\} \tag{25}\]  
where \(k_{limit}\) is a sufficiently large penalty coefficient, typically set to \(10^{5}\), and \(\varepsilon\) represents the discretization step size of the SOC matrix. This approach enables the transformation of the constrained optimization problem defined in Equation (21) into an unconstrained optimization problem, as shown in Equations (26) and (27).