Final Project: Design of an Electric Vehicle
Project 2 : Design of a Electrical vehicle.
Thoery :
Electric vehicles have low running costs as they have less moving parts for maintaining and also very environmentally friendly as they use little or no fossil fuels (petrol or diesel). While some EVs used lead acid or nickel metal hydride batteries, the standard for modern battery electric vehicles is now considered to be lithium ion batteries as they have a greater longevity and are excellent at retaining energy, with a self discharge rate of just 5% per month. Despite this improved efficiency, there are still challenges with these batteries as they can experience thermal runaway, which have, for example, caused fires or explosions in the Tesla model S, although efforts have been made to improve the safety of these batteries. It can cost as little as £7.80 to fully charge an electric car from home and can even be free in public car parks.
There are two main types of electric vehicles (EV); fully electric and plug-in hybrids:
Battery Electric Vehicles (BEV) :
Compared to an internal combustion engine, battery powered electric vehicles have approximately 99% fewer moving parts that need maintenance.
Advantages of a BEV:
- Creates very little noise
- No exhaust, spark plugs, clutch or gears
- Doesn't burn fossil fuels, instead uses rechargeable batteries
BEVs can be charged at home overnight, providing enough range for average journeys. However, longer journeys or those that require a lot of hill climbs may mean that the fuel cells require charging before you reach your destination, although regenerative braking or driving downhill can help mitigate against this by charging the battery packs.
The typical charging time for an electric car can range from 30 minutes and up to more than 12 hours. This all depends on the speed of the charging station and the size of the battery.In the real world, range is one of the biggest concerns for electric vehicles, but is something that is being addressed by industry. There are only around 20 moving parts in an electric engine, compared with nearly 2,000 in an ICE (internal combustion engine), so your EV will need a lot less maintenance. You won’t need a tune-up or oil change, and your fully electric car is so quiet you won’t disturb the neighbours when you come home late or drive out early.
Plug your EV into your home power supply and it fully recharges overnight – enough for an average day’s driving in most models. If you’re on the motorway or climbing a lot of hills you’ll use up your battery faster, but travelling downhill or braking recharges it.
Just like a fuel gauge, your dashboard tells how much battery life there is, and even better, you’ll see how many kilometers you can travel. When you drive a fully electric car, you’ll have smooth acceleration, quiet travelling, low running costs – and zero emissions.
Plug-in Hybrid Electric Vehicles (PHEV) :
Rather than relying solely on an electric motor, hybrid electric vehicles offer a mixture of battery and petrol (or diesel) power. This makes them better for travelling long distances as you can switch to traditional fuels rather than having to find charge points to top up the battery.
Of course, the same disadvantages that apply to combustion engine vehicles also apply to PHEVs, such as the need for more maintenance, engine noise, emissions and the cost of petrol. PHEVs also have smaller battery packs, which means a reduced range. Depending on the model, the petrol engine either turns the wheels, or recharges batteries that power the electric motor doing the work.
There are some disadvantages with PHEVs, compared with fully electric vehicles. Most of these are to do with running the petrol engines. Just like your existing petrol or diesel car, the petrol engine components will need more maintenance, will have engine noise, produce emissions and require the purchase of petrol.
Because they have a smaller battery than a fully electric car, you’ll generally have less battery range in a PHEV so you’ll rely more on fossil fuels for longer journeys. This means you only reduce your CO2 emissions by 80% for the time the car is running on the electric battery. However, you can recharge your car’s batteries at any power outlet, they still recharge when braking (regenerative braking), and town driving can be emission-free and quiet.
Main Components of EV :
- Traction Battery Pack :
The function of the battery in an electric car is as an electrical energy storage system n the form of direct-current electricity (DC). If it gets a signal from the controller, the battery will flow DC electrical energy to the inverter to then be used to drive the motor. The type of battery used is a rechargeable battery that is arranged in such a way as to form what is called a traction battery pack.

- Power Inverter :
The inverter functions to change the direct current (DC) on the battery into an alternating current (AC) and then this alternating current is used by an electric motor. In addition, the inverter on an electric car also has a function to change the AC current when regenerative braking to DC current and then used to recharge the battery. The type of inverter used in some electric car models is the bi-directional inverter category.

- Controller :
The main function of the controller is as a regulator of electrical energy from batteries and inverters that will be distributed to electric motors. While the controller itself gets the main input from the car pedal (which is set by the driver). This pedal setting will determine the frequency variation or voltage variation that will enter the motor, and at the same time determine the car’s speed.
In brief, 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. This component will determine how electric car work.

- Electric Traction Motor :
Because the controller provides electrical power from the traction battery, the electric traction motors will work turning the transmission and wheels. Some hybrid electric cars use a type of generator-motor that performs the functions of propulsion and regeneration. In general, the type of electric motor used is the BLDC (brushless DC) motor

Other electric car components :
Charger : is a battery charging device. Chargers get electricity from outside sources, such as the utility grid or solar power plants.
AC electricity is converted into DC electricity and then stored in the battery. There are 2 types of electric car chargers:
- On-board charger: the charger is located and installed in the car
- Off-board charger: the charger is not located or not installed in the car.
Transmission : The transmission transfers mechanical power from the electric traction motor to drive the wheels.
DC/DC Converter : This one of electric car parts that to converts higher-voltage DC power from the traction battery pack to the lower-voltage DC power needed to run vehicle accessories and recharge the auxiliary battery.
Battery : In an electric drive vehicle, the auxiliary battery provides electricity to power vehicle accessories.
Thermal System – Cooling : This system maintains a proper operating temperature range of the engine, electric motor, power electronics, and other components.
Charge Port : The charge port allows the vehicle to connect to an external power supply in order to charge the traction battery pack.
System level configuration :
To model an EV in SIMULINK we will need to model the aforementioned components separately and then have them work together. All the main components are available in the library of SIMULINK blocks and we will be adding each component and configuring its parameters to fit the requirements of the model.
Vehicle body :

H - this stands for 'Hub'
V - this stands for 'Velocity'
W - This stands for 'Headwind'
NR - Physical signal output port to model the 'rear wheel normal forces'.
NF - Physical signal output port to model the 'front wheel normal forces'.
Beta - physical signal input port and allows to model the vehicle on an inclination angle to create the effect of a hill climbing force.
We can modify various parameters of the vehicle body e.g. mass number of wheels per axle, distance of the center of gravity to the front and rear axles. These are the main parameters and have been left with the default values assigned when the block was added to workspace. Parameters of frontal area, drag force coefficient and air density can be modified in order to effect the drag force acting on the vehicle. change the drag coefficient to 0.3 from the default value 0.4 in order for the model to resemble a typical sedan. Air density and frontal are normal for this type of vehicle.
Tires : The tires used in this EV model are the 'magic formula' tires. There are several tire blocks that can be used for modeling a vehicle but magic formula tires allows us to model the longitudinal behavior of the vehicle tires on the highways. They also allow us to model extra effects such as tire inertia, stiffness which allow greater accuracy for real world conditions.

N - this stands for 'Normal'
S - this stands for 'Slip'
A - this stands for 'Axle'
H- this stands for 'Hub'
we should parameterize the tires with 'Load dependent magic formula coefficients' and the remaining parameters that follow with are default.
Geometry:
There is only one parameter that can be modified and it is the rolling radius and has been set to a nominal value of 0.32m.
Dynamics :
The next parameters are dynamics of the magic formula tires. This is where we can model additional effects. e.g. tire inertia and the initial velocity if we are modeling to specify those 2 conditions.
Rolling resistance :
We can model the rolling resistance parameters on the tires and I chose to switch ON the rolling resistance force on the tires with the resistance of 0.015 and a velocity threshold of 1e^-3.
Advanced :
The last parameter of the magic formula tires is the velocity threshold and this has been set to 0.1m/s. Below this speed the block will not model any of the aforementioned effects of motion on to the tire hence called a 'threshold velocity'
Slip :
The 'S' port on the LR and LF tires are modeled with a certain degree of slip using a small subsystem. This subsystem uses a PS-Simulink converter which will be used again later on for other systems in this EV model. The slip subsystem used for the 'magic formula' tires is as follows.

Gear :
We will model gear the transmission system of the EV. We can use a 'Simple gear' block so as to simplify the transmission system parameters. This block models a gear system with a fixed gear ratio with no inertia effects, however we can modify the effects of the meshing of the gear teeth.

Gear block parameters :
Main :
The parameter of the simple gear are the follower to base teeth ratio and this has been set 3.7 specify that the output shaft rotated in the same direction as the input shaft as opposed to opposite direction of the input shaft.
Meshing losses :
The meshing losses follow a constant efficiency friction model with an efficiency OF 0.86 and follower power threshold of 0.0001W.
Side Shaft :
An inertia block has been added to the workspace to provide an ideal mechanical rotational inertia fo 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 th reference point which would be simple gear in this case. The inertia torque acts in the positive direction is the inertia accelerated in the positive direction.

the inertia block parameters only allow for us to modify the inertia and this parameter has been kept at the default value of 0.01
Wind and Slope :
As mentioned earlier the velocity block allows us to model the effect of the wind resistance and road inclination through the 'W' and 'beta' ports respectively. Use a 'PS-constant' block to model the parameters of the wind and road inclination on the vehicles motion. For the wind effect give a constant signal of 5m/s and this acts in the opposite direction to the direction of motion. i.e. headwind. For the road inclination give a constant signal of 0.
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 implement a small subsystem from the output of the velocity port. This subsystem uses the following block.
- PS -Simulink converter - this block will convert the physical signal of velocity to a logic signal.
- Gain - This block uses a multiplication factor if 1.6 to convert the miles per hour units to kilometers per hour.
- Zero - Order Hold - this block is used implement a zero order hold sample period.

Vehicle body subsystem :

As seen in the diagram above, the various blocks are connected to the model of 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. The normal ports of each tire are connected to the approximate 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 'S' ports of the LR and LF tires have been modeled with a slip using a small subsystem. The simple geat and inertia blocks are connected to the axle port of the tires. The wind velocity and road incline are provided with constant physical signals of 5m/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 of the simple gear has been left open to the 'R' port to take in a rotational signal. If these connections are made all of these components can be selected and made into a subsystem shown below :

This subsystem is created so that less space is taken up in the workspace and now we only need the open ended connections to be modified.
Motor :
For the EV model, select DC motor block as the motor. This is because DC motors are easier to model and have fewer parameters to modify for a particular application. For this model a DC motor will do just fine.

As we can see there are 2 sides to the block : the mechanical slide 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 port C to port R. 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 vehicle body block. The positive terminal on the electrical side is connected to the positive terminal of a power converter which in this case will be an 'H bridge'. Double clicking the DC motor block takes us to it's parameters . The electrical torque parameters are first considered . Parameterize the block 'By rated Power, rated speed and no load speed'. This modifies parameters such as DC supply voltage, rated load. keep all values default except for the no load speed, rated speed, rated load and the DC supply voltage which were changed.

In the mechanical parameters we can modify the rotor inertia damping and initial rotor speed. However these values were kept to their default settings.
Once the DC motor block has been parameterized the following connections are to made.

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 DC motor so that it can operate properly with the required parameters. As mentioned earlier use an H-bridge motor drive a power converter.

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.
- RED - this stands for reference
- REV - This stand for reverse
- BRK - This stands for brake.
The main parameters are for the simulation mode and load assumptions of the H-bridge. Select the H-bridge to run on an internal power supply with an averaged simulation mode instead of PWM mode. This is because using the PWM mode will result in significantly longer simulation times compared to using the averaged mode. Enable the regenerative braking mode and set the load current characteristics to the smoothed option.
The next parameters of the H-bridge are its input thresholds. Here we can set the various voltage limits of its l4 left hand side ports. These values are left to their default settings.
The last parameters for the H-bridge pertain to it's bridge parameters. Only the first parameter of 'Output voltage amplitude' was modified. This is because the DC motor has been parameterized to run on a DC supply voltage of 330V. so this same value is used for the output voltage amplitude. Once these paramters have been applied close the parameter settings. the connections for this block will be made later on.
Controlled PWM Voltage :
Next use a Controlled PWM Voltage block to provide a controlled pulse width modulated voltage to the H-bridge block. The block will output the PWM voltage through its 'PWM' and 'REF' ports which will feed in to same ports found on the H-bridge block. IF the pulse is high the output voltage will be equal to the output voltage amplitude which was set to 330V in the bridge block. The pulses of voltage created by this block are dependent on the duty cycle which is the ratio of the time that switch is ON to the time taken for 1 cycle The duty cycle is set by the input of the controlled PWM voltage block

The main settings pertain to the PWM parameters. Here all the parameters are maintained at their default values. Choose the 'Avenged' simulation mode so that the average value of the voltage pulses are generated and fed in to the H- Bridge. This will allow for quicker simulation times just like for the H-bridge block parameters. The remaining parameters of 'Input scaling' and 'Output voltage' are unchanged.
If these parameters have been applied close the block parameter window. The connections for this block will bw made later on.
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 use the Controlled Voltage 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 curret that passes through it.
This controlled voltage source block is shown below :

In this model 2 controlled voltage sources have been used. One block is to provide fot the acceleration of the vehicle and the other is to provide the voltage for the deceleration of the vehicle.
Electrical reference :
The electrical reference block is used to create a grounding effect for electrical circuits. Any model that uses electrical or electronics components will need to have at least one electrical reference block in it.

Solver configuration :
tHIS BLOCK IS Used to solve any necessary equations in a model and use them in connection to the 'REV' port of the H-bridge block.

Connections made upto this point is as follows :

Longitudinal driver :

The longitudinal driver block is used for giving normalized acceleration and deceleration commands to a controller based on 2 sets of data. the first set of data is the reference velocity and the second set is he feedback velocity.
The longitudinal driver has following ports
- VelRef - stanfs for reference velocity
- VelFdbk - This stands for feedback velocity and it's velocity data is provided from vehicle body
- Grade - This port provides a grade or inclination angle for the surfaces on which the vhicle is travelling in degrees.
- info - this port is for the bus signals which consists of block calculating
- AccelCmd - this stands for command to a controlled voltage source.
- DecelCmd - Provides the deceleration command to another controlled voltage source.
The working of the longitudinal driver block is simple. The reference velocity data coming from a drive cycle source is compared to the feedback velocity data coming from the vehicle body block. If the reference velocity is greater than the feedback velocity an acceleration command will be given as an output to the controlled voltage source. If the reference velocity is lesser than the feedback velocity a deceleration command is given as the output to another controlled voltage source instead. For the acceleration and deceleration commands to be given as output signals use SImulink -PS converter block. This block is needed whenever we wish to connect a simulink input signal to a physical signal in this case the input signal is velocityamd this is logic data which we want to convert to a physical signal
Grade :
The grade port of the longitudinal driver block is connected to a constant block with a constant value of 0. this is so that no road inclination for the simulation.
Drive Cycle :
A drive cycle is a data set that contains velocity and time data for he purpose of the modelling the motion of a vehicle. The drive cycle will be a plot the velocity against the time and it is made to resemble typical driving conditions that a consumer may experience themselves in. Drive cycles are used by automotive companies for various testing provedures such as mileage, pollution tests, and acceleration and top speed tests. There are various different drive cycles that are industry standards
There are 3 ways of implementing a drive cycle. One method is to create or own drive cycle with a spreadsheet of the velocity data in one column and time data in another coloumn. Another method is to use a signal builder block and create signals that represent the velocities at which the vehicle should travel and the durations for which those velocities are to maintained. The last method is use inudtry standard drive cycles which are in built in to the SIMULINK library. By default the drive cycle is set to the FTP75 drive cycle.

When the 'WOT' drve cycle is chosen some extra parameters are made available for modification

the plot shows the custom drive cycle which has been created.

Once the drive cycle parameters have been set as shown above the output port of the drive cycle can be connected to the reference speed port of the longitudinal driver block. If all the parameters have been set as discussed the connections can be made as shown in the image below.

The connection for the vehicle feedback is left open ended for now and will be connected later on. next we can model the battery of EV.
Battery system :
Battery :
The battery will be energy store of the EV and will contain the electrical energy to the DC motor for it to operate. The battery block used is a simple one and considers omly basic paramters. The battery block is shown below

battery block parameters are shown below.

As we can see the battery block parameters include the nominal voltage the internal resistance and the battery charge capacity. Use a nominal voltage of 400V an internal resistance of 0.2Ohms and an infinite battery charge capacity. The nominal voltage is selected so that it is more than sufficient to supply the voltage to the DC motor and the H-bridge blocks.
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 positive and the negative terminals represent the terminals across which the current sensor is inserted in to the circuit the third port outputs the hysical signal and in this modelit will send the signal to the controlled current source from the above pictur we can see that the current source is embedded in between electrical side of the DC motor and H-bridge The current sensor can be connected from its physical signal port to the remaining components in the battery system including an electrical reference block


SOC & Current :
SOc stands for state of charge and it is a measurement of the available charge in the battery when a battery is fully charged it is considered to have a 100% charge conversely 0% charge if fully discharged In this EV model measure the current and the SOC battery as the simulation is run For this use a scope block which shows the output signal we wish to measure as a plot against time 2 scopes have been one for the current and the other is for SOC in order for this to be measured we need to use a 'PS-Simulink converter' block This is because the current signal is a physical one and we are measuring it as a logic signal in the SIMULINK workspace.

SOC Subsystem :
To measure the state of charge of the battery a subsystem was created of various blocks. The first block is the 'Rate transition' block and it is used to handle data transfer between different rates and tasks. Next a 'Gain' block is used in order to multiply or divide the signal coming from the rate transition block. In this case the gain block will divide the current signal with the ampere rating of the battery which has been taken as 80Ah multilied by 3600

Then a 'Discrete - Time Integrator' block is used to perform a discrete integration of the current signal with respect to the time. A constant block is used to represent the initial SOC of the battery Assuming that the battery is always fully charged when performing a simulation alter the constant block with a value of 1 representing 100% Next a 'sum' block is used to perform addition and subraction operations. The signal from the 'Discrete time integrator' block will be subracted from the constant block representing 100% charge. Thse components are connected as shoen below

These blocks are then made in to a subsystem called 'SOC Estimate' and linked with the battery circuit using the PS-Simulink converter block to plot the output signal of the SOC from the SOC subsystem. This is shown in the image below:

Speed Measurement :
In order to measure the speed of the EV model we need to use the scope block once again. Modify the scope block to have 2 input ports where one port takes the output signal from the drive cycle to the reference velocity and the actual velocity of the vehicle to see how they compare with each other.
Distance Measurement :
Use the scope block and the mathematical operator blocks to measure the distance travelled by the vehicle according to the drive cycle data. The area under a velocity time graph tells us the distance travelled. Implement the integrator block to integrate the velocity signal that is output from the vehicle subsystem. From the integrator block we need to use 'Divide' block along with a 'COnstant' block having a value of 3600 in order to convert the divide the integrated speed signal which is in kilometers per hour by 3600. This will give us the distance travelled in kilometers. Finally a 'Display' block is used to show the distance travelled as the simulation is run.


If these blocks have been added to the workspace added to the workspace they can be connected as shown in the image below

Results :
Run the WOT drive cycle for the EV model and take the the outputs given form the speed current and SOC scopes the distance travelled by the vehicle in the drive was also measured using the display block. Before running the 'Stop time' for the simulation was the first set to 30 seconds which is the duration the customized drive cycle.
Speed scope :

From this scope we can see 2signals. The blue signal represents the reference signal which originates from 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 at t=5sec. This is supposed to maintained til t= 20seconds to 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 vehicles motion to deviate from the drive cycle commands. Other factors include the vehicles 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 modeled 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.
Current scope : 
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.
SOC Scope :

The 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.
Model Parameters :
1)vehicle body parameters :

2)

3) tire parameters

4)

5)

6) Roling resistance parameters :

7) Adavanced

8) SLip parameters :

9) Meshing Losses :

10) Shaft parameters :

11) wind velocity parameters :

12) Road Incline :

13) DC motor :

14) DC motor :

15) H- Bridge :

16) H- Bridge :

17) H- Bridge :

18) Controlled PWM voltage :

19) Block parameters:

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 WOT 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 was run 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. The discrepancy between the reference velocity and actual velocity of the vehicle may be attributed to a variety of factors e.g. vehicle inertia, transmission system, transmission inertia. If the EV model was designed in such a way as to improve upon those factors, the model would follow the reference signals more closely and would improve the performance characteristics as well. The distance travelled by my EV model was measured at 0.1106km and seems to be an appropriate value based on the WOT drive cycle used.
I had observed that the SOC of the battery used in my EV model did not get discharged in a way I had expected it to. This could be because the drive cycle commands did not push the EV model to its limits or it could be due to the fact that the battery model was very efficient and was suitable for the driving application. My EV model had also included some actual features of EVs such as regenerative braking and this was evident in the current - time and SOC - time graphs whenever the EV decelerated. If the duration of the WOT drive cycle was modified to be longer, I could have seen my EV model exhibit its true performance characteristics. For instance, the EV model may achieve its top speed and it may also have been possible to see the time it takes for the vehicle to decelerate from that top speed and hence the time taken for the acceleration e.g. 0 to 60 kmph.
My EV model has been attached to this report as a .slx file along with the velocity, current and SOC plots obtained from their respective scopes.