electronics Article HIL Simulation of a Tram Regenerative Braking System Tomislav Pavlovi´ c 1 , Ivan Župan 2 , Viktor Šunde 2 and Željko Ban 2, *   Citation: Pavlovi´ c, T.; Župan, I.; Šunde, V.; Ban, Ž. HIL Simulation of a Tram Regenerative Braking System. Electronics 2021, 10, 1379. https:// doi.org/10.3390/electronics10121379 Academic Editor: Mohd. Hasan Ali Received: 11 May 2021 Accepted: 7 June 2021 Published: 9 June 2021 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affil- iations. Copyright: © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). 1 Rimac Automobili d.o.o., 10431 Sveta Nedelja, Croatia; tomislav.pavlovic@rimac-automobili.com 2 Faculty of Electrical Engineering and Computing, University of Zagreb, 10000 Zagreb, Croatia; ivan.zupan@fer.hr (I.Ž.); viktor.sunde@fer.hr (V.Š.) * Correspondence: zeljko.ban@fer.hr Abstract: Regenerative braking systems are an efficient way to increase the energy efficiency of electric rail vehicles. During the development phase, testing of a regenerative braking system in an electric vehicle is costly and potentially dangerous. For this reason, Hardware-In-the-Loop (HIL) simulation is a useful technique to conduct the system’s testing in real time where the physical parts of the system are replaced by simulation models. This paper presents a HIL simulation of a tram regenerative braking system performed on a scaled model. First, offline simulations are performed using a measured speed profile in order to validate the tram, supercapacitor, and power grid model, as well as the energy control algorithm. The results are then verified in the real-time HIL simulation in which the tram and power grid are emulated using a three-phase converter and LiFePO 4 batteries. The energy flow control algorithm controls a three-phase converter which enables the control of energy flow within the regenerative braking system. The results validate the simulated regenerative braking system, making it applicable for implementation in a tram vehicle. Keywords: regenerative braking; HIL simulation; supercapacitor; energy control algorithm; electric rail vehicle 1. Introduction Regenerative braking systems for rail vehicles enable energy savings and a stabilizing effect on the supply network. Depending on the design of the regenerative braking system, there is also the possibility of semi-autonomous driving of the rail vehicle, i.e., driving without energy from the power line. The development of a regenerative braking system is a complex process that requires testing and verification on a rail vehicle after the simulation part of the development. The need for a safer and simpler way to test regenerative braking systems under real conditions has led to the use of Hardware-In-The-Loop (HIL) simulations. Using appropriate models, HIL simulations enable real-time system testing without the need for physical implementation on a real vehicle. The basic components of the regenerative braking system are the energy storage system, a bidirectional converter connecting the energy storage system to the DC link of the main drive of the rail vehicle, and a control system with a built-in energy storage charging and discharging algorithm. In [1,2], an overview of technological solutions for regenerative braking energy storage and their implementation in practice are given. The energy storage usually consists of supercapacitors or lithium-ion batteries in the vehicle (on-board storage) or outside the vehicle (wayside storage). The authors of [3] discuss the topology and operational concept of on-board energy storage in light railway vehicles, while the authors of [4] present an on-board supercapacitor energy storage device implemented in metro trains. In [5], an optimal localization of wayside energy storage is presented and, in [6], the effect of wayside energy storage on line voltage stabilization is presented. The topologies of bidirectional DC-DC converters for charging and discharging the used energy storage are described in the following works. The authors of [7] give an overview of energy storage systems and associated power converters topologies, the authors of [8] give a review of Electronics 2021, 10, 1379. https://doi.org/10.3390/electronics10121379 https://www.mdpi.com/journal/electronics