Addressing Challenges Involved in EV Battery Modelling, its Thermal Analysis and BMS Design - MATLAB & Simulink
Video Player is loading.
Current Time 0:00
Duration 51:56
Loaded: 0.32%
Stream Type LIVE
Remaining Time 51:56
 
1x
  • Chapters
  • descriptions off, selected
  • captions off, selected
  • en (Main), selected
    Video length is 51:56

    Addressing Challenges Involved in EV Battery Modelling, its Thermal Analysis and BMS Design

    Overview

    Battery models have become an indispensable tool for the design of battery-powered systems. Their uses include battery characterization, state-of-charge (SOC) and state-of-health (SOH) estimation, algorithm development, system-level optimization, and real-time simulation for battery management system design.

    Software algorithms play a critical role in battery management systems (BMS) to ensure maximum performance, safe operation, and optimal life of battery pack under diverse operating and environmental conditions. In this webinar, you will learn how to:

    • Model battery packs using electrical networks whose topology mirrors that of the actual system and scales with the number of cells
    • Analyze thermal behavior of the battery and design associated cooling systems
    • Simulate onboard power electronics chargers along with battery packs
    • Design state observers for state-of-charge online estimation using machine learning techniques
    • Generate production-quality C/C++ code for target embedded processors

    About the Presenters

    Abhisek Roy, Senior Application Engineer, MathWorks

    Abhisek Roy is a Senior Application Engineer at MathWorks India focusing on Plant Modeling, Control Design and Automation. He has been working with Automotive customers to address their challenges in the areas of powertrain modeling and vehicle dynamics studies. His areas of interest include the study of various automotive systems and controls systems. Abhisek has completed his M.Tech in electrical engineering from the Indian Institute of Technology, Madras, specializing in control systems and robotics, and B.Tech in electrical engineering from Jadavpur University, Kolkata.

    Shripad Chandrachood, Principal Application Engineer, MathWorks

    Shripad is a Principal Engineer at MathWorks focused on supporting key applications in the areas of electric mobility, power conversion and grid simulation. For the past 15 years at MathWorks, he has helped customers adopt system modeling and simulation workflows for developing Battery Powered Vehicles, Motor Control Strategies and Renewable Energy Systems. He has also led application engineering teams and business development initiatives in the Energy Production and Industrial Automation sectors for MathWorks in USA & India. Prior to joining MathWorks in May 2007, Shripad worked as an Operations & Control Engineer with the TATA Power Company and as an Automation Engineer at Siemens, India. He holds a Bachelor’s in Electrical Engineering from the University of Pune and a Master of Science in Electrical Engineering from the University of Alabama Birmingham, USA.

    Recorded: 21 Sep 2022

    Hello, everyone. Welcome to today's webinar on electric vehicle battery systems, where we will be addressing the challenges involved in modeling these batteries, performing their thermal analysis, and designing battery management system. MathWorks is pleased to bring this one live in association with our partner ICAT, the International Centre for Automotive Technology.

    As you may know, this is the second session in the series that we are hosting this week under the theme of two-wheeler electrification. If you joined us yesterday, you probably already know the speaker lineup. But if you are joining us for the first time today, let me introduce you my colleagues Abhisek and Prasanna.

    Abhisek is a Senior Application Engineer with The MathWorks and our resident technical expert all things automotive. He's an alumni of IIT Madras, and he works with many of our customers, helping them design their electric powertrains, vehicle dynamics studies, along with many other applications.

    Prasanna manages the automotive field application engineering team and is based out of Pune. And over the years, he has worked with many startups, OEMs, and suppliers, helping them with their technical and business challenges. He will be joining us for the Q&A portion.

    And I'm Shripad Chandrachood, Principal Application Engineer focused on electrification technologies at The MathWorks. And I will be hosting today's session along with Abhisek for the next hour or so. So since this is the second session in the series, we thought it would be nice to do a quick recap of what we learned yesterday.

    So for that, I will invite Abhisek to give us a quick rundown. Over to you, Abhisek.

    Thanks, Shripad. So in yesterday's session, we started off with some typical specification that we may have for our electric two-wheeler. And we started off with some high-level requirement, and we worked towards having a motor and a battery pack design, understanding the number of cells then that we might need.

    Now, once we figured out these powertrain components, then we put together one system-level simulation model, where we had various different test cases, driver models, and controller to perform quite a few amount of studies. So we performed ride and handling analysis. And then we also performed various tests like component sizing and range prediction. And we generated quite a few plots to understand how our components are interacting amongst each other, and how everything comes along together.

    Right. So that was really neat looking at the system-level simulation and observing overall plots in terms of range prediction, performance, ride and handling. What we will do today is go a step beyond that. Right now we have the system-level picture, and we want to take a deeper dive at the component level.

    So for today's session, we are going to focus on modeling the batteries right from the cell to the pack, then perform thermal analysis, look at different state of charge estimation algorithms, and then overarching design of the battery management system. And here, when we think of batteries, it is also important to think about the EV chargers that are going to be powering those batteries. So we also have a small section later on to talk about the EV charger design.

    So before we get started with that content to set the context, many of you in the audience today are battery engineers. And I think you can relate when we say that there are key design questions that you would be interested in working towards. What is the impact of my choices in terms of safety and performance of the battery pack on the vehicle when it is in operation?

    You want to be thinking about, is my battery safe from a thermal runaway perspective? Is my battery pack size the right way? How do I characterize my lithium ion cell or any other chemistry that you would be using? And then finally, am I taking care of cell balancing as the vehicle is running, as the battery pack is aging? And am I testing my BMS design in a robust manner?

    So all these questions are very crucial as you are thinking about designing a battery. And I think just in time, what I'm pleased to announce is MathWorks launched a new product called Simscape Battery in our R2020b release, which happened last week on September 14.

    So this is going to be the highlight of a lot of the content we will be presenting today. The Simscape Battery product is part of our multidomain physical modeling platform and associated vertical add-ons. That Simscape offers. And Abhisek will drive us and take us through the steps of modeling batteries at the cell level and going all the way to the pack.

    So to help us steer the conversation and choose the areas that we focus on during our discussion, we would like to do a quick poll and understand where you are in your battery or BMS modeling journey. Are you actively working on a project today in terms of modeling or designing these systems? Or if you're looking forward to working on a project a few months down the road?

    Or it's totally fine if you are joining us today more from an awareness point of view to build proficiency in this area. But helping us know where you are will definitely help with the question and answer session as well as the content that we'll be delivering today.

    So as our audience completes the poll, Abhisek, I wanted to ask you, yesterday you showed us the sizing of the battery pack with overall the range of the vehicle in mind. So we now know that you're working with about a 3 kilowatt hour battery pack. And there are-- when we look at the two-wheelers in the Indian market, they're typically at 60-volt or 72-volt platform when it comes to batteries.

    But the questions that I still have is, I know the size, but now I want to actually start thinking about what manufacturer do I choose? What chemistry do I pick? And once I make those choices, how do I start designing at the cell level and build it up to the battery pack? So I think it would be pretty interesting if you can walk us through that implementation.

    Definitely, Shripad. So what I'll start off with is I'll give some background on what are the techniques that we use for our simulation techniques. And then we will see from there, which works for our need. So to get started, there are various modeling approaches that we can look into.

    We can have low-fidelity models, which are good for system-level behavior. Starting from there, we can also go to the highest model fidelity that's possible. Now, for low-fidelity options, I am talking about typically a state of charge-- no-load voltage versus state of charge plots, which you can typically get very easily from the manufacturer. And it still helps us in having some low-fidelity models.

    There are also some other variants, like if we really want to take charge/discharge characteristics. For example, that would help us with charge dynamics, and then battery fade. Then we would work with HPPC test data as well.

    And finally, if we are really getting into the detail of how each cell behavior is evolving, or how it changes as there are various loading conditions that are happening, then we can also use all of these data, whatever I showed on the left-hand side, and then build a very detailed battery pack model. And I can monitor the status of individual cells.

    So what I'm going to do is I'll also get into a bit of detail on what is the approach that we predominantly use in our tools. And from there, we will slowly build up to a battery pack. So in the approach that we use in our case is equivalent circuit model. And as you can see, we start off with having open-circuit voltage. Typically, this is the representation of your no-load voltage that we have. And then we have terminal resistance, which gives us the instantaneous drop of the voltage when we connect-- or we close the loop.

    Now, this tool that I'm currently highlighting is good enough for low-fidelity studies, where just having a steady behavior of the cell is fine. But if we need the transients of my cells, then we would need to incorporate these RC branches that I have highlighted as transient dynamics.

    Now the data that we need to parameterize also for this depends. Now, before I get into that, there are also some parasitic losses that sometimes we want to consider. And based on our requirement, we would either use it or we don't use it. But this is not-- this is something that we have the flexibility to choose.

    So with that background, what you will also understand from the testing of various cells, or if you have work with BMS, is that these parameters that I showed you, unfortunately they are not a singular value that we can just find out and fill. They are very-- these are very complicated electrochemical systems. And since you are using an equivalent representation, we have to be intelligent about how we handle that.

    So what we do is for all the parameters, we found out that they are dependent on various other factors, for example SOC, temperature, and the current cell temperature is a very prominent one. We have also a few other behaviors, like the number of cycles it has gone through already. And it kind of also is an indicative of the health of the cell.

    So all these parameters are dependent on quite a few factors. So you have to keep this in mind, that these parameters that you are identifying-- or rather, we have to fill or provide, they are going to be inputs that you have to provide.

    So now with that, what are kind of data that we need? So typically, there are two sets of data that you can find out. On the left-hand side you see we are maintaining constant current discharge at fixed temperature and various current rating. We are trying to find out what is the voltage.

    The left-hand side presentation, what you see, this is like, let's say, if you are not interested in the transient dynamics. Then we can just use this data to find out two parameters of the equivalent circuit that I just showed you. That is the terminal voltage-- I'm sorry, that is open-circuit voltage and the terminal resistances.

    However, if we need the battery dynamics, then we have to perform pulse-discharge test, which is to your right-hand side. This is a very standard pulse-discharge curve. And of course, based on the operating range, we can work on what is the depth of these current pulses that we need to work on. Then we can have one or multiple pulse-discharge curves, which you can use to parameters our models.

    So to model these batteries cells, we have two different options. Again, and as you can see, I'm still maintaining the theme of having the transient or the dynamics or not. The left-hand side, what you see is I'm not considering those RC branches. So I can simply provide lookup tables based on my SOC and temperature, the no-load voltage and the terminal resistance. That is all that I would need if I want a very fast running model with the features of battery voltage drop with SOC.

    If the transients are needed, then we can activate the no dynamics-- can switch this no dynamics to the time constant that we're looking at. And that would give us the RC branches. Now, as you understand, this set of the parameters that I'm asking, there are a quite a set of parameters you may or may not have that. And if you have done some tests that I showed you just previous slide, you can use some techniques called optimization that can fill up those values for you.

    However, if you don't have the data, in our Simscape Battery, we also provide you with quite a few pre-parameterized battery blocks for certain manufacturers. And you can make use of those and have some very good starting points, where these table fields whatever I'm showing you right now will be filled with some data that will allow you to have a very good representation of your cell. So keep that in mind as well. We have some-- we provide some good starting points for you.

    So now, coming back to the workflow of parameter estimation. So you remember how I mentioned that you may want to do some tests, and we will have these parameters that we need to find out. And there also happen to be lookup tables. So what is the process for that?

    So what we do is we take an experimental setup, and we take a model of the cell. I'm showing you the model here. And we run the same tests on the experimental setup as well as on the model. So in our case, I'll give the pulse-discharge as an input.

    And what I do is I collect the data, where typically these are the cell voltages that we gather. And the model will also respond the same way. It will tap into the signal where I have the terminal voltage and will compare and see how close or how far they are.

    And if they are not good, then we tune these parameters, we change them, and then we keep doing this in loop until we have a very good match. OK. And now I'll show you the entire process of how we set it up. But just to give you an idea of how it looks like.

    So here is a model representation of one cell, where we are doing a pulse-discharge test. At the bottom, what you see is that I have initialized my vector, open-circuit voltage, as well as the terminal resistance. And I have same values. I initialized with same values. And I am now giving the current profile that I captured from my real test.

    And what you will see is that the yellow line is something what you are gathering from the simulation, and blue line is field data. So what you see is that if you look at the top plot, here I am measuring my model estimates in yellow line, and blue line is field test. And there is a clear difference.

    And you can also probably see-- so you can see that at higher SOC values, it should be 4.2 but we are getting 3.8. If you look at the parameter initialization, it will be very clear to you why that is happening. So I can very easily now set up an optimization routine where I compare this, create a cost function, and then I call various optimization solvers to optimize it and give me a set of values for these two variables where it matches.

    Now, this is a default example that we have in our documentation. So if you search for it, you should find it, and the model should be available to you for your study. So I'll not get into too much details of how that was set up.

    But one thing that you may notice is that the vector that I initially showed you that my open-circuit voltage was a function of multiple different things. But in my case, in the previous slide I had only one column, which stands for one temperature. So what we should now do is, if we have the possibility to redo the same test but for the various temperature, we can redo the same thing, and whatever I showed you in the previous slide, you can repeat it.

    So then we will have all these parameters which are dependent not only on SOC but also on the temperature. So this is one way where we can start off with some pre-parameterized cell values. But if you have some field test data, we can then further optimize to match with exactly what you have in your field, and get a really good representation of your cells.

    So now we are at a point where we got the cells. So the next logical step would be to scale it up to a battery pack. Now, with Simscape Battery Pack Builder, we can actually do it automatically through the help of some code and some script. So what you just saw here is that we started off with one battery pack with the parameters that you identified.

    We set what kind of cell that is, whether it's cylindrical or pouch. And then after that, we just mentioned what are the number of series and parallel combination that we're looking at, number of modules, and the thermal barrier that we have amongst the module. And once we parameterize those, the cell is automatically assembled, which you can see on your right-hand side. And you also have an equivalent Simscape model, where all this information is available to you.

    So with that, I have a battery pack which I can use for my system-level analysis. And this is also high-fidelity variant which we developed-- started off from the last-- from yesterday's topic.

    So it's pretty neat, Abhisek, what you just showed with the Simscape Battery Pack Builder. On one side, I'm getting the visualization of how this pack is assembled and then on the other side, the actual Simscape model that I can then integrate with the rest of my electric powertrain.

    And just to make sure I understood things correctly, I asked you a question, how do I start from the cell level? So one thing you showed me is if I have a manufacturer, like Sony, Panasonic, A123, there are actually three parameterized components in the battery cell block. So I can use that as a starting point.

    Or the second option I have is if I have pulse-discharge data by actually running the experiments on my battery pack or battery cell, I can use that data to build an equivalent circuit model from there. Or--

    That's correct.

    Right. Or probably kind of a hybrid model that starts with a manufacturer datasheet but validate that you have the right model with your experimental data.

    That is correct, yeah.

    Perfect. So that's good. Now I know how to go from cell to module to the pack level. But one thing I'm still intrigued and still more interested to learn about is how you capture the thermal effects.

    Right. Yeah, that's a very good question. So Shripad, while we are working on the cells, we do have an option to give the thermal mass of individual cells. And the cells are also calculating the thermal losses for various different loading conditions. So we can estimate what is the heat generation that is happening from individual cells.

    Is this something that you are looking at, Shripad?

    Yeah. I think heat generation or temperature variation, that's something I'm definitely interested in. But kind of going a step beyond that. I mean, if you think about the electric vehicles, and kind of the core issue that we are dealing with today is about thermal runaway, the excessive heat generation, EVs catching fire.

    So I get asked a lot about the thermal engineering of the battery. How can we design these battery packs better so we are addressing those challenges in an effective way? I can actually explain this problem to you in a little more detail. I have a representation of what thermal runaway means.

    So if you look at a battery pack, in the normal condition all is well. But there are situations like short circuit inside of one of the cell, maybe because of the manufacturing defects, or maybe because of the crash or the impact, or simply failure of the cooling circuit, whether it's active or passive cooling. And what that does is it reduces the rate of heat dissipation from the battery pack.

    And any time the rate of heat dissipation is lower then the rate of heat generation, it can lead to this chain reaction where the electrode-electrolyte, they get mixed, the heat and the gases are generated, and it leads to potentially even an explosion within the battery pack. So what my intention is to dive deeper into the thermal engineering of the battery and to prove it to my system engineering team that I have taken into account the thermal analysis of the battery pack in the right way.

    I understand, Shripad. OK. But one question that I would have for you is typically, the behavior that you just explained, is this something that you perform quite often? The reason I'm asking you this question is that this is-- the kinetic reactions that you're talking about, they're quite complicated to model and computationally expensive as well. And they do slow down the simulation.

    So is this the right fidelity that you want to work with? Or can we work with some simplification as well?

    Right. So yeah, that's an interesting point. I think that would depend upon the case by case basis. So certainly when I'm performing system-level simulation or the electric powertrain level simulation, I do not need this level of fidelity. But specifically to think, is my battery back designed correctly with thermal barriers and whatnot, that's where I want this level of detail.

    And you know, what we do in the lab is typically, we conduct endurance testing of the battery pack. That has to be done to see subjecting the battery pack to excessive heat, let's say, 40, 45 degree Celsius or even more, the typical summer conditions in India. That we do.

    Second thing we do is abusive test for the cell of the pack. And I will have that data collected. So I would be interested in taking that data and then building the thermal model of the battery from there.

    I see. I see. And probably this is what you are trying to collect from your test experiments.

    Exactly. This is a representation of the types of responses we see. So what you're seeing is this temperature of the individual cells with and without thermal barriers inside the pack. So what you're seeing on the left-hand side,s those are the plots where there are no thermal barriers within the pack.

    So if one cell experiences a thermal runaway, then successively rest of the cells in the pack also experience that same temperature rise. So you can see that uncontrolled temperature rise for each of the cells. While on the right hand side, what we have done is we have placed the thermal barrier inside the pack.

    So you can see first four cells have experienced a thermal runaway, but because of the barrier we are able to limit that damage. The other cells still continue to function as normal. I mean, battery pack and BMS at that time would be shut off, but at least I'm preventing the damage to the extent possible.

    Understood, understood. OK. So that's a quite elaborate model and a simulation that you also need. Great. Thanks for the clarification, Shripad.

    So we do have a way to consider this behavior. And the way we typically do it is we have a few equations that you have already modeled to capture this heat load due to cell abuse reactions. And the data that you showed, we can use some variants of that data to a parameterize this model and tell us-- do some energy balance equations and give us the additional heat that is getting generated and the temperature rise due to that.

    So yeah, like I mentioned, we do have this high-fidelity option. But this is also something that we'd have to choose when we want to use this variant and the other simplified variant that I showed, and do the analysis as we want. So yeah, I can help you with this. And probably, this is something that we can also provide you that.

    Now, as a continuation of this, so a few other things also that you will have to consider are the cooling in a bit more detail. So with this latest addition, we do have ways to model the heat transfer between a battery, the environment, and then also the cooling system. We can capture and control the cell to cell variations through use of various different cooling plates.

    So there are blocks that we have, which can help you in implementation of edge cooling, parallel channel, U-shaped channels. And we can also clump that with existing solution for air cooling. Now, since in two-wheeler markets we are right now looking at air cooling only, but I think we-- but the four-wheeler markets do use a good amount of active cooling. We can see-- I'm hopeful that we will see some very interesting mix of these two, and that we will be able to use these models for doing this kind of analysis and choose the right topology that will work for them.

    Now in addition to that, we do have options to also have resolutions for the thermal models by defining what is the granularity we definitely need. So we have this flexibility that is now added. And here is an example of where we had taken a battery pack and then modeled the physical layout of the battery cooling plate as well.

    And we are doing a force cooling here, and we are having coolants. So we can very easily modify this example to take care of air cooling behaviors as well. And here is another example where we now see a closed-loop model, where there is a battery control unit which is trying to maintain the flow of the coolant to maintain good battery temperature.

    So what we just saw is that we started off with a battery pack. We introduced the battery temperature, and then now we are having a control for that.

    Now, taking one bit further, if you draw analogy with the four-wheeler world, you will see that the four-wheeler world, they also use active cooling along with quite a few other components as well, for example the motors, the heaters. And we can have a very complicated network with quite a few innovation in there as well.

    So the idea is that we do have a reference example for you where you can see what is the maximum extent we can do. And we can refer to this and the previous slide whatever I showed you to come up with your own ingenious solution of having a mix of various different things. So I'll be really happy if you guys can look into that and if you can have something that you can incorporate for your design.

    And if we-- I mean, I like the differentiation in terms of active cooling and passive cooling that you had. So if I think in the context of two-wheelers, typically it is passive cooling. It's air cooled passive. And we also observe heat sinks implementation. So in that case, being able to model heat sinks or being able to model conductive/convective heat transfer, is that something that I can do pretty easily?

    That is correct. That is correct. So in these models that I'm showing you right now, we have all those things captured. We can design our own topology, and then you can see the effect of that on those systems and optimize that.

    [INTERPOSING VOICES]

    And also the aging-- the aging or fading type of effects?

    That is correct. So now, this is something for which you really need to have some data from the field to be accessible. And if you have data from your fleet, or maybe a vehicle that has been run on the field for quite some time, we can ingest that data, and we can have calendar aging for behavior model as well. So for calendar aging, we can-- as you can see here, we have this option where I can say-- either I can have tabulated results that I can provide, or there are some simpler linear equations and other equations that are provided, which we can identify from the data that you have considered.

    So if there is some data available from your field, we do have ways where you can have the battery fading, calendar aging also into the picture, which can help you in also designing systems like predictive maintenance, where you can upfront give warning to the users that their battery has reached a certain age, you'll be mindful of that, and then get it serviced or changed. We can develop some warning systems and intelligent systems like that as well.

    So I mean, that was-- there were a lot of features over there in terms of doing the thermal analysis or modeling degradation, a battery digital twin, if you will. And now when we're talking to friends also using the EV, a two-wheeler specifically, I see people changing quite a bit between the normal mode of operation to sports mode, hyper mode, and back again, really pushing the vehicle to its limit sometimes.

    And we have also observed and read in the news, like there are-- your BMS algorithms or your state of charge will show that you have 30% battery remaining, and all of a sudden next minute, it's at 0% and the vehicle comes to a complete stop. So I think that's where being able to estimate state of charge of the battery, or state of the-- health of the battery is pretty crucial.

    So as a next step in the design workflow, I'm curious what you could tell us in terms of doing a SOC estimation, and then using that information to develop a full-fledged battery management system.

    OK. Very good question, and also right on time. So if you really see it at this point, we are focusing primarily on the cell and the pack. But right now, we have a model where we have a detailed cell-level information, along with cooling and other advanced features like aging and all those things. So we are at the right time when we can use this model to design our battery management system.

    Now, as for that, using sheet tools and other tools, we have provided you with predefined logics that can go into your battery management system. Now here, what you're seeing is a snapshot from the new library. And under BMS, you will see there are estimators like SOC estimators, then SOH estimators. There are also blocks that will help you with identifying current limits on the fly and help you implement various kind of protection circuits and the thermal management.

    And I'll also with the help of a video show you how easy it is, really, to include one such system in your existing model. And what you see here is that from the model, I just drag and drop one, my SOC estimator block. And then I'm pre-parameterizing it with fuel cell information. And then I can just run the model and then start getting information about the SOC of the battery.

    Now, so this is how currently the library is set up. And the idea is, really, that you use these algorithms-- so these are all the functions that one BMS must have. And for such functionalities, we have provided you with these default models that you can adopt, and you can start building off it.

    Now, in addition to that, we actually took an SOC estimator block from the library, attached it to your battery. And it looks like you're measuring the battery current. And then the SOC estimator block is helping you see state of charge based on Coulomb counting technique or Kalman filter technique, right? So that could be a good starting point for me.

    Yeah, that is correct. And the idea is as you have more data, and then you can then play around with these methods and see which one fits or which one is more accurate for your use case, and adopt that one.

    Right. So when I talk with a lot of our users, what I learn from those conversations is being able to have an innovative SOC estimation algorithm is really important to them in many cases. One is, that's how they differentiate. That's how in a competitive market, which it is slated to become, they can have distinctive features. And also, that is how probably they can have more of a robustness in terms of how your SOC and overall BMS system functions.

    So are there any other techniques that I can use to implement my own algorithms? Maybe create IP in the process using these tools?

    Oh, definitely. So one thing to also highlight is that these are the foundation features that one might have. But you can always be very creative in how you want to use them. You did mention about your various modes, like how does mode switching happen? How smooth can that be?

    And when we are jumping between all these modes, there is a chance that your estimators may go out of sync. How can you bring them back again without use of doing all these things? So you can create a lot of IP using these things. And like I mentioned, these are some starting points also. If you have some-- your own algorithm, feel free to bring that in.

    One another thing I would also like to highlight is that if you have good amount of data available from your system or your field testing, you can make use of that and to find-- we use various different methods like AI-based techniques to use either for estimating your SOC or state of health implementation. And you can get a good performance gain out of that as well.

    And whatever you build using all the tools that we are showing you, there all-- the IQ will be always with you. And you can also generate code out of that to implement. And then you can see the performance.

    So here, I have linked one video series where we talk about how we can do this kind of battery estimation using neural networks. And like I said, neural network is one such technique. There are also deep neural methods that you can use and various other methods that can be explored for state of charge and state of health estimation.

    Perfect. So with that, I'll probably proceed and then also show you a few other examples that are added to the tool, which I think will be useful. This is a "for your information" slide. And one of the things that I'll definitely encourage the audience to go through is this thermal analysis of new and aged battery packs.

    I have linked all of them here. So once you get hold of this, please feel free to navigate to these, and then you understand what we are doing there and how the things are handled. And if you want to understand more, please reach out to us, and we'll be happy to walk you through that.

    So now, once we have our battery management algorithms built, the next logical step is to generate C++ code out of it and implement it. And now, people who are well versed with Simulink would know that we do support automated code generation. We can either generate a C code or C++ code. And also, you can target your hardware that you are working with. So if you have any particular questions, please do reach out to us.

    One another use case that I would also like to talk about is that hardware in-loop testing for battery management. Now, as you understand that it is not always possible to have an actual test setup to run this kind of test on the fly. However, we just created a very good battery model. So why not use that?

    So what you can do is, with the help of real-time machines like Speedgoat and the automatic code generation, we can convert that battery model that you just built into a real-time application. And with the help of emulation cards, we can generate those voltages and currents that we want at the outset.

    And then the actual BMS unit that we have developed, we can interface and then do various test cases and see how it works. The benefit of that will be, since this is a software, we can test faulty conditions very easily. It will also bring down significant testing time. And this can be automated as well. So if you have ways, and then if this is something that is interesting to you, please do reach out to us. We would be happy to talk to you about and guide you in the right direction.

    So to summarize what we saw in this-- till this portion, so we looked into a new product that we launched last week named as Simscape Battery. We looked into the various features that it provides. And to quickly summarize, so it will help you with design and simulating the battery energy storage system. And you can include the electrothermal behavior, the battery pack design. And there are a lot of BMS systems that we have and components of BMS that we have provided, which you can incorporate into your own system.

    And once you have put together your battery pack and BMS, you can do various different tests like optimizing your cells and communications, and then you can see the thermal requirements, see the robustness of the design, and again, do HIL testing as well. So with that, what we did was we actually started off with one cell, worked with some test data, and ended up with having a battery pack model as well as a BMS system.

    Now, Shripad, I have a question for you. While I was working on the BMS, you did provide me a few limits to consider in data terms of charging and discharging. And you also asked me to have a good control over the contactors, like HIL circuit. I'm curious to know-- I want to know how that affects with your charger design. Would you be able to throw some light on that?

    Yeah, yeah, absolutely. Yeah. Let me actually start sharing my screen. And then from that point onward, we will go into the details. But yeah, really, really happy to hear all the battery pack design that you talked about. So I'm going to jump now to the EV charging portion.

    And you asked me about how I take into consideration the specs that I provided you initially, right? So I'm going to explain that in context of the different types of charging techniques that are available. And then I will integrate the specification portion, how that relates to batteries versus the EV charger.

    So if we think about the two most widely used techniques, there are AC charging or DC charging for your batteries. Within AC charging, there is level 1 charging or level 2 charging, which essentially relates to the power or the current levels at which you are charging your battery.

    So typically, level 1 charging is you plug into your 230-volt socket at home and then charge the batteries with that right. And what you would see in most of the vehicles, there will be an onboard charger placed somewhere in the key, if you will. And that onboard charger converts the AC supply into a DC and then uses it to charge the batteries.

    Now, it is important to remember that the BMS system that you design, that BMS system is what is communicating with the EV supply equipment, telling the EV supply equipment, what is the state of charge your battery, what is the voltage temperature, and also, what is the peak value of current that it can take to charge your battery without damaging it? So there is essentially handshake between your BMS system and then the EV charger supply equipment when you plug that in. So that's kind of the stage 1.

    Then when you are actually designing the complete charger, there are also going to be communication protocols like CCS or CHAdeMO and others that are in the play depending upon which region of the world you are in. And there will also be a billing and payment system, so some communication with the cloud.

    So overall, charger design has lots of aspects to it. Today, I'm going to focus on the power electronics and control portion of that. So I think over there, looking at this kind of a schematic or the topology of AC charging is important.

    If we differentiate this with DC charging, then in the case of our DC fast chargers as an example, right? Your onboard charger is bypassed, and the external DC supply is directly being used to charge your batteries. And that allows you to charge it at higher powers or higher currents.

    So those are two important ones that you would see in context of electric two-wheelers. And like I said, onboard charger will be there on the vehicles. But then we see Indian OEMs setting up their own charging infrastructure across India, which purportedly can have level 2 AC charging or DC fast chargers as part of that charging ecosystem.

    Now, coming to examples, so within Simscape Electrical Tool, which is adjacent or the same family of Simscape that we offer, you will see examples of a DC fast charger as well as a two-wheeler onboard charger example that was introduced just last week in the 22b release. And from an architecture point of view, what you would see is on the left-hand side is the grid or your 230-volt AC supply that is modeled.

    On the right-hand side is the battery. So the battery pack that you helped us design, I can integrate that battery pack over here, or at a high level, given the specifications of your battery, whether you're operating at 60-volt or 72-volt level, and whether it's a 3 kilowatt hour battery pack, 50 ampere hour, I can program those specifications over there.

    And then the two main things that you have inside your charger is, first is the AC to DC stage, where you are converting your external AC supply to DC. And typically you're boosting it, so from 230 volts taking it to 400 volts. And then you convert it down to the platform of your battery, so 60 volts or 72 volts. So that's kind of the high-level power electronics architecture of your onboard charger.

    Now, if you think of it in terms of specifications, I have to design my charger, keeping in mind the battery specs that you have. So in this case, the 60-volt 3 kilowatt hour, that's a typical battery pack for a two-wheeler in Indian market, so I kind of use that as a reference. And then for my charger, for input side I was thinking about 230-volt 5-ampere plug, which we get in any residential household. And then on the output side, I was going with 17 amperes of continuous current.

    And if we think about EV charging, there are two modes in which it operates. One is the constant current mode. So typically when you're trying to go from 0% to 80% of the charging, you're operating in constant current mode. And then it switches to constant voltage mode, and tries to trickle the charge till the full charging happens.

    So these are the specifications that I worked with. And then we designed a charger which has a lot of details inside of it. One is what kind of a converter topology you use. So I mentioned it's a boost converter, which is boosting the voltage from 230 to 400 volts. But I want to be cognizant of having a good efficiency for this charger that I'm designing.

    So that's where this totem pole topology is very popular. And you will see in the example that we provide under Simscape Electrical, that specific topology is used. And we are also using silicon carbide devices. And if you give me a manufacturer datasheet or a SPICE level of implementation, I can easily bring that design over here to model my converter as well as model the full-bridge DC to DC converter that will then step it down to 60 volts needed by the battery pack.

    So there are lots of details in getting this power electronics implementation done. I can talk about it for hours. But in the interest of time for today's session, what I would leave you with is there is an example in Simscape Electrical. If you're interested, please check it out. And at a high level, from a workflow perspective or from a response side, this is kind of the most interesting part for me as an engineer, that you have the model, and you can run the full dynamic simulation to see the waveforms that you would get from it.

    So I mentioned to you that my first stage, power converter, that's going to convert from AC to DC and boost the voltage to 400 volts. And you can see in the first plot here, that is the output of the converter which is settling down at 400 volts nicely. And I can also see the battery charging current, which is at 17 amperes, battery state of charge, how that is increasing over time.

    And then the final plot here that I would like to show you is the supply voltage-- so that's the black line that you see-- and then the current that is drawn from the supply, the red plot that you see. And you can see those two plots are in phase with each other. So one of the important things for the charger is the power factor correction. And you always try to go for a unity power factor if possible. So you can see because those signals are in phase, I'm achieving unity power factor with my frontend converter design.

    So there are many interesting details. If you are working in the charging area, please reach out to us. We can have a one on one conversation with you to dive into technical details of that. But from a workflow perspective, you will typically be looking to size this power electronic components, perform their loss analysis, or tune a controller around it, typically a PID control loop that you will have.

    So along with Simscape Electrical, if you use Simulink Control Design, it gives you ability to linearize your plan and automatically tune your PID controller for the specific rise time, settling time, overshoot type of specifications that you have. And like you showed, Abhisek, in context of BMS system I can also then generate the code for this controller and deploy it on a processor, whether it's TI processor or another processor.

    So I have the complete workflow available to me to go from plan modeling, which is the EV charger in this case, to its controller tuning, and then generating the code to put it on a chip. So that's kind of the gist of designing my EV charger.

    So today, in conjunction with the battery pack that you modeled, I wanted to make sure we also touched upon the EV charging aspects and how the two relate to them. And that kind of brings us to the conclusion of the main technical portion of this presentation.

    So we are curious, what are your first impressions based on what you saw today, especially if you're working in the battery area? Would you like to explore this further for your ongoing project? Or if you would like to get a hands-on training where we can actually dive into details with set exercises, or simply talk to a MathWorks technical expert like Abhisek who can then work with you on your specific design case? So please share your feedback with us. It will be really useful for us to connect back with you and take this conversation forward.

    Now, after this, we plan to do the live question and answer session, just like yesterday. And Prasanna will be joining us for that. So I will give Abhisek and Prasanna a few minutes to review the questions that you have submitted. And I will also encourage you to keep submitting more so we can take some of them live.

    And while both of them are reviewing, let me also give you a sneak preview of what is coming in tomorrow's session, the last one in the series. So up till now, we have looked at the system-level simulation. And today we took a deep dive in batteries.

    Tomorrow, we are going to look at another important component, which is motor, and developing control algorithms for those motors. So my colleagues Rahul Choudhary and Ananth Kumar, who is our Product Development Lead for the motor control area, will be joining for the session. And they're going to take us through the discussion on what kinds of traction motors should you consider, whether it's a PMSM motor, or switched reluctance motor, and how you would go about modeling those motors with the help of Simscape Electrical and Motor Control block set.

    They will also discuss how you then take that motor design, put a control loop around it, tune that controller, and then take it down to a hardware level. And you see that wheel spinning that is actual hardware demo that they have built. So they can discuss with you hub motors or other frame-mounted motors. So stay tuned for what's going to come tomorrow's for this session.

    View more related videos