Challenge

Final Project: Design of an Electric Vehicle

1. 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

Sol: Here we are going to consider an EV model for an FTP75 drive cycle. The battery source is of 48V and the motor is DC type.

Block Diagram of EV model:

In the designed EV model, the main blocks are drive cycle, controller, DC motor, Vehicle body and Battery. Drive cycle is the driving pattern for which this model is going to be tested or evaluated. The main objective here is to obtain the speed attained by the driver, the SOC (state of charge), distance travelled by the vehicle. 

The main Simulink model of the EV is as shown below:

 

The Simulink model has been attached in the attachments.

Let us now discuss the various blocks in detail.

VEHICLE :

i) Vehicle Body Block:

In this model we have to first add the vehicle body block as shown below:

This block contains 6 ports which can be used to model the various aspects of the vehicle body. The ports are mentioned and elaborated below:

  • H- This stands for ‘Hub’ and is used to connect the hubs of the wheels to the main body of the vehicle.
  • V - This is a physical signal output port which stands for ‘Velocity’ and is used to output the speed/velocity at which the vehicle is moving at.
  • W- This is a physical signal input port and allows us to model a ‘headwind' acting on the vehicle by giving a speed for it.
  • NR - This is a physical signal output port to model the rear wheel normal forces.
  • NF - This is a physical signal output to model the front wheel normal forces.
  • beta - This is a physical signal input port and allows us to model the vehicle on an inclination angle to create the effect of a hill climbing force.

Now we need to define the vehicle body parameters as shown below:

For 'Main' Tab:

For 'Drag' Tab:

For 'Pitch' & 'Variables' Tab: Default values have been considered

ii) Tyres:

The tyres used in this EV model are 'magical formula' tyres. There are several tyre blocks that can be used for EV modelling but I have used the magical formula ones because it allows us to model the longitudinal behavior of tyres on highways. They also allow us to take into consideration extra effects such as tyre inertia, stiffness, etc which helps in better accuracy of real world conditions.

In the above image we can see that it has 4 ports and they are:

  • N-This port stands for ‘Normal’ and is the physical signal input port for the normal force acting on the tire and is considered positive in the downwards direction.
  • S-This port stands for ‘Slip’ and is the physical signal output port is that reports the slip acting on the tire.
  • A- This port stands for ‘Axle’ and is the mechanical rotational conserving port for the wheel axle.
  • H- This port stands for ‘Hub’ and is the mechanical translational conserving port for the wheel hub through which the thrust developed by the tires is applied to the vehicle body.

Now onto the Tyre Parameters, I have considered the following values:

For 'Main' Tab:

For 'Geometry' Tab:

For 'Dynamics' Tab:

For 'Rolling Resistance' Tab:

For 'Advanced' Tab:

iii) Gear:

Here I have chosen 'Simple Gear' block as to simplify the transmission system parameters. This block models a gear system with a fixed gear ratio and with no inertia effects, however we can modify the effects of meshing of gear teeth. The simple gear block is as shown below:

Now onto the Simple Gear Parameters, I have considered the following values:

For 'Main' tab:

For 'Meshing Losses' Tab:

For 'Viscous Losses' & 'Faults' Tab : Default values considered.

iv) Side Shafts:

An inertia block has been added to the workspace to provide an ideal mechanical rotational inertia for the simple gear block. This block has only one mechanical rotational conserving port and the positive direction of the block is from the port to the reference point which would be the simple gear in this case. The inertia torque acts in the positive direction is the inertia is accelerated in the positive direction. The inertia block is shown below:

The inertia block parameters were set as below:

v) Wind and Slope:

Both wind & slope are considered as constant blocks and the parameters are as follows:

vi) Velocity Subsystem:

The velocity port which outputs the velocity signal of the vehicle body block has been modified. By default, the velocity signal that is output from the vehicle body block is measured in miles per hour. To change these units, | have implemented a small subsystem from the output of the velocity port. This subsystem uses the following blocks:

  • PS- Simulink converter - this block will convert the physical signal of velocity to a logic signal.
  • Gain - This block uses a multiplication factor of 1.6 to convert the miles per hour units to kilometres per hour.
  • Zero - Order Hold - This block is used implement a zero order hold sample period.

The subsystem is as follows:

The following image represents the Vehicle Body block modelled in SIMULINK.

As seen in the diagram above, the various blocks are connected to model the vehicle body. 4 magic formula tire blocks are used as the vehicle will have 4 tires, 2 on each axle. The tires are LR, LF, RR and RF (left rear, left front, right rear, and right front). The normal ports of each tire are connected to the appropriate NR and NF ports on the vehicle body block. The hubs of each tire are connected together and an extra connection is made from them to the vehicle body block. The wind velocity and road incline are provided with constant physical signals of 5 m/s and 0 degrees respectively. The velocity port has been connected to the velocity subsystem and the connection from the subsystem is open to the 'v' port. The base port of the simple gear has been left open to the 'R’ port to take in a rotational signal. If all these connections are made, all of these components can be selected and made in to a subsystem shown below:

MOTOR:

For the EV model, I have chosen a DC Motor block as the motor. Below is the model of DC Motor:

As we can see, there are 2 sides to the block: the mechanical side on the right and the electrical side on the left. The mechanical side has 2 ports, C and R. The C refers to the casing and the R for the rotation of the rotor which produces a torque. The electrical side has a positive and a negative terminal for the voltages to be applied. If a positive voltage is applied to the DC motor block from the positive to the negative terminal, a positive torque will act from the C port to the R port. The direction of the torque produced by the DC motor can be changed by changing the sign of the back emf or the torque constant. The C port of the mechanical side needs to be connected to a mechanical rotational reference because it will be stationary. The R port will be connected to the open connection of the simple gear from the vehicle body block. The positive terminal on the electrical side is connected to the positive terminal of a power converter which in my case will be an ‘H bridge’.

The mechanical rotational reference block is shown below:

The DC Motor parameters which I have considered are as follows:

For 'Electrical Torque' Tab:

For 'Mechanical' Tab:

POWER CONVERTER:

The power converter is needed to provide power of the correct form and magnitude from one component to another. In the case of EVs, a power converter is needed to provide a DC voltage from the battery of the EV to the DC motor so that it can operate properly with the required parameters. As mentioned earlier, I have used an H-Bridge motor drive as my power converter. Its block is shown below:

The H Bridge has 2 sides to it: the left side is for the controlling of the voltage signals and the right side is for the terminals to provide the controlled voltage to the DC motor. The left side ports of the H-Bridge block are:

  • PWM - This stands for Pulse Width Modulation which will provide the voltage pulses to the H-Bridge either in the PWM or average mode.
  • REF - This stands for Reference.
  • REV - This stands for Reverse.
  • BRK - This stands for Brake.

The parameters for H-bridge block I considered are as follows:

For ' Simulation Mode & load Assumptions' tab:

For 'Input Thresholds' Tab:

For 'Bridge Parameters' tab:

CONTROLLED PWM VOLTAGE BLOCK:

This block is used to provide a controlled pulse width modulated voltage to the H-bridge block.

The parameters for this block were set as below:

CONTROLLED VOLTAGE SOURCE:

The input ports of the controlled PWM voltage block are still unconnected and that is because they require a controlled voltage source to provide the voltages to produce the voltage pulses to be fed in to the H-Bridge. For this, I have used the controlled voltage source block. This block is useful because it will provide the necessary voltage that is powerful enough to maintain the voltage at the output regardless of the current that passes through it. This controlled voltage source block is shown below:

ELECTRICAL REFERENCE:

This block is used to create grounding effect for the electrical circuit. An electrical reference block is as shown below:

SOLVER CONFIGURATION:

This block is used to solve necessary equations in any model.

the power converter blocks are as follows:

LONGITUDINAL DRIVER:

Below is the Longitudinal driver block:

The Longitudinal Driver block implements a longitudinal speed-tracking controller. Based on reference and feedback velocities, the block generates normalized acceleration and braking commands that can vary from 0 through 1. You can use the block to model the dynamic response of a driver or to generate the commands necessary to track a longitudinal drive cycle.

DRIVE CYCLE:

I have considered the FTP75 drive cycle and the output of this block is connected with 'Veh Ref' port of the longitudinal driver.

A driving cycle is a series of data points representing the speed of a vehicle versus time.

Please refer the attached simulink model or the EV model image for details regarding to the connections between longitudinal driver and other blocks.

BATTERY SYSTEM:

The battery block used is as shown below:

The parameters considered are as follows:

For 'Main' Tab:

For 'Dynamics' & ' Variables' Tab: Default values considered.

CONTROLLED CURRENT SOURCE:

The controlled current source block is a part of the battery system used in the EV model. Similar to the controlled voltage source, this block will represent an ideal current source that is powerful enough to maintain the specified current regardless of the voltage across it. The controlled current source block is shown below:

CURRENT SENSOR:

The current sensor block represents an ideal current sensor and is used to convert the current measured in an electrical circuit to a physical signal that is proportional to the current. This block is used to measure the current between the battery circuit (controlled current source) and the DC motor. The current sensor block is shown below:

The battery system and current and SOC scope are modelled as following blocks:

here the SOC estimate block is a subsystem which is as follows. This is used to calculate the SOC of the battery.

where, 1/(nominal battery capacity) is a gain block with following parameters:

The following blocks are used to calculate the speed and the distance travelled by the vehicle:

RESULTS:

The model was run for 500 seconds and below are the results:

1) SPEED SCOPE:

From this scope, we can see 2 signals. The blue signal represents the reference signal which originates from the drive cycle data whereas the yellow signal shows the actual velocity of the vehicle. The WOT drive cycle had been customized so that the vehicle begins acceleration under the WOT condition (i.e.. full power) at t = 5 seconds. This is supposed to be maintained till t = 20 seconds when the vehicle is supposed to begin deceleration. From t = 20 seconds to t = 30 seconds, the vehicle speed is back to 0m/s i.e.. rest. Because this is a reference signal, all the commands are instantaneous. This is why the increase and decrease in speed is very sudden within a fraction of a second. However, this effect will not be observed on the actual velocity of the vehicle. This is because in real world conditions, there are more considerations to factor in which will not make it possible for a vehicle to accelerate and decelerate as instantaneously as the drive cycle commanded. In the real world, the effects of rolling resistance, drag and road inclination make a difference because their presence would cause the vehicle's motion to deviate from the drive cycle commands. Other factors include, the vehicle's inertia and the inertia of the transmission system. 

Observing the vehicle's actual velocity, as commanded, the vehicle begins at rest before accelerating under the WOT condition at t = 5 seconds. This acceleration is maintained till t = 20 seconds as the drive cycle commanded. At t= 20 seconds, the vehicle achieves a top speed of 26.8m/s.  After t = 20 seconds, the vehicle begins to decelerate gradually till t = 30 seconds where the vehicle finishes with a velocity of approximately 7m/s. As mentioned earlier, the actual velocity could not match the drive cycle commands perfectly and this is due to several factors which were discussed above. In my model, I have not modelled a road inclination but I have used a wind velocity of 5m/s. I compared the effect of this wind resistance on the top speed of the vehicle to when there was no wind resistance. The effect was very insignificant, only affecting the top speed by 0.5m/s. However, the vehicle velocity has accelerated and decelerated as the drive cycle commanded. Obviously, the model is limited to the simulation time allotted. So if a longer simulation time is used, the vehicle may reach a higher top speed and may even decelerate back to rest. 

2) CURRENT:

The current scope shows how the current flowing from the battery to the motor varies with the drive cycle time. As we can see, initially the current flowing through the circuit is 0A and this corresponds to the drive cycle commanding the vehicle to be at rest for this time period. At t = 5 seconds, when the vehicle is commanded to accelerate, the current instantaneously increases to a maximum current of 235.8A. This maximum current is achieved because at t = 5 seconds, the vehicle accelerates at maximum power under the WOT condition and so this will demand a high current from the battery. From t = 5 seconds to t = 17.5 seconds, the current decreases gradually to 134.3A. The current must have decreased over time because as the vehicle was accelerating, it required lesser current from the battery to continue accelerating. The highest current is always required when accelerating from rest due to the inertia of the vehicle. But once the vehicle is already in motion, it requires significantly lesser energy to continue accelerating. From t = 17.5 seconds to t = 20 seconds, the current flowing from the battery decreases more rapidly to 85.6A. This is because at this time, the acceleration of the vehicle began to level off meaning that the increase in speed in those 2.5 seconds was lesser than the increase from t = 5 seconds to t = 17.5 seconds. 

After t = 20 seconds, the vehicle decelerates, causing the current to drop instantaneously to the negative axis to a value of -107.4A. There is now a negative current flowing due to regenerative braking. When the vehicle decelerates, the throttle is no longer applied and so the kinetic energy from the motion is converted to electrical energy fed back to the battery of the EV. This reverse flow of current is what causes the negative current measurement. From t = 20 seconds, the deceleration continues, however the current flowing through the battery decreases in magnitude. This is because at t = 20 seconds, the vehicle had reached its top speed and hence its maximum kinetic energy. So, at that point there was more kinetic energy which could be converted to electrical energy for regenerative braking. However, as the vehicle decelerates, there was lesser energy available for regenerative braking causing the magnitude of the current to decrease. The polarity of the current hence moves towards the positive direction because regenerative braking happens lesser and lesser until the vehicle comes to rest. At t = 30 seconds, the vehicle is still decelerating and finished with current measurement of -27.9A showing that regenerative braking is still occurring. 

3) SOC: At the end of drive cycle (i.e after 500 seconds) the SOC is around 89 %.

he SOC scope shows how the state of charge of the battery varies over the drive cycle time. The battery was modelled to begin with an SOC of 1 (100%) and so when the simulation begins, the SOC is at 1 until t = 5 seconds. This is because the drive cycle commands the vehicle to be at rest for that duration and so no discharge occurs from the battery. At t = 5 seconds, the vehicle is commanded to accelerate under the WOT condition and so the SOC of the battery decreases. Because the vehicle is accelerating at full power, the SOC falls from 1 but the rate of discharge decreases over the acceleration period eventually settling at a minimum SOC of 0.9914 at t = 20 seconds. This corresponds to the current flow from the battery because as the vehicle accelerates, lesser energy is demanded to increase the speed. As mentioned before, the greatest discharge occurs when the greatest current flows from the battery and this is during the initial acceleration period. As the vehicle speed increases, the acceleration decreases causing the current and hence the rate of discharge to decrease but in a mild fashion. At t= 20 seconds, the vehicle is commanded to decelerate and so the vehicle velocity decreases. This results in regenerative braking to occur which causes a negative flow of current back to the battery. Because this effect charges the battery, the SOC of the battery increases during the deceleration period. The SOC increases very gently from 0.9914 to 0.9935 and this is because the gets charges by the regenerative braking effect. The negative flow of current corresponds to the increase in the SOC of the battery. Since the vehicle is commanded to decelerate until t = 30 seconds, the vehicle speed decreases but does not reach 0m/s, so the vehicle is under regenerative braking for the entire period after t = 20 seconds. 

4) Distance Travelled: The distance travelled by the EV with the defined drive cycle is 1.412 km.

CONCLUSION:

In conclusion, the EV model has been created with the necessary block components using the SIMULINK software and the model has been simulated for a customized FTP75 drive cycle. The simulation has produced results of the velocity of the vehicle, current flowing from the battery, and the SOC of the battery as well as the distance travelled by the EV. Since the EV model was parameterized to simulate averaged voltage pulses in the H-Bridge and Controlled PWM voltage blocks to be fed in to the DC motor, the simulation finished very quickly within a matter of seconds. The EV model was able to follow the commands given by the reference velocities from the drive cycle data,
although it could have followed the reference signals more closely. 

I have attached the EV model with the attachments.

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.