<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shivaram N V on Medium]]></title>
        <description><![CDATA[Stories by Shivaram N V on Medium]]></description>
        <link>https://medium.com/@shivaram.nv?source=rss-a401c45e4cb7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*JStxZ6DNYQo6-rgR</url>
            <title>Stories by Shivaram N V on Medium</title>
            <link>https://medium.com/@shivaram.nv?source=rss-a401c45e4cb7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:25:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shivaram.nv/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Cell Models & Characterisation]]></title>
            <link>https://medium.com/ather/cell-models-characterisation-a1bce42b87f9?source=rss-a401c45e4cb7------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1bce42b87f9</guid>
            <dc:creator><![CDATA[Shivaram N V]]></dc:creator>
            <pubDate>Thu, 01 Dec 2022 10:46:04 GMT</pubDate>
            <atom:updated>2022-12-01T10:46:04.109Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/u/39f04b852f45">Shivaram N V</a>,<a href="https://medium.com/u/23553cff5a77"> Gaurav Jain</a>, <a href="https://medium.com/u/265ae17a3f78">Hari Vasudevan</a></p><p><em>In our previous blog post we had described a generic </em><a href="https://blog.atherenergy.com/algorithmic-architecture-for-bms-d1fd9f5eb1b"><em>Algorithmic architecture for a BMS</em></a><em> that attempts to strike a balance between software maintenance, performance and robustness. In this post we focus on another aspect of BMS algorithm design, namely the characterisation of cell parameters. Estimation of cell parameters is the fundamental building block of any algorithm used in the BMS. The Kalman Filter, the charging and discharge controllers, charging voltage controls etc.. all require knowledge of one or more cell parameters to operate effectively.</em></p><p>If we were to survey the literature for cell models, we would find several models both at the electrolyte/electrode level as well as equivalent circuit /empirical models that approximate the dynamic behaviour of a Li-Ion cell. However while there are descriptions of how to extract the cell parameters from various experiments, no single reference provides a unified guide to extract the cell parameters. In this blog post, we will describe the sequence of steps that are required to extract the cell parameters as well as an example of how to perform this extraction.</p><figure><img alt="Ather 450X Battery" src="https://cdn-images-1.medium.com/max/1024/1*YGDXlxFnitp8bC-9r0XFgQ.png" /><figcaption>Heart of the Ather 450X</figcaption></figure><h3>Equivalent Circuit Models</h3><p>Like in any system, modeling of a Lithium ion cell can be done in broadly 3 different ways — <a href="https://www.researchgate.net/figure/Black-box-white-box-and-grey-box-behavior-14-15_fig2_276500198">White box modeling, Grey box modeling and Black box modeling</a>. White box modeling for a system as complex as an electrochemical cell is extremely hard. It is testing intensive and requires information down to the levels of the quantity and grade of materials used in the cell. Black box modeling lies on the other end of the spectrum where it treats the model purely as a mathematical problem of curve fitting. While this is also testing intensive, the main drawback of this is that at the completion of the curve fitting exercise, you will end up with a black box without any way to infer the impact of change of any parameter not modelled explicitly as inputs or outputs on the system. This is where a Grey box model comes in very handy with a theoretical structure complemented by data to complete the model.</p><p>Within the paradigm of Grey box models for Lithium-Ion cells, there are a wide range of models like the <a href="https://www.researchgate.net/publication/327222260">Shepherd Model, Unnewehr Universal Model, Nernst Model and the Equivalent Circuit Model</a>. While each of them have their pros and cons vis-à-vis complexity, accuracy, requirements of test data, physical intuition etc., one feature of the Equivalent Circuit Model that we particularly like is the linear ordinary differential equation structure that significantly aids in the process of controller synthesis for charge and discharge controls. Therefore, we recommend the use of the Equivalent Circuit Model for the cell. The equations that define this model are also shown below.</p><figure><img alt="Equivalent Circuit Representation of a Lithium ion Cell" src="https://cdn-images-1.medium.com/max/701/1*GVLV7BgpfMx8lJnHIrwj4A.png" /><figcaption>Figure 1: The RC Parameter Cell Model</figcaption></figure><figure><img alt="Mathematical Model of Lithium ion Cell" src="https://cdn-images-1.medium.com/max/800/0*6rtDKepY6XczmG2w" /><figcaption>Equation 1: The generic state equation for an n-RC pair model</figcaption></figure><figure><img alt="Mathematical Model of Lithium ion Cell" src="https://cdn-images-1.medium.com/max/800/0*4AQ7J3K46JdmwPCG" /><figcaption>Equation 2: The output equation for an n-RC pair Model</figcaption></figure><p>The advantage of a cell model like this is it is generically extensible till the model reaches acceptable performance. Figure 2 demonstrates this. The measured terminal voltage response of a cell for a discharge current pulse is shown by the blue trace, the dashed lines show approximations starting from 0 RC pairs to 6 RC pairs. As we increase the number of RC pairs the response becomes more and more aligned with the measured response. In fact there is virtually no difference between the measured response and the 6 RC pair model response. In fact, even the 2 RC pair model (red trace) could perhaps be an acceptable compromise between the complexity of the model and accuracy. For offline analysis the complexity of the model is not a barrier as compute time available is virtually limitless. However in the scenario where we have to use any of these models in an online iterative algorithm such as a Kalman Filter is where the complexity vs accuracy trade-off needs to be evaluated.</p><figure><img alt="Accuracy of Equivalent Circuit Model for Lithium ion Cell" src="https://cdn-images-1.medium.com/max/800/0*A0Eq7zxQbONv9-KD" /><figcaption>Figure 2: Successively higher order RC parameter approximations vs. measured voltage response</figcaption></figure><p>There are of-course drawbacks to the RC parameter model. For example, hysteresis in VOC-SOC table cannot be accurately captured. Coulombic efficiency is similarly hard to model without losing the linearity of the state equation. Despite these drawbacks, the RC model finely treads the line between categories: theoretically accurate but impossible to implement vs. so simple that it does not realistically predict anything. One important point to note here is that the requirements of linearity and ODE structure for the model are mainly for the purpose of observer design and controller synthesis i.e. the Kalman filter and discharge and charge controls. This does not limit one from using a more accurate and computationally complex model as the ‘Plant’ to perform closed loop simulations during the design of the aforementioned observer and controller or for other performance simulations.</p><h3>Experimental Cell Characterisation</h3><p>Experimental data under controlled conditions is a crucial part of building the equivalent circuit model. Below we describe the experiments required to derive data points concerning three parameters described in the model. namely, the cell charge capacity (Q), the VOC-SOC curve and the HPPC test to derive the RC parameters.</p><p><strong>Cell Charge Capacity (Q), </strong>generally measured in Ah, is the maximum amount of charge that can be extracted from cell under specific conditions. To measure the cell charge capacity, charge the cell to full. Follow this with a constant current discharge at Q<em>nom</em>/5 Amp till the voltage reaches the end of discharge voltage. Now integrate the value of current through the discharge cycle to get Q (refer Fig 3).<br>Information on conditions for ‘full charge’ and ‘end of discharge’ are typically provided in cell datasheets. Q<em>nom</em>/5 is the most commonly accepted industry standard for measurement of charge capacity of Li-ion cells. An important point to note here is that while the nominal charge capacity Q<em>nom</em> of the Li-ion cell is provided in most datasheets, what we want to estimate here is the actual capacity Q from a statistically significant number of samples of cells.</p><figure><img alt="Lithium ion Cell Charge Capacity Measurement" src="https://cdn-images-1.medium.com/max/1024/1*j5NlsD8t80pb2AUvLn-3qA.png" /><figcaption>Figure 3: Cell capacity measurement</figcaption></figure><p><strong>Open Circuit Voltage (Voc)</strong> is generally defined as the voltage between the terminals of an electrochemical cell when no current flows through the cell. Low-current Voc and Incremental-current Voc<strong> </strong>tests are two common methods to observe the VOC-SOC relationship. The Incremental Voc test consists of many SOC intervals and rest periods after which the Voc with the corresponding SOC is measured. The steps required for this test are as given below.</p><ol><li>Charge cell fully to 100% SOC</li><li>Discharge at Q/5 using a negative pulse current followed by rest at every x% SOC till end of discharge voltage</li><li>Charge again following the same routine but with a positive pulse current till end of charge voltage</li><li>Apply Averaging and Linear Interpolation step to obtain the VOC-SOC curve at different intermediate SOCs</li></ol><figure><img alt="Lithium ion Cell Open Circuit Voltage Curve Estimation" src="https://cdn-images-1.medium.com/max/1024/1*UXa026oNhmCxKguPghbPSg.png" /><figcaption>Figure 4: Voc vs SOC</figcaption></figure><p><strong>Hybrid pulse power characterisation test</strong>, also known as HPPC test. This test investigates the power capabilities of a cell under operating conditions at different temperatures, pulse width and state of charge. The HPPC test based on the defined test sequence provides us the data to derive the RC parameters used in cell model.</p><ul><li>Charge the cell fully to 100% SOC</li><li>After rest, apply constant current discharge and charge pulse of Q/2 Amp for ’n’ seconds and discharge by x% SOC using a pulse of Q/5 Amp with rest in between</li><li>Repeat the same till end of discharge voltage is reached</li><li>Discharge the cell till 0% SOC and repeat the above pulse sequence while charging by x% SOC using charge pulse of Q/5 Amp for measurement during charge</li><li>Repeat the same till end of charge voltage is reached</li></ul><figure><img alt="Hybrid Pulse Power Characterisation Tests for Lithium ion Cell" src="https://cdn-images-1.medium.com/max/1024/1*444tw754WY7HFi9hDPGyuw.png" /><figcaption>Figure 5: Snapshot of HPPC pulse sequence at some predefined SOC. Please note that currents and voltages here are normalised.</figcaption></figure><figure><img alt="Hybrid Pulse Power Characterisation Tests for Lithium ion Cell" src="https://cdn-images-1.medium.com/max/1024/1*ZSmX7OFfe27dWUk1zUPD6A.png" /><figcaption>Figure 6: HPPC pulse sequence repeated at interval of 1% SOC during discharge</figcaption></figure><p>Please note that it can take up to a few hours in rest condition for a cell to return to an electrochemical and thermal equilibrium. Ensuring long rests after charge or discharge pulse improves quality of data. In the next section, we shall see how the data from the above tests can be used to fit the equivalent circuit model.</p><h3>Parameter Estimation via Convex Optimisation</h3><p>In the previous section we have described the aspects of cell characterisation as well as the HPPC test. In this section we focus on the extraction of the RC parameters from the HPPC data. Referring back to <a href="http://mocha-java.uccs.edu/ECE5710/ECE5710-Notes02.pdf">literature</a>, we see that there are several methods for computing RC parameter values, however these are at best approximations or rules of thumb.</p><p>Using the information gathered in the experimental characterisation of the previous section, we can now compute the RC parameters at every SOC measurement point via simple constrained optimisation. In the section below we demonstrate a simple example that computes the RC parameters given an isolated pulse at a particular SOC.</p><h3>Example</h3><p>This example illustrates the fundamentals of both simulating the dynamics of a cell model in Python as well as using parameter optimisation to determine RC parameters given the terminal voltage response of a cell to a pulse of current.</p><p>First we focus on the cell modelling bit, the code below shows how parameters obtained from cell testing can be organised to create a dynamic model of the cell. Please note that here the RC parameters are described at a certain SOC. In reality however, the RC parameters values vary with SOC and must be defined at every SOC point. Nevertheless this is a good starting point.</p><p>To define a cell we have to define the following parameters</p><ul><li>Cell Capacity</li><li>VOC vs SOC Table</li><li>RC Model Parameters</li></ul><p>The loadCellFn defines these parameters for use in the simulation as well as the RC parameters for a particular SOC. As mentioned earlier, RC parameters are not constant and change as a function of SOC. However for now we are going to ignore this fact.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/22f780842ccf204327ecfbf3dcd9e9bd/href">https://medium.com/media/22f780842ccf204327ecfbf3dcd9e9bd/href</a></iframe><p>We now define a current pulse that is an input to the cell model. The code snippet below constructs this pulse at a defined sampling rate.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/184694d0c7d0ff449be68f1f798a9cef/href">https://medium.com/media/184694d0c7d0ff449be68f1f798a9cef/href</a></iframe><p>Now comes the fun part. Using Equation 1 we can define the cell model in Python and then use the lsim function to model the behaviour of the cell given the current pulse input. Please note that we can use lsim for this because the state equation defined by Equation 1 is linear where as the measurement equation defined by Equation 2 is non linear. If this was not the case we would have to use the odeint function to solve the non-linear dynamic equations. Finally after invoking lsim the output terminal voltage “Vt” is then computed using the nonlinear measurement equations. The results are also plotted at the end of the gist snippet below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a8792e6f3ec38af9dd2c1fbd81663a3a/href">https://medium.com/media/a8792e6f3ec38af9dd2c1fbd81663a3a/href</a></iframe><p>For this hypothetical cell, we use a higher order model (10 RC Pair) response as the measured data (Full Cell Response) for performing the optimisation. We then demonstrate how to compute the values RC parameters for lower order models. Note that this is similar to real life situations where the result of the HPPC test is used to fit the RC parameters. To do this we use least squares fitting using the <a href="https://scipy.org/">SciPy</a> <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html">minimise</a> function. The minimise function iterates over RC parameter values using the default solver, note that we have the choice of selecting different solvers or different fit criteria to ensure that the results are more inline with our measured data, the further tweaking of the solver is not considered for this blog post. The gist shown below provides a code snippet for this optimisation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/34e29bab1ec9d518f139c75a859743eb/href">https://medium.com/media/34e29bab1ec9d518f139c75a859743eb/href</a></iframe><p>The following figures show the evolution of the RC parameters in every iteration of the solver and the final best fit. Note that with 6-RC pairs we obtain an the almost exact response of the 10-RC pair model. In a real life scenario we would only model a 6 -RC pair network to save ourselves the computational complexity of a 10-RC pair model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*DSw4-L0KQsEGEpkLJ_RDgg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*d7dUduafstWmhmSjW029sQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*NUckANi_d7_Lb1uAOwim1w.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*KBu5Y1bGA8f6yo7ZtmeQ6g.gif" /><figcaption>Figure 6: RC Parameter Evolution during optimisation</figcaption></figure><p>The code to perform both the cell modelling and the RC parameter estimation is given in the snippet below. Try to change the RC parameter values and/or the optimisation parameters to view effects on the parameter estimation and how it effects the final fit.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/80ff99c6d4ebb5a39d53f4360b194de2/href">https://medium.com/media/80ff99c6d4ebb5a39d53f4360b194de2/href</a></iframe><h3>Conclusions and Inference</h3><p>In the sections above we have seen how we can start with an equivalent cell model and gradually build up enough experimental data and code to derive the appropriate parameters for a Lithium ion cell. While this gives an introductory idea on how to characterise a cell for use in EVs, there are several complexities we have glossed over. These include:</p><ul><li>The effect of temperature</li><li>The effects of VOC-SOC Hysteresis</li><li>Validity of the model at edges of SOC, i.e typically less than 2% or greater then 98% SOC</li><li>Issues with the Convex Optimisation solver at various SOC points, i.e how to keep the RC values smoother and now have them arbitrarily swap places</li></ul><p>As part of these series of blogs, we will next focus on the construction and implementation of an Extended Kalman Filter (EKF) for EV applications and the constraints imposed on the tuning of the EKF due to user-facing requirements. Stay tuned for more on this…</p><h3>References</h3><ul><li>Lectures by Dr. Gregory L. Plett -University of Colorado Colorado Springs -<a href="http://mocha-java.uccs.edu/ECE5710/ECE5710-Notes02.pdf">ECE5720: Equivalent-Circuit Cell Models — Notes 2</a></li><li>An Overview of Generic Battery Models -<a href="https://www.researchgate.net/publication/327222260_An_Overview_of_Generic_Battery_Models">https://www.researchgate.net/publication/327222260_An_Overview_of_Generic_Battery_Models</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1bce42b87f9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ather/cell-models-characterisation-a1bce42b87f9">Cell Models &amp; Characterisation</a> was originally published in <a href="https://medium.com/ather">Ather Energy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Algorithmic Architecture for BMS]]></title>
            <link>https://medium.com/@shivaram.nv/algorithmic-architecture-for-bms-3bfac860b750?source=rss-a401c45e4cb7------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bfac860b750</guid>
            <dc:creator><![CDATA[Shivaram N V]]></dc:creator>
            <pubDate>Thu, 01 Dec 2022 10:45:47 GMT</pubDate>
            <atom:updated>2022-12-01T10:45:47.924Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/u/39f04b852f45">Shivaram N V</a>, <a href="https://medium.com/u/265ae17a3f78">Hari Vasudevan</a></p><p><em>A battery management system or BMS is core to the functionality of an EV. While much has been documented, written and talked about the mechanical, electrical and software architecture of a BMS, not much has been written about the algorithmic architecture of the BMS. Of-course a relevant question that could be asked at this point is — is the time spent in creating an algorithmic platform worth it? Here at Ather, developing and deploying such an architecture has helped us immensely in creating a robust and reusable platform. In this post we are going to detail the basic algorithmic structure of the Ather BMS and how it has helped accommodate the many different use cases of the 450X.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TyiRCBjXzESCkMnuavibrA.jpeg" /></figure><h4>Algorithm Fragmentation</h4><p>A cursory search of BMS algorithms often yields a number of various algorithms, dealing with charging, protection and discharge. Take charging for instance, even the very basic CC-CV charging flow that is common to most chargers has a number of caveats related to temperature, voltage and charging currents. What makes this trickier is that a variety of such chargers are encountered by the vehicle. For eg, fast chargers have different charging current capacities, temperature limits and protections when compared with a slow home charger. In addition to this the EV will most likely encounter multiple generations of these chargers each with its own rules. In fact since Ather continually upgrades the public charging infrastructure to improve the access and reliability of the fast charging network, it causes much (happy) consternation internally as now the algorithms will need to track these changes also. Similarly, discharge of a battery pack also needs to be handled by the BMS algorithms. Discharge control of the battery pack needs to ensure that we are able to maintain the right cell temperatures, avoid drops in individual cell voltages and gracefully transition to a lower power mode at low States of Charge (SOC). The BMS also needs to ensure consistency in performance even as the battery pack ages as part of natural degradation in cell capacity. Last but not least, the BMS also needs to compute the right SOC for display to the user.</p><h4>Optimality &amp; Robustness</h4><p>The most commonly known charging algorithm like the CC-CV belongs to a class of heuristic algorithms that gets the job done but not necessarily in the most optimal way. In the case of charging, we’re chasing minimum charging time while adhering to battery safety constraints. Similarly take the case of SOC — there are quite a few heuristic methodologies to estimate the SOC to a “decent” extent. But to maximise the usable energy consumption from a battery, it is necessary to have an algorithm that is not only accurate but also robust to a whole bunch of noise factors that a Battery Management System is exposed to.</p><p>Accommodating all of the above functionality with a multiple different algorithms paired up with the corresponding hardware or vehicle platform or scenario will eventually lead to fragmentation of the code. Finally the maintainability of the code-base will also take a hit as verification and validation start to consume increased time and effort. To get around these issues on the 450X we have developed a scalable BMS algorithm architecture (Figure 1 below) that attempts to provide a framework wherein all the above described optimality criteria and variations can be accommodated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QeZay5tfu86fmGbk1ZehKQ.png" /><figcaption><strong>Figure 1: </strong>Battery Charge &amp; Discharge Vehicle Application Architecture</figcaption></figure><h4>SOC &amp; The Kalman Filter</h4><p>Literature on the SOC estimation of a cell or battery pack is available in plenty. In fact a cursory glance through literature on this leads to various formulations of the Kalman Filter for the estimation of SOC. Literature is peppered with various Kalman Filter formulations for SOC such as the Extended Kalman Filter (EKF), or the Sigma Point Kalman Filter (SPKF) and further varieties of these with each providing added benefits for added complexity. However often literature on SOC estimation is the end in itself and further development of the Kalman filter towards an LQG (Linear Quadratic Gaussian) controller for discharge/charge regulation is overlooked. Here at Ather, we have developed a framework that can further put the state estimate obtained as part of the Kalman filter structure to create a flexible and powerful framework to accommodate most charging and discharge functions of the BMS.</p><h4>Cell Dynamics &amp; State-Space formulation</h4><p>A number of cell models are generally used for formulation of the Kalman Filter. In Figure 1<strong> </strong>below we present a simplified lumped parameter model that is in widespread use. A description of these parameters is given in 1. It is important to understand that all the RC parameters in this model are functions of SOC. Estimation of the RC parameters is a topic in itself and will be the contents of a subsequent blog post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zv7s47fsAK7uX7T3xNrriQ.png" /></figure><p>Additionally we would like to point out that our model is a second order model, whereas higher model orders may be used for higher accuracies with the trade off of complexity. Given the above model and parameters, the equations that define this system are as shown below. The voltages <em>V₁</em> and <em>V₂ </em>are described by the dynamic equations<strong> </strong>4, 5, while SOC dynamics by 6<strong><em>.</em></strong> The OC voltage <em>Voc </em>is linearized (in equation 2) and re-written to cast it in a form suitable for LTI state-space analysis. This assumption is valid as long as the SOC does not change very fast, or in other words the rate of change in SOC is an order of magnitude different from <em>V₁</em> and <em>V₂</em> dynamics, which thankfully is the case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nIEtA8KxXlNvjNPWNDJXng.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kJM-LTjfv3qpRSZSwk_uOA.png" /><figcaption><strong>Figure 2:</strong> RC parameter Model</figcaption></figure><p>Using these above equations we are now able to formulate a state-space model for an individual cell. This formulation is described in the following equations, with the state equation 7 and output equation 8 formulated as shown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FS_eOE-m6sC4dI_bJkRzag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KV2oVPi01NvJ3rTpnR73CA.png" /></figure><h4>State Estimators</h4><p>In the prior section we have a model for cell dynamics, we now explain the basis for formulating a state estimator. Of-course the way we have described the cell dynamics model is by no means the only way to describe the dynamics. Ours is a current input and voltage output system, and there exist equally valid models with voltage in and current out. Furthermore, we have not included the <em>Voc </em>hysteresis in this model, which for certain cell chemistries can be dominant.</p><p>All state estimators function via a ‘plant’ model that mimics the dynamics of the system under observation and a ‘correction’ term which is usually a measurable output of the system. Eventually the plant model and the correction term are fused together to arrive at a state estimate that is more accurate than either relying on the model or the sensor alone. The beauty of the Kalman filter is of-course that it estimates the least squares optimal estimate of the state even under varying noise conditions. A basic state estimator and its formulation is described below in equations 9 and 10.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hNWWVvGziyMxxGLyctdfAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*22UB-Sx7Bb_Gr8ddZtIE7Q.png" /></figure><p>In state estimator design of course the main question is how we design the correction gain ‘<em>L</em>’. Whether we are designing a Luenberger or a Kalman Filter, there’s tons and tons of literature on how best to pick ‘<em>L</em>’. We would like to refer the reader of this blog to the excellent webpage of <a href="http://mocha-java.uccs.edu/">Dr. Gregory L. Plett, Professor, University of Colorado</a>. A thorough description of Kalman Filter equations is described in his <a href="http://mocha-java.uccs.edu/ECE5720/">course notes on Battery management and Control</a>.</p><h4>Charge &amp; Discharge Controllers</h4><p>At this point if our intent was to only describe a better way to estimate the State of Charge (SOC), we would be done. However, while the state estimator is a great way of arriving at the true SOC of the cell, it can also be put to other uses namely in the charge and discharge control of the battery pack.</p><h4>Charging Controllers</h4><p>The most widely used charging controller for EV is the CC-CV controller, meaning that the charger charges at a constant current until it hits a terminal cell voltage and then transitions to a CV charging mode, which applies a constant voltage until the cell voltage rises to equalize this voltage and the charging current drops to zero. This transition from CC to CV on chargers is what mostly causes much of the grief in creating a scalable architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ICboK31Z2PfxTPgNkBtoug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KiYBI1x-nMIAd5cQ2tHHXg.png" /><figcaption><strong>Figure 4:</strong> Thermal Lumped Mass Model</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*launIp5ZMh_Or-t9Z-FmBA.png" /><figcaption><strong>Figure 3:</strong> Charge &amp; Discharge Control Architecture</figcaption></figure><p>Incorrect transitions, transitions at the wrong voltage, delayed transitions etc. are a subset of the problems that come up regularly while using this method. Furthermore, as discussed at the beginning of this blog, accommodating a variety of chargers with their own quirks and nuances results in code and algorithm fragmentation.</p><p>Additionally, Lithium ion batteries have idiosyncratic thermal behaviour, especially when coupled with the voltage dynamics. This makes the case for combining the thermal dynamics of batteries within the same formulation so one can control all aspects of safety and performance within one overarching framework. Before going into the control architecture, let’s quickly look at a first order linear thermal model of a battery. Refer to Figure 4 above for a diagrammatic representation of the same.</p><p>Now that we have the full state estimate</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ATDvi6LDk20K0fD0YHfhGQ.png" /></figure><p>along with</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c42qSFhXvCxfG6gXsJxsQg.png" /></figure><p>we realized that designing a feedback controller for charging and discharge was the next step. Figure 3 shows the overall algorithmic architecture of the controller.</p><p>As can be seen the system consists of two controllers — one for the charge path and another for the discharge path. Both controllers are driven off the state estimate from the Kalman Filter. Both controllers include a temperature controller for additional control of battery pack temperature. The controller gains itself can be arrived at by various techniques such as pole-placement, LQR etc… Figure 5 shows various common scenarios handled by the charging controller. Various comparisons in the plots show:-</p><p>• <strong><em>Fast Charging alone</em></strong>: Shows the effect of unrestricted charging at max charger current. Note that the terminal voltage of the cells is hard to control in this case.</p><p>• <strong><em>Charging with terminal voltage control</em></strong>:<em> </em>Given the state output equation<strong> </strong>8<strong> </strong>it is possible to control the terminal voltage of the cells during charging so we don’t exceed any prescribed charging voltage limits.</p><p>• <strong><em>Temperature Control</em></strong>: Additionally it is possible that the cell temperature may need to be controlled, so as to not exceed safety limits. This is very likely in a tropical country such as India where the ambient over concrete or tar might touch 45<strong>°</strong><em>C </em>and the cells need active temperature regulation to not over heat during charging.</p><p>• <strong><em>Slow Charging</em></strong>:<em> </em>Finally, we also illustrate how a slow charger operates at a lower current and how it is possible to charge with a different charger using the same framework.</p><p>We should also note that this framework employs the constant current (CC) capabilities of the charger. We never request a transition to the CV mode. However, it is not necessary that this be the only way to design a charging controller, we could design a controller to work in charger CV mode entirely</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dCmkr8hmOiTLFoMabWJpFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KifuqoJ99zJxu86Dda4qlQ.png" /></figure><h4>Discharge Controllers</h4><p>With our new scooter, the 450X, featuring the much anticipated WARP mode, it is more important than ever to ensure that we are able to maintain the right cell temperatures and avoid drops in individual cell voltages in an optimal and consistent manner without compromising on the unending performance this mode is guaranteed to provide. Additionally, it is also critical to gracefully transition to a lower power mode at low SOCs. It is worth noting that the problem is similar to the one described above of charging a battery in the fastest possible manner without breaching safety constraints on voltage and temperature. Figure 3 above shows the discharge control architecture to achieve this. And Figure 6 shows a common discharge profile as dictated by the discharge controller.</p><p>• <strong><em>Normal</em></strong>: Shows the effect of unrestricted discharging at max possible drive currents with graceful transition to low power with lower SOCs. Note that the terminal voltage of the cells is hard to control in this case.</p><p>•<em> </em><strong><em>Riding with terminal voltage control</em></strong>:<em> </em>Given the state output equation 8, it is possible to control the terminal voltage of the cells during charging so we don’t drop below any prescribed discharging voltage limits.</p><p>•<em> </em><strong><em>Temperature Control</em></strong>:<em> </em>Additionally, it is possible that the cell temperature may need to be controlled, so as to not exceed safety limits. This is very likely in a tropical country such as India where the ambient over concrete or tar might touch 45<strong>°</strong><em>C </em>and the cells need active temperature regulation to not over heat during a drive.</p><p>Another important point to note that along with doing this in the most optimal and consistent manner as described above, it is also important to maintain a “smooth” maximum discharge current profile to prevent jerky behaviour during a ride.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4KqhXZSFtmoA6lLLRppiSg.png" /><figcaption><strong>Figure 6: </strong>Discharge Profile</figcaption></figure><h4>Conclusions</h4><p>After all the math and result plots shown above, we wanted to circle back to what was the intent of this blog post. We began by describing how a traditional CC-CV methodology becomes hard to handle given algorithm fragmentation and why we wanted to create a unified framework for the BMS. We then introduced the design for the Kalman filter to estimate the BMS SOC, at this point realized that the state estimates of the Kalman filter can be put to greater use than just computing the SOC. Using standard modern control theory we then extended the functionality of the EKF to create an LQG controller for both charge and discharge of the battery pack. Furthermore, given the flexibility of the LQR design process we can now explore various measures of optimality on both charge and discharge of the battery pack.</p><p>However, there are many parts of this write up that refer to extensive cell characterisation that must be accomplished before we can enable such a framework. These include:</p><p>• Cell RC parameter estimation</p><p>• Kalman filter design and implementation</p><p>• BMS current, voltage, and temperature sensing</p><p>We will cover these items in future blog posts, stay tuned…..</p><h4>References</h4><p>• Lectures by Dr. Gregory L. Plett — University of Colorado Colorado Springs — <a href="http://mocha-java.uccs.edu/ECE5720/ECE5720-Notes03.pdf">ECE5720: Battery Management and Control — Notes 3</a></p><p>• Gene F. Franklin, Michael L. Workman, and Dave Powell. <em>Digital Control of <br>Dynamic Systems</em>. Addison-Wesley Longman Publishing Co., Inc., USA, 3rd edition, 1997.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bfac860b750" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cell Models & Characterisation]]></title>
            <link>https://medium.com/@shivaram.nv/li-ion-cell-modeling-characterisation-2f92d9873ad7?source=rss-a401c45e4cb7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f92d9873ad7</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[battery]]></category>
            <category><![CDATA[intelligence]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Shivaram N V]]></dc:creator>
            <pubDate>Sat, 17 Jul 2021 03:42:06 GMT</pubDate>
            <atom:updated>2021-07-17T03:42:06.028Z</atom:updated>
            <content:encoded><![CDATA[<h4>Battery Algorithms</h4><p><a href="https://medium.com/u/39f04b852f45">Shivaram N V</a>,<a href="https://medium.com/u/23553cff5a77"> Gaurav Jain</a>, <a href="https://medium.com/u/265ae17a3f78">Hari Vasudevan</a></p><p><em>In our previous blog post we had described a generic </em><a href="https://blog.atherenergy.com/algorithmic-architecture-for-bms-d1fd9f5eb1b"><em>Algorithmic architecture for a BMS</em></a><em> that attempts to strike a balance between software maintenance, performance and robustness. In this post we focus on another aspect of BMS algorithm design, namely the characterisation of cell parameters. Estimation of cell parameters is the fundamental building block of any algorithm used in the BMS. The Kalman Filter, the charging and discharge controllers, charging voltage controls etc.. all require knowledge of one or more cell parameters to operate effectively.</em></p><p>If we were to survey the literature for cell models, we would find several models both at the electrolyte/electrode level as well as equivalent circuit /empirical models that approximate the dynamic behaviour of a Li-Ion cell. However while there are descriptions of how to extract the cell parameters from various experiments, no single reference provides a unified guide to extract the cell parameters. In this blog post, we will describe the sequence of steps that are required to extract the cell parameters as well as an example of how to perform this extraction.</p><figure><img alt="Ather 450X Battery" src="https://cdn-images-1.medium.com/max/1024/1*YGDXlxFnitp8bC-9r0XFgQ.png" /><figcaption>Heart of the Ather 450X</figcaption></figure><h3><strong>Equivalent Circuit Models</strong></h3><p>Like in any system, modeling of a Lithium ion cell can be done in broadly 3 different ways - <a href="https://www.researchgate.net/figure/Black-box-white-box-and-grey-box-behavior-14-15_fig2_276500198">White box modeling, Grey box modeling and Black box modeling</a>. White box modeling for a system as complex as an electrochemical cell is extremely hard. It is testing intensive and requires information down to the levels of the quantity and grade of materials used in the cell. Black box modeling lies on the other end of the spectrum where it treats the model purely as a mathematical problem of curve fitting. While this is also testing intensive, the main drawback of this is that at the completion of the curve fitting exercise, you will end up with a black box without any way to infer the impact of change of any parameter not modelled explicitly as inputs or outputs on the system. This is where a Grey box model comes in very handy with a theoretical structure complemented by data to complete the model.</p><p>Within the paradigm of Grey box models for Lithium-Ion cells, there are a wide range of models like the <a href="https://www.researchgate.net/publication/327222260">Shepherd Model, Unnewehr Universal Model, Nernst Model and the Equivalent Circuit Model</a>. While each of them have their pros and cons vis-à-vis complexity, accuracy, requirements of test data, physical intuition etc., one feature of the Equivalent Circuit Model that we particularly like is the linear ordinary differential equation structure that significantly aids in the process of controller synthesis for charge and discharge controls. Therefore, we recommend the use of the Equivalent Circuit Model for the cell. The equations that define this model are also shown below.</p><figure><img alt="Equivalent Circuit Representation of a Lithium ion Cell" src="https://cdn-images-1.medium.com/max/701/1*GVLV7BgpfMx8lJnHIrwj4A.png" /><figcaption>Figure 1: The RC Parameter Cell Model</figcaption></figure><figure><img alt="Mathematical Model of Lithium ion Cell" src="https://cdn-images-1.medium.com/max/800/0*6rtDKepY6XczmG2w" /><figcaption>Equation 1: The generic state equation for an n-RC pair model</figcaption></figure><figure><img alt="Mathematical Model of Lithium ion Cell" src="https://cdn-images-1.medium.com/max/800/0*4AQ7J3K46JdmwPCG" /><figcaption>Equation 2: The output equation for an n-RC pair Model</figcaption></figure><p>The advantage of a cell model like this is it is generically extensible till the model reaches acceptable performance. Figure 2 demonstrates this. The measured terminal voltage response of a cell for a discharge current pulse is shown by the blue trace, the dashed lines show approximations starting from 0 RC pairs to 6 RC pairs. As we increase the number of RC pairs the response becomes more and more aligned with the measured response. In fact there is virtually no difference between the measured response and the 6 RC pair model response. In fact, even the 2 RC pair model (red trace) could perhaps be an acceptable compromise between the complexity of the model and accuracy. For offline analysis the complexity of the model is not a barrier as compute time available is virtually limitless. However in the scenario where we have to use any of these models in an online iterative algorithm such as a Kalman Filter is where the complexity vs accuracy trade-off needs to be evaluated.</p><figure><img alt="Accuracy of Equivalent Circuit Model for Lithium ion Cell" src="https://cdn-images-1.medium.com/max/800/0*A0Eq7zxQbONv9-KD" /><figcaption>Figure 2: Successively higher order RC parameter approximations vs. measured voltage response</figcaption></figure><p>There are of-course drawbacks to the RC parameter model. For example, hysteresis in VOC-SOC table cannot be accurately captured. Coulombic efficiency is similarly hard to model without losing the linearity of the state equation. Despite these drawbacks, the RC model finely treads the line between categories: theoretically accurate but impossible to implement vs. so simple that it does not realistically predict anything. One important point to note here is that the requirements of linearity and ODE structure for the model are mainly for the purpose of observer design and controller synthesis i.e. the Kalman filter and discharge and charge controls. This does not limit one from using a more accurate and computationally complex model as the ‘Plant’ to perform closed loop simulations during the design of the aforementioned observer and controller or for other performance simulations.</p><h3>Experimental Cell Characterisation</h3><p>Experimental data under controlled conditions is a crucial part of building the equivalent circuit model. Below we describe the experiments required to derive data points concerning three parameters described in the model. namely, the cell charge capacity (Q), the VOC-SOC curve and the HPPC test to derive the RC parameters.</p><p><strong>Cell Charge Capacity (Q), </strong>generally measured in Ah, is the maximum amount of charge that can be extracted from cell under specific conditions. To measure the cell charge capacity, charge the cell to full. Follow this with a constant current discharge at Q<em>nom</em>/5 Amp till the voltage reaches the end of discharge voltage. Now integrate the value of current through the discharge cycle to get Q (refer Fig 3).<br>Information on conditions for ‘full charge’ and ‘end of discharge’ are typically provided in cell datasheets. Q<em>nom</em>/5 is the most commonly accepted industry standard for measurement of charge capacity of Li-ion cells. An important point to note here is that while the nominal charge capacity Q<em>nom</em> of the Li-ion cell is provided in most datasheets, what we want to estimate here is the actual capacity Q from a statistically significant number of samples of cells.</p><figure><img alt="Lithium ion Cell Charge Capacity Measurement" src="https://cdn-images-1.medium.com/max/1024/1*j5NlsD8t80pb2AUvLn-3qA.png" /><figcaption>Figure 3: Cell capacity measurement</figcaption></figure><p><strong>Open Circuit Voltage (Voc)</strong> is generally defined as the voltage between the terminals of an electrochemical cell when no current flows through the cell. Low-current Voc and Incremental-current Voc<strong> </strong>tests are two common methods to observe the VOC-SOC relationship. The Incremental Voc test consists of many SOC intervals and rest periods after which the Voc with the corresponding SOC is measured. The steps required for this test are as given below.</p><ol><li>Charge cell fully to 100% SOC</li><li>Discharge at Q/5 using a negative pulse current followed by rest at every x% SOC till end of discharge voltage</li><li>Charge again following the same routine but with a positive pulse current till end of charge voltage</li><li>Apply Averaging and Linear Interpolation step to obtain the VOC-SOC curve at different intermediate SOCs</li></ol><figure><img alt="Lithium ion Cell Open Circuit Voltage Curve Estimation" src="https://cdn-images-1.medium.com/max/1024/1*UXa026oNhmCxKguPghbPSg.png" /><figcaption>Figure 4: Voc vs SOC</figcaption></figure><p><strong>Hybrid pulse power characterisation test</strong>, also known as HPPC test. This test investigates the power capabilities of a cell under operating conditions at different temperatures, pulse width and state of charge. The HPPC test based on the defined test sequence provides us the data to derive the RC parameters used in cell model.</p><ul><li>Charge the cell fully to 100% SOC</li><li>After rest, apply constant current discharge and charge pulse of Q/2 Amp for ‘n’ seconds and discharge by x% SOC using a pulse of Q/5 Amp with rest in between</li><li>Repeat the same till end of discharge voltage is reached</li><li>Discharge the cell till 0% SOC and repeat the above pulse sequence while charging by x% SOC using charge pulse of Q/5 Amp for measurement during charge</li><li>Repeat the same till end of charge voltage is reached</li></ul><figure><img alt="Hybrid Pulse Power Characterisation Tests for Lithium ion Cell" src="https://cdn-images-1.medium.com/max/1024/1*444tw754WY7HFi9hDPGyuw.png" /><figcaption>Figure 5: Snapshot of HPPC pulse sequence at some predefined SOC. Please note that currents and voltages here are normalised.</figcaption></figure><figure><img alt="Hybrid Pulse Power Characterisation Tests for Lithium ion Cell" src="https://cdn-images-1.medium.com/max/1024/1*ZSmX7OFfe27dWUk1zUPD6A.png" /><figcaption>Figure 6: HPPC pulse sequence repeated at interval of 1% SOC during discharge</figcaption></figure><p>Please note that it can take up to a few hours in rest condition for a cell to return to an electrochemical and thermal equilibrium. Ensuring long rests after charge or discharge pulse improves quality of data. In the next section, we shall see how the data from the above tests can be used to fit the equivalent circuit model.</p><h3>Parameter Estimation via Convex Optimisation</h3><p>In the previous section we have described the aspects of cell characterisation as well as the HPPC test. In this section we focus on the extraction of the RC parameters from the HPPC data. Referring back to <a href="http://mocha-java.uccs.edu/ECE5710/ECE5710-Notes02.pdf">literature</a>, we see that there are several methods for computing RC parameter values, however these are at best approximations or rules of thumb.</p><p>Using the information gathered in the experimental characterisation of the previous section, we can now compute the RC parameters at every SOC measurement point via simple constrained optimisation. In the section below we demonstrate a simple example that computes the RC parameters given an isolated pulse at a particular SOC.</p><h3>Example</h3><p>This example illustrates the fundamentals of both simulating the dynamics of a cell model in Python as well as using parameter optimisation to determine RC parameters given the terminal voltage response of a cell to a pulse of current.</p><p>First we focus on the cell modelling bit, the code below shows how parameters obtained from cell testing can be organised to create a dynamic model of the cell. Please note that here the RC parameters are described at a certain SOC. In reality however, the RC parameters values vary with SOC and must be defined at every SOC point. Nevertheless this is a good starting point.</p><p>To define a cell we have to define the following parameters</p><ul><li>Cell Capacity</li><li>VOC vs SOC Table</li><li>RC Model Parameters</li></ul><p>The loadCellFn defines these parameters for use in the simulation as well as the RC parameters for a particular SOC. As mentioned earlier, RC parameters are not constant and change as a function of SOC. However for now we are going to ignore this fact.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/22f780842ccf204327ecfbf3dcd9e9bd/href">https://medium.com/media/22f780842ccf204327ecfbf3dcd9e9bd/href</a></iframe><p>We now define a current pulse that is an input to the cell model. The code snippet below constructs this pulse at a defined sampling rate.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/184694d0c7d0ff449be68f1f798a9cef/href">https://medium.com/media/184694d0c7d0ff449be68f1f798a9cef/href</a></iframe><p>Now comes the fun part. Using Equation 1 we can define the cell model in Python and then use the lsim function to model the behaviour of the cell given the current pulse input. Please note that we can use lsim for this because the state equation defined by Equation 1 is linear where as the measurement equation defined by Equation 2 is non linear. If this was not the case we would have to use the odeint function to solve the non-linear dynamic equations. Finally after invoking lsim the output terminal voltage “Vt” is then computed using the nonlinear measurement equations. The results are also plotted at the end of the gist snippet below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a8792e6f3ec38af9dd2c1fbd81663a3a/href">https://medium.com/media/a8792e6f3ec38af9dd2c1fbd81663a3a/href</a></iframe><p>For this hypothetical cell, we use a higher order model (10 RC Pair) response as the measured data (Full Cell Response) for performing the optimisation. We then demonstrate how to compute the values RC parameters for lower order models. Note that this is similar to real life situations where the result of the HPPC test is used to fit the RC parameters. To do this we use least squares fitting using the <a href="https://scipy.org/">SciPy</a> <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html">minimise</a> function. The minimise function iterates over RC parameter values using the default solver, note that we have the choice of selecting different solvers or different fit criteria to ensure that the results are more inline with our measured data, the further tweaking of the solver is not considered for this blog post. The gist shown below provides a code snippet for this optimisation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/34e29bab1ec9d518f139c75a859743eb/href">https://medium.com/media/34e29bab1ec9d518f139c75a859743eb/href</a></iframe><p>The following figures show the evolution of the RC parameters in every iteration of the solver and the final best fit. Note that with 6-RC pairs we obtain an the almost exact response of the 10-RC pair model. In a real life scenario we would only model a 6 -RC pair network to save ourselves the computational complexity of a 10-RC pair model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*DSw4-L0KQsEGEpkLJ_RDgg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*d7dUduafstWmhmSjW029sQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*NUckANi_d7_Lb1uAOwim1w.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*KBu5Y1bGA8f6yo7ZtmeQ6g.gif" /><figcaption>Figure 6: RC Parameter Evolution during optimisation</figcaption></figure><p>The code to perform both the cell modelling and the RC parameter estimation is given in the snippet below. Try to change the RC parameter values and/or the optimisation parameters to view effects on the parameter estimation and how it effects the final fit.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/80ff99c6d4ebb5a39d53f4360b194de2/href">https://medium.com/media/80ff99c6d4ebb5a39d53f4360b194de2/href</a></iframe><h3>Conclusions and Inference</h3><p>In the sections above we have seen how we can start with an equivalent cell model and gradually build up enough experimental data and code to derive the appropriate parameters for a Lithium ion cell. While this gives an introductory idea on how to characterise a cell for use in EVs, there are several complexities we have glossed over. These include:</p><ul><li>The effect of temperature</li><li>The effects of VOC-SOC Hysteresis</li><li>Validity of the model at edges of SOC, i.e typically less than 2% or greater then 98% SOC</li><li>Issues with the Convex Optimisation solver at various SOC points, i.e how to keep the RC values smoother and now have them arbitrarily swap places</li></ul><p>As part of these series of blogs, we will next focus on the construction and implementation of an Extended Kalman Filter (EKF) for EV applications and the constraints imposed on the tuning of the EKF due to user-facing requirements. Stay tuned for more on this…</p><h3>References</h3><ul><li>Lectures by Dr. Gregory L. Plett -University of Colorado Colorado Springs -<a href="http://mocha-java.uccs.edu/ECE5710/ECE5710-Notes02.pdf">ECE5720: Equivalent-Circuit Cell Models — Notes 2</a></li><li>An Overview of Generic Battery Models -<a href="https://www.researchgate.net/publication/327222260_An_Overview_of_Generic_Battery_Models">https://www.researchgate.net/publication/327222260_An_Overview_of_Generic_Battery_Models</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f92d9873ad7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>