You are on page 1of 6

Modeling and Simulation of Electric Vehicles Using

Simulink and Simscape


Joshua Slough Morgan Belcher Tony Tsui
Electrical Engineering Technology Electrical Engineering Electrical Engineering Technology
Kennesaw State University Kennesaw State University Kennesaw State University
Marietta, GA Marietta, GA Marietta, GA
jslough@students.kennesaw.edu mbelch10@students.kennesaw.edu ttsui3@students.kennesaw.edu

Sylvia Bhattacharya, PhD


2021 IEEE 94th Vehicular Technology Conference (VTC2021-Fall) | 978-1-6654-1368-8/21/$31.00 ©2021 IEEE | DOI: 10.1109/VTC2021-FALL52928.2021.9625192

Assistant Professor
Electrical Engineering Technology
Kennesaw State University
Marietta, GA
sbhatta6@kennesaw.edu

Abstract—The vehicular industry is in a constant state of rameters along with the weight, drag, and other properties of
evolution driven by rapid advancements in technology. These the vehicle body [1]. Figure 1 shows the six main blocks of
advancements allow electric car manufacturers to introduce more the functional block diagram, which demonstrate the sequence
complex, higher performance, and comfortable models of electric
vehicles. Many buyers value powerful motors with the capability and specific functions used.
of outperforming equivalent gasoline powered vehicles. The di-
verse array of options to choose from when purchasing an electric
vehicle can be confusing to average consumers, with the various
cost and performance levels on the market. This paper presents
a tool for evaluating performance among electric vehicles with
different motors, body designs, and battery capacities. The focus
of this paper is on two electric vehicle models, the Tesla Type S
100D and the BMW i3, to determine the relative performance.
The Electric Vehicle Simulator is implemented using MATLAB’s
Simulink and Simscape tools, taking into account numerous Fig. 1. Functional Block Diagram
variables associated with the motor, gear box and vehicle body.
These testing components include drive cycle reference, motor
controller, DC motor and simulated vehicle body. Comparison of Using the specifications from real world vehicles, the sim-
the data derived from the simulation illustrates the differences ulation blocks are highly customizable to achieve accurate
of the two test vehicles to assist the consumer in choosing the results for most vehicles. Aerodynamic and mechanical vehicle
electric vehicle that best fits their needs. parameters must be imported, such as drag coefficient, tire
Index Terms—Electric Vehicles, Vehicle Simulation, Electric
vehicle simulation, Simulink slip and friction. Some vehicle information is proprietary,
so exact specifications could not always be obtained. By
comparing two separate vehicles and their largely different
I. I NTRODUCTION
properties, the simulator will analyze various points of interest
The Electric Vehicle Simulator described here provides a regarding each individual car’s performance. The physical and
detailed analysis of important vehicle parameters including electrical signals flowing in the Simulink file provide sinks
battery capacity, motor power, drive train and body weight. to inspect various locations of important data throughout the
The simulator file is divided into three main parts: the refer- electric vehicle. In this specific simulation, three main areas of
ence speed generator, the motor with its motor control, and the performance will be emphasized to evaluate each car. The ideal
subsystem of the physical body. The reference speed generator drive cycle reference velocity into the car’s components is the
consists of two main Simulink blocks and is responsible for first and most important area analyzed. By using Simulink
providing a manufactured reference speed for relative com- Scopes, data is produced demonstrating a comparison between
parisons. The second section consists of the motor and motor the approximate velocity of each test car after taking in the
controller which drives the motor speed and power based on control and vehicle body components [2]. This vehicle output
the interpreted output from a pulse-width modulation (PWM) speed will vary depending on the reference signal, motor
controller. The last section is responsible for simulating the parameters, gearbox, and vehicle body parameters. The second
vehicle’s gearbox and gearbox ratio, wheel configuration pa- area of interest also uses a scope to analyze acceleration

978-1-6654-1368-8/21/$31.00 ©2021 IEEE


Authorized licensed use limited to: Istanbul Universitesi-Cerrahpasa. Downloaded on March 03,2024 at 12:48:52 UTC from IEEE Xplore. Restrictions apply.
data that is being converted directly from the reference driver reference through two controlled voltage sources. This signal
source. This output data is a value between zero and one acts as multiple inputs for the PWM controller to output a
that assigns a specific value to the acceleration and braking PWM signal for the H-Bridge, thus controlling the motor’s
response of a driver [3]. The last area of interest compares functions. Control Subsystem Part I (Figure 3) represents the
the overall battery consumption throughout the drive cycle. Simulink code input to the PWM controller. The output signals
This data varies due to max battery capacity and the current to the right of the PWM controller are connected to the left
drawn from the DC motor. By using these scopes, a visual side reference lines of Figure 4.
representation of the individual performances will demonstrate
a detailed analysis of how the real-world properties of these
vehicles can strongly affect the overall performance.
This paper is unique in that it focuses on the analysis and
comparison of two EV models currently on the market as
opposed to providing a generalized review of the simulation
process [4], [5]. The Tesla Type S 100D and the BMW i3
were arbitrarily chosen for comparison.
II. BACKGROUND
Electric vehicle development is a huge investment for car
manufacturers. These manufacturers use an array of compli-
cated software algorithms to generate simulations that predict Fig. 3. Control Subsystem Part I.
how a vehicle design will perform in certain test environments.
Analyses of these simulations give greater insight into the Control Subsystem Part II (Figure 4) represents the flow of
design process and allow engineers to experiment with various signal from the PWM controller of Figure 3 into the PWM
parameters to achieve the desired results. Manufacturers are reference inputs of the H-Bridge. The H-Bridge is powered
able to estimate costs and improve the design cycle by by an external DC battery whose voltage and capacity are
observing simulation performance. determined by the individual car simulation. This H-Bridge
then controls the DC motor’s speed and polarity to match the
A. Simulink Code Analysis
input references as closely as possible. Lastly, a current sensor
This section describes the code and design process along is connected in series to the positive terminal of the battery. By
with specific descriptions on each block’s characteristics and measuring the rate of current of the battery and adding a gain
its main purpose. Figure 2 demonstrates the application of the in series, integrating with respect to time, then subtracting that
drive source and driver controller. In this section of Simulink value by 1, the overall battery capacity throughout the drive
code, a multiport switch is used to determine the input cycle can be viewed by adding a value to the overall output.
reference speed in kilometers per hour. With the reference
speed source chosen, it is connected to the Longitudinal Driver
Generator (LDG). The LDG is responsible for determining
the acceleration and braking from the reference speed source.
The LDG output is a variable value from zero to one which
is subsequently inputted to the Motor Controller Subsystem
(MCS).

Fig. 4. Control Subsystem Part II.

Figure 5 consists of the vehicle body subsystem. This


section is responsible for generating a physical representation
of a vehicle by simulating a gearbox, tire configuration, and
Fig. 2. Driver Generator Code
the vehicle body. The gearbox connects the driveline with
a user defined fixed ratio and outputs the angular velocity
The MCS section of code is the most complex. This as a function of this ratio. The tires are represented using
subsystem interprets the acceleration and braking signals of their corresponding Magic Formula Coefficients where rolling
the LDG and converts those source signals into an electrical radius and rolling resistances can be determined by the vehicle

Authorized licensed use limited to: Istanbul Universitesi-Cerrahpasa. Downloaded on March 03,2024 at 12:48:52 UTC from IEEE Xplore. Restrictions apply.
[6]. The vehicle body interprets the normal force due to the The user defined gear ratio in Table I is determined by the
tires in a two-axle configuration and simulating rotational simulated vehicle. The gearbox block used has no definable
movement depending on the drive train configuration. The dia- losses and can only override input and output parameters.
gram represents the wheels in a rear-wheel-drive configuration. The penultimate custom blocks are the four wheels, which
interpret the normal and rotational forces applied by the gear’s
output shaft. The main parameterization is generated by load-
dependent Magic Formula Coefficients which are purely em-
pirical methods based on a function to describe the tire force
and combined slip [7]. The tires also have separate rolling
radius, rolling resistances and other dynamic properties. The
Magic Tire Coefficient Formula was used for both simulations,
and coefficient derivation was done internally [8]. Lastly, the
physical body of the car is the most customizable block
involving many user defined parameters to simulate real world
vehicle motion. Some of these variables are vehicle mass,
frontal area, drag coefficient, air density, and axel distances
Fig. 5. Vehicle Body Subsystem.
to center of gravity [9], [10]. This simulation uses the vehicle
mass, frontal area and drag coefficient. The body specifically
B. Parameter Implementation moves in a longitudinal motion where road profile and incline
functions can be added to accurately simulate a particular
This section’s information emphasizes the chosen variables
environment.
and characteristics of our simulation’s customizability. Vehicle
By utilizing the customization of these Simulink blocks, the
Simulation Parameters (Table I) groups the various charac-
Simulation Scopes and Results provide additional information
teristics of each car and provides a reference for the block
on the properties and points of interest along with determining
parameters. To implement these custom parameters, we start
the accuracy of the simulation of the two electric vehicles. Not
with the motor control subsystem’s right side as shown in
all available custom parameters are used for each available
Figure 4. The DC battery is the first Simulink block that needs
Simulink block. Characteristics are prioritized by the largest
user input. The two most important characteristics from the car
impact on the simulation performance. Increasing the number
are the battery voltage and capacity. The battery voltage also
of variables will lead to an accurate simulation but may
determines the output voltage of the H-Bridge to the motor
take additional time to either find or derive resulting in AN
[6].
unnecessary use of resources which can significantly impact
the simulation time.
TABLE I
VEHICLE SIMULATION PARAMETERS
III. M ETHOD
System Parameter Tesla Model S 100D BMW i3
System Voltage 400 375
Three scopes of the Simulink code were implemented to
Rated Speed (rpm) 6000 4800 provide a visual representation of the important aspects of an
Rated Load (kW) 371.1 126.77 electric vehicle’s performance and characteristics. The three
Mass (kg) 2250 1501
Gear Ratio (Nf /NB ) 11.39 9.7
scopes display graphs which can be viewed and analyzed for
Frontal Area (m2 ) 2.20 2.38 the electric vehicle’s metrics. The first scope in the Reference
Drag Coefficient 0.24 0.29 versus Actual Velocity Scope and Acceleration Scope (Figure
Wheel Configuration All Wheel Rear Wheel
Battery Rating (Ah) 230 94
6) is the Velocity scope, which is located within the driver
Starting Price ($) 94,000 44,450 generated input section of the code. It provides the comparison
between the generated reference speed and the vehicle body’s
The second customizable block in the motor control sub- actual speed. The reference speed is the driver generated speed
system is the DC Motor which must have specified values for produced by the Drive Cycle Source and provides a baseline
field type, no-load speed, rated speed, rated power and DC for the comparison. The speed is the actual velocity that the
supply voltage. All these inputs, except the no-load speed, are modeled electric vehicle in the simulation experienced. As
easily found in the manufacturer’s vehicle specifications. De- expected, the vehicle’s speed will vary with the reference
termining the maximum output speed requires approximation speed depending on characteristics such as weight, motor
that depends on the particular motor. Values typically vary power, drag and wheel configuration.
from 5,000 to 10,000 rpm for DC motors. Control of the The second scope, Acceleration Scope, is also located within
DC motor is delegated by an H-Bridge and its positive and the driver generated input section of the code (Figure 6) and
negative terminals. The equivalent circuit parameters for the displays the vehicle’s acceleration and braking throughout the
motor consist of a voltage source, load resistor and electric simulation. This acceleration is based on feedback speeds
field inductor. Rotor inertia and damping are also customizable generated by the vehicle body and motor control subsystems
inputs and can vary for each simulation. along with the velocity determined by the reference speed. The

Authorized licensed use limited to: Istanbul Universitesi-Cerrahpasa. Downloaded on March 03,2024 at 12:48:52 UTC from IEEE Xplore. Restrictions apply.
Acceleration Scope represents the acceleration and braking of
a simulated driver as a value from one to zero. This value, like
the vehicle velocity, will depend heavily on the performance
losses incurred.

Fig. 8. Reference (blue) versus Actual (black) Velocity for Tesla Model S
100D

Fig. 6. Reference versus Actual Velocity Scope and Acceleration Scope

The third scope, Battery Capacity Scope (Figure 7), mea-


sures the battery’s charge level throughout the simulation. The
battery charge level is displayed as a percentage from zero to
one hundred and dependent on the rate of current used by the
motor and the total battery capacity of the individual vehicle.
The simulation evaluates three major performance standards
for the vehicles: reference versus actual velocity, generated
acceleration, and battery discharge. These three scopes are
Fig. 9. Reference (blue) versus Actual (black) Velocity for BMW i3
connected to signal lines throughout the Simulink code.

Fig. 7. Battery Capacity Scope

A. Reference versus Actual Vehicle Velocity Analysis


The simulation introduces two different velocities repre- Fig. 10. Acceleration and Braking versus Time for Tesla Model S 100D
sented by the reference velocity in blue and the predicted
vehicle velocity in black (Figures 8 and 9). The drive cycle
reference is the Artemis Motorway at 130 kilometers per
hour generates the data in these graphs. This drive cycle is
a standard for car performance and emissions testing lasting
1068 seconds. It is located within the Common Artemis Driv-
ing Cycles (CADC) and developed by the European Artemis
(Assessment and Reliability of Transport Emission Models and
Inventory Systems) [11].
B. Vehicle Acceleration Analysis
The second scope provides visual representations of the
Longitudinal Drive acceleration and braking for each vehicle
as it attempts to match the reference velocities (Figures 10
and 11). The line represents the acceleration for the individual
vehicle. Fig. 11. Acceleration and Braking versus Time for BMW i3

Authorized licensed use limited to: Istanbul Universitesi-Cerrahpasa. Downloaded on March 03,2024 at 12:48:52 UTC from IEEE Xplore. Restrictions apply.
C. Battery Capacity Analysis kW motor in most aspects regarding speed, despite a 749 kg
The final analysis demonstrates the amount of battery ca- difference in mass between the cars. Another benefit of its
pacity used over the 1068 second drive cycle below for the powerful motor is that it allowed the Model S to accurately
Tesla Model S (Figure 12) and the BMW i3 (Figure 13). The follow the reference speeds over 115 kmph, while the i3
battery capacity for each car starts at 100 percent at drive cycle could not. Other factors affecting the vehicle velocity is the
time 0 seconds and will discharge by providing power to the H- difference in gearbox ratios, and more importantly, the power
Bridge and motor as it attempts to match the reference speed of bandwidth of each motor. With a flatter and wider power band,
the drive cycle source. Regenerative braking restores some of the Model S can maintain close to optimal power output more
the battery’s dissipated energy throughout the drive cycle. The consistently than the i3. Lastly, a smaller change in the speed
battery dissipation and regenerative braking characteristics of comparisons is due to the overall drag of the vehicles and other
the graph will depend significantly on the specific drive profile losses, where the Model S has the advantage with a slightly
parameters used for the vehicle. smaller frontal area and drag coefficient.

B. Longitudinal Driver Acceleration Results


Differences in acceleration relate similarly to the parameters
that had the most significant effect on the overall velocity of
the vehicle. Due to the maximum power output of the i3’s
motor, driver acceleration could not increase past a certain
point occurring at high velocities in the drive cycle. The Model
S has a larger maximum velocity and can accelerate quicker
to the desired reference velocities, improving overall results.

C. Battery Capacity Results


Fig. 12. Battery Capacity versus Time for Tesla Model S 100D
With both batteries starting the drive cycle at full capacity,
the overall battery consumption was largely based on the vehi-
cle’s individual capacities. With a larger capacity rating of 230
Ah, the Tesla was able to sustain most of its charge regardless
of the extra fifteen volts powering the motor. Throughout the
simulation, the Tesla ended with approximately 94% charge,
with troughs no lower than 88%. The regenerative braking
had a larger impact on the Tesla’s capacity over time due
to its motor acting as a generator, increasing the capacity by
about 3% by the end of the drive cycle. The BMW was less
impacted by the regenerative braking and had a larger portion
of its 94 Ah battery drained. By the end of the cycle, the
remaining charge was approximately 87.5% for the i3, proving
Fig. 13. Battery Capacity versus Time for BMW i3 the beneficial impact of a large capacity battery on overall
drive range.

IV. R ESULTS D. Inaccuracies


The BMW i3 and the Tesla Model S each had their own
Known inaccuracies due to some exclusions with the
advantages and disadvantages. Due to the difference in vehicle
simulation are as follows:
body, battery, and motor metrics, a contrast in results will
emerge empirically throughout the comparison of the two
simulations. The velocities, acceleration, and battery capacity • Brake size and performance
simulations are co-dependent, and the results will be impacted • Gearbox losses and friction
by many of the individual vehicle parameters. • Tire grip, diameter, and width
• Overall aerodynamics
A. Reference versus Actual Vehicle Velocity Results • H-Bridge and DC motor losses
By referencing Figures 8 and 9 of the Reference versus • Specifics for lithium-ion power cells
Actual Velocity Scope results, visual differences appear be- • DC motor no-load speeds
tween the Model S 100D and the BMW i3. With the different • Rear and front axle distances to center of gravity
simulation parameters, shown in Table I, the Tesla’s rated • Regenerative braking characteristics
motor load of 371.5 kW outperforms the BMW i3’s 126.77 • Real world roads.

Authorized licensed use limited to: Istanbul Universitesi-Cerrahpasa. Downloaded on March 03,2024 at 12:48:52 UTC from IEEE Xplore. Restrictions apply.
V. C ONCLUSION [7] D. Noland, “2014 bmw i3: What a tesla driver thinks
of new electric bmw,” green car reports,” Available at:
MATLAB’s Simulink generated a useful comparative anal- https://blogs.mathworks.com/racing-lounge/2018/02/28/vehicle-
modeling-simscape-language/ (2014/07/19).
ysis by implementing the characteristics of individual electric [8] MathWorks, “Tire-road interaction (magic formula),” Available at :
vehicles into code. Using a predefined velocity profile as a https://www.mathworks.com/help/physmod/sdl/ref/tireroadinteractionmagicformula.html
reference and carefully approximating the system’s response (2020).
[9] CarFolio, “2013 bmw i3 i01 specifications — technical data ...,,”
can accurately predict data to demonstrate and quantify elec- Available at: https://www.carfolio.com/bmw-i3-342958 (2020/02/02).
tric vehicle operation in a real-world environment. By using [10] L. D. Roper, “Tesla model s,” Available at :
separate subsystems to emulate the physical and electrical http://www.roperld.com/science/teslamodels.htm (2019-01-28).
[11] TransportPolicy, “Eu: Light-duty: Artemis,” Available at:
components of a modern electric vehicle and adding sinks https://www.transportpolicy.net/standard/eu-light-duty-artemis/ (2018).
at key points throughout the simulation, performance compar-
isons can be made between any electric vehicles that have
numerically available motor, electrical, and body parameters.
Important factors, such as system voltage, motor design,
and physical vehicle composition, played the most significant
role in determining vehicle performance. Due to its powerful
motor and body design, the Model S outperformed the i3 in
almost all aspects. The Model S responded faster to the drive
cycle generator’s reference velocity and demonstrated that all
vehicle characteristics are important and should complement
each other for a balanced design. Enhancement of simulation
accuracy includes introduction of losses throughout the vehicle
components and by inserting more complex block libraries that
have a larger array of functionality.
Electric vehicles will eventually dominate the vehicular mar-
ketplace, which will result in improved designs and lower
costs. Simulated analysis of the relative velocities, accelera-
tion, and battery capacity through analytical representations
provide further insight for the consumer into the engineering
process and performance results. The method of comparison
presented in this paper provides a relatively easy and efficient
manner in which consumers can evaluate electric vehicles
for their individual needs. MATLAB is a widely available
tool that allows detailed customization of simulations which
would apply to most scenarios of importance to consumers.
Manufacturers must separate themselves in the market by
providing distinct, lightweight, efficient, and powerful designs
along with the development of unique body type models that
coincide with the consumer’s wants and expectations.

R EFERENCES

[1] MathWorks, “Explore the electric vehicle reference application,”


Available at : https://www.mathworks.com/help/autoblks/ug/explore-the-
electric-vehicle-reference-application.html (2020).
[2] ——, “Common scope block tasks,” Available at :
https://www.mathworks.com/help/simulink/ug/scope-block-tasks.html
(2020).
[3] ——, “Longitudinal driver,” Available at :
https://www.mathworks.com/help/vdynblks/ref/longitudinaldriver.html
(2020).
[4] A. A. Abulifa, R. K. R. Ahmad, A. C. Soh, M. A. M. Radzi, and M. K.
Hassan, “Modelling and simulation of battery electric vehicle by using
matlab-simulink,” in 2017 IEEE 15th Student Conference on Research
and Development (SCOReD), 2017, pp. 383–387.
[5] S. K. Vempalli, J. Ramprabhakar, S. Shankar, and G. Prabhakar, “Electric
vehicle designing, modelling and simulation,” in 2018 4th International
Conference for Convergence in Technology (I2CT), 2018, pp. 1–6.
[6] H. B. Pacejka, “Magic tire formula,” Tire and vehicle dynamics, pp.
172–176, 2006.

Authorized licensed use limited to: Istanbul Universitesi-Cerrahpasa. Downloaded on March 03,2024 at 12:48:52 UTC from IEEE Xplore. Restrictions apply.

You might also like