Challenge

Week 7 State of charge estimation

STATE OF CHARGE ESTIMATION OBJECTIVE: By using the given lithium ion battery management project…

OBJECTIVE:

  • The main objective of this challenge is to understand how the BMS (Battery Management System) will work and how to simulate the BMS model in Simulink, understanding the results obtained from the Simulink model.
  • How to calculate the SOC (State of Charge) in Coulomb counting method and how BMS will implements Coulomb counting for SOC estimation.

BMS MODAL PROJECT:

Download the project of battery management system from the link

https://in.mathworks.com/matlabcentral/fileexchange/72865-design-and-test-lithium-ion-battery-management-algorithms

Save it and extract the folder.

open matlab and make current folder as the folder having BMS project

open the battery system.prj it will open the BMS project

select Tests > system > BMS closed loop harness dashboard

it will open the simulink model of BMS closed loop dashboard

QUESTION 1: Simulate the 3 test cases from harness dashboard and write a detailed report on the results.

Model: before running the test cases.

it contains subsystem 1 - Test sequence variant which contains the 3 test sequences,the test sequence needed can be selected in this subsystem.

Subsystem 2 - it is manual variant, if this block is active , we have to select the test sequence manual by using rotary switch which have 3 conditions battery,charging and driving.

BMS state request is the subsystem which is the request input to the BMS closed loop which gives which test sequence is selected whether it is automatic test sequence or manual selected sequence.

It contains indicator light lamps of fault state, High Temp, Overvoltage, Charger, Voltage Sensor, Overcurrent, Low temp, Under Voltage, Inverter state of a battery.

Green light is the good condition of battery,red light indicates the bad or fault condition in the battery system.

BMS CLOSED LOOP:

The closed loop consist of two subsystems BMS ECU and Plant

battery plant has two configuration of 1 module and 16 modules of battery which can be selected by set plant configuration block.

BMS ECU:

BMS ECU is the software like unit which controls,protects,balance and manage the battery,

It consists of subsystems

current power limits calculation - This block controls and calculate the charge current limit,discharge current limit.min voltage of cell and max voltage of cell.

state machine - This is state machine, which gets the input from the state request,based on the state request state machine goes through the logic of charging,discharging,balancing by open the contactors of the battery,inverter and monitor the fault states and give the BMS output.

SOC estimation - SOC is accurately estimated by coulomb counting and using the Kalman filters,

Balancing logic - This is the subsystem which consist of state machine which will balance the cell according to the BMS state,It will activate balacing or deactivate the balancing according to the BMS state requirements.

PLANT:

Battey pack - consists of the cell with some configurations of voltage and capacity.

Precharge circuit - It is used limit the Inrush current to slowly charge the downstream capacitance.

Charger and Load - charger subsytem is with controlled current source which charges the battery according to the BMS state and drive load subsystem consist of load requirements of the drive cycle which draws the current and discharge the battery according to the load.

After the compilation is successful the scope opens up. The scope consist of the measurements of cell voltages,cell temperatures,SOC,pack current,BMS State,Balancing command.

Task - 1:

1.Simulate the 3 test cases from harness dashboard and write a detailed report on the results

TEST CASE - 1

Procedure:

Select the test sequence variant as 1 and inside the BMS state request subsystem the test sequence 1 is selected.

double click on the test sequence it will open the sequence editor as shown below

  • Driving state for the first 3000 sec.
  • Then after driving state Balancing of cell ocuurs for the next 1000 secs duration.
  • After the balancing Charging and balancing occur for next 5000 secs
  • Post Charge Balancing is occuring after 9000sec till 20000 secs simulation end time.

Results of case 1:

Test sequence 1

Dashboard results:

The Lamp indication were green for all states which means the model is in good condition and no fault is occured.

Scope of test sequence 1:

The above Dashboard model visualizes the first test case results with green colour in all the lamp blocks.

  • The first graph ‘Cell voltage’ visualizes the cell voltage of all the cells in the entire battery pack, while simulating the model the cell voltages are changing as per the current flow (in and out). In the initial stage of simulation the, the voltages are slightly different because the model simulation was initialized with a slight associate of imbalance in the voltages are deflecting from 3.1V to 3.9V and the time period is 0.3*10^4 seconds. Now we can visualize the balance state of voltages their respective cells until the voltage of cells reach 4.2V, and it will remain till the end of simulation. We can observe a small voltage difference in their voltages and the voltage lies between 4V to 4.2V due the system is on standby mode.
  • Now coming to cell Temperature, the temperature starts at 289 degrees and it will increases gradually, all the cells have different temperatures. The temperature traces shows the significant difference between the highest and lowest temperature cells, due to symmetry in the merged layers in terms of their thermal characteristics and behaviour. The 6th cell is high temperature cell and the 1st cell is lowest temperature cell due to it is thermally insulated at one side. In the graph we can visualize that the temperature of the cells will gradually increase till the time of 0.6*10^4 seconds and then the temperatures of all the cells will stars depleting gradually, at the end of the simulation the temperatures of all the cells are 293 degrees, 297 degrees, 302 degrees, 304.95 degrees, 307 degrees and 308 degrees.
  • The SOC (state of charge) graph visualizes the differnt battery cell performances corresponding to coulomb count method, corresponding to ukf and ekf. The initial SOC is 75%, the starts at 80% to set their capability to recover. It is apparent that coulomb counting never does, because it has no way to get feedback to understand it is wrong due to its absence of voltage information. Both the algorithms recover on the other hand, from the initial error within the first hour of simulated time. With the ekf slightly outperforming than ukf.
  • While in the charging state due to constant current phase, the current is lies between in the range of 19A to -70A in the time range of 0.3*10^4 seconds because maximum cell voltage is high. After 0.3*104^4 seconds the current will remain at 0A till 0.4*10^4 seconds and then the current will raise till the current attains 30A and the current will remains at 30A till 0.49*10^4 seconds. Now the current starts depleting gradually to around 2A and again it will depletes to 0A, from 0.7*10^4 seconds to till the end of simulation the current will remains at 0A.
  • The other two scopes in result output visualizes the BMS (battery management system) and the balancing command signals respectvely.

TEST CASE - 2

Procedure:

Select the test sequence variant as 2 and inside the BMS state request subsystem the test sequence 2 is selected.

double click on the test sequence it will open the sequence editor as shown below

  • Driving state for first 10000 secs.
  • Then Charging state for next 10000 secs.

Results of case 2:

Test sequence 2

Dashboard results:

The Lamp indication were green for all states which means the model is in good condition and no fault is occured.

scope of test sequence 2:

Observations:

Driving State (0-10000 sec):

  • The cell voltage varies from 3.9 V to 3.05 volt which is cut off voltage of cell and the entire cell is drained upto 8692 sec.
  • Cell temperatures varies from 288K to 323K.
  • SOC reduces from 80% to 0% (cell got fully drained) in the drive mode under 8692 sec.
  • Some stand by mode conditions are in between the drive modes.
  • Entire sequence is performing in drive mode as shown from the above plot.
  • balancing of cells are not performed as shown as balance states are in 0 for entire drive mode.
  • The voltages of the cells in a battery pack will vary according to the current supplied to the cells. And the Voltages of the cells are lies between in the range of 3.18V to 3.9V till the time of around 1400 seconds and after 1400 seconds the voltage will be constant for each cells and the constant voltage line will remain till the 2000 seconds. After 0.2*10^4 seconds the voltage of cells will vary in the range of 3.1V to 3.85V up to the simulation time duration attains above 3800 second and after the voltages will remain constant, that constant voltage of individual cells will remain till above 4500 seconds and after the voltage will vary 3.1V to 3.75V and till 4500 seconds. After 4500 second the voltage will increase gradually to 4.1V till above 6200 second, after that the voltage will decreases to the 3.85V suddenly and the voltage will remains constant till the end of the simulation.
  • The cell temperatures of the battery pack will be different for each individual cell. The cell number six has highest and cell number one has lowest temperatures. The cell one has a thermal insulation at one side, so the cell one temperature is low. The process initializes at 289 degrees and the temperature of the cells gradually increases till the simulation process attains above 6200 seconds and the temperature range is lies between 306 degrees to 323 degrees. After 6200 seconds the temperature graph starts depleting gradually till the end of the simulation. The temperature values are at the 20000 seconds for each cell are 294 degrees, 300 degrees, 304.5 degrees, 308 degrees, 311 degrees and 313 degrees.
  • The state of charge for the cells initializes the simulation at 80% and the state of charge percent will deplete gradually till 4500 seconds and at 4500 seconds the state of charge is at 35%. After 4500 seconds the state of charge will starts increasing till SOC reaches to 69%, 70% and 76% until the simulation time attains above 6200 seconds and after the state of charge will remains same till the end of the simulation.
  • The pack current will initializes the simulation process at 0A and the current will increase and decrease in the range between 10A to -70A and the current will be at 0A till the simulation attains 2000 seconds. After 2000 seconds the current will fluctuates up and down in the range between 9A to -65A till the simulation attains to 3900 seconds. After 4200 seconds the current will fluctuates 9A to -60A for 800 seconds and then the current will increases to 30A and it will remains for 1000 seconds. After 6000 seconds the current will depletes to 0A and the current will remains at 0A till the end of the simulation.
  • The battery management system starts the process at BMS_standby state and it will moves to charging and driving state. The BMS is at driving state till 5000 seconds and after the BMS will goes back to standby state and than charging till 6200 seconds. After 6200 seconds the BMS shows BMS_fault indication due to lack of current and voltage. And the process will stuck at the BMS_fault till the end of the simulation.
  • The balancing command graph visualizes that, the cell on will remains at 0 from initial state to end of the simulation. The cell six will starts at 0 and it will remains at 0 till 5000 seconds, after it will reaches to 1 and it will remains at 1 till the end of the simulation.
  • The main reason to show the red flags on the lamp block in the dashboard is due to lack of current and voltage in the cells. With respect to current the voltage will vary, the temperature and SOC will vary with respect to the current and voltage. So the cell temperature reaches very high. Due to lack of voltage and current the BMS will shows the fault in the simulation process.

TEST CASE - 3

Procedure:

Select the test sequence variant as 3 and inside the BMS state request subsystem the test sequence 3 is selected.

In the above given Test Sequence Variant, I selected the first test case to run the model. After the running the model successfully, in the dashboard all the lamp blocks shows green colour. That means while simulating the model the simulation process doesn't face any errors or difficulties.

After simulation the dashboard and output graph are given below,

  • All cells are initiated with different voltages, cell number six having higher voltage of 4.2V and cell number one having lower voltage of 4.1V and the remaining cells are falling under the range of BMS on charging state throughout the simulation and the voltage graph starts at 3.83V. Due to continuous voltage supply the graph is moving like a straight line, and we can visualize a very less amount of deflections in voltage of different cells. At the end of simulation the battery management system balances the voltage deflection in among the battery cells.
  • The Cell Temperature graph starts at 288 degrees and the temperature will increase gradually till the time of around 1200 seconds and the maximum temperature at 1200 seconds is 293 degrees. And we can visualize the slight depletion in temperature till 0.4*10^4 seconds. After 4000 seconds the temperature is moves like a straight line, all the cells have different temperature ranges. The temperature traces shows the discrepancy in between the highest and lowest temperature cells, due to symmetry in the merged layer in terms of the cell thermal character and behaviour. Cell number six has highest temperature and cell number one has lowest temperature because the cell one has thermal insulation at one end. The active battery managements system will maintains a very less temperature difference between the cells.
  • The State of charge for the cells starts at 80% and when the system under goes in a charging state, the yellow cell state of charge is will increase gradually to 100% and the remaining two cells are at 92% and 93%. The ukf and ekf initially having different charging rates, after 0.4*10^4 seconds the ukf and ekf are equal and the SOC is remains at 92% and the state of charge percentage is maintained through out the entire simulation. It is apparent that coulomb counting never does, because it has no way to get feedback to understand it is wrong due to its absence of voltage information. Both the algorithms recover on the other hand, from the initial error within the first hour of simulated time. With the ekf slightly outperforming than ukf.
  • The battery pack current initialize the process at 20A and it depletes gradually 1A at the time range of 0.2*10^4 seconds. After 2000 seconds the current depletes to 0A, and it will remains at 0A till the end of simulation time.
  • The other two scopes in result output visualizes the BMS (battery management system) and the balancing command signals respectvely. The Battery management system on charging state and Battery command passing signal between 0 to 1.

QUESTION 2: What is coulomb counting? Refer to the above model and explain how BMS implements coulomb counting for SOC estimation ?

SOC: SOC stands for the state of charge of a battery. SOC represents the amount of energy left inside the battery with respect to the total amount of energy in a battery at the Fully charged condition. SOC can help a user to determine when to charge the battery or stop charging and how much energy he can extract from a battery at that time. There is no direct method to calculate SOC for a Li-ion battery but there are several ways in which we can calculate SOC with the help of some additional parameters.

The easiest method to calculate the SOC of a battery is by using a battery voltage translation method. This method is not accurate but helps to approximately and quickly calculate SOC and can be used in devices like power banks where SOC is shown in range and not the exact percentage. For example, a typical power bank shows SOC in the range from 0-25%, 25-50%, 50-75%, 75-100%.

There are several limitations to this method and hence more accurate methods are needed like the Coulomb counting method, the Fuzzy logic method, the Kalman filter, the RBF Neural network, the Fuzzy neural network, the Hybrid methods, etc.

Each method has its limitations, accuracy, and complexity and hence proper decision should be made while selecting methods for SOC estimation.

Coulomb counting:

Coulomb counting is a technique used to track the state of charge of a battery pack. It works by integrating the active flowing current (measured in amps) over time to derive the total sum of energy entering or leaving the battery pack. This produces a capacity that is typically measured in Ah.

Coulomb Counting Method :

The coulomb counting method is also known as the battery current integration method. In this method, a discharging/charging current I(t) is measured and integrated over time to calculate the amount of energy remaining inside the battery. In this method, SOC is taken at the previous time step SOC(t-1) and the amount of energy removed/added at the current time step is subtracted/added from the SOC of the previous time step SOC(t-1) to obtain the amount of energy present in the battery at the present instant.

SOC(t)=SOC(t−1)+I(t)QnΔtSOC(t)=SOC(t-1)+I(t)QnΔt

Modified coulomb counting method: In this technidue discharge current is corrected with a function and corrected current is found out for accurate SOC estimation. The function is given below,

Ic(t)=k2I(t)2+k1I(t)+k0Ic(t)=k2I(t)2+k1I(t)+k0

here K0, K1 and K2 are constant values obtained from the practice experimental data. The SOC relation is given below,

SOC(t)=SOC(t−1)+I(t)QnΔtSOC(t)=SOC(t-1)+I(t)QnΔt

The “coulomb counting” or CoulCount method was developed by Schmitt et al. as a heuristic method, although the underlying theory is reasonably accessible . It depends on the recording of the current noise only. The signal is filtered with a high-pass filter with a cut-off frequency of 0.01 Hz. The filter may be either analogue (although the implementation of a good-quality 0.01 Hz analogue filter is difficult) or digital. The absolute value of the measured current samples is then summed over time. A steep slope is taken as an indication of rapid corrosion, although it is not possible to calibrate this in terms of an estimated corrosion rate.

It can be shown that this method is similar to integrating the standard deviation of current over time. The use of the integrating plot provides a form of low-pass filtering that may make it easier to see trends, but this can also be accomplished by digital filtering. The use of only the current noise restricts the value of the technique, as it does not allow for the estimation of the noise resistance (and hence the corrosion rate), and it is difficult to see what real advantages the method has over the conventional three-electrode method, although the use of integrating plots may be of value.

The flow chart to estimate the SOC state of charge is,

The SOC (state of charge) estimation model:

To see the SOC estimation model, we need open the different model block. The directions to open the SOC estimation modle is, BMS_ClosedLoop >> BMS ECU >>SOC_Estimation >> Coulomb Counting.

With the help of above mentioned directions, we can open the SOC estimation model and coulomb counting model.

In the coulomb counting model, the pack current and temperature are the inputs for this model. The pack current is fed to the gain block with the vlue of 1/3600 to convert current in to Amph hours. The temperature is fed to the 1-D lookup table to give the inputs to divide block from the temperature input block. The Amph hour pack current and temperature get divided in the devide block and the output from the devide block is connceted to the Discrete- time integrator block to integrate the devided current and temperature signals. From the output of discrete-time integrator block we can get the desired final SOC (state of charge). The block parameters of coulomb counting method are gioven blow,

  • Input signals [Pack Current and Temperature (k)]:

The input signals are fed to the coulomb counting model from other blocks in the project. the block parameters of pack current and temperature are

* Pack current:

* Temperature (k):

  • Gain block:

Here the discharge current from battery fed to the gain block with value of 1/3600 to convert current to 'Ahr'. The value is divided by capacity due to temperature change, then integrated with a gain value of 1 with sample time -1 as we are using discrete integrator. The saturation limits are from 0 to 1. We will get the SOC values from 0 to 1 multiplied with 100 to get in percentage of SOC.

  • 1-D lookup table:

The 1-D lookup table is fed from the output of temperature input block. The lookup table is used to give the input to divide block.

Perform n-dimensional interpolated table lookup including index searches. The table is a sampled representation of a function in N variables. Breakpoint sets relate the input values to positions in the table. The first dimension corresponds to the top (or left) input port.

  • Devide block:

The divide block get the inputs from gain block pack current to multiply port and temperature from the 1-D lookup table to the divide port. the output from the divide block is fed to the discrete- time integrator block to integrate the divioded pack current and temperature signals to get the SOC.

  • Discrete-time integrator block:

The integrator block get the inputs from the divide block. The devided pack current and temperature values are integrated in the discrete -time integrator to get the desired final SOC ( state of charge). The output SOC from the integrator block is fed to the output block to visualize the SOC in the results graph.

CONCLUSION:

The battery management system project model is downloaded and initialized in MATLAB and it is simulated for the 3 test sequences.

All the three test sequences of battery management systems are simulated and analysed for various characteristics and results are plotted and observed.

Coulomb counting method is studied and the implementation of that method is BMS to estimate the SOC is analysed.

References:

  1. https://www.sciencedirect.com/topics/engineering/coulomb-counting
  2. https://www.hindawi.com/journals/isrn/2013/953792/
  3. https://www.hindawi.com/journals/isrn/2013/953792/tab1/
  4. https://arxiv.org/ftp/arxiv/papers/1803/1803.10654.pdf
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.