Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

electronics

Article
HIL Simulation of a Tram Regenerative Braking System
Tomislav Pavlović 1 , Ivan Župan 2 , Viktor Šunde 2 and Željko Ban 2, *

1 Rimac Automobili d.o.o., 21465 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 LiFePO4 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


Citation: Pavlović, T.; Župan, I.;


Šunde, V.; Ban, Ž. HIL Simulation of a
Tram Regenerative Braking System.
1. Introduction
Electronics 2021, 10, 1379. https:// Regenerative braking systems for rail vehicles enable energy savings and a stabilizing
doi.org/10.3390/electronics10121379 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
Academic Editor: Mohd. Hasan Ali 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
Received: 11 May 2021 part of the development. The need for a safer and simpler way to test regenerative
Accepted: 7 June 2021 braking systems under real conditions has led to the use of Hardware-In-The-Loop (HIL)
Published: 9 June 2021 simulations. Using appropriate models, HIL simulations enable real-time system testing
without the need for physical implementation on a real vehicle.
Publisher’s Note: MDPI stays neutral The basic components of the regenerative braking system are the energy storage
with regard to jurisdictional claims in system, a bidirectional converter connecting the energy storage system to the DC link of the
published maps and institutional affil-
main drive of the rail vehicle, and a control system with a built-in energy storage charging
iations.
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
Copyright: © 2021 by the authors. operational concept of on-board energy storage in light railway vehicles, while the authors
Licensee MDPI, Basel, Switzerland. of [4] present an on-board supercapacitor energy storage device implemented in metro
This article is an open access article trains. In [5], an optimal localization of wayside energy storage is presented and, in [6], the
distributed under the terms and
effect of wayside energy storage on line voltage stabilization is presented. The topologies
conditions of the Creative Commons
of bidirectional DC-DC converters for charging and discharging the used energy storage
Attribution (CC BY) license (https://
are described in the following works. The authors of [7] give an overview of energy storage
creativecommons.org/licenses/by/
systems and associated power converters topologies, the authors of [8] give a review of
4.0/).

Electronics 2021, 10, 1379. https://doi.org/10.3390/electronics10121379 https://www.mdpi.com/journal/electronics


Electronics 2021, 10, 1379 2 of 19

isolated bidirectional DC-DC converters, the authors of [9] present a comprehensive review
of converter topologies and control while the authors of [10] review DC-DC converter
topologies and present simulation results of a selected topology. The energy flow in the
converter is controlled by an algorithm implemented in the converter’s control system. By
choosing the right algorithm, a higher system efficiency and a longer lifetime of the energy
storage system can be achieved.
In the early stages of regenerative braking system design and energy management
algorithm development, mainly electrical equivalent models are used to model the system
components. The rule is to use the simplest models that give satisfactorily accurate results.
In [11–13], the control algorithms are described in the case of rail vehicle braking
energy from the point of view of voltage stabilization of the supply network using wayside
energy storage. In [11], smooth changes between charging and discharging states are
allowed depending on the current actions of the vehicle near the supercapacitor energy
storage. The vehicles, the grid and the energy storage system were modeled using an
electrical equivalent model, while the substation was modeled using Thevenin’s equivalent
model. The results were verified in offline simulations and in real-time operating conditions
using a HIL setup, with average energy savings of 13.5%. The authors of [12] use a wayside
energy storage system consisting of lithium-ion batteries and a control algorithm that
changes the limits of charging and discharging the batteries depending on the load, i.e.,
traffic congestion. The verification of the algorithm is based on actual measurements of
the voltage and current waveforms of the power grid, i.e., the regenerative braking system
model is not used in the work. The algorithm is then implemented in Okegawa SS, resulting
in 9% average energy savings over several months. In [13], an algorithm was presented that
dynamically controls the level of charge and discharge limits depending on the prediction
of the level of open circuit voltage, which is performed using a neural network that learned
from previous measurements. The offline simulation results in a 9.9% reduction in energy
usage and recovers braking energy with greater efficiency. In [14–16], more complex control
algorithms are described for braking with in-vehicle energy storage systems. In [14], a
fuzzy braking energy management system is presented to increase the efficiency of the
system represented by the equivalent circuit. The conducted offline simulations show an
increase in cumulative output energy of the supercapacitor of 23.7%. The partitioning
into subsystems is described in [15], where dynamic programming is used to constantly
compute the optimal control values even when modeled by the equivalent circuit. The
energy saving from the offline simulation depends on the chosen weight coefficients with a
reported maximum of 18.132% energy saving. In [16], a simple algorithm aimed at keeping
the supercapacitor module charged in order to limit occurrences of reaching the SOC limits
is presented. The algorithm was tested in offline simulations within the MATLAB software,
as well as an experimental verification using a track voltage emulator, NI CompactRIO
controller and a supercapacitor.
The aforementioned research proposes different energy saving algorithms and differ-
ent types of regenerative braking system models. Validation of the algorithms is generally
carried out in offline simulations, which is simpler and cost effective, and/or implementa-
tion in railways, which can be costly and rarely available for multiple tests but gives very
accurate results. This paper presents models and simulation experiments for the design
and testing of the regenerative braking system that is planned to be installed in an existing
tram vehicle. Using the developed models and conducting offline simulations and HIL
experiments, the supercapacitor energy storage system is dimensioned and an appropriate
control algorithm for energy flow is designed, which further increases the efficiency of the
tram vehicle.
The simulation models for offline simulation were developed in the MATLAB/Simulink
programming environment and they indicate the necessary capacitance of energy storage
device and basic functionality of the energy flow control algorithm. Parameters of these
models were determined according to real-time measurement data [17]. To experimentally
test the operation of the algorithm in approximately real time, a scaled HIL system was
Electronics 2021, 10, x FOR PEER REVIEW 3 of 28

Electronics 2021, 10, 1379 3 of 19

these models were determined according to real-time measurement data [17]. To experi-
mentally test the operation of the algorithm in approximately real time, a scaled HIL sys-
tem was
created created
which fits which fits asstep
as a middle a middle
between step between
offline offline simulations
simulations and real-worldand implemen-
real-world
implementation.
tation. The HIL system The HIL system
enables enables
testing testing
of the of the algorithm
algorithm as well as theas well as the supervi-
supervision of the
sion of flow
current the current flow instorage
in the energy the energysystemstorage
and system and atline
at the power theconnection
power line point.
connection
The
point. The experiment
experiment with HIL iswith HILout
carried is carried out usingvalues
using measured measured values
of the of the
current andcurrent
voltageandof
the power grid and the speed and acceleration of
voltage of the power grid and the speed and acceleration of the tram.the tram.
The
The described
described HIL HILsystem
systemconsists
consistsof ofmodels
modelsof ofthe
thepower
powergrid,
grid,aatram
tramvehicle,
vehicle,and
and
an
anenergy
energyflowflowcontrol
controlalgorithm
algorithmfor forthe
theregenerative
regenerativebraking
brakingenergy
energyimplemented
implementedin inthe
the
dSpace
dSpace microcontroller.
microcontroller. The The models
models in in the
the dSpace
dSpace microcontroller
microcontroller are areconnected
connected to tothe
the
real
realsupercapacitor
supercapacitorstorage storagedevice
deviceand andthetheDC-DC
DC-DCconverter
convertervia viaaaphysical
physicalinterface
interfacethat
that
consists
consists ofofbatteries
batteriesand andhalf-bridge
half-bridgebidirectional
bidirectionalDC-DC DC-DCconverters.
converters.The Thesecond
secondsection
section
of
of this paper describes the regenerative braking system, i.e., the basic componentsof
this paper describes the regenerative braking system, i.e., the basic components ofthe
the
system,
system, their interrelationships and the basic requirements determined by the desiredgoal
their interrelationships and the basic requirements determined by the desired goal
of
ofthe
theenergy
energy flow
flow control
controlalgorithm.
algorithm. TheThethirdthird
section presents
section the offline
presents simulation
the offline model
simulation
in MATLAB/Simulink
model in MATLAB/Simulink and theand analysis of the simulation
the analysis results.results.
of the simulation In the In
fourth section,
the fourth a
sec-
scaled model of regenerative tram braking system is presented
tion, a scaled model of regenerative tram braking system is presented using HIL simula- using HIL simulation in
real
tiontime.
in realIntime.
the fifth
In thesection, the results
fifth section, of theof
the results operation of theofdeveloped
the operation algorithm
the developed are
algorithm
presented and analyzed. The methodology of the paper is illustrated
are presented and analyzed. The methodology of the paper is illustrated in Figure 1. in Figure 1.

Develop the energy


Develop the flow control
regenerative braking algorithm of the
system model regenerative braking
system

Develop the HIL Conduct an offline


simulation model of simulation using
the regenerative measured real world
braking system data

Conduct a HIL simulation and compare the results with


the offline simulation

Figure1.1. Proposed
Figure Proposedmethodology
methodologyof
ofthe
thepaper.
paper.

2.
2. Tram
TramVehicle
VehicleRegenerative
RegenerativeBraking
BrakingSystem
System
In
Ingeneral,
general,aaregenerative
regenerativebraking
brakingsystem
systemofofaatram
tramvehicle
vehicleconsists
consistsof
ofaapower
powersupply
supply
network,
network, aa tram,
tram, aasupercapacitor
supercapacitorenergy
energy storage
storage system
system (SC),
(SC), a bidirectional
a bidirectional DC-DC
DC-DC con-
converter, and an energy flow control algorithm, Figure 2. In this paper,
verter, and an energy flow control algorithm, Figure 2. In this paper, models are devel- models are
developed and simulation experiments are performed to dimension a supercapacitor
oped and simulation experiments are performed to dimension a supercapacitor energy energy
Electronics 2021, 10, x FOR PEER REVIEW
storage 4 of 28
storage system
system for
for retrofitting
retrofitting to
to an
anexisting
existingtram
tramvehicle
vehicleand
andto todesign
designan
anappropriate
appropriate
control algorithm of the tram vehicle braking
control algorithm of the tram vehicle braking energy.energy.
In order to develop a suitable energy flow control algorithm within the regenerative
braking system, a system model is first used in the MATLAB/Simulink environment to
test the basic principles of the algorithm through an offline simulation. In this case, the
model of the whole system should describe the voltage-current relationships on the power
grid as a function of the tram vehicle speed and acceleration with sufficient accuracy to
determine the minimum energy storage capacity and the energy flow control algorithm.

Figure 2. Schematic diagram of the regenerative braking system of a tram vehicle.


Figure 2. Schematic diagram of the regenerative braking system of a tram vehicle.

The bidirectional DC-DC converter is modeled as a proportional element because a


real converter is much faster than the rest of the system; so, its dynamics in the
MATLAB/Simulink model could be neglected. The mathematical models of the regenera-
tive braking system components are determined according to the fundamental physical
Electronics 2021, 10, 1379 4 of 19

In order to develop a suitable energy flow control algorithm within the regenerative
braking system, a system model is first used in the MATLAB/Simulink environment to
test the basic principles of the algorithm through an offline simulation. In this case, the
model of the whole system should describe the voltage-current relationships on the power
grid as a function of the tram vehicle speed and acceleration with sufficient accuracy to
determine the minimum energy storage capacity and the energy flow control algorithm.
The bidirectional DC-DC converter is modeled as a proportional element because
a real converter is much faster than the rest of the system; so, its dynamics in the MAT-
LAB/Simulink model could be neglected. The mathematical models of the regenerative
braking system components are determined according to the fundamental physical laws of
vehicle motion and electrical phenomena in the power grid to provide the power required
to accelerate and decelerate the vehicle.

2.1. Tram Model


The tram is modeled as a dynamic system that determines the acceleration or braking
power, i.e., the amount of electricity currently consumed or generated by the vehicle, from
a given speed profile. To describe the dynamics of the vehicle motion, it is common to
introduce a simplification and assume that there is no lateral or vertical displacement of the
vehicle relative to the rails. In this case, the total force acting on the vehicle is represented
by the following equation:
f t = f i + f v + f rr + f g + f b (1)
where fi is the inertial force, fv is the viscous frictional force, frr is the rolling frictional
force, fg is the gravitational force, and fb is the mechanical braking force. In general, it is
difficult to determine all the coefficients of each force because the necessary measurements
cannot be made. Therefore, in practice, the Davis formula is often used to calculate the
force of vehicle motion resistance fr , which replaces the force of viscous friction fv and the
rolling friction force frr , and depends on the current vehicle speed v. The basic form of this
formula is:
f r = Av2 + Bv + C (2)
where the coefficients A, B and C are calculated from the vehicle’s physical characteristics
and driving conditions (e.g., the vehicle is driving through a tunnel, etc.). The inertial force
fi is calculated from the following equation:

dv
fi = m (3)
dt

where m is the vehicle mass, and the expression dv dt represents the vehicle’s instanta-
neous acceleration.
The resulting force ft is used to calculate the vehicle’s instantaneous power:
 
dv 2
Pvehicle = f t ·v = m + Av + Bv + C + f g + f b ·v (4)
dt

The input variable to the tram model is the tram speed, and the output is the tram
power. The forces fg and fb are constants within the model, and they do not depend upon
the current value of the tram speed. The tram power Pvehicle is further used to calculate the
tram drive current id :
P
id = vehicle (5)
vl
where vl is by the instantaneous value of the power line voltage.
Electronics 2021, 10, x FOR PEER REVIEW 5 of 28

Electronics 2021, 10, 1379 = 5 of (5)


19

where vl is by the instantaneous value of the power line voltage.

2.2.
2.2. Power
Power Grid
Grid Model
Model
The
The powergrid
power gridmodel
modelused
usedisisananRL
RLcircuit
circuitwith
withanan
ideal DC
ideal voltage
DC source,
voltage Figure
source, 3.
Figure
The model input is the instantaneous power line current il and the output is the instanta-
3. The model input is the instantaneous power line current il and the output is the instan-
neous power line voltage vl .
taneous power line voltage vl.

Figure3.3. Power
Figure Powergrid
gridelectrical
electricalmodel.
model.

From
Fromthe
themodel
modelin
inFigure
Figure3,3,the
thepower
powerline voltagevvl lis
linevoltage is equal
equal to:
to:
dil
vl = =
Vm + + +m
il Rm + L (6)
(6)
dt
whereRRmm is
where is the
the resistance
resistance of
ofthe
thepower
powergrid,
grid,LLmm is
is the
the inductance
inductance of ofthe
thepower
powergrid,
grid,and
and
V is the nominal voltage of the grid. The model does not consider the influence
Vm is the nominal voltage of the grid. The model does not consider the influence of other
m of other
vehicleson
vehicles onthe
thenetwork,
network,nornor the
the distance
distance of of
thethe observed
observed vehicle
vehicle fromfrom
the the power
power substa-
substation,
tion, which
which wouldwould
affect affect the values
the values of resistance
of resistance and inductance
and inductance of the of the power
power grid. grid.

2.3.
2.3. Energy
Energy Storage
StorageSystem
SystemModel
Model
The
The supercapacitor
supercapacitor module
module model
modelusedusedin inthis
thispaper
paperconsists
consistsof
ofaaseries
seriesconnection
connection
of
ofthe capacitanceCCscscand
thecapacitance and the resistanceRRscsc,,Figure
theresistance Figure4.4.The capacitanceCCscscrepresents
Thecapacitance representsthe the
total
totalcapacitance
capacitanceand
andthe resistanceRRscsc represents
theresistance represents thethe total
total equivalent
equivalentseries
seriesresistance
resistanceof of
all
all cells
cells in
inthe
themodule.
module. The
The magnitudes
magnitudes of of these
these quantities
quantities depend
depend onon the
thenumber
numberand and
type
typeof ofinterconnection
interconnectionofofthe
thecells
cellswithin
within the
the module.
module.In In
this work,
this thethe
work, electrical model
electrical modelof
Electronics 2021, 10, x FOR PEER REVIEW
the supercapacitor module is needed to obtain information about the accumulated
of the supercapacitor module is needed to obtain information about the accumulated en- 6 of
energy 28
within the module and the magnitude of the voltage.
ergy within the module and the magnitude of the voltage.

Figure 4. Supercapacitor energy storage system electrical model.


Figure 4. Supercapacitor energy storage system electrical model.
The model’s input variable is the supercapacitor current isc and the output is the
The model’s
supercapacitor input variable
voltage is the
vsc . From supercapacitor
Figure current
4, the equation isc and the
describing theoutput is the su-
supercapacitor
percapacitor voltage
voltage is given by: v sc. From Figure 4, the equation describing the supercapacitor voltage

is given by: 1
Z
vsc = isc Rsc + isc dt (7)
Csc1
= + (7)
2.4. Energy Flow Control Algorithm
When controlling the flow of regenerative braking, one of two opposing approaches is
2.4.
oftenEnergy
used.Flow Control
The first Algorithm
approach is focused on maximizing the energy efficiency and aims to
storeWhen
and usecontrolling the flow
all the energy of regenerative
generated braking, braking.
by regenerative one of two Theopposing approaches
second approach is
is oftenon
based used. Thethe
saving first approach
number is focused
of charge and on maximizing
discharge cyclesthe
of energy efficiency
the energy and aims
storage.
to store
Theandgoaluse
ofall
thethe energy
energy generated
flow controlby regenerative
algorithm braking.
designed Thepaper
in this second is approach is
to store the
based
maximum on saving
amount theofnumber of charge
regenerative and energy
braking discharge cycles
of the of the
vehicle onenergy
a givenstorage.
route, with the
The goal
minimum of theofenergy
number chargingflow
andcontrol algorithm
discharging cyclesdesigned
used. The in charging
this paper is discharging
and to store the
currents of amount
maximum the supercapacitor module
of regenerative depend
braking on theofstate
energy of charge
the vehicle onofa the energy
given storage
route, with
system,
the i.e., thenumber
minimum supercapacitor voltage,
of charging andand current of the
discharging vehicle
cycles used.drive.
TheIncharging
the charging
and
discharging currents of the supercapacitor module depend on the state of charge of the
energy storage system, i.e., the supercapacitor voltage, and current of the vehicle drive. In
the charging state, the algorithm allows all charging currents until the maximum
supercapacitor voltage is reached (e.g., 500 V). In the discharge state, the algorithm allows
Electronics 2021, 10, 1379 6 of 19

state, the algorithm allows all charging currents until the maximum supercapacitor voltage
is reached (e.g., 500 V). In the discharge state, the algorithm allows all discharge currents,
i.e., vehicle acceleration, until the minimum supercapacitor voltage is reached (e.g., 200 V).
The transition between the charge and discharge states occurs according to Figure 5 when
Electronics 2021, 10, x FOR PEER REVIEW 7 of 28
the vehicle drive current id crosses the boundary curve Idp or Idn .

Figure5.5.Flow
Figure Flowdiagram
diagramofofthe
theenergy
energyflow
flowcontrol
controlalgorithm.
algorithm.

Forexample,
For example,if ifthethe supercapacitor
supercapacitor is full,
is full, eveneven a small
a small vehicle
vehicle acceleration
acceleration currentcurrent
will
will switch
switch it fromit from the charging
the charging state
state to thetodischarging
the dischargingstate. state.
If the Ifsupercapacitor
the supercapacitor
is lessisfull,
less
full, higher
higher vehiclevehicle acceleration
acceleration currents
currents are required
are required to change
to change the energy
the energy flow flow
state,state, i.e.,
i.e., the
supercapacitor
the supercapacitor module remains
module in the charging
remains state andstate
in the charging the energy
and the required
energytorequired
accelerateto
the vehicle is
accelerate thedrawn
vehiclefromis the power
drawn grid.the
from The reverse
power is true
grid. Thewhen the supercapacitor
reverse is true when the is
in the discharging
supercapacitor state.
is in the It is assumedstate.
discharging that the
It islimiting
assumed values
that theof the currents
limiting at which
values of the
the transition
currents between
at which thethe chargingbetween
transition and discharging states and
the charging of thedischarging
supercapacitor module
states of the
occurs are determined
supercapacitor module byoccurs
the directional equations:
are determined by the directional equations:
=k−
Idp = − −
p ( vSC − VSCmax )

=k−
Idn = − −SCmin )
n ( vSC − V (8)
(8)
where:
where:
•• Idp —chargingto
Idp—charging todischarging
dischargingthreshold
threshold[A];
[A];
•• IdnIdn—discharging
—dischargingto tocharging
chargingthreshold
threshold[A];
[A];
•• kp, kn—slope coefficients [A/V];
kp , kn —slope coefficients [A/V];
•• vvSC SC—supercapacitor voltage [V];
—supercapacitor voltage [V];
•• V SCmax—maximum
VSCmax —maximum allowed
allowed supercapacitor
supercapacitor voltage
voltage [V];
[V];
•• VSCmin —minimum allowed supercapacitor voltage [V].
V SCmin —minimum allowed supercapacitor voltage [V].
The coefficients kp and kn are determined by optimization according to the
The coefficients kp and kn are determined by optimization according to the mini-
minimization of the criterion determined by the Number of cycles and Saved energy ratio
mization of the criterion determined by the Number of cycles and Saved energy ratio in
in Figure
Figure 12. 12.

3.3.Offline
OfflineSimulation
SimulationininMATLAB/Simulink
MATLAB/Simulink
3.1.System
3.1. SystemModel
Model
The
Thesimulation modelmodel
simulation of the regenerative tram braking tram
of the regenerative system braking
in the MATLAB/Simulink
system in the
software tool is shown
MATLAB/Simulink in Figure
software 6. is
tool Using thisinmodel,
shown Figurethe effect this
6. Using of the energy
model, thecontrol
effect algo-
of the
rithm, which minimizes the number of charging and discharging cycles while
energy control algorithm, which minimizes the number of charging and discharging maximizing
cycles while maximizing the energy savings of regenerative braking, on the characteristic
test track of the vehicle was studied.
Electronics 2021, 10, 1379 7 of 19

Electronics 2021, 10, x FOR PEER REVIEW 8 of 28


the energy savings of regenerative braking, on the characteristic test track of the vehicle
was studied.

Figure
Figure6.6.Simulation
Simulationmodel
modelofofthe
theregenerative
regenerativebraking
brakingsystem
systemininMATLAB/Simulink.
MATLAB/Simulink.

Thesystem
The systemmodel
modelconsists
consistsofofthethepreviously
previouslyshown
shownmodels modelsofofthe thetram
tramvehicle,
vehicle,the the
powergrid
power gridandandthe
thesupercapacitor
supercapacitorenergy energystorage
storagesystem.
system.The Thepower
powerline linecurrent
currentisisthe the
sumofofthe
sum thecurrents
currentsof ofthe
the vehicle
vehicle and
and the
the energy
energy storage
storage device.
device. The
Thepower
powerline linevoltage
voltageis
determined by the power grid model based on the power line
is determined by the power grid model based on the power line current. The vehicle current. The vehicle current
i is
current
d equal to the power quotient of the vehicle
id is equal to the power quotient of the vehicle P and the power line voltage
vehicle Pvehicle and the power line voltage v l . Since
v l.
Since the converter model is idealized (no delay, unity gain), the calculated referenceof
the converter model is idealized (no delay, unity gain), the calculated reference current
the supercapacitor
current iSC_REF is equal
of the supercapacitor iSC_REFtoisthe current
equal of current
to the the supercapacitor iSC . The output
of the supercapacitor iSC. TheScap
cycle number
output Scap cycle counts
numberthe changes
counts theof state of the
changes of supercapacitor, i.e., cycles. For
state of the supercapacitor, i.e.,example,
cycles.
the transition from the charging state to the discharging state and
For example, the transition from the charging state to the discharging state and then then back to the charging
back
tostate corresponds
the charging statetocorresponds
one cycle. to one cycle.
Theenergy
The energyflowflowcontrol
controlalgorithm
algorithmdetermines
determinesthe thecharging
chargingand anddischarging
dischargingcurrentcurrent
of the energy storage system depending on the vehicle current and the charging state ofof
of the energy storage system depending on the vehicle current and the charging state
the energy storage system according to the control algorithm described previously.
the energy storage system according to the control algorithm described previously.
3.2. Model Parameters and Inputs
3.2. Model Parameters and Inputs
The test route on which all the investigations were carried out is the line number 11
fromThethetest routeElectric
Zagreb on which allwhich
Tram, the investigations
runs for about were carried
60 min out isthe
through the line number
streets 11
with mixed
from the Zagreb Electric Tram, which runs for about 60 min through the streets
traffic and a pedestrian zone. The values of the vehicle current and power grid voltage were with
mixed traffic
recorded. The and a pedestrian
speed zone. The
and acceleration values
profiles of the
of the vehicle
vehicle werecurrent and power
also recorded, grid7.
Figure
voltage were recorded. The speed and acceleration profiles of the vehicle
The parameters of the simulation model in Figure 6 were determined by the Matlab were also
recorded, FigureToolbox,
Optimization 7. according to the IAE criterion based on the error between the
measured signal at the real system and the model output. The parameters of each subsystem
were determined by separate optimization procedures. So, the parameters of the power
grid model and the tram vehicle model are obtained in separate optimizations according to
the measured signals from the real vehicle.
The parameters of the power grid model are shown in Table 1. The measured power
line current il was used as input signal to the model, and the error signal is determined
as a difference between the measured voltage and the voltage generated by the model.
Optimization according to the IAE criterion determined the parameters shown in Table 1.
Electronics 2021, 10, x FOR PEER REVIEW 9 of 28
Electronics 2021, 10, 1379 8 of 19

Figure
Figure 7. Tram
7. Tram speed
speed and
and acceleration
acceleration profile
profile from
from thethe investigated
investigated route.
route.

Table 1. Power grid model parameters.


The parameters of the simulation model in Figure 6 were determined by the Matlab
Optimization Toolbox, according to the IAE criterion based on Value
Parameter the error between the
measured signal at the real system and the model output. The parameters of each
Vm [V] 665.7
subsystem were determined by separate optimization procedures. So, the parameters of
the power grid modelRand m [Ω]the tram vehicle model are obtained in0.00387
separate optimizations
according to the measured
Lm [H]signals from the real vehicle. 0.0023
The parameters of the power grid model are shown in Table 1. The measured power
line current il was
The final used as input
difference betweensignal to the model,
the measured andline
power thevoltage
error signal
from is
thedetermined as
Zagreb Electric
a difference between the measured voltage and the voltage generated by the
Tram power grid and the simulated power line voltage after finishing the optimization model.
Optimization
procedure isaccording
shown intoFigure
the IAE8.criterion determined
The similarity the parameters
between shownindicates
the waveforms in Table that
1.
Electronics 2021, 10, x FOR PEER REVIEW 10 of 28
the modeled tram vehicle and the power grid accurately model the studied tram and
Table 1. Power grid model parameters.
power grid.
Parameter Value
m⌈ ] 665.7
⌈Ω⌉ 0.00387
⌈ ⌉ 0.0023

The final difference between the measured power line voltage from the Zagreb
Electric Tram power grid and the simulated power line voltage after finishing the
optimization procedure is shown in Figure 8. The similarity between the waveforms
indicates that the modeled tram vehicle and the power grid accurately model the studied
tram and power grid.

Comparisonof
Figure8.8.Comparison
Figure ofthe
themeasured
measuredand
andsimulated
simulatedpower
power line
line voltage
voltage waveform.
waveform.

The modeled
The modeled tramtram vehicle
vehicle isis the
the tram
tram TMK2200
TMK2200 from
from the
the Končar
Končar company
company from
from
Zagreb, Croatia. The tram model parameters are shown in Table 2. The
Zagreb, Croatia. The tram model parameters are shown in Table 2. The inputs for theinputs for the
optimization are the tram speed, acceleration, and power line current and voltage,
optimization are the tram speed, acceleration, and power line current and voltage, while while
theerror
the errorsignal
signalisiscalculated
calculatedas
asaadifference
differencebetween
betweenthe
themeasured
measuredcurrent
current and
and the
thecurrent
current
generated by the model.
generated by the model.

Table 2. Tram model parameters.

Parameter Value
m ⌈kg] 52,940
A ⌈N·s2/m2⌉ 17.965
Electronics 2021, 10, 1379 9 of 19

Table 2. Tram model parameters.

Parameter Value
m [kg] 52,940
A [N·s2 /m2 ] 17.965
B [N·s/m] 34.536
C [N] 7827.249

The measured power line current waveform compared to the power line current
Electronics 2021, 10, x FOR PEER REVIEW 11 of 28
waveform obtained through simulation using the tram parameters from Table 2 is exhibited
in Figure 9.

Comparisonof
Figure9.9.Comparison
Figure ofthe
themeasured
measuredand
andsimulated
simulatedpower
powerline
linecurrent
currentwaveforms
waveforms using
using the
the tram
tram
parametersfrom
parameters from Table
Table 2.
2.

The parameters
The parameters ofofthethe
energy storage
energy system
storage are taken
system are from thefrom
taken technical
the documen-
technical
documentation of the manufacturer of the selected supercapacitor moduleBMOD0083
tation of the manufacturer of the selected supercapacitor module (Maxwell (Maxwell
P048 B01). The
BMOD0083 required
P048 energy
B01). The storage
required system
energy capacitance
storage systemiscapacitance
determined isdepending
determined on
the regenerative braking energy of the maximally loaded vehicle when
depending on the regenerative braking energy of the maximally loaded vehicle whenstopping from the
maximumfrom
stopping permissible speed topermissible
the maximum a complete speed
standstill
to according
a completetostandstill
Equation according
(9): to
Equation (9):
mv2max
CSCrequired = (9)
V2 2
− VSC_min
= SC_max (9)
_ − _
For the tram TMK2200 with a nominal vehicle weight of 56,725 kg, at a permissible
speed of 50 km/h, the maximum regenerative braking energy on a straight track is about
1.5 kWh. At a maximum capacitor voltage of 500 V, the required capacitor capacity is
For the tram
approximately TMK2200
43.7 F. with a nominal vehicle weight of 56,725 kg, at a permissible
speed of 50 km/h, the maximum regenerative braking energy on a straight track is about
1.5
3.3.kWh.
OfflineAtMATLAB/Simulink
a maximum capacitor voltage
Simulation of 500 V, the required capacitor capacity is
Results
approximately 43.7 F.
Multiple simulations of the model from Figure 6 produced the surface plots of the
dependence of the number of cycles and stored energy as a function of the slope coefficients
3.3. Offline
of the MATLAB/Simulink
charging state transitionSimulation
thresholdResults
curves kp and kn , shown in Figures 10 and 11.
Multiple simulations
The dependence ofratio
of the the model from Figure
of the number 6 produced
of cycles the surface
and the amount plots energy,
of saved of the
dependence
which is used of as
theannumber of cycles
optimization and stored
criterion, on the energy as a function
slope coefficients of the slope
that represent the
threshold lines
coefficients between
of the chargingthestate
charging and discharging
transition state are
threshold curves shown
kp and in Figure
kn, shown 12.
in Figures 10
It is evident from Figure 12 that the surface representing the number of cycles and the
and 11.
saved energy ratio has minimal values for kp > 5 and kn ≥ 2. Since the goal is to achieve
the highest possible stored energy, according to Figure 12, the values kp = 13 and kn = 2
were chosen.
The behavior of the system with obtained switching state threshold curve coefficients
kp and kn is shown in Figure 13.
Electronics
Electronics 10, x10,
2021,
2021, FOR1379
PEER REVIEW 12 of1028of 19

Electronics 2021, 10, x FOR PEER REVIEW 13 of 28

Figure
Figure 10. Surface
10. Surface plotplot of the
of the dependence
dependence of the
of the number
number of cycles
of cycles on on
thethe slope
slope coefficients
coefficients kp and kn .
kp and
kn.

Electronics 2021, 10, x FOR PEER REVIEW 14 of 28

Figure 11.11.
Figure Surface plot
Surface of of
plot thethe
dependence of of
dependence thethe
saved energy
saved onon
energy thethe
slope coefficients
slope kp and
coefficients kn. kn .
kp and

The dependence of the ratio of the number of cycles and the amount of saved energy,
which is used as an optimization criterion, on the slope coefficients that represent the
threshold lines between the charging and discharging state are shown in Figure 12.

FigureFigure 12. Dependence


12. Dependence of optimality
of optimality criteriacriteria on coefficients
on slope slope coefficients oftransition.
of state state transition.

It is evident from Figure 12 that the surface representing the number of cycles and
the saved energy ratio has minimal values for kp > 5 and kn ≥ 2. Since the goal is to achieve
the highest possible stored energy, according to Figure 12, the values kp = 13 and kn = 2
were chosen.
The behavior of the system with obtained switching state threshold curve coefficients
kp and kn is shown in Figure 13.
The total stored energy on the test route is 6.68 kWh for 8 counted cycles using the
Electronics 2021, 10, x FOR PEER REVIEW 15 of 28
Electronics 2021, 10, 1379 11 of 19

500
i SC
0
id
-500
0 500 1000 1500 2000 2500 3000
t [s]
500
400
300
200
0 500 1000 1500 2000 2500 3000

500
0
-500
0 500 1000 1500 2000 2500 3000
t [s]

Figure 13. Tram current, supercapacitor current and voltage and power line current obtained from
Figure 13. Tram current,
usingsupercapacitor currentk and voltage and power line current obtained from
simulation results the slope coefficients p = 13 and kn = 2.
simulation results using the slope coefficients kp = 13 and kn = 2.
The total stored energy on the test route is 6.68 kWh for 8 counted cycles using the
4.Scap
HIL cycle
Simulation
numberExperiment
output in Figure 6. The stored energy is calculated using the change in
the To
supercapacitor
verify the voltage
results over
of thetime.
offline simulation, a HIL simulation of the tram
regenerative braking system was conducted. The reason for using the HIL simulation was
to4.check
HIL Simulation Experiment
how the system, i.e., the control algorithm, behaves in real time and with the use
To verify
of an actual the results ofmodule
supercapacitor the offline
as simulation, a HILAsimulation
energy storage. part of theofHIL
the laboratory
tram regenerative
setup
braking
are system was
mathematical conducted.
models The reason
implemented for using
in dSpace the HILBox.
MicroLab simulation
These was to check
models are
how the system,
connected i.e., the
via a suitable controlto
interface algorithm,
an actual behaves in real module
supercapacitor time andand
with the use of an
a bidirectional
actual converter.
DC/DC supercapacitor
As anmodule
input toasthis
energy storage.
complex model,A part of the HILspeed
the measured laboratory
of the setup
tram onare
mathematical models implemented in
the real route for a duration of 60 min was used.dSpace MicroLab Box. These models are connected
via a suitable interface to an actual supercapacitor module and a bidirectional DC/DC
converter.
4.1. As an input
HIL Laboratory Setup to this complex model, the measured speed of the tram on the real
route
To perform an of
for a duration 60 min wasaused.
experiment, HIL laboratory setup is used that combines: (i)
mathematical models
4.1. HIL Laboratory of trams and power grid in a real-time computer (dSpace), (ii)
Setup
hardware emulation models of trams and power grid (DC-DC converters and battery
To perform an experiment, a HIL laboratory setup is used that combines: (i) mathe-
packs), and (iii) the actual supercapacitor energy storage device and the bidirectional DC-
matical models of trams and power grid in a real-time computer (dSpace), (ii) hardware
DC converter, Figure 14.
emulation models of trams and power grid (DC-DC converters and battery packs), and
(iii) the actual supercapacitor energy storage device and the bidirectional DC-DC converter,
Figure 14.
The mathematical models of the tram, power grid and controller, previously developed
in MATLAB/Simulink were converted to C code using Matlab’s real-time toolbox and
compiled for real-time execution on the target system dSpace MicroLab Box. In addition,
the PI controllers and PWM generators to drive the Danfoss converter are also implemented
in the dSpace controller. The user control interface is implemented by the Control Desk
software of the dSpace system. All models of the system and controllers are implemented
as subsystem Model shown in Figure 15.
The tram model calculates the tram current id_ref based on the tram speed. The energy
flow control system calculates the reference value of the supercapacitor current iSC_ref . The
power grid model calculates the power line voltage reference vl_ref , from the calculated
power line current by solving the power grid model (Equation (6)), Figure 16. The measured
drive and power line currents were calculated from the measured inductor currents and
duty-cycle of the respective half-bridge (Figure 16). They are calculated because it was not
possible to measure the input current of the half-bridge.
Electronics 2021, 10, 1379 12 of 19
Electronics 2021, 10, x FOR PEER REVIEW 16 of 28

Danfoss FC302 converter

T1 T3 T5
vl Filter
Filter il
CDC Filter id
iSC vd Vm
T2 T4 T6 vSC
Supercapacitor Battery
Battery

Power grid Tram drive Supercapacitor


S1 emulation system il S3 emulation system id S5 charge/discharge control iSC
S2 dSPACE + v l S4 dSPACE + vd S6 system dSPACE + vSC
Matlab/Simulink Matlab/Simulink Matlab/Simulink

S1 S2 S3 S4 S5 S6

IPC board

T 1 T 2 T3 T 4 T 5 T 6
Electronics 2021, 10, x FOR PEER REVIEW 17 of 28
Figure14.
Figure 14. HIL
HILlaboratory
laboratorysetup.
setup.

The mathematical models of the tram, power grid and controller, previously
developed in MATLAB/Simulink were converted to C code using Matlab’s real-time
toolbox and compiled for real-time execution on the target system dSpace MicroLab Box.
In addition, the PI controllers and PWM generators to drive the Danfoss converter are also
implemented in the dSpace controller. The user control interface is implemented by the
Control Desk software of the dSpace system. All models of the system and controllers are
implemented as subsystem Model shown in Figure 15.

Figure 15.
Figure 15. dSpace
dSpace real-time
real-time simulation
simulation model.
model.

Theconvert
To tram model calculates quantities
the calculated the tram current d_ref based
(id_ref , iSC_ref , vl_refon the tram
) from speed. The
the dSpace energy
computer
flow control
model system quantities
into physical calculates and
the reference
connect themvaluetoofthe thereal
supercapacitor
supercapacitor, current iSC_ref. The
the emulation
power
part gridlaboratory
of the model calculates the power
setup is used. line voltage
The emulation partreference vl_ref, using
is performed from the calculated
a three-phase
converter
power line current by solving the power grid model (Equation (6)), Figure For
connected to the corresponding energy storage devices via inductors. 16. this
The
purpose,
measuredthe three-phase
drive and poweroutput
linestage of the
currents Danfoss
were FC 301from
calculated converter with twoinductor
the measured battery
packs of LiFePO4
currents batteries
and duty-cycle (48 respective
of the V and 12 Ah) and a supercapacitor
half-bridge (Figure 16). They stack
areare used. The
calculated be-
converter
cause it wasbranches with the
not possible inductorsthe
to measure serve as bidirectional
input current of theDC-DC converters. The input
half-bridge.
stage of the converter is not used, while the DC link represents the power line of the
tram vehicle and tram DC-link at the same time, i.e., the current summation point. The
connection between the dSpace output signals and the converter switches is made via
optical fibers connected through an IPC board.
One branch of the battery-powered converter emulates the tram current. In dSpace,
the calculated tram current id_ref represents the reference for the emulated current in this
branch of the converter. To ensure that the current in this branch is equal to the reference,
a corresponding controller has been developed in dSpace to control switches T3 and T4,
shown in the block Control in Figure 14.
Electronics 2021, 10, 1379 13 of 19
tronics 2021, 10, x FOR PEER REVIEW 18 of 28

Figure
Figure 16. Model
16. Model of the of thepower
tram, tram, grid
power
andgrid andsystem
control control system
of the of thefor
algorithm algorithm
real-time for real-time
operation.
operation.
The second branch of the converter emulates the power line voltage. In dSpace, the
To convert the calculated
calculated power linequantities
voltage (id_ref, iSC_ref
vl_ref , vl_ref) from
represents thethe dSpace voltage
reference computer at model
the DC link of the
into physicalconverter.
quantities and connect them to the real supercapacitor,
To ensure that the voltage at the DC link corresponds to the power the emulation partline voltage,
of the laboratory setup
a suitable is used.was
controller Thedeveloped
emulationtopart controlis performed
switches T1using a three-phase
and T2.
converter connected to thebranch
The third corresponding energy storage
of the converter is connected devices via actual
to the inductors.
MaxwellFor this
supercapacitor
purpose, themodule
three-phase outputP048
BMOD0083 stageB01.
of the
TheDanfoss
control FC model 301 in
converter with two battery
dSpace calculates the target charging
packs of LiFePO4 batteries (48
and discharging V andof12
current the Ah) and a supercapacitor
supercapacitor based onstack are used. vehicle
the calculated The current,
converter branches with the inductors serve as bidirectional DC-DC converters.
the power line current and the measured supercapacitor voltage and, according to the The input
stage of the tested
converter is not used,
algorithm, whilethe
controls theswitches
DC linkT5 represents
and T6. The the power lineT5
switches ofand
the tram
T6 represent the
vehicle andbidirectional
tram DC-link at theconverter.
DC–DC same time, i.e., the current summation point. The
connection between the dSpace
A diagram of theoutput signals
controller fromand the converter
the Control block inswitches
Figure 15is to
made viathe switches
control
optical fibers connected
T1–T6 through anconverter
of a three-phase IPC board.is shown in Figure 17. The control loop sampling time
is 83 µs
One branch andbattery-powered
of the is determined byconverter
the switching emulates frequency
the tram ofcurrent.
the inverter. The energy flow
In dSpace,
control algorithm operates with a sampling time of 1 s.
the calculated tram current id_ref represents the reference for the emulated current in this
branch of the converter. To ensure that the current in this branch is equal to the reference,
a corresponding controller has been developed in dSpace to control switches T3 and T4,
shown in the block Control in Figure 14.
Electronics 2021, 10, 1379 14 of 19
Electronics 2021, 10, x FOR PEER REVIEW 20 of 28

Figure17.
Figure 17.Block
Blockcontrol
controlwith
withcontrollers
controllersofofthe
theDanfoss
Danfossconverter
converterswitches.
switches.

Thestructure
The structureofofthe
thecontroller
controllerfor
forsetting
settingthe
theDCDClink
linkvoltage,
voltage,the
theconverter
converterbranch
branch
currentemulating
current emulating thethe
tramtram vehicle
vehicle andsupercapacitor
and the the supercapacitor current according
current according to the
to the reference
Electronics 2021, 10, x FOR PEER REVIEW
reference values from the model in Figure 17 are shown in Figure 18. The 21 of
controller is 28
PI
values from the model in Figure 17 are shown in Figure 18. The controller is PI type and
type and allows manual reference tracking or automatic
allows manual reference tracking or automatic operation. operation.
The State Machine block in Figure 19 determines the boot sequence. Since the input
rectifier part of the Danfoss FC301 converter is not used, a state machine is created to boot
the converter, bringing the converter to the operating point so that its electronic circuits
are ready for operation. The startup sequence raises the voltage to 200 V using an external
source and contactor. After starting the converter’s control electronics and control
systems, the voltage drop is monitored and, at 100 V, the converter’s branch is switched
on, which together with the battery emulates the power grid. Then, the control system
balances the voltages at the outputs of the other converter branches with the voltages at
the battery and supercapacitor. After the contactor is switched on, the current control is
started with the current setpoint 0. Only then the converter is ready to switch on the tram
and grid
Figure
Figure 18. model.
18. DC
DC link voltage
link voltage controller
controller using
using the
the power
power line
line voltage
voltage reference
reference voltage.
voltage.

The State Machine block in Figure 19 determines the boot sequence. Since the input
rectifier part of the Danfoss FC301 converter is not used, a state machine is created to boot
the converter, bringing the converter to the operating point so that its electronic circuits
are ready for operation. The startup sequence raises the voltage to 200 V using an external
source and contactor. After starting the converter’s control electronics and control systems,
the voltage drop is monitored and, at 100 V, the converter’s branch is switched on, which
together with the battery emulates the power grid. Then, the control system balances the
voltages at the outputs of the other converter branches with the voltages at the battery and
supercapacitor. After the contactor is switched on, the current control is started with the
current setpoint 0. Only then the converter is ready to switch on the tram and grid model.
For the laboratory setup, the voltages, and currents of the components of the real
system are scaled to amounts corresponding to the operating voltage of the DC link of the
converter. Maximum and minimum power grid voltages of 690 V and 630 V are scaled
to 120 V and 90 V, respectively. Maximum tram and grid line currents of up to 900 A are
scaled to currents in the 10 A converter branch. The scaled currents and voltages will
result in different EMI relative to EMI due to the actual currents and voltages. Due to the
scaled currents and voltages, the capacitance of the available supercapacitor module is
oversized. For this purpose, the operating voltage of the supercapacitor was scaled from
200 V to 500 V to the 30 V to 31.5 V range. An affine transformation was used to scale the
Electronics 2021, 10, 1379 15 of 19

voltage, while the currents were scaled by a linear transformation to obtain the current
equilibrium at the contact line. Prior to the emulator test, a simulation was performed with
the MATLAB/Simulink model using pre-scaled quantities. The overall laboratory setup
Electronics 2021, 10, x FOR PEER REVIEW 22 ofis28
shown in Figure 20.

Electronics 2021, 10, x FOR PEER REVIEW 23 of 28


Figure 19. State flow block determining boot sequence state machine.
Figure 19. State flow block determining boot sequence state machine.

For the laboratory setup, the voltages, and currents of the components of the real
system are scaled to amounts corresponding to the operating voltage of the DC link of the
converter. Maximum and minimum power grid voltages of 690 V and 630 V are scaled to
120 V and 90 V, respectively. Maximum tram and grid line currents of up to 900 A are
scaled to currents in the 10 A converter branch. The scaled currents and voltages will
result in different EMI relative to EMI due to the actual currents and voltages. Due to the
scaled currents and voltages, the capacitance of the available supercapacitor module is
oversized. For this purpose, the operating voltage of the supercapacitor was scaled from
200 V to 500 V to the 30 V to 31.5 V range. An affine transformation was used to scale the
voltage, while the currents were scaled by a linear transformation to obtain the current
equilibrium at the contact line. Prior to the emulator test, a simulation was performed with
the MATLAB/Simulink model using pre-scaled quantities. The overall laboratory setup is
shown in Figure 20.
Figure20.
Figure 20. Laboratory
Laboratory setup
setup for
foremulating
emulatingthe
theregenerative
regenerativebraking
brakingsystem:
system: 1—Tektronix
1—TektronixDPO
DPO
2012Boscilloscope, 2—supercapacitor module Maxwell BMOD0083 P048 B01, 3—LiFePO4 batteries,
2012Boscilloscope, 2—supercapacitor module Maxwell BMOD0083 P048 B01, 3—LiFePO4 batteries,
4—Danfoss FC301converter, 5—dSpaceMicroLab Box, 6—IPC board.
4—Danfoss FC301converter, 5—dSpaceMicroLab Box, 6—IPC board.

AASCADA
SCADAsystemsystemwaswasdeveloped
developedusingusingthe theControl
ControlDesk
Desksoftware
softwareenvironment
environmentinin
conjunctionwith
conjunction withthethe dSpace
dSpace computer
computer to control
to control the entire
the entire systemsystem and and
and to start to start and
monitor
monitor
the startupthe startupThe
sequence. sequence.
SCADAThe SCADA
system allowssystem
both theallows
start ofboth the sequence
the start start of the andstart
the
sequence
manual and the
setting manual setting
of parameters during of parameters
the start as wellduring the integration
as the start as wellofasthe
thesystem
integration
into
of the system into the automatic mode. All voltages and currents
the automatic mode. All voltages and currents in the system are measured via the Aalborg in the system are
measured via the Aalborg interface, currents via measuring probes and
interface, currents via measuring probes and fed to the dSpace computer via analog inputs.fed to the dSpace
computer
All via recorded
results are analog inputs.
on theAll results are
computer andrecorded
transferred on the
to acomputer
PC in MATLABand transferred
format viato
a PC
the in MATLAB
Control formatsovia
Desk system thatthe Control
they Deskfor
are ready system sodisplay
further that theyandare ready for further
processing.
display
The and processing.
remaining two blocks are used to receive the measured current and voltage signals
(analogThe remaining
inputs) and astwo blocks
digital are used
outputs to receive
to control the measured
the converter switches.current and voltage
signals (analog inputs) and as digital outputs to control the converter switches.
4.2. HIL Experiment Results
4.2. HIL
The Experiment
experimentResults
was performed during a time period determined by the duration of
the input signal of the
The experiment was measured
performedspeedduring
of the atram
timevehicle,
period Figure 7. Theby
determined measurement
the durationofof
current and voltage of the system controlled by the proposed control
the input signal of the measured speed of the tram vehicle, Figure 7. The measurementalgorithm during theof
regenerative braking energy was performed in the laboratory system.
current and voltage of the system controlled by the proposed control algorithm during The recorded and
denormalized measurement results are shown in Figure 21.
the regenerative braking energy was performed in the laboratory system. The recorded
and denormalized measurement results are shown in Figure 21.
Electronics 2021, 10, x FOR PEER REVIEW 24 of 28
Electronics 2021, 10, 1379 16 of 19

1000
iSC

iSC , id [A]
0 id

-1000
0 500 1000 1500 2000 2500 3000 3500

1000
500
il [A]

0 500 1000 1500 2000 2500 3000

680
vl [V]

660

640

0 500 1000 1500 2000 2500 3000 3500


t [s]

Figure 21. Denormalized results of the simulation experiment: supercapacitor current, tram current,
Figureline
power 21.current
Denormalized
and DCresults of the line)
link (power simulation experiment: supercapacitor current, tram current,
voltage.
power line current and DC link (power line) voltage.
A comparison of the denormalized results from Figure 21 with the simulation results
presented in Figure 13
A comparison shows
of the a good agreement
denormalized of the
results from results
Figure 21 with the
minor deviations
simulation at
results
small currents
presented due to measurement
in Figure 13 shows a good noise.
agreement of the results with minor deviations at
The
small denormalized
currents results of thenoise.
due to measurement supercapacitor current and voltage measurements
on a magnified time scaleresults
The denormalized are demonstrated in Figurecurrent
of the supercapacitor 22. Theand
measurements show the
voltage measurements
agreement of the currents
on a magnified time scalewith
arethe simulation results
demonstrated in Figure
in Figure 13.measurements
22. The The voltage deviations
show the
ofagreement
the supercapacitor were with
of the currents caused
theby a small measurement
simulation range
results in Figure 13.and
Thethe measurement
voltage deviations
noise,
of thewhich significantly
supercapacitor were affects
caused thebycurrent
a smallcontrol. An additional
measurement range and deviation from the
the measurement
simulation is given by the power consumption of the converter itself, which
noise, which significantly affects the current control. An additional deviation from takes energy
the
from the DC link.
simulation is given by the power consumption of the converter itself, which takes energy
fromThethesupercapacitor
DC link. current obtained through offline simulation, HIL experiment and
the error signal that is obtained as the difference between the offline and HIL experiment is
presented in Figure 23.
The waveforms indicate a congruity between the offline simulation and HIL experi-
ment. The error signal values indicate that noticeable differences occur at different times,
mainly due to two reasons: (i) time delays between similar waveform shapes caused by the
PI controllers in the HIL simulation (denoted with 1 on the figure), (ii) measurement and
modeling uncertainties caused by the scaled supercapacitor voltage range which results in
charge/discharge state changes in the HIL simulation that do not occur during the offline
simulation (denoted with 2 on the figure). Despite the error signal values, it is shown that
the energy flow control algorithm functions properly during the HIL simulation.
These experimental results demonstrate the feasibility of a regenerative brake energy
storage system for tram vehicles using the proposed energy management algorithm. This
provided the basis for building a prototype system with real performance in a tram vehicle.
Electronics 2021, 10, x FOR PEER REVIEW 25 of 28
Electronics 2021, 10, 1379 17 of 19

1000
iSC
500
id
0
-500
1400 1600 1800 2000 2200 2400 2600 2800 3000 3200

600

400

200
1400 1600 1800 2000 2200 2400 2600 2800 3000 3200

1000

500

-500
1400 1600 1800 2000 2200 2400 2600 2800 3000 3200
Electronics 2021, 10, x FOR PEER REVIEW
t [s] 26 of 28

Figure 22. Denormalized results of the simulation experiment on a magnified time scale: supercapac-
Figure 22. Denormalized
itor current, results of the
tram current, supercapacitor simulation
voltage experiment
and power on a magnified time scale:
line current.
supercapacitor current, tram current, supercapacitor voltage and power line current.

The supercapacitor current obtained through offline simulation, HIL experiment and
the error signal that is obtained as the difference between the offline and HIL experiment
is presented in Figure 23.

2
1

Figure
Figure23.
23. Comparison
Comparisonof of the current obtained
the supercapacitor current obtained from
fromoffline
offlinesimulation,
simulation,HIL
HILex-
experiment and the
periment and the error
error signal
signal obtained
obtained from
from the
the difference
difference between
between the
theoffline
offlinesimulation
simulationand
and
HIL
HILexperiment.
experiment.

The waveforms on
Measurements indicate
the trama congruity
vehicle andbetween the ofoffline
simulation simulation
the system accordingandtoHIL
real
experiment. The error
driving operation signal
showed values
that indicate
the tram that noticeable
can achieve a maximum differences occur
of 1.5 kWh of at different
regenerative
times, mainly
braking dueattoreduced
energy two reasons: (i) speeds.
driving time delays
The between
nominal similar
voltage waveform
of the power shapes
grid caused
is 600 V;
by the PI controllers
therefore, a voltageinofthe HIL
the simulation (denoted
supercapacitor modulewith 1 onVthe
of 500 figure), (ii) measurement
is proposed. The reason for
and
thismodeling
is the needuncertainties
to design acaused by theDC-DC
bidirectional scaled supercapacitor
converter that worksvoltageasrange which
a step-down
converter
results during charging,
in charge/discharge butchanges
state as a step-up
in theconverter duringthat
HIL simulation discharging.
do not occur Taking
duringthe
operating
the voltage of a(denoted
offline simulation supercapacitor
with 2 onfromthe200 V to 500
figure). V, it follows
Despite the errorthat a braking
signal energy
values, it is
of 1.5 kWh
shown would
that the require
energy flowa supercapacitor
control algorithm capacitance
functions of 51.4 F. In during
properly order tothe realize
HILa
simulation.
These experimental results demonstrate the feasibility of a regenerative brake energy
storage system for tram vehicles using the proposed energy management algorithm. This
provided the basis for building a prototype system with real performance in a tram
Electronics 2021, 10, 1379 18 of 19

prototype with real powers and energies, it is necessary in the next research phase to
use the converter of the main drive of the tram as an interface to the supercapacitor. An
additional advantage can be achieved by using the position information of the tram control
lever, which determines the acceleration.

5. Conclusions
Mathematical models and offline simulations are mainly used in the designing of
an energy flow control algorithm for tram vehicle regenerative braking systems. The
developed control algorithm is then mostly tested on an actual system. Due to the amount
of voltage and current quantities in this system, it is not common to check the designed
algorithm using HIL simulation models in real-time conditions. In this paper, a design
process of an energy flow control algorithm, in which a simulation using a HIL laboratory
setup is introduced between offline simulation and verification on an actual system, is
introduced. In this way, the real-time behavior of the algorithm was further tested consid-
ering the actual supercapacitor energy storage device and the influence of the bidirectional
DC-DC converter. Using the defined mathematical models, a simulation model of the
regenerative braking system of a tram vehicle was developed in the MATLAB/Simulink
programming environment. The model parameters were determined with satisfying accu-
racy by optimization procedures and current-voltage measurements during acceleration
and braking of the tram. Using offline simulations, based on the measured speed profile of
the tram on the characteristic route, the influence of the proposed algorithm on the energy
saving and the number of the supercapacitor energy storage cycles was investigated. In
the optimization procedure, the values of the coefficients of the transition lines from the
state of charging to discharging the storage and vice versa were determined in such a way
that the objective function is minimized. Offline simulations of the proposed algorithm
showed that the tested supercapacitor storage with a maximum voltage of 500 V and a
capacity of 43.7 F, on the test route, allows energy savings of 6.68 kWh with 8 charge and
discharge cycles.
After testing the functionalities of the algorithm in the MATLAB/Simulink simulation
environment, a HIL type laboratory setup was developed as a combination of a model in
the computer for approximately real-time operation and a physical model for emulating
the calculated quantities. A bidirectional DC-DC converter and real supercapacitor energy
storage device were included in this setup as real components. This setup additionally
tested the behavior of the chosen supercapacitor storage device and the proposed algorithm
under more realistic conditions, with constraints set by the actual elements of the system.
The results of the HIL experiment show that the behavior of the developed algorithm
in approximately real time and the chosen supercapacitor storage device meet the set
requirements. Further research will consist of testing the algorithm on the tram vehicle
which will enable fine tuning of the algorithm behavior.

Author Contributions: Conceptualization, Ž.B.; data curation, I.Ž.; investigation, T.P., and Ž.B.;
resources, V.Š. and Ž.B.; software, T.P.; supervision, V.Š. and Ž.B.; validation, V.Š., Ž.B.; writing—
original draft, I.Ž.; writing—review and editing, I.Ž., V.Š., and Ž.B. All authors have read and agreed
to the published version of the manuscript.
Funding: This research was funded by European Regional Development Fund, grant number
RC.2.2.08-0015 “Advanced technologies in power systems and rail vehicles”.
Conflicts of Interest: The authors declare no conflict of interest.

References
1. Gonzalez-Gil, A.; Palacin, R.; Batty, P. Sustainable urban rail systems: Strategies and technologies for optimal management of
regenerative braking energy. Energy Convers. Manag. 2013, 75, 374–388. [CrossRef]
2. Radu, P.V.; Lewandowski, M.; Szelag, A. On-Board and Wayside Energy Storage Devices Applications in Urban Transport
Systems—Case Study Analysis for Power Applications. Energies 2020, 13, 2013. [CrossRef]
Electronics 2021, 10, 1379 19 of 19

3. Becker, F.; Dämmig, A. Catenary Free Operation of Light Rail Vehicles—Topology and Operational Concept. In Proceedings
of the 2016 18th European Conference on Power Electronics and Applications (EPE’16 ECCE Europe), Karlsruhe, Germany,
5–9 September 2016; pp. 1–10.
4. Ciccarelli, F.; Ianuzzi, D.; Tricoli, P. Control of metro-trains equipped with onboard supercapacitors for energy saving and
reduction of power peak demand. Transp. Res. Part C Emerg. Technol. 2012, 24, 36–49. [CrossRef]
5. Ratniyomchai, T.; Hillmansen, S.; Tricoli, P. Optimal Capacity and Positioning of Stationary Supercapacitors for Light Rail Vehicle
Systems. In Proceedings of the 2014 International Symposium on Power Electronics, Electrical Drives, Automation and Motion,
Ischia, Italy, 18–20 June 2014; pp. 807–812.
6. Ciccarelli, F.; Iannuzzi, D.; Kondo, K.; Fratelli, L. Line Voltage Control based on Wayside Energy Storage Systems for Tramway
Networks. IEEE Trans. Power Electron. 2016, 31, 884–899. [CrossRef]
7. Vazquez, S.; Lukic, S.M.; Galvan, E.; Franquelo, L.G.; Carrasco, J.M. Energy Storage Systems for Transport and Grid Applications.
IEEE Trans. Ind. Electron. 2010, 57, 3881–3895. [CrossRef]
8. Tan, N.M.L.; Abe, T.; Akagi, H. Topology and application of bidirectional isolated dc-dc converters. In Proceedings of the 8th
International Conference on Power Electronic-ECCE Asia, Jeju, Korea, 30 May–3 June 2011; pp. 1039–1046. [CrossRef]
9. Babu, T.S.; Vasudevan, K.R.; Ramachandaramurthy, V.K.; Sani, S.B.; Chemud, S.; Lajim, R.M. A Comprehensive Review of Hybrid
Energy Storage Systems: Converter Topologies, Control Strategies and Future Prospects. IEEE Access 2020, 8, 148702–148721.
[CrossRef]
10. Župan, I.; Lasić, A.; Krušelj, D.; Šunde, V.; Ban, Ž. Power converter circuits for recuperation of the regenerative braking energy
in rail vehicles. In Proceedings of the 2019 42nd International Convention on Information and Communication Technology,
Electronics and Microelectronics (MIPRO), Opatija, Croatia, 20–24 May 2019; pp. 174–179.
11. Yang, Z.; Yang, Z.; Xia, H.; Lin, F. Brake Voltage Following Control of Supercapacitor-Based Energy Storage Systems in Metro
Considering Train Operation State. IEEE Trans. Ind. Electron. 2018, 65, 6751–6761. [CrossRef]
12. Hayashiya, H.; Abe, S.; Iino, Y.; Nakao, K.; Hino, M.; Ikarashi, H.; Nemoto, H.; Kawatsu, H.; Kato, T. Proposal of a novel control
method of Li-ion battery system for regenerative energy utilization in traction power supply system. In Proceedings of the
2016 IEEE International Power Electronics and Motion Control Conference (PEMC), Varna, Bulgaria, 25–28 September 2016;
pp. 298–303.
13. Zhu, F.; Yang, Z.; Lin, F.; Xin, Y. Dynamic Threshold Adjustment Strategy of Supercapacitor Energy Storage System based on
No-load Voltage Identification in Urban Rail Transit. In Proceedings of the 2019 IEEE Transportation Electrification Conference
and Expo, Asia-Pacific (ITEC Asia-Pacific), Seogwipo, Korea, 8–10 May 2019; pp. 1–6.
14. Xin, Y.; Yang, Z.; Lin, F.; Zhu, F. Research on Energy Management Strategy of Supercapacitor Energy Storage System in Urban
Rail Transit Based on Fuzzy Logic Control. In Proceedings of the 2019 IEEE Transportation Electrification Conference and Expo,
Asia-Pacific (ITEC Asia-Pacific), Seogwipo, Korea, 8–10 May 2019; pp. 1–6.
15. Liu, W.; Xu, J.; Tang, J. Study on control strategy of urban rail train with on-board regenerative braking energy storage system. In
Proceedings of the IECON 2017-43rd Annual Conference of the IEEE Industrial Electronics Society, Beijing, China, 29 October–1
November 2017; pp. 3924–3929.
16. Alnuman, H.; Gladwin, D.T.; Foster, M.P.; Fantham, T. Adaptive Control Method to Manage SOC for Energy Storage in DC
Electric Railways. In Proceedings of the IECON 2019-45th Annual Conference of the IEEE Industrial Electronics Society, Lisbon,
Portugal, 14–17 October 2019; pp. 261–266.
17. Lelas, M.; Pavlović, T.; Ban, Ž. A Supercapacitor Based Energy Storage System for Urban Transportation Energy Efficiency
Improvement. In Proceedings of the 2015 International Conference on Electrical Drives and Power Electronics (EDPE), Tatranska
Lomnica, Slovakia, 21–23 September 2015; pp. 430–436.

You might also like