Final Project: Design of an Electric Vehicle
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:
1. System level configurations
2. Model parameters
3. Results
4. Conclusion
Introduction
A new study related to Vehicle/Automobile engineering says that by coming 2025, there will be a major transformation in the automobile sector. Many automakers are working to change the vehicle technologies, the major area is to decrease the pollution and use electrification in the upcoming vehicles. The researchers and automakers are continuously working to reduce CO2 emissions.
New technology like high-capacity lithium type battery will be a major energy source for the propulsion of electric vehicles.
At present, with the new technologies, some manufacturer has launched its products which are Tesla, Chevy Bolt EV and Nissan leaf which are fully electric battery-based car.

The most important components of electric vehicle areas:
Auxiliary Battery: In an electric drive vehicle, the auxiliary battery provides electricity to power vehicle accessories.
Traction Battery Pack: Traction battery pack is also known as Electric Vehicle Battery (EVB) which is used to store the electricity. Some examples of traction battery energy storage systems are as given:
- Lithium-Ion
- Nickel-Metal Hydride
- Lead-Acid
- Ultra-Capacitors
DC/DC Converter: Basically, DC/DC converter is an electronic device which is used to converts higher-voltage DC power from the traction battery pack to the lower-voltage DC power. The converted power is used to run the vehicle accessories. It is also used to recharge the auxiliary battery.
Electric Traction Motor: Another important component is electric traction motor and this device is used to provide motive power to the wheels.
Onboard charger: Takes the incoming AC electricity supplied via the charge port and converts it to DC power for charging the traction battery. It monitors battery characteristics such as voltage, current, temperature, and state of charge while charging the pack.
Power electronics controller: This unit manages the flow of electrical energy delivered by the traction battery, controlling the speed of the electric traction motor and the torque it produces.
Charge port: The charge port allows the vehicle to connect to an external power supply in order to charge the traction battery pack.
Thermal system (cooling): This system maintains a proper operating temperature range of the electric motor, power electronics, and other components.

By Using MATLAB SIMULINK System Block for Electric Vehicle design and the whole design is as:

Important Simulink Block used in Electric Vehicle design are:
- Drive Cycle Source: 1
- Constant: 3
- Longitudinal Drive: 1
- Controlled Voltage Source: 2
- Controlled PWM Voltage: 1
- Solver Configuration: 1
- Electrical Reference: 2
- H-Bridge: 1
- DC Motor: 1
- Mechanical Rotational Reference: 1
- Current Sensor: 1
- Battery:1
- Controlled current source: 1
- PS-Simulink Converter: 4
- Vehicle Body: 1
- Tire: 4
- Simple Gear: 1
- Inertia: 1
- GoTo: 2
- PS Constant: 2
- Gain: 2
- Rate Transition: 1
- Discrete Time Integrator: 1
- Sum: 1
- Integrator: 1
- Divide: 1
- Display: 1
- Scope: 1

- The Vehicle Body block represents a two-axle vehicle body in longitudinal motion. The vehicle can have the same or a different number of wheels on each axle.
- The block consists of body mass, aerodynamic drag, road incline, and weight distribution between axles due to acceleration and road profile. In optionally we can include pitch and suspension dynamics.
- The block has an option to include an externally-defined mass and externally-defined inertia. The mass, inertia, and centre of gravity of the vehicle body can vary over the course of simulation in response to system changes.
In a given block
NR: It is a physical signal output which is connected to the rear wheel axel. For this model, it is connected with a normal force of rear tire.
NF: It is a physical signal output which is connected to front-wheel axel and for this particular model it is connected with the normal force acting on a front-wheel tire.
Beta: Beta is basically a road incline angle. Here we can define a constant value for road angle inclination.
H: This port is a horizontal motion of the vehicle body. This connection will be connected with all four Hub of the wheel for finding the thrust generated by the tire.
V: This port is the vehicle longitudinal velocity.
W: It is a headwind speed. Basically, we will define a particular wind speed by adding constant block.

For setup of vehicle body just double click on the vehicle body and enter as per requirement.
Here I have done some changes in vehicle configuration, Basically, I changed the vehicle mass, length and frontal area.




TIRE MODELLING
The Tire (Magic Formula) block models a tire with longitudinal behaviour given by the Magic Formula, an empirical equation based on four fitting coefficients. The block can model tire dynamics under constant or variable pavement conditions.
The Tire (Magic Formula) block models the tire as a rigid wheel-tire combination in contact with the road and subject to slip. When torque is applied to the wheel axle, the tire pushes on the ground (while subject to contact friction) and transfers the resulting reaction as a force back on the wheel. This action pushes the wheel forward or backwards. If you include the optional tire compliance, the tire also flexibly deforms under load.

- Rolling resistance: On, Basically, it includes the rolling resistance.
- Resistance model: By using Constant Coefficient we are Neglect rolling resistance.
- Constant coefficient: 0.015 the value should be greater than 0 and it is a coefficient that sets the proportionality between the normal force and the rolling resistance force.
- Velocity threshold: 1e-3 m/s basically this input is a velocity at which the full rolling resistance force is transmitted to the rolling hub.

SIMPLE GEAR
Simple Gear is a Final drive ratio which is a gearbox that constrains the connected driveline axes of the base gear and the follower gear.
B: The output B, base gear is connected with the input of DC motor R. It is a Rotational mechanical conserving port.
F: The output of F, follower gear is connected with the rear axle. It is also a Rotational mechanical conserving port.
In Simple Gear Block we can also do some changes according to our need.
Main setting
Follower (F) to base (B) teeth ratio (NF/NB): 2, The value should be in Positive and it is a fixed ratio gFB of the follower gear to the base gear.
Output shaft rotates: In the same direction as the input shaft, it is depending upon the direction of follower and base gear.
Meshing Losses
Friction model: From drop-down, we can select Constant efficiency which calculates the Reduce torque transfer by a constant efficiency factor.
Efficiency: 0.86, here we can change the efficiency depending upon our need, basically it is a Torque transfer efficiency between base gear shaft to the follower gear shaft.
Follower power threshold: 0.001 W, it is an absolute value of the follower shaft power above which the full efficiency factor is in effect.

BATTERY
Here we will add a battery system to run the vehicle system and vehicle too. So for that added battery from Simulink library.

Here I used a simple battery model. For a particular battery, there is some changes input.
If we are selecting battery charge capacity as Finite from the drop-down menu then this basically describes the series resistor and a charge-dependent voltage source and for this, a particular equation is which is dependent upon the voltage as a function of charge.
Where,
0
SOC (state-of-charge) is the ratio of current charge to-rated battery capacity.
V0 is the voltage when the battery is fully charged at no load, as defined by the Nominal voltage, Vnom parameter.
β is a constant that is calculated so that the battery voltage is V1 when the charge is AH1.
The connection of battery is as follow, the negative (-) terminal is connected with the ground and controlled current source physical port to the positive direction that indicates the flow.
The positive (+) terminal is also connected to the controlled current source of electrical conserving ports.
CONTROLLED CURRENT SOURCE

The Controlled Current Source block represents an ideal current source that is powerful enough to maintain the specified current through it regardless of the voltage across the source.
In this particular block, the two-port is connected with battery and one electrical conversing port is connected with PS-Simulink converter to the rate transition block and Scope block.
ELECTRICAL REFERENCE
The Electrical Reference block represents an electrical ground. For this model, this block is connected with battery negative (-) terminal.

PS-SIMULINK CONVERTER

The PS-Simulink Converter block converts a physical signal into a Simulink output signal. Use this block to connect outputs of a Physical Network diagram to Simulink scopes or other Simulink blocks.
For calculating the SOC (State of Charge) we have to create a subsystem which will consist of Rate transition, Gain, Discrete Time Integrator, Constant and Sum blocks.
DC MOTOR
The DC Motor block represents the electrical and torque characteristics of a DC motor using the following equivalent circuit model:

Here in this system, the positive terminal is connected with the current sensor negative terminal and negative terminal is connected with the negative terminal of H-Bridge.
R is DC motor rotor which connected with mechanical rotational port i.e. simple gear whereas C is DC motor case and it is connected with mechanical rotational reference.
A basic configuration of the DC motor is as follow:

Here for the particular model, I configure in DC Motor and try to change a basic setting in electrical torque.
No-load Speed: 8000 rpm, this is the speed of the motor when not driving a load.
Rated speed (at load): 5000 rpm, this is the speed of the motor at rated mechanical power level.
Another Mechanical detail of DC motor is as follow
Rotor Inertia: It’s a resistance of the rotor to change in motor motion.
Rotor Damping: It should be zero because it is energy dissipated by the motor.
Initial Rotor Speed: This is a starting speed of the motor that at what speed the motor will start.
H-BRIDGE
The H-Bridge block represents an H-bridge motor driver.
Simulation mode and Load Assumption Settings
Power Supply: The power supply is default mode i.e. Internal.
Simulation Mode: Here I selected Averaged mode and this mode has two Load current characteristics options:

Smoothed
Unsmoothed or discontinuous
Regenerative Braking: Always enabled (suitable for linearization), this option can be used when the controller always sets the REV flag to ensure regenerative braking.
Load Current Characteristics: Smoothed, it’s a default option and it assumes that the current is practically continuous due to load inductance.
Input Thresholds
Enable threshold voltage: 1.5 V, this is the above value of PWM at which H-Bridge start.
PWM signal amplitude: 5.0 V, this is the amplitude of the signal at the PWM input. Here I used it as the default mode.
Reverse threshold voltage: 1.5 V, here I changed this value.
Braking threshold voltage: 2.5 V
Bridge Parameters
Output voltage amplitude: 320 V, this parameter will be active only when we select Internal for Power Supply mode and it’s an amplitude of the voltage across the H-Bridge.
Total bridge on resistance: 0.1 ohms,
The freewheeling diode on resistance: 0.05 ohm
Detail about connection
PWM: Pulse-width modulated signal.
REF: Reference, it is an electrical conversing port associated with the floating zero volts.
REV: Reverse, it is an electrical conserving port associated with the voltage that controls when to reverse the polarity of the H-Bridge block output.
BRK: BRK, it is an electrical conserving port associated with the voltage that controls when to short circuit the H-Bridge block output.
Here PWM output port is connected with PWM input port of controlled PWM voltage. The REF and REV port are connected with REF port of controlled PWM voltage port. The BRK port is connected with a controlled voltage source.
The positive (+) terminal is connected with the positive (+) port of current sensor and negative (-) port is connected with the negative (-) port of DC motor.
DRIVE CYCLE SOURCE
For this particular electric vehicle here I used FTP75 drive cycle. The plotted drive cycle is as given:

The connection drive cycle RefSpd is connected with the VelRef of Longitudinal driver and to the Scoop results which generate the vehicle reference speed.
DISTANCE CALCULATION
Here the main block is an integrator, Divide, time block and for the result we have to use display block that will display the distance.
Detail about connection:

Integrator
The output port of the vehicle body is connected with the integrator block.
Divide
The output of the integrator block is connected with divide where it will be divided by time to get the final output.
Time
The output of time block is connected with the divide block. Here time is taken as 3600 s.
Results:


Conclusion:
FTP75 drive cycle and the total time for simulation was 2474 sec.
The battery is having 12 V which is a nominal voltage and the battery ampere per hour rating is 50 by which we calculated the SOC (state of charge) of battery.
The DC motor is used to run the Rear axel of the vehicle and when the car is with no load condition then the motor operating RPM is 8000 and when the car is running at some load or we can say that some rated speed then the motor RPM is taken as 5000. The voltage supply to DC motor is 100V.