Introduction to EV battery Modeling and Simulation

Committed to Your Career Growth in EV
Prepare for Success with Globally Renowned Industry Veterans

Globally Recognised Certification. 15 Years of Legacy. Get Hired by Top Companies

EVacad professionals
EVacad professional
EVacad professional
EVacad professional
EVacad professional
High-paying EV jobs waiting for you!! Learn More..
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Introduction to EV battery Modeling and Simulation

An introduction to battery modeling and simulation, its application for electric vehicles & how you arrive at the right specifications. Read more...
last updated
September 7, 2023

This is video and transcript of pManifold President Vikrant Vaidya providing an introduction to battery modeling and simulation, its application for electric vehicles, and how you arrive at the right specifications through virtual model-based simulations.

Vikrant Vaidya: Welcome to this introduction to battery modeling and simulation, where we take you through its application for electric vehicles. In this session, you will learn how we can arrive at a solution for electric vehicles using different decisions. So let us go through what those are at the outset, and then we'll see how we can make those decisions through virtual model-based simulations.

Battery selection, configuration and integration

So any battery consists of cells. A unit cell is basically an anode and a cathode with iron conductor, also called as electrolyte, as well as the charge conductor which is outside the cell, and it flows across the load.

So this unit cell basically will make up in a configuration of series and parallel cells - will make up a battery pack. And this battery pack will be integrated into the rest of the vehicle. The battery pack is supposed to provide power to the traction unit or the motor, and also to the auxiliaries like HVAC, if there is a vacuum pump for boosting the brake pressure in four wheelers. 

And then there would also be illumination, which is common across all vehicles. So your headlights, tail lights, brake lamps, indicator lamps, and so on. So all that will be powered by this battery through different conversions.

So a motor will require a high voltage DC to either a high voltage DC or a high voltage AC, depending upon which type of motor is there. Then your auxiliaries will require a high voltage DC to lower voltage DC conversion, at the minimum. So how do we understand the requirements which we need from this unit cell?

So for that, we have to go from the pack level, or from the vehicle level, down to the unit cell level. How do we do that? So at vehicle level, we would have to do the integration based on their targets, which would be for vehicle performance - for charging and regeneration, and for thermal and aging.

And with those considerations, what we'll do is have pack configuration. And then again, the vehicle performance requirements will dictate the power and energy ,along with the charging and regeneration as well. So these two will determine the power and energy requirements. And then things like charge balancing. This is just an example - it will play a role in thermal management as well as aging.

Types of Lithium-Ion batteries and chemistries

I have to select the chemistry, or select the sub-chemistry as we call it, because even lithium-ion batteries come in different flavors. Lithium polymer, then NMC. There are many lithium ion batteries as well. So which of the chemistries are best suited will be determined based on your requirements for energy and power density, for reliability and robustness, and for cost, obviously.

So how do we understand these requirements so that we can cascade them down this channel to understand what sort of chemistry and what sort of pack configuration we need? So there are two ways to do that. One is you have some rough calculations, then build a prototype, test it, come back with the test data, re-work. If you have any non-compliances, then go back to the prototype, update the prototype and do it. So this is an iterative process and it'll take a long time if you work with physical prototypes. 

Advantages of virtual battery modeling

So where the virtual model helps is it can save us a lot of this iterations on the physical prototypes by doing a lot of this stuff into virtual simulation.

And you can have virtual models of anything, right from the vehicle, the battery pack, and the unit itself. So all three can be modeled, and they can be studied for different aspects of your decision making. And with those results, you can at least move forward in the right direction, in the right orientation.

So that you don't have to literally come back and redo your battery chemistry. For example, just because in one of your iterations on physical prototypes, it seems like the one which you have selected is not adequate. So at least these kinds of decisions can be taken in a robust manner. And as you refine these models better and better to a higher accuracy, to a higher fidelity, you can base more and more of your decisions on the virtual models itself, where you only leave the final validation model on the prototype.

Battery prototype validation 

Rahul Bagdia: In the earlier slide, if I have to just summarize for the benefits of participants, there are some questions. So like for example, there is a three wheeler, right? And the vehicle specs of three wheelers from the customer requirements are given.

And if this is already an existing three wheeler, for example, so internally, some of the battery specs and other things will also be known. So the participants will be able to, kind of, take those inputs, feed into, learn into kindof modeling from the customer requirements to vehicle requirements.

From there, be able to design what kind of energy requirement this vehicle for its configuration and road conditions will require, and that you'll further cascade down into the series and parallels of the cells, and what types of the cells, right? Right, right. So I, I have, I have…I'll answer this question in more detail in the coming slides.

Vikrant Vaidya: So, but you are right. That's how, that's how we would go about doing it from the requirements of the vehicle.   now it's a very good point you brought. Vehicle performance is not just the objective targets that we see under standard test conditions and so on. But vehicle performance requirements are basically what is required in terms of the customer, or the end user and not just the standard validation that we would have. 

So yeah there is a lot of thought that has to go into what these targets are, and what they're based on. Are they based on standard conditions? Are they based on real life conditions? To what extent the real life conditions, in the sense what kinda driver are you accommodating? How much aggressive or mellow a driver you're accommodating and so on. 

Rahul Bagdia: Sure. So the, the battery management system, the BMS controller design part of it, Vikrant, in terms of this red and blue diagram, they'll be kindof coming into both of them. Some aspects which will be built in, into the virtual battery model. Right? 

Vikrant Vaidya: Right. So I always think of controllers as the things which bridge the gap. The final gap between what is the requirement from the hardware, and what it is capable of. First, we go through the hardware selection, and we select a hardware which is within the - what we call bandwidth of the controller capability.

So what I mean by that is, my hardware, if it is capable of giving me, say 200 kilometers range plus or minus 50, Okay? Now if my target is say, 320 or 330 kilometers, then I will have the controller do the rest of the optimization to move my mean from 300 to 330, for example.

However, if I choose hardware which is capable of only a hundred kilometers range, there is nothing the controller can actually do to bring you to 300 or 330. So it is always how much robust is your hardware decision that helps your controller to get you - achieve the targets eventually. 

Rahul Bagdia: Sure, sure. The reason I asked that question, Vikrant, is that based upon the inquiries that we received from globally for this course with our other inquiries, they have asked like, what details of BMS design or coding and other parts that we will be undertaking in this course.

And so that's what I want to highlight in very early start of the program, that this is not a hardware design course where we'll be either learning about how the battery is assembled or neither we'll go into like how to actually code the BMS. This course is different. This course will help you look into the EVs as the requirement.

Which you want to run with a battery. So this course will help you select a right battery design, right? Constituting and incorporating all detailed design elements which are practical for you to select a right battery pack for the course. And the second element, which Vikrant is highlighting - this course will help you embed those controller design techniques. Right?

Including regeneration, including charging, including range optimization, including cell balancing, including live balancing, including SOC and SOH determinants over time and how it'll vary, and incorporating them into your modeling and controller design so that you have the know-how of the requirements which you want your software engineer to work when they design the BMS, right? So that is. I want to make it very, very clear at the upfront so you have the right understanding. And then with that understanding when Vikrant is peeling off other layers and explaining how do we go into the details that I look for.

Vikrant Vaidya: Yeah. Yeah, yeah, yeah. So, Very good. The expectation setting is extremely important here. So and that is the purpose of the demo session as well, in addition to what is our mode of delivery and what kind of material we use and all. So this is a glimpse of that. However as Rahul said, the purpose and theme of the training program is to understand how to integrate the battery along with its hardware and controller into an application of electric vehicles. Electric vehicle could be any vehicle.

But we do not go in depth, as you said, of manufacturing of the battery or the…we do go into some depth of how the battery works, the electrochemical and electrical models. And then we go to the pack level, and then we go to the vehicle level. And yes, we also look at the controller. What are the different controller functionalities in the BMS that help you get the best out of the battery while it is working in tandem with other systems in the vehicle.

EV application - Energy Density

Okay, so one of the major challenges   that we face in terms of integration of the batteries is we have a huge mass of legacy customers moving from ICE engine vehicles to battery electric vehicles. And I've tried to point out in this graph why this becomes a big integration focus is the kind of energy density that is expected out of… and if we look at the battery capacities. That's something which tells us that this integration will have to be approached in two ways. One is obviously trying to find a market which doesn't require this kind of energy density, and it exists obviously. 

And also look at other business models of how we can still leverage the strengths of the battery electric vehicle to overcome some of these challenges. So you are seeing this graph and you probably wonder why I'm talking about a challenge here, because this would seem pretty well matched. But if you notice the scale here is a log scale, not a linear scale.

And the reason why I put a log scale is. Because on a linear scale, it's hardly visible. The batteries are hardly visible here. And that is why I had put it on a log scale. But now you have the perspective of how it compares in a linear scale. It is literally one order of magnitude from the energy density of the liquid fuels.

And unless and until we accept and work with that, you will end up setting wrong expectations. And that is extremely, that can be extremely fatal to the product. So in terms of the battery usage. So, the EV battery will discharge when the vehicle is accelerating or even going at a steady speed with zero acceleration. To maintain a certain speed also, you need some amount of effort from the motor.

EV application - Charging and discharging modes

So the motor will run by drawing the current from the battery. Then the vehicle accessories will also be a load on the battery, depending upon which type of vehicle. Bare minimum, if there is a battery cooling that, and illumination.

And if it is a four wheeler or a bus or a truck, they will have other auxiliaries as well, like air conditioning and steering assist and brake assist and so on. So these are the things which will have, which will suck the energy out of the battery. And how the battery gets charged, will battery gets charged when the vehicle is decelerating, that is regenerative braking or regen braking as it's called.

Then if the vehicle is stationary and is connected to a charger, whether it's a slow charger at home, or it's a wireless charger or slow charger at office, and so on. Or if it is a fast charger, if the vehicle is capable of charging with a fast charger. So they would have dedicated charging stations, maybe OEM operated, maybe public charging stations and so on.

So these will, this is what will recharge the battery. So how do we understand? 

Rahul Bagdia: So I just want to make a point to everyone, like, this all charge and discharge use cases is something that as part of this program, you'll learn to model it as a load onto the battery, right?

Vehicle on-route energy calculations

So you'll have a battery model, and these are different loads which will be acting on the battery. And that will determine different usage or charging of the battery, right? And that needs to be controlled with the right algorithm and right control design, right? Intervention. And those things you will be able to model, understand, and see yourself in the course, with the right modeling. And that is what this course is about.

It'll help you to really understand like, okay, these are the different use cases. This is how the air conditioning, when it interacts with the battery, puts a load on it. So, however realistic, we will model the air conditioning load coming onto the battery. You'll be able to see, like, how it impacts the battery, right?

And then you will have to design a right control intervention, either on the air conditioning cycle or on the battery cycle, or combine on both cycles and see, like, how you are able to get better and improve vehicle efficiency with all these different loads operating. And that becomes a requirement and also a control design principle that will then have to be coded into the BMS by software team. 

So I want you to look into the last slide from that angle, that all these are different use cases that you learn to model as part of this program. 

Vikrant Vaidya: Yeah. So as Rahul was explaining, how do we model that? I'll just give you a calculation flow.

Eventually we'll learn how to make these models in Excel or Scilab or Matlab, Matlab Simulink. So based on which tool is accessible and available. So the energy calculations are basically for vehicle, so as we saw in the first slide, we move from vehicle up to the battery.

So the inputs that we need for our vehicle model is what is the speed profile that the vehicle is going to follow? Some representative speed profile. It could be a standard speed profile from regulation cycle, or it could be a user profile, a real world user profile that you have identified to be the representative one.

And using that user profile what you can calculate is various forces that are acting on the vehicle, and using those forces you will, you'll balance those forces and to get the acceleration - desired acceleration or maintaining the desired speed, you would have a propulsive force required.

And that into vehicle speed is basically the power required at the wheels. Right. And power is nothing but energy per time, per unit time. And if you integrate it over the cycle time, what you get is the propulsive energy at wheel. So now this is energy at wheel required to move the vehicle. In addition to that, we would have accessory loads, as Rahul was talking in the previous slide, which will be air conditioner in case of buses and trucks and cars.

Lights would be there for everyone and so on. So whatever are the accessory loads. And then of course you also need to account for driveline losses. So there could be gear drive, there could be drive shafts, there could be CV joints and so on. There could be even some wheel efficiency. So all of these considered, what you would get is the energy required from the battery.

So there will be when, when the energy leaves the battery it's going to get reduced when it's converted to mechanical energy by the motor. Then it further gets reduced when it is transferred from the motor to the wheel. And then from the wheel to the vehicle acceleration, you would have, again, vehicle level losses, which is rolling resistance and drag.

And if it is going uphill you would have gradient forces to tackle. And whatever is left is actually going to give you the acceleration for the vehicle. And of course the battery will also continue to drive simultaneously the accessories.

Battery use cases and energy requirement - standard cycles

So different use cases. Again as we were talking about, there are standard cycles which are used across the globe. US uses a cycle called EPA. There are other cycles as well in US. India has a unique distinction of having a dedicated cycle for two wheelers and three wheelers. Then buses tend to have different cycles, so I just put any bus cycle as an example. But there are many such, depending upon various cities and traffic conditions.

Then there is this new European drive cycle, which is applicable to passenger vehicles. And then we also have efforts on making, at least harmonizing all the passenger vehicle cycles around the world, to one transient cycle which will be the WLTC cycle. So all of these you can feed into the driver of your simulation model as the target speed. And driving through PID controller which represents both the accelerator and the brake pedal. We can actually simulate the vehicle over these cycles and get the energy required for…doing that particular cycle. And then the energy efficiency as well, which is kilowatt hour per kilometer. 

You could also do the same exercise on real life vehicles. Real life data. So you could actually measure different drivers by using GPS dongles, which will give you the GPS location and vehicle speed. You could also use onboard diagnostics dongles - OBD2 dongles, and used to collect the data on vehicle speed at the minimum. And then you, if you.

Again, you can feed this into the driver model in a simulation as the target velocity profile. And you can generate the energy requirement as well as energy efficiency for that particular real life use case. So, as long as we know how to generate the data that is required as input to the driver, which is velocity versus time at the minimum.

And then if you have access to the road profile, that also can be put in and you can actually understand how different routes affect the energy efficiency and the range, how different drivers affect energy efficiency and range, how a mixture of those two can affect the range and so on.

Rahul Bagdia: So I also want to take this point, like, pManifold EV Academy, we are already offering another course, which both me are teaching. That is on Electric Vehicle Systems Engineering, right? So there we actually go into the much detailed aspects of each of these subsystems, including motor modules, brake modules, thermal systems, thermal cooling systems, the entire vehicle model, model it in Excel, as well as in Scilab, and be able to do all these dynamics right?

And be able to study in the model. So some bit of it very relevant to the battery model design will be taken up in this further advanced course. And we actually be building the further detail about it in the battery controller design algorithms and others, as part of this program. But we wanted you to understand when you are making a judgment and selection between two courses, that say are Electric Vehicle Systems Engineering Course versus this one.

So you could be doing both the courses. So you could be actually doing first EV Systems engineering course, and then actually be taking this advanced course with jumping more into the controller design and building up the project work that you initiated in that first program. And diving into the much detailed aspects of the battery modeling and controller parts.

But there is another way, like, if you already have an experience and a specific use case with a requirement to focus on the battery, you'll actually be learning it - shortcut version of the detail modeling, and then taking it as a base, then working more upon the battery part of it. So both are welcome, depending upon your objective and where you stand.

And we'll be happy to kindof separately discuss with you to understand, with your skillset. Would this course be directly - can be taken up, or you will be better off taking our systems engineering program and then come to this advanced battery focused modeling and simulation program?

Vikrant Vaidya: Yeah. So as Rahul said, we'll cover the required portion of the vehicle model.   We will not dwell deep into motor modeling and other aspects. We'll only focus on a good battery model and a functional vehicle model. A good battery model, we will teach different ways of modeling the battery, right from unit cell and down to the pack. And then even the pack itself,   what are the different ways to represent the physics, the transients of how the battery charges and discharges. If you're aware of one of the tests that the batteries are done with are impulse tests.

So if you supply or if you draw a lot of current from the battery, how the battery transits to providing that current - it's not a step transition. So how we model that. So those things are what we'll cover in detail in the course so that it's not just about the energy, but also how the battery would actually respond to a demand of power and energy.

Rahul Bagdia: And one more thing I would want to say, that some of the course inquiries that we have received, are the people who are well-versed in the software design aspects of BMS control design. Right? But they have designed it from the coding part. Without having much granularity, like, how this code will actually impact the end use case of the battery and the vehicle performance, right?

So there are users, there are experts with that kindof a background as well. So this course is still very relevant for those experts who understand the need from the battery design. But they would really want to understand how it impacts the battery performance, vehicle performance, and end user performance.

So this course will allow them to kindof take their knowledge and skills, apply to this modeling and simulation environment, and actually see the effects of those controls, overlay on the   battery dynamics and vehicle dynamics. 

Vikrant Vaidya: Yeah. So any controller validation, if there are people who have worked on the controller. Not just battery, any controller. The validation requires a system model, a plant model, as we call it, in controls language. So this will help you not only do a plant model, but also understand how to model the controller algorithm which can eventually be, I mean, it is the first step of model based controller development. So you model the algorithms in Scilab or Matlab Simulink, and you test that with your hardware model, which is your plan model, before going ahead with either auto coding it or coding it manually and implementing it on the microcontroller.

Vehicle simulation model for energy estimation

So, yeah this is just a glimpse of the vehicle simulation model. Just the vehicle model in a tool called Scilab, which is a free alternative of MATLAB and Simulink. So this is very similar to Simulink as people who have worked on Simulink could observe. And we prefer this in our class so that everyone has access to this tool.

Vehicle simulation model for energy estimation

Anyone of you can download this tool on your laptops or desktops and you can install and work.   There is no…it's a free license. And even if you use it professionally - it's fine as long as any announcements to the tool, not the model, but the tool if they are done, they have to be in open space.

However, the model - will be your own - ownership. You'll have ownership of your model. So that's why we chose Scilab. But you are free to use Matlab if that is accessible to you and you are conversant with it. I have experience in Matlab, so it is not a problem to transition between the two.

So basically a vehicle model, as I said, would give you the first requirement of energy. Example of energy. The same is true with power. The same is true with light, and so on. So how we do it is the way I explained it in in the previous slide. You just do a force balance, and whatever is the prop you force is required, that is what will determine your energy - the power. And then integrating over the cycle will give you the energy, and that energy and then the distance will determine what is your energy efficiency. And it is all driven with respect to what is your target velocity profile to the driver.

Some of the energy calculations are done from wheel up to the driver or up to the battery. They're called backward calculating models. However, they are not so useful when you want to study driver to driver differences because there is nothing called vehicle speed error in that. Because for meeting that speed or that acceleration, what is the power required is what is calculated instead of adjusting the accelerator pedal, and trying to achieve that acceleration, which is what we all do when we drive.

So it's not a backward calculation in real life. So we also prefer this way to calculate in the virtual models.

So that's what I had in this demo session. I hope that provides a glimpse of what is there in this course. Some of the things I also verbally conveyed, the battery models will go much deeper into what are the different models, what level of detail we can build into the battery, as well as the battery pack. 

And if you have questions, welcome. We’ll answer those now. 

Rahul Bagdia: So Vikrant, before we take questions, if you can also quickly talk about…briefly, the number of sessions, time of this course, particular battery modeling course, and what will be the kind of project work that you and research participants to go into more details through this program. Maybe that will be useful to initiate some more discussions and questions from the participants.   

Experience-based EV training program

Vikrant Vaidya: Yeah. So we would have three days a week model of sessions. So in, if you have attended any of our past training programs, we would have theory and practical sessions separated.

However, in this course, I think it is better to do the theory and immediately try and implement it in a Excel model or a Scilab model. So it'll be a hybrid session of theory and practical. We will be running those alternate days of week - Monday, witness Day and Friday  6 to 7:30 PM, India time.

And  we would have a couple of practice sessions on Saturdays, depending upon the need of the batch. We'll  do practice sessions if required on Excel as well. But  we'll definitely do it on Scilab to make people conversant with the tool, how the blocks are used, how these models are created. So that from the next session onwards, they can catch up and start making those models right in the class.

And this will help you learn with what we call as experience-based learning. So if we just tell you how to model it it, it will not be assimilated 100%, but if you yourself do it, you not only will understand it, you will also be confident of doing it on your own.

And that's one of the primary motivations of this course.

Rahul Bagdia: So what will be the total duration of this program? Vikrant, like every week three lessons?

Vikrant Vaidya: Yeah, four weeks of sessions. And then we will have a final exam, which will be in terms of a multiple choice quiz. And then we also, as Rahul was mentioning about the project. So we'll have project work in which you will have to pick an application.

If you can't, we will assign it to you. Application for battery sizing and modeling, and really fitting end to the product development. Not just for the sake of doing the battery modeling, but it'll be tied up to the product development, one of the product development decisions, if not more.

And you would have to use the models like your physical prototypes, first model them, then use them to generate relevant data points that will help you make recommendations for that decision. So that is the outlook of the project that we would expect you to take up. And then there would also be assignments for each module.

So there are three modules. The first module is the battery basics. The second is the controller.   And the third module is the simulation and understanding the results. So modeling, simulation, and understanding the results. That's the third module. So each module will have assignments.

So there will be three assignments, and there will be a week's time to do those assignments. All those assignments will also be focused towards having you understand different aspects of modeling the batteries as well as the vehicle. 

Rahul Bagdia: And me and Vikrant, we prefer to scare people in terms of letting them know the extent of depth and the hard work and smart work that will be required.

And we have a reason for it. Like this is a four weeks sharp program for really the people who are not just coming to listen. So it's not any kindof a podcast. You listen, you don't listen and that's okay. This requires…this is a serious learning. And in fact in our previous batches that we have completed on the other programs, I always, at the end, I ask the participants like, do we, should we cancel the project work?

And the unanimous answer that every batch has given us so far, in last five, six months of our work in trainings, everyone has said ke, Sir, it is because of this project work that we have learned so deeply and differently in this program, which otherwise does not happen. So be ready for the hard work in terms of the assignments, the projects that you have to do with self modeling.

There will always be hand-holding, there will always be support, all questions, any types will always be answered. We will make those extra times to work with you to really get speed up, if Scilab is not something that you have worked earlier, but that kind of hard work from your side is kind of warranted and required on the program.

So do keep that in mind. That it's not a podcast, short learning program. It's a deep learning program. So yeah, so as I said, like we want to scare you off. So only the filtered hard ones who are really sincere about utilizing the learning from this program will actually find and meet their objective with this setup.

We do also encourage, to also speak to our past participants from our previous programs. If you need, we'll be happy to introduce you to any of them.

Our past participants with…we have people from global, in Africa, in Latin America, we have people coming from different OEM backgrounds who have 30 plus years of background in OEMs, already doing and designing EVs including, and they are also learning and learning it in a very different form.

We have students as well, so like who are like third or final year of your engineering and first time getting introduced to Scilab, but they have also kinda of performed quite well through the learnings the program. So we have a very mixed batch, and we have seen that only because of their hard work and strong reason. 

I think you should have a very, very strong reason why you want to join this course. First, it takes you big money. It's not a short, low value course, But  it will take you into another orbit altogether with your learnings and applied skills on EVs. So that that is the kind of forewarning I would say that we would want to give you. 

EV jobs waiting for you!!
Apply Now
Speak to our EV Career Guidance Expert
Future-proof your career!  Learn from the best in EV Design & Technology.
Get Started!
Browse evACAD Programs
Browse evACAD Programs