Final Project: Design of an Electric Vehicle
PROJECT: DESIGN OF AN ELECTRIC VEHICLE
Aim:To create a MATLAB model of electric car which uses a battery and a DC motor by Choose suitable blocks from Powertrain block set.
OBJECTIVES:
1. System level configurations
2. Model parameters
3. Results
4. Conclusion
Theory:
An electric vehicle (EV) is a vehicle that uses one or more electric motors and traction motors for propulsion.An electric vehicle may be powered through a collector system by electricity from off-vehicle sources,or may be self contained with a battery,solar panel,fuel cells or an electric generator to convert fuel to electricity.EVs include,but are not limited to,road and rail vehicles,surface and underwater vessels,elctric aircraft adn electric spacecraft.

Components of an EV:
- EVs have no need for the fuel engine and gear transmission,the two of the most crucial components fo rinternal combustion vehicles.
- An electric powered has three primary components:- Battery,motor controller and electric motor.
Block Diagram of EV :

1) Battery: The battery of an electric car can be charged by the use of ordinary grid electricity at a specialized power station.But aside from the conventional liyhium-ion battery technologies,there are also major battery technologies which can be used foe electric cars.
- Lithium-Ion Batteries: This battery technology gives extra performance and range.However it also carries the highest prise tag.Lithium-Ion batteries are lighter than Lead acid and Nickle metal.These are also the batteries used in digital cameras and smartphones.
- Lead Acid Batteries: This battery technology is the most popular.It is also the cheapest among the battery technologoies.What is good about it is ,it's 97% recyclable.
- Nickel Metal Hydride Batteries: This battery technology provides higher output performance but it costs much more than lead-acid batteries.
2) Motor Controller: The motor controller of an electric car administers its complete operation and the distribution of its power at any given moment.It acts as a flood-gate between the motor and the batteries.It helps monitor and regulates all key performance i9ndications such as ,the vehicles operator,motor,battery,and accelerator pedal.It has a microprocessor which can limit or redirect current.It is used either to improve the mechanical performance of the car or suit the operator's driviong style.There are also more refined controllers which are capable of greater accuracy and thus higher efficiency.
3) Electric Motor: Unlike a gasoline engine with lots of moving parts,a motor only has one moving part.This makes it a very reliable source of motive power.Choosing an electric motor depends on the car's system voltage.Thgey can be saturated to use either AC or DC current.AC motors are less expensive and lighter as compareed to DC motors.They are also more common and they tend to suffer from less mechanical wear and tear.However,AC technology requires a more refined or sophisticated motor controller.
PROCEDURE:
1) Vehicle Body Subsystem:
- The vehicle is assumed to be a frontal axle driven (4 wheels- 2 on each axle).
The wheels are modelled using simple tire (Magic formulla) simulink block.
- The N port of the tire corresponds to the Normal Reaction acting on ot.The A port corresponds to the Mechanical Rotational Conserving Port for the wheel axle.Thus both the wheels on the same axle should form a connection through their respective A ports. Connection H corresponds to the Mechanical Translational Conserving Port for the wheel hub through which the thrust developed by the tire is applied to the vehicle.Thu sall the 4 wheels form a connection through their respective H ports and this is in turn connected to the translational hub of the vehicle body.The connection S represents the output port for slip of the tire.

- The tires are parametirised 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 reted load - are kept with their default valus.
- The tire radius is given as 0.3 m.
- The tire inertia is kept as 1 kg-m^2.Also te rolling resistance is given with a constant coefficient of 0.015.


- The two axle (4 wheel) assembly is now connected to a velocity body simscape block.

- This block basically represents a two-axle vehicle body in longiitudianal motion.The bloc accounts for - body mass,aerodynamic drag,road incline,weight distribution between axles due to acceleration road profile.
- Here,the connection H is the mechanical translational conserving port hub.NF & NR corresponds to the output ports for normal reaction force on frontal and rear axle wheels respectively. Connection V represents the actual output translational velocity of the vehicle.Beta is the road inclination angle & W corresponds to the headwind (headwind - directrion opposite to that of vehicle).
- The gross weight is given to be 1200 kg.
- The geometric parameters of the vehicle are given as-

- To account fo rproper drag force on the vehicle the relatyed parameters are kept as -

- The pitch dynamics for the vehicle arte not considered for this simulation.
- The complete subsystem is shown below -

- The input for this subsystem is taken as the Rotational speed of the motor.The input is fed to the front axle through a Simple gear representing the Final Drive Ratio of 2. Here the rotational direction of the output shft is kept the same as that of the input shaft.Also,no meshing losses are considered for the simulation.

2) DC MOTOR:

- Simulink provides an inbuilt model block for DC motor which converts electrical input into mechanical rotational output.
Note: Here, the blue colour corresponds to the electrical side of the motor and the green colour corresponds to the mechanical side of the motor.
- Here,the motor field type is kept as permanent magnet and the model parametrization is done by rated load and speed.
The armature inductance and the mechanical parameters are given their default values.
All other parameters are changed as shown below -


- Faults are kept off.
- The connection R represents the Rotor (rotational output) while the connection C is for the casing (stationary).Thus the R port is connected to the input of the vehicle subsystem created earlier.The C port is connected to a mechanical rotational reference.
- The + & - terminals of the motor are connected to the motor controller.If these terminals are directly connected to a battery,the required DC motor will run on the rated capacity of the battery.This will eventually results into to no control over the DC motor and the vehicle will run at the top speed throughout the simulation.
Thus, a motor controller is very much needed.
3) Motor Controller :
- 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 teh PWM port voltage is above the enabled threshold voltage.
- In Averaged mode,the PWM port voltage divided by the PWM signal amplitude parameters defines the ratio of the on-time to the PWM period.
- Connections 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 th eelectrical 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 the regenerative breaking is enabled for the simulation.This means, when the vehicle starts decelerating,corresponding amount of charge will be feedback 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 fed the power back to the battery.

- 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.

4) Controlled PWM Voltage:
- Simulink provides an inbuilt Controlled PWM Voltage block.This block is used for providing the proper pulse inputs to the H-Bridge circuit.

- The PWM & REF connections are for the corresponding ports on the H-Bridge curcuit.
- The 2 references inputs corresponds to the throttle inputs given by the driver.The block generates corresponding pulse with as per the accelerations and brakes applied by rthe driver himself
- Here, the PWM frequency is 5000 Hz. Also,the simulation mode is Averaged as that in the H-Bridge circuit.

The input scaling parameters given as:-

Accordingly,the output voltage ampliutude becomes 400V.

The H-Bridge circuit along with th ePWM input,together form the motor controller circuit.

5) Longitudianal Driver :
- Longitudinal driver is an inbuilt block provided by the powertrain blockset.

- It is a parametric longitudinal speed tracking controller for generating normalised Acceleration and Braking 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 i sconnected here.By comparing the actual (feedback ) velocity with the reference velocity,the driver block generates acceleration and braking signals in order to minimize 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 zero(0) is connected.
Info gives the output for the bus signal for4 different block calculations like difference in reference vehicle speed.
AccelCmd & DecelCmd corresponds 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. Accordingly,the block implements proportional-integral (PI) control with tracking windup and feedforward gains.

6) Battery Pack:

- To model the battery pack,a simple battery block is used.This is because,if the generic battery block is used instead,the simulation will run for a much longer time.
- Here, the selected option for Battery Charge Capacity is Finite.Accordingly,the block modles the battery as a series internal resistance plus a charge - dependent voltage source.If the choosen option had been infinite,the voltage source would have been constant.
- Also,the self-discharging of the battery and the battery dynamics are disabled.
- The battery Nominal Voltage is given as 600V.
The Ampere-hour rating is assumed to be 50 hr*A.
The rest all parameters are left with their default values.

- To ensure the battery supplies current as per the requirement of the motor controller adn not the rated current,a current sensor and controlled current cource pair is conmnected.

6) Reference Velocity
Drive Cycle:
- The Drive Cycle Source block is used to prodive 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-

8) Battery State Of Charge:
- Asmall subsystem is created to calculate the state of charge of the battery.
- This subsystem takes the battery current as the input.

- The essential process to calculate the SOC is by subtracting the charge from the rated capcity of the battery.
- Acordingly,the current is integrated w.r.t. the time to get the charge in coulumbs.noe this coulumb value is modified into Amoere hours.
Model :

Google Drive link of model is given below:
https://drive.google.com/file/d/1IRPPZwo8hZjD6o8ZOrwmueRlZAfxpR6k/view?usp=sharing
Simulation:
- The system is ran for simulation for 2474 s,which is the total time for which the input drive cycle is defined.
- A Solver Configuration is added to ensure proper solving of the mathematiucal equations by the model.

- Displays are connected to analyse Speed,Current,SOC% and Distance travelled by the vehicle.
i) Speed: The output of the speed is connected to the display block which will display the speed of the vehicle as shown below.

ii) Current: The output of the current is connected to the display block which will display the current of the vehicle as shown below.

iii) SOC %: The output of the SOC% is connected to the display block which will display the battery percentage of the vehicle as shown below.

iv) Distance: The output of the distance is connected to the display block which will display thedistance travelled by the vehicle as shown below.

- Scopes are connected to analyse the different outputs such as teh SOC% of the battery,the reference gvelocity and the actual velocity of the vehicle and the distance covered by the vehicle during the total run.
- The distance is calculated by simply time-integration of the vehicle velocity.
OUTPUTS:
1) Ref.Speed Vs Actual vehicle Speed:

- As can be seen from the above picture,the actual velocity of the vehicle differs from the reference drive cycle velocity.
- This is because the choosen battery capacity and motors are not able to propel the speed up to the required extent.
- If a battery of higher capacity is choosen,the actual velocity will tend to match with the reference velocity.
- Also,it may be noted that in certain regions,despite th edrive cycle showing small decelerations,the vehicle actually is accelerating with decreasing magnitudes.Reason being the same.
2) 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 7.501 km.
3) Battery SOC%:

- The SOC of the battery at the end of simulation is 89 % after 2472 s.
- This means that the battery is not completely drained at the end and the vehicle can run at the same drive cycle for a few more times.
- Also,the thing to be noted here is,since we had enabled the regenerative braking fo rthe simulation,the SOC increases slightly whenever the vehicle undergoes deceleration.
- Again this depends upon the generating tendency of the motor and the maximum amount of current that the battery take.
4) Current:

- This scope shows how current flowing from the battery to the motor varies with the drive cycle.
CONCLUSION:
The EV model has been created with necessary block components using the SIMULINK software and the model have been simulated for a drive cycle "FTP75 (2474 s)".The simulation has produced the result of the velocity of the vehicle,current flowing from the battery and state of charge as well as distance travelled in the simulation time.The EV model was able to follow the commands given by reference velocities from the drive cycle data.The distance travelled by my EV model was 7.501 kms and seems to be appropriate value based on the FTP75 drive cycle.The SOC of the battery was discharged efficiently bupto 89 % from full charge.This model has also some features like regenerative braking which was evident in current scope and state of charge.My EV model has been attached to this report as an slx file version 2021a.