Research Article  Open Access
Modelling and Simulation of Tramway Transportation Systems
Abstract
Electrified guided vehicles typically face routes having a large number of acceleration and braking phases. The braking energy, since the feeding line presents nonreversible electrical feeding substations, can be recovered in the presence of other nearby vehicles. To improve braking energy recovery, one or more storage systems can be positioned along the track. Analysis of effectiveness for the considered solution requires timedomain simulation models, to be created through suitable simulation generalpurpose languages or specialised languages/software. In this paper, three different tools for the considered existing tramway were developed, and the main examined characteristics have been compared to each other. Then, analysis of output results was also performed, demonstrating the real costeffectiveness of introducing one storage device on the considered tramline in operation.
1. Introduction
Electrified guided vehicles such as trams typically face routes with a large number of acceleration and braking phases. In this regard, only a fraction of the initial kinetic energy can be partially recovered [1–4]. In particular, if the feeding line presents nonreversible electrical feeding substations, braking energy can partially get back only in the presence of other nearby vehicles, capable of adsorbing traction energy. To improve the possibility of recovering energy, stationary storage systems along the track can be installed, in order to adsorb the energy during braking, when no other trains are able to receive it.
Analysis of the costeffectiveness of the proposed solution involves the development of timedomain simulation tools. Obviously, solicitations on the storage system are influenced by timetable of the trams, positioning of substations, etc. Typically, the storage is installed through the interposition of a DC/DC converter, in order to limit current within safety limits, or to avoid battery StateofCharge drift, to maintain unaltered its capability to adsorb or deliver energy.
In order to make timedomain simulations, it is possible to create models by utilisation of generalpurpose programming languages, i.e., FORTRAN or C, or specialised languages or software, i.e., Modelica or MatlabSimscape, respectively.
As example of modelling and simulation in railway applications, modelling of shortcircuit protections or DC electrical railway systems to simulate stray currents and touch voltages, has been already developed in [5, 6].
In this paper, simulation tools aimed at correctly representing the railway system, including the electric power supply, the storage systems, and the vehicles moving along the rails have been widely developed. In particular, three simulation models were developed. The first tool has been realised in FORTRAN. It has been made a long time ago and used in many applications [7, 8]. Several experimental tests, in order to make its validation, were also performed in the past [9].
On the other hand, Dymola [10], a commercial tool based on the opensource Modelica language [11], represents a recent solution having many advantages, in terms of flexibility, simulation efficiency, and manmachine interface, as also demonstrated in several past works on railway systems, by the same authors [12, 13].
In the last years, many other commercial tools were also developed, as MatlabSimscape [14]. This last one is not based on an opensource environment, but it is a relatively new toolbox of one of the most considered software tools for academic and company uses. Indeed, it is of some interest to compare the different tools as started in [15], also by extending the comparison to the new ones. More precisely, the newest tools were firstly confirmed on results achieved by the first one, in order to ensure the strength of the obtained results. Then, powerful and flexibility of each one have been accurately verified.
Therefore, after mutually validating the three tools under consideration, a technicaleconomic analysis for a tramway line in operation has been performed. In this way, energy consumption in realistic traffic conditions was taken into account, and energy saving due the installation of a storage device accurately calculated. Finally, payback time of the investment was evaluated, thus demonstrating the costeffectiveness of the considered solution.
2. The Simulation Tools
As said, in order to evaluate the amount of the braking recoverable energy, it is mandatory to develop a simulation tool capable of correctly simulating the feeding network and the vehicles dynamic. Then, different running phases and frequency of the trains have to be considered. Following modelling criteria were implemented.
2.1. FORTRAN Language Based Model
FORTRAN language is a consolidate code to develop electrical model to represented power network. For DC railway application, calculation code Trainsim, consisting of two computational tools, is presented in [7, 8].
The first one allows calculating all the electromechanical characteristics and performance of trains on a specific railway line. Based on altimetry profile of the track and rolling stock features, it is possible to carry out the train performance due to motion stages. Dynamic and kinematic profiles are obtained. It is possible to set also various traffic scenarios. The tool also calculates the amount of recoverable energy at each braking phase.
The second one makes the DC electrified network load flow calculation. It builds an equivalent electrical network at each step, based on the tram positions along the route. ESSs, vehicles, and parallel points are the electrical nodes of the considered equivalent network.
The calculation code due to the model reported below permits the calculation of the electrical parameter of the network considering also the energy recovered during braking phase. The models are as follows:(i)Electrical substation (ESS). Figure 1 highlights the equivalent circuit to represent the voltagecurrent characteristic of a typical electrical substation. When the substation is not connected (zone 2), the node A is settled with P = 0. During supply or regeneration mode, V = V_{0} condition (zone 1 noload output voltage) or V = (zone 3 network recovery voltage) is imposed at the node through resistance R_{3} or R_{1} to simulate different voltage drop, as shown in zone 3 and zone 1.(ii)Trams in traction. The vehicles are represented as a constant power load. However, if the current exceeds the maximum allowed value during operation, the constraint I= (constantcurrent operation) is imposed during the iterative calculation of the nonlinear equations, until the voltage at pantograph decreases. Standard EN 50388 [16] imposed V=0.8, so the model reproduces the VP characteristic in agreement with this value.(iii)Trams in braking. Braking energy recovering depends on the receptivity of the system. If the system allows it, the traction line can accept all the power generated during braking phase, according to the solution of the system equations. If the voltage increases up to , the recoverable energy transferred to the catenary is lower. Then, the distance among the recoverable energy, and the energy effectively recovered gives an idea of the energy dissipated on braking rheostat. In this regard, a mixed rheostatregenerative braking (shown as dashdotted line in Figure 2) can be simulated. Figure 2 shows how the model works due to this braking technique: in particular, the current dissipated on the braking rheostat increases, and consequently the current entered into the traction line decreases up to being zeroed, when the voltage is reached. Typically, V’ is in the range 0.9÷0.95 . However, a good strategy to avoid the voltage decrease, just explained, is following the solid line reported in Figure 2, where V’=.
Finally, simple laws implemented for traction (1) and braking (2), according to the above points (see Figure 2), are as follows.
For each electrical substation, the software calculated electrical parameters about power, current, etc. including the amount of recoverable energy during braking and the voltage along the line.
The procedure for determining the matrix coefficients of the admittance constituting the traction line refers to electrical networks in permanent sinusoidal regime and, therefore, to complex admittance and impedance. The software, dealing with DC networks, considers all the magnitudes to be real, the admittance as conductance, and the impedance as resistance.
Regarding numerical solving methods, NewtonRaphson or GaussSeidel method is typically applied. Some variants of NewtonRaphson method particularly suitable for small and mediumsize networks can be also considered, in order to improve conditions of convergence and to reduce number of iterations [17].
2.2. Modelica and MatlabSimscape Based Model
As said, the simulation tool realised in Dymola is based on Modelica language [11]. It is a single simulator, performing the same functionalities of the two previous ones, written in FORTRAN, to the advantage of accuracy and flexibility, as will be analysed later. As anticipated, Modelica language is cyberphysical and allows simulating complex systems, i.e., having mechanical, electrical, thermal, control subsystems. Following the proposed approach, the ESSs were simulated through lumped components linked in a graphical way, as visible in Figure 3. As this study shows, only the DC component is of interest to evaluate effects of harmonics; each substation has been modelled through its wellknown DC equivalent. Naturally, the system is timevariant. In fact, the contactline configuration varies with time, since the train position varies. In fact, resistor values change depending on the train position, according to the following expressions:where R_{1} is the left side line resistance, R_{2} is the right side line resistance, and δ is the ratio of the distance between the train position (x) and ESS2 position (P_{2}), and the distance between ESS1 and ESS2 substations (L_{12}).
In addition, the electrical feeding substations in operation are subjected to variation, when a train moves from a section to another, along the track. This difficulty can be easily addressed in Modelica, considering the possibility of changing the system equations after some events happen [12, 13].
Finally, modelling of trains requires modelling of the electric drive, resistance forces, and the driver’s behaviour. Electric drive is modelled as a system able to produce the tractive force as required by the driver, within the allowed force and power limits, generating some power losses expressed as a function of the mechanical speed and the required force. Then, each train must avoid feeding power to the catenary when this would cause the line voltage to become too large, and a controller of the DC power must be implemented. A much more sophisticated control strategy has been used, having feedback on the instantaneous pantograph voltage and modulating the braking power conveyed along the catenary, in order to avoid reaching instantaneously the upper allowed limit. Resistance to movement has been modelled using the formula including aerodynamic drag and rolling resistance:where R is the global resistance force acting against the vehicle movement, α is the angle between the track and the horizontal plane, m is the vehicle mass, is the rolling resistance coefficient, A and B are empirical positive numbers taking into account the lateral and front aerodynamic resistance, and V is the train speed. About the driver, it can be represented simply by a proportional controller, in which the reference tractive force is proportional to the error between the actual and the reference speed.
Further details regarding different submodel and control logic, in particular the blending strategy depicted in Figure 2, are widely described also in [15].
In parallel with objectoriented interface, the user can directly insert physical or control equations. These last are written exactly as in textbooks. Starting from individual subsystems description, Modelicabased tool automatically performs many operations: first, the identification of a set of differential algebraic equations (DAEs) representing the system under study and, then, after some additional operations to simplify the set of equations [15], the conversion in a C or C++ language compilation, to make the final simulation executable. This task of automatic creation of simulation executable requires just a few seconds. So, changing the system to create a new executable (for instance, to have more trains or a different number of ESSs) will require just a repetition of this automatic process. Once the executable has been created, it can run several times, while changing some parameters from a run to another [15].
Last simulator is realised in MatlabSimscape [14] and entirely developed starting from the tool realised in Modelica: in this regard, the model architecture and equations of the submodels are the same already implemented in Modelica. Thus, lumped components have been simply rebuilt using MatlabSimscape libraries, always according to Figure 3, and considering for their control part the wellknown MatlabSimulink control libraries.
2.3. Comparisons
The three tools were tested by analysing their flexibility, simulation efficiency, and manmachine interface.
Flexibility. This aspect was identified in terms of capability to model new case studies. The Modelicabased tool is able to rapidly modify the existing models through its objectoriented interface, simply by changing or connecting new elements. Indeed, it is possible to increase or reduce the number of the trains running, the number and positioning of the electrical feeding substations, the eventual storage systems located along the track, the auxiliary adsorption, etc. Indeed, expandability of the model is easily guaranteed, also by the fact that the Modelicabased tool is a unique simulator, unlike those realised in FORTRAN. Additionally, creation of the simulation executable requires just few seconds. Thus, changing the system simply requires the rapid repletion of this process. These characteristics may be retrieved also in MatlabSimscape, although the graphical interface is less clear and intuitive, as only partially objectoriented, due to the need for additional MatlabSimulink control blocks. On the other hand, the FORTRAN language based model is completely different, requiring to be fully recompiled at every small change [18].
Simulation Efficiency. This was evaluated by speed and memory requirements. It must be said that the FORTRAN numerical solver may be optimised for the considered case study. Instead, Modelica and MatlabSimscape utilise standard numerical solvers not specifically optimised on the single case study. The comparison was executed having one system characterised by a single electrical feeding substation and two trams on the track. As already described in [15], at equal number of samples and time length simulation, the Modelicabased tool engaged 11.5 s requiring 6 MB of memory. This is nearly the same for MatlabSimscape, which employs about 20 s to perform a simulation of 1000 s, with memory occupation of 11 MB. In order to consider a proper time for complete simulation for FORTRAN calculation code, it is needed to consider the time duration to move between the two tools. In the case of the considered simulation (i.e., 1000 s), it engaged about 9.8 s and 20 MB of memory requirements.
ManMachine Interface. The tool developed in Modelica allows the possibility of making changes in different ways. First, equations can be easily changed by text interface. On the other hand, model structure and related parameters may be changed by graphical interface [13]. This is nearly the same as utilisation of the MatlabSimscape tool. Regarding the FORTRAN based model, VisualBasic language is used to manage input and output data in Trainsim software; the support of the user friendly macros implemented permits modifying parameters in the software, although much more slowly than the others.
In conclusion, the Modelicabased and MatlabSimscape tools require high memory requirements but also guarantee much more flexibility. The FORTRAN based tool, developed many years ago, is very useful because it is able to produce benchmark results, to be used as main reference. On the other hand, the other two tools allow fast creation of models, whose simulation results need to be carefully verified.
3. Case Study
3.1. Validation
The tools have been tested having as reference case study an existing tramway, in Rome. The path length is about 5.7 km, as noticeable from Figure 4, having one single electrical feeding substation: two trains are on rails, one for each track. The main input model parameters are listed in Table 1.

The simulation results were evaluated in terms of energy and power flows of the considered tramway. In the first examined condition, the trams make use of onboard resistors to dissipate all the braking energy. In the second scenario, they send braking energy on the catenary, until the voltage does not reach the maximum admitted value fixed at 800 V. Finally, trams send braking energy as before, but with one storage system installed about halfway along the tramway.
First, simulations were performed without considering braking energy recovery. As said, model parameters were slightly updated, in order to match the results provided by the new tools with the oldest one. Figure 5 shows the plot results of one train, driving on a portion of the considered route. In this case, the tram is not able to send its braking energy along the catenary. As observable, plot results are equivalent among the three tools, respectively, developed in Modelica, MatlabSimscape, and FORTRAN.
Then, simulations have considered the possibility of recovering the braking energy. In this case, parameters acting on control voltage at pantograph have been tuned, to perform modulation of the inlet power, without overcoming voltage limits. Figure 6 shows plot results of one train under a portion of the considered profile.
As noted, different blending strategies according to Figure 2 have been implemented. Naturally, these differences have an impact on the total energy absorbed from the network. The blending strategy having V’=0.9÷0.95 (see Figure 2), implemented in FORTRAN, results in a reduction of the energy recovered through the pantograph, respectively, of 13% and 2% with respect to the dynamical strategy, used in Modelica and MatlabSimscape, that allows the full powertrain power to be recovered up to (i.e., V’=). Then, in terms of total energy adsorption from the ESS, increment is of 3% and 0.6%, respectively.
Naturally, braking energy recovery can be enhanced through energy storage systems installed along the route. In this way, one storage system has been introduced, with the main aim of validating the tools under test, also in the new considered system configuration. The lithium battery is positioned about halfway along the tramway (i.e., about 3.8 km from the terminal), whose characteristics are in Table 2.

Relation among the nominal energy and nominal capacity is given by
where is the number of cells in series, is the nominal energy, is the nominal cell voltage, and is the nominal capacity. Number of cells and nominal capacity were selected in order to exactly reproduce through the newest tools the battery SOC (StateofCharge) and the power profile, with respect to the FORTRAN based one. Results are shown in Figure 7.
Installation of one storage system can significantly reduce the energy delivered by the electrical feeding substations (ESSs). The considered simplified case study with two trains obviously cannot correctly evaluate the costeffectiveness of the considered solution. Thus, the full analysis will be described in the next section, following the same approach already considered by the authors in [12, 13].
3.2. Energy Saving Evaluation
Energy saving evaluation has been performed by considering an experimental measurement campaign carried on by the authors. Results are summarized in Table 3, where the daily energy delivered from the electrical substation (ESS) has been measured during one typical school working day and one typical holiday day. Starting from that, evaluation of the annual electrical energy demand has been performed simply by considering the number of working days and holidays over the year, given by the tramline operator.

Therefore, the Modelicabased tool presented before has been used to exactly reproduce the energy consumption shown in Table 3. To do that, different numbers of operating trams along the day have been considered from timetable, respectively, 24 during peak hours, typically concentrated in the middle part of the day, and 12 in low load hours, mainly in the early morning and in the late evening. Real number of trams in operation may be slightly different. However, the daily distribution has been chosen to exactly reproduce the measured consumption.
After simulating exactly the same level of the measured energy demand, i.e., obtaining the daily consumption shown in Table 3, simulations have been repeated by including the storage system described in Table 2. The delivered energy by the ESS was then compared with the previous one, calculated in absence of the storage system. The reduction in annual energy consumption was about 15.2%, moving from 5386 MWh up to 4570 MWh.
The costeffectiveness of the proposed solution has been investigated by considering the initial cash outlay due the introduction of the storage system, with respect to the annual return of the investment due to the abovementioned electrical energy saving. The initial cash outlay due to the storage system and its balance of plant has been calculated by considering a value of 500 €/kWh including cells, BMS, and battery packaging. As discussed in detail in [19], the presence of a DC/DC converter may be required. For this, a fixed cost of 60 k€ in analogue way to the experience presented in [19] has been used. Finally, the current industrial user price of energy in Italy was evaluated considering an average value of 150 €/MWh. In terms of maintenance costs, for the reasons already explained in [19], the storage has been considered able to cover the whole life of the plant.
Main objective of the analysis was related to the evaluation of the net present value (NPV) and of the payback time (PBT) for a whole life of ten years and an interest rate of 4%. Results are shown in Table 4.

The results show that installation of a stationary storage system may guarantee a payback time within just two year. These numbers are so favourable not to be affected by any possible storage substitution, during the plant life. Indeed, the costeffectiveness of the proposed solution has been clearly demonstrated.
4. Conclusions
This paper has demonstrated how innovative languages and software allow rapid creation of numerical models, having electrical, mechanical, and control parts to be simulated.
The Modelicabased model was realised through the commercial Dymola tool. However, it could run inside any other Modelicacompliant tool. They proved to be fast, with relatively small memory occupation. Nearly the same can be said about MatlabSimscape, although characterised by less flexibility, due to the fact that it is not inspired by an opensource language platform. The quality has been verified by comparing results with those obtained using a well validated FORTRAN based simulator.
With reference to an existing case study, the costeffectiveness due to the utilisation of stationary storage system to enhance braking energy recovery has been clearly demonstrated, since on a hightraffic tramway with high number of stops, payback time has been reached within only two years. Naturally, it is of great importance, in order to correctly achieve energy saving for the considered application, to preliminary calibrate the considered tool on actual electrical energy consumption, experimentally measured.
As future direction of this work, it is also possible to consider the extension of the considered methodology to other tramlines in operation, in order to investigate the potential costeffectiveness of similar, or different, energy saving solutions.
Data Availability
The data used to support the findings of this study are included within the article.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
References
 A. GonzálezGil, R. Palacin, P. Batty, and J. P. Powell, “A systems approach to reduce urban rail energy consumption,” Energy Conversion and Management, vol. 80, pp. 509–524, 2014. View at: Publisher Site  Google Scholar
 A. GonzálezGil, R. Palacin, and P. Batty, “Sustainable urban rail systems: Strategies and technologies for optimal management of regenerative braking energy,” Energy Conversion and Management, vol. 75, pp. 374–388, 2013. View at: Publisher Site  Google Scholar
 M. C. Falvo, R. Lamedica, and A. Ruvio, “Energy storage application in trolleybuses lines for a sustainable urban mobility,” in Proceedings of the 2012 Electrical Systems for Aircraft, Railway and Ship Propulsion, ESARS 2012, Italy, October 2012. View at: Google Scholar
 M. C. Falvo, R. Lamedica, and A. Ruvio, “An environmental sustainable transport system: A trolleybuses Line for Cosenza city,” in Proceedings of the 21st International Symposium on Power Electronics, Electrical Drives, Automation and Motion, SPEEDAM 2012, pp. 1479–1485, Italy, June 2012. View at: Google Scholar
 M. Berger, C. Lavertu, I. Kocar, and J. Mahseredjian, “Proposal of a timedomain platform for shortcircuit protection analysis in rapid transit train DC auxiliary systems,” IEEE Transactions on Industry Applications, vol. 52, no. 6, pp. 5295–5304, 2016. View at: Publisher Site  Google Scholar
 A. Ibrahem, A. Elrayyah, Y. Sozer, and J. A. De AbreuGarcia, “DC railway system emulator for stray current and touch voltage prediction,” IEEE Transactions on Industry Applications, vol. 53, no. 1, pp. 439–446, 2017. View at: Publisher Site  Google Scholar
 A. Capasso, R. Lamedica, and C. Penna, “Energy regeneration in transportation system methodologies for powernetworks simulation,” in Proceedings of the 4th IFAC/IFIP/IFORS international conference on control in transportation system, Baden, Germany, April 1983. View at: Google Scholar
 A. Capasso, G. Giannini, R. Lamedica, and A. Ruvio, “Ecofriendly urban transport systems. Comparison between energy demands of the trolleybus and tram systems,” Ingegneria Ferroviaria, vol. 69, no. 4, pp. 329–347, 2014. View at: Google Scholar
 A. Adinolfi, R. Lamedica, C. Modesto, A. Prudenzi, and S. Vimercati, “Experimental assessment of energy saving due to trains regenerative braking in an electrified subway line,” IEEE Transactions on Power Delivery, vol. 13, no. 4, pp. 1536–1541, 1998. View at: Publisher Site  Google Scholar
 Dymola., “Dynamic Modeling Laboratory,” documentation available from http://www.3ds.com/products/services/catia/products/dymola. View at: Google Scholar
 P. Fritzson, Introduction to Modeling and Simulation of Technical and Physical Systems with Modelica, WileyIEEE Press, 2011. View at: Publisher Site
 M. Ceraolo, R. Giglioli, G. Lutzemberger, M. Conte, and M. Pasquali, “Use of electrochemical storage in substations to enhance energy and cost efficiency of tramways,” in Proceedings of the 2013 AEIT Annual Conference: Innovation and Scientific and Technical Culture for Development, AEIT 2013, Mondello, Italy, October 2013. View at: Google Scholar
 S. Barsali, P. Bolognesi, M. Ceraolo, M. Funaioli, and G. Lutzemberger, CyberPhysical Modelling of Railroad Vehicle System using Modelica Simulation Language, vol. 104, Railways, Ajaccio, Corsica, France, 2014.
 “MatlabSimscape,” Official site https://www.mathworks.com/products/simscape.html. View at: Google Scholar
 A. Capasso, R. Lamedica, A. Ruvio, M. Ceraolo, and G. Lutzemberger, “Modelling and simulation of electric urban transportation systems with energy storage,” in Proceedings of the 16th International Conference on Environment and Electrical Engineering (EEEIC '16), Florence, Italy, June 2016. View at: Google Scholar
 “CEI EN 50388, Railway applications  Power supply and rolling stock,” 2012. View at: Google Scholar
 M. E. ElHawary and O. K. Wellon, “The alphamodified quasisecond order NewtonRaphson method for load flow solutions in rectangular form,” IEEE Transactions on Power Apparatus and Systems, vol. 101, no. 4, pp. 854–866, 1982. View at: Google Scholar
 A. Capasso and R. Lamedica, Simulation of The Operation of Electric Traction Networks, CNR  Progetto finalizzato trasporti, Bologna, Italy, 1984.
 M. Ceraolo, R. Giglioli, G. Lutzemberger, and A. Bechini, “Cost effective storage for energy saving in feeding systems of tramways,” in Proceedings of the 2014 IEEE International Electric Vehicle Conference, IEVC 2014, IEEE, Florence, Italy, December 2014. View at: Google Scholar
Copyright
Copyright © 2019 A. Capasso et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.