SYSTEM MODELING OF A LITHIUM-ION BATTERY

Lithium Ion Batteries are widely used in today’s portable world. A working model is required in order to safely maximize the output of these batteries, and to efficiently choose appropriate sized systems for any given application. A model of this battery would require parameters that are not easy to measure, and need to be estimated. This work further explored on one existing model for the lithium ion battery, the linear dynamics single particle model, and improved upon it. Data was collected then modeled through the use of several matlab functions, and the final model was then used to predict the behavior of different applications of the battery. A variety of high and low currents in a variety of temperatures was used for both data collection and testing. This design began to explore the hypothesis that a single model can be used for the entire range of the batteries capabilities, instead of the multiple that is currently used. The parameters of this model were then extracted and related to real electro-chemical properties of the battery. Initial testing showed promising results for this hypothesis. The resulting model can be used in the development of future battery based electronics reducing cost and maximizing effectiveness.


Introduction
The Lithium Ion (Li-Ion) Battery is a widely used source of portable power in many electronics. These batteries, like most other, come in discrete cells that can be stacked together to create a larger power block. The basic dynamics of the Li-Ion battery can be described as the reversible transport of the lithium ions from a negatively charged electrode (anode) to the positively charged electrode (cathode) [3]. These ions can then be moved back to the anode through a recharging process, which allows reuse of the same cell. Over time this leads to the degradation of the battery, changing many of its physical properties. These properties also change with the state of charge (SoC) of the cell, as well as the temperature the cell is being operated at. The combination of these variables makes the Li-Ion cell difficult to model, and a definitive method hasn't yet been created. The specific goal is to create a model based on physical data that accurately matches output voltage based on a specific input current profile. This model will be created by estimating the values of a state space equivalent of the battery, which when combined with state of charge and temperature data, will provide output voltage given an input current. These values will be calculated using the subspace identification method [4], back tracing the measured voltage through the model to calculate both the input and output of the state space block, which in turn will give the parameters of said block.
In order to properly use the cell in complex, rugged designs, a reliable model is required. Many different types of battery models have been attempted, ranging from simple linear equivalent circuit models to sophisticated electro-chemical models involving nonlinearities and partial differential equations. The currently used models work in idealized scenarios and often deal in finite cases. For this work an improvement upon the electro-chemical single-particle model developed in [2] will be used to create a model that can adapt to state of charge and temperature. This model uses input state of charge and current data to predict the output voltage of a system, going through a dynamics block with adjustable parameters based on SoC, then finally through an Open Circuit Potential (OCP) gain curve. The OCP curve is a non-linear curve as a function of SoC. Temperature will change the values of the OCP curve, and will be the added functionality of the design. The current data is also sent through an additional parameter, a constant over potential gain block, and summed with the output of the OCP block. In practice, having an accurate I to V model of the Li-Ion battery will allow for both a better understanding of the individual parameters of the cells themselves, as well as a baseline to design additional systems that work in conjunction with the cell. This would allow for a realistic approximation of expected results rather than exhaustive testing of the added system.

Review of literature
There are many methods currently used to model a Lithium Ion Cell. It is important to understand what is happening with a Li-ion battery before trying to represent it. The cell can be broken up into two half cells, each with an electrolyte which submerges an electrode, either the cathode or the anode. These two half cells are separated by a medium referred to as a separator. This separator is attributed to the battery's internal resistance, and is often ignored in modeling. The cell behaves similarly in both charging and discharging modes, where lithium ions are transferred from one electrode, depending on the direction of the charge, through the electrolyte and separator into the other electrode [5].
Two major models currently existing for lithium ion cells are the equivalent circuit model and the electro-chemical model. The equivalent circuit approximation uses exclusively electronic components in the form of capacitors and resistors to represent the battery. The resulting model can be seen in figure 1 and is a voltage source going through a resistor, followed by a series of RC circuits [1,6].
This model has the advantage of being very simple to calculate and use, as it deals with exclusively linear modeling. The voltage source of this model represents the open circuit potential (OCP) of the system, and the first resistor represents the internal resistance and over potential gain of the system. The remaining n RC circuits represent the nth order dynamics of the system. These will be explained in further detail later.
The electro-chemical model is derived directly for the chemistry of the battery rather than its behavior. Two variations of it are the single particle model described in [2,5,6,7,8,9] and the Doyle-Fuller-Newman model described in [2,5]. The single particle model (SP model) will be the main focus of this work. This models the diffusion process of the ions moving from one electrode to the other through the electrolyte. The SP model can vary in complexity at the cost of accuracy. The particular version of the SP model we are interested in is the Linear Dynamic SP model described in [2]. This model has a linear dynamics block whose output is sent through the nonlinear resting Open Circuit potential block before being added to the over potential gain output of the system. This can be seen in Figure 2. Jenkins describes the Linear Dynamics Model as two linear differential equations, one of which is simply an integrator of the current of the system. As such the design used in this work splits the dynamics block into two portions, a current integrator, and a dynamics block, the design of which will be shown in the next chapter. "The output voltage is a nonlinear function of the input current and both electrode surface concentrations and is given by" where OCP is a function of state of charge and OVER is a function of current and state of charge [2]. Estimating state of charge can be achieved through the combination of the two linear equations discussed previously. Model Overview The ending model of this work is based off of the model described in [2], which can be seen in Figure   Once the input of the OCP block is calculated, the output of the integrator block is a trivial calculation, and is subtracted from the OCP input. This gives the output of the dynamics block which when combined with the input gives the parameters of the block.

Calculating OCP Curve
In order to calculate the OCP curve, a rest phase of 10 minutes was added to the current profile after every ten minutes of activity shown in Figures 4 and 5.
This is used to allow the contribution of the dynamics to settle to zero to isolate the OCP at any given state of charge. The actual settling time of the system varies based on SoC, and in some instances can be closer to an hour, however the actual OCP value can be calculated by fitting an exponential decay to match the modeled ten minute portion to find the actual OCP at the given SoC. The matlab optimization toolbox was used to fit the curve, optimizing over the function: OCP1 Where c 3 is the start point of a segment, 4.62/c 2 is the settling time, and c 1 is the difference between the start and end point of a segment. c 1 + c 3 gives the settled value of the segment, which is the OCP value of the segment.
The current profile was chosen such that each segment is around a five percent gain/loss of SoC. This allowed for enough points to use spline interpolation to create a curve for the full range of SoC. The final OCP curve for the initial model can be seen in figure 6 OCP values for a zero percent SoC and 100 percent SoC were taken from the data sheet of the battery, since safety cutoffs for the battery prevent accurate readings under these conditions.

Optimizing parameters and over potential calculations
At the start of the modeling process, it was assumed the Over Potential gain could be simplified to a constant value based on the results of Jenkins [2]. A preliminary value was obtained based on the battery chemistry, and was then optimized with several other parameters including initial SoC, and the first several points of the OCP curve. Initial modeling results showed all segments with greater than a thirty percent SoC fit extremely well with the data, but those prior to this point showed large error. By optimizing over the OCP curve in this range, as well as the over potential gain, these segments matched closer to the measured data, but was still showing considerable error. This can be seen in Figures 7 and 8. However, when modeling just the first two segments of the charge data, a much closer fit was obtained, which can be seen in Figures 9 and 10. Upon closer examination, the over potential constant was much higher in this model, with a value of 0.06 compared to the value of the whole model being closer to 0.045. This process was done multiple times to see the optimal over potential constant for segments 2 and 3 (Figures 11 and 12) and segments 3 and 4 (Figures 13 and 14). The over potential constant continued to decay towards the value found when modeling the entire charge portion of the data. The over potential constant was changed to be a piece-wise linear function, with the first thirty percent SoC being a negative sloped line running through the point 0.06 at 0 SoC and 0.045 at 30 SoC. The entire data set was then modeled using this new over potential calculation. The results of this can be seen in Figures 15 and 16.
At this point, the constant Over Potential gain was changed to have the same constant value over thirty percent SoC, but now includes an exponential decaying segment from zero to thirty percent SoC. The exponential was modeled with the following functions: where S is the settling time of the exponential, which in this case is the point where the function returns to its constant value, c, or thirty percent SoC, and Y is the Over Potential value at zero SoC. This Y value was obtained by optimizing the over potential value of a single segment, which accurately modeled the segment.
The S and Y and c values were added to the optimization of the model as a whole, leaving nine total parameters being optimized at any one time. The over potential curve can be seen in Figure 17 The cost function being optimized over recalculates the spline of the changing OCP curve. It takes the current profile of the given segment and the initial state of charge as input arguments, and generates the SoC curve for the given segment.
The previously mentioned inverted OCP spline function is used to get the input value of the OCP block. This is subtracted from the SoC value to retrieve the output of the dynamics block. This output, as well as the input are sent to the system identification toolbox to generate the dynamics parameter. The output to the OCP block is then calculated using the new dynamics block, and its value is added together with the over potential output. This final value is compared to the actual output voltage by minimizing:

Current Profile
The current profile used for the modeling was selected based on a few requirements. Each segment of the profile increases/decreases the SoC by five percent.
The system identification toolbox requires a persistently exciting input, requiring a profile that has multiple changes in input current. Both large and small currents were used in the creation of the profile, to accurately reflect possible use cases of the batteries. Each current segment begins and ends with a sharp increase of 1.25 percent SoC over 3.5 minutes, with a 5 minute increase of 1.5 percent SoC in the middle. The profile as a whole allows for an accurate model over the full range of SoC. The basis of the current profile was discussed in [2], however it was modified to have larger and smaller currents to satisfy the interesting input requirement of the system identification, as well as to contain the full range of expected currents on the battery in the field.  After the original model was created and verified, several more runs were conducted and modeled using the same initial parameters at both room temperature and a higher temperature of 50C. The cells used in this test were different than the ones in the original model, however all ocp points were within a few mV. The ocp values also did not vary with temperature change. The over potential values did however. Figure 22 shows the initial .35% SoC over potential gain. However, the constant value used for the SoC's greater than .35 was optimized to the same value over both the original model as well as the new runs over both temperatures. From this the conclusion follows that these parameters remain relatively static over temperature and cells outside of the initial portion of the over potential gain.
Looking at the other parameters, the eigen values of the a matrix were extracted to obtain the fast and slow poles of the system as well as the unique C*B matrix value to compare the models.
The discharge and charge models for the high temperature data are close enough to be considered the same model, however the dynamics parameters differ between the room temperature discharge and room temperature charge models.
The Discharge model from the room temperature data also follows the model for both sets of high temperature data. Additional insight is required to find the difference between discharge and charge sets for this data.
Looking specifically at the results of the new runs, the error is slightly larger than the initial run, however is still within an acceptable margin of around 0.05 V. This error is smaller near the center of the segment and grows as SoC reaches 0 and 1. The results of the additional room temperature run can be seen in Figures   23 and 24 while the results of the high temperature run can be seen in Figures 25 and 26.

Advantages over Equivalent Circuit Model
This model is an improvement over the equivalent circuit model based on its design. As discussed in chapter 2, the equivalent circuit model has similar components as the linear dynamics SP model, however they are arranged differently.
The OCP and over potential values are before the dynamics in that model, which has the advantage of linear modeling, however it requires multiple dynamics for varying states of charge. While the actual calculations to obtain the model appear to be simpler, the resulting design is inherently more complex. By building the model based on the actual chemistry of the cell, the dynamics block appears before the two nonlinear blocks. While this requires a more complex modeling process to isolate the dynamics, it results in a model that works for all states of charge, and potentially temperatures. Using the methods previously discussed, obtaining the input and output of the linear dynamics is relatively straight forward, and results in an overall simple design for an efficient and accurate model of the lithium ion cell. Figure 18. Model of both discharge and charge data using an exponential function for over potential gain, entire charge and discharge data segments were modeled using a single dynamics block Figure 19. Error of Figure 18, obtained by subtracting modeled from measured voltage Figure 20. Model of both discharge and charge data using an exponential function for over potential gain, entire charge and discharge data segments were modeled using a separate dynamics block for every 5 percent gain of SoC

Conclusions and Future Work
Expanding upon this work can be done through higher order dynamics modeling. Through observation, there appears to be two poles in the system. One of which decays within a few minutes, while the other takes significantly longer. The model discussed in this work uses a first order dynamics model, which appears to be sufficient, however a second order design could be pursued to obtain a more accurate representation of the battery.
Other potential avenues for continuation can be seen through creating a fully temperature dependent model. Obtaining more samples of models at different temperature points and interpolating between them to create a full model that can take temperature and current as an input and return an accurate representation of the battery with wildly fluctuating temperature would be the next step in this direction.
Further improving the model to more accurately model high and low SoC values to reduce the larger error near the extremes will be another potential continuation. The model handles extremely well with middling SoC values, but suffers near the extremities of SoC. A potential hybrid design with a few models at the high and low end with a single model encompassing the center portion would take advantage of both designs if the additional precision is required.
Some models had drastically better results than others, using the same methods to both gather and model the data. Further analysis into these difference would help broaden the understanding of the underlying mechanics behind the batteries. This would also help definitively confirm a single model is sufficient to represent all conditions the battery will be in.
Since the parameters of the charge and discharge data sets were so close to each other, it is highly feasible that a single model can be used for both sets. This would not work for the current profiles used in this work due to the discontinuity between the sets, however with a continuous current profile such a model could be constructed. This would be most accurate in a model that ranged from 1-0.02 SoC, as below 0.02 this model starts to degrade.