Python-based lithium ion battery electrode active lithium content change analysis method
By employing a Python-based method for analyzing changes in the active lithium content of lithium-ion battery electrodes, and utilizing an analysis model and optimization function for changes in active lithium content, this method addresses the issues of low accuracy in battery evaluation and damage during disassembly in existing technologies, enabling rapid and accurate non-destructive evaluation of the active lithium content of battery electrodes.
Patent Information
- Application Number
- CN202511394708.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-28
- Publication Date
- 2025-12-12
AI Technical Summary
Existing lithium-ion battery evaluation methods cannot efficiently and accurately monitor changes in the active lithium content inside the electrode materials, resulting in low accuracy in battery performance evaluation. Furthermore, traditional methods require disassembling the battery, which can cause damage.
A Python-based method for analyzing the changes in active lithium content in lithium-ion battery electrodes is adopted. By analyzing the changes in lithium content under different states of charge, an analysis model for changes in active lithium content is constructed using Python. The active lithium content in the electrodes is then fitted with an optimization function, enabling rapid and accurate evaluation without disassembling the battery.
It enables rapid and accurate assessment of the loss of active lithium content in battery electrodes, improving the efficiency and precision of battery management and avoiding damage caused by battery disassembly.
Smart Images

Figure CN121114800A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of lithium-ion battery technology, and in particular relates to a method for analyzing the changes in active lithium content in lithium-ion battery electrodes based on Python. Background Technology
[0002] Lithium-ion batteries are widely used in portable electronic devices, electric vehicles, and other fields due to their high energy density and long lifespan. However, battery performance gradually declines during long-term use or storage, primarily due to the loss of electrode materials. This loss includes various factors such as the loss of active materials, the loss of active lithium, electrolyte decomposition, and the formation of interfacial films. Among these, the loss of active lithium has a particularly significant impact on battery capacity and performance. Traditional evaluation methods typically require disassembling the battery and performing physical or chemical analysis of the electrode materials. This method is not only time-consuming and labor-intensive but also causes irreversible damage to the battery.
[0003] In recent years, with the development of computer technology and data analysis methods, people have begun to explore non-destructive methods for assessing battery health. Especially in the development of battery management systems, accurately assessing changes in the active lithium content of batteries during use has become particularly important. While existing assessment methods can reflect battery health to some extent, their accuracy is low due to the lack of direct monitoring of changes in the internal lithium content of electrode materials. Summary of the Invention
[0004] To overcome the shortcomings of the prior art, this invention provides a Python-based method for analyzing changes in the active lithium content of lithium-ion battery electrodes. This invention achieves a rapid and accurate assessment of the loss of active lithium content in battery electrodes by analyzing changes in lithium content under different states of charge, without requiring battery disassembly.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A Python-based method for analyzing changes in the active lithium content of lithium-ion battery electrodes includes the following steps:
[0007] S1. Take the positive and negative electrode plates of the battery and make them into positive and negative button cells respectively. Then, perform charge-discharge cycle tests and obtain the positive electrode equilibrium potential curve U. pos (x pos ) and negative electrode equilibrium potential curve U neg (x neg );
[0008] S2. Place the lithium-ion full battery to be tested in a constant temperature chamber and perform low-rate charge-discharge cycle tests at set number of cycles T under target conditions to obtain the measured voltage curve U_exp(SOC) of the full battery.
[0009] S3. Select the measured voltage curve of the full cell, the positive electrode equilibrium potential curve and the negative electrode equilibrium potential curve, and use the active lithium content change analysis model constructed by Python to perform parameter fitting in order to obtain the active lithium content of the battery electrode.
[0010] S4. Compare the results of the electrode active lithium content calculation for fresh and aged batteries, calculate the change window of positive and negative electrode lithium content, and determine the change of positive and negative electrode lithium content.
[0011] Preferably, in step S1, the charge-discharge cycle test is a two-cycle test, and the rate is ≤0.1C; during the charge-discharge cycle test, the accuracy of the voltage sampling point is ≤100mV, preferably 1mV; the accuracy of the time sampling point is ≤10s, preferably 1s.
[0012] Preferably, the charging or discharging voltage curve of the second cycle of the positive electrode button cell is selected as the positive electrode equilibrium potential curve, and the horizontal axis represents the positive electrode button cell lithium content; the charging or discharging voltage curve of the second cycle of the negative electrode button cell is selected as the negative electrode equilibrium potential curve, and the horizontal axis represents the negative electrode button cell lithium content.
[0013] Preferably, in step S2, two charge-discharge cycle tests with a rate of ≤0.1C are performed every set number of cycles T, where T≥100, to obtain low-rate data and provide input data for the constructed model.
[0014] Preferably, in step S2, the second charge or discharge voltage curve of the full battery at a low rate cycle is selected as the measured voltage curve U_exp(SOC), and the horizontal axis of the voltage curve is SOC (state of charge / state of charge).
[0015] Preferably, the formula for calculating the active lithium content in the positive electrode is:
[0016] positive electrode active lithium content x pos =Cs / Cs,max, including:
[0017] The charging or discharging capacity Q corresponding to each voltage is converted into surface concentration Cs = (Q / (z*F)) / (S), where Cs is in mol / m³. 2 Where z is the number of electrons transferred in the electrochemical reaction, F is the Faraday constant, and S is the area of the button cell electrode (unit: m²). 2 ); Total surface concentration Cs,max=(M coat * Z ) / (m a *ε), Cs,max is in mol / m2 , of which M coat Electron surface density (unit: g / m³) 2 ), m a ε represents the molar mass of the active material (in g / mol) and the volume fraction of the active material.
[0018] The formula for calculating the active lithium content in the negative electrode is:
[0019] x neg =Cs / Cs,max, including:
[0020] The charging or discharging capacity Q corresponding to each voltage is converted into surface concentration Cs = (Q / (z*F)) / (S), where Cs is in mol / m³. 2 At this point, the surface concentration converted from the maximum capacity Q is the total surface concentration Cs,max, where Cs,max is in mol / m³. 2 Where z is the number of electrons transferred in the electrochemical reaction, F is the Faraday constant, and S is the area of the button cell electrode (unit: m²). 2 ).
[0021] Preferably, the steps for constructing an analysis model for changes in active lithium content using Python include:
[0022] (1) Define the lithium content x of the positive and negative electrodes at different SOCs. pos and x neg , where x pos =(x p,100% -x p,0% )*SOC+x p,0% x neg =(x n,100% -x n,0% )*SOC+x n,0% x p,100% and x n,100% The lithium content in a fully charged state, x p,0% and x n,0% The lithium content is in the fully discharged state, and SOC is the battery state of charge.
[0023] (2) Define the calculated full-cell voltage curve U_cal(SOC) = U pos (x pos )-U neg (x neg );
[0024] (3) Use an optimization function in Python to find the minimum difference between U_exp(SOC) and U_cal(SOC), and then obtain the optimal fitting parameter x for the active lithium content. p,100% x n,100% xp,0% and x n,0% .
[0025] Preferably, in step S4,
[0026] Cathode lithium content window = x p,0% -x p,100% ;
[0027] Negative electrode lithium content window = x n,100% -x n,0% .
[0028] Preferably, in step S3, the scipy.optimize.least_squares function in Python is used to optimize the parameters to obtain the best-fit parameters.
[0029] Preferably, when the battery under test is a storage battery, the specific steps are as follows:
[0030] (1) Place the battery under test in a constant temperature chamber for storage testing under target conditions. Take out the battery every set storage days N. If stored at room temperature, perform capacity adjustment directly after taking out the battery, and then perform two charge-discharge cycle tests with a rate ≤ 0.1C. If stored at high temperature, restore the battery to room temperature and perform capacity adjustment after taking out the battery, and then perform two charge-discharge cycle tests with a rate ≤ 0.1C. N≥10;
[0031] (2) Select the voltage curve of the second charge or discharge cycle of the full battery as the measured voltage curve U_exp(SOC), and the horizontal axis of the voltage curve is SOC;
[0032] (3) Select the full cell voltage curve U_exp(SOC) and the positive electrode equilibrium potential curve U pos (x pos ) and negative electrode equilibrium potential curve U neg (x neg The active lithium content of the battery electrode was obtained by fitting parameters to a model for analyzing changes in active lithium content built with Python.
[0033] (4) Compare the results of the electrode active lithium content calculation for fresh and aged batteries, and calculate the change window of positive and negative electrode lithium content.
[0034] The advantages of this invention are:
[0035] (1) This invention provides a Python-based method for analyzing the changes in active lithium content in lithium-ion battery electrodes. By analyzing the changes in lithium content in the battery under different states of charge, it enables a rapid and accurate assessment of the loss of active lithium content in the battery electrodes. This can be done without disassembling the battery, and accurately assesses the changes in active lithium content in the electrodes of lithium-ion batteries during use, thereby improving the efficiency and accuracy of battery management.
[0036] (2) This invention uses Python to construct an analysis model for changes in active lithium content. By solving the optimization function, the difference between the measured charging curve U_exp(SOC) and the calculated charging curve U_cal(SOC) is minimized, and the optimal fitting parameters for the active lithium content of the battery electrode at this time are obtained. The solution results of fresh and aged batteries are compared to calculate the change in active lithium content of the electrode during battery operation.
[0037] (3) This invention can analyze the changes in electrode state of battery under different charging states without disassembling the battery or testing with complex equipment, and achieve a rapid and accurate assessment of the loss of battery electroactive lithium content. Attached Figure Description
[0038] Figure 1 This is the positive electrode equilibrium potential curve in Embodiment 1 of the present invention.
[0039] Figure 2 This is the negative electrode equilibrium potential curve in Embodiment 1 of the present invention.
[0040] Figure 3 This is a comparison chart of U_exp(SOC) and U_cal(SOC) after solving the optimization function for the fresh battery in Embodiment 1 of the present invention.
[0041] Figure 4 This is a comparison chart of U_exp(SOC) and U_cal(SOC) after solving the optimization function for a 2000-cycle aged battery in Embodiment 1 of the present invention.
[0042] Figure 5 This is the positive electrode equilibrium potential curve in Embodiment 2 of the present invention.
[0043] Figure 6 This is the negative electrode equilibrium potential curve in Embodiment 2 of the present invention.
[0044] Figure 7 This is a comparison chart of U_exp(SOC) and U_cal(SOC) after solving the optimization function for the fresh battery in Embodiment 2 of the present invention.
[0045] Figure 8 This is a comparison chart of U_exp(SOC) and U_cal(SOC) after solving the optimization function for the 108d aged battery in Example 2. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0047] Example 1
[0048] S1. Select the positive and negative electrode sheets of a lithium iron phosphate lithium-ion battery with a theoretical capacity of 30Ah, and fabricate positive and negative button cells respectively. Perform 0.05C low-rate charge-discharge cycles on the button cells. The charge-discharge steps for the positive button cell are as follows: charge at a constant current of 0.05C to 4.0V, rest for 30 minutes, discharge at 0.05C to 2.0V, rest for 30 minutes, repeat 2 cycles, with a sampling interval of 1 second. Figure 1 This is the positive electrode equilibrium potential curve. The negative electrode coin cell charge / discharge steps are: constant current discharge at 0.05C to 5mV, rest for 30 minutes, charge at 0.05C to 2.0V, rest for 30 minutes, repeat twice, with a sampling interval of 1 second. Figure 2 This is the negative electrode equilibrium potential curve.
[0049] S2. This lithium iron phosphate battery with a theoretical capacity of 30Ah was placed in a 25℃ constant temperature chamber for cycle aging tests. Constant capacity and low-rate cycle tests were performed every 100 cycles. The constant capacity test was as follows: constant current and constant voltage charging at 0.33C to 3.65V, cutoff current at 0.05C, rest for 30 minutes, constant current discharging at 0.33C to 2.0V, rest for 30 minutes, repeated 3 times, with a sampling interval of 30 seconds. The low-rate cycle test was as follows: constant current charging at 0.05C to 3.65V, rest for 30 minutes, constant current discharging at 0.05C to 2.0V, rest for 30 minutes, repeated 2 times, with a sampling interval of 1 second. After 2000 cycles, the battery capacity decayed to 80.14% of its initial capacity. The change in active lithium content after room temperature cycling was analyzed.
[0050] S3. A lithium-ion battery electrode active lithium content variation analysis model constructed using Python was used to process the positive and negative electrode equilibrium potential curves, low-rate data before cycling (i.e., fresh batteries), and low-rate data after cycle aging. The scipy.optimize.least_squares optimization function was used to solve for battery parameters at different cycle numbers, as shown in Table 1 below. After 2000 cycles, the negative electrode lithium content window decreased from 0.8145 to 0.6818, and the positive electrode lithium content window decreased from 0.9883 to 0.9874. The comparison of U_exp(SOC) and U_cal(SOC) of the fresh battery after Python solution is shown in the figure below. Figure 3As shown in the figure, after 2000 cycles, the comparison chart of U_exp(SOC) and U_cal(SOC) of the aged battery is as follows. Figure 4 As shown, the voltage curve obtained by Python agrees well with the measured voltage curve. Therefore, this invention can achieve qualitative and quantitative analysis of the active lithium content in lithium-ion batteries during cycling.
[0051] Table 1
[0052] Cycle number <![CDATA[x n,0% ]]> <![CDATA[x n,100% ]]> <![CDATA[x p,0% ]]> <![CDATA[x p,100% ]]> Negative electrode lithium content window / % Cathode lithium content window / % Fresh Battery 0.0099 0.8244 0.9923 0.0041 0.8145 0.9883 100 weeks 0.0095 0.7820 0.9901 0.0032 0.7725 0.9869 400 weeks 0.0044 0.7550 0.9900 0.0036 0.7506 0.9864 800 weeks 0.0038 0.7423 0.9902 0.0034 0.7385 0.9868 1200 weeks 0.0035 0.7270 0.9901 0.0034 0.7235 0.9867 1300 weeks 0.0033 0.7218 0.9902 0.0033 0.7185 0.9869 1400 weeks 0.0033 0.7168 0.9902 0.0034 0.7135 0.9868 1500 weeks 0.0031 0.7123 0.9903 0.0034 0.7092 0.9869 1600 weeks 0.0029 0.7050 0.9903 0.0034 0.7021 0.9869 1700 weeks 0.0029 0.7045 0.9902 0.0031 0.7016 0.9871 1800 weeks 0.0028 0.6991 0.9902 0.003 0.6963 0.9872 1900 0.0028 0.6991 0.9902 0.0029 0.6963 0.9873 2000th week 0.0027 0.6845 0.9901 0.0027 0.6818 0.9874
[0053] Example 2
[0054] S1. Select the positive and negative electrode sheets of a lithium iron phosphate lithium-ion battery with a theoretical capacity of 6Ah, and fabricate positive and negative button cells respectively. Perform 0.05C low-rate charge-discharge cycles on the button cells. The charge-discharge steps for the positive button cell are as follows: charge at a constant current of 0.05C to 4.0V, rest for 30 minutes, discharge at 0.05C to 2.0V, rest for 30 minutes, repeat 2 cycles, with a sampling interval of 1 second. Figure 5 This is the positive electrode equilibrium potential curve. The negative electrode coin cell charge / discharge steps are as follows: constant current discharge at 0.05C to 5mV, rest for 30 minutes, charge at 0.05C to 2.0, rest for 30 minutes, repeat twice, with a sampling interval of 1 second. Figure 6 This is the negative electrode equilibrium potential curve.
[0055] S2. This lithium iron phosphate battery with a theoretical capacity of 6Ah was placed in a 60℃ constant temperature chamber for high-temperature aging testing. It was removed every 12 days, allowed to return to room temperature, and then subjected to capacitive and low-rate cycle tests. The capacitive charging process was as follows: constant current and constant voltage charging at 0.25C to 3.65V, cutoff current at 0.05C, resting for 30 minutes, constant current discharging at 0.25C to 2.0V, resting for 30 minutes, repeated 3 times, with a sampling interval of 1 second. The low-rate cycle test was as follows: constant current charging at 0.05C to 3.65V, resting for 30 minutes, constant current discharging at 0.05C to 2.0V, resting for 30 minutes, repeated 2 times, with a sampling interval of 1 second. The changes in the active lithium content of this battery during high-temperature storage aging were analyzed.
[0056] S3. A lithium-ion battery electrode active lithium content variation analysis model constructed using Python was used to process the positive and negative electrode equilibrium potential curves, low-rate data before high-temperature storage (i.e., fresh batteries), and low-rate data after each 12-day high-temperature storage aging. The scipy.optimize.least_squares optimization function was used to solve for battery parameters at different storage times, as shown in Table 2 below. After 108 days of storage, the negative electrode lithium content window decreased from 0.9029 to 0.58814, and the positive electrode lithium content window decreased from 0.8509 to 0.6815. The comparison of U_exp(SOC) and U_cal(SOC) of the fresh battery after Python solution is shown in the figure below. Figure 7 As shown in the figure, the comparison chart of U_exp(SOC) and U_cal(SOC) of the battery after 108 days of storage is as follows. Figure 8 As shown, the voltage curve obtained by Python is in good agreement with the measured voltage curve. Therefore, this invention can achieve qualitative and quantitative analysis of the active lithium content of lithium-ion batteries during storage.
[0057] Table 2
[0058]
[0059] In summary, this invention utilizes a model constructed with Python to analyze the changes in active lithium content in lithium-ion battery electrodes. By solving for battery parameters using an optimization function and comparing the results with those of aged and fresh batteries, the changes in active lithium content at both the positive and negative electrodes can be calculated. This allows for the analysis of changes in active lithium content under different states of charge without requiring battery disassembly or complex equipment testing, enabling a rapid and accurate assessment of the loss of active lithium content in battery electrodes.
[0060] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A Python-based method for analyzing changes in the active lithium content of lithium-ion battery electrodes, characterized in that, Includes the following steps: S1. Take the positive electrode and negative electrode of the battery, and make them into positive electrode button cells and negative electrode button cells respectively. Then, perform charge and discharge cycle tests to obtain the positive electrode balance potential curve and the negative electrode balance potential curve respectively. S2. Place the full battery to be tested in a constant temperature chamber for charge-discharge cycle testing to obtain the measured voltage curve of the full battery. S3. Select the measured voltage curve of the full cell, the positive electrode equilibrium potential curve and the negative electrode equilibrium potential curve, and use the active lithium content change analysis model constructed by Python to perform parameter fitting in order to obtain the active lithium content of the battery electrode. S4. Compare the results of the electrode active lithium content calculation for fresh and aged batteries, and calculate the change window of positive and negative electrode lithium content.
2. The method for analyzing the change in active lithium content in lithium-ion battery electrodes based on Python according to claim 1, characterized in that: In step S1, the charge-discharge cycle test is a two-cycle test, and the rate is ≤0.1C; during the charge-discharge cycle test, the accuracy of the voltage sampling point is ≤100mV; the accuracy of the time sampling point is ≤10s.
3. The method for analyzing changes in active lithium content in lithium-ion battery electrodes based on Python, as described in claim 1, is characterized in that: The charging or discharging voltage curve of the second cycle of the positive electrode button cell is selected as the positive electrode equilibrium potential curve, and the horizontal axis represents the positive electrode coin lithium content; the charging or discharging voltage curve of the second cycle of the negative electrode button cell is selected as the negative electrode equilibrium potential curve, and the horizontal axis represents the negative electrode coin lithium content.
4. The method for analyzing the change in active lithium content in lithium-ion battery electrodes based on Python according to claim 1, characterized in that: In step S2, a charge-discharge cycle test of ≤0.1C is performed every set number of cycles T, where T≥100.
5. The method for analyzing the change in active lithium content in lithium-ion battery electrodes based on Python according to claim 1, characterized in that: In step S2, the second charge or discharge voltage curve of the full battery at a low rate is selected as the measured voltage curve, and the horizontal axis of the voltage curve is SOC.
6. The method for analyzing the change in active lithium content in lithium-ion battery electrodes based on Python according to claim 3, characterized in that, The formula for calculating the active lithium content of the positive electrode is: positive electrode active lithium content x pos =Cs / Cs,max, including: The charging or discharging capacity Q corresponding to each voltage is converted into surface concentration Cs = (Q / (z*F)) / (S), where Cs is in mol·m³. -2 Where z is the number of electrons transferred in the electrochemical reaction, F is the Faraday constant, and S is the area of the coin cell electrode in m². 2 Total surface concentration Cs,max=(M coat * Z ) / (m a *ε), Cs,max is in mol / m 2 Among them, M coat This refers to the areal density of the electrode, expressed in g / m³. 2 m a ε represents the molar mass of the active material, in g / mol; ε represents the volume fraction of the active material. The formula for calculating the active lithium content of the negative electrode is: x neg =Cs / Cs,max, including: The charging or discharging capacity Q corresponding to each voltage is converted into surface concentration Cs = (Q / (z*F)) / (S), where Cs is in mol / m³. 2 At this point, the surface concentration converted from the maximum capacity Q is the total surface concentration Cs,max, in mol / m³. 2 Where z is the number of electrons transferred in the electrochemical reaction; F is the Faraday constant; and S is the area of the button cell electrode, in m². 2 .
7. The method for analyzing the change in active lithium content in lithium-ion battery electrodes based on Python according to claim 1, characterized in that, The steps involved in building a Python-based model for analyzing changes in active lithium content include: (1) Define the lithium content x of the positive and negative electrodes at different SOCs. pos and x neg , where x pos =(x p,100% -x p,0% )*SOC+x p,0% x neg =(x n,100% -x n,0% )*SOC+x n,0% x p,100% and x n,100% The lithium content in a fully charged state, x p,0% and x n,0% The lithium content is in the fully discharged state, and SOC is the battery state of charge. (2) Define the calculated full-cell voltage curve U_cal(SOC) = U pos (x pos )-U neg (x neg ); (3) Use an optimization function in Python to find the minimum difference between U_exp(SOC) and U_cal(SOC), and then obtain the optimal fitting parameter x for the active lithium content. p,100% x n,100% x p,0% and x n,0% .
8. The method for analyzing the change in active lithium content in lithium-ion battery electrodes based on Python according to claim 1, characterized in that: In step S4, Cathode lithium content window = x p,0% -x p,100% ; Negative electrode lithium content window = x n,100% -x n,0% .
9. The method for analyzing the change in active lithium content in lithium-ion battery electrodes based on Python according to claim 1, characterized in that: In step S3, the parameters are optimized using the scipy.optimize.least_squares function in Python.
10. The method for analyzing the change in active lithium content in lithium-ion battery electrodes based on Python according to claim 1, characterized in that, When the battery under test is a storage battery, the specific steps are as follows: (1) Place the battery under test in a constant temperature chamber for storage testing under target conditions. Take out the battery every set storage days N. If stored at room temperature, perform capacity adjustment directly after taking out the battery, and then perform two charge-discharge cycle tests with a rate ≤ 0.1C. If stored at high temperature, restore the battery to room temperature and perform capacity adjustment after taking out the battery, and then perform two charge-discharge cycle tests with a rate ≤ 0.1C. N≥10; (2) Select the second charge or discharge voltage curve of the full battery as the measured voltage curve U_exp(SOC), and the horizontal axis of the voltage curve is SOC; (3) Select the full cell voltage curve U_exp(SOC) and the positive electrode equilibrium potential curve U pos (x pos ) and negative electrode equilibrium potential curve U neg (x neg The active lithium content of the battery electrode was obtained by fitting parameters to a model for analyzing changes in active lithium content built with Python. (4) Compare the results of the electrode active lithium content calculation for fresh and aged batteries, and calculate the change window of positive and negative electrode lithium content.