Battery Cell Balancing and State of Charge (SOC) Estimation
From the series: Hybrid Electric Vehicles
Explore battery pack electro-thermal modeling and simulation. In this video, you will learn to:
- List the tasks of a battery management system.
- Identify how Simulink® can model the physical plant and controller for the battery pack and its balancing circuit and provide results in terms of the electrical and thermal behavior.
- Use one of the nonlinear observer blocks from the controls library to keep track of the state of charge of a cell.
Published: 11 Jul 2019
Hello, everyone. My name is Javier Gazzarri and I am an application engineer at MathWorks, specialized in design and analysis of battery systems, using modeling and simulation. I am a mechanical engineer with a bachelor's degree from the University of Buenos Aires and master and PhD degrees from the University of British Columbia.
Before joining MathWorks seven years ago, I worked for years for the government of Canada studying a low temperature fuel cells at the Institute for fuel cell innervation of the National Research Council in Vancouver, BC. Modern battery systems, especially those based on lithium ion Chemistries require careful monitoring and control of the state of each individual cell to ensure safety of operation, good performance, and acceptable durability.
This task is trusted to the battery management system which measures current, voltage, and temperature of each cell and controls that cooling, balancing and power elements of the pack, as well as operates the disconnect breakers for startup and power off.
This video shows examples of typical battery management system tasks, such as balancing, thermal analysis, and SOC estimation. We will begin with a model of a simple three years 1P battery pack architecture, that starts at low SOC and the auto balance. We will show how Simulink can mold physical plant and controller for the battery pack and it's balancing circuits and provide results in terms of the electrical and thermal behavior.
Secondly, we we'll show how a nonlinear observer can keep track of the state of charge of the cell. The same unit cell used in the previous example, is used to be used in this one to create a model of the real plant.
In a previous video, we showed how to create a battery cell equivalent circuit and how to parameterize it using controlled temperature experimental data. We saw that the result of each estimation procedure was a vector of equivalent circuit parameters. With a different values for different levels of SOC.
Repeating the estimation procedure at different temperatures yields a lookup type of matrix that outputs the OCV, resistance, and capacitance of the elements as a function of state of charge and temperature. The battery cell block created in this way can now be part of a system like a model whose architecture reflects our design needs and specifications.
The first example that we will share with you today reflects one of the important tasks of the BAMS, cell balancing. Cycling a battery pack eventually causes individual cells to become out of balance. Different caloric efficiencies across the cells it's one typical cause for this problem, which manifests itself as a difference in SOC levels and different cells.
This situation is undesirable because it limits the total amount of energy that can enter or exit the battery pack since the weakest cell limits the amount of charge that can be drawn from the entire system. And the strongest cell limits the extent to which the system can be charged.
Typically, balancing is done in either of two ways. Using a deceptive method, commonly referred to as passive balancing, in which the excess charge from the cell at the top is bled through resistors connected
in parallel with each individual cell. And using a nun dissipated method, commonly called active balancing, in which the excess charge from some cells is redistributed among other cells that require rate.
Today we will see an example of passive balancing. The Designer of the balancing system decides when to balance, during charge, during discharge, or both, and over what SOC range to do the balancing. In this case, we will do it during charge over the entire SOC range.
Let's see the model structure. This Simulink model uses Simscape components to represent a small battery pack with a 3S 1P topology, 3 cells connected in series, one parallel string. The battery pack at the center receives charge from either source on the left.
The charging profile we will show here is known as CCCV charging, constant current, constant voltage. In which the initial charging stage precedes under constant current control typically at a rate of C over 2. And once the voltage measured across terminals reaches the nominal full charge OCV, value the system changes to voltage control with this voltage value as the set point.
Charging continues until the current reaches a predetermined lower threshold. The change from current to voltage control is done with the switch we can see on the lower left. Going inside the battery cell block, we can see the three cell series connection. To the right, we see the balancing circuitry, which includes the bleed resistors and the transistors that selectively switch the bypass branch on and off according to the relative SOC of the battery cells.
When appropriate, the resistors divert part of the charging current, thereby slowing down the rate of charge of the cell they are connected to allowing the cells below to catch up. The control signals, that command in MOSFET gates arrived from the logic block on the right to which we will return later.
The orange blocks to the left of the cells represent convective heat transfer between adjacent cells. These blocks are connected to the thermal part of each cell that leads to the thermal part of the equivalent circuit. The heat generation is assumed to be only the result of dual effect.
The thermal connection is asymmetrical since the cell at the bottom is thermally insulated on one side while the cell at the top is connected to the atmosphere via convective heat transfer block. Diving one further step down in the battery cell block, we see the 3 RC circuit whose parameters we found using the Mollica relation technique explained in our previous video.
Each element has input ports for the temperature and the state of charge. On these inputs, are the entry points for the two dimensional lookup tape holes inside the block. The output board from the internal resistances corresponds to the participation inside each resistor.
This power is converted to a heat flow source inside a thermal block that is in turn thermally linked to a thermal mass. Let's run the model and see how it works. The plot on the top left shows the total voltage and current, where we can identify the constant current and constant voltage periods. On the top right, we the SOC levels.
Initially low and 10% different from one another, they slowly approach each other as they increase until their values are close enough and charging can proceed without balancing. The graph on the bottom left shows the temperature evolution of the cells. The temperature buildup is uneven because the current flowing through each resistor is not the same at each moment in time as can be observed in the scope to the right. As well as because of the asymmetrical thermal topology described before.
Observing their results, we can see that although the maximum temperature is not of concern from the safety point of view, it is likely that the difference in temperature will cause the hottest cell to degrade more quickly than the one at lower temperature, exacerbating the imbalance.
This suggests the need for active thermal management to keep the temperature difference as low as possible. Finally, let's explore the logic that controls the balancing process. Stateflow is an add on library on top of Simulink, specifically designed to model state logic algorithms.
Each block here represents state during which some variables are assigned to certain value. In this case, though so the output signals feeding the MOSFET gates. Based on the OCV values corresponding to each cell, a MATLAB function source them and based on their relative SOC Stateflow decides which MOSFET to activate to slow down the charging of that cell.
It is important to note that here OCV is readily available because the plant is simulated. In a practical application, OCV should be estimated based on terminal voltage measurements corrected by the estimated voltage drop over the internal resistances.
Once the stateflow logic is implemented in simulation, we can use automatic C-core generation for the implementation of the algorithm in hardware without the need to rewrite the algorithm in C. In our second example, we will see another application of the unit cell block, this time to simulate a cyclic charged discharge profile in a battery and nonlinear a Kalman filter based SOC estimation method.
The accurate estimation of the SOC is of crucial importance in BMW for a variety of reasons. Among them, the medication range anxiety. If you're driving your electric car, you need to know how long it will take for you to have to recharge a battery. Unlike a conventional vehicle fuel tank, whose level can be directly measured, the SOC of a battery cannot be measured by using an indirect method. For example, OCV estimation, Coulomb counting, or a combination of both.
These methods have their drawbacks and sometimes they are not applicable effectively. For example for cells with a very flat discharge profile. A more advanced approach to estimating state of charge is the use of an observer. Typically, a Kalman filter, which receives the input and output signals from the battery and computes the internal states using a model of the battery cell and a recursive algorithm.
In this example, we use the unscented Kalman filter, a type of nonlinear estimator from the control system tool box. We need a nonlinear observer because of the relationship between OCV and SOC. The UKF requires a minimum of two functions as arguments. A state transition and a measurement function.
The former describes the relationship between state and inputs, and the ladder yields a system output as a function of states and input. These functions can be MATLAB or Simulink function blocks and this example uses the ladder. The state transition function calculates the evolution of the states based on the current input.
This calculation requires the previous computation of the equivalent circuit parameters using the temperature and current signals that go through that nonlinear lookup tables that characterize the battery cell that we estimated in our previous video. Inside this block there is a malfunction with a state update equations for the four states, namely the SOC, and the three voltages across the RC components.
The measurement function calculates the terminal voltage as the difference between OCV and the sum of the individual voltage drops across the rest of the equivalent circuit elements. No additional function is needed in this case, because the measurement functions and there's no memory.
Running the model, we observe that the battery cell is subjected to alternative charge and discharge current cycles. The SOC estimate is initialised at 60% although, its actual value was 50%. The algorithm converges to the true value after about two hours of simulated time.
Finally, let's talk about hardware implementation of the control algorithm. A required step to implement a Simulink algorithm in hardware is generation of an embeddable C code. We can do this automatically
from the controller block using the built commands. This will translate the block diagram into C adding comments to the code for two-way navigation.
In this video, we showed how to create a model of a battery system with typical tasks trusted to the battery management system. Cell balancing and SOC estimation. The unit battery cell created in a previous video was now utilized into a different design cases. The physical modeling library elements in Simulink provided an intuitive means to create battery circuits in a flexible way and to combine plant and controller in a single environment.
In the first example, a simple 3S 1P battery pack, started a low SOC and out of balance. Simulink, stateflow, and Simscape enabled that design of a charging and balancing strategy including automatic core generation for embedded implementation.
Finally, we showed a nonlinear Kalman filter application for state of charge estimation on a unit battery cell reused from the previous example. Thank you for watching.
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.