Challenge

Final Project: Design of an Electric Vehicle

Ans : Block diagram of an EV car (Attached as image)

MATLAB model file attached for your reference ( in both versions 2022a and 2024a)

MATLAB model screenshot attached for your reference

Vehicle parameters excel file attached for your reference

System level configuration

a. Vehicle body subsystem

  • 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 N port of the tire corresponds to the Normal Reaction acting on it.
    The A port corresponds to the 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 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 load dependent magic formula coefficients.
  • For values please find attached the wheels image
  • This 2 axle (4 wheel) assembly is now connected to a Velocity Body simscape block
  • 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).
  • GVW of vehicle = 1470 kg as mentioned in excel and taken for calculation
  • For parameters please find the vehicle body image attached
  • The input for this subsystem is taken as the Rotational speed of the motor. This input is fed to the front axle through a Simple Gear representing the Final Drive Ratio of 6
    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.
  • For parameters please find the gear image attached

b. DC Motor

  • Simulink provides an inbuilt model block for DC motor which converts electrical input into mechanical rotational output.
    Note : Here, the blue color corresponds to the electrical side of the motor and the green color corresponds to the mechanical side.
  • Here, the motor field type is kept as Permanent magnet and the model parameterization is done by rated load and speed.
  • The connection R represents the Rotor (rotational output) while the 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 a mechanical rotational reference.
  • The + and - 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 into no control over the DC motor and the vehicle will run at top speed throughout the simulation.
    Thus, a motor controller is very much required
  • For parameters please find the DC Motor image attached

c. Motor controller unit (MCU)

H-bridge circuit 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 divided by the PWM signal amplitude parameter defines 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 and so, the port is 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 this simulation.
  • Load current characteristics are considered to be smoothed here.
  • Also, the regenerative braking is enabled for the simulation.
    Accordingly, the BRK input is connected to a Controlled Voltage Source. This will generate emf corresponding to the intensity of brakes applied and fed the power back to the battery
  • For parameters please find the H-bridge image attached
  • Simulink provides an inbuilt Controlled PWM Voltage block. This block is used for providing the proper pulse inputs to the H-Bridge circuit.
  • The PWM & 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 4000 Hz. Also, the simulation mode is Averaged as that in the H-Bridge circuit.
  • For parameters please find the controlled PWM Voltage image attached
  • The H-Bridge circuit along with the PWM input, together form the motor controller circuit.

d. 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 VelRef port is the reference velocity port where the input drive cycle data is fed.
    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 minimize 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 0 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. Accordingly, the block implements proportional-integral (PI) control with tracking windup and feed-forward gains.
  • For parameters please find the Longitudinal Driver image attached.

e. Battery :

  • To model the Battery pack, 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 dynamics are disabled.
  • The Battery Nominal Voltage is given as 320V.
  • The Ampere-hour rating is assumed to be 94
  • The rest 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 & Controlled Current Source pair is connected.
  • For parameters please find the battery image attached.

f. Battery SOC :

  • To measure the state of charge of the battery, a subsystem was created with various blocks such as Integrator block, gain block and sum block.
  • Integrator block outputs the value of integral of its input with respect to time and then it is connected to the Gain block.
  • Gain block divides the current signal with the ampere rating of the battery which is taken as 94AH multiplied by 3600 seconds in an hour.
  • Constant block is used to represent the initial state of charge of the battery. when performing the simulation and assuming the battery charge is full the constant block can be altered with the value representing 100% charge.
  • Sum block is used to perform addition and subtraction operations.
  • The signal from the gain block will be subtracted from the constant block representing 100% charge.
  • Finally, the three blocks are made into a subsystem which is the state of charge estimate and it is linked with the battery circuit using PS – Simulink converter. Two scopes are connected one at the junction of the PS Simulink converter (To plot the output signal of the current from the battery) and other at the SOC subsystem (to get an estimate of the battery charge after the simulation is run).
  • For reference please find the Battery SOC image attached

g. 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.
  • For reference please find the drive cycle image attached

Results :

A Solver Configuration is added to ensure proper solving of the mathematical equations by the model.

Ref speed vs Actual speed graph attached for your reference

  • As can be seen from the above picture, the actual velocity of the vehicle is quite same as from the reference drive cycle velocity.
  • This is because, the chosen battery capacity and motors are able to propel the speed up to the required extent.

SOC graph is attached for your reference

  • The State-of-Charge of the battery at the end of simulation run is nearly about 99.6
  • 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.

Distance Covered graph is attached for your reference

  • It may be noted that, since, the reference velocity of the drive cycle never becomes negative (i.e. there is no backward motion of the vehicle), the distance is increasing throughout.
  • The total distance covered by the vehicle is about 1.5 km

Current graph attached for your reference

Conclusion :

  • The model was successfully ran for simulation under the standard FTP75 drive cycle. The results have been properly analyzed.
  • The drive cycle (FTP75) was used for the model, it was observed in the speed plot that the feedback speed plot and the reference speed plot overlap each other most of the time.There are instances where both speeds were different when the vehicle decelerates.
  • It is observed from the S.O.C plot which is the battery state of charge that when the vehicle accelerates S.O.C is decreasing but as soon as the deceleration starts the state of charge of the battery goes slightly up. This is because the vehicle undergoes regeneration.
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.