All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Introduction - Electric vehicles (EVs) are automobiles that use electrical energy to operate. A motor/generator, motor controller, power converters, wheels, and batteries make up an EV's basic structural elements. The power is necessary for the wheels to move and produce traction is provided by the electric motor.…
Krutesh Bedekar
updated on 02 Feb 2023
Introduction -
Electric vehicles (EVs) are automobiles that use electrical energy to operate. A motor/generator, motor controller, power converters, wheels, and batteries make up an EV's basic structural elements. The power is necessary for the wheels to move and produce traction is provided by the electric motor. The quantity of power given to the motor is managed by a combination of the motor controller and power converters. The electrical energy required to run the motor is stored in the batteries.
Internal combustion (IC) engines, which are used in conventional automobiles, are propelled chemically by fossil fuels like gasoline or diesel. Despite having a number of drawbacks, traditional automobiles continue to make up the bulk of all the vehicles in use worldwide. For instance, those cars' gaseous emissions, like carbon dioxide, can harm the environment by causing air pollution. According to reports, these dangers are connected to global warming. Additionally, demand for conventional automobiles will last only until all fossil fuel reserves have been used up. An exhaustible fuel source, fossil fuels have harmful environmental repercussions both during production and use. The tremendous energy density of fossil fuels is their main benefit. Fossil fuels are good for efficiency because they can store vast amounts of energy per unit weight or volume. EVs use electrical energy that is stored in batteries as their power source, but even battery technology hasn't yet been able to match the energy density that fossil fuels might provide.
In this project, I will model an EV in SIMULINK using the powertrain blockset and simscape blocks. This model will implement speed control using a PID controller block. The input to this model will be a Wide Open Throttle (WOT) drive cycle. The output of this model will block that shows the total distance traveled by the model and the speed of the vehicle during a 30-second simulation period. The speed data will reflect both the actual speed of the vehicle and the command speed from the drive cycle data.
Energy storage-
When we talk about the ICE vehicle the energy is generated by burning the oil to produce energy to run the engine. But in the case of electric vehicles which is being promoted to reduce fossil fuel-based (ICE) vehicle, so we need a battery for the storage of electric energy for the EV to move/function. The conventional Lead acid battery lacks the requirements for an EV.
So to replace Lead-acid battery Lithium-ion battery is used. Li-ion battery comes with various advantages over the Lead-Acid battery as it is lighter, less toxic, and has a much higher energy density, which makes it a favorite choice for the Energy storage unit for EVs.
Types of Li-ion Batteries on the basis of shape:
The Motor
The brushless DC motor (BLDC) or the induction motor determines the power and performance of electric cars. Induction motors and DC brushless motors are used to replace direct current (DC) power sources. Also mentioned earlier for EVs, lithium-ion batteries also take the place of lead-acid batteries. Because the needs and applications of both components—brushless DC motors and induction—determine their future.
Controllers, Conversion, and mechanism
Batteries are used to store the electrical energy needed to power all of the systems and necessities of an electric vehicle (EV). Energy from the battery is converted by power converters into a form that the motor can utilize. This conversion can be done between two separate DC to DC or AC to AC magnitudes, or it can be done from AC to DC or vice versa. Electrical devices known as motor controllers manage the amount of power supplied to the motor so that it performs in accordance with instructions. The car is moved forward or backward when it is moving thanks to the motor. The generator functions in the exact opposite manner from the motor while being a part of it. While braking, the vehicle can generate electricity and send it back to the battery to recharge it (regenerative braking). The transmission system determines how quickly the vehicle may change speeds when it accelerates and decelerates. Road traction is determined by the wheels, which can either be FWD or RWD depending on the engine (forward or rear-wheel drive). When a vehicle is an RWD, the back axle wheels of the vehicle provide propulsion while a vehicle only has front axle wheels that do so (i.e., rotate as a result of engine effect). In all-wheel drives (AWDs), the wheels on the front and back axles work together to propel the vehicle.
1) System Level Configuration:
The Model of an EV is simulated on Simulink using Power Train Blockset and other required blocks for an EV, such as DC motor, battery, Vehicle body, Tires, Longitudinal driver, etc.
Firstly, I have simulated the EV model using the following components and their specifictions:
DC Motor:
In this, I decided to utilize a DC motor block as the motor for the electric vehicle model. This is due to the fact that DC motors are simpler to model and require fewer modifications depending on the application. The DC motor block as shown below:
The block has two sides, the mechanical side on the right and the electrical side on the left, as we can see. There are 2 ports on the mechanical side: C and R. The C stands for the casing, while the R stands for the rotor's spin, which generates torque. For applying voltages, the electrical side has a positive and a negative terminal. A positive torque will occur from the C port to the R port if a positive voltage is applied to the DC motor block from the positive to the negative terminal. By altering the sign of the back emf or the torque constant, the direction of the torque generated by the DC motor can be adjusted. Because it will be stationary, the C port of the mechanical side needs to be attached to a mechanical rotational reference as shown below.
The open connection of the basic gear from the vehicle body block will be connected to the R port. The positive terminal of a power converter, which in my case will be an "H bridge," is connected to the positive terminal on the electrical side.
Power Converter:
The power converter is required to transfer power from one component to another in the proper form and amount. In the case of electric vehicles (EVs), a power converter is required to supply the DC voltage from the battery of the EV to the DC motor in order for it to function properly under the necessary conditions. I used an H-Bridge motor drive as my power converter, as was previously indicated. The H-bridge block is shown below,
The left side of the H Bridge is used to control voltage signals, while the right side has terminals that supply the controlled voltage to the DC motor. The H-Bridge block's left side ports are as follows:
Controlled PWM Voltage:
In order to supply a regulated pulse width modulated voltage to the H-Bridge block, I have next employed a "Controlled PWM Voltage" block. PWM and REF ports on the block, which feed into the identical ports on the H-Bridge block, will be used to output the PWM voltage. In the case of a low pulse, the output voltage is set to 0V, while in the case of a high pulse, the output voltage will be equal to the output voltage amplitude, which was set to 320V in the H-Bridge block. The duty cycle, which is the ratio of the time the switch is ON to the time it takes to complete one cycle, determines the voltage pulses that are produced by this block (which is the time for which the switch is ON and OFF). The regulated PWM voltage block's input determines the duty cycle.
the formula for the duty cycle is as follows:
where
δ is Duty cycle
Ton is ON time
Toff is OFF time
Tcyc is Time taken for 1 Cycle
The Controlled PWM voltage block is shown below,
Controlled Voltage Source:
Because they need a controlled voltage source to supply the voltages to make the voltage pulses that must be sent into the H-Bridge, the input ports of the controlled PWM voltage block are still unconnected. I have the regulated voltage source block for this. This block is advantageous because it will supply the required voltage, which is strong enough to keep the output voltage constant regardless of the current flowing through it. The controlled voltage block is as shown below,
This model has 2 controlled voltage sources. One block is to provide the voltage for the acceleration of the vehicle and the other is to provide the voltage for the deceleration of the vehicle.
Electrical Reference:
A grounding effect is produced for electrical circuits using the electrical reference block. There must be at least one electrical reference block in each model that has electrical or electronic components. Below is a diagram of the electrical reference block:
Solver Configuration
The solver configuration block is used to solve any necessary equations in a model and in my case, I have used them in the connection to the 'REV' port of the H-Bridge block. The solver configuration block is shown below:
Below shown is the sub-section of the model in which these above-defined components are used:
Vehicle Body:
The vehicle body is 6 port blocks,
Each port has a specific role in the functioning of this block
Wind (W) and Slope (beta):
As was already indicated, using the "W" and "beta" ports of the velocity block, we may simulate the impacts of wind resistance and road incline, respectively. In order to simulate the effects of wind and road inclination on the motion of the car, I used a "PS - Constant" block in my model. I have a steady signal of 5 m/s for the wind effect, and this functions as a headwind, which is the opposite of the direction of motion. I have consistently signaled 0 for the road incline.
Tires:
The "magic formula" tires are the ones utilized in this electric vehicle model. There are a variety of tire blocks that may be used to mimic a vehicle, but I've chosen to utilize the ones that use the magic formula since they let us simulate the longitudinal behavior of car tires on highways. Additionally, they enable us to mimic additional effects like tire inertia and stiffness, which improves the accuracy of situations encountered in the actual world.
The magic formula tire has 4 ports
Shown below is block parameter for Tire block:
Gear:
A gearbox known as a "Simple Gear" is a final drive ratio that limits the coupled driveline axes of the base gear and the follower gear.
B: The input of DC motor R is coupled to output B, base gear. A rotating mechanical conserving port is what it is.
F: The rear axle is coupled to the F follower gear's output. A rotating mechanical conserving port is also present.
Shown below is block parameter for Drive ratio/Simple Gear Block:
Side Shafts:
To give the straightforward gear block the ideal mechanical rotational inertia, an inertia block has been added to the workspace. The positive orientation of the block is from the port to the reference point, which in this case would be the basic gear, and this block has just one mechanical rotational conserving port. When inertia is accelerated in a positive direction, the torque produced by it acts in that direction.
Shown below is block parameter for Side shaft:
Velocity Subsystem
The velocity port that outputs the vehicle body block's velocity signal has undergone modification. The vehicle body block outputs a velocity signal by default that is expressed in miles per hour. I created a little subsystem from the velocity port's output to modify these units. The following blocks are utilised by this subsystem:
Zero-order hold = 0.01
Gain = 1.61
Slip Subsystem:
Vehicle Body Subsystem:
SoC Calculation Subsystem
An intricate subsystem made of different building blocks was developed to gauge the battery's state of charge. The 'Rate Transition' block, which is the first block, manages data transfer between various rates and tasks. The signal from the rate transition block is then multiplied or divided using a "Gain" block. In this instance, the gain block will split the current signal by the battery's ampere rating, which has been assumed to be 80Ah times 3600. (seconds in an hour).
To discretely integrate the current signal with regard to time, a "Discrete - Time Integrator" block is utilised. The battery's initial SOC is represented by a constant block. In order to simulate a situation where the battery is always completely charged, I changed the constant block to have a value of 1, which stands for 100%. After that, operations like addition and subtraction are carried out using a "sum" block. The constant block indicating 100% charge will be deducted from the signal from the "discrete time integrator" block.
Shown below are the block parameters of this subsystem:
Battery:
Li-ion battery
The battery will be the energy store of the EV and will contain the electrical energy in DC form and provide this energy to the DC motor for it to operate. So we can say that EVs are primarily driven by a battery. The battery block used is a simple one and considers only the basic parameters. The battery block is shown below:
Shown below is Data input for Battery
Controlled Current Source:
The battery system utilised in the EV model includes the regulated current source block. This block will represent an ideal current source that is strong enough to sustain the desired current regardless of the voltage applied across it, like the controlled voltage source.
Current Sensor:
The current sensor block is used to transform the current sensed in an electrical circuit into a physical signal that is proportionate to the current. It represents the ideal current sensor. The battery circuit, a controlled current source, and the DC motor's current are both measured using this block. Below is a diagram of the current sensor block:
Longitudinal Driver:
On the basis of two sets of data, the longitudinal driver block is utilised to send a controller normalised acceleration and deceleration signals. The reference velocity is represented by the first data set, and the feedback velocity by the second. Below is a diagram of the longitudinal driver block:
The longitudinal driver block has the following ports:
The longitudinal driving block has an easy-to-understand mechanism. The feedback velocity data from the vehicle body block is compared to the reference velocity data from a drive cycle source. The controlled voltage source will receive an acceleration command as an output if the reference velocity is higher than the feedback velocity. The output to another controlled voltage source is changed to a deceleration command if the reference velocity is less than the feedback velocity. for the commands for acceleration and deceleration to be output signals.
Grade:
A constant block with a constant value of 0 is linked to the longitudinal driver block's grade port. This prevents the simulation from modeling any road inclination.
Drive Cycle:
For the purpose of simulating a vehicle's motion, a drive cycle is a set of velocity and time data. The drive cycle will be a plot of the speed versus time that is designed to reflect common driving circumstances that a customer would encounter. They may simulate scenarios like driving on highways, driving in cities, driving at full power, etc. Automobile manufacturers employ drive cycles for a variety of testing techniques, including mileage, pollution, acceleration, and top speed tests. Industry standards for driving cycles include the Urban Dynamometer Driving Schedule (UDDS) and FTP 75.
In my EV model, the longitudinal driver block receives acceleration or deceleration commands based on the drive cycle using a drive cycle as the reference velocity data. A driving cycle can be implemented in three different ways. One way is to build your own drive cycle using a spreadsheet with time and velocity data in separate columns. Another approach is to make signals with a signal builder block that indicate the speeds the vehicle should travel at and the durations during which those speeds must be maintained. The final option is to use the built-in, industry-standard drive cycles for the SIMULINK library. In my situation, I used the 'WOT' driving cycle, which is industry standard. This driving cycle, which stands for "Wide Open Throttle," simulates the condition in which the vehicle is forced to accelerate at top speed, held at that speed, and then forced to slow down and return to rest.
Shown below is data used for drive cycle using WOT:
Screenshot of full EV model in Simulink in shown below:
Results:
The simulation was executed for 30 sec according to the requirements of Wide Open Throttle (WOT) drive cycle.
The following Scope results are shown below:
Speed:
This scope allows us to see two signals. The yellow signal displays the actual speed of the vehicle, while the blue signal reflects the reference signal derived from the drive cycle data. The WOT drive cycle had been altered so that the car started accelerating at t = 5 seconds under the WOT condition (i.e., at full power). This is expected to continue until t = 20 seconds, at which point the car is supposed to start slowing down. The vehicle speed drops to 0 m/s, or rest, between t = 20 and t = 30 seconds. All orders are instantaneous because this is a reference signal. This explains why the change in speed occurs so quickly, within a split second. The vehicle's actual speed won't be affected by this effect, though. This is due to the fact that there are additional factors to take into account in real-world situations, making it impossible for a vehicle to accelerate and decelerate as quickly as the driving cycle required. Because they would cause the vehicle's motion to diverge from the drive cycle directives in the actual world, rolling resistance, drag, and road incline have an impact. The inertia of the transmission system and the inertia of the vehicle are additional factors.
As we can observe 2 different colored plots the yellow colored graph is Electric Vehicle Body which can be seen rising with rising in the drive cycle plot at t=5 seconds and the same plot starts falling at t= 20 seconds as soon as the WOT drive cycle comes back to zero. The plot finally at t=30 seconds shows a speed of around 6 m/s.
Current:
As we know that the magnitude of the current is directly proportional to the Torque of the motor. Hence when we analyze the plot above the current rises with the starting of the drive cycle at t= 5 seconds to a magnitude of around 260 A. The magnitude of the currents now starts decreasing as the drive cycle is stable at 30 as seen on the Drive cycle plot till t=20 seconds because of the vehicle is in a stable drive cycle the current requirement reduces till there is further change in the drive cycle, acceleration and deceleration. Hence the current reduces till t=20 sec and then when the drive cycle goes back to zero the current also reduces to a negative value. This means the motor has now entered the regenerative zone and has now reversed the current flow to the battery.
Now after t=20 seconds it is observed that the negative value of current is now increasing towards a positive or zero value. Since the drive cycle has reduced to zero hence the current won't rise above zero, but instead, the current would be stable at zero value after some time. Another main reason for an increase in the current value is that the speed of the vehicle is slowly reducing to zero hence the regenerative current would also reduce and hence as soon as the vehicle stops the current would be at zero.
SoC:
The SOC scope displays how the battery's state of charge changes over the course of a drive cycle. Since the battery was initially modelled to have a SOC of 1 (100%) when the simulation started, the SOC remains at 1 until t = 5 seconds. This is because the driving cycle directs the car to be at rest for that amount of time, preventing battery drain. The car is instructed to accelerate in the WOT state at t = 5 seconds, which causes the battery's SOC to drop. Due to the vehicle's full-power acceleration, the SOC declines from 1 to a minimum of 0.9824 at t = 20 seconds, although the rate of discharge continues to decline over the acceleration duration. Because less energy is needed to boost speed as the vehicle accelerates, this is consistent with the current flow from the battery. As was previously indicated, the maximum discharge happens during the initial acceleration phase, when the battery is drawing the most current. The acceleration falls off as the vehicle's speed rises, which mildly reduces the current and, in turn, the rate of discharge. The vehicle is instructed to slow down at time t=20 seconds, which causes the vehicle's velocity to drop. As a result, the vehicle experiences regenerative braking, which results in a negative current flow back to the battery. The battery's SOC rises during the deceleration period as a result of the effect charging the battery. The regenerative braking action charges the from 0.9824 to 0.9858, and this is why the SOC rises so gradually. The increase in the battery's SOC is correlated with the negative current flow. The vehicle speed lowers but does not reach 0 m/s since the car is instructed to slow down until t = 30 seconds. As a result, the vehicle experiences regenerative braking for the duration of the time following t = 20 seconds.
Distance:
As seen in the screenshot above, the display block determined that my EV vehicle traveled 0.04397 kilometres during the specific WOT cycle. Since the WOT drive cycle is very brief and only requires acceleration for a portion of the time, this measurement appears acceptable and accurate. The region underneath the velocity time graph shows us how far an object has moved. A quick calculation based on the speed scope shows that this distance value is accurate.
Displacement is a vector quantity, which means it has both size and direction. It is defined as the distance in a specific direction. As a result, if the velocity data in a driving cycle were negative, this would mean that the vehicle was moving backward and thus the displacement should be negative. If the velocities in the drive cycle data were of that sort, the display block would show the same.
Conclusion-
In conclusion, the EV model was constructed using MATLAB software, and it was then simulated for a certain WOT drive cycle. The simulation provided information on the EV's speed, current draining from the battery, state of charge (SOC), and distance traveled. Because the EV model was parameterized to simulate averaged voltage pulses in the H-Bridge and Controlled PWM voltage blocks to be provided into the DC motor, the simulation was completed quite quickly—within a few seconds.
The EV model was able to carry out the instructions given by the reference velocities from the drive cycle data, despite the fact that it might have followed the reference signals more closely. The inertia of the vehicle, the transmission system, and the transmission itself can all be blamed for the discrepancy between the vehicle's reference velocity and actual velocity. If the EV model was designed in a way that enhanced those factors, the model would follow the reference signals more closely and would have superior performance characteristics. Given the WOT drive cycle that was used, my EV model covered 0.04397 kilometers, which seems to be a decent distance.
I saw that the SOC of the battery in my EV model did not discharge as I had anticipated. This may be because the battery model is very efficient and suitable for the driving application, or it may be because the drive cycle commands do not push the EV model to its limits. My EV model included several true EV functionalities, such as regenerative braking, which was noticeable whenever the EV decelerated, as evidenced by the current-time and SOC-time graphs. If the WOT driving cycle was longer, I might have seen my EV model display its true performance capabilities.
The EV model might, for instance, reach its top speed, and it might also be possible to observe how long it takes for the car to slow down from that top speed and, as a result, how long it takes to accelerate, say from 0 to 50 kmph.
My EV model has been added to this assignment as an a.mdl file, along with the velocity, current, and SOC charts gathered from their respective scopes.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Project 2
Using MATLAB/simulink and the drive cycle from the attached excel sheet, find- Time Time Step Battery Current 00:00.4 0.1 -0.9632 00:00.5 0.2 -0.952 00:00.6 0.3 -0.9072 00:00.7 0.4 -0.9632 00:00.8 0.5 -1.0304 00:00.9 0.6 -0.9632 00:01.0 0.7 -1.0304 00:01.1 0.8 -1.008 00:01.2 0.9 -0.9856 00:01.3 1 -0.9632 00:01.4…
02 Apr 2023 01:04 PM IST
Project 1
1. Design a battery pack for a car roughly 150 Kw with 120 V. Use 3500 mAh 3.6V nominal NMC chemistry cell. a. Design the battery pack configuration. Ans. Given, Battery Pack Power = 150 kW Pack Voltage = 120 V Cell Capacity = 3500 mAh Voltage = 3.6 V So now as we know, P = V*I I = P/V I = 150kW/120 V = 1250 A If the…
01 Apr 2023 08:41 AM IST
Final Project: Electric Rickshaw modelling
To Create a detailed MATLAB model of an Electric Rickshaw (three-wheel passenger vehicle). Objectives: Rear wheels are driven by PM brushed-type motor Assume the efficiency points of the motor controller and motor Make an excel sheet of all input and assumed data Results: For any three standard driving cycles show…
05 Mar 2023 08:09 AM IST
Project-1: Modelling an electric Car with Li-ion battery
Introduction - Electric vehicles (EVs) are automobiles that use electrical energy to operate. A motor/generator, motor controller, power converters, wheels, and batteries make up an EV's basic structural elements. The power is necessary for the wheels to move and produce traction is provided by the electric motor.…
02 Feb 2023 04:15 PM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.