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



The most important components of electric vehicle areas:
1. Auxiliary Battery: In an electric drive vehicle, the auxiliary battery provides electricity to power vehicle accessories.
2. 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:
3. Lithium-Ion
4. Nickel-Metal Hydride
5. Lead-Acid
6. Ultra-Capacitors
7. DC/DC Converter: Basically, DC/DC converter is an electronic device which is used to converts higher-voltage DC power 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.
8. Electric Traction Motor: Another important component is electric traction motor and this device is used to provide motive power to the wheels.
9. 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.
10. 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.
11. Charge port: The charge port allows the vehicle to connect to an external power supply in order to charge the traction battery pack. 12. 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
Important Simulink Block 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
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
1. 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.
2. 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.
3. Beta: Beta is basically a road incline angle. Here we can define a constant value for road angle inclination.
4. 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.
5. V: This port is the vehicle longitudinal velocity.
6. W: It is a headwind speed. Basically, we will define a particular wind speed by adding constant block.
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.
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 can 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
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.
V SOC = Vo(1-(1-SOC))
Where,
• SOC (state-of-charge) is the ratio of current charge to-rated battery capacity.
• VO is the voltage when the battery is fully charged at no load, as defined by the Nominal voltage. Vnom parameter.
• B is a constant that is calculated so that the battery voltage is VI 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.

Power Supply: The power supply is default mode Le. 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

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 O 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.
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
1 Longitudinal Driver/Decel
Positive Duty cycle-11.779 %
Negative Duty cycle - 88.310 %
2. SOC%
The battery starts discharging after 17.272 Sec and its discharge till 2471.533 sec.
Transition level
High: 7.7410e-01
• Low: -5.690e-01
Amplitude: 1.340e+00
• Fall Time: 1.608 ks
• Slew rate: -666.517 Ms
Conclusion:
The total distance travel by vehicle is 5.318 ms or 19.1448 kmph depending upon the FTP7S drive cycle and the total time for simulation was 2474 sec.
The battery is having 300 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 11000 and when the car is running at some load or we can say that some rated speed then the motor RPM is taken as 10500. The voltage supply to DC motor is 300 V.