**2. Methods**

## *2.1. The Train Performance Simulation*

Train performance is calculated in an Excel ™ (Excel 2019 (v16.0), Microsoft Corporation, Redmond, WA, USA) environment [37–39]; the software follows the basic laws of motion. It requires:


From these inputs, the software provides dynamic and kinematic profiles of the individual vehicle as outputs. It schematizes the vehicle as a material point that absorbs a power at a given point of the line. From an energy point of view, turnouts or level crossings are interpreted by the simulation software as points at which it is necessary to change direction. Therefore is necessary simulate another line and then interconnect it. Information entry related to the operating mode of the line determines the reference tra ffic scenario and the program provides the system time graph as output.

Setting manually the headway, the code processes the time of departure on each route for each vehicle. On the basis of the set interval for processing, the pre-set tra ffic scenario is simulated. Starting from the calculation of braking energy, obtainable for every stop, the software computes the theoretically recoverable energy for each train.

Table 1 shows a summary of the main parameters calculated taken into account input data.


**Table 1.** Inputs and outputs of train performance simulation.

### *2.2. The Electrical Model of the Traction System*

The electrical computation software allows to solve load flow calculations for a d.c. electrified network. The software for each simulation step, based on kilometer points of vehicles, automatically creates an equivalent electric network in which the nodes represent the electrical substations, vehicles and parallel points; the branches are the traction equivalent circuit stretches between the above-mentioned nodes.

The following models are adopted for the network's computation, even in presence of braking energy recovery. The models and the procedure is well presented in [37].


**Figure 2.** V-I characteristic of a typical electric substation.

The software can also simulate the behavior of a mixed rheostatic-regenerative braking (dash-dot line in Figure 3). Like the model shows, with this type of braking as the pantograph voltage increases, the current dissipated on the rheostats increases; at the same time, the current fed into the traction line decreases until it is erased once the maximum voltage value (Vmax) is reached.

**Figure 3.** V-P characteristic of traction vehicles.

n nodes network are expressed directly by a set of values of the n independent variables, i.e., of the voltages or currents, or voltages and currents (at the different nodes), the remaining n dependent variables (currents, voltages) can be obtained respectively with the following equations:

$$\mathbf{I}\_{\mathbf{j}} = \sum\_{\mathbf{j}=1}^{n} \mathbf{G}\_{\mathbf{j}i} \mathbf{V}\_{\mathbf{i}} \tag{1}$$

$$\mathbf{V}\_{\mathbf{i}} = \sum\_{\mathbf{j}=1}^{N} \mathbf{R}\_{\mathbf{i}\mathbf{j}} \mathbf{I}\_{\mathbf{j}} \tag{2}$$

where Rij and Gji are the coefficients of the matrices of the node resistances and conductances, respectively.

Gji*,* relating to a generic Ij, is obtained by setting equal to zero the voltages of all the nodes except the i-th node, and will therefore be:

$$\mathbf{G}\_{\text{ji}} = \frac{\mathbf{I}\_{\text{j}}}{\mathbf{V}\_{\text{i}}} \text{ (}\mathbf{V}\_{1} = \mathbf{V}\_{2} = \dots = \mathbf{V}\_{\text{i}-1} = \mathbf{V}\_{\text{i}+1} = \dots = \mathbf{V}\_{\text{n}} = 0\text{)}\tag{3}$$

Similarly for Rij, setting Ij - 0:

$$\mathbf{R}\_{\ddot{\mathbf{i}}} = \frac{\mathbf{V}\_{\mathbf{i}}}{\mathbf{I}\_{\mathbf{j}}} \left( \mathbf{I}\_{1} = \mathbf{I}\_{2} = \dots = \mathbf{I}\_{\mathbf{j}-1} = \mathbf{I}\_{\mathbf{j}+1} = \dots = \mathbf{I}\_{\mathbf{n}} = \mathbf{0} \right) \tag{4}$$

The linear equations written in the form:

$$\mathbf{x}\_{\mathbf{i}} = \mathbf{f}\_{\mathbf{i}}(\mathbf{x}\_1 \dots \mathbf{x}\_{\mathbf{j}} \dots \mathbf{x}\_{\mathbf{n}}) \tag{5}$$

i.e., each one explicit with respect to one of the variables x, are solved by using the Gauss-Seidel method: the simulation software is thus able to calculate the line voltage (VLINE).

Using the same approach, the software determines the State of Charge of an ESS (SoCESS) during the simulation through the SoC update formula shown in Equation (6):

$$\text{SoC}\_{\text{ESS}}(\mathbf{t}) = \text{SoC}\_{\text{ESS}}\left(\mathbf{t} = 0\right) + \frac{1}{3600 \cdot \text{Energy}\_{\text{acc}}} \int\_{0}^{\mathbf{t}} \text{V}\_{\text{ESS}}(\mathbf{\tau}) \cdot \text{I}\_{\text{ESS}}(\mathbf{\tau}) \,\text{d}\mathbf{\tau} \tag{6}$$

where VESS and IESS are the voltage and current of the ESS, respectively, calculated by the simulation tool, while Energacc is the nominal energy of the ESS.

The output of the software provides the output values of powers from each electrical substation, the maximum recoverable powers during vehicle braking, the energy storage operation profile and also the line voltage profile and the currents flowing in the substation feeders. Table 2 summarizes inputs and outputs of the simulation tool.

**Table 2.** Inputs and outputs of traction system simulation.

