## 2 Building of the Simulation Model
### Building of the Numerical Model
#### 2.2.4 Energy Storage System Module  
The energy storage system module in this study is used to simulate the on-board FC, battery, and SC modules. The module receives power demand instructions from the power bus, returns to the fuel cell, battery, and super capacitor of the actual output power, voltage, current, state of charged, and so on. The positive power value is defined as discharge. Figure 4: Structure of the train module. (1) Fuel cell system module  
There are many kinds of fuel cells. In this study, the Ballard 150 kW PEMFC is adopted as the prototype for modeling. The operating process of the PEMFC is relatively complex. In order to deduce a simplified nonlinear fuel-cell module, some assumptions are made below:  
(1) Assuming that the working temperature of the FC stack is constant (the response time of the FC to temperature is about 102 s). (2) Assuming that both the anode and cathode of the fuel cell are well humidified, which means the humidity management is considered to be OK.  
(3) Assuming that the liquid water will not leave the stack, which means the water management is considered to be OK.  
(4) Assuming that the humidifier and temperature controller work in a reasonable range, which means temperature management is considered to be OK.  
To simplify the dynamic model, assuming that the entry reactant mole fraction is constant, namely pure hydrogen (99.95%) is directly inhaled to the anode. Air mixing (according to Nitrogen and Oxygen 79:21) is sent into the cathode, assuming that all gases are ideal. The equivalent circuit model of the proton exchange membrane fuel cell is shown in Figure 5.  
According to the steady-state voltage and current characteristics of the fuel cell, the output voltage of the fuel cell is represented by \(V_{\ell}\):  
\[V_{ft}=E-V_{a}-V_{c}-V_{ohm} \tag{5}\]  
where \(E\) is the reversible voltage of fuel cell (open circuit voltage at steady state), \(V\); \(V_{a}\) is the activation voltage drop of the anode and cathode (also known as activation overpressure drop), \(V\); \(V_{c}\) is the voltage drop caused by reactant gas concentration drop or the mass transfer of oxygen and hydrogen (also known as the concentration overpressure drop), \(V\); and \(V_{ohm}\) is the ohm overvoltage caused by the proton passing through a solid electrolyte or the electron passing through a circuit, \(V\). The steady-state component of the fuel cell voltage \(V_{st}\) is expressed as:  
\[V_{st}=E-V_{ohm} \tag{6}\]  
Figure 5: The equivalent circuit model of fuel cell (FC). The transient component of the fuel cell voltage \(V_{tr}\) is:  
\[V_{tr}=V_{a}+V_{c} \tag{7}\]  
The calculation method of open circuit voltage is as follows:  
\[E=K_{c}\cdot E_{n} \tag{8}\]  
where \(K_{c}\) is the voltage constant under rated operating condition; and \(E_{n}\) is the Nernst voltage, V.  
The calculation method of activation voltage drop is as follows:  
\[V_{a}=NA\ln\left(\frac{i_{ft}}{i_{0}}\right)\frac{1}{sT_{d}/3+1} \tag{9}\]  
where \(A\) is the slope of tafel, V; \(i_{0}\) is the exchange current for fuel cells corresponding to activation voltage, A; and \(T_{d}\) is the fuel cell activation response time, s.  
The battery module  
The equivalent circuit of the battery is shown in Figure 6. Here, \(V_{oc}\) is the open circuit voltage, \(R_{int}\) is the battery internal resistance, \(I\) is the battery current, and V is the battery output voltage. The open circuit voltage is a function of SOC and module temperature. The corresponding values of SOC, temperature, and open-circuit voltage are obtained by a test of the typical working condition, and then the continuous variation of the open-circuit voltage with SOC and temperature is gained by interpolation. The open-circuit voltage of the series battery pack is the product of single module voltage and the number of battery monomers. Charging and discharging internal resistance of the battery can be calculated by the same method.