## 4 Simulator Development
### Battery Model  
Similarly, the battery block [24; 25] in the Simscape library was employed to model the battery in the HPS. Many different versions are implemented in this block according to the type of rechargeable battery. The LIB model represents a battery cell as a controlled voltage source in series with a constant resistance (see Figure 5). This model is based on the modified Shepherd curve-fitting model with the addition of a polarization voltage term to the battery voltage expression, such that the effects of the SOC on battery performance could be better represented. With this model, the battery voltage is expressed as:  
\[V_{batt}=E_{0}-K\frac{Q}{Q-it}+A\exp(-B\cdot it)-R_{b}\cdot I \tag{9}\]  
where \(E_{0}\) is the open-circuit voltage (V), \(K\) is the polarization constant (V/Ah), \(Q\) is the battery capacity (Ah), \(it\) is the actual battery charge (Ah), \(A\) is the exponential zone amplitude (V), \(B\) is the exponential zone time constant inverse (Ah\({}^{-1}\)), and \(R_{b}\) is the battery internal resistance (ohm).  
Figure 4: Circuit schematic for fuel cell model.  
\begin{table}
\begin{tabular}{c c} \hline Voltage at 0 A and 1 A (V) & 45.5, 40 \\ \hline Nominal operating point (A, V) & 20, 35.5 \\ \hline Maximum operating point (A, V) & 30, 34 \\ \hline Number of cells & 48 \\ \hline Nominal stack efficiency (\%) & 40 \\ \hline Operating temperature (\({}^{\circ}\)C) & 25 \\ \hline Nominal air flow rate (lpm) & 300 \\ \hline Nominal supply & Fuel & 0.5 \\ pressure (bar) & Air & 1 \\ \hline Nominal & H\({}_{2}\) & 99.999 \\ composition (\%) & O\({}_{2}\) & 21 \\  & H\({}_{2}\)O (Air) & 1 \\ \hline \multicolumn{2}{c}{Response time (s)} & 1 \\ \hline \end{tabular}
\end{table}
Table 4: Fuel cell model parameters.  
Instead of inputting model parameter values, we input the capacity-voltage curve of the battery to be used. The shape of this curve is mainly defined by the nominal voltage, rated capacity, and initial SOC. Its shape can be more sophisticated with the maximum capacity, cutoff voltage, fully charged voltage, nominal discharge current, internal resistance, and capacity at the nominal voltage and exponential zone. Among them, the nominal voltage should be carefully selected with the corresponding capacity. In general, it is captured from the middle of the curve, which typically corresponds to 3.6-3.8 V. However, in this block, it is captured almost at the end of the curve, where the voltage rapidly drops to below 3.3 V (see Figure 6). With lithium-iron-phosphate (LFP) batteries, the nominal voltage is relatively distinctive because the shape of the curve is mostly straight with a sharp bend at the end. However, with the selected battery, the nominal voltage is unclear because the battery is based on lithium-nickel-manganese-cobalt-oxide (NMC). Unlike LFP, the shape of the curve is mostly smooth without any sharp bending. By referring to the corresponding datasheet, the nominal voltage was assumed to be 3.3 V. With a battery pack in the 7S8P configuration, it would be 23.1 V. The exponential zone also shares a similar problem. The end of the exponential zone is not plainly visible based on the shape of the curve. The nominal voltage was roughly determined to be 24.984 V at 7.5 Ah. Table 5 lists the parameters of the battery model.  
Figure 5: Circuit schematic for battery model.  
Figure 6: Comparison of NMC and LFP batteries in terms of extracting key parameters from the polarization curve. (1, 2) Exponential zone (V, Ah), (3) nominal voltage (V), and (4) capacity at nominal voltage (Ah).