Final Project: Design of an Electric Vehicle
AIM:
To 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
Create a MATLAB model of the electric car which uses lithium-ion battery and induction motor. Choose suitable blocks from Powertrain block set. Prepare a report about your model including the following:
Objectives:
- System-level configurations
- Model parameters
- Results
- 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 power and performance of electric vehicles is depending upon the two machines i.e. a brushless DC motor (BLDC) or an induction motor. The DC (direct current) is replaced by DC brushless motors and Induction motors. Also, the lead-acid battery is replaced by lithium-ion batteries for EVs. Because the future of both the components induction or brushless DC motors depends upon their demands and uses.
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.
MATLAB Modelling of Electric Car
Vehicle Technical Specification
- Vehicle Weight (Kg): 1147
- Number of wheels per axle: 2
- Total Length: 4.127 m or 4,127 mm
- Total Height: 1.487 m or 1,487 mm
- Total Width: 1.746 m or 1,746 mm
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
- Zero Order Hold: 1
- Rate Transition: 1
- Discrete Time Integrator: 1
- Sum: 1
- Integrator: 1
- Divide: 1
- Display: 1
- Scope: 4
MODELLING OF VEHICLE BODY SYSTEM:
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.
- Detail input of Vehicle Body
Main Settings
- Mass: 1147 Kg
- Number of wheels per axle: 2
- The horizontal distance from CG to front axle: 1.854 m
- The horizontal distance from CG to the rear axle: 2.2730 m
- CG height above ground: 0.5 m
- Externally-defined additional mass: OFF
- Gravitational acceleration: 9.81 m/s^2
- Negative normal force warning: OFF
Drag Settings
- Frontal area: 2.21 m^2
- Drag coefficient: 0.20
- Air density: 1.18 kg/m^3
Pitch Setting
- Pitch dynamics: OFF
Variable Settings
- Beginning Value of Velocity: 0 m/s
Other connected detail
- Wind Velocity: 2.22222 m/s
- Road Incline: 0
For calculating the velocity here, we have created a subsystem i.e LOG mph, this block basically consists of PS Simulink converter, Gain, Zero order Hold.
- Gain Block: 1.61 and it multiply input value with constant input.
- Zero-order Hold: 0.01, The Zero-Order Hold block holds its input for the sample period you specify.
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.
The figure shows the forces acting on the tire.
Where,
Fx = Longitudinal force exerted on the tire at the contact point
Fz = Vertical load on the tire
Ω = Wheel angular velocity
Vx = Wheel hub longitudinal velocity
In the particular block
- N: Normal force acting on the tire and connected with NR of the vehicle body.
- S: Slip between the tire and road and connected with Goto block
- H: Hub and it is used to find the thrust created by the tire and it is connected with H input of vehicle body also including all four Hub of the wheel.
- A: Axel and rear axle are connected with the (Simple Gear) final drive system and the front axle is connected with the left and right wheel.
In Tire block, we can change the parameter
Main Settings
- Parameterize by: Load-dependent Magic Formula coefficients, it is basically specifying the parameters that define the load-dependent.
- Tire nominal vertical load – This is basically a normal force on the tire (Fz0). So, for this particular model, the normal force I have taken is 4000 N.
- Magic formula C, D, E, BCD, H and V are default. Basically, It is a load-dependent Magic Formula Coefficient.
Geometry Setting
- Rolling radius: 0.32, it is Unloaded tire-wheel radius, rw
Dynamic Settings
- Inertia: Specify inertia and initial velocity which depends upon stiff, dampened spring and deforms under load.
- Tire inertia: 0.5 kg*m^2 and it is Rotational inertia Iw of the wheel-tire assembly.
- Initial velocity: 0 rpm and it is an Initial angular velocity, Ω(0), of the tire.
Rolling Resistance Setting
- 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.
Advance setting
- Velocity threshold: 0.1 m/s as I keep this value as default and this value should be positive because it is wheel hub velocity Vth below which the slip calculation is modified to avoid singular evolution at zero velocity.
INERTIA
This block generally represents the mechanical rotational element.
Where,
T = Inertia torque
J = Inertia
Ω = Angular velocity
T = Time
So here the inertia value is 0.01 kg*m^2 and this block is connected with rear axle and (Simple Gear) final drive ratio to find the inertia because axel and gear are a mechanical rotating device.
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.
Configuration Battery and SOC
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,
- 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.
RATE TRANSITION
It is used to transfers data from the output of a block operating at one rate to the input of a block operating at a different rate.
Input Signal: Input signal to transition to a new sample rate, specified as a scalar, vector, matrix, or N-D array.
Output Signal: Output signal is the input signal converted to the sample rate you specify.
A basic input for this block is as
GAIN BLOCK
The Gain block multiplies the input by a constant value (gain). The input and the gain can each be a scalar, vector, or matrix.
Here Gain value is the multiplication element and the input is 1/(50*3600), where 50is battery ampere and 3600 is second.
DISCRETE-TIME INTEGRATOR
The discrete-time integrator block is used for
- Define initial conditions on the block dialogue box or as input to the block
- Define an input gain (K) value
- Output the block state
- Define upper and lower limits on the integral
- Reset the state with an additional reset input
SUM BLOCK
The Sum block performs addition or subtraction on its inputs.
In this block, the negative terminal will be connected with discrete-time integrator and positive terminal with constant.
DETAIL ABOUT ELECTRICAL SYSTEM
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: 11000 rpm, this is the speed of the motor when not driving a load.
- Rated speed (at load): 10500 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.
CONTROLLED PWM VOLTAGE
The Controlled PWM Voltage block represents a pulse-width modulated (PWM) voltage source. The input detail is as given below.
Detail about the connection
- ref+ — Positive terminal, this port is a positive electrical reference and connected with controlled voltage source positive terminal.
- ref- — Negative terminal, this port is a negative electrical reference and connected with the negative terminal of the controlled voltage source.
- PWM — Pulse-width modulated signal, this port is electrical reference port and connected with PWM port of H-Bridge.
- REF — Floating zero-volt reference, this port is connected with REF and REV of H-Bridge port.
CONTROLLED VOLTAGE SOURCE
The Controlled Voltage Source block represents an ideal voltage source that is powerful enough to maintain the specified voltage at its output regardless of the current flowing through the source.
The block has one physical signal input port and two electrical conserving ports associated with its electrical terminals.
SOLVER CONFIGURATION
Solver configuration is used to begin the simulation and it is needed to solve the Simulink model. Here it is connected with controlled PWM voltage and H-Bridge negative connection by combination with electrical reference i.e ground signal.
LONGITUDINAL DRIVER
The Longitudinal Driver block implements a longitudinal speed-tracking controller
The detail of inputs is as given
Detail about parameter
- Control Type: PI it is a Proportional-integral (PI) control with tracking windup and feed-forward gains.
- Reference and feedback unit: m/s
Detail about connection:
- VelRef: Reference vehicle velocity is connected with speed result block. Its unit is m/s.
- VelFdbk — Longitudinal vehicle velocity is connected with integrator block for continuous-time integration of VelFdbk signal.
- Grade — Road grade angle is connected with constant block so that we can use our specific value, here the value is 0 which I used.
- Info — Bus signal, Here I used this signal to terminate the signal block, basically it’s an output port.
- AccelCmd — Commanded vehicle acceleration is connected with controlled voltage source input signal by combination with PS-Simulink Convertor.
- DecelCmd — Commanded vehicle deceleration is connected with another controlled voltage source signal by combination with PS-Simulink converter and to check the output result I have connected with scope block.
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.
Block Diagram Of Electric Vehicle.

Vehicle Body Consists of Wheels and Gears.
DC Motor is used for vehicle Propulsion.
Let us Consider a Simple Battery.
Used 4 Quadrant switches as Power converter.
Control unit consits of PWM modulation of DC voltage and Longitudinal Driver
SIMULINK Model Of Electric Vehicle:
Power Train Block sets used in Simulink:
Vehicle Body: Complete vehicle body is considered as Subsystem as shown below
- Wheels: This Block represents the physical Wheel properites of a vehicle Specified by tire manufacturer.
Four Wheel(2 for rear axle and 2 for front axle) Blocks are used and Each one has same specifications..
- Wheel Blocks values are considered by default without any changes in all Parameters.
If wheel parameters are specified then that will certainly effects the vehicle performance.
Ports:
N-Normal Force: This Input Port is used for Force to be applied on Wheel.
Front Wheels N-Port is connected toNF port of vehicle Body.
Rear Wheels N-Port is connected toNR port of vehicle Body.
S-Slip:Physical signal output port associated with the relative slip between the tire and road.
A-AXLE: This Mechanical Translational Port gives Mechanical link between two wheels.
Both Rear and Front Wheels are connected through A-Port.
H-HUB: Mechanical
translational port associated with the wheel hub that transmits the
thrust generated by the tire to the vehicle body( maintain same speed in
all wheels).
All H-Hub ports of Wheels connected to H-port of Vehicle Body.
2.Vehicle Body: This Block gives the Vehicle Body Parameters to be set measured by Physical Vehicle.
In simulation all Parameters are considered as default to reduce simulation time
- H,NR and NF ports are connected to Wheels Ports of vehicle.
beta port gives the vehicle body Inclination to the ground in Radians.
W-PortGives the wind velocity applied on front of the Vehicle body(Headwind Speed in m/s).
-
Parameters that have given in vehicle body is shown above figure
3.GEAR: Represents a fixed-ratio gear from Base(B) to Follower(F).
Gear Ratio is specified by 3.7
4.DC Motor: This Block represents the electrical and torque characteristics of DC Motor.
Motor Parameters are set as:
No load speed of vehicle=7000 RPM
Rated Load Speed vehicle=5000 RPM
Rated Voltage =330 V
Rated Load of vehicle =75 KW
- Remaining all other Parameters( Resistance,Inductance,EMF) are set as Default.
- Blue Part represents electrical Connection to Battery.
- Green part Represents Mechanical Part to be connected to shaft of Gear.
- R-Port is connected to B-Base port of Gear.
- C-Common port is connected to mechanical rotational reference frame.
5.References:
Electrical Reference : Gives the Nuetral Point to the electrical Circuit.
Mechanical Rotational Reference: This Block is considered as a rigid base (ground/frame) point of mechancial body.
Current Sensor: Sense the current taken by DC Motor and gives the feedback to Battery.
Controlled current Source : Maintain required amount of current to flow from the battery which is sensed from current sensor.
Controlled Voltage Source: Maintain Required amount of voltage to be maintain across DC motor which takes voltage level signal from driver.
PWM: If the input signal has a value greater than the Enable threshold voltage parameter value, the H-Bridge block output is on and has a value equal to the value of the Output voltage amplitude parameter.
If it has a value less than the Enable threshold voltage parameter value, the block maintains the load circuit using Freewheeling diode
6.H-Bridge: The H-Bridge block output is a controlled voltage that depends on the input signal at the PWM port.
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.
Power supply : Power supply can run in two model Internal and External Mode.
7.Controlled PWM voltage: The Controlled PWM Voltage block represents a pulse-width modulated (PWM) voltage source.
Simulation Mode is AVERAGED to reduce simulation time.
Output voltage: set to 330v (consider as Motor rated voltage)
- Lonitudinal Driver:(Acts as Driver of vehicle)The block generates normalized acceleration and braking commands that can vary from 0 through 1.
It is Speed Tracking Block which uses a PI controller to reduce the error between Reference velocity and output velocity and gives Accleration and brake commands to Motor through H-bridge.
All Parameters are set as default.
Grade is set as zero so, there is no gradeability in Vehicle.
9.Drive Cycle:The Drive Cycle Source block generates a standard or user-specified longitudinal drive cycle. The block output is the specified vehicle longitudinal speed
FTP75: used to generate velocity across vehicle and evaluate the vehicle performance.
10.Battery: This block represents the Physical model of battery.
- Battery voltage=Motor rated voltage =330v
- Amphere-Hr rating =80AH
Simulink model of SOC: Current is Integrated and Divide with battery Ampere hour rating (Gain Block)in seconds then subtracted the obtain result from battery full capacity.
Modelling of an EV
- First of all driving cycle used as an input for a driver.
- A longtudinal driver acts as a PI Controller where the vehicle actual speed and refernace speed are measured
- To run the DC motor, converter H bridge is used
- According to the motor AC-AC DC-AC, DC-DC, AC-DC converteris uded to run the motor
- The converter consist of switches and to turn on/off PWM(pulse width modulation) technique is used to control the signal and converter
- The batery is used to measure the current from the vehicle
- Measurement of the speed is constrained by the vehicle body and the tires which are allocated in the subsystem
- Another subsystem contains the data to represents the state of charge of a vehicle in a particular time and driving cycle
OUTPUT WAVEFORMS
SOC%
CURRENT
SPEED