You are on page 1of 11

Modeling, validation and simulation of

electric vehicles using MATLAB


Cite as: AIP Conference Proceedings 2452, 030006 (2022); https://doi.org/10.1063/5.0114084
Published Online: 18 November 2022

M. Vairavel, R. Girimurugan, C. Shilaja, et al.

ARTICLES YOU MAY BE INTERESTED IN

Analysis of hybrid electrical vehicles: Types, formulation and needs


AIP Conference Proceedings 2452, 030005 (2022); https://doi.org/10.1063/5.0114081

A review paper on renewable energy source used for electric vehicle charging
AIP Conference Proceedings 2452, 030004 (2022); https://doi.org/10.1063/5.0113326

Study on fuzzy logic controller and PID controller for speed control of BLDC motor
AIP Conference Proceedings 2452, 030003 (2022); https://doi.org/10.1063/5.0126871

AIP Conference Proceedings 2452, 030006 (2022); https://doi.org/10.1063/5.0114084 2452, 030006

© 2022 Author(s).
Modeling, Validation and Simulation of Electric Vehicles
using MATLAB
M. Vairavel1,a), R. Girimurugan2, C. Shilaja3, Ganesh Babu Loganathan4,
J. Kumaresan5
1
Department of Mechanical Engineering, Annapoorana Engineering College, Salem 636 308, Tamilnadu, India
2
Department of Mechanical Engineering, Nandha College of Technology, Perundurai 638 052, Tamilnadu, India
3
Department of Electrical and Electronics Engineering, Kalasalingam Academy of Research and Education,
Krishnankoil 626 126, Tamilnadu, India
4
Department Mechatronics Engineering, Faculty of Engineering, Tishk International University, Erbil, Kurdistan
Region, Iraq
5
Department of Electrical and Electronics Engineering, Nandha College of Technology, Perundurai 638 052,
Tamilnadu, India
a)
Corresponding author: vairavelphd2020@gmail.com

Abstract. For important design and management decisions in high-performance vehicle models, accurate EV powertrain
modeling, evaluation, and testing are essential. A technique for the design and growth of an electric vehicle powertrain is
described in this study, which includes modeling, computation, and testing on an actual vehicle process as well as extensive
evaluation of the findings. Although EV powertrain modeling in simulation software settings is vital for EV development
and design, verifying these simulations on real-world vehicle elements is critical for improving total vehicle efficiency,
reliability, and speed. This modeling methodology combines the use of Simulink software or MATLAB for simulation
and modeling of an EV powertrain with the validation of the simulation result on an actual car that is evaluated on a
structural dynamometer The integration of these simulation models with real-world testing reveals an approach for rapidly
creating and testing high-performance EV powertrains at a low cost, covering shortcomings in the literature on how these
forecasting strategies might be used in a research context.

Keywords: Electric vehicle, hybrid system, simulation, MATLAB, energy, conventional resource, vehicle mechanics.

INTRODUCTION

EV is one of the alternative sources of vehicle in present time when compared to the regular based vehicles which are
dependent on ICE [Internal Combustion Engines]. Electric vehicle is preformed due to its significance it has towards
pollution and with zero percent emission of GH gas. The development of electric vehicle in present time is mainly due
to its demand in commercial market due its advancement in battery model, electric motors, control and management
in power process [1]. The demand and sales of electric vehicles are increasing every year. Reports from electrical
vehicle manufactures states that more amount of electric vehicle and hybrid electric vehicle are sold in large amount
every year based on its demand in each country [2]. Though electric vehicle comes with more advantage than the
conventional vehicle but certain drawbacks of it cannot be neglected they are cost of the vehicle, efficient of battery
and its lifetime, issues in charging process, restricted energy density, etc. but all these drawbacks can be highlighted
and solved in the fore coming years [3]. The further growth of electric vehicle market relies on the charging station
depending on its infrastructure and charging process in the station [4]. In the next generation of powertrains, enhanced
power storage systems and energy processors like Lithium batteries, super capacitors, and biofuel cells are used.
Conventional ICE, as well as hydraulic and mechanical systems, could be employed in combination with these

International Conference on Smart Grid & Electric Vehicle (ICSGEV 2021)


AIP Conf. Proc. 2452, 030006-1–030006-10; https://doi.org/10.1063/5.0114084
Published by AIP Publishing. 978-0-7354-4263-4/$30.00

030006-1
electrification subsystems and components. It's tough to examine a freshly developed HEV because of the
interrelationship among many elements and the heterogeneous nature. Each design feature should be carefully picked
for improved fuel efficiency increased safety, excellent serviceability, and competitive frequency control, all at a
consumer-acceptable price. Developing and evaluating each model combination was time-consuming, costly, and
inconvenient. For concept review, development, and evaluation of HEVs, computational methods are required. This
is especially true when developing new hybrid powertrain designs and regulators. However, the intricacy of new
powertrain design, as well as their reliance on integrated software is a source of concern for automotive R&D. As a
result, forecasting interactions between various vehicle systems and components are becoming increasingly complex.
It's going to take a modeling environment that can simulate not only elements but also integrated software like the
ETC software. It's also difficult to make an accurate diagnosis. In the diagnostics of operational components, modeling
can be quite useful [5]. Operating an integrated fuel cell simulator and setting appropriate fuel cell operational
variables to those acquired from the system, for instance, can aid in fuel cell defect identification. Similar techniques
in the automotive arena still lack the strength complexity, and efficiency needed by electronics developers, according
to a comparison with simulation and experimental tools in the electronics business. Moore's rule has been verified by
developments in electronic analysis tools, which have enabled attain incredible levels of computing performance while
lowering prices. Developers of automotive technologies must build design techniques that systematize the low-level
elements of the design phase to copy and manage equivalent degrees of complexity. The vehicle design can be
energetic, steady-state, or quasi-steady, based on the level of complexity in how each component is modeled [6]. The
ADVISOR model, for example, can be classified as a constant state model, whereas the PSAT model is classified as
quasi-steady, and the PSIM and VTB models are classified as flexible. Vehicle designs can be characterized as
backward-facing or forward-looking, based on the computation direction. During the examination of fuel efficiency,
the vehicle speed is regulated to follow an operating cycle in a forward-looking paradigm and making the controller
process easy. The fundamental benefit of using a quasi-steady or steady-state model is that it is quick to compute, but
the drawback is that it is inaccurate for the simulation model. Physics-based designs, on the other hand, can help with
good torque simulations of the vehicle system at different time scales [7]. This type of dynamic analysis should be
helpful in the development of a good powertrain control scheme. Through a connection like a lumped-coefficient
nonlinear equation or a virtual equivalent model, the designs are tightly linked to the physical mechanisms. The PHEV
and the EV are still in choice due to its conventional method of charging process especially due to its power transfer
method. [8] Modeling of HEV and EV through MATLAB with the help of V-ELPH system which helps in blocking
the transmission, interior combustion that occurs in the engine, etc. The important factor to be concentrated while
MATLAB simulation process are the drive shafts, the battery modeling, controller, and induction motor, which should
be embedded on the file. These components will be tuned during simulation process to attain accurate output. The
outcome is based on the configuration of vehicle and control strategy. [9] built a small-level EV and modelled with
MATLAB with the usage of physical data for the vehicle and its batteries through the capacity of the battery can be
analyzed to reach the vehicle configuration. [10] Developed a ADAMS model along with MATLAB/SIMULINK for
HEV. In the proposed ADAMS where the vehicle is designed with the help of input based on the driveline,
suspensions, and chassis, braking, tires, and steering, etc. inserted to the MATLAB. It was found that the driver system
of the model is dependent on vehicle speed. In this research, the authors describe the modeling and simulation steps
for high-performance EVs by defining key vehicle specifications and then developing an equation-based model of a
battery EV in MATLAB/Simulink software. The modeling goal is to test for the efficiency and performance of the
EV and the results of the model are validated by real-world tests on the target EV platform. Although super capacitors'
high power density and high capacitance properties support their use in EV applications, the thermodynamic efficiency
limitation necessitates the use of a considerably greater energy renewable resource, such as a battery bank. The goal
of combining batteries with capacitors is to develop energy storage with a battery's high efficiency and a super
capacitor’s high energy density [11].

LITERATURE SURVEY

Hybrid, fuel cell and electric vehicles are using more electrical equipment, like rotating motors, electronic components,
CVT, and integrated powertrain processors, than normal vehicles. New and considerably enhanced kind of double-
layer circuit The SC has a high-power efficiency and a fast-rising time due to its low resistance and exceptionally low
capacitance. Because a double layer capacitor is not limited by the same constraints as conventional capacitors. It can
be used in a variety of applications. Negative and positive particles at the contact are modeled as a basic parallel plate
resistor in the Helmholtz model. It took more than a decade for EDLC devices to make an appearance in automobile

030006-2
applications surprisingly, it is the introduction of EDLCs into automobile applications that has resulted in a synergistic
impact in terms of EDLC technological knowledge resulting in a surge in hEV popularity [12]. By simulating the
synchronization between these two devices, he was able to characterize it succinctly. In essence, the purpose is to
investigate the benefits of both gadgets in a vehicle power system design using super capacitor fusion [131]. Prepared
a paper on the use of super capacitors in EV in the future. As a result, the focus of the research has shifted to the
connection of several energy storage methods and the hybridization approach for maximizing the efficiency of every
system. This must be done with special attention to the capacitor program's maximum output voltage. The many
models of batteries are stacked one on top of the other, and SC has backed such studies [14]. Looked at estimated run-
time of an SC by clearly showing the simplified model consisting of a battery and super capacitor configured in such
a parallel connection. The authors concluded that the super capacitor is only suitable for low duty cycles, as the battery
current surpasses the capacitor current during long pulse durations.” [15] An analysis for the optimum sizing of the
super capacitor and battery system for a 1610 kg mid-size passenger vehicle. The direct parallel connection of super
capacitors and batteries are said to be in a passive configuration since there is no external intervention of power-
sharing between the devices.” [16]. When the battery is recharged the electrons flow from the anode to the cathode
via an external connection according to [17].

PROPOSED METHODOLOGY

Dynamics of Vehicle Motion

The acceleration of an item is proportional to the net power applied to it, according to Newton’s 2nd law. In other
words, an object accelerates when the net force exerted on it is nonzero. Similarly, a vehicle moves due to the force
of the propulsion unit (the powertrain) overcoming the gravitational force of the vehicle exerted on the roadway, the
air resistance, and the tire rolling resistance. The acceleration and speed at which the vehicle moves are dependent on
the power delivered to the wheel by the powertrain, the curb mass of the vehicle (including all of the components and
passengers on board), the condition of the roadway, and the aerodynamics of the vehicle on the roadway. When a
vehicle is accelerating, the vehicle is subject to the forces described in equation (1).

𝑑𝑣𝑥𝑇
𝑘𝑚 𝑚 = 𝐹𝑇𝑅 − 𝐹𝑅𝐿 (1)
𝑑𝑡

Where FTR represents the tractive force which the electric machine delivers, FRL represents road load forces, m
represents vehicle mass, VTX is the velocity in the tangential direction of the roadway, km accounts for the rotational
inertia coefficient of the board vehicle’s rotating mass, and dt accounts for forces that propel the vehicle forward. FRL
is the summation of the gravitational force FgxT acting on the vehicle in the downward direction, rolling resistance
of the vehicle's tires, and the aerodynamic drag FAD as described in Equations (2) to (5).

𝐹𝑅𝐿 = 𝐹𝑔𝑥𝑇 + 𝐹roll + 𝐹𝐴𝐷 (2)


𝐹𝑔𝑥𝑇 = 𝑚 × 𝑔 × sin⁡ 𝛽 (3)
𝐹roll = 𝑚 × 𝑔 × cos⁡ 𝛽(𝐶𝑜 + 𝐶1 𝑣𝑥 𝑇 2 ) for 𝑣𝑥𝑇 > 0 (4)
1
𝐹𝐴𝐷 = 𝜌𝐶𝐷 𝐴𝐹 (𝑣𝑥𝑇 + 𝑣0 )2 for 𝑣𝑥𝑇 > 0 (5)
2

Where Co and C1 are coefficients of rolling resistance, the grade in degrees is given by b, g is the acceleration due to
gravity, air density is r, the CD is the coefficient of drag, AF is the frontal area, and v0 is the measured headwind
velocity ahead of the vehicle. Equation (5) defines the aerodynamic force relating to the aforementioned constants and
variables. Figure.1 (a) is referred to as a free body diagram or point mass diagram and it describes the forces that act
on the EV on a roadway.

030006-3
FIGURE 1. (a) Free body figure of forces acting on an EV (b) Forces and speed in the tire-road contact patch zone

The tire-road interaction of the vehicle and the traction properties of the tire-road interface is fundamental to the
dynamics of a vehicle. The traction torque from the propulsion system is converted into a traction force through the
interaction between the pneumatic tire and the road surface at the tire-road interface illustrated in figure.1 (b). The
speed of the tire and the longitudinal speed of the vehicle vary in magnitude and direction and are a function of the
forces acting on the tire, including the vertical load force that the vehicle body exerts on the wheel, F z, and the
longitudinal forces exerted on the tire at the tire-road interface, Fx. The rolling speed of the tire is related to the tire
angular velocity and wheel radius rw and is given by equation (6).

EV Powertrain Simulation and Modelling

EV powertrain simulation and modeling begins with the determination of key design specifications as detailed in
Table.1, adapted from the spec sheet of a Chevrolet Bolt EV. These specs are then used in an equation-based model
of an EV using MATLAB/Simulink, and the modeling results are then validated using actual vehicle capacity verified
on a chassis dynamometer.
TABLE 1. Vehicle Specification for Chevrolet Bolt EV [3]

Description Factor
Motor power 100 kW
Torque 350 Nm
Energy efficiency 250 W/h
Capacity of battery 45 kW
Curb Density 1500.20 kg
Initial acceleration 8 seconds
Coefficient 1.5
Ratio 6:02:4
Top speed 89 mph

DRIVELINE MODEL
The driveline model describes the driveline losses that are present in the EV due to reduction is used to reduce the
speed at the wheel while multiplying the torque at the wheel. This gear reduction is not lossless and is given by 𝑇oss
in equation (6), where 𝐺 is the gear ratio of the gear reduction assembly, rw is the radius of the wheel, Ftr in net tractive
force at the wheel and FBr is the braking force. Figure.2 is the Simulink model of the driveline and accompanying loss
calculations.
(𝑇motor −𝑇loss )𝐺
𝐹𝑡𝑟 = − 𝐹𝐵𝑟 (6)
𝑟𝑤

030006-4
FIGURE 2. Driveline loss model and calculations

Battery Model

The battery model is developed based on a constant voltage source, 𝑉, in series with internal resistance, 𝑅 = 0.1 ohms,
as described by figure.3. This model relies on a power loss calculation to determine the battery output current as
described by equations (7) to (10). Figure.4 describes the battery model and loss model calculation in the Simulink
Electric Vehicle model. The state of charge (SOC) of the battery is determined by integrating the power over time and
comparing it to the energy capacity variable set at the initialization of the simulation.

𝑃ideal = 𝑃actual + 𝑃loss (7)


𝑃ideal = 𝐼𝑉𝑜𝑐 (8)
𝑃actual = 𝐼𝑉𝑜𝑐 − 𝐼 2 𝑅int (9)
𝑃loss = 𝐼 2 𝑅int (10)

FIGURE 3. Battery model with internal resistance

030006-5
FIGURE 4. Battery model with SOC and power loss calculations

Glider Model
The equation-based modeling approach in Simulink involves the representation of each vehicle component or
subsystem as a series of equation blocks connected through signals that are calculated and updated at each time step.
Figure.5 is an overview of the equation-based model in Simulink to meet the EV specifications previously described.
The glider model represents the point mass model of the vehicle dynamics previously described. It sums up the forces
acting on the vehicle body represented by a point mass, as described in equations (1) to (5). Table.2 is a summary of
parameters used for the calculation of vehicle dynamics and determining the vehicle speed at each time step. Figure.6
is a closer look at the glider model subsystem within the Simulink model where equations (1) to (5) are implemented
by taking in the input of tractive force and subtracting the summation of the road load forces to get the inertial force,
which is converted into an acceleration based on the vehicle mass and then integrated over time to form the output of
the model, vehicle speed, which is then fed back to the driver control subsystem in figure.7.

TABLE 2. Glider Model Parameters

Parameter Description Unit Factor


Q Road angle Degrees 1
V Vehicle Speed m/s -
𝑚 Vehicle Mass kg 1321.87
g Gravity m/s2 8.45
a Vehicle acceleration m/s2 -
Cd Drag coefficient - 1.45
mi Vehicle inertial mass kg 1523.09

030006-6
FIGURE 5. Simulink equation-based EV model (Adapted from [16], Math Works: 2020)

FIGURE 6. Vehicle body glider model

FIGURE 7. Vehicle glider model subsystem

030006-7
RESULTS AND DISCUSSIONS

Given the high repeatability of the chassis dynamometer testing, the EV model developed above was then validated
against the dyno work, with a careful comparison of the observations, including speed, distance, energy expended,
and power between modeling, chassis dynamometer, and on-road measurements. It is important to note that due to the
advanced dynamics controls on the real vehicle in comparison to the simplified PID controls modeled, the dynamic
responses of the modeled vehicle and the real vehicle, such as motor torque and power, are expected to vary to a
certain degree. However, the steady-state values, such as speed, distance, and energy, do show a strong correlation.
Figure.8 is a plot of the vehicle speed during the simulation overlayed on the drive cycle speed, which was recorded
via the OBD port during dyno testing. From the plot in figure.9, we observe that the modeled vehicle is capable of
following the drive cycle input closely within a very small margin of error while meeting the speed and torque response
requirements.

FIGURE 8. Test time vs vehicle speed FIGURE 9. Simulated Battery SOC Over Time

Figure.9 is a plot comparison of the battery energy over time between the dyno test and vehicle simulation, which is
derived by integrating the battery power over time, as seen in the model block diagrams in figure.10.

Energy Efficiency

The energy efficiency of the modeled EV can be derived by dividing the battery energy output by the vehicle distance
covered. The total energy delivered by the battery model was 5.249 kWh, while the distance traveled was 17.85 miles,
which resulted in an energy efficiency of 294 Wh/mile compared to the dynamometer test results, which had an overall
energy efficiency average of 297 Wh/mile. The RMSE between the modeled EV results and the dyno results was
calculated for a final value of 0.2 for measured energy consumption over time. The small error deviations in the model
can be attributed to negligible transient errors within the model.

Loss Model

The battery energy at the battery terminal is 5.229 kWh as indicated in figure.12 and is consistent with the energy
consumption during dyno testing. The total tractive energy consumption of the vehicle over the drive cycle is measured
at 3.18 kWh, Although Figure.13 validated the total energy consumption correlation of the model to the dyno, the
figures below allow us to estimate, experiment, and validate the efficiency of the real-world vehicle compared to the
vehicle model. The vehicle model can be optimized iteratively to reduce these losses through either reduction in motor
losses by adjusting the motor's operational limits or modifying the driveline gear selection.

030006-8
FIGURE 10. Battery energy over time FIGURE 11. Distance travelled by vehicle over time

FIGURE 12. Frictional energy of a vehicle over time FIGURE 13. Driveline energy consequences over time

CONCLUSIONS
Due to the revolution of the transport industry by electric mobility, this study emphasizes the need for high-
performance EV modeling, simulation, and testing. The goal of this project was to show how to generate high-
performance electric vehicle models in a software simulation model and validate them with actual devices in a
consistent and scalable manner, allowing for the quick production of EV test beds. A brief review of EV modeling
techniques and software toolsets was introduced. A summary of EV motion dynamics was described mathematically
and an equation-based EV model was implemented based on the mathematical models described. The design
philosophy of EV OEMs about vehicle efficiency drive cycle tests mandated by the EPA was briefly described.
Finally, the results of the EV model were validated by comparing them to the results of vehicle performance tests of
the specified EV In the public focus as much as in scientific study, electric vehicles are gaining in popularity. The
introduction of model parameters for virtual vehicle production has taken a lot of time and effort. These tools are
useful for pre-dimensioning car components such as storage devices or electrical machine power characteristics.
Offline models can be used to build control techniques for vehicle operating. These frameworks and techniques can
also be used to do optimizations. Through various methods, human has started storage of energy. It is worth having
energy storage based on time and capacity. The storage of energy is dependent on the availability of the energy, energy
consumption time, energy storage time, and the location of energy usage to energy storage. Energy storage systems
have been helpful in many demands of society. Various energy storage systems are available worldwide. They come
into existence based on the area, need of storing the energy, and its capacity.

030006-9
REFERENCES

1. M. S. A. Chowdhury, K. A. Al Mamun and A. M. Rahman, “Modelling and simulation of power system of


battery, solar and fuel cell powered hybrid electric vehicle” in Third International Conference on Electrical
Engineering and Information Communication Technology – 2016, 01–06.
2. A. Buonomano, F. Calise, M. D. d’Accadia and M. Vicidomini, A hybrid renewable system based on wind
and solar energy coupled with an electrical storage, Dynamic simulation and economic assessment, Energy
155, 174–189 (2018).
3. A. Saleki, S. Rezazade, M. Changizian, “Analysis and simulation of hybrid electric vehicles for sedan
vehicle, Iranian Conference on Electrical Engineering-2017, 1412–1416.
4. P. Cazzola, M. Gorner, R. Schuitmaker, and E. Maroney, Global EV outlook 2016, International Energy
Agency, France.
5. N. Sooknanan Pillay, A.C. Brent, J. K. Musango, and F. Van Geems, using a system dynamics modelling
process to determine the impact of e-car, e-bus and e-truck market penetration on carbon emissions in South
Africa, Energies 13 (03), 575 (2020)
6. R. R. Kumar, and K. Alok, Adoption of electric vehicle: A literature review and prospects for sustainability.
Journal of Cleaner Production 253, 119911 (2020).
7. L. D. D. Harvey, Rethinking electric vehicle subsidies, rediscovering energy efficiency, Energy Policy 146,
111760 (2020).
8. R. Salvucci, and J. Tattini, Global outlook for the transport sector in energy scenarios, Transforming Urban
Mobility 21 (2019).
9. B. Ballinger, M. Stringer, D. R. Schmeda-Lopez, B. Kefford, B. Parkinson, C. Greig, and S. Smart, The
vulnerability of electric vehicle deployment to critical mineral supply, Applied Energy 255, 113844 (2019).
10. A. Gerossier, R. Girard and G. Kariniotakis, Modeling and forecasting electric vehicle consumption profiles,
Energies 12 (7), 1341 (2019).
11. G. Li, and S. Chihuri, Prescription opioids, alcohol and fatal motor vehicle crashes: a population-based case-
control study, Injury Epidemiology 6 (1), 01–08 (2019).
12. J. Rowley, A. Liu, S. Sandry, J. Gross, M. Salvador, C. Anton, and C. Fleming, “Examining the driverless
future: An analysis of human-caused vehicle accidents and development of an autonomous vehicle
communication test bed” in Systems and Information Engineering Design Symposium – 2018, 58–63.
13. Moldovanu D. Implementation in MATLAB Simulink of a basic electric vehicle. In IOP Conference Series:
Materials Science and Engineering 2020 Jul 1 (Vol. 898, No. 1, p. 012015). IOP Publishing.
14. Slah F, Mansour A, Hajer M, Faouzi B. Analysis, modeling and implementation of an interleaved boost DC-
DC converter for fuel cell used in electric vehicle. International journal of hydrogen energy. 2017 Nov 30;
42(48):28852-64.
15. Lee S, Cherry J, Safoutin M, Neam A, McDonald J, Newman K. Modeling and Controls Development of 48
V Mild Hybrid Electric Vehicles. SAE Technical Paper; 2018 Apr 3.
16. Yang Y, El Baghdadi M, Lan Y, Benomar Y, Van Mierlo J, Hegazy O. Design methodology, modeling, and
comparative study of wireless power transfer systems for electric vehicles. Energies. 2018 Jul; 11(7):1716.
17. Li Y, Deng H, Xu X, Wang W. Modelling and testing of in-wheel motor drive intelligent electric vehicles
based on co-simulation with Carsim/Simulink. IET Intelligent Transport Systems. 2019 Jan 3; 13(1):115-23.

030006-10

You might also like