Final Project: Design of an Electric Vehicle
FINAL PROJECT
DESIGN OF ELECTRIC VEHICLE
Create a MATLAB model of electric car which uses a battery and a DC motor. Choose suitable blocks from the Powertrain block set. Prepare a report about your model including following:
Objectives:
- System level configurations
- Model parameters
- Results
- Conclusion
Theory:
Electric vehicle:An electric vehicle (EV) is one that operates on an electric motor, instead of an internal-combustion engine that generates power by burning a mix of fuel and gasses. Therefore, such a vehicle is seen as a possible replacement for current-generation automobiles, in order to address the issue of rising pollution, global warming, depleting natural resources, etc. Though the concept of electric vehicles has been around for a long time, it has drawn a considerable amount of interest in the past decade amid a rising carbon footprint and other environmental impacts of fuel-based vehicles.
An electric car is an alternative fuel automobile that uses electric motors and motor controllers for propulsion, in place of more common propulsion methods such as the internal combustion engine (ICE). Electricity can be used as a transportation fuel to power battery electric vehicles (EVs). EVs store electricity in an energy storage device, such as a battery. The electricity powers the vehicle's wheels via an electric motor. EVs have limited energy storage capacity, which must be replenished by plugging into an electrical source.

Main components of an EV:
Electric vehicles consist of an electric motor that is powered by a battery pack. The main advantage of electric vehicles is that they emit zero emissions and are eco-friendly. They also do not consume any fossil fuels, hence use a sustainable form of energy for powering the car. The main components of electric vehicles are:
- Traction battery pack
- DC-DC coverter
- Electric motor
- Power inverter
- Charge Port
- Onboard Charge
- Controller
- Auxillary batteries
- Thermal system (Cooling)
- Transmission
1.Traction battery pack
Traction battery pack is also known as an Electric vehicle battery (EVB) . It powers the electric motors of an electric vehicle. The battery acts as an electrical storage system. It stores energy in the form of DC current. The range will be higher with increasing kW of the battery. The life and operation of the battery depends on its design. The lifetime of a traction battery pack is estimated to be 200,000 miles.

2. DC-DC Converter
The traction battery pack delivers a constant voltage. But different components of the vehicle have different requirements. The DC-DC converter distributes the output power that is coming from the battery to a required level. It also provides the voltage required to charge the auxiliary battery.

3.Electric motor
Electric traction motor is the main component of an electric vehicle. The motor converts the electrical energy into kinetic energy. This energy rotates the wheels. Electric motor is the main component that differentiates an electric car from conventional cars. An important feature of an electric motor is the regenerative braking mechanism. This mechanism slows down the vehicle by converting its kinetic energy into another form, and storing it for future use. There are basically two types of motors: DC and AC motors.

4.Power Inverter
It converts DC power from the batteries to AC power. It also converts the AC current generated during regenerative braking into DC current. This is further used to recharge the batteries. The inverter can change the speed of the
5. Charge Port
The charge port connects the electric vehicle to an external supply. It charges the battery pack. The charge port is sometimes located in the front or rear part of the vehicle.

6.Onboard charger
Onboard charger is used to convert the AC supply received from the charge port to DC supply. The on-board charger is located and installed inside the car. It monitors various battery characteristics and controls the current flowing inside the battery pack.

7.Controller
Power electronics controller determines the working of an electric car. It performs the regulation of electrical energy from the batteries to the electric motors. The pedal set by the driver determines the speed of the car and frequency of variation of voltage that is input to the motor. It also controls the torque produced.

8.Auxiliary batteries
Auxiliary batteries are the source of electrical energy for the accessories in electric vehicles. In the absence of the main battery, the auxiliary batteries will continue to charge the car. It prevents the voltage drop, produced during engine start, from affecting the electrical system.

9. Thermal system(cooling)
The thermal management system is responsible for maintaining an operating temperature for the main components of an electric vehicle such as, electric motor, controller etc. It functions during charging as well to obtain maximum performance. It uses a combination of thermoelectric cooling, forced air cooling, and liquid cooling.
10. Transmission
It is used to transfer the mechanical power from the electric motor to the wheels, through a gearbox. The advantage of electric cars is that they do not require multi-speed transmissions. The transmission efficiency should be high to avoid power loss.

Block Diagram:
The block diagram shows the schematic form of general arrangement of the principal parts of an electric car. The below given figure shows the block diagram of the MATLAB model of an electric car. Where it is showing the 6 main parts of the arrangement.

Drive cycle is used to input data into the drive controller. The driver controller controls the acceleration and deceleration of the vehicle . Power converter which is a H-Bridge with regenerative braking , here the H-Bridge is used to drive the dc motor. As per our model we are using a battery and dc motor. Where the battery block indicates the charge and discharging condition & the % of SOC (state of charge) variations with respect to the drive cycle. The motor block and battery block is connected to the power converter block which indicates that power converting plays a vital role in the controlling & converting of electrical energy. Motor block indicates the motor positioning and type of motor we are using , here we are using the permanent magnet dc motor. Finally the vehicle body block indicates the mechanical structure of an electric car like wheels and their connections.
Procedure:
(1) Vehicle Body Subsystem:
- The vehicle is assumed to be front axle driven (4 wheels- 2 on each axle).
- The wheels are modeled using simple Tire (Magic Formula) simulink blocks.

- The N port of the tire corresponds to the Normal reaction acting on it.
- The A port corresponds to 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 port corresponds to the Mechanical translational conserving port for the wheel hub through which the thrust developed by the tire is applied to the vehicle. Thus all 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 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 radius is given as 0.3 m.
- This 2 axle (4 wheel) assembly is now connected to a vehicle body simscape block.

This block basically represents a two axle vehicle body longitudinal motion. The block accounts for body mass , aerodynamic drag, road incline , weight distribution between axle due to axle road profile.
Here the connection H is the mechanical translational conserving port hub.
NF & NR correspond to the output ports for normal reaction forces on front axle wheels respectively.
Connection V represents the actual output translational velocity of the vehicle.
beta is road incline angle & W corresponds to the headwind speed (headwind - direction opposite to that of vehicle).

- The geometric parameters of the vehicle are given as:
- The gross weight is given to be 1200Kg.
- The pitch dynamics for the vehicle are not considered for the simulation.

- The input for this subsystem is taken as rotational speed of the motor. This input is fed to the front axle through a simple gear representing a final drive ratio 5.
- 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.

(2) DC Motor:

- Simulink provides an inbuilt model block for DC motors which converts electrical input into mechanical rotational output.
- Here, the motor field type is kept as a permanent magnet and the model parameterization is done by rated load and speed.
The armature inductance and the mechanical parameters are given their default values.
All the other parameters are changed as shown below-

- The connection R represents the Rotor , while 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 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 result in no control over the DC motor and the vehicle will run at 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. This 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 is divided by the PWM signal amplitude parameters that define 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 & so, the port is not 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 the simulation.
- Load current characteristics are considered to be smoothed here.
- Also, regenerative braking is enabled for the simulation. This means that 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.

- The input threshold parameters are left with their default values.
- The output voltage amplitude of the H-Bridge circuit is given as the rated DC supply voltage of the DC motor.
- Simulink provides an inbuilt Controlled PWM Voltage block. This block is used for providing the proper pulse input to the H-Bridge circuit.

- The PWM and REF connections are for the corresponding ports on the H-Bridge circuit.
- The 2 reference inputs correspond to the throttle inputs given by the driver. The block generates corresponding pulse width as per the accelerations and brakes applied by the driver himself.
- Here the PWM frequency is 50Hz. Also the simulation mode is averaged as that in the H-bridge circuit.
- The input scaling parameters given are- 0V for 0% duty cycle & 5V for 100% duty cycle. Accordingly, the output voltage amplitude becomes 5V.
- The H-Bridge circuit along with the PWMinput, together form the motor controlled circuit.

(4) Longitudinal Driver:
Longitudinal driver is an inbuilt block provided by a powertrain block set:

- It is a parametric longitudinal speed tracking controller for generating normalized Acceleration and braking commands based on reference feedback velocities.
- The VelRef port corresponds to the feedback velocity. The actual velocity output is given by the vehicle body is connected here. By comparing the actual 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 the 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 rated 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. Accordingly, the block implements proportional-integral (PI) control with tracking windup and feed forward gains.

(5) Battery Pack:

- To model the battery pack, a simple battery block is used. This is because, if the generic block is used instead, the simulation is run for a much longer time.
- Here, the selected option for the Battery charge capacity is finite. Accordingly, series integral resistance plus a charge dependent voltage source. If the chosen 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 400 V
- The ampere-hour rating is assumed to be 50.
The rest of all parameters are left with their default values.

- To ensure the battery supplies current as per the requirements of the motor controller and not the rated current, a current sensor and controlled current source pair is connected.

(6) Drive cycle (Reference velocity):
- The Drive cycle source block is used to provide the reference speed for the simulation.
- It integrates a standard or user specified longitudinal drive cycle.
- .

- Here, the selected drive cycle is the standard FTP75.

- The plot of drive cycle is shown below
(7) Battery State of Charge:
- A small 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 capacity of the battery.
- Accordingly, the current is integrated w.r.t. to get the charge in coulombs. Now this coulombs value is modified into amperes hours. This value is now subtracted from the charging capacity of the battery i.e. 80 Ah.
- Finally the remaining charge is now converted into a percentage value of the charging capacity of the battery.
Simulink Model:

- The system is ran for simulation for 2474s which is total time the input drive cycle is defined
- 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 & 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 we see in the above graph the actual velocity of a vehicle is different from the reference drive cycle.
- This is because the chosen battery capacity and motor are not able to propel the speed up to the required extent.
- If a battery of higher capacity is chosen, the actual velocity tends to match with the reference.
- It is also noticed in some regions that despite the drive cycle showing some small decelerations, the vehicle is actually accelerating with decreasing magnitude.
2) Distance Covered:

- It is noticed in the graph that since the reference velocity of the drive cycle never becomes negative the distance is increasing throughout.
- The total distance covered by the Vehicle is about 6.22 km
3) Battery State of Charge:

- The state of charge of the battery at the end of the submission run is nearly about 89%.
- This means the battery is not completely drained at the end and the vehicle can run on the same drive cycle for the few more times before it becomes zero.
- Also to be noticed here that since we had enable the regenerative braking for the simulation the battery SOC increasing slightly whenever we goes for heavy deceleration.
- This depends upon the regenerative tendency of the motor and max amount of current battery can take.
CONCLUSION:
This model was run successfully for the simulation under the standard of FTP75 drive cycle. The results have been properly analyzed.
Also learnt about things:
- Modeling of EV and carrying out a real time simulation.
- To calculate the SOC of the battery.
- Different powertrain blocks which can be provided by simulink used to simulate the mode

