*4.1. Train Performance Simulation*

The train performance, computed in the Microsoft Excel environment, requires the main characteristics of the route as input data, namely the plano-altimetric characteristics of the line (slopes), the curvature radius of the curves, speed limits and tunnels. Moreover, it requires electromechanical information of the rolling stock such as: weight, aerodynamic resistance, traction and braking force [46,59]. Given these inputs, and with a calculation step in meters, it is possible to obtain several outputs such as:


### *4.2. Electrical Model of the Traction System*

The electrical computation software, implemented in Fortran language, allows to solve load flows calculation for a direct current electrified system [46,60,61]. For each simulation step, the software creates an equivalent electric network in which the nodes represent the traction power substation, vehicles present on the route and parallel points, as shown in Figure 5. In this model, VTPS and RTPS represent the substation DC voltage and internal resistance; RBIN is the rail electric resistance and PBIN is the electric power required by each train.

**Figure 5.** Electric software circuit model.

The software requires as input the data related to the power profiles of trains, the electrical substation features and the resistance of contact line equivalent section and rails. As output, the software provides the line voltage profile and currents flowing in the substation feeders, as well as the power provided by each electrical substation [61,62].

### *4.3. Electrical Model of the On-Board Energy Storage System*

Simulink/Matlab models have been developed for the battery pack and supercapacitor pack, starting respectively from the characteristics of the electrochemical and supercapacitor cells. The models have been implemented as dynamic continuous-time systems, thus using mainly integrator, sum and gain blocks. In the case of electrochemical cells, a lookup table dynamic block is used to represent the

open circuit voltage as a function of the state of charge (OCV-SOC curves). Figure 6 shows the battery based ESS Simulink model.

**Figure 6.** Battery based ESS Simulink model.

In addition to the parameters related to the energy storage system, the software requires as input data the reference power profile required, which is obtained directly from the evaluation of the train performance in the case of high-power lithium cells. In the case of H-ESS, the reference power profiles for the high-energy lithium cells and supercapacitors are obtained from a Simulink model that applies a low pass filter and an amplitude limiter to the original power profile.
