Electric quantity calibration method and device, electronic equipment and storage medium
By acquiring the battery terminal voltage and charge percentage, calculating the linear formula coefficient, and calibrating the charge detection, the problem of inaccurate battery charge display is solved, improving the accuracy of charge detection and user experience.
Patent Information
- Application Number
- CN202511316821.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-09-16
Smart Images

Figure CN120820862A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electric quantity detection, and in particular to an electric quantity calibration method, device, electronic device and storage medium. Background Art
[0002] The accuracy of battery charge display has always been a major concern for end users, especially mobile phone users. Inaccurate battery levels can prevent users from accurately estimating the phone's remaining usable time, leading to unexpected battery drain and shutdown. Inaccurate battery levels can also cause the battery's shutdown voltage to drop, potentially leading to prolonged system operation in unexpectedly low-performance or unsafe voltage ranges. Inaccurate battery levels can also cause the phone to prematurely shut down after indicating 0% battery life, impacting user usage. Summary of the Invention
[0003] The purpose of the embodiments of the present application is to provide a method, device, electronic device, and storage medium for calibrating power to improve the accuracy of power detection. The specific technical solution is as follows: In a first aspect of an embodiment of the present application, a method for calibrating a power level is provided, the method comprising: Obtaining the battery percentage of the target device when it is discharged to the battery terminal voltage threshold, using the battery percentage as the calibration starting power, and obtaining the battery terminal voltage at a first moment, using the battery terminal voltage at the first moment as the starting voltage; Obtaining a preset cutoff voltage corresponding to zero power of the target device; Solving the coefficients of a linear formula of preset electric quantity and voltage according to the calibration starting electric quantity and starting voltage, the zero electric quantity and the cut-off voltage to obtain a target coefficient; Obtaining the battery terminal voltage of the target device at a current moment; calculating the battery capacity at a second moment based on the target coefficient, the linear formula, and the battery terminal voltage at the current moment; Obtain the power level of the target device at the current moment; calculate a first difference between the battery terminal voltage at the first moment and the cut-off voltage, and a second difference between the battery terminal voltage at the current moment and the cut-off voltage, and calculate the ratio of the first difference to the second difference, perform weighted summation on the battery power level at the second moment and the power level at the current moment, and obtain the calibrated power level.
[0004] In a possible implementation, obtaining the battery terminal voltage of the target device at a current moment includes: Periodically obtaining an average value of a battery terminal voltage and a battery terminal voltage of the target device; If, within a preset number of consecutive detection cycles, the average value of the battery terminal voltage is less than the battery terminal voltage threshold, and the current battery terminal voltage is less than the battery terminal voltage threshold, the current battery terminal voltage of the target device is obtained.
[0005] In a possible implementation, after obtaining the battery terminal voltage of the target device at a current moment, the method further includes: If the average value of the battery terminal voltage is greater than the battery terminal voltage threshold value + the preset delay value, and the current battery terminal voltage is greater than the battery terminal voltage threshold value + the preset delay value, then the calibration is exited.
[0006] In a possible implementation, after performing a weighted summation of the battery power at the second moment and the power at the current moment using the ratio obtained by calculation to obtain a calibrated power, the method further includes: acquiring at least one of a calibrated average battery terminal voltage, battery temperature change information, and battery power at a third moment; If the average battery terminal voltage after calibration is greater than the starting voltage + the preset voltage value, or the battery temperature change is greater than the preset temperature value, or the battery power at the third moment is greater than the calibration starting power + the preset power value, then return to the step of obtaining the battery terminal voltage and power of the target device at the current moment, and recalculate the power.
[0007] In a possible implementation, obtaining the battery terminal voltage of the target device at a current moment includes: The current battery terminal voltage of the target device is obtained by coulomb meter detection.
[0008] According to a second aspect of the present application, a device for calibrating electrical quantity is provided, the device comprising: The power acquisition module is used to obtain the power percentage of the target device when it is discharged to the battery terminal voltage threshold, use the power percentage as the calibration starting power, and obtain the battery terminal voltage at a first moment, use the battery terminal voltage at the first moment as the starting voltage; A power setting module, configured to obtain a preset cut-off voltage corresponding to zero power of the target device; a coefficient determination module, configured to solve the coefficients of a linear formula of preset electric quantity and voltage according to the calibration starting electric quantity and starting voltage, the zero electric quantity and the cut-off voltage, to obtain a target coefficient; a power calculation module, configured to obtain the battery terminal voltage of the target device at a current moment; and calculate the battery power at a second moment based on the target coefficient, the linear formula, and the battery terminal voltage at the current moment; A power calibration module is used to obtain the power level of the target device at the current moment; calculate a first difference between the battery terminal voltage at the first moment and the cut-off voltage, as well as a second difference between the battery terminal voltage at the current moment and the cut-off voltage, and calculate the ratio of the first difference to the second difference; and perform a weighted summation of the battery power level at the second moment and the power level at the current moment based on the calculated ratio to obtain a calibrated power level.
[0009] In one possible embodiment, the power calibration module is specifically used to periodically obtain the average value of the battery terminal voltage and the battery terminal voltage of the target device; within a preset number of consecutive detection cycles, if the average value of the battery terminal voltage is less than the battery terminal voltage threshold, and the battery terminal voltage at the current moment is less than the battery terminal voltage threshold, the battery terminal voltage of the target device at the current moment is obtained.
[0010] In a possible implementation, the device further includes: The calibration exit module is used to exit the calibration if the average value of the battery terminal voltage is greater than the battery terminal voltage threshold + the preset delay value, and the current battery terminal voltage is greater than the battery terminal voltage threshold + the preset delay value.
[0011] In a possible implementation, the device further includes: A recalculation module is used to obtain at least one of the average battery terminal voltage after calibration, the battery temperature change information, and the battery power at the third moment; if the average battery terminal voltage after calibration is greater than the starting voltage + the preset voltage value, or the battery temperature change is greater than the preset temperature value, or the battery power at the third moment is greater than the calibration starting power + the preset power value, then return to the step of obtaining the battery terminal voltage and the power at the current moment of the target device, and recalculate the power.
[0012] In a possible implementation, the power calibration module is specifically configured to obtain the battery terminal voltage of the target device at a current moment through coulomb counter detection.
[0013] Another aspect of the present application provides an electronic device, including: Memory for storing computer programs; The processor is configured to implement any of the above-mentioned power calibration methods when executing a program stored in the memory.
[0014] In another aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, any of the above-mentioned power calibration methods is implemented.
[0015] In another aspect of the embodiments of the present application, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned power calibration methods.
[0016] Beneficial effects of the embodiments of the present application: Embodiments of the present application provide a power calibration method, device, electronic device, and storage medium, the method comprising: obtaining the power percentage of a target device when the device is discharged to a battery terminal voltage threshold, using the power percentage as the calibration starting power, and obtaining the battery terminal voltage at a first moment, using the battery terminal voltage at the first moment as the starting voltage; obtaining a predetermined cutoff voltage corresponding to 0 power of the target device; solving the coefficient of a linear formula of predetermined power and voltage based on the calibration starting power and starting voltage, the 0 power, and the cutoff voltage to obtain a target coefficient; obtaining the battery terminal voltage of the target device at a current moment; calculating the battery power at a second moment based on the target coefficient, the linear formula, and the battery terminal voltage at a current moment; obtaining the power of the target device at a current moment; calculating a first difference between the battery terminal voltage at the first moment and the cutoff voltage, and a second difference between the battery terminal voltage at the current moment and the cutoff voltage, and calculating a ratio of the first difference to the second difference; performing a weighted summation of the battery power at the second moment and the power at the current moment using the calculated ratio to obtain the calibrated power. Through the solution of the present application, after obtaining the battery terminal voltage and power information of the target device at the current moment through the coulomb meter, the battery power at the second moment can be corrected in combination with the linear relationship between power and voltage, thereby improving the accuracy of power detection.
[0017] Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0019] Figure 1a A schematic diagram of a flow chart of a method for calibrating electrical quantity provided in an embodiment of the present application; Figure 1b A comparison diagram of the effects of the power calibration method provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of the electrical quantity calibration device provided in an embodiment of the present application; Figure 3A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of this application.
[0021] In the first aspect of the embodiment of the present application, a method for calibrating power is first provided. Figure 1a , the method comprising: Step S11, obtaining the percentage of power of the target device when it is discharged to the battery terminal voltage threshold, using the percentage of power as the calibration starting power, and obtaining the battery terminal voltage at a first moment, using the battery terminal voltage at the first moment as the starting voltage; Step S12, obtaining a preset cut-off voltage corresponding to zero power of the target device; Step S13, solving the coefficients of the linear formula of the preset electric quantity and voltage according to the calibration starting electric quantity and starting voltage, the zero electric quantity and the cut-off voltage to obtain the target coefficients; Step S14, obtaining the battery terminal voltage of the target device at the current moment; calculating the battery power at the second moment based on the target coefficient, the linear formula, and the battery terminal voltage at the current moment; Step S15, obtaining the power level of the target device at the current moment; calculating the first difference between the battery terminal voltage at the first moment and the cut-off voltage, and the second difference between the battery terminal voltage at the current moment and the cut-off voltage, and calculating the ratio of the first difference to the second difference; performing a weighted summation of the battery power level at the second moment and the power level at the current moment through the calculated ratio to obtain the calibrated power level.
[0022] Corresponding to step S11, the battery percentage and the battery voltage at the first moment when the target device is discharged to the battery terminal voltage threshold are obtained. When the calibration starting power and starting voltage are obtained, the battery terminal voltage threshold can be set in advance. In an example, the battery terminal voltage threshold can be as follows: Table 1 is the value table of battery terminal voltage threshold
[0023] As described in the table above, you can set corresponding battery terminal voltage thresholds (VTH) for different battery temperatures. This allows you to periodically detect the target device's voltage information, recording the battery charge percentage (BATT_SOC) and the battery terminal voltage (VBAT_NOW1) at the first moment the target device is discharged to the battery terminal voltage threshold. This allows you to obtain the calibration starting charge (BATT_SOC_E) and starting voltage (VBAT_E). The first moment is the detection moment when the target device is discharged to the battery terminal voltage threshold.
[0024] Corresponding to step S12, when obtaining the preset cut-off voltage corresponding to zero power of the target device, the cut-off voltage (Vzp) can be preset. In an example, the cut-off voltage is as follows: Table 2 is the discharge cut-off voltage value table
[0025] As described in the table above, corresponding cut-off voltages can be set for different battery temperatures.
[0026] Corresponding to step S13, based on the calibration starting power and starting voltage, the zero power and the cut-off voltage, the coefficients of the linear formula of the preset power and voltage are solved. When the target coefficients are obtained, the equation consisting of the calibration starting power and starting voltage, and the equation consisting of the zero power and the cut-off voltage can be combined to solve the coefficients of the linear formula of power and voltage. For example, K and B can be calculated by the linear formula Y=KX+B and two sets of [BATT_SOC, VABT]: the two sets of data are [0%, Vzp] reporting 0% and the shutdown voltage and [BATT_SOC_E, VBAT_E] for solving to obtain the coefficients of the linear formula, where K represents the slope, B represents the intercept, Y represents the power, and X represents the voltage.
[0027] Corresponding to step S14, when calculating the battery capacity at the second moment based on the target coefficient, the linear formula and the battery terminal voltage at the current moment, the battery terminal voltage at the current moment can be substituted into the linear formula based on the coefficient calculated in the previous step to calculate the battery capacity at the second moment.
[0028] Corresponding to step S15, the power level of the target device at the current moment is obtained. The power level at the current moment can be obtained when the current target device meets the calibration conditions. In a possible embodiment, obtaining the battery terminal voltage of the target device at the current moment includes: obtaining the battery terminal voltage of the target device at the current moment through coulomb meter detection. When calculating the first difference between the battery terminal voltage at the first moment and the cut-off voltage, and the second difference between the battery terminal voltage at the current moment and the cut-off voltage, and calculating the ratio of the first difference to the second difference, the difference between the battery terminal voltage at the first moment and the cut-off voltage, and the difference between the battery terminal voltage at the current moment and the cut-off voltage can be calculated first, and then the two can be divided to obtain the ratio. Finally, the battery power level at the second moment and the power level at the current moment are weightedly summed by the calculated ratio to obtain the calibrated power level.
[0029] It can be seen that through the solution of the present application, after obtaining the battery terminal voltage and power information of the target device at the current moment through the coulomb meter, the battery power at the second moment can be corrected in combination with the linear relationship between the power and voltage. That is, the power result calculated by the power meter (i.e., the power at the current moment) can be corrected in combination with the linear relationship between the power and voltage, thereby improving the accuracy of power detection.
[0030] In one possible implementation, obtaining the battery terminal voltage of the target device at the current moment includes: periodically obtaining the average value and battery terminal voltage of the target device; if the average value of the battery terminal voltage (VBAT_AVG) is less than the battery terminal voltage threshold (VTH) within a preset number of detection cycles, and the battery terminal voltage at the current moment (VBAT_NOW) is less than the battery terminal voltage threshold (VTH), obtaining the battery terminal voltage of the target device at the current moment. Specifically, the condition for entering zero-power prediction can be: VBAT_AVG for several consecutive cycles <VTH&VBAT_NOW<VTH。
[0031] In one possible implementation, after obtaining the current battery terminal voltage of the target device, the method further includes: exiting calibration if the average battery terminal voltage (VBAT_AVG) is greater than the battery terminal voltage threshold (VTH) + a preset delay value (delat_v), and the current battery terminal voltage (BAT_NOW) is greater than the battery terminal voltage threshold (VTH) + the preset delay value (delat_v). Specifically, the condition for exiting zero-power prediction may be: VBAT_AVG > VTH + delat_v & BAT_NOW > VTH + delat_v.
[0032] In a possible implementation, after obtaining the calibrated power by weightedly summing the battery power at the second moment and the power at the current moment using the ratio obtained by calculation, the method further includes: obtaining at least one of the calibrated average battery terminal voltage (VBAT_AVG), battery temperature change information (BATT_TEMP), and the battery power at the third moment (batt_soc); if the calibrated average battery terminal voltage is greater than the starting voltage + the preset voltage value, or the battery temperature change is greater than the preset temperature value, or the battery power at the third moment is greater than the calibration starting power + the preset power value, returning to the step of obtaining the battery terminal voltage and the power at the current moment of the target device, and recalculating the power. Specifically, when the preset voltage value is 10mV, the preset temperature value is 5 degrees, and the preset power value is 5% (corresponding to BATT_SOC_E+0.5% below), the power value of the target device can be calibrated. When VBAT_AVG>VBAT_E+10mV, or BATT_TEMP changes by more than 5 degrees, or batt_soc is greater than BATT_SOC_E+0.5%, the power value can be recalibrated.
[0033] To illustrate the method of the embodiment of the present application, the following is a description with reference to a specific embodiment, including: 1. Record BATT_SOC when discharged to VTH as BATT_SOC_E (calibration starting capacity), and VBAT_NOW1 as VBAT_E (starting voltage) 2. Calculate K and B using the linear formula Y=KX+B and two sets of [BATT_SOC, VABT]: The two sets of data are [0%, Vzp] reporting 0% and the shutdown voltage and [BATT_SOC_E, VBAT_E]; 0 = Vzp *K + B; BATT_SOC_E = VBAT_E * K + B; The calculation can be obtained: K=BATT_SOC_E / (VBAT_E-Vzp), B=-K*Vzp=BATT_SOC_E*Vzp / (Vzp-VBAT_E); Substitute VBAT_NOW into Y = KX + B to calculate Vbat_soc; VBAT_SOC = K * VBAT_NOW2 + B.
[0034] 3. Calculate Weight; Weight = (VBAT_NOW2 – VZP) / (VBAT_E – VZP).
[0035] 4. Calculate the final calibration power; Cali_soc = vbat soc* (1 – weight) + batt_soc *weight.
[0036] 5. Recalculate K / B conditions: VBAT_AVG>VBAT_E + 10mV, or BATT_TEMP changes by more than 5 degrees, or batt_soc is greater than BATT_SOC_E + 0.5%.
[0037] See also Figure 1b During testing of this application's solution, after artificially introducing a 5% error, the battery charge began to calibrate when discharging to a range where VBAT was less than VTH, gradually reducing the 5% error until it reached the cutoff voltage (Vzp), where the error also decreased to 0. That is, the battery charge displayed was 0% while the discharge voltage reached approximately 3.4V. The battery charge display was smooth, demonstrating the significant superiority of this application's solution. In the control group without the calibration solution, the 5% error in BATT_SOC was still present at the discharge cutoff, causing electronic devices such as mobile phones to shut down before the battery reached 0%, impacting device operation.
[0038] In a second aspect of the present application, a power calibration device is provided. Figure 2 , the device comprises: The power acquisition module 201 is used to obtain the power percentage of the target device when it is discharged to the battery terminal voltage threshold, use the power percentage as the calibration starting power, and obtain the battery terminal voltage at a first moment, use the battery terminal voltage at the first moment as the starting voltage; The power setting module 202 is used to obtain a preset cut-off voltage corresponding to zero power of the target device; The coefficient determination module 203 is configured to solve the coefficient of the linear formula of the preset electric quantity and voltage according to the calibration starting electric quantity and starting voltage, the zero electric quantity and the cut-off voltage to obtain a target coefficient; The power calculation module 204 is configured to obtain the battery terminal voltage of the target device at the current moment; and calculate the battery power at a second moment based on the target coefficient, the linear formula, and the battery terminal voltage at the current moment; The power calibration module 205 is used to obtain the power of the target device at the current moment; calculate the first difference between the battery terminal voltage at the first moment and the cut-off voltage, and the second difference between the battery terminal voltage at the current moment and the cut-off voltage, and calculate the ratio of the first difference to the second difference; and perform a weighted summation of the battery power at the second moment and the power at the current moment based on the calculated ratio to obtain the calibrated power.
[0039] In one possible embodiment, the power calibration module is specifically used to periodically obtain the average value of the battery terminal voltage and the battery terminal voltage of the target device; within a preset number of consecutive detection cycles, if the average value of the battery terminal voltage is less than the battery terminal voltage threshold, and the battery terminal voltage at the current moment is less than the battery terminal voltage threshold, the battery terminal voltage of the target device at the current moment is obtained.
[0040] In a possible implementation, the device further includes: The calibration exit module is used to exit the calibration if the average value of the battery terminal voltage is greater than the battery terminal voltage threshold + the preset delay value, and the current battery terminal voltage is greater than the battery terminal voltage threshold + the preset delay value.
[0041] In a possible implementation, the device further includes: A recalculation module is used to obtain at least one of the average battery terminal voltage after calibration, the battery temperature change information, and the battery power at the third moment; if the average battery terminal voltage after calibration is greater than the starting voltage + the preset voltage value, or the battery temperature change is greater than the preset temperature value, or the battery power at the third moment is greater than the calibration starting power + the preset power value, then return to the step of obtaining the battery terminal voltage and the power at the current moment of the target device, and recalculate the power.
[0042] In a possible implementation, the power calibration module is specifically configured to obtain the battery terminal voltage of the target device at a current moment through coulomb counter detection.
[0043] It can be seen that through the device of the present application, after obtaining the battery terminal voltage and power information of the target device at the current moment through the coulomb meter, it can be corrected by the battery power at the second moment combined with the linear relationship between power and voltage, thereby improving the accuracy of power detection.
[0044] The present application also provides an electronic device, such as Figure 3 Shown, including: Memory 301, used for storing computer programs; The processor 302 is configured to execute the program stored in the memory 301 by performing the following steps: Obtain the battery percentage and the battery voltage at the first moment when the target device is discharged to the battery voltage threshold, and obtain the calibration starting power and starting voltage; Obtaining a preset cutoff voltage corresponding to zero power of the target device; Solving the coefficients of a linear formula of preset electric quantity and voltage according to the calibration starting electric quantity and starting voltage, the zero electric quantity and the cut-off voltage to obtain a target coefficient; Obtaining the battery terminal voltage of the target device at a current moment, and calculating the battery capacity at a second moment based on the target coefficient, the linear formula, and the battery terminal voltage at the current moment; Obtain the power level of the target device at the current moment; calculate a first difference between the battery terminal voltage at the first moment and the cut-off voltage, as well as a second difference between the battery terminal voltage at the current moment and the cut-off voltage, and calculate the ratio of the first difference to the second difference; perform a weighted summation of the battery power level at the second moment and the power level at the current moment based on the calculated ratio to obtain a calibrated power level.
[0045] The communication bus mentioned in the electronic devices mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into address buses, data buses, control buses, etc. For ease of illustration, only a single thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0046] The communication interface is used for communication between the above electronic device and other devices.
[0047] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0048] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0049] In another embodiment provided in the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the steps of any of the above-mentioned power calibration methods are implemented.
[0050] In another embodiment provided by the present application, a computer program product including instructions is further provided, which, when executed on a computer, enables the computer to execute any one of the power calibration methods in the above embodiments.
[0051] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or solid-state drive (SSD).
[0052] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0053] Each embodiment in this specification is described in a related manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences from other embodiments. In particular, the device, electronic device, and storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For related portions, reference can be made to the descriptions of the method embodiments.
[0054] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.
Claims
1. A method for electric quantity calibration, characterized in that: The method comprises: Obtaining the battery percentage of the target device when it is discharged to the battery terminal voltage threshold, using the battery percentage as the calibration starting power, and obtaining the battery terminal voltage at a first moment, using the battery terminal voltage at the first moment as the starting voltage; Obtaining a preset cutoff voltage corresponding to zero power of the target device; Solving the coefficients of a linear formula of preset electric quantity and voltage according to the calibration starting electric quantity and starting voltage, the zero electric quantity and the cut-off voltage to obtain a target coefficient; Obtaining the battery terminal voltage of the target device at a current moment; calculating the battery capacity at a second moment based on the target coefficient, the linear formula, and the battery terminal voltage at the current moment; Obtain the power level of the target device at the current moment; calculate a first difference between the battery terminal voltage at the first moment and the cut-off voltage, as well as a second difference between the battery terminal voltage at the current moment and the cut-off voltage, and calculate the ratio of the first difference to the second difference; perform a weighted summation of the battery power level at the second moment and the power level at the current moment based on the calculated ratio to obtain a calibrated power level.
2. The method according to claim 1, characterized in that The obtaining of the battery terminal voltage of the target device at the current moment includes: Periodically obtaining an average value of a battery terminal voltage and a battery terminal voltage of the target device; If, within a preset number of consecutive detection cycles, the average value of the battery terminal voltage is less than the battery terminal voltage threshold, and the current battery terminal voltage is less than the battery terminal voltage threshold, the current battery terminal voltage of the target device is obtained.
3. The method according to claim 2, characterized in that After obtaining the battery terminal voltage of the target device at the current moment, the method further includes: If the average value of the battery terminal voltage is greater than the battery terminal voltage threshold value + the preset delay value, and the current battery terminal voltage is greater than the battery terminal voltage threshold value + the preset delay value, then the calibration is exited.
4. The method according to claim 2, characterized in that After obtaining the calibrated battery power by performing a weighted summation of the battery power at the second moment and the battery power at the current moment using the ratio obtained by calculation, the method further includes: acquiring at least one of a calibrated average battery terminal voltage, battery temperature change information, and battery power at a third moment; If the average battery terminal voltage after calibration is greater than the starting voltage + the preset voltage value, or the battery temperature change is greater than the preset temperature value, or the battery power at the third moment is greater than the calibration starting power + the preset power value, then return to the step of obtaining the battery terminal voltage and power of the target device at the current moment, and recalculate the power.
5. The method according to claim 1, wherein The obtaining of the battery terminal voltage of the target device at the current moment includes: The current battery terminal voltage of the target device is obtained by coulomb meter detection.
6. A power calibration device, characterized in that: The device comprises: A power acquisition module is used to obtain the power percentage of the target device when it is discharged to the battery terminal voltage threshold, use the power percentage as the calibration starting power, and obtain the battery terminal voltage at a first moment, use the battery terminal voltage at the first moment as the starting voltage; A power setting module, configured to obtain a preset cut-off voltage corresponding to zero power of the target device; a coefficient determination module, configured to solve the coefficients of a linear formula of preset electric quantity and voltage according to the calibration starting electric quantity and starting voltage, the zero electric quantity and the cut-off voltage, to obtain a target coefficient; a power calculation module, configured to obtain the battery terminal voltage of the target device at a current moment; and calculate the battery power at a second moment based on the target coefficient, the linear formula, and the battery terminal voltage at the current moment; A power calibration module is used to obtain the power level of the target device at the current moment; calculate a first difference between the battery terminal voltage at the first moment and the cut-off voltage, as well as a second difference between the battery terminal voltage at the current moment and the cut-off voltage, and calculate the ratio of the first difference to the second difference; and perform a weighted summation of the battery power level at the second moment and the power level at the current moment based on the calculated ratio to obtain a calibrated power level.
7. The device according to claim 6, characterized in that The power calibration module is specifically used to periodically obtain the average value and battery terminal voltage of the battery terminal voltage of the target device; within a preset number of consecutive detection cycles, if the average value of the battery terminal voltage is less than the battery terminal voltage threshold, and the battery terminal voltage at the current moment is less than the battery terminal voltage threshold, the battery terminal voltage of the target device at the current moment is obtained.
8. The device according to claim 7, characterized in that The device further comprises: The calibration exit module is used to exit the calibration if the average value of the battery terminal voltage is greater than the battery terminal voltage threshold + the preset delay value, and the current battery terminal voltage is greater than the battery terminal voltage threshold + the preset delay value.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 5 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method and system for accurately reporting battery capacity
CN101526588A
Apparatus and method for estimating state of health of battery based on battery voltage variation pattern
CN102119338A
Multi-parameter combined SOC estimation method
CN111537895A
Battery capacity prediction method and device and computer readable storage medium
CN116840689A
Battery management system and its operating method
KR1020150048439A