Modeling of An Electric Bus Using MATLAB
Modeling of An Electric Bus Using MATLAB
e-ISSN: 2757-9077
ENGINEERING PERSPECTIVE
https://sciperspective.com/ Research Paper
1
Automotive Engineering Department, Faculty of Technology, Gazi University, Ankara, 06500, Turkey
ABSTRACT
Since the discovery of the internal combustion engine in the 19th century, petroleum and its derivatives are used in most of the
vehicles which is using for transportation on the Earth. The environmental pollution caused by petroleum, the largest energy
source used worldwide for over 100 years, the danger of depletion of the reserves and the increase in the price of the barrels have
encouraged scientists to develop cleaner and more efficient clean energy sources. Electric vehicles, according to conventional
vehicles with internal combustion engine; has advantages such as noiselessness, high efficiency, low fuel consumption and low
maintenance costs. In this paper, city buses, which are frequently used worldwide and in our country, have been handled to find
out what advantages will be provided when the electric motor is switched to use, to calculate what the costs will be and to show
how this change can be applied were carried out. Considering the concepts such as emission, fuel-maintenance costs and noise
pollution caused by the use of city buses, a 12-meter bus is modeled in MATLAB/Simulink environment for full electrical urban
use. The “HV SUMO HD HV3500” model of TM4 was chosen as the electric motor for the modeled vehicle. For the simulation
process, driving cycle has generated in 541 Eryaman-Kızılay line which is one of the urban bus lines and simulations were applied
on this cycle. As a result of the simulations performed, total range, remaining range and energy consumptions were examined and
comparisons were made for the different weights of the bus. The effects of regenerative braking on battery status were
investigated. Simulations were repeated by changing the resistance values and the effects on battery usage and range were
investigated.
Keywords: electric engine, modelling of an electric vehicle, simulation, Matlab/Simulink, NEDC, electric vehicle, electrical bus
History Author Contacts http://dx.doi.org/10.29228/eng.pers.51422
Received: 16.04.2021 *Corresponding Author
Accepted: 24.06.2021 e-mail addresses : [email protected], [email protected], [email protected]
Orcid numbers : 0000-0001-9028-1579, 0000-0001-5020-5061, 0000-0003-0689-6824
1. Introduction methods of a hybrid electric city bus by using Istanbul and Konya
Electric vehicles have advantages compared to conventional driving cycles. In their study, they modeled the system algorithm
vehicles with internal combustion engine; such as silence, high according to the torque demand of the engine by using two
efficiency, low fuel consumption and low maintenance costs [1,2,3]. different strategies, which they called the limited thermostat
In this study, city buses that are frequently used in our country are strategy and the maximum battery charge strategy [23]. Vyas
discussed. It was made to learn how to gain advantage in the use of Singh Chauhan (2017) modeled 10 different electric, hybrid
electric motors in buses, to calculate what the costs would be, and to electric and fuel cell vehicles on Matlab / Simulink in order to
examine how applicable this change would be. Considering the observe the data of vehicles known in the market under different
concepts such as emissions, fuel-maintenance costs and noise driving conditions and analyzed these vehicles for 7 different
pollution caused by the use of city buses, a 12-meter fully electrical driving cycles [16]. X. D. Xue, K. W. E. Cheng, N. C. Cheung
bus for urban use was modeled in MATLAB / Simulink. (2008) aimed to find the most suitable engine for electric vehicles
Many researchers have been studied on electric vehicle in their thesis study. They made comparisons between electric
modeling to examine motor choices and the advantages of electric motors on criteria such as efficiency, weight, cost, cooling,
vehicles. S. Çağlar Başlamış, Bayramcan İnce, Mertcan Koçak, maximum speed and fault tolerance. As a result of these
Hasan H. Saygılı (2016) studied the fuel consumption and saving comparisons, they determined the "Permanent Magnet
Synchronous Motor" as the most efficient motor [9]. Ekrem Başer
52
O. Karakaş et al. Engineering Perspective 1 (2): 52-62, 2021
(2016) made a comparison of asynchronous motor and permanent power the electric motor under peak operating conditions for short
magnet synchronous motor in urban use in his master's thesis. periods [7]. The fully electrical vehicle scheme is shown in Figure 1.
Başer, who modeled both engines on Matlab/Simulink in his study,
examined which engine was more efficient under equal speed
conditions. Comparison of motors was made on efficiency, cost,
performance and energy consumption parameters [11].
According to the data obtained from the EGO organization to
which Ankara city buses are affiliated; In January 2018, a total of
8454114 km was traveled and 5506700 liters of natural gas and
768520 liters of diesel were used in the same month. In the same
month, a total of 17611336 people used EGO's inner city bus lines.
This number of passengers is just one of the proofs showing the place
of city buses in our lives.
In January 2018, 1 liter of diesel was sold for 1,36 USD and 1 m3
of CNG for 0,89 USD. Based on these data, January EGO buses used
a total of 1.054.013,61 USD of fuel. During January, 34739 vehicles
were put into service, on average, 1121 vehicles served the public on Figure 1. Fully Electrical Vehicle
the streets of Ankara on a daily basis [4]. Fully electrical vehicles are more efficient than conventional
In order to provide real driving conditions in modeling, a test drive internal combustion engine vehicles. In a vehicle with an electric
cycle has been created on the line 541 of the EGO organization motor and battery, %46 of the energy taken from the plug is
Eryaman-Kızılay of Ankara Metropolitan Municipality. converted into usable work. On the other hand, only 18-25% of
In this study; Electric motor, drivetrain and bus body data from the energy that a conventional internal combustion engine
various companies were used. A transfer function has been created generates from fuel is used [8].
for the powertrain of the electric vehicle. By this way, the angular
velocity of the electric motor that drives the vehicle has been 2. Material-Method
calculated. As a result of this calculation, an electric motor model
was created by using angular velocity. 2.1 Electric motor model
A model was created for the resistance forces affecting the vehicle In order to meet the required values, the electric motor "SUMO
in dynamic driving conditions and added to the main model. By HD HV3500" from DANA TM4 was selected for the modelled
creating a battery and energy consumption model, measurements vehicle [9,10]. This motor is designed for heavy duty vehicles and 6
such as the amount of energy consumed by the vehicle during the - 18 meters buses [11]. The features of the electric motor are given
driving cycle, battery capacity and remaining range data were in Table 1 and Figure 2.
obtained. In addition, a brake model was added to the Simulink
model, allowing the energy gained by regenerative braking to be
used in battery charging. Table 1. Features of The Electric Motor [12]
The "SUMO HD HV3500" model of DANA TM4 company was Features SUMO HD HV3500
chosen as the electrical motor for the modeled bus. The selected Used Inverter TM4 Reflex CO300-HV
electrical motor can produce maximum 3500 Nm of torque and 350 Maximum Power (kW) 350
kW of power. For the Drivetrain, ZF Company's "Rear Axle System Continuous Power (kW) 260
AV 133" model was selected. While choosing the reference vehicle RPM Range (rpm) 0 – 3400
information, the buses currently produced by Mercedes-Benz, Peak Torque (Nm) 3500
Güleryüz and BMC companies were used. Continuous Torque (Nm) 1830
Number of Phase 9
1.1 Electrical Vehicles Mass (kg) 340+36
Electric vehicles contain a main power source and auxiliary power
sources, motor inverter and electric motor. The motor inverter is
responsible for the parameters such as the conversion and control of
the electrical energy stored in the batteries of full electric vehicles.
The motor inverter provides this control according to the accelerator
pedal position, and provides adjustment of the power to the electric
motor. Although it varies according to the motor and inverter used
in vehicle, some motor inverters can convert the DC taken from the
battery to AC [5,6].
The electrical motors provides the main power that necessary to
drive from the batteries; In addition to this, auxiliary power supplies
are used for sudden acceleration and loads. These auxiliary sources
are super capacitors and secondary batteries. Their purpose is to
53
O. Karakaş et al. Engineering Perspective 1 (2): 52-62, 2021
Figure 2. Electric Motor Performance Curve [4] The aerodynamic resistance force is calculated by the following
equation [13].
Simulink model of the electric motor is shown in Figure 3. In 𝐹𝐹𝑎𝑎 = 0.5𝜌𝜌𝐶𝐶𝑑𝑑 𝐴𝐴𝑓𝑓 (𝑉𝑉 + 𝑉𝑉0 )2 (1)
this model, the revolution of the electric motor is applied, the
maximum torque value produced by the motor at that revolution In the last equation;
is calculated. The torque value calculated here will be included in • 𝐶𝐶𝑑𝑑 : Aerodynamic drag coefficient,
the dynamic model with the accelerator pedal control. Since the • 𝐴𝐴𝑓𝑓 : Front projection area of the vehicle, 𝑚𝑚2
efficiency map of the electric motor could not be reached, the • 𝑉𝑉: Vehicle speed, m/s
electric motors in the market were examined and 90% efficiency • 𝑉𝑉0 : Wind speed opposite to the direction of movement,
value was used. m/s
𝑘𝑘𝑘𝑘
• 𝜌𝜌 : Air density, 3 𝑚𝑚
Aerodynamic drag force model is given in Figure 5.
2.2.3 Acceleration resistance It is aimed to obtain more realistic data on modeling. Resistors
acting on the vehicle are applied to the model as in Figure 8.
According to Newton's 2nd law of motion, during the The total torque generated by multiplying the total resistance
acceleration and deceleration of an object, an inertial force occurs forces acting on the vehicle by the wheel radius and the total brake
in the opposite direction to this motion. This force encountered torque applied to the system by the brake model constitute the
during positive and negative acceleration of the vehicle is called total resistance torque.
the acceleration resistance. This resistance;
55
O. Karakaş et al. Engineering Perspective 1 (2): 52-62, 2021
2.3. Speed control model (PID Controller) In order to create the transfer function, some mathematical
calculations must be done first. The moment of inertia occurs in
Driving cycles are used as references in the simulation process the components that make the rotational motion due to their mass.
and the model must be able to follow these cycles. For this reason, It is known that the net torque value at the motor output is equal
it is necessary to create a speed control model that can follow the to the product of the total moment of inertia times the angular
reference. A PID controller is used for speed control in the model. acceleration. As a result of this transfer function, it is desired to
The block that matches the speed values with the values coming reach the speed information of the vehicle. For this reason, the net
from the driving cycle ensures that the output values and the torque value at the output of the motor should be calculated first,
torque value of the electric motor are formed. For this process, the then this torque value should be divided by the total inertia forces
output values of the PID controller are limited between "1" and "- and the angular acceleration of the motor should be calculated. By
1" values. For pedal control, "0-1" range is selected as accelerator integrating the angular acceleration value, the angular velocity of
pedal, "0 - (-1)" range is selected as brake pedal. In this way, it the motor is calculated. The angular velocity of the motor is the
helped the braking model to control the brakes [15]. angular velocity at the differential input. It must therefore be
The Ziegler-Nichols method was used to find the PID controller divided by the differential reduction ratio. Thus, the speed at the
parameters. According to this method, P (proportional value) differential output is calculated. The vehicle speed is calculated
value was increased, I (integral value) and D (derivative value) by multiplying this value by the wheel radius.
values were accepted as 0. After that, the parameters were The mathematical operations of the power transfer transfer
adjusted with the "PID Tuner" in the PID controller block. Thus, function used in the modeling process are performed as follows:
the tracking process is provided with the lowest error and
oscillation. Speed control model is shown in Figure 9. 𝑀𝑀𝑛𝑛𝑛𝑛𝑠𝑠 = 𝑀𝑀𝑚𝑚𝑟𝑟𝑠𝑠𝑟𝑟𝑟𝑟 × η𝑚𝑚𝑟𝑟𝑠𝑠𝑟𝑟𝑟𝑟 (7)
𝑤𝑤̇𝑚𝑚𝑜𝑜𝑜𝑜𝑜𝑜𝑚𝑚
𝑀𝑀𝑤𝑤ℎ𝑛𝑛𝑛𝑛𝑎𝑎 = 𝑀𝑀𝐿𝐿𝑟𝑟𝑎𝑎𝑑𝑑 , 𝑤𝑤̇ 𝑎𝑎𝑎𝑎𝑎𝑎𝑛𝑛 = 𝑤𝑤̇ 𝑤𝑤ℎ𝑛𝑛𝑛𝑛𝑎𝑎 = (19)
𝑖𝑖𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑
56
O. Karakaş et al. Engineering Perspective 1 (2): 52-62, 2021
2.6. Energy Consumption Model
𝑀𝑀𝐿𝐿𝑜𝑜𝑎𝑎𝑑𝑑 6×𝐼𝐼𝑤𝑤ℎ𝑎𝑎𝑎𝑎𝑎𝑎 +2×𝐼𝐼𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎
𝑀𝑀𝑛𝑛𝑛𝑛𝑠𝑠 − � �= × 𝑤𝑤̇ 𝑚𝑚𝑟𝑟𝑠𝑠𝑟𝑟𝑟𝑟 (21)
𝑖𝑖𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑 ×η𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑 𝑖𝑖 2 𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑 ×η𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑
The "SOC" method was used for the energy consumption
𝑀𝑀𝐿𝐿𝑜𝑜𝑎𝑎𝑑𝑑
𝑀𝑀𝑖𝑖𝑎𝑎𝑜𝑜 −
𝑖𝑖𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑 ×η𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑
model [20]. By using "SOC", the method of learning the current
𝑤𝑤̇ 𝑚𝑚𝑟𝑟𝑠𝑠𝑟𝑟𝑟𝑟 = 6×𝐼𝐼𝑤𝑤ℎ𝑎𝑎𝑎𝑎𝑎𝑎 +2×𝐼𝐼𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 (22) state of charge of the battery, the percentage of the battery
𝑖𝑖2 𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑×η𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑 consumed by the vehicle throughout the cycle was printed out and
recorded. With this output, it is aimed to calculate the maximum
By integrating the last equation; range that the battery can achieve with 100% charge, and the
capacity of the battery consumed per 100 km.
In the model, the efficiency and torque of the electrical motor
are taken as input, so it is determined whether the electric motor
𝑀𝑀𝐿𝐿𝑜𝑜𝑎𝑎𝑑𝑑 operates in the drive mode or regenerative mode. Afterwards, the
𝑀𝑀𝑖𝑖𝑎𝑎𝑜𝑜 −
𝑖𝑖𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑 ×η𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑
𝑤𝑤𝑚𝑚𝑟𝑟𝑠𝑠𝑟𝑟𝑟𝑟 = ∫ � 6×𝐼𝐼𝑤𝑤ℎ𝑎𝑎𝑎𝑎𝑎𝑎 +2×𝐼𝐼𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 � 𝑑𝑑𝑑𝑑 (23) instantaneous power of the electrical motor was calculated by
𝑖𝑖2 𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑 ×η𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑 dividing the motor torque by the efficiency If the electric motor is
operating in regenerative mode, the battery is charged by gaining
30% from the kinetic energy of the vehicle.
The energy consumed by high and low voltage accessories is
the angular velocity of the motor is calculated [17]. Figure 11 is considered constant in all cases. The efficiency of the converter is
shown the Simulink powertrain model. taken into calculation when calculating the power amount of low
voltage accessories. The total power consumed by the electric
motor, low and high voltage accessories has been calculated. Then
this value is integrated and the total amount of energy consumed
by the vehicle during one cycle is calculated. The energy
consumption model is shown in Figure 13.
57
O. Karakaş et al. Engineering Perspective 1 (2): 52-62, 2021
Table 3. Test Drive Cycle Features Results graphics of the electric bus model have been obtained.
Time (s) 3190 These graphics were created by following the test drive cycle.
Distance (km) 31.16 Figure 16 is shown the graph of the test driving cycle versus
vehicle speed.
Maximum Speed (km/h) 87
According to the simulation results including test driving cycles,
Average Speed (km/h) 36 vehicle speed follows the cycle speed. Thus, it is concluded that
Conversion Sensitivity (m) 7 the energy consumption values obtained from the simulation
applied are correct. In Figures 17 and 18, electric motor torque
and speed can be seen in the test drive cycle.
2.8. Simulation result model Figure 16. Driving Cycle and Vehicle Speed
58
O. Karakaş et al. Engineering Perspective 1 (2): 52-62, 2021
59
O. Karakaş et al. Engineering Perspective 1 (2): 52-62, 2021
Figure 22. Effect of Regenerative Braking Gain on Total Range
Table 6. Effects of Aerodynamic Resistance
Aerodynamic Resistance
0.6 0.65 0.7
Coefficient
Total Distance (km) 346.7 335.2 331.1
Remaining Distance (km) 315.6 304 300
Battery Capacity Spent
70.66 73.09 73.99
per 100 Km (kWh)
Battery Charge Status (%) 91.01 90.7 90.59
60
O. Karakaş et al. Engineering Perspective 1 (2): 52-62, 2021
vehicle, the noise emission is greatly reduced, while the exhaust
Table 8. Fuel Consumption Values emission is zeroed.
Modeled Bus Diesel Bus CNG Bus • Parameters such as aerodynamic drag coefficient, rolling
Fuel resistance coefficient, regenerative braking gain and vehicle mass
consumption 73.09 kWh 31 L 32 m3 were changed on the modeled vehicle and as a result, the change
(100 km) of values such as range, energy consumption was examined.
Fuel Unit • The regenerative braking gain in the electric vehicle model has
0,12 USD/kWh 1,51 USD/L 0,89 USD/m3
Price increased by 58 km for 10500 kg vehicle mass, 36 km for 14000
Fuel Cost kg vehicle mass and 9.6 km for 17000 kg vehicle mass in the total
9,06 USD 46,81 USD 28,64 USD
(for 100 km) range. Based on these results, it is seen that regenerative braking
is of great importance for the vehicle.
• The mass parameter was changed to be empty, half-full and full
According to the values given in the table, based on today's fuel weight on the modeled vehicle. Accordingly, it was observed
unit prices for 100 km fuel consumption, the fuel cost of the that %9.3 battery capacity was consumed for 10500 kg vehicle
modeled electrical bus; It is 37.74 USD more economical than a mass, %13.75 battery capacity for 14000 kg vehicle mass, %27.2
diesel bus and 19.57 USD more than a CNG bus. According to battery capacity for 17000 kg vehicle mass during the 31.16 km
this information, it can be said that the electric bus is a better driving cycle. Based on half-full and full vehicle; When the
choice in terms of fuel costs. vehicle is half full, it will be able to make an average of 7 full trips
on the line, and an average of 4 full trips when fully loaded.
61
O. Karakaş et al. Engineering Perspective 1 (2): 52-62, 2021
Vehicles: Oem Strategies, Demand Drivers, Technology Issues, Key
Industry Players, And Global Market Forecasts”, Pike Research, New
York, 2010.
11. Başer E.,”Elektrikli Araçlarda Yol Koşullarına Uygun Motor Seçimi
Algoritması Geliştirme”, Düzce Üniversitesi Fen Bilimleri Enstitüsü,
Düzce, 2016.
12. Internet.“https://www.tm4.com/products/direct-
driveelectricpowertrain/sumo-hd” [Online].
13. S. Çetinkaya, Taşıt Mekaniği Geliştirilmiş 8. Basım, 2017
14. Fan B. S., “Modeling and Simulation of A Hybrid Electric Vehicle
Using MATLAB/ Simulink and ADAMS”, University of Waterloo,
Mechanical Engineering thesis, Canada 2007.
15. Gökçe, C., “Modeling And Simulation Of A Series Parallel Hybrid
Electrical Vehicle”, Master Thesis, İstanbul Technical University
Institute Of Science And Technology, Istanbul (2005).
16. Chauhan V. S., “Simulation of Electric Vehicle Including Different
Power Train Components”, Master Thesis, Czech Technıcal
Unıversıty, Prague, 2017.
17. Kiyakli, A. O., & Solmaz, H. (2018). “Modeling of an electric vehicle
with MATLAB/Simulink”. International journal of automotive
science and technology, 2(4), 9-15.
18. Yurdaer, E., & Kocakulak, T. (2021). “Comparison of Energy Con-
sumption of Different Electric Vehicle Power Systems Using Fuzzy
Logic-Based Regenerative Braking.”, Eng. Perspect, 1(1), 11-21.
19. Şahin Y., Güneş U., Umman F., Ceceloğlu A. C., Güner H. E., Ertunç
H. M., “Bulanık Mantık Kontrollü Rejeneratif Frenleme Sistemi
Regenerative Braking System using Fuzzy Logic Controller”,
Kocaeli Üniversitesi Mekatronik Mühendisliği, 2015
20. Mastanamma Y., Bharathi M. A., “Electric Vheicle Mathematical
Modelling an Simulation Using MATLAB-Simulink”, Journal of
Electrical and Electronics Engineering, 47-53 (2017)
21. Park C., Kwon M., Jeong N., Lee S., Suh M., Kim H., Hwang S.,
“Development of Electric Vehicle Simulator for Performance
Analysis”, Universal Journal of Mechanical Engineering 2 (7), 231-
239 2014.
22. Internet.“https://www.grazerea.at/cms/upload/gashigh/staimer_man
_cng_buses.pdf” [Online].
23. Çağlar S., İnce B., Koçak M., Saygılı H. H., “Hibrit-Elektrikli Şehir
İçi Otobüslerde Yakıt Ekonomisinin İyileştirilmesine Yönelik Enerji
Yönetim Sistemi Algoritmalarının Tasarımı”, 8. Otomotiv
Teknolojileri Kongresi, OTEKON, 2016
62