Design of an Electric Vehicle using MATLAB Simulink
AIM : Design of an Electric Vehicle using MATLAB Simulink.
OBJECTIVES :
-
System level configurations
-
Model parameters
-
Results
- Conclusion
STUDY :
Electric Vehicle (EV) :
An Electric Vehicle (EV) is a vehicle that uses one or more electric motors or 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 panels, 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, electric aircraft and electric spacecraft.
Components of an EV :
- EVs have no need for the fuel engine and gear transmission, the two of the most crucial components for internal combustion vehicles.
- An electric powered car has three primary components - Battery, motor controller, and the electric motor.

- Battery :
The battery of an electric car can be charged through the use of ordinary grid electricity at a specialized power station. But aside from the conventional lithium-ion battery technologies, there are also other major battery technologies which can be used for electric cars.
-
Lithium-Ion Batteries : This battery technology gives extra performance and range. However, it also carries the highest price tag. Lithium-ion batteries are lighter than Lead acid and Nickel 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 technologies. What’s good about it is it’s 97% recyclable.
-
Nickel Metal Hydride Batteries : This battery technology provides higher output and better performance but it costs much more than lead-acid batteries.
-
-
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 floodgate between the motor and batteries.
- It helps monitor and regulates all key performance indications such as the vehicle’s operator, motor, battery, and accelerator pedal. It has a microprocessor which can limit or redirect current.
- It is used to either improve the mechanical performance of the car or suit the operator’s driving style. There are also more refined controllers which are capable of greater accuracy and thus, higher efficiency.
-
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. They can be structured to use either AC or DC current.
- AC motors are less expensive and lighter compared 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 Model :

- Represents a two-axle vehicle body in motion.
- Accounts for body mass, aerodynamic drag, grade,externally-defined mass and center of gravity of the vehicle body.
- Input Ports :
W - Wind Velocity in m/s
beta - Grade angle in radians - Output Ports :
V - Velocity in m/s
NR - Normal force on Rear Axle (N)
NF - Normal Force on Front Axle (N)
Vehicle Body Parameters :
- Vehicle body mass, Centre of gravity distance values and aerodynamic drag variables are modified.
- Pitch dynamics are kept ON with other variable values as default values.
Tire :

- The vehicle is assumed to be a front axle driven (4 wheels - 2 on each axle).
- The wheels are modelled using simple Tire (Magic formula) simulink blocks.
- The block can model tire dynamics under constant or variable contact surface conditions.
- Input Port :
N - Normal force acting on tire, positive when force is acting downwards/towards the contact surface. - Output Port :
S - Slip value relative to tire and surface of contact. - Conserving Ports :
H - represents wheel hub which transmits thrust generated by the wheel to the body of the vehicle.
A - represents axle on which the tires are mounted.

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

- A simple gear block is used to connect the motor to the rear axle of the vehicle.
- It represents the gearbox which connects the input shaft to the base gear and ouput from the foller gear.
- Conserving Ports:
B - port associated with input shaft (motor shaft)
F - port associated with ouput shaft (axle / differential) - Simple Gear Parameters:
Gear ratio and output direction is modified.
Meshing loss is kept constant and gear is having a constant efficiency throughout the simulation.
Viscous losses and faluts are kept at default conditions.

Vehicle Body :

- This block basically represents a two-axle vehicle body in longitudinal motion. The block 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 correspond to the output ports for nomral reaction forces on front axle 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 speed (headwind - direction opposite to that of vehicle). The gross weight is given to be 800 kg.
- The geometric parameters of the vehicle are given as -

(2) Motor & Power Converter Subsystem Model :

H-Bridge :

- The H-Bridge helps in controlling the power that is input according to the requirement. The output provided are converted voltage as per the controlled parameters.

DC Motor :

- This is the DC Motor which would give the rotational power to the wheels and become the sole power generation source.
The DC Motors terminals are connected as mentioned below,
+ = Electrical signal to the motor Positive Terminal
- = Electrical signal to the motor Negative Terminal
R = Casing of the Motor connected with the Mechanical Rotational Reference Block
C = Rotor Case connected to the Mechanical Rotational reference

- The parameter considered are, The Armature inductance is as default, varied the changes in the No-Load Speed 3000 rpm, the rated speed 1800 rpm, the Rated Load at 2kW, and the Rated DC Supply Voltage 29 V. All other parameters are as default.
Controlled PWM Voltage :

- The Controlled PWM Voltage Block helps in keeping the Modulated Pulses as per the required pulses. So that the operations happens smooth and higher variations are not observed.
The Ports are connected as follows,
ref+ = Reference Positive connected with the Acceleration Commands from the Driver Model
ref- = Reference Negative connected with the Deceleration Commands from the Driver Model
PWM = PWM connected directly to the H-Block
REF = REF connected directly to the H-Block
Note :The parameters are set as default

(3) Battery And Soc Subsystem Model :

Battery :

- To model the Battery pak, 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 models the battery as a series internal 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 dynaics are disabled.
- To ensure the battery supplies current as per the requirements of the motor controller and not the rated current, a Current Sensor & Controlled Current Source pair is connected.

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. time to get the charge in coulumbs. Now this coulumb value is modified into Ampere hours.
- This value is now subtracted from the charging capacity of the battery.
- Finally, the remaining charge is now converted into percentage value of the charging capacity of the battery.
(4) Longitudinal Driver :
- Longitudinal Driver is an inbuilt block provided by the powertrain blockset.

- It is a parametric longitudinal speed tracking controller for generating normalized Acceleration and Braking commands based on reference and feedback velocities.
- The VelFdbk port corresponds to the feedback velocity. The actual velocity output given by the vehicle body is connected here. By comparing the actual (feedback) velocity with the reference velocity, the driver block generates acceleration and braking signals in order to minimise 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 1 is connected.
- Info gives the output for the bus signal for different block calculations like difference in reference vehicle speed and 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. Acordingly, the block implements proportional-integral (PI) control with tracking windup and feed-forward gains.

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

Simulink Model of Electric Vehicle :

Simulink Explanation :
- 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 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 and the distance covered by the vehicle during the total run.
- The 2 velocities are first converted from m/s to kmph values. For this, simple Gain blocks are used. The distance is calculated by simply time-integration of the vehicle velocity.
Output Plots :
Ref. Speed v/s 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 chosen battery capacity and motors are not able to propel the speed upto the required extent.
- If a battery of higher capacity is chosen, the actual velocity will tend to match with the reference velocity.
- Also, it may be noted that in certain regions, despite the drive cycle showing small decelerations, the vehicle actually is accelerating with decreasing magnitudes. Reason being the same.
Battery State of Charge :

- The State-of-Charge of the battery at the end of simulation run is nearly about 98 %.
- This means that the battery is not completely drained at the end and the vehicle can run on the same drive cycle for a few more times before the battery SOC becomes 0.
- Also, the thing to be noted here is, since we had enabled the regenerative braking for the simulation, the battery SOC increases slightly whenever the vehicle undergoes heavy deceleration.
- Again, this depends upon the generating tendency of the motor and the maximum amount of current that the battery can take.
CONCLUSION :
The model was succesfully ran for simulation under the standard FTP75 drive cycle. The results have been properly analyzed.
Also, learnt quite a lot of interesting things like -
- how to model an EV and carry out a real time simulation.
- how a motor controller works and what role it plays in the control of the electric motor.
- how to calculate the SOC of the battery.
- Different powertrain blocks provided by simulink which can be used to simulate a vehicle model.
- Swapnil SarwadeSir I have problem in SOC system. Can u send this simulink model?