Final Project: Design of an Electric Vehicle
ANSWER
Electric vehicle (EV) is defined as a vehicle that uses an electric motor or a traction motor for propulsion unlike an internal combustion (IC) engine used by conventional vehicles. Electric vehicles use electric power instead of fuels as conventional vehicles would and because of this difference, electric vehicles do not produce any exhaust gases or pollution(Zero emission). The power needed for the operation of an EV can come from a variety of sources such as batteries, generators, or through a collector system.
MATLAB model of electric car which uses lithium ion battery and induction motor. Choose suitable blocks from Powertrain block set :
To Model and Simulate an electric vehicle with SIMULINK.
Let us consider a model in this report, an electric vehicle with an Induction motor and battery system using the SIMULINK . In modelling this EV for a drive cycle and to check performance parameters : to measure speed, SOC , and the current characteristics of its battery system etc
Components
The main components of modelling an EV are:
- Vehicle body
- Motor & motor controllers
- Power converters
- Batteries
- Drive cycle
BLOCK DIAGRAM:
System level configurations :

VEHICLE BODY :
Vehicle Body Subsystem :
The vehicle is assumed to be a front axle driven (4 wheels - 2 on each axle).
The wheels are modelled using simple Tire (Magic formula) simulink blocks.
TIRE:
- used to model a tire with longitudinal behavior given by an equation based on four fitting coefficients.
- The block can model tire dynamics under constant or variable contact surface conditions.
-
Input Port:
- N - Normal force acting on tire, positive when force is acting downwards/towards the contact surface,
Output Port:
- S - Slip value relative to tire and surface of contact.
Conserving Ports:
- H - represents wheel hub which transmits thrust generated by the wheel to the body of the vehicle.
- A - represents the axle on which the tires are mounted.
TIRE Parameter:
-
- The tires are parameterized by Peak longitudinal force and corresponding slip.
- The other block parameters such as - rated vertical load, peak longitudinal force at rated load and slip at peak force at rated load - are kept with their default values.
- The tire radius is given as 0.3 m.
- The tire inertia is kept as 1 kg-m^2. Also, the rolling resistance is given with a constant coefficient of 0.015.
Vehicle Body:
- This 2 axle (4 wheel) assembly is now connected to a Velocity Body simscape block.
- This block basically represents a two-axle vehicle body in longitudinal motion.
-
Input Ports:
- W - Wind Velocity in m/s
- beta - Grade angle in radians
Output Ports:
- V - Velocity in m/s
- NR - Normal force on Rear Axle (N)
- NF - Normal Force on Front Axle (N)
- The block accounts for -
body mass,
aerodynamic drag,
road incline,
weight distribution between axles due to acceleration
road profile.
- The gross weight is given to be 1200 kg.
- The geometric parameters of the vehicle are given as -
- To account for proper drag force on the vehicle, the related parameters are kept as -
- The pitch dynamics for the vehicle are not considered for this simulation.
- The input for this subsystem is taken as the Rotational speed of the motor. This input is fed to the front axle through a Simple Gear representing the Final Drive Ratio of 3.73
Here, the rotational direction of the output shaft is kept the same as that of the input shaft. Also, no meshing losses are considered for the simulation.
Gear:
- A simple gear block is used to connect the motor to the rear axle of the vehicle.
- It represents the gearbox which connects the input shaft to the base gear and output from the follower gear.
Conserving Ports:
- B - port associated with input shaft (motor shaft)
- F - port associated with output shaft (axle / differential)
MOTOR & POWER CONVERTER PIC:- This subsystem mainly consists of a DC motor,H Bridge and PWM voltage.
- The motor & its control block is as shown below:
- MOTOR & POWER CONVERTER PIC:
DC Motor:
This is the DC Motor which would give the rotational power to the wheels and become the sole power generation source.
The DC Motors terminals are connected as mentioned below,
+ = Electrical signal to the motor Positive Terminal
- = Electrical signal to the motor Negative Terminal
R = Casing of the Motor connected with the Mechanical Rotational Reference Block
C = Rotor Case connected to the Mechanical Rotational reference
DC Motor Parameter:
H-Bridge circuit -
- This block represents an H-bridge motor drive. The block can be driven by the Controlled PWM Voltage block in PWM or Averaged mode.
- In PWM mode, the motor is powered if the PWM port voltage is above the enabled threshold voltage.
- In Averaged mode, the PWM port voltage divided by the PWM signal amplitude parameter defines the ratio of the on-time to the PWM period.
- Connection REF is for the reference input. This combined with the PWM connected will form the pulse input for the H-Bridge.
Here, the REF input is connected to the Electrical Reference (ground). - Connection REV corresponds to the reverse motion of the motor which essentially means, the backward motion of the vehicle.
Here, the backward motion of the vehicle is not accounted for and so, the port is connected to the electrical reference. - Connection BRK is for the braking of the vehicle.
- Since, the PWM mode results in a huge amount of simulation time, Averaged mode is selected for this simulation.
- Load current characteristics are considered to be smoothed here.
- Also, regenerative braking is enabled for the simulation. This means, when the vehicle starts decelerating, the corresponding amount of charge will be fed back to the battery.
Accordingly, the BRK input is connected to a Controlled Voltage Source. This will generate emf corresponding to the intensity of brakes applied and feed the power back to the battery.
H Bridge parameter: - The Input Threshold parameters are left with their default values.
- The Output Voltage Amplitude of the H-Bridge circuit is given the same value as the rated DC supply voltage of the DC motor.
Controlled PWM Voltage
The Controlled PWM Voltage Block helps in keeping the Modulated Pulses as per the required pulses. So that the operations happens smooth and higher variations are not observed.
The Ports are connected as follows,
ref+ = Reference Positive connected with the Acceleration Commands from the Driver Model
ref- = Reference Negative connected with the Deceleration Commands from the Driver Model
PWM = PWM connected directly to the H-Block
REF = REF connected directly to the H-Block
Note :The parameters are set as default.
Controlled PWM Voltage parameter:
- A Solver Configuration is added to ensure proper solving of the mathematical equations by the model.
- Scopes are connected to analyze different outputs such as the SOC of the battery, the reference velocity & the actual velocity of the vehicle and the distance covered by the vehicle during the total run.
- The 2 velocities are first converted from m/s to kmph values. For this, simple Gain blocks are used.
- The distance is calculated by simply time-integration of the vehicle velocity.
Longitudinal Driver :
- Longitudinal Driver is an inbuilt block provided by the powertrain blockset.
- It is a parametric longitudinal speed tracking controller for generating normalized Acceleration and Br
aking commands based on reference and feedback velocities. - The VelRef port is the reference velocity port where the input drive cycle data is fed.
The VelFdbk port corresponds to the feedback velocity. The actual velocity output given by the vehicle body is connected here. By comparing the actual (feedback) velocity with the reference velocity, the driver block generates acceleration and braking signals in order to minimise the error between the two concerned velocities.
Grade corresponds to the grade angle. For this simulation, no inclination is considered and hence, a constant block with value 0 is connected.
Info gives the output for the bus signal for different block calculations like difference in reference vehicle speed and vehicle speed, etc.
AccelCmd & DecelCmd correspond to the acceleration and deceleration commands generated respectively and are connected to the corresponding ports of the Controlled PWM Voltage block. - Here, the selected control type is PI. Acordingly, the block implements proportional-integral (PI) control with tracking windup and feed-forward gains.
Reference Velocity (Drive Cycle) :
- The Drive Cycle Source block is used to provide the reference speed for the simulation.
- It generates a standard or user-specified longitudinal drive cycle.
- Here, the selected drive cycle is the standard FTP75.
- The plot of the drive cycle is shown below -
BATTERY SYSTEM:
-
The battery is connected as the power source to the model so that the power could be generated and the same power is transmitted accordingly to all the operating sources.
The terminals connected are to,
+ = The positive terminal of the operating sources
- = The negative terminal of the operating sources.
-
Battery parameter:
To ensure the battery supplies current as per the requirements of the motor controller and not the rated current, a Current Sensor & Controlled Current Source pair is connected.
RESULT:
(1) Ref. Speed v/s Actual vehicle speed :

As we can seen from the above picture, the actual velocity of the vehicle (blue) almost same as to the reference drive cycle. velocity.
Distance covered:

- It may be noted that, since, the reference velocity of the drive cycle never becomes negative (i.e. there is no backward motion of the vehicle), the distance is increasing throughout.
- The total distance covered by the vehicle is about 5.53 km.
Battery State of Charge :

- The State-of-Charge of the battery at the end of simulation run is nearly about 0.1 .
- This means that the battery is not completely drained at the end and the vehicle can run on the same drive cycle for a few more times before the battery SOC becomes 0.
- Also, the thing to be noted here is, since we had enabled the regenerative braking for the simulation, the battery SOC increases slightly whenever the vehicle undergoes heavy deceleration.
- Again, this depends upon the generating tendency of the motor and the maximum amount of current that the battery can take.
CONCLUSION :
The model was succesfully ran for simulation under the standard FTP75 drive cycle. The results have been properly analyzed.
Also, learnt quite a lot of interesting things like -
- How to model an EV and carry out a real time simulation
- How a motor controller works and what role it plays in the control of the electric motor
- How to calculate the SOC of the battery
- different powertrain blocks provided by simulink which can be used to simulate a vehicle model.