Final Project: Design of an Electric Vehicle
- Block Diagram Of EV Model - :

- In the designed EV model, the main blocks are drive cycle, controller, DC motor, Vehicle body and Battery. Drive cycle is the driving pattern
for which this model is going to be tested or evaluated. The main objective here is to obtain the speed attained by the driver, the SOC (state
of charge), distance travelled by the vehicle.
- The main Simulink model of the EV is as shown below - :

- Let us now discuss the various blocks in detail.
- VEHICLE - :
1. Vehicle Body Block - :
- In this model we have to first add the vehicle body block as shown below - :

- This block contains 6 ports which can be used to model the various aspects of the vehicle body. The ports are mentioned and elaborated
below - :
H- This stands for ‘Hub’ and is used to connect the hubs of the wheels to the main body of the vehicle.
V - This is a physical signal output port which stands for ‘Velocity’ and is used to output the speed/velocity at which the vehicle is moving at.
W- This is a physical signal input port and allows us to model a ‘headwind' acting on the vehicle by giving a speed for it.
NR - This is a physical signal output port to model the rear wheel normal forces.
NF - This is a physical signal output to model the front wheel normal forces.
beta - This is a physical signal input port and allows us to model the vehicle on an inclination angle to create the effect of a hill climbing force.
- Now we need to define the vehicle body parameters as shown below - :


2. Tyres - :
- The tyres used in this EV model are 'magical formula' tyres. There are several tyre blocks that can be used for EV modelling but I have used
the magical formula ones because it allows us to model the longitudinal behavior of tyres on highways. They also allow us to take into
consideration extra effects such as tyre inertia, stiffness, etc which helps in better accuracy of real world conditions.

- In the above image we can see that it has 4 ports and they are - :
N-This port stands for ‘Normal’ and is the physical signal input port for the normal force acting on the tire and is considered positive in the
downwards direction.
S-This port stands for ‘Slip’ and is the physical signal output port is that reports the slip acting on the tire.
A- This port stands for ‘Axle’ and is the mechanical rotational conserving port for the wheel axle.
H- This port stands for ‘Hub’ and is the mechanical translational conserving port for the wheel hub through which the thrust developed by the
tires is applied to the vehicle body.
- Now onto the Tyre Parameters, I have considered the following values - :

3. Gear - :
- Here I have chosen 'Simple Gear' block as to simplify the transmission system parameters. This block models a gear system with a fixed
gear ratio and with no inertia effects, however we can modify the effects of meshing of gear teeth.Connections B (base) and F (follower) are
mechanical rotational conserving ports. Specify the relation between base and follower rotation directions with the Output shaft rotates
parameter. Optionally include thermal effects and expose thermal conserving port H by setting Friction model to a temperature-dependent
setting.The simple gear block is as shown below - :

- Now onto the Simple Gear Parameters, I have considered the following values - :

4.Inertia block - :
- An inertia block has been added to the workspace to provide an ideal mechanical rotational inertia for the simple gear block. This block has
only one mechanical rotational conserving port and the positive direction of the block is from the port to the reference point which would be
the simple gear in this case. The inertia torque acts in the positive direction is the inertia is accelerated in the positive direction. The inertia
block is shown below:

- The inertia block parameters were set as below - :

5. Wind and Slope - :
- Both wind & slope are considered as constant blocks and the parameters are as follows - :


6. Velocity Subsystem - :
- The velocity port which outputs the velocity signal of the vehicle body block has been modified. By default, the velocity signal that is output
from the vehicle body block is measured in miles per hour. To change these units, | have implemented a small subsystem from the output of
the velocity port. This subsystem uses the following blocks:
PS- Simulink converter - this block will convert the physical signal of velocity to a logic signal.
Gain - This block uses a multiplication factor of 3.6 to convert the miles per hour units to kilometres per hour.
Zero - Order Hold - This block is used implement a zero order hold sample period.
- The subsystem is as follows - :

7. Differential Block - :
- Represents a differential which is arranged as a planetary bevel gear train equipped with an additional bevel gear transmission between the
driveshaft and the carrier. The pinion gear of this transmission is attached to the driveshaft while the large bevel crown gear is affixed to the
carrier. Compliance is not modeled in this block. Optionally include inertia and losses from gear meshing and viscous bearing friction.
- Connections D, S1, and S2 are mechanical rotational conserving ports associated with the driveshaft and the two output shafts, respectively.
S1 and S2 are the shafts belonging to the two sun gears. When there is no relative slippage across the differential, ports S1 and S2 both
rotate in the positive direction when port D rotates in a positive direction if the crown gear is located to the right of centerline. Optionally
include thermal effects and expose thermal conserving port H by setting Friction model to a temperature-dependent setting.

- The following image represents the Vehicle Body Block modelled in SIMULINK.

- As seen in the diagram above, the various blocks are connected to model the vehicle body. 4 magic formula tire blocks are used as the
vehicle will have 4 tires, 2 on each axle. The tires are LR, LF, RR and RF (left rear, left front, right rear, and right front). The normal ports of
each tire are connected to the appropriate NR and NF ports on the vehicle body block. The hubs of each tire are connected together and an
extra connection is made from them to the vehicle body block. The wind velocity and road incline are provided with constant physical signals
of 0 m/s and 0 degrees respectively. The velocity port has been connected to the velocity subsystem and the connection from the subsystem
is open to the 'v' port. The base port of the simple gear has been left open to the 'Gear’ port to take in a rotational signal.
- Power controller Subsystem - :
1. DC Motor - :
- For the EV model, I have chosen a DC Motor block as the motor. Below is the model of DC Motor - :

- As we can see, there are 2 sides to the block: the mechanical side on the right and the electrical side on the left. The mechanical side has 2
ports, C and R. The C refers to the casing and the R for the rotation of the rotor which produces a torque. The electrical side has a positive
and a negative terminal for the voltages to be applied. If a positive voltage is applied to the DC motor block from the positive to the negative
terminal, a positive torque will act from the C port to the R port. The direction of the torque produced by the DC motor can be changed by
changing the sign of the back emf or the torque constant. The C port of the mechanical side needs to be connected to a mechanical rotational
reference because it will be stationary. The R port will be connected to the open connection of the simple gear from the vehicle body block.
The positive terminal on the electrical side is connected to the positive terminal of a power converter which in my case will be an ‘H bridge'.
- The mechanical rotational reference block is shown below - :

- The DC Motor parameters which I have considered are as follows - :

- POWER CONVERTER - :
- The power converter is needed to provide power of the correct form and magnitude from one component to another. In the case of EVs, a
power converter is needed to provide a DC voltage from the battery of the EV to the DC motor so that it can operate properly with the
required parameters. As mentioned earlier, I have used an H-Bridge motor drive as my power converter. Its block is shown below - :
2. H - Bridge - :

- The H Bridge has 2 sides to it: the left side is for the controlling of the voltage signals and the right side is for the terminals to provide the
controlled voltage to the DC motor. The left side ports of the H-Bridge block are:
PWM - This stands for Pulse Width Modulation which will provide the voltage pulses to the H-Bridge either in the PWM or average mode.
REF - This stands for Reference.
REV - This stands for Reverse.
BRK - This stands for Brake.
- The parameters for H-bridge block I considered are as follows - :

3. CONTROLLED PWM VOLTAGE BLOCK - :
- This block is used to provide a controlled pulse width modulated voltage to the H-bridge block.

- This block creates a Pulse-Width Modulated (PWM) voltage across the PWM and REF ports. The output voltage is zero when the pulse is low,
and is equal to the Output voltage amplitude parameter when high. Duty cycle is set by the input value.At time zero, the pulse is initialized as
high unless the duty cycle is set to zero or the Pulse delay time is greater than zero.The Simulation mode can be set to PWM or Averaged. In
PWM mode, the output is a PWM signal. In Averaged mode, the output is constant with value equal to the averaged PWM signal.
- The parameters for this block were set as below - :

4.CONTROLLED VOLTAGE SOURCE - :
- The input ports of the controlled PWM voltage block are still unconnected and that is because they require a controlled voltage source to
provide the voltages to produce the voltage pulses to be fed in to the H-Bridge. For this, I have used the controlled voltage source block. This
block is useful because it will provide the necessary voltage that is powerful enough to maintain the voltage at the output regardless of the
current that passes through it.
- This controlled voltage source block is shown below - :

5. ELECTRICAL REFERENCE - :
- This block is used to create grounding effect for the electrical circuit. An electrical reference block is as shown below - :

6. SOLVER CONFIGURATION - :
- This block is used to solve necessary equations in any model.

7. CURRENT SENSOR - :

- The block represents an ideal current sensor, that is, a device that converts current measured in any electrical branch into a physical signal
proportional to the current.
- Connections + and - are conserving electrical ports through which the sensor is inserted into the circuit. Connection I is a physical signal
port that outputs current value.
- The following image represents the Power Converter Block modelled in SIMULINK - :

- Battery Subsystem - :
- This subsystem included a Battery of lithium-on, a controlled current source, Demux. The port1 is connected to the current sensor in the
subsystem Power controller.
1.Battery Block - :
- An battery block is as shown below - :

- Using this battery block, the state of charge (SOC) , current and voltage across the battery can also be calculated.
- The parameters for this block were set as below - :

2. CONTROLLED CURRENT SOURCE - :
- The controlled current source block is a part of the battery system used in the EV model. Similar to the controlled voltage source, this block
will represent an ideal current source that is powerful enough to maintain the specified current regardless of the voltage across it.
- The controlled current source block is shown below - :

3. CURRENT SENSOR - :
- The current sensor block represents an ideal current sensor and is used to convert the current measured in an electrical circuit to a physical
signal that is proportional to the current. This block is used to measure the current between the battery circuit (controlled current source)
and the DC motor. The current sensor block is shown below:

- The battery system and current and SOC scope are modelled as following blocks - :

- Longitudinal Driver - :
- Longitudinal driver block takes the responsibility of calculating acceleration by taking two inputs one from the drive cycle velocity input and
the other one from vehicle traction velocity at each one second of time interval and is repeatedly provides the input to the voltage source till
the end of the drive cycle.


- All the default data provided in the driver block is considered as input to the simulation. If needed the data can be varied and observe by
the simulation of the vehicle.
- Drive cycle source - :

- The range of electric vehicles is the major problem faced by the automobile industry because storing electrical energy efficiently is a very
tough task for engineers. This is a critical issue in the design of any electrical vehicle. For that what we can do is test the vehicle by driving
in reality or in simulation through a profile of ever-changing speeds. These test drive cycles have been developed to provide a realistic and
practical test for the emissions of vehicles. Now for this model, the FTP75 drive cycle is chosen and with this cycle input reference, simulation
of the model is done. With this simulation, the distance traveled by the vehicle at the end of this cycle is calculated using MATLAB software.
In this drive cycle, the condition or the velocity of the propelling vehicle is noted at each second. The important data that needs to maintain
as a record is the amount of charge removed from the battery, the depth of discharge of the battery, and the distance traveled. By taking
these velocities as input and is fed to the longitudinal driver block. It calculates acceleration and thus the tractive effort, and thus the motor
power, torque, and speed. Using this data motor efficiency can be found and also the electrical power going into the motor. This calculation is
repeated every one second till the end of the cycle.
- The parameters for this block were set as below - :

- The following blocks are used to calculate the speed and the distance travelled by the vehicle - :

- So at the end of the FTP75 drive cycle, the total distance traveled by the vehicle is 1.591 Km
- RESULTS - :
- The model was run for 500 seconds and below are the results - :
1. SPEED SCOPE - :

2. SOC: At the end of drive cycle (i.e after 500 seconds) the SOC is around 99.99 %.

3. CURRENT - :

4. VOLTAGE - :

- CONCLUSION - :
- In conclusion, the EV model has been created with the necessary block components using the SIMULINK software and the model has been
simulated for a customized FTP75 drive cycle. The simulation has produced results of the velocity of the vehicle, current and voltage flowing
from the battery, and the SOC of the battery as well as the distance travelled by the EV. Since the EV model was parameterized to simulate
averaged voltage pulses in the H-Bridge and Controlled PWM voltage blocks to be fed in to the DC motor, the simulation finished very quickly
within a matter of seconds. The EV model was able to follow the commands given by the reference velocities from the drive cycle
data,although it could have followed the reference signals more closely.