Battery internal resistance compensation method, computer device and readable storage medium

By dynamically adjusting the internal resistance parameters of lithium batteries and combining the actual battery voltage, aging degree and temperature factors, the problem of inaccurate internal resistance estimation is solved and a more accurate storage capacity estimation is achieved.

CN120703596APending Publication Date: 2025-09-26SHENZHEN X-POWERS TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510817441.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

The existing internal resistance estimation of lithium batteries is inaccurate, resulting in large errors in the measurement of stored electricity. Traditional methods fail to effectively consider factors such as the voltage, temperature, aging degree and individual differences of lithium batteries, and fixed formula calculations lead to inaccurate internal resistance parameters.

Method used

By obtaining the actual charge and discharge current of the battery in each calculation cycle, calculating the error between the actual and estimated currents, dynamically adjusting the internal resistance parameters, using a preset formula to consider the actual battery voltage, aging degree and temperature factor, setting the current sampling circuit and calculation cycle, dynamic compensation of the internal resistance parameters is achieved.

Benefits of technology

The accuracy of the internal resistance parameters and the estimation accuracy of the stored electricity are improved, the amount of calculation is reduced, the inaccuracy caused by frequent adjustment of the internal resistance parameters is avoided, and the accuracy of electricity measurement is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120703596A_ABST
    Figure CN120703596A_ABST
Patent Text Reader

Abstract

The invention provides a battery internal resistance compensation method, a computer device and a storage medium. The method comprises the following steps: acquiring an internal resistance parameter of a battery; starting from the static state of the battery, acquiring the actual charging and discharging current of the battery in each calculation period; calculating estimated charging and discharging current of the battery in each calculation period according to the internal resistance parameter and the actual voltage and the initial open-circuit voltage of the battery obtained by sampling; judging whether the current period meets the following preset conditions: the error between the actual charging and discharging current and the estimated charging and discharging current is greater than an error threshold value and continuously exceeds a preset calculation period, if the preset conditions are met, obtaining an internal resistance compensation coefficient, and performing compensation calculation on the internal resistance parameter of the battery by using the internal resistance compensation coefficient to obtain an updated internal resistance parameter, and taking the updated internal resistance parameter as the internal resistance parameter of the next calculation period. The computer device and the storage medium can realize the method. According to the invention, the battery internal resistance parameter can be accurately subjected to supplementary calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of battery internal resistance compensation calculation, and in particular to a battery internal resistance compensation method, a computer device and a computer-readable storage medium for implementing the method. Background Art

[0002] Lithium batteries are widely used in various electronic devices, especially portable devices. The service life of a lithium battery is closely related to its storage capacity, which in turn is related to the battery's charge voltage, charge and discharge current, and output power. Furthermore, the battery's internal resistance affects its storage capacity, so accurate estimation of the internal resistance is essential.

[0003] Because the internal resistance of lithium batteries is affected by many factors, especially as they age, the internal resistance can become very large. Current power metering systems generally require this information, but in most cases, the internal resistance is set to a fixed value without considering factors such as the battery's voltage, temperature, aging, and individual differences. This results in inaccurate internal resistance estimates.

[0004] In voltage-based fuel gauges, inaccurate estimates of the lithium battery's internal resistance can lead to large errors in the estimated current, affecting the measurement of stored energy. Currently, the most common method for compensating for lithium battery internal resistance is the TI impedance tracking algorithm. This algorithm's impedance measurement can compensate for voltage shifts and aging effects, but it is based on the battery's chemical ID, which includes complex information such as the open-circuit voltage curve and impedance curve. Customizing the ID also requires a long time.

[0005] The invention patent application with publication number CN115343643A discloses a method for compensating the internal resistance of a lithium battery. The method establishes a compensation formula for the actual internal resistance value of the lithium battery to be tested at ambient temperature with respect to the ambient temperature. When measuring the lithium battery to be tested, the measured internal resistance value at the ambient temperature of the lithium battery to be tested and the ambient temperature are substituted into the above compensation formula, that is, the measured internal resistance value at the ambient temperature is compensated to the internal resistance value at the standard temperature.

[0006] However, this method sets a fixed calculation formula to calculate the internal resistance parameters of the battery, but the changes in the battery internal resistance parameters are often affected by the dynamic changes in actual usage conditions. Using a fixed calculation formula to calculate the internal resistance of the lithium battery throughout the entire service life of the lithium battery without considering the actual usage conditions of the lithium battery will lead to inaccurate estimation of the internal resistance parameters of the lithium battery, which in turn affects the accurate calculation of the stored power. Summary of the Invention

[0007] The first object of the present invention is to provide a battery internal resistance compensation method capable of dynamically calculating the internal resistance parameters of a lithium battery.

[0008] A second object of the present invention is to provide a computer device for implementing the above-mentioned battery internal resistance compensation method.

[0009] A third object of the present invention is to provide a readable storage medium for implementing the above-mentioned battery internal resistance compensation method.

[0010] To achieve the first purpose of the present invention, the battery internal resistance compensation method provided by the present invention includes obtaining the internal resistance parameter of the battery; and, starting from the static state of the battery, obtaining the actual charge and discharge current of the battery in each calculation cycle; calculating the estimated charge and discharge current of the battery in each calculation cycle based on the internal resistance parameter, the actual voltage of the battery obtained by sampling, and the initial open-circuit voltage; judging whether the current cycle meets the following preset conditions: the error between the actual charge and discharge current and the estimated charge and discharge current is greater than the error threshold, and the error between the actual charge and discharge current and the estimated charge and discharge current is greater than the error threshold for more than the preset calculation cycle. If the preset conditions are met, obtaining an internal resistance compensation coefficient, applying the internal resistance compensation coefficient to compensate for the internal resistance parameter of the battery to obtain an updated internal resistance parameter, and using the updated internal resistance parameter as the internal resistance parameter for the next calculation cycle.

[0011] As can be seen from the above scheme, when calculating the internal resistance parameter of the battery, the present invention does not use a fixed formula to calculate the internal resistance parameter at all times. Instead, the internal resistance parameter is dynamically adjusted based on the actual charge and discharge current measured in each calculation cycle. Specifically, it is necessary to calculate the error between the actual charge and discharge current and the estimated charge and discharge current, and compare the calculated error with the error threshold. The internal resistance parameter is only updated when the preset conditions are met. Therefore, the adjustment of the internal resistance parameter is dynamic and is adjusted according to the actual usage of the battery in the appropriate calculation cycle, making the estimation of the battery internal resistance more accurate, thereby accurately estimating the battery storage capacity.

[0012] A preferred solution is that if the preset conditions are not met, no compensation calculation is performed on the internal resistance parameters of the battery.

[0013] It can be seen from this that the present invention does not adjust the internal resistance parameters of the battery in every calculation cycle. On the one hand, it can reduce the amount of calculation, and on the other hand, it can avoid the problem of excessive adjustment of the internal resistance parameters due to frequent calculation of the internal resistance parameters, which in turn leads to inaccurate internal resistance parameters.

[0014] A further solution is that obtaining the internal resistance compensation coefficient includes: calculating the internal resistance compensation coefficient using a preset formula.

[0015] It can be seen that by using the preset formula to calculate the internal resistance compensation coefficient, the calculation of the internal resistance parameters can be conveniently achieved.

[0016] A further solution is to use a preset formula to calculate the internal resistance compensation coefficient, wherein the preset formula includes calculation factors of the actual battery voltage, the battery aging degree and the current temperature.

[0017] It can be seen that since the preset formula includes calculation factors of the actual battery voltage, battery aging degree and current temperature, that is, the actual battery voltage, battery aging degree and current temperature are taken into account when calculating the internal resistance parameters, the calculation of the internal resistance parameters is more accurate.

[0018] A further solution is that obtaining the actual charge and discharge current of the battery includes: obtaining the actual charge and discharge current through a current sampling circuit of a fuel meter.

[0019] It can be seen from this that providing a current sampling circuit in the fuel meter and obtaining the actual charge and discharge current through the current sampling circuit can efficiently obtain the actual charge and discharge current.

[0020] A further solution is to model the battery before obtaining the actual charge and discharge current of the battery, and input the modeling parameters into the fuel meter.

[0021] It can be seen that inputting the pre-acquired battery modeling parameters into the fuel meter enables the fuel meter to construct a battery model according to the modeling parameters, thereby determining the initial internal resistance parameters of the battery.

[0022] A further solution is to set the length of the calculation cycle before obtaining the actual charge and discharge current of the battery.

[0023] It can be seen that the length of the calculation cycle can be set manually according to actual usage needs, for example, it can be set to 1 second, 2 seconds or 4 seconds, etc., to meet the needs of different usage scenarios.

[0024] A further solution is to further perform the following steps before obtaining the actual charge and discharge current of the battery: setting a preset number of calculation cycles.

[0025] It can be seen from this that the number of preset calculation cycles can also be manually set according to the actual usage scenario to improve the flexibility of the battery's internal resistance compensation.

[0026] To achieve the second objective, the present invention provides a computer device comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, each step of the battery internal resistance compensation method is implemented.

[0027] To achieve the third objective described above, the present invention provides a storage medium storing a computer program, which implements the various steps of the battery internal resistance compensation method described above when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flow chart of an embodiment of a battery internal resistance compensation method of the present invention.

[0029] Figure 2 This is a battery charging state simulation diagram calculated using the traditional battery internal resistance compensation method.

[0030] Figure 3 This is a battery charging state simulation diagram calculated using the battery internal resistance compensation method embodiment of the present invention.

[0031] The present invention will be further described below with reference to the accompanying drawings and embodiments. DETAILED DESCRIPTION

[0032] The battery internal resistance compensation method of the present invention is used to compensate for the internal resistance of the battery, especially during the use of the lithium battery, dynamically adjust the internal resistance of the lithium battery, so that the internal resistance parameter estimation of the lithium battery is more accurate. The battery internal resistance compensation method of the present invention is applied to devices such as fuel meters. A processor such as an MCU needs to be provided in the fuel meter, and a memory is provided. Therefore, the fuel meter can be understood as a computer device. The computer device of the present invention has a processor and a memory, and the memory is a readable storage medium of the present invention. A computer program is stored on the memory, and the above-mentioned battery internal resistance compensation method is executed by the processor.

[0033] Battery internal resistance compensation method embodiment: The battery internal resistance compensation method of this embodiment is applied to a device such as a fuel meter. The fuel meter is provided with a processor such as an MCU and a memory. In addition, since this embodiment needs to collect the real-time charge and discharge current of the battery, a current sampling circuit is provided in the fuel meter. The current information collected by the current sampling circuit is output to the processor, and the processor executes the method of this embodiment to compensate for the internal resistance of the battery.

[0034] See also Figure 1 This embodiment first performs step S1 to model the battery using an existing battery parameter testing system to obtain a set of battery modeling parameters, including the battery's internal resistance, battery capacity, charging voltage, open-circuit voltage, etc. Furthermore, this set of modeling parameters needs to be output to the fuel meter so that the fuel meter can subsequently use this set of modeling parameters to calculate the estimated charge and discharge current of the battery.

[0035] Then, step S2 is executed, and the power calculation starts from the static state. In each calculation cycle, the actual charge and discharge current Iact of the battery in the current calculation cycle is obtained. Since a current sampling circuit is provided in the power meter, step S2 collects the value of the actual charge and discharge current of the battery in the current calculation cycle through the current sampling circuit. It should be noted that the time length of the calculation cycle can be preset. For example, the default value is 1 second. The user can set the time length of a calculation cycle to 2 seconds or 4 seconds according to actual usage needs. Preferably, the user can also dynamically adjust the time length of the calculation cycle according to actual needs during the battery internal resistance compensation calculation process. For example, after a period of internal resistance compensation processing, if the calculation cycle is found to be unreasonable, the user can adjust the length of the calculation cycle by increasing the time length of the calculation cycle to reduce the number of current sampling times, thereby reducing the frequency of internal resistance parameter updates; or, by shortening the time length of the calculation cycle, increase the number of current sampling times, thereby adjusting the internal resistance parameters in a more real-time manner, thereby improving the accuracy of the storage power technology.

[0036] Then, step S3 is executed to calculate the estimated charge and discharge current Iest of the battery in the current calculation cycle. Specifically, the fuel gauge calculates the estimated charge and discharge current Iest of the battery using the previously obtained internal resistance parameter of the battery, the sampled battery voltage, and the initial open-circuit voltage. For example, the estimated charge and discharge current Iest is calculated by dividing the voltage difference between the sampled battery voltage and the corresponding open-circuit voltage by the internal resistance parameter.

[0037] Then, step S4 is executed to determine whether the preset condition is met. In this embodiment, the preset condition is that the error between the actual charge and discharge current Iact and the estimated charge and discharge current Iest is greater than the error threshold, and the error between the actual charge and discharge current Iact and the estimated charge and discharge current Iest is greater than the error threshold for a period of time exceeding the preset calculation cycle. Therefore, step S4 first needs to determine whether the error between the actual charge and discharge current Iact and the estimated charge and discharge current Iest is greater than the error threshold. For example, the error threshold can be 2%. If the error between the actual charge and discharge current Iact and the estimated charge and discharge current Iest is greater than the error threshold, it is necessary to further determine whether this situation has continued for more than the preset calculation cycle, wherein the number of preset calculation cycles can also be flexibly set according to actual conditions, for example, set to 3 or 5.

[0038] If both of the above conditions are met, the judgment result of step S4 is yes, indicating that the internal resistance parameter currently used is not accurate and needs to be adjusted and updated, and step S5 needs to be executed. If the judgment result of step S4 is no, for example, the error between the actual charge and discharge current Iact and the estimated charge and discharge current Iest is not greater than the error threshold, or even if the error between the actual charge and discharge current Iact and the estimated charge and discharge current Iest in the current calculation cycle is greater than the error threshold, but the situation does not persist for more than a preset number of calculation cycles, then it is confirmed that the internal resistance parameter currently used is relatively reasonable, and there is no need to adjust the internal resistance parameter, and step S7 is directly executed.

[0039] In step S5, the fuel gauge calculates the internal resistance parameters of the battery and performs compensation calculation on the internal resistance parameters. Specifically, an internal resistance compensation coefficient is obtained, and the internal resistance compensation coefficient is applied to compensate the internal resistance parameters of the battery to obtain an updated internal resistance parameter. In this embodiment, a preset formula is used to calculate the internal resistance compensation coefficient, and when the preset formula is used to calculate the internal resistance compensation coefficient, the preset formula includes calculation factors for the actual battery voltage, the degree of battery aging, and the current temperature. It can be seen that the preset formula used in this embodiment includes calculation factors for the actual battery voltage, the degree of battery aging, and the current temperature, that is, the actual battery voltage, the degree of battery aging, and the current temperature are taken into account when calculating the internal resistance parameter. Therefore, the calculation of the internal resistance parameter is more accurate.

[0040] After calculating the internal resistance compensation coefficient, the previously recorded internal resistance parameter is multiplied by the calculated internal resistance compensation coefficient to obtain an updated internal resistance parameter. At this point, step S6 is executed to update the recorded internal resistance parameter. Therefore, after executing step S6, the internal resistance parameter recorded by the fuel meter is the internal resistance parameter obtained through the compensation calculation.

[0041] Finally, execute step S7 to determine whether the current conditions meet the end conditions, such as the battery usage time has reached the end of its service life, and stop calculating the stored power. If the end conditions are met, stop the calculation; otherwise, execute step S8 to enter the next calculation cycle, and return to step S2 to calculate the actual charge and discharge current of the battery again in a new calculation cycle.

[0042] Through the above steps, this embodiment continuously adjusts the internal resistance parameter of the battery. The updated internal resistance parameter of the battery may increase or decrease. Through multiple calculation cycles, the internal resistance parameter of the battery is repeatedly compensated so that the estimated charge and discharge current Iest of the battery increasingly approaches the actual charge and discharge current Iact of the battery, thereby improving the accuracy of current integration and the accuracy of remaining power calculation.

[0043] Compared to solutions that directly integrate the actual battery charge and discharge current, due to errors in the current sampling process, the calculation of the remaining power will have cumulative errors. As the calculation cycle increases, the error becomes larger and larger, and the accuracy of the remaining power calculation will become increasingly poor. This embodiment uses the estimated charge and discharge current for integration and continuously compensates for the battery internal resistance parameters to make the estimated charge and discharge current continuously approach the actual charge and discharge current. On the one hand, it can take advantage of the voltage-type fuel meter's ability to gradually converge even with inaccurate parameters. On the other hand, the approximation of the estimated charge and discharge current to the actual charge and discharge current can accelerate the convergence speed and improve the accuracy of the remaining power estimation.

[0044] See also Figure 2 If the traditional battery internal resistance compensation method is used, there will be a large error between the actual remaining capacity of the battery and the estimated remaining capacity. Figure 2 In the chart, the black line is the actual remaining battery power, the purple line is the estimated remaining battery power, and the red line is the percentage error between the actual remaining battery power and the estimated remaining battery power. Figure 2 It can be seen that using the traditional battery internal resistance compensation method, the error between the actual remaining capacity of the battery and the estimated remaining capacity is as high as 4%. Figure 3 If the battery internal resistance compensation method of this embodiment is adopted, the error between the actual remaining capacity of the battery and the estimated remaining capacity is reduced. Figure 3 In the chart, the black line is the actual remaining battery power, the purple line is the estimated remaining battery power, and the red line is the percentage error between the actual remaining battery power and the estimated remaining battery power. Figure 3 It can be seen that using the battery internal resistance compensation method of this embodiment, the error between the actual remaining battery capacity and the estimated remaining battery capacity is only 2%. Therefore, using the solution of this embodiment can more accurately estimate the battery internal resistance parameter, making the estimated remaining battery capacity more accurate.

[0045] Computer device embodiment: The computer device of this embodiment can be a device such as a fuel meter, which has a processor, a memory, and a computer program stored in the memory and capable of running on the processor, such as an information processing program for implementing the above-mentioned information processing method. When the processor executes the computer program, the various steps of the above-mentioned battery internal resistance compensation method are implemented.

[0046] For example, a computer program can be divided into one or more modules, one or more of which are stored in a memory and executed by a processor to implement the various modules of the present invention. One or more modules can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program in a terminal device.

[0047] The processor referred to in the present invention may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor. The processor is the control center of the terminal device and connects various parts of the entire terminal device using various interfaces and lines.

[0048] The memory can be used to store computer programs and / or modules. The processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and accessing the data stored in the memory. The memory can primarily include a program storage area and a data storage area. The program storage area can store the operating system and at least one application required for a function, while the data storage area can store data generated based on the use of the mobile phone. Furthermore, the memory can include high-speed random access memory (RAM) and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0049] Storage medium embodiment: If a computer program stored in a computer device is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention can also implement all or part of the process of the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement each step of the above-mentioned battery internal resistance compensation method.

[0050] Computer programs include computer program code, which may be in source code, object code, executable files, or some intermediate form. Computer-readable media may include any entity or device capable of carrying computer program code, recording media, USB flash drives, removable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signals, telecommunications signals, and software distribution media. It should be noted that the content of computer-readable media may be appropriately expanded or reduced based on the requirements of legislation and patent practice within a jurisdiction. For example, in some jurisdictions, based on legislation and patent practice, computer-readable media do not include electric carrier signals or telecommunications signals.

[0051] Finally, it should be emphasized that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various changes and modifications. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. Battery internal resistance compensation method, including: Get the internal resistance parameters of the battery; Its characteristics are: Starting from the static state of the battery, obtain the actual charge and discharge current of the battery in each calculation cycle; Calculating an estimated charge and discharge current of the battery in each calculation cycle based on the internal resistance parameter, the sampled actual voltage of the battery, and the initial open circuit voltage; Determine whether the current cycle meets the following preset conditions: the error between the actual charge and discharge current and the estimated charge and discharge current is greater than an error threshold, and the error between the actual charge and discharge current and the estimated charge and discharge current is greater than the error threshold for a period of time exceeding a preset calculation cycle. If the preset conditions are met, obtain an internal resistance compensation coefficient, apply the internal resistance compensation coefficient to perform compensation calculation on the internal resistance parameter of the battery to obtain an updated internal resistance parameter, and use the updated internal resistance parameter as the internal resistance parameter for the next calculation cycle.

2. The battery internal resistance compensation method according to claim 1, characterized in that: If the preset condition is not met, the compensation calculation for the internal resistance parameter of the battery is not performed.

3. The battery internal resistance compensation method according to claim 1 or 2, characterized in that: Acquiring the internal resistance compensation coefficient includes: calculating the internal resistance compensation coefficient using a preset formula.

4. The battery internal resistance compensation method according to claim 3, characterized in that: When the preset formula is used to calculate the internal resistance compensation coefficient, the preset formula includes calculation factors of the actual battery voltage, the battery aging degree and the current temperature.

5. The battery internal resistance compensation method according to claim 1 or 2, characterized in that: Acquiring the actual charge and discharge current of the battery includes: acquiring the actual charge and discharge current through a current sampling circuit of a fuel meter.

6. The battery internal resistance compensation method according to claim 5, characterized in that: Before obtaining the actual charge and discharge current of the battery, the battery is modeled and the modeling parameters are input into the fuel gauge.

7. The battery internal resistance compensation method according to claim 1 or 2, characterized in that: Before obtaining the actual charge and discharge current of the battery, the following steps are further performed: setting the time length of the calculation cycle.

8. The battery internal resistance compensation method according to claim 1 or 2, characterized in that: Before obtaining the actual charge and discharge current of the battery, the following steps are further performed: setting the number of the preset calculation cycles.

9. A computer device, characterized in that The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, each step of the battery internal resistance compensation method according to any one of claims 1 to 8 is implemented.

10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the battery internal resistance compensation method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Battery detection method, device, medium and system

    CN113740745A

  • Lithium battery internal resistance compensation method, apparatus and device, and storage medium

    CN115343643A

  • Online estimation method, device and equipment for internal resistance of battery and storage medium

    CN118330487A