Final Project: Design of an Electric Vehicle
AIM:
- Create a MATLAB model of electric car which uses a battery and a DC motor. Choose suitable blocks from Powertrain block set. Prepare a report about your model including following:
Objectives:
- System level configurations
- Model parameters
- Results
- Conclusion
- Create a MATLAB model of electric car which uses a battery and a DC motor. Choose suitable blocks from Powertrain block set. Prepare a report about your model including following:
Objectives:
- System level configurations
- Model parameters
- Results
- Conclusion
ELECTRIC VEHICLE
In today’s world electric vehicles are increasingly becoming a part of modern life. Its eco-friendliness and smooth driving have attracted many conscious modern consumers. Electric vehicles are quite different as compared to traditional vehicles with internal combustion engines. Electric vehicles operate with an electric motor instead of an internal combustion engine that generates power by burning a mixture of fuel and gases. The running costs of Electric vehicles are low as it has fewer moving parts for maintenance. In order to create awareness of the issue of global warming and to safeguard the environment electric vehicles are seen as a possible replacement for current generation of automobile industry.
The main components of an electric vehicle are:
- Battery (auxiliary)
- Electric traction motor
- Onboard charger
- Thermal system (cooling)
- Power electronics controller
- DC/DC converter
- Charge port
- Transmission (electric)
- Traction battery pack

- BATTERY (AUXILIARY)
The auxiliary battery of the electric vehicle provides electricity to power the accessories of the vehicle.
- ELECTRIC TRACTION MOTOR
Power is taken from the traction battery pack and with this the motor drives the wheels of the vehicle. Some vehicles use motors which serve as drive as well as regeneration.
- ONBOARD CHARGER
AC electricity supplied via the charge port is converted to DC power for charging the traction battery. It also communicates with the charging equipment and monitors battery characteristics such as voltage, current, temperature and state of charge while charging the pack.
- THERMAL SYSTEM (COOLING)
The thermal system for cooling makes sure that proper operating temperature range of the engine, power electronics, electric motor and other components are maintained
- POWER ELECTRONICS CONTROLLER
The flow of electricity which is delivered by the traction battery to the electric motor is controlled and the required speed and torque is produced.
- DC/DC CONVERTER
The high voltage of the traction battery is stepped down to a low voltage DC power to run the vehicle accessories and recharge the auxiliary battery.
- CHARGE PORT
The charge port is an external power supply from which the traction battery in the electric vehicle is charged.
- TRANSMISSION (ELECTRIC)
The transmission converts electric power to mechanical power in order to drive the wheels of the vehicle
- TRACTION BATTERY PACK
The traction battery pack stores electricity for use by the electric traction motor.
BLOCK DIAGRAM

VEHICLE BODY SUBSYSTEM

The following blocks that were used for the creation of the model are:
- Tire (magic formula)
- Vehicle body
- Simple gear
- TIRE (MAGIC FORMULA)

The magic tire block models a tire with longitudinal behaviour which is given by a magic formula an empirical equation based on four fitting coefficients. Under constant or variable pavement conditions this block can model tire dynamics. The longitudinal direction of the tire is same as the direction of motion as it rolls on the pavement.
Connection A is referred to the mechanical rotational conserving port for the wheel axle. Connection H is the mechanical translational conserving port for the wheel hub through which the thrust is developed by the tire which is applied to the wheel. Connection N is a physical signal input port that applies the normal force acting on the tire. If it is acting downwards the force is considered positive. Connection S is a physical signal output port reveals the tire slip.





- VEHICLE BODY

This vehicle body block is a representation of a two – axle vehicle body in longitudinal motion. The vehicle can have the same or different number of wheels on each axle. The vehicle can have a centre of gravity that is at or below the plane of travel. This block accounts for body mass, aerodynamic drag, road incline and weight distribution between axles due to acceleration and road profile which optionally includes pitch and suspension dynamics. The vehicle does not move vertically relative to the ground.
Connection H is the mechanical translational conserving port which is associated with the horizontal motion of the vehicle body. The traction motion developed by the tires should be connected to this port.
Connections V, NF and NR are physical signal output ports that represents vehicle velocity and front and rear normal wheel forces. These wheel forces are considered positive if acting downward. Connections W and beta are physical signal ports that signify headwind speed and road inclination angle respectively.




- SIMPLE GEAR

The simple gear box represents the gearbox that constrains the connected driveline axes of the base gear B and the follower gear F to corotate with a fixed ratio that is specified. Connections B which is the base and F the follower are mechanical rotational conserving ports.



EXPLANATION OF VEHICLE BODY SUBSYSTEM
- Transmission is an important aspect of the vehicle which is used to supply the propulsion power from the motor and then the wheels.
- For the creation of the above subsystem the following blocks that were used were Tire (Magic formula) block, simple gear block and vehicle body so as to create the base for the model.
- Firstly, the wheels of the vehicle are modelled by using the Tire block. Four tire blocks ae created for the vehicle and named them as front and rear wheels.
- For the tire block there are various parameters which can be edited according to the requirement. During the simulation default parameters of the tire block were used.
- Then all the ports of each tire block are connected with each other. Port A represents axle so the rear wheels A ports are connected with each other which signifies that they are on the same axle. Similarly, the front wheels are also connected to the same axle.
- Then the H port represents the hub and all the H ports are connected to each other.
- The N and S port represents the normal force and slip of the tire respectively. So, the normal force on the rear wheels is the same, so the N port of both rear wheels is connected with each other and similarly for the front wheels normal force. The port S represents the slip occurring in the wheel. The port can be connected or can be ignored. In the above model it is connected to a PS Terminator block which terminates the physical signal outputs.
- Then a vehicle body diagram is used which represents the vehicle dynamics where there are various parameters which can be changed according to the requirement.
- The NR and NF port in the vehicle body represents the normal force on rear and front tires respectively. So, the N port of the front and rear tires are connected with NR and NF ports accordingly.
- The H port in the vehicle body is associated with the horizontal motion of the body and is connected to the H port of all the tires.
- The W and BETA port represents the wind speed and road inclination angle which can be entered as an input. In the above model the W and the BETA port are connected to a PS constant block since we have assumed both to be zero.
- The port V in the vehicle body represents the velocity output from the vehicle. So, this is connected to the output port. Since the power from the motor has to be transmitted to the wheels a transmission block is used which is a SIMPLE GEAR BLOCK. This block is connected to the rear wheel axle since the model is considered as a rear wheel drive.
- Finally, the subsystem is modelled where the input of the system is the power given to the simple gear box and output is the velocity of the vehicle.
STATE OF CHARGE
State of charge is defined as the measurement of available charge in the battery. When the battery is fully charged, it is considered to have 100% and when it is 0% it is said to be discharged. After the simulation is run, we get an estimate of the current and S.O.C of the battery with respect to time as there are two scopes connected one to the current sensor and other to the subsystem of S.O.C estimate. In order for the current to be measured a PS Simulink converter block is used because the current signal is physical.
STATE OF CHARGE SUBSYSTEM

The following blocks that were used for the creation of the subsystem are:
- Integrator
- Gain
- INTEGRATOR

Integrator block outputs the value of integral of its input with respect to time

- GAIN

The gain block multiplies the input by a constant value (gain). Each the input and the gain can be a scalar vector. The value of gain is specified in the gain parameter.

EXPLANATION OF THE SOC SUBSYSTEM
- To measure the state of charge of the battery, a subsystem was created with various blocks such as Integrator block, gain block and sum block.
- Integrator block outputs the value of integral of its input with respect to time and then it is connected to the Gain block.
- Gain block divides the current signal with the ampere rating of the battery which is taken as 80AH multiplied by 3600 seconds in an hour.
- Constant block is used to represent the initial state of charge of the battery. when performing the simulation and assuming the battery charge is full the constant block can be altered with the value representing 100% charge.
- Sum block is used to perform addition and subtraction operations.
- The signal from the gain block will be subtracted from the constant block representing 100% charge.
- Finally, the three blocks are made into a subsystem which is the state of charge estimate and it is linked with the battery circuit using PS – Simulink converter. Two scopes are connected one at the junction of the PS Simulink converter (To plot the output signal of the current from the battery) and other at the SOC subsystem (to get an estimate of the battery charge after the simulation is run).
SIMULINK MODEL OF THE MOTOR CONTROLLER

The following blocks that were used for modelling of the motor controller are:
- Mechanical rotational reference
- H- bridge
- Controlled PWM voltage
- Electrical reference
- Controlled voltage source
- PS Simulink converter
- Current sensor
- Scope
- Solver configuration
- Voltage sensor
- MECHANICAL ROTATIONAL REFEERNCE

The mechanical rotational reference block represents a reference point or frame for all mechanical ports.
- H-BRIDGE

H- bridge block output is a controlled voltage that depends on the input signal at the PWM port. The H- bridge is connected to Pulse Width Modulation for controlling of the voltage signals and the output of the H bridge is connected to the terminals to provide the controlled voltage to the D.C motor.
The ports in H- BRIDGE are:
- PWM – this stand for pulse width modulation which provides the voltage pulses to H- bridge either in PWM or average mode.
- REF – is the floating zero-volt reference.
- REV - Voltage that controls when to reverse the polarity of the H- bridge block output.
- BRK – Voltage that controls when to short circuit the H-bridge block output.



- CONTROLLED PWM VOLTAGE

The Controlled PWM voltage block represents a pulse width modulated (PWM) voltage source. This block has two modelling variants by right clicking on the block and then selecting simscape and then block choices which are electrical input ports and PS input
- Electrical input ports
- PS input
- ELECTRICAL INPUT PORTS
This block calculates the duty cycle which is based on the reference voltage across ref+ and ref- ports. This modelling variant is default.
- PS INPUT
Specifies the duty cycle value directly by using an input signal port.
For electrical inputs ports variant of the block, the duty cycle calculated is :
100*Vref – Vmin / Vmax - V min %
Where,
Vref is the reference voltage across ref+ and ref- ports
Vmin is the minimum reference voltage
Vmax is the maximum reference voltage



- ELECTRICAL REFERNCE

The electrical reference ground represents an electrical ground. Electrical conserving ports of all the blocks that are directly connected to the ground must be connected to an electrical reference block.
- CONTROLLED VOLTAGE SOURCE

The controlled voltage source depicts an ideal voltage source which is powerful enough to maintain the specified voltage at its output irrespective of the current flowing through the source.
The output voltage V = Vs , where Vs is the numerical value presented at the physical signal port.
- PS SIMULINK CONVERTER

PS Simulink converter block converts a physical signal into Simulink output signal. This block connects outputs of a physical network diagram to Simulink scopes.

- CURRENT SENSOR

The current sensor block represents an ideal current sensor. It is a device that converts current measured in any electrical branch into physical signal proportional to the current. The connection + and – in the block are electrical conserving ports through which the sensor is inserted in the circuit.
- SCOPE

Scope is used for viewing the graph of the signals after the simulation is run.
- SOLVER CONFIGURATION BLOCK

The solver configuration block requires solver settings information for simulation. The block specifies the solver parameters that the model requires before running the simulation.

- VOLTAGE SENSOR

The voltage sensor block depicts an ideal voltage sensor is a device which converts voltage measured between two points of an electrical circuit into a physical signal proportional to voltage. Connection V is a physical signal port that outputs the measurement result.
EXPLANATION OF THE MOTOR CONTROLLER SUBSYSTEM
- The motor controller subsystem contains mainly of H- bridge and a controlled PWM voltage block.
- A controller is needed to control the motor according to the needs which is why a controller block is used which is the H-bridge.
- H- bridge is used to supply power from the battery to the D.C motor. H- bridges has four switches that give the controlled D.C voltage supply to the D.C motor that can control the supply of voltage.
- In H-bridge block parameters there are two options for simulation mode to chooses from either averaged or PWM but averaged mode is chosen since the simulation time is in mins or hours and it is faster as compared to PWM mode.
- The output voltage amplitude of the H- BRIDGE BLOCK is same as the rated D.C supply voltage to the motor.
- In the H-BRIDGE BLOCK there is a PWM signal input port, where PWM input can be given to this port. The REF and REV ports are grounded using electrical reference block. This is done to prevent reverse operation of the motor. BRK port is connected to a controlled voltage source which helps in carrying out regenerative braking.
- PWM signals is given to the H- BRIDGE BLOCK by using CONTROLLED VOLTAGE BLOCK. This block helps in creating PWM signals which are generated according to the variable voltage.
- The PWM and REF port of the controlled PWM voltage is connected to PWM and REF port of the H- BRIDGE. The ref- port is grounded since we don’t need negative voltage. The ref+ port is connected to CONTROLLED VOLTAGE BLOCK so that the input voltage is the same always.
- Controlled PWM voltage block is connected to the input PWM port in the H- bridge block.
- This block will apply pulses and based on these pulses from the fixed battery voltage variable output voltage will be available to the motor and the motor torque and motor speed are changed.
- Finally, the subsystem is created with the following blocks and the subsystem will control the power supply to the D.C motor.
DISTANCE CALCULATION

- In the above model for distance calculation the input is taken from the velocity feedback and it is integrated using the integrator block and divided by 3600 to get the output per second.
SIMULINK MODEL OF THE ELECTRIC VEHICLE

The following blocks that were used for the creation of the model:
- Drive cycle source
- Longitudinal driver
- Simulink -PS converter
- Battery
- Controlled current source
- C motor
- Display
- DRIVE CYCLE SOURCE

The Drive cycle source block generates a standard or user- specified longitudinal drive cycle. The output of this block is specified vehicle longitudinal speed.
This block predicts the engine torque and fuel consumption that a vehicle requires to achieve desired speed and acceleration for a given shift reference.
This block also studies and optimizes vehicle control, system performance and the system is good enough for multiple drive cycles.

The plot of the drive cycle is shown below:

- LONGITUDNAL DRIVER

This longitudinal driver block uses a longitudinal speed – tracking controller. Based on feedback velocities and reference normalized acceleration and braking commands are generated which can vary from 0 through 1. This block is used to model the dynamic response of a driver.

- SIMULINK PS CONVERTER

The Simulink PS converter block converts the input Simulink signal into a physical signal. This block connects Simulink blocks to the inputs of a physical network diagram.

- BATTERY

This battery block represents a simple battery model. This block has 4 modelling variants which van be accessible by right clicking on the block and then selecting simscape and block choices:
- Uninstrumented / no thermal port
- Uninstrumented/show thermal port
- Instrumented/no thermal port
- Instrumented/show thermal port
The instrumented variants have an extra physical signal port that outputs the internal state of charge. The thermal ports variants display a thermal port which represents the battery thermal mass.



- CONTROLLED CURRENT SOURCE

The controlled current source block represents an ideal current source which is powerful enough to maintain the specified current through it irrespective of the voltage across the source.
The output current is I=Is, where Is is the numerical value presented at the physical signal port.
- D.C MOTOR

There are 2 sides to the block as seen above the mechanical side and electrical side. The mechanical side has 2 ports, C and R. The C refers to casing and R for the rotation of the rotor. The electrical side has a positive and negative terminal for the voltage to be applied. 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 simple gear of the vehicle body block.
D.C motor block represents the torque and electrical characteristics of D.C motor using the equivalent circuit model.

The resistor R refers to the resistance which is specified in the armature resistance parameter. The inductor corresponds to the inductance which is specified in the armature inductance parameter.


- DISPLAY

In this block the display outputs the value after the simulation is run

EXPLANATION OF THE MODEL
- Now an appropriate motor is selected for the vehicle so a C motor block is used to represent the DC motor. In the D.C motor block the parameters were changed like the rated D.C voltage of the motor, rated load, no load speed, rated speed according to the vehicle needs.
- The motor block has 4 ports -, +, C and R where – and + ports are the motor terminals where the power supply is connected and the positive torque is from port C to R, and port C is considered as fixed end of motor so it is connected to the mechanical rotational reference block.
- The port R is connected to vehicle dynamics subsystem input which is the simple gear box.
- In the longitudinal driver block VelRef port is connected to a drive cycle and this drive cycle is compared with VelFdbk port where the vehicle speed is given as feedback. When the vehicle speed is more than the drive cycle speed, the block will out put it as deceleration which is DecelCmd port which is connected to one port of the controlled voltage source. If the speed of the vehicle is less than the drive cycle speed then the block will give output as acceleration which is AccelCmd port which is connected to scope block.
- The longitudinal driver block is connected to a standard drive cycle using drive cycle block.
- For the power source a battery source block is connected to a constant current block. The voltage of the battery should be more than the rated voltage.
- In order to measure the speed of the EV model, scope block is used where 2 input ports are made. One port takes the output velocity signal from the VEHICLE SUBSYSTEM BLOCK and another port takes the output signal from the drive cycle to the reference velocity port on the longitudinal driver block. This is done in order to show the plots of reference velocity and the actual velocity of the vehicle and see how they compare with each other.
- The area under the velocity time graph depicts the distance travelled by the vehicle. This means that integration is done with respect to time which gives the distance travelled. Integrator block is used to integrate the velocity signal that is the output from the subsystem. After the integrator block, divide block is used along with constant block with the value of 3600 in order to convert the integrated speed signal which is in kilometres per hour by 3600 which gives the distance travelled in kilometres.
- Finally, the E.V model is completed and once the simulation is run, we get the following results.
RESULTS:
The simulation results which were run for the following drive cycle (FTP75) is shown below:
|
Drive cycle, Distance (Km) top speed (m/s) Simulation time |
FTP75 5.423 25.2 2474 sec |
|
Vehicle weight (Kg) Frontal area (m^2) Drag coefficient |
800 3 0.4 |
|
Battery nominal voltage (V) |
300 |
|
DC motor rated load (KW), Rated DC supply voltage(V) |
60, 150 |
|
H-Bridge output voltage amplitude |
150 |
|
SOC at the end of the drive cycle (Initial SOC %) |
76% |
|
Top speed reached? kwh per km |
YES |
OUTPUT GRAPH
- SPEED CHARACTERISTICS

- S.O.C (%)

DISTANCE

CONCLUSIONS:
- The drive cycle (FTP75) was used for the model, it was observed in the speed plot that the feedback speed plot and the reference speed plot overlap each other most of the time.There are instances where both speeds were different when the vehicle decelerates.
- It is observed from the S.O.C plot which is the battery state of charge that when the vehicle accelerates S.O.C is decreasing but as soon as the deceleration starts the state of charge of the battery goes slightly up. This is because the vehicle undergoes regeneration.